thegooglecodearchive / sfepy

Automatically exported from code.google.com/p/sfepy
0 stars 0 forks source link

Add pre_processor #111

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Add pre_processor hook to query the mesh before the problem is executed. 

Original issue reported on code.google.com by freevryh...@gmail.com on 8 Apr 2010 at 8:17

GoogleCodeExporter commented 9 years ago
I would implement the following:

filename_mesh = 'get_mesh'

where get_mesh is a name of function taking no arguments, that either loads, or
generates the mesh. The function would have to be registered by using the 
'functions'
keyword, as usual.

Is that what you want?

Original comment by robert.c...@gmail.com on 9 Apr 2010 at 10:48

GoogleCodeExporter commented 9 years ago
Yes - this would resolve the issue. Thanks

Original comment by freevryh...@gmail.com on 9 Apr 2010 at 12:55

GoogleCodeExporter commented 9 years ago
It's at the github site [1] - if it works for you, I will push it to the master 
repo
and close the issue.

Look at tests/test_meshio.py (line 16 and below) for an example. In a normal 
problem
definition file, just write:

def mesh_hook(mesh, mode):
    ...

filename_mesh = mesh_hook

[1] http://github.com/rc/sfepy

Original comment by robert.c...@gmail.com on 10 Apr 2010 at 3:33

GoogleCodeExporter commented 9 years ago

Original comment by robert.c...@gmail.com on 13 Apr 2010 at 1:20

GoogleCodeExporter commented 9 years ago
Migrated to http://github.com/sfepy/sfepy/issues/113

Original comment by robert.c...@gmail.com on 30 Jan 2012 at 10:26