23 #ifndef _GEMA_VALUE_INFO_H_ 24 #define _GEMA_VALUE_INFO_H_ 98 #define GM_VALUE_INFO_DEFAULT_FORMAT_WIDTH 12 99 #define GM_VALUE_INFO_DEFAULT_FORMAT 'f' 100 #define GM_VALUE_INFO_DEFAULT_FORMAT_PREC 2 101 #define GM_VALUE_INFO_DEFAULT_FORMAT_STR "12.2f" 168 int size()
const {
return _nlin * _ncol; }
171 int nlin()
const {
return _nlin; }
174 int ncol()
const {
return _ncol; }
183 const double*
defValue()
const {
return _defValue; }
257 void setDimType(
GmDimType type,
int nlin = 1,
int ncol = 1);
259 void setDefValue(
const double* val);
260 void setDefFunction(
QString functionId);
332 void setFormat(
int fieldWidth,
char format,
int precision)
334 _fieldWidth = fieldWidth;
336 _precision = precision;
QString affectedNodesStr() const
Returns a string representation of the affected nodes type.
Definition: gmValueInfo.h:213
Auxiliar class used to store the definition of a value. It can be used to store informations about st...
Definition: gmValueInfo.h:126
void setAffectedNodes(GmAffectedNodes affNodes)
Updates the affected nodes information. For node based values only.
Definition: gmValueInfo.h:297
QString _id
Value id.
Definition: gmValueInfo.h:360
bool _ignoreDef
Should we ignore NODE values (component) equal to the default value?
Definition: gmValueInfo.h:115
char _format
Format type ('f', 'g', 'e', 'G' or 'E') used when printing values of this type.
Definition: gmValueInfo.h:379
This value set stores attributes attached to nodes.
Definition: gmValueInfo.h:39
QString id() const
Returns the value id.
Definition: gmValueInfo.h:136
GmAllocStrategy allocStrategy() const
Returns the allocation strategy for the stored data. Default = auto.
Definition: gmValueInfo.h:204
Values are a signed 32 bits integer.
Definition: gmValueInfo.h:57
GmAllocStrategy
Allocation strategy for the stored data.
Definition: gmValueInfo.h:82
int _ruleSet
The integration rule set that this value is bound to. Used only by values with kind == GM_GAUSS_ATTRI...
Definition: gmValueInfo.h:376
bool _ignoreZero
Should we ignore NODE zero values (component)?
Definition: gmValueInfo.h:116
double defScalarValue() const
Returns the default value for scalar data types.
Definition: gmValueInfo.h:186
GmDimType
Value dimension type.
Definition: gmValueInfo.h:66
GmAffectedNodes
Affected node types for node based values (GM_NODE_COORDINATES, GM_NODE_ATTRIBUTE or GM_NODE_STATEVAR...
Definition: gmValueInfo.h:91
int _ncol
The number of columns in a matrix type (1 for scalars or arrays)
Definition: gmValueInfo.h:373
int nlin() const
Returns the number of lines in a vector type or in a matrix type or 1 for scalars.
Definition: gmValueInfo.h:171
Declaration of usefull configuration definitions for the Core library.
QString dimTypeStr() const
Returns a string representation of the dimension type: scalar, vector(n), matrix(m,...
Definition: gmValueInfo.h:165
void setAllocStrategy(GmAllocStrategy strategy)
Updates the allocation strategy used for allocating space for the data values.
Definition: gmValueInfo.h:288
Sparse data is stored as a linked list.
Definition: gmValueInfo.h:86
bool _canStoreFunction
Can values of this type be represented by functions?
Definition: gmValueInfo.h:374
This value set stores properties attached to a boundary (edge or face) for a boundary condition.
Definition: gmValueInfo.h:45
GmStorageType storageType() const
The desired storage type for data values. Might not be how the data is really stored....
Definition: gmValueInfo.h:154
int precision() const
Returns the number of decimal places used when printing values of this type.
Definition: gmValueInfo.h:238
bool isNodeBased() const
Returns true if the set kind is a node based set (node coordinates, attributes or state vars)
Definition: gmValueInfo.h:151
Values are a double.
Definition: gmValueInfo.h:55
int _nlin
The number of lines in a vector type or in a matrix type (1 for scalars)
Definition: gmValueInfo.h:372
GmAllocMode _allocMode
How should values of this type be allocated?
Definition: gmValueInfo.h:366
char format() const
Returns the format type ('f', 'g', 'e', 'G' or 'E') used when printing values of this type.
Definition: gmValueInfo.h:232
GmValueSetKind
Type describing what kind of information is stored by a values set.
Definition: gmValueInfo.h:36
A helper struct to store bc tag information.
Definition: gmValueInfo.h:105
Specifies that this value exists over mesh and ghost nodes.
Definition: gmValueInfo.h:95
const GmBcTagInfo * tagInfo() const
Returns the boundary condition tag information that this value is associated with or NULL if the obje...
Definition: gmValueInfo.h:229
GmStorageType
The desired storage type for the data.
Definition: gmValueInfo.h:53
Interface class for accessing and setting values from an "indexable" collection of values.
Definition: gmValueAccessor.h:59
QString description() const
Returns the value description.
Definition: gmValueInfo.h:139
int fieldWidth() const
Returns the field width used when printing values of this type.
Definition: gmValueInfo.h:235
void setAllocMode(GmAllocMode mode)
Updates the mode used for allocating space for the data values.
Definition: gmValueInfo.h:279
This value set stores attributes attached to cells.
Definition: gmValueInfo.h:41
int ncol() const
Returns the number of columns in a matrix type or 1 for scalars or arrays.
Definition: gmValueInfo.h:174
void setConstantMap(const QMap< QString, double > &map)
Defines the map used to translate constant names into scalar values.
Definition: gmValueInfo.h:343
The data is NOT sparse but should be allocated only when the first non default value is written.
Definition: gmValueInfo.h:78
This value set stores attributes attached to Gauss points.
Definition: gmValueInfo.h:42
GmStorageType _storageType
The desired type used to store values. Might not be equal to the type really used by a value set.
Definition: gmValueInfo.h:364
int _fieldWidth
Field width used when printing values of this type.
Definition: gmValueInfo.h:378
void setCanStoreFunctions(bool mode)
Updates weather the values associated to this definition can or cannot be functions.
Definition: gmValueInfo.h:270
Specifies that this value exists over common geometry mesh nodes only.
Definition: gmValueInfo.h:93
int _history
Does this value requires/ accepts history? -1 = no, 0 = multiple, n > 0 = 'n' rolling states.
Definition: gmValueInfo.h:375
Unit _unit
Unit in which the values are given.
Definition: gmValueInfo.h:362
The data is NOT sparse and space should be fully preallocated.
Definition: gmValueInfo.h:76
QString kindStr() const
Returns a string representation of the data kind.
Definition: gmValueInfo.h:148
QString _defFunction
A default function name if the default is a function.
Definition: gmValueInfo.h:371
GmAffectedNodes affectedNodes() const
For node based values, returns whether values are stored for nodes, ghost nodes or both (default = no...
Definition: gmValueInfo.h:210
This value set stores properties attached to a property set.
Definition: gmValueInfo.h:43
double * _defValue
Default value used for initializing/sparse values. Valid only if _defFunction is empty (0....
Definition: gmValueInfo.h:370
QMap< QString, double > _constantMap
A map associating constant names to values. Used for creating enumerated scalar values.
Definition: gmValueInfo.h:382
Sparse data is stored as run lenght encoded blocks.
Definition: gmValueInfo.h:87
This value set stores attributes attached to discontinuity sets.
Definition: gmValueInfo.h:46
bool isScalar() const
Checks the dimType to see if the value is a scalar value. This cannot be infered by size() == 1 since...
Definition: gmValueInfo.h:180
int * _tags
The set of tags. Vector size is ALWAYS equal to the associated value info object dimension....
Definition: gmValueInfo.h:114
Values are a unsigned 16 bits integer.
Definition: gmValueInfo.h:61
QString storageTypeStr() const
Returns a string representation of the desired storage type.
Definition: gmValueInfo.h:157
void print(const GmMatrix &m, const GmLogCategory &logger, GmLogLevel level, int fieldWidth, char format, int precision)
Prints the matrix using the specified logger, level and precision fields.
Definition: gmMatrixUtils.cpp:34
Values are a signed 8 bits integer.
Definition: gmValueInfo.h:59
Values are a unsigned 32 bits integer.
Definition: gmValueInfo.h:60
Values are a single precision float.
Definition: gmValueInfo.h:56
GmAffectedNodes _affectedNodes
Is this value stored for ghost nodes? Valid only if kind == GM_NODE_COORDINATES, GM_NODE_ATTRIBUTE or...
Definition: gmValueInfo.h:368
int ruleSet() const
Returns the integration rule set that this value is bound to. Used only by values with kind == GM_GAU...
Definition: gmValueInfo.h:223
QString allocModeStr() const
Returns a string representation of the alloc mode.
Definition: gmValueInfo.h:201
void setTagInfo(GmBcTagInfo *info)
Defines the boundary condition tag info that this value is associated with. Takes ownership of the in...
Definition: gmValueInfo.h:329
#define GMC_API_EXPORT
Macro for controling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_LI...
Definition: gmCoreConfig.h:35
GmBcTagInfo * _tagInfo
The tag information associated with this value. Can be NULL. Valid only if kind == GM_BC_NODE_PROPERT...
Definition: gmValueInfo.h:377
const double * defValue() const
Returns the default value used for initializing/sparse values. If the default is a function,...
Definition: gmValueInfo.h:183
bool defIsFunction() const
Is the default value a function?
Definition: gmValueInfo.h:189
int size() const
Returns the number of values (doubles) associated to this definition.
Definition: gmValueInfo.h:168
GmLogLevel
Available log levels list.
Definition: gmLog.h:36
This value set stores properties attached to a node for a boundary condition.
Definition: gmValueInfo.h:44
QString _description
Value description.
Definition: gmValueInfo.h:361
Class representing a category with multiple logging levels.
Definition: gmLog.h:58
Means that the value is a 2D matrix of numbers.
Definition: gmValueInfo.h:70
GmDimType dimType() const
Returns the dimension type associated to this definition (scalar, vector or matrix)
Definition: gmValueInfo.h:160
Specifies that this value exists over ghost nodes only.
Definition: gmValueInfo.h:94
Means that the value is a 1D vector of numbers.
Definition: gmValueInfo.h:69
QString allocStrategyStr() const
Returns a string representation of the alloc strategy.
Definition: gmValueInfo.h:207
void setRuleSet(int ruleSet)
Defines the integration rule set that this value is bound to. Used only by values with kind == GM_GAU...
Definition: gmValueInfo.h:323
The data is sparse.
Definition: gmValueInfo.h:77
Unit unit() const
Returns the unit in which the value is expressed.
Definition: gmValueInfo.h:142
void setFormat(int fieldWidth, char format, int precision)
Updates the format used to print values of this type.
Definition: gmValueInfo.h:332
Other kinds of value set used by the Gui / extensions.
Definition: gmValueInfo.h:47
This value set stores coordinates attached to nodes.
Definition: gmValueInfo.h:38
GmAllocStrategy _allocStrategy
Allocation strategy for the stored data.
Definition: gmValueInfo.h:367
Values are a signed 16 bits integer.
Definition: gmValueInfo.h:58
GmAllocMode allocMode() const
Returns how the values associated with this definition should be allocated. Default = auto.
Definition: gmValueInfo.h:198
void setUnit(Unit unit)
Updates the value definition unit. USe with care. Changes the way how values are interpreted,...
Definition: gmValueInfo.h:246
QString defFunction() const
Returns the name of the function used as default.
Definition: gmValueInfo.h:192
GmValueSetKind _setKind
What kind of information is stored.
Definition: gmValueInfo.h:363
void setStorageType(GmStorageType storageType)
Updates the requested storage type of values bound to this definition.
Definition: gmValueInfo.h:255
Values are a unsigned 8 bits integer.
Definition: gmValueInfo.h:62
This value set stores state variables attached to nodes.
Definition: gmValueInfo.h:40
bool canStoreFunctions() const
Returns true if values associated to this definition can be expressed as functions....
Definition: gmValueInfo.h:195
Means that the value is a scalar number.
Definition: gmValueInfo.h:68
Framework defined strategy.
Definition: gmValueInfo.h:84
void setHistory(int mode)
Defines if this value should store only one value (default) or several versions of the value,...
Definition: gmValueInfo.h:313
GmValueSetKind kind() const
Returns the kind of information associated to this definition.
Definition: gmValueInfo.h:145
int _precision
Number of decimal places used when printing values of this type.
Definition: gmValueInfo.h:380
GmAllocMode
Type describing how the data space should be allocated.
Definition: gmValueInfo.h:74
GmDimType _dimType
The dimension type of the values.
Definition: gmValueInfo.h:365
Sparse data is stored in a hash table.
Definition: gmValueInfo.h:85
int history() const
Returns -1 if the value does not have history support, 0 for unlimited history levels and n > 0 for a...
Definition: gmValueInfo.h:218
Declaration of support functions and macros for information logging.