24 #ifndef _GEMA_BOUNDARY_CONDITION_H_ 25 #define _GEMA_BOUNDARY_CONDITION_H_ 98 int numNodes (
int bcIndex)
const;
99 int node (
int bcIndex,
int nodeIndex)
const;
100 GmCell* cell (
int bcIndex)
const;
101 int numBoundaryCells (
int bcIndex)
const;
102 GmCell* boundaryCell (
int bcIndex,
int cellIndex)
const;
103 int boundaryCellBorder(
int bcIndex,
int cellIndex)
const;
107 const GmNodeSet* nodeSet (
int bcIndex)
const;
112 void setNode (
int bcIndex,
int node);
114 void setNode (
int bcIndex,
GmNodeSet* nodeSet);
115 void setNode (
int bcIndex,
int numNodes,
int* nodes);
116 void setCell (
int bcIndex,
int cell);
117 void setBoundary(
int bcIndex,
int cell,
int border);
119 void setBoundary(
int bcIndex,
int numCells,
int* cells,
int* borders);
121 void reloadNodeBoundaryData(
int bcIndex);
123 int addLines(
int n = 1);
124 void removeLines(
int bcIndex,
int n = 1);
130 int addNodeLine(
int node) {
int index = addLines();
if(index >= 0) setNode(index, node);
return index; }
144 int addNodeLine(
GmNodeSet* nodeSet) {
int index = addLines();
if(index >= 0) setNode(index, nodeSet);
return index; }
151 int addNodeLine(
int numNodes,
int* nodes) {
int index = addLines();
if(index >= 0) setNode(index, numNodes, nodes);
return index; }
157 int addCellLine(
int cell) {
int index = addLines();
if(index >= 0) setCell(index, cell);
return index; }
164 int addBoundaryLine(
int cell,
int border) {
int index = addLines();
if(index >= 0) setBoundary(index, cell, border);
return index; }
177 int addBoundaryLine(
int numCells,
int* cells,
int* borders) {
int index = addLines();
if(index >= 0) setBoundary(index, numCells, cells, borders);
return index; }
182 size_t usedMemory()
const;
184 static QString bcTypeToStr(BcType type);
185 static int strToBcType(
QString str);
193 virtual void clearObjects();
212 size_t appPointUsedMemory()
const;
216 QString nodeListStr (
int bcIndex,
int titleSize,
bool align,
bool* cropped)
const;
217 QString cellBoundaryListStr(
int bcIndex,
int titleSize,
bool* cropped)
const;
226 int appPointIndex(
int bcIndex,
int listIndex)
const;
275 bool hasTags()
const {
return !_taggedProperties.isEmpty(); }
283 quint64 tagMask(
int bcIndex,
int listIndex)
const;
307 virtual bool fillDumpControlMapData (QVariantMap* map,
const GmLogCategory& logger);
308 virtual bool dumpControlMapDataLoaded(QVariantMap* map,
const GmLogCategory& logger);
Auxiliar class used to store the definition of a value. It can be used to store informations about st...
Definition: gmValueInfo.h:126
QString _id
The boundary condition id (name)
Definition: gmBoundaryCondition.h:232
Aux class used to store a cell boundary created from a user given list of cells/borders.
Definition: gmBoundaryCondition.cpp:190
QString id() const
Returns the boundary condition name.
Definition: gmBoundaryCondition.h:73
The boundary condition will be applied over an edge.
Definition: gmBoundaryCondition.h:63
A base class used to implement the common part between GmBoundaryCondition and GmContactBoundaryCondi...
Definition: gmBoundaryCondition.h:56
Basic class used to store sets of values, bound to a common definition, on behalf of another object (...
Definition: gmValueSet.h:53
QMap< QString, int > _userPropertiesMap
Map translating ids from properties into their position in _userPropertiesData.
Definition: gmBoundaryCondition.h:240
BcType bcType() const
Returns the type of bc, defining if the bc should be applied over nodes, edges or faces.
Definition: gmBoundaryCondition.h:85
GmMesh * _mesh
The mesh that this boundary conditions are tied to.
Definition: gmBoundaryCondition.h:235
The GmStateDump class presents a higher level of abstraction over GmMemoryDump, storing accessor data...
Definition: gmStateDump.h:52
An auxiliar class used to host the needed code for duming a boundary condition to a state dump....
Definition: gmBoundaryCondition.h:297
QVariantMap _controlMap
Variant map used for storing the dump control data for the bc object.
Definition: gmBoundaryCondition.h:314
bool _hasTaggedFunctionAccessors
Flag set to true for node BCs with tags that have a ignore clause and function based accessors.
Definition: gmBoundaryCondition.h:290
Declaration of usefull configuration definitions for the Core library.
QString type() const
Returns the boundary condition type, to be interpreted by a physics object.
Definition: gmBoundaryCondition.h:79
int _numValues
The number of boundary conditions stored in this object.
Definition: gmBoundaryCondition.h:238
This class stores a set of cell edges or cell faces that together form a piece of the boundary of a m...
Definition: gmCellBoundary.h:43
Base interface for mesh cells.
Definition: gmCell.h:81
This class stores a set of nodes belonging to a mesh. The nodes can belong to the mesh boundary but t...
Definition: gmNodeSet.h:32
char * _appPointDataPtr
A pointer to the _bc->_appPointData vector data converted to a char*.
Definition: gmBoundaryCondition.h:316
int addCellLine(int cell)
Adds a new boundary condition line to a GM_BC_CELL object, filling the cell information....
Definition: gmBoundaryCondition.h:157
QString _type
The type of this conditions, to be interpreted by a physics object.
Definition: gmBoundaryCondition.h:234
A class used to represent a set of boundary conditions of the same type, tied to the same mesh.
Definition: gmBoundaryCondition.h:262
Declaration of the GmStateDumpBaseDataItem and basic derived classes.
virtual bool addStateItemsToGroup(GmStateDump *state, int groupId)=0
Initialization method, called once, allowing the object to add its state items to the given group of ...
virtual void printExtraHeaderInfo(const GmLogCategory &logger, GmLogLevel level) const
Aux function to print(), giving a chance for derived classes to add additional header data.
Definition: gmBoundaryCondition.h:207
int addNodeLine(int node)
Adds a new boundary condition line to a GM_BC_NODE object, filling the node information....
Definition: gmBoundaryCondition.h:130
Interface class for accessing and setting values from an "indexable" collection of values.
Definition: gmValueAccessor.h:59
int addBoundaryLine(GmCellBoundary *boundary)
Adds a new boundary condition line to a GM_BC_EDGE/GM_BC_FACE object, filling the boundary informatio...
Definition: gmBoundaryCondition.h:170
virtual bool stateLoaded(GmStateDump *state)
Virtual method called just after succesfully completing a load operation on the given state....
Definition: gmStateDumpItem.h:85
Auxiliar class used to store the complete set of simulation data.
Definition: gmSimulationData.h:51
The boundary condition will be applied over a face.
Definition: gmBoundaryCondition.h:64
bool _appPointUserProperties
Set to true if user properties are tied to application points, false otherwise.
Definition: gmBoundaryCondition.h:243
GmBoundaryCondition(QString id, QString description, QString type, GmMesh *mesh, BcType bcType)
Constructor. See parameter description on the GmBoundaryConditionBase constructor documentation.
Definition: gmBoundaryCondition.h:266
The GmBoundaryConditionAccessor class is a proxy object to a value accesor implementing a more conven...
Definition: gmBoundaryConditionAccessor.h:73
int numValues() const
Returns the number of boundary conditions (lines) stored in the object.
Definition: gmBoundaryCondition.h:88
The boundary condition will be applied over a node.
Definition: gmBoundaryCondition.h:62
The boundary condition will be applied over a cell.
Definition: gmBoundaryCondition.h:65
BcType
Boundary condition type defining where a BC is applied (node, edge or face)
Definition: gmBoundaryCondition.h:60
QMap< uintptr_t, QString > _translationMap
Translation map for app point pointers (Uses uintptr_t instead of BcTaggedPtr::Data since that class ...
Definition: gmBoundaryCondition.h:315
QVector< void * > _auxObj
Temporarily stores pointers to either BcNodeSet or BcCellBoundary objects during bc data loading.
Definition: gmBoundaryCondition.h:318
QVector< GmBoundaryConditionAccessor * > _taggedAccessors
Accessors for tagged properties. Not NULL only for NODE BCs where the tag ignores default or zero val...
Definition: gmBoundaryCondition.h:289
int addBoundaryLine(int numCells, int *cells, int *borders)
Adds a new boundary condition line to a GM_BC_EDGE/GM_BC_FACE object, filling the boundary informatio...
Definition: gmBoundaryCondition.h:177
Class responsible for storing one or more user buffer objects.
Definition: gmStateDumpItem.h:465
virtual void printExtraPropertyValues(const GmLogCategory &logger, GmLogLevel level) const
Aux function to print(), giving a chance for derived classes to add property values when _appPointUse...
Definition: gmBoundaryCondition.h:210
QVector< GmValueSet * > _appPointPropertiesData
List with set of values tied to the application points. Filled only when those are different from _us...
Definition: gmBoundaryCondition.h:242
virtual QString msgPrefix() const
The contents of the %1 argument on the "%1boundary condition" string used on error messages.
Definition: gmBoundaryCondition.h:204
GmMesh * mesh() const
Returns the mesh that this boundary conditions are tied to.
Definition: gmBoundaryCondition.h:82
A wrapper class around QtNanBoxedValue providing specific constructors to store user functions / user...
Definition: gmNanBoxedValue.h:40
Aux class used to store a node set created either from a GmCellBoundary or from a user given node lis...
Definition: gmBoundaryCondition.cpp:78
QVector< GmValueSet * > _userPropertiesData
List with set of values for the user properties.
Definition: gmBoundaryCondition.h:241
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
int addBoundaryLine(int cell, int border)
Adds a new boundary condition line to a GM_BC_EDGE/GM_BC_FACE object, filling the boundary informatio...
Definition: gmBoundaryCondition.h:164
bool hasTags() const
Returns true if any of the B.c. properties has a tag.
Definition: gmBoundaryCondition.h:275
QString description() const
Returns the boundary condition description.
Definition: gmBoundaryCondition.h:76
#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
QString _description
A description of the boundary conditions.
Definition: gmBoundaryCondition.h:233
GmStateDumpBufferDataItem * _auxObjDumpItem
The dump item used to save BcNodeSet / BcCellBoundary data.
Definition: gmBoundaryCondition.h:317
GmLogLevel
Available log levels list.
Definition: gmLog.h:36
int addNodeLine(GmNodeSet *nodeSet)
Adds a new boundary condition line to a GM_BC_NODE object, filling the node information from a node s...
Definition: gmBoundaryCondition.h:144
int addNodeLine(int numNodes, int *nodes)
Adds a new boundary condition line to a GM_BC_NODE object, filling the node information from the give...
Definition: gmBoundaryCondition.h:151
Class representing a category with multiple logging levels.
Definition: gmLog.h:58
A wrapper class around QtTaggedPtr providing specific constructors to the type of Gema pointers that ...
Definition: gmBoundaryCondition.cpp:281
int addNodeLine(GmCellBoundary *boundary)
Adds a new boundary condition line to a GM_BC_NODE object, filling the node information from a bounda...
Definition: gmBoundaryCondition.h:137
bool tagNeedsPerNodeEvaluation() const
Returns true, for node BCs only, when the tag set includes properties with either ignoreDef or ignore...
Definition: gmBoundaryCondition.h:281
BcType _bcType
The type of bc. Defines if the bc should be applied over nodes, edges or faces.
Definition: gmBoundaryCondition.h:236
QVarLengthArray< BcTaggedPtr, 1 > * _appPointData
A vector with size _numValues storing the boundary condition application points.
Definition: gmBoundaryCondition.h:258
A basic interface used for creating dump items for objects that can be dumped by a composition of mul...
Definition: gmStateDumpItem.h:52
Base interface class for Mesh type plugins.
Definition: gmMesh.h:44
int numProperties() const
Returns the number of properties (columns) stored for each condition in the object.
Definition: gmBoundaryCondition.h:91
QVector< int > _taggedProperties
The index in the value set list of the set of properties with tags.
Definition: gmBoundaryCondition.h:288
GmBoundaryCondition * _bc
The boundary condition.
Definition: gmBoundaryCondition.h:313
Declaration of support functions and macros for information logging.