Prev Section 3.8: MeshData Section Up Section 3.8: MeshData Section Subsection 3.8.2: ElementData Next
3.8.1 Data Generators
The generator attribute is optional, but can be defined if the user wishes to generate the data automatically instead of tabulating it. If the generator attribute is defined, the child tags must be the parameters of the generator. For example
<MeshData> <node_data name="E_map" generator="math"> <math>X*X + Y*Y + Z*Z</math> <mesh_data> </MeshData>
The following generators are currently suppored.
const The const generator takes a constant value and assigns it to the set.
<MeshData> <mesh_data name="rotation" type="mat3" generator="const" elem_set="Part1"> <value>1,0,0, 0,1,0, 0,0,1</value> <mesh_data> </MeshData>
math The math generator generates the data based on a mathematical expression.
<MeshData> <mesh_data name="fiber" type="vec3" generator="math" elem_set="Part1"> <math>X,Y,Z</math> <mesh_data> </MeshData>
Note that in math expressions, only the variables X, Y, and Z can be used, which refer to reference coordinates.
parabolic_map The “parabolic map” defines a scalar data field with a parabolic profile on a surface. The data is determined by solving a heat-type problem with a constant source and homogeneous boundary conditions on the edge of the surface.
<MeshData> <mesh_data name="pressure" generator="parabolic map" surface="surface1"> <value>1.0</value> <mesh_data> </MeshData>
surface-to-surface_map The “surface-to-surface map” generator defines a data field on the domain bounded by two surfaces. The data values are interpolated using a user-defined function between the surfaces.
<MeshData> <mesh_data name="E" generator="surface-to-surface map" elem_set="Part1"> <function type="math">x*x+1</function> <bottom_surface surface="surface1"/> <top_surface surface="surface2"/> <mesh_data> </MeshData>