10 #if !defined(KRATOS_CONSTITUTIVE_MODEL_DATA_H_INCLUDED )
11 #define KRATOS_CONSTITUTIVE_MODEL_DATA_H_INCLUDED
86 StressMeasure_Kirchhoff,
151 enum class VarType { INTEGER, DOUBLE, VECTOR, MATRIX, ARRAY3, ARRAY6, NONE };
166 mType = VarType::NONE;
167 mpIntVariable =
nullptr;
168 mpDoubleVariable =
nullptr;
169 mpVectorVariable =
nullptr;
170 mpMatrixVariable =
nullptr;
171 mpArray3Variable =
nullptr;
172 mpArray6Variable =
nullptr;
180 case VarType::INTEGER:
181 delete mpIntVariable;
183 case VarType::DOUBLE:
184 delete mpDoubleVariable;
186 case VarType::VECTOR:
187 delete mpVectorVariable;
189 case VarType::MATRIX:
190 delete mpMatrixVariable;
192 case VarType::ARRAY3:
193 delete mpArray3Variable;
195 case VarType::ARRAY6:
196 delete mpArray6Variable;
209 mType = VarType::INTEGER;
211 mpIntVariable =
new VariableValueType(rVariable,rValue);
216 mType = VarType::DOUBLE;
218 mpDoubleVariable =
new VariableValueType(rVariable,rValue);
223 mType = VarType::VECTOR;
225 mpVectorVariable =
new VariableValueType(rVariable,rValue);
230 mType = VarType::MATRIX;
232 mpMatrixVariable =
new VariableValueType(rVariable,rValue);
237 mType = VarType::ARRAY3;
239 mpArray3Variable =
new VariableValueType(rVariable,rValue);
244 mType = VarType::ARRAY6;
246 mpArray6Variable =
new VariableValueType(rVariable,rValue);
253 if( std::is_same<T,int>::value ){
254 if(mpIntVariable !=
nullptr){
255 rVariableValue = &mpIntVariable;
263 else if( std::is_same<T,double>::value ){
264 if(mpDoubleVariable !=
nullptr){
265 rVariableValue = &mpDoubleVariable;
272 else if( std::is_same<T,Vector>::value ){
273 if(mpVectorVariable !=
nullptr){
274 rVariableValue = &mpVectorVariable;
281 else if( std::is_same<T,Matrix>::value ){
282 if(mpMatrixVariable !=
nullptr){
283 rVariableValue = &mpMatrixVariable;
291 if(mpArray3Variable !=
nullptr){
292 rVariableValue = &mpArray3Variable;
300 if(mpArray6Variable !=
nullptr){
301 rVariableValue = &mpArray6Variable;
315 if(mpIntVariable !=
nullptr)
322 if(mpDoubleVariable !=
nullptr)
329 if(mpVectorVariable !=
nullptr)
336 if(mpMatrixVariable !=
nullptr)
344 if(mpArray3Variable !=
nullptr)
351 if(mpArray6Variable !=
nullptr)
386 const Flags* mpOptions;
395 PropertiesLayout::Pointer mpPropertiesLayout;
410 void SetPropertiesLayout (PropertiesLayout::Pointer pPropertiesLayout) {mpPropertiesLayout = pPropertiesLayout;};
489 ConstitutiveModelData::Pointer
Clone()
const
491 return Kratos::make_shared<ConstitutiveModelData>(*
this);
541 if( rProperties.HasTable(TEMPERATURE,YOUNG_MODULUS) ){
542 const Table<double>& YoungModulusTable = rProperties.GetTable(TEMPERATURE,YOUNG_MODULUS);
549 if( rProperties.HasTable(TEMPERATURE,POISSON_RATIO) ){
550 const Table<double>& PoissonCoefficientTable = rProperties.GetTable(TEMPERATURE,POISSON_RATIO);
565 if( rProperties.Has(MATERIAL_PARAMETERS) ){
566 Vector ModelParameters = rProperties[MATERIAL_PARAMETERS];
567 for(
unsigned int i=0;
i<ModelParameters.size();
i++)
574 if( rProperties.Has(C10) ){
581 if( rProperties.Has(C20) )
584 if( rProperties.Has(C30) )
589 if( rProperties.Has(BULK_MODULUS) ){
620 virtual std::string
Info()
const
622 std::stringstream buffer;
623 buffer <<
"ConstitutiveModelData";
630 rOStream <<
"ConstitutiveModelData";
636 rOStream <<
"ConstitutiveModelData Data";
745 rOStream <<
" : " << std::endl;
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Short class definition.
Definition: constitutive_model_data.hpp:54
KRATOS_DEFINE_LOCAL_FLAG(STRESS_COMPUTED)
StressMeasureType
Definition: constitutive_model_data.hpp:83
ConstitutiveModelData()
Default constructor.
Definition: constitutive_model_data.hpp:483
KRATOS_DEFINE_LOCAL_FLAG(STRAIN_COMPUTED)
KRATOS_DEFINE_LOCAL_FLAG(UPDATE_INTERNAL_VARIABLES)
virtual ~ConstitutiveModelData()
Destructor.
Definition: constitutive_model_data.hpp:495
KRATOS_DEFINE_LOCAL_FLAG(RETURN_MAPPING_COMPUTED)
virtual std::string Info() const
Turn back information as a string.
Definition: constitutive_model_data.hpp:620
static void CalculateMaterialParameters(ModelData &rValues)
Definition: constitutive_model_data.hpp:512
std::size_t SizeType
Definition: constitutive_model_data.hpp:60
KRATOS_DEFINE_LOCAL_FLAG(PLASTIC_REGION)
KRATOS_DEFINE_LOCAL_FLAG(IMPLEX_ACTIVE)
KRATOS_DEFINE_LOCAL_FLAG(PLASTIC_RATE_REGION)
StrainMeasureType
Definition: constitutive_model_data.hpp:75
ConstitutiveModelData::Pointer Clone() const
Clone.
Definition: constitutive_model_data.hpp:489
KRATOS_DEFINE_LOCAL_FLAG(CONSTITUTIVE_MATRIX_COMPUTED)
ConstitutiveModelData(ConstitutiveModelData const &rOther)
Copy constructor.
Definition: constitutive_model_data.hpp:486
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: constitutive_model_data.hpp:628
const unsigned int(*)[2] VoigtIndexType
Definition: constitutive_model_data.hpp:59
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: constitutive_model_data.hpp:634
KRATOS_CLASS_POINTER_DEFINITION(ConstitutiveModelData)
Pointer definition of ConstitutiveModelData.
Definition: amatrix_interface.h:41
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
PropertiesLayout.
Definition: properties_layout.hpp:51
void GetValue(const TVariableType &rVariable, typename TVariableType::Type &rValue) const
Definition: properties_layout.hpp:139
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
REACTION_CHECK_STIFFNESS_FACTOR int
Definition: contact_structural_mechanics_application_variables.h:75
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
integer i
Definition: TensorModule.f:17
Definition: constitutive_model_data.hpp:362
double TotalDeformationDet
Definition: constitutive_model_data.hpp:370
StrainMeasureType StrainMeasure
Definition: constitutive_model_data.hpp:374
double Pressure
Definition: constitutive_model_data.hpp:366
double Temperature
Definition: constitutive_model_data.hpp:367
MatrixType TotalDeformationMatrix
Definition: constitutive_model_data.hpp:378
double DeltaDeformationDet
Definition: constitutive_model_data.hpp:369
double CharacteristicSize
Definition: constitutive_model_data.hpp:368
StressMeasureType StressMeasure
Definition: constitutive_model_data.hpp:373
MatrixType DeltaDeformationMatrix
Definition: constitutive_model_data.hpp:377
Definition: constitutive_model_data.hpp:92
const double & GetLameMu() const
Definition: constitutive_model_data.hpp:111
double LameMuBar
Definition: constitutive_model_data.hpp:99
std::vector< double > ModelParameters
Definition: constitutive_model_data.hpp:104
double LameLambda
Definition: constitutive_model_data.hpp:100
double YoungModulus
Definition: constitutive_model_data.hpp:97
const double & GetYoungModulus() const
Definition: constitutive_model_data.hpp:110
double LameMu
Definition: constitutive_model_data.hpp:98
const double & GetLameMuBar() const
Definition: constitutive_model_data.hpp:112
double BulkModulus
Definition: constitutive_model_data.hpp:101
const double & GetBulkModulus() const
Definition: constitutive_model_data.hpp:114
const double & GetLameLambda() const
Definition: constitutive_model_data.hpp:113
double PoissonCoefficient
Definition: constitutive_model_data.hpp:96
const std::vector< double > & GetModelParameters() const
Definition: constitutive_model_data.hpp:116
const double & GetPoissonCoefficient() const
Definition: constitutive_model_data.hpp:109
Definition: constitutive_model_data.hpp:383
void SetVoigtIndexTensor(VoigtIndexType rIndexVoigtTensor)
Definition: constitutive_model_data.hpp:414
const StrainMeasureType & GetStrainMeasure() const
Definition: constitutive_model_data.hpp:453
const ConstitutiveLawData & GetConstitutiveLawData() const
Definition: constitutive_model_data.hpp:458
void SetPropertiesLayout(PropertiesLayout::Pointer pPropertiesLayout)
Definition: constitutive_model_data.hpp:410
const PropertiesLayout & GetPropertiesLayout() const
Definition: constitutive_model_data.hpp:433
void SetDoubleVariableData(const Variable< double > &rVariable, double &rValue)
Definition: constitutive_model_data.hpp:417
void SetArray3VariableData(const Variable< array_1d< double, 3 > > &rVariable, array_1d< double, 3 > &rValue)
Definition: constitutive_model_data.hpp:420
const double & GetTemperature() const
Definition: constitutive_model_data.hpp:447
const double & GetPressure() const
Definition: constitutive_model_data.hpp:446
void SetVectorVariableData(const Variable< Vector > &rVariable, Vector &rValue)
Definition: constitutive_model_data.hpp:418
ConstitutiveLawData & rConstitutiveLawData()
Definition: constitutive_model_data.hpp:440
const MatrixType & GetDeltaDeformationMatrix() const
Definition: constitutive_model_data.hpp:455
void SetStrainMeasure(StrainMeasureType Measure)
Definition: constitutive_model_data.hpp:424
const Properties & GetProperties() const
Definition: constitutive_model_data.hpp:431
void SetStressMeasure(StressMeasureType Measure)
Definition: constitutive_model_data.hpp:423
void SetProcessInfo(const ProcessInfo &rProcessInfo)
Definition: constitutive_model_data.hpp:412
void SetIntVariableData(const Variable< int > &rVariable, int &rValue)
Definition: constitutive_model_data.hpp:416
const ProcessInfo & GetProcessInfo() const
Definition: constitutive_model_data.hpp:435
VariableValueData InternalVariable
Definition: constitutive_model_data.hpp:405
const MaterialData & GetMaterialParameters() const
Definition: constitutive_model_data.hpp:462
void SetArray6VariableData(const Variable< array_1d< double, 6 > > &rVariable, array_1d< double, 6 > &rValue)
Definition: constitutive_model_data.hpp:421
const double & GetCharacteristicSize() const
Definition: constitutive_model_data.hpp:450
MaterialData & rMaterialParameters()
Definition: constitutive_model_data.hpp:443
const StressMeasureType & GetStressMeasure() const
Definition: constitutive_model_data.hpp:452
const MatrixType & GetStrainMatrix() const
Definition: constitutive_model_data.hpp:460
void SetOptions(const Flags &rOptions)
Definition: constitutive_model_data.hpp:408
void SetProperties(const Properties &rProperties)
Definition: constitutive_model_data.hpp:409
bool HasPropertiesLayout() const
Definition: constitutive_model_data.hpp:427
const double & GetDeltaDeformationDet() const
Definition: constitutive_model_data.hpp:448
const Flags & GetOptions() const
Definition: constitutive_model_data.hpp:430
const SizeType & GetVoigtSize() const
Definition: constitutive_model_data.hpp:436
const double & GetTotalDeformationDet() const
Definition: constitutive_model_data.hpp:449
const MatrixType & GetTotalDeformationMatrix() const
Definition: constitutive_model_data.hpp:456
MatrixType StressMatrix
Definition: constitutive_model_data.hpp:401
MatrixType & rStressMatrix()
Definition: constitutive_model_data.hpp:442
const VoigtIndexType & GetVoigtIndexTensor() const
Definition: constitutive_model_data.hpp:437
MatrixType & rStrainMatrix()
Definition: constitutive_model_data.hpp:441
void SetMatrixVariableData(const Variable< Matrix > &rVariable, Matrix &rValue)
Definition: constitutive_model_data.hpp:419
void SetVoigtSize(const SizeType &rVoigtSize)
Definition: constitutive_model_data.hpp:413
Flags State
Definition: constitutive_model_data.hpp:399
MaterialData MaterialParameters
Definition: constitutive_model_data.hpp:403
MatrixType StrainMatrix
Definition: constitutive_model_data.hpp:402
const MatrixType & GetStressMatrix() const
Definition: constitutive_model_data.hpp:461
Definition: constitutive_model_data.hpp:148
void SetValue(const Variable< array_1d< double, 3 > > &rVariable, array_1d< double, 3 > &rValue)
Definition: constitutive_model_data.hpp:342
bool GetVariableValue(VariableValue< T > &rVariableValue)
Definition: constitutive_model_data.hpp:251
~VariableValueData()
Definition: constitutive_model_data.hpp:176
void SetMatrixVariableValue(const Variable< Matrix > &rVariable, Matrix &rValue)
Definition: constitutive_model_data.hpp:228
void SetValue(const Variable< int > &rVariable, int &rValue)
Definition: constitutive_model_data.hpp:313
void SetArray6VariableValue(const Variable< array_1d< double, 6 > > &rVariable, array_1d< double, 6 > &rValue)
Definition: constitutive_model_data.hpp:242
void SetValue(const Variable< Vector > &rVariable, Vector &rValue)
Definition: constitutive_model_data.hpp:327
void SetVectorVariableValue(const Variable< Vector > &rVariable, Vector &rValue)
Definition: constitutive_model_data.hpp:221
VariableValueData()
Definition: constitutive_model_data.hpp:164
void SetArray3VariableValue(const Variable< array_1d< double, 3 > > &rVariable, array_1d< double, 3 > &rValue)
Definition: constitutive_model_data.hpp:235
void SetValue(const Variable< Matrix > &rVariable, Matrix &rValue)
Definition: constitutive_model_data.hpp:334
void SetIntVariableValue(const Variable< int > &rVariable, int &rValue)
Definition: constitutive_model_data.hpp:207
void SetValue(const Variable< array_1d< double, 6 > > &rVariable, array_1d< double, 6 > &rValue)
Definition: constitutive_model_data.hpp:349
void SetValue(const Variable< double > &rVariable, double &rValue)
Definition: constitutive_model_data.hpp:320
void SetDoubleVariableValue(const Variable< double > &rVariable, double &rValue)
Definition: constitutive_model_data.hpp:214
Definition: constitutive_model_data.hpp:123
void SetVariable(const Variable< T > &rVariable)
Definition: constitutive_model_data.hpp:137
void SetValue(T &rValue)
Definition: constitutive_model_data.hpp:142
void SetVariableValue(const Variable< T > &rVariable, T &rValue)
Definition: constitutive_model_data.hpp:136
VariableValue()
Definition: constitutive_model_data.hpp:132
VariableValue(const Variable< T > &rVariable, T &rValue)
Definition: constitutive_model_data.hpp:133
bool HasVariable(const Variable< T > &rVariable) const
Definition: constitutive_model_data.hpp:140