24 #ifndef _GEMA_PLUGIN_FEM_VECTOR_SET_H_ 25 #define _GEMA_PLUGIN_FEM_VECTOR_SET_H_ 67 bool initTypes (GmpFemVectorMode mode,
int numVectors, ...);
68 bool adjustSizes(
int globalNumDofs,
int globalNumFixedDofs,
int maxElemDofs);
73 void clearGlobalVectors();
83 assert((_mode == VECTOR_MATCH_MODE &&
index(type) >= 0) || (_mode != VECTOR_MATCH_MODE && type ==
GmpFemVector_Eq));
84 return _globalVectors[tindex(type)]._data;
90 assert(_mode == VECTOR_MATCH_MODE && index >= 0 && index < _nVectors);
91 return _globalVectors[
index]._data;
104 assert((_mode == VECTOR_MATCH_MODE &&
index(type) >= 0) || (_mode != VECTOR_MATCH_MODE && type ==
GmpFemVector_Eq));
105 return *(_globalVectors[tindex(type)]._transposed);
114 assert(_mode == VECTOR_MATCH_MODE && index >= 0 && index < _nVectors);
115 return *(_globalVectors[
index]._transposed);
127 assert((_mode == VECTOR_MATCH_MODE &&
index(type) >= 0) || (_mode != VECTOR_MATCH_MODE && type ==
GmpFemVector_Eq));
128 return _globalVectors[tindex(type)]._saved;
137 assert(_mode == VECTOR_MATCH_MODE && index >= 0 && index < _nVectors);
138 return _globalVectors[
index]._saved;
148 assert(_mode != VECTOR_SINGLE_MODE &&
index(type) >= 0);
149 return (_mode == VECTOR_MATCH_MODE) ? _globalVectors[
index(type)]._data : _printVectors[
index(type)];
157 assert(_mode != VECTOR_SINGLE_MODE && index >= 0 && index < _nVectors);
158 return (_mode == VECTOR_MATCH_MODE) ? _globalVectors[
index]._data : _printVectors[
index];
194 if(_transposed != &_data)
195 _transposed->zeros();
GmpFemVectorTypes
Predefined names for vectors used in finite element solvers together with control procedures.
Definition: gmpFemVectorSet.h:32
GmVector _saved
The saved fixed dofs vector. Can be empty.
Definition: gmpFemVectorSet.h:180
GmpFemVectorMode
Control mode specifying if the vector set should have one global vector per local vector (MATCH_MODE)...
Definition: gmpFemVectorSet.h:58
GmpFemVectorTypeData()
Constructor.
Definition: gmpFemVectorSet.h:184
GmVector & globalTransposedDofVector(GmpFemVectorTypes type) const
Returns the registered vector, identified by its type in the set, for storing transposed values when ...
Definition: gmpFemVectorSet.h:102
int typeFromIndex(int index) const
GmVector & globalSavedDofVector(GmpFemVectorTypes type) const
Returns the registered vector, identified by its type in the set, for storing saved values for fixed ...
Definition: gmpFemVectorSet.h:125
Set stores a single "equivalent" global vector.
Definition: gmpFemVectorSet.h:61
The internal force vector Fi in the general equation Fi(u, u', u'') = Fe(t) (u' = du/dt)
Definition: gmpFemVectorSet.h:36
GmVector & globalTransposedDofVectorFromIndex(int index) const
Returns the registered vector, identified by its index in the set, for storing transposed values when...
Definition: gmpFemVectorSet.h:112
GmpFemVectorMode mode() const
Returns the mode defining the global vectors stored by the set.
Definition: gmpFemVectorSet.h:162
A convenience class that builds a GmVectorSet with the types given by GmpFemVectorTypes and also asso...
Definition: gmpFemVectorSet.h:47
GmVector & globalVectorFromIndex(int index) const
Returns a global Vector identified by its index in the set. Can NOT be used for "single" or "single d...
Definition: gmpFemVectorSet.h:88
int index(int type) const
GmVector & globalVector(GmpFemVectorTypes type) const
Returns a global Vector identified by its type in the set.
Definition: gmpFemVectorSet.h:81
bool _hasSaved
Flag used to distinguish if an empty _saved vector is due to no saved vector or to a 0 fixed dof sett...
Definition: gmpFemVectorSet.h:181
GmpFemVectorTypeData * _globalVectors
Vector storing data for global vectors. Will store one data set per included type in the vector set w...
Definition: gmpFemVectorSet.h:203
Set stores one global vector per local vector.
Definition: gmpFemVectorSet.h:60
GmVector & globalDebugPrintVectorFromIndex(int index) const
Returns the auxiliar vector used for storing global vectors matching local ones for debug printing pu...
Definition: gmpFemVectorSet.h:155
void zeros()
Clears all vectors, filling them with zeros.
Definition: gmpFemVectorSet.h:190
GmVector _data
The data vector.
Definition: gmpFemVectorSet.h:178
GmVector * _printVectors
Vector with debug global vectors associated to element local vectors when _mode equals VECTOR_SINGLE_...
Definition: gmpFemVectorSet.h:208
~GmpFemVectorTypeData()
Destructor.
Definition: gmpFemVectorSet.h:187
int tindex(GmpFemVectorTypes type) const
Returns the index in _globalVectors for the given type, accounting for the selected vector mode.
Definition: gmpFemVectorSet.h:171
GmVector & globalSavedDofVectorFromIndex(int index) const
Returns the registered vector, identified by its index in the set, for storing saved values for fixed...
Definition: gmpFemVectorSet.h:135
Set stores an "equivalent" global vector + another vector per local vector for debug purposes.
Definition: gmpFemVectorSet.h:62
bool initTypes(int numVectors, va_list typeList)
GmVector & globalDebugPrintVector(GmpFemVectorTypes type) const
Returns the auxiliar vector used for storing global vectors matching local ones for debug printing pu...
Definition: gmpFemVectorSet.h:146
GmpFemVectorMode _mode
The mode defining how many global vectors are stored.
Definition: gmpFemVectorSet.h:173
GmpFemVectorTypes femTypeFromIndex(int index) const
Given a vector index, returns its type as a GmpFemVectorTypes. Equivalent to GmVectorSet::typeFromInd...
Definition: gmpFemVectorSet.h:165
The external force vector Fe in the general equation Fi(u, u', u'') = Fe(t) (u' = du/dt)
Definition: gmpFemVectorSet.h:35
Declaration of usefull configuration definitions for the plugin library.
The equivalent force vector when merging values into a single global vector.
Definition: gmpFemVectorSet.h:34
Aux structure storing the vectors associated with a vector type.
Definition: gmpFemVectorSet.h:176
GmVector * _transposed
The transposed vector. Either points to _data or to a new vector.
Definition: gmpFemVectorSet.h:179
bool adjustSizes(int maxNodes)