![]() |
GeMA
The GeMA main application
|
In GeMA, several types of user defined data can be associated with mesh nodes, cells, integration points, boundary conditions and discontinuity sets. Whenever one of this data values is created in the model, information about its layout and behavior can be given through the set of fields defined below.
Notice that not every field is applicable to every data kind, as defined by the "Valid for" column. This column specifies which kind of data objects are affected by the field. A value of 'All' means that the given field is applicable to every kind of data object: state vars (Sv), node attributes (Na), cell attributes (Ca), property set attributes (Ps), Gauss attributes (Ga), boundary condition attributes (Bc) and discontinuity set attributes (Ds). A value of "Ga" means that this field is applicable only to Gauss attributes and a value of "Na, Ca, Ps, Ga" means that the field is applicable to all types except state vars, boundary conditions and discontinuity sets.
Field | Description | Type | Required | Valid for |
---|---|---|---|---|
id | The data set name. Used while referencing this value throughout the model. | String | Yes | All |
description | A meta-data field storing the data's purpose. | String | No | All |
dim | This field is used to define the value dimension for vector or matrix data. For vector values, this field should store the vector size. For matrix values, this field should be a string in the format "lxc" where l is the number of lines and c the number of columns in the matrix. State variables don't accept matrix values. When absent, the value will be a scalar. | Integer or String | No | All(*) |
type | The data type in which the values should be stored. This is handled by GeMA as a request. It can be ignored depending on the values of other options like functions , allocMode and/or allocStrategy . If that is the case, values will be stored as doubles, the default if this option is missing. Since GeMA always works internally with double values, and all accepted types can be stored inside a double without precision loss, using this option is always a space optimization only. Accepted values are "double" , "float" , "int32" , "int16" , "byte" , "uint32" , "uint16" and "ubyte" . | String | No | All |
unit | The unit in which the data will be stored. The default value is the empty string, which is compatible with any unit and so, when used in calculations, will behave as the default unit for the given quantity. See also the documentation on Working with units. | String | No | All |
functions | A boolean field that when set to true indicates to the GeMA framework that this data can store user functions. Setting it to true does not mean that all of the data values must be a function. In fact, it's possible to have a property, for example, where one material uses a function value and another a plain number. This field should be set to true only when functions will be used since storage is more efficient when they are not allowed. State variables and discontinuity sets can not store user functions. Default = false. | Boolean | No | Na,Ca, Ps,Ga, Bc |
defVal | The default value used for initializing the data. When specifying a default value for a vector data, a table syntax should be used to provide values for all of the vector dimensions. Supposing that the vector has a dimension equal to 3, defVal = {0.0, 1.0, 0.0} will initialize it with a normalized vector pointing in the y direction. If a scalar value is given, it will be used to fill all of the vector dimensions. For matrices, the initial value can be either given by a table of tables or linearized by column major format (the same used in the FORTRAN language), so, for a 2x2 matrix, both defVal = {11, 21, 12, 22} and defVal = { {11, 12}, {21, 22} } statements correspond to the matrix \(\begin{pmatrix} 11 & 12 \\ 21 & 22 \end{pmatrix}\). If the data allows function values, the default value can be a string with the function name. If a constMap is defined, it can also be a string with a constant name. If both functions and constants are enabled, a string will be first checked againts the constant map, then against available user functions. If this field is not filled, the default value will be equal to zero (or a vector/matrix filled with zeros in all its dimensions). | Number, Table or String | No | All |
allocMode | A field used to give GeMA a hint about the expected data values and used for optimizing the internal data layout. Its values can be "sparse" for telling GeMA that most data values will be equal to the default value, "full" for telling that most of the data is different from the default or "auto" for telling that the data is "full" , but space should be allocated only after the first write to the data set of a value different from the default. This is the default behaviour (except for state variables that only accept "full" values) and can produce great memory economy when attributes are created and not used or for attributes whose sole value is its default, a common pattern when working with user functions. | String | No | Na,Ca, Ps,Ga, Bc,Ds |
allocStrategy | A field used to define the strategy that should be used for handling sparse data when allocMode is equal to "sparse" . Currently unimplemented. Accepted values are: "auto" . | String | No | Na,Ca, Ps,Ga, Bc,Ds |
format | This field controls how a value will be formatted when printed or saved to a text file format. It uses a subset of the C printf() syntax, allowing the user to specify the field width, precision and format type. A format = "8.2f" statement means that the formatted value will have at least 8 characters and 2 decimal values. Allowed format specifiers are 'f' (for decimal floating point format), 'e' (for scientific notation format) and 'g' (corresponding to 'f' or 'e', whichever is shortest). Default = "12.2f". | String | No | All |
affectedNodes | This field controls the affected nodes, or storage pattern, for node based data when ghost nodes are present. A value of "geometry" means that this data has values for geometry nodes only. A value of "ghost" means that this data has values for ghost nodes only and a value of "both" means that it stores values for all node types. When absent, a "geometry" mode is used. When using this field together with the standard GemaMesh plugin (and other plugins derived from it), keep in mind that ghost support will be available only if the useGhostNodes flag was explicitly enabled on the mesh. | String | No | Sv,Na |
ruleSet | Gauss attributes are applied over an element's integration points. Since a mesh can be associated with several integration rules, when allocating space for this attribute, GeMA needs to know how many integration points exist per element type. This field should store the used rule number. If absent, the first rule will be assumed. | Integer | No | Ga |
tag | Boundary condition values may have a tag used to easily identify the boundary conditions applied to a node on exported data, when used together with the io process's saveNodeBcTags export option. This field should store either a unique (per mesh) integer value between 0 and 53, 0 meaning no tag, or a table with a tag value per property dimension component, each one also a value from 0 to 53. The table format can also be used for scalar properties. If a single integer is given for a multidimensional property, that value will be the tag value for each dimension component. If absent, the tag will be set to 0. Optionally, a value of true instructs GeMA to obtain the tag value from the defBCTagValues configuration table (see Simulation options), indexed by both the boundary condition type name and the property name. Example: {id = "ux", defVal = -999, tag = 3} or {id = "f", dim = 2, tag = {1, 2}} or {id = "T", tag = true} . Each tag value has an associated tag mask, where only the tag value bit is turned on. When exporting boundary condition application point info, for each mesh node, the tag masks of the BC values applied to that node are ored together. So, if for example a node has fixed x and y displacements and those BCs have tags respectively 3 and 4, the node will have a value of 12 (4 + 8 or in binary 00001100). When the tag is used together with edge, face o cell boundary conditions, all the nodes belonging to an edge/face or cell are considered. For node based boundary conditions, values equal to zero or equal to the deafult value are ignored on the following conditions: 1) If a property has a default value (defValue ) defined by the user, nil values are ignored. 2) If a property is multidimensional, zero components of the vector/matrix are ignored. Both behaviours can be modified by adding the boolean flags ignoreDef and/or ignoreZero to the tag table, like {id = "ux", defVal = -999, tag = {3, ignoreDef = false}} . Values associated with edge , face or cell boundary conditions are never ignored. | Integer or table | No | Bc |
history | This field defines if this data should store or not a set of past data values. This is useful when the calculation method depends not only on the actual data value but also on past ones. If this field has a value of true , an unlimited number os past values will be enabled. A positive number greater than 1 defines the exact number of saved states that will be used in a rolling history pattern. A value of 2, for example, means that the current value and the last one are saved. When a new value is calculated, the current one becomes the last one and the last one is discarded. Property set attributes and boundary condition attributes don't accept history. Default = false (no history). | Boolean or Integer | No | Sv,Na, Ca,Ga, Ds |
constMap | This field defines a translation table that can be used to translate strings into scalar numbers when initializing a value. A constMap = {A = 1, B = 2, C = 3} statement means that if the string "A" is used to initialize a value, it will be translated into the value 1 . Those statements are currently valid for scalar attributes only. If an attribute allows both constant maps and function definitions, the translation process takes precedence over function name recognition. Constants defined in a constMap can be used in a defVal statement. This field is commonly used in property set definitions to allow for the description of material types by using plugin defined material constant tables, such as in constMap = constants.HydroFemPhysics.materialModels , where materialModels is a table, published by the HydroFemPhysics plugin, containing the names and associated numeric codes for the material types supported by the plugin, being accessed through the constants standard global variable. | Table | No | All(*) |
(*) See the field description.