10 #if !defined(KRATOS_NEWMARK_STEP_METHOD_H_INCLUDED)
11 #define KRATOS_NEWMARK_STEP_METHOD_H_INCLUDED
49 template<
class TVariableType,
class TValueType>
93 NewmarkStepMethod(
const TVariableType& rVariable,
const TVariableType& rFirstDerivative,
const TVariableType& rSecondDerivative) :
DerivedType(rVariable,rFirstDerivative,rSecondDerivative)
99 NewmarkStepMethod(
const TVariableType& rVariable,
const TVariableType& rFirstDerivative,
const TVariableType& rSecondDerivative,
const TVariableType& rPrimaryVariable) :
DerivedType(rVariable,rFirstDerivative,rSecondDerivative,rPrimaryVariable)
154 KRATOS_ERROR <<
" time integration method Step Variable not set " <<std::endl;
176 std::string
Info()
const override
178 std::stringstream buffer;
179 buffer <<
"NewmarkStepMethod";
186 rOStream <<
"NewmarkStepMethod";
192 rOStream <<
"NewmarkStepMethod Data";
242 CurrentSecondDerivative -= CurrentSecondDerivative;
304 CurrentStepVariable = CurrentVariable-PreviousVariable;
307 PreviousVariable = CurrentVariable;
334 CurrentFirstDerivative = this->
mNewmark.
c1 * CurrentStepVariable - this->
mNewmark.
c4 * CurrentFirstDerivative - this->
mNewmark.
c5 * CurrentSecondDerivative;
383 CurrentStepVariable += CurrentVariable-PreviousVariable;
396 PreviousVariable = CurrentVariable;
410 CurrentFirstDerivative = (this->
mNewmark.
c1 * (CurrentStepVariable) - this->
mNewmark.
c4 * PreviousFirstDerivative - this->mNewmark.c5 * PreviousSecondDerivative);
424 CurrentSecondDerivative = (this->
mNewmark.
c0 * (CurrentStepVariable) - this->
mNewmark.
c2 * PreviousFirstDerivative - this->mNewmark.c3 * PreviousSecondDerivative);
469 void save(
Serializer& rSerializer)
const override
503 template<
class TVariableType,
class TValueType>
509 template<
class TVariableType,
class TValueType>
512 return rOStream << rThis.
Info();
Short class definition.
Definition: newmark_method.hpp:51
BaseType::Pointer BasePointerType
BasePointerType.
Definition: newmark_method.hpp:128
NewmarkParameters mNewmark
Definition: newmark_method.hpp:320
BaseType::VariablePointer VariablePointer
KratosVariable or KratosVariableComponent.
Definition: newmark_method.hpp:134
Short class definition.
Definition: newmark_step_method.hpp:51
int Check(const ProcessInfo &rCurrentProcessInfo) override
This function is designed to be called once to perform all the checks needed.
Definition: newmark_step_method.hpp:145
void PredictVariable(NodeType &rNode) override
Definition: newmark_step_method.hpp:312
void UpdateVariable(NodeType &rNode) override
Definition: newmark_step_method.hpp:388
void UpdateSecondDerivative(NodeType &rNode) override
Definition: newmark_step_method.hpp:415
NewmarkStepMethod(const TVariableType &rVariable, const TVariableType &rFirstDerivative, const TVariableType &rSecondDerivative)
Constructor.
Definition: newmark_step_method.hpp:93
BasePointerType Clone() override
Clone.
Definition: newmark_step_method.hpp:112
void UpdateFromVariable(NodeType &rNode) override
Definition: newmark_step_method.hpp:353
VariablePointer mpStepVariable
Definition: newmark_step_method.hpp:213
BaseType::VariablePointer VariablePointer
KratosVariable or KratosVariableComponent.
Definition: newmark_step_method.hpp:67
virtual void UpdateStepVariable(NodeType &rNode)
Definition: newmark_step_method.hpp:373
void AssignFromFirstDerivative(NodeType &rNode) override
Definition: newmark_step_method.hpp:219
void UpdateFirstDerivative(NodeType &rNode) override
Definition: newmark_step_method.hpp:401
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: newmark_step_method.hpp:190
void PredictFromVariable(NodeType &rNode) override
Definition: newmark_step_method.hpp:275
BaseType::NodeType NodeType
NodeType.
Definition: newmark_step_method.hpp:64
BaseType::Pointer BasePointerType
BasePointerType.
Definition: newmark_step_method.hpp:61
KRATOS_CLASS_POINTER_DEFINITION(NewmarkStepMethod)
void PredictFirstDerivative(NodeType &rNode) override
Definition: newmark_step_method.hpp:326
TimeIntegrationMethod< TVariableType, TValueType > BaseType
BaseType.
Definition: newmark_step_method.hpp:58
std::string Info() const override
Turn back information as a string.
Definition: newmark_step_method.hpp:176
NewmarkStepMethod(NewmarkStepMethod &rOther)
Copy Constructor.
Definition: newmark_step_method.hpp:105
bool HasStepVariable() override
Definition: newmark_step_method.hpp:129
NewmarkStepMethod(const TVariableType &rVariable)
Constructor.
Definition: newmark_step_method.hpp:87
NewmarkMethod< TVariableType, TValueType > DerivedType
DerivedType.
Definition: newmark_step_method.hpp:70
void SetStepVariable(const TVariableType &rStepVariable) override
Definition: newmark_step_method.hpp:135
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: newmark_step_method.hpp:184
void AssignFromSecondDerivative(NodeType &rNode) override
Definition: newmark_step_method.hpp:247
void PredictSecondDerivative(NodeType &rNode) override
Definition: newmark_step_method.hpp:339
NewmarkStepMethod()
Default Constructor.
Definition: newmark_step_method.hpp:81
~NewmarkStepMethod() override
Destructor.
Definition: newmark_step_method.hpp:118
virtual void PredictStepVariable(NodeType &rNode)
Definition: newmark_step_method.hpp:295
NewmarkStepMethod(const TVariableType &rVariable, const TVariableType &rFirstDerivative, const TVariableType &rSecondDerivative, const TVariableType &rPrimaryVariable)
Constructor.
Definition: newmark_step_method.hpp:99
This class defines the node.
Definition: node.h:65
TVariableType::Type & FastGetSolutionStepValue(const TVariableType &rThisVariable)
Definition: node.h:435
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
Short class definition.
Definition: time_integration_method.hpp:55
VariablePointer mpVariable
Definition: time_integration_method.hpp:405
virtual int Check(const ProcessInfo &rCurrentProcessInfo)
This function is designed to be called once to perform all the checks needed.
Definition: time_integration_method.hpp:272
const TVariableType * VariablePointer
KratosVariable or KratosVariableComponent.
Definition: time_integration_method.hpp:65
VariablePointer mpFirstDerivative
Definition: time_integration_method.hpp:407
VariablePointer mpSecondDerivative
Definition: time_integration_method.hpp:409
#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
def load(f)
Definition: ode_solve.py:307
double c5
Definition: newmark_method.hpp:67
double c4
Definition: newmark_method.hpp:66
double c1
Definition: newmark_method.hpp:63
double delta_time
Definition: newmark_method.hpp:59
double beta
Definition: newmark_method.hpp:56
double gamma
Definition: newmark_method.hpp:57
double c0
Definition: newmark_method.hpp:62
double c2
Definition: newmark_method.hpp:64