13 #if !defined(KRATOS_GAUSS_POINT_ITEM )
14 #define KRATOS_GAUSS_POINT_ITEM
93 ConstitutiveLaw::Pointer pConstitutiveLaw,
96 mpConstitutiveLaw(
std::move(pConstitutiveLaw)),
142 mpConstitutiveLaw = pConstitutiveLaw;
152 return mpConstitutiveLaw;
183 auto double_set = mMapDoubleVariables.find(variable_key);
184 if(double_set != mMapDoubleVariables.end()) {
198 const IndexType variable_key = rVariable.Key();
199 auto array_set = mMapArrayVariables.find(variable_key);
200 if(array_set != mMapArrayVariables.end()) {
215 auto vector_set = mMapVectorVariables.find(variable_key);
216 if(vector_set != mMapVectorVariables.end()) {
231 auto matrix_set = mMapMatrixVariables.find(variable_key);
232 if(matrix_set != mMapMatrixVariables.end()) {
250 auto double_set = mMapDoubleVariables.find(variable_key);
251 if(double_set != mMapDoubleVariables.end()) {
252 mMapDoubleVariables[variable_key] = rValue;
255 mMapDoubleVariables.insert({variable_key, rValue});
268 const IndexType variable_key = rVariable.Key();
269 auto array_set = mMapArrayVariables.find(variable_key);
270 if(array_set != mMapArrayVariables.end()) {
271 mMapArrayVariables[variable_key] = rValue;
274 mMapArrayVariables.insert({variable_key, rValue});
288 auto vector_set = mMapVectorVariables.find(variable_key);
289 if(vector_set != mMapVectorVariables.end()) {
290 mMapVectorVariables[variable_key] = rValue;
293 mMapVectorVariables.insert({variable_key, rValue});
307 auto matrix_set = mMapMatrixVariables.find(variable_key);
308 if(matrix_set != mMapMatrixVariables.end()) {
309 mMapMatrixVariables[variable_key] = rValue;
312 mMapMatrixVariables.insert({variable_key, rValue});
326 rValue = mMapDoubleVariables[rVariable.
Key()];
341 rValue = mMapArrayVariables[rVariable.Key()];
356 rValue = mMapVectorVariables[rVariable.
Key()];
371 rValue = mMapMatrixVariables[rVariable.
Key()];
381 auto double_set = mMapDoubleVariables.find(VariableKey);
382 if(double_set != mMapDoubleVariables.end()) {
383 mMapDoubleVariables.erase(double_set);
386 auto array_set = mMapArrayVariables.find(VariableKey);
387 if(array_set != mMapArrayVariables.end()) {
388 mMapArrayVariables.erase(array_set);
391 auto vector_set = mMapVectorVariables.find(VariableKey);
392 if(vector_set != mMapVectorVariables.end()) {
393 mMapVectorVariables.erase(vector_set);
396 auto matrix_set = mMapMatrixVariables.find(VariableKey);
397 if(matrix_set != mMapMatrixVariables.end()) {
398 mMapMatrixVariables.erase(matrix_set);
439 ConstitutiveLaw::Pointer mpConstitutiveLaw;
443 std::unordered_map<IndexType,double> mMapDoubleVariables;
444 std::unordered_map<IndexType,array_1d<double, 3>> mMapArrayVariables;
445 std::unordered_map<IndexType,Vector> mMapVectorVariables;
446 std::unordered_map<IndexType,Matrix> mMapMatrixVariables;
Custom Gauss Point container to be used by the search.
Definition: gauss_point_item.h:53
void SetWeight(const double Weight)
Sets the integration weigth associated to the point.
Definition: gauss_point_item.h:170
double GetWeight() const
Returns the integration weigth associated to the point.
Definition: gauss_point_item.h:160
array_1d< double, 3 > GetValue(const Variable< array_1d< double, 3 >> &rVariable, array_1d< double, 3 > &rValue)
It return a value from the map (array_1d<double, 3>)
Definition: gauss_point_item.h:336
void SetValue(const Variable< Vector > &rVariable, const Vector &rValue)
It adds a new value to the map (Vector)
Definition: gauss_point_item.h:282
Point GetPoint()
Returns the point.
Definition: gauss_point_item.h:119
~GaussPointItem() override=default
Destructor.
double GetValue(const Variable< double > &rVariable, double &rValue)
It return a value from the map (double)
Definition: gauss_point_item.h:321
ConstitutiveLaw::Pointer GetConstitutiveLaw()
Returns the Constitutive Law associated to the point.
Definition: gauss_point_item.h:150
GaussPointItem(const GaussPointItem &GP)=default
Copy constructor (not really required)
Vector GetValue(const Variable< Vector > &rVariable, Vector &rValue)
It return a value from the map (Vector)
Definition: gauss_point_item.h:351
bool Has(const Variable< array_1d< double, 3 >> &rVariable)
It checks if an ID exists in the map.
Definition: gauss_point_item.h:196
void SetValue(const Variable< Matrix > &rVariable, const Matrix &rValue)
It adds a new value to the map (Matrix)
Definition: gauss_point_item.h:301
void RemoveId(const IndexType VariableKey)
It removes one particular pair from the map.
Definition: gauss_point_item.h:379
KRATOS_CLASS_POINTER_DEFINITION(GaussPointItem)
Counted pointer of GaussPointItem.
Matrix GetValue(const Variable< Matrix > &rVariable, Matrix &rValue)
It return a value from the map (Matrix)
Definition: gauss_point_item.h:366
GaussPointItem(const array_1d< double, 3 > &Coordinates)
Constructor with coordinates.
Definition: gauss_point_item.h:82
void SetValue(const Variable< double > &rVariable, const double rValue)
It adds a new value to the map (double)
Definition: gauss_point_item.h:244
void SetValue(const Variable< array_1d< double, 3 >> &rVariable, const array_1d< double, 3 > &rValue)
It adds a new value to the map (array_1d<double, 3>)
Definition: gauss_point_item.h:263
bool Has(const Variable< Matrix > &rVariable)
It checks if an ID exists in the map.
Definition: gauss_point_item.h:228
void SetConstitutiveLaw(ConstitutiveLaw::Pointer pConstitutiveLaw)
Sets the Constitutive Law associated to the point.
Definition: gauss_point_item.h:140
GaussPointItem(const array_1d< double, 3 > &Coordinates, ConstitutiveLaw::Pointer pConstitutiveLaw, const double Weight)
Complete constructor.
Definition: gauss_point_item.h:91
void SetPoint(const Point &Point)
Set the point.
Definition: gauss_point_item.h:130
bool Has(const Variable< Vector > &rVariable)
It checks if an ID exists in the map.
Definition: gauss_point_item.h:212
GaussPointItem()
Default constructor.
Definition: gauss_point_item.h:73
bool Has(const Variable< double > &rVariable)
It checks if an ID exists in the map.
Definition: gauss_point_item.h:180
std::size_t IndexType
The type used to idenify index and key.
Definition: gauss_point_item.h:60
Point class.
Definition: point.h:59
CoordinatesArrayType const & Coordinates() const
Definition: point.h:215
std::size_t IndexType
Definition: point.h:79
Point()
Default constructor.
Definition: point.h:86
KeyType Key() const
Definition: variable_data.h:187
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
namespace
Definition: array_1d.h:793