thegooglecodearchive / sfepy

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

unify/improve handling of material parameters in terms #93

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Some terms support constant parameters, some support parameters in mesh
vertices, some support whaterver... it's quite a mess, that increases the
number of terms significantly too.

All this should be encapsulated in a class, that would provide parameter
values in points in space and time as necessary.

For speed reasons, cython implementation might be required, but let us
start with a pure python version first.

Original issue reported on code.google.com by robert.c...@gmail.com on 13 Jul 2009 at 5:50

GoogleCodeExporter commented 9 years ago
Done. All material parameters are now evaluated in quadrature points. There is 
also
new material syntax (shown in the long form):

material_10 = {
    'name' : 'm',
    'region' : 'SomeRegion',
    'values' : {
        # This gets tiled to all physical QPs (constant function)
        'val' : [0.0, -1.0, 0.0],
        # This does not - '.' denotes a special value, e.g. a flag.
        '.val0' : [0.0, 0.1, 0.0],
    },
}

material_3 = {
    'name' : 'm',
    'region' : 'SomeRegion,
    'function' : 'some_function',
}

def some_function(ts, coor, region, ig, mode=None):
    out = {}
    if mode == 'qp':
        out['val'] = <array of shape (coor.shape[0], n_row, n_col)
    else: # special mode
        out['val0'] = True

Original comment by robert.c...@gmail.com on 3 Sep 2009 at 2:50

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

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