10 #if !defined(KRATOS_BOSSAK_STEP_ROTATION_METHOD_H_INCLUDED)
11 #define KRATOS_BOSSAK_STEP_ROTATION_METHOD_H_INCLUDED
49 template<
class TVariableType,
class TValueType>
86 BossakStepRotationMethod(
const TVariableType& rVariable,
const TVariableType& rFirstDerivative,
const TVariableType& rSecondDerivative) :
DerivedType(rVariable,rFirstDerivative,rSecondDerivative) {}
89 BossakStepRotationMethod(
const TVariableType& rVariable,
const TVariableType& rFirstDerivative,
const TVariableType& rSecondDerivative,
const TVariableType& rPrimaryVariable) :
DerivedType(rVariable,rFirstDerivative,rSecondDerivative,rPrimaryVariable) {}
121 if (rCurrentProcessInfo.
Has(NEWMARK_BETA))
123 beta = rCurrentProcessInfo[NEWMARK_BETA];
126 if (rCurrentProcessInfo.
Has(NEWMARK_GAMMA))
128 gamma = rCurrentProcessInfo[NEWMARK_GAMMA];
132 if (rCurrentProcessInfo.
Has(BOSSAK_ALPHA))
134 mAlpha = rCurrentProcessInfo[BOSSAK_ALPHA];
139 KRATOS_ERROR <<
"Value not admissible for AlphaBossak. Admissible values should be between 0.0 and -0.3. Current value is " <<
mAlpha << std::endl;
145 rCurrentProcessInfo[NEWMARK_BETA] = beta;
146 rCurrentProcessInfo[NEWMARK_GAMMA] =
gamma;
147 rCurrentProcessInfo[BOSSAK_ALPHA] =
mAlpha;
159 double delta_time = rCurrentProcessInfo[DELTA_TIME];
163 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;
167 if (rCurrentProcessInfo.
Has(NEWMARK_BETA))
169 beta = rCurrentProcessInfo[NEWMARK_BETA];
172 if (rCurrentProcessInfo.
Has(NEWMARK_GAMMA))
174 gamma = rCurrentProcessInfo[NEWMARK_GAMMA];
178 if (rCurrentProcessInfo.
Has(BOSSAK_ALPHA))
180 mAlpha = rCurrentProcessInfo[BOSSAK_ALPHA];
185 KRATOS_ERROR <<
"Value not admissible for AlphaBossak. Admissible values should be between 0.0 and -0.3. Current value is " <<
mAlpha << std::endl;
199 rCurrentProcessInfo[NEWMARK_BETA] = this->
mNewmark.
beta;
201 rCurrentProcessInfo[BOSSAK_ALPHA] = this->
mAlpha;
221 std::string
Info()
const override
223 std::stringstream buffer;
224 buffer <<
"BossakStepRotationMethod";
231 rOStream <<
"BossakStepRotationMethod";
237 rOStream <<
"BossakStepRotationMethod Data";
319 void save(
Serializer& rSerializer)
const override
353 template<
class TVariableType,
class TValueType>
359 template<
class TVariableType,
class TValueType>
362 return rOStream << rThis.
Info();
Short class definition.
Definition: bossak_step_rotation_method.hpp:51
std::string Info() const override
Turn back information as a string.
Definition: bossak_step_rotation_method.hpp:221
BossakStepRotationMethod(const TVariableType &rVariable)
Constructor.
Definition: bossak_step_rotation_method.hpp:84
BasePointerType Clone() override
Clone.
Definition: bossak_step_rotation_method.hpp:99
void SetProcessInfoParameters(ProcessInfo &rCurrentProcessInfo) override
Definition: bossak_step_rotation_method.hpp:195
double mAlpha
Definition: bossak_step_rotation_method.hpp:257
double & GetSecondDerivativeInertialParameter(double &rParameter) override
Definition: bossak_step_rotation_method.hpp:277
BossakStepRotationMethod(BossakStepRotationMethod &rOther)
Copy Constructor.
Definition: bossak_step_rotation_method.hpp:92
void SetParameters(const ProcessInfo &rCurrentProcessInfo) override
Definition: bossak_step_rotation_method.hpp:155
void CalculateParameters(ProcessInfo &rCurrentProcessInfo) override
Definition: bossak_step_rotation_method.hpp:116
BossakStepRotationMethod()
Default Constructor.
Definition: bossak_step_rotation_method.hpp:81
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: bossak_step_rotation_method.hpp:229
BaseType::Pointer BasePointerType
BasePointerType.
Definition: bossak_step_rotation_method.hpp:61
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: bossak_step_rotation_method.hpp:235
NewmarkStepRotationMethod< TVariableType, TValueType > DerivedType
DerivedType.
Definition: bossak_step_rotation_method.hpp:70
TimeIntegrationMethod< TVariableType, TValueType > BaseType
BaseType.
Definition: bossak_step_rotation_method.hpp:58
BossakStepRotationMethod(const TVariableType &rVariable, const TVariableType &rFirstDerivative, const TVariableType &rSecondDerivative)
Constructor.
Definition: bossak_step_rotation_method.hpp:86
BossakStepRotationMethod(const TVariableType &rVariable, const TVariableType &rFirstDerivative, const TVariableType &rSecondDerivative, const TVariableType &rPrimaryVariable)
Constructor.
Definition: bossak_step_rotation_method.hpp:89
~BossakStepRotationMethod() override
Destructor.
Definition: bossak_step_rotation_method.hpp:105
KRATOS_CLASS_POINTER_DEFINITION(BossakStepRotationMethod)
BaseType::NodeType NodeType
NodeType.
Definition: bossak_step_rotation_method.hpp:64
BaseType::VariablePointer VariablePointer
KratosVariable or KratosVariableComponent.
Definition: bossak_step_rotation_method.hpp:67
double & GetSecondDerivativeKineticParameter(double &rParameter) override
Definition: bossak_step_rotation_method.hpp:271
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_rotation_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