10 #if !defined(KRATOS_BOSSAK_STEP_METHOD_H_INCLUDED)
11 #define KRATOS_BOSSAK_STEP_METHOD_H_INCLUDED
49 template<
class TVariableType,
class TValueType>
87 BossakStepMethod(
const TVariableType& rVariable,
const TVariableType& rFirstDerivative,
const TVariableType& rSecondDerivative) :
DerivedType(rVariable,rFirstDerivative,rSecondDerivative) {}
90 BossakStepMethod(
const TVariableType& rVariable,
const TVariableType& rFirstDerivative,
const TVariableType& rSecondDerivative,
const TVariableType& rPrimaryVariable) :
DerivedType(rVariable,rFirstDerivative,rSecondDerivative,rPrimaryVariable) {}
122 if (rCurrentProcessInfo.
Has(NEWMARK_BETA))
124 beta = rCurrentProcessInfo[NEWMARK_BETA];
127 if (rCurrentProcessInfo.
Has(NEWMARK_GAMMA))
129 gamma = rCurrentProcessInfo[NEWMARK_GAMMA];
133 if (rCurrentProcessInfo.
Has(BOSSAK_ALPHA))
135 mAlpha = rCurrentProcessInfo[BOSSAK_ALPHA];
140 KRATOS_ERROR <<
"Value not admissible for AlphaBossak. Admissible values should be between 0.0 and -0.3. Current value is " <<
mAlpha << std::endl;
146 rCurrentProcessInfo[NEWMARK_BETA] = beta;
147 rCurrentProcessInfo[NEWMARK_GAMMA] =
gamma;
148 rCurrentProcessInfo[BOSSAK_ALPHA] =
mAlpha;
160 double delta_time = rCurrentProcessInfo[DELTA_TIME];
164 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;
168 if (rCurrentProcessInfo.
Has(NEWMARK_BETA))
170 beta = rCurrentProcessInfo[NEWMARK_BETA];
173 if (rCurrentProcessInfo.
Has(NEWMARK_GAMMA))
175 gamma = rCurrentProcessInfo[NEWMARK_GAMMA];
179 if (rCurrentProcessInfo.
Has(BOSSAK_ALPHA))
181 mAlpha = rCurrentProcessInfo[BOSSAK_ALPHA];
186 KRATOS_ERROR <<
"Value not admissible for AlphaBossak. Admissible values should be between 0.0 and -0.3. Current value is " <<
mAlpha << std::endl;
200 rCurrentProcessInfo[NEWMARK_BETA] = this->
mNewmark.
beta;
202 rCurrentProcessInfo[BOSSAK_ALPHA] = this->
mAlpha;
222 std::string
Info()
const override
224 std::stringstream buffer;
225 buffer <<
"BossakStepMethod";
232 rOStream <<
"BossakStepMethod";
238 rOStream <<
"BossakStepMethod Data";
320 void save(
Serializer& rSerializer)
const override
354 template<
class TVariableType,
class TValueType>
360 template<
class TVariableType,
class TValueType>
363 return rOStream << rThis.
Info();
Short class definition.
Definition: bossak_step_method.hpp:51
BaseType::Pointer BasePointerType
BasePointerType.
Definition: bossak_step_method.hpp:61
BossakStepMethod(const TVariableType &rVariable, const TVariableType &rFirstDerivative, const TVariableType &rSecondDerivative)
Constructor.
Definition: bossak_step_method.hpp:87
double mAlpha
Definition: bossak_step_method.hpp:258
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: bossak_step_method.hpp:236
BossakStepMethod(const TVariableType &rVariable, const TVariableType &rFirstDerivative, const TVariableType &rSecondDerivative, const TVariableType &rPrimaryVariable)
Constructor.
Definition: bossak_step_method.hpp:90
BaseType::NodeType NodeType
NodeType.
Definition: bossak_step_method.hpp:64
KRATOS_CLASS_POINTER_DEFINITION(BossakStepMethod)
BossakStepMethod()
Default Constructor.
Definition: bossak_step_method.hpp:81
TimeIntegrationMethod< TVariableType, TValueType > BaseType
BaseType.
Definition: bossak_step_method.hpp:58
double & GetSecondDerivativeKineticParameter(double &rParameter) override
Definition: bossak_step_method.hpp:272
double & GetSecondDerivativeInertialParameter(double &rParameter) override
Definition: bossak_step_method.hpp:278
NewmarkStepMethod< TVariableType, TValueType > DerivedType
DerivedType.
Definition: bossak_step_method.hpp:70
BaseType::VariablePointer VariablePointer
KratosVariable or KratosVariableComponent.
Definition: bossak_step_method.hpp:67
std::string Info() const override
Turn back information as a string.
Definition: bossak_step_method.hpp:222
BossakStepMethod(BossakStepMethod &rOther)
Copy Constructor.
Definition: bossak_step_method.hpp:93
BossakStepMethod(const TVariableType &rVariable)
Constructor.
Definition: bossak_step_method.hpp:84
BasePointerType Clone() override
Clone.
Definition: bossak_step_method.hpp:100
void CalculateParameters(ProcessInfo &rCurrentProcessInfo) override
Definition: bossak_step_method.hpp:117
void SetParameters(const ProcessInfo &rCurrentProcessInfo) override
Definition: bossak_step_method.hpp:156
~BossakStepMethod() override
Destructor.
Definition: bossak_step_method.hpp:106
void SetProcessInfoParameters(ProcessInfo &rCurrentProcessInfo) override
Definition: bossak_step_method.hpp:196
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: bossak_step_method.hpp:230
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
NewmarkParameters mNewmark
Definition: newmark_method.hpp:320
Short class definition.
Definition: newmark_step_method.hpp:51
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