10 #if !defined(KRATOS_BOSSAK_METHOD_H_INCLUDED)
11 #define KRATOS_BOSSAK_METHOD_H_INCLUDED
49 template<
class TVariableType,
class TValueType>
90 BossakMethod(
const TVariableType& rVariable,
const TVariableType& rFirstDerivative,
const TVariableType& rSecondDerivative) :
DerivedType(rVariable,rFirstDerivative,rSecondDerivative) {}
93 BossakMethod(
const TVariableType& rVariable,
const TVariableType& rFirstDerivative,
const TVariableType& rSecondDerivative,
const TVariableType& rPrimaryVariable) :
DerivedType(rVariable,rFirstDerivative,rSecondDerivative,rPrimaryVariable) {}
125 if (rCurrentProcessInfo.
Has(NEWMARK_BETA))
127 beta = rCurrentProcessInfo[NEWMARK_BETA];
130 if (rCurrentProcessInfo.
Has(NEWMARK_GAMMA))
132 gamma = rCurrentProcessInfo[NEWMARK_GAMMA];
136 if (rCurrentProcessInfo.
Has(BOSSAK_ALPHA))
138 mAlpha = rCurrentProcessInfo[BOSSAK_ALPHA];
143 KRATOS_ERROR <<
"Value not admissible for AlphaBossak. Admissible values should be between 0.0 and -0.3. Current value is " <<
mAlpha << std::endl;
149 rCurrentProcessInfo[NEWMARK_BETA] = beta;
150 rCurrentProcessInfo[NEWMARK_GAMMA] =
gamma;
151 rCurrentProcessInfo[BOSSAK_ALPHA] =
mAlpha;
164 const double&
delta_time = rCurrentProcessInfo[DELTA_TIME];
168 KRATOS_ERROR <<
" ERROR: detected delta_time = 0 in the Solution Method DELTA_TIME. PLEASE : check if the time step is created correctly for the current model part " << std::endl;
172 if (rCurrentProcessInfo.
Has(NEWMARK_BETA))
174 beta = rCurrentProcessInfo[NEWMARK_BETA];
177 if (rCurrentProcessInfo.
Has(NEWMARK_GAMMA))
179 gamma = rCurrentProcessInfo[NEWMARK_GAMMA];
183 if (rCurrentProcessInfo.
Has(BOSSAK_ALPHA))
185 mAlpha = rCurrentProcessInfo[BOSSAK_ALPHA];
190 KRATOS_ERROR <<
"Value not admissible for AlphaBossak. Admissible values should be between 0.0 and -0.3. Current value is " <<
mAlpha << std::endl;
203 rCurrentProcessInfo[NEWMARK_BETA] = this->
mNewmark.
beta;
205 rCurrentProcessInfo[BOSSAK_ALPHA] = this->
mAlpha;
236 std::string
Info()
const override
238 std::stringstream buffer;
239 buffer <<
"BossakMethod";
246 rOStream <<
"BossakMethod";
252 rOStream <<
"BossakMethod Data";
322 void save(
Serializer& rSerializer)
const override
356 template<
class TVariableType,
class TValueType>
362 template<
class TVariableType,
class TValueType>
365 return rOStream << rThis.
Info();
Short class definition.
Definition: bossak_method.hpp:51
NewmarkMethod< TVariableType, TValueType > DerivedType
DerivedType.
Definition: bossak_method.hpp:73
double & GetSecondDerivativeKineticParameter(double &rParameter) override
Definition: bossak_method.hpp:210
BossakMethod()
Default Constructor.
Definition: bossak_method.hpp:84
void SetParameters(const ProcessInfo &rCurrentProcessInfo) override
Definition: bossak_method.hpp:160
void CalculateParameters(ProcessInfo &rCurrentProcessInfo) override
Definition: bossak_method.hpp:120
BossakMethod(const TVariableType &rVariable, const TVariableType &rFirstDerivative, const TVariableType &rSecondDerivative, const TVariableType &rPrimaryVariable)
Constructor.
Definition: bossak_method.hpp:93
BaseType::Pointer BasePointerType
BasePointerType.
Definition: bossak_method.hpp:64
BaseType::VariablePointer VariablePointer
KratosVariable or KratosVariableComponent.
Definition: bossak_method.hpp:70
BaseType::NodeType NodeType
NodeType.
Definition: bossak_method.hpp:67
BossakMethod(const TVariableType &rVariable, const TVariableType &rFirstDerivative, const TVariableType &rSecondDerivative)
Constructor.
Definition: bossak_method.hpp:90
double mAlpha
Definition: bossak_method.hpp:272
BasePointerType Clone() override
Clone.
Definition: bossak_method.hpp:103
~BossakMethod() override
Destructor.
Definition: bossak_method.hpp:109
BossakMethod(BossakMethod &rOther)
Copy Constructor.
Definition: bossak_method.hpp:96
std::string Info() const override
Turn back information as a string.
Definition: bossak_method.hpp:236
void SetProcessInfoParameters(ProcessInfo &rCurrentProcessInfo) override
Definition: bossak_method.hpp:199
KRATOS_CLASS_POINTER_DEFINITION(BossakMethod)
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: bossak_method.hpp:244
double & GetSecondDerivativeInertialParameter(double &rParameter) override
Definition: bossak_method.hpp:216
BossakMethod(const TVariableType &rVariable)
Constructor.
Definition: bossak_method.hpp:87
TimeIntegrationMethod< TVariableType, TValueType > BaseType
BaseType.
Definition: bossak_method.hpp:61
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: bossak_method.hpp:250
bool Has(const Variable< TDataType > &rThisVariable) const
Checks if the data container has a value associated with a given variable.
Definition: data_value_container.h:382
Short class definition.
Definition: newmark_method.hpp:51
NewmarkParameters mNewmark
Definition: newmark_method.hpp:320
This class defines the node.
Definition: node.h:65
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
void load(std::string const &rTag, TDataType &rObject)
Definition: serializer.h:207
void save(std::string const &rTag, std::array< TDataType, TDataSize > const &rObject)
Definition: serializer.h:545
Short class definition.
Definition: time_integration_method.hpp:55
const TVariableType * VariablePointer
KratosVariable or KratosVariableComponent.
Definition: time_integration_method.hpp:65
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
#define KRATOS_ERROR
Definition: exception.h:161
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
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
delta_time
Definition: generate_frictional_mortar_condition.py:130
float gamma
Definition: generate_two_fluid_navier_stokes.py:131
def load(f)
Definition: ode_solve.py:307
double beta
Definition: newmark_method.hpp:56
double gamma
Definition: newmark_method.hpp:57
double c0
Definition: newmark_method.hpp:62
void SetParameters(const double &rbeta, const double &rgamma, const double &rdelta_time)
Definition: newmark_method.hpp:69