10 #if !defined(KRATOS_TIME_DISCRETIZATION_PROCESS_H_INCLUDED )
11 #define KRATOS_TIME_DISCRETIZATION_PROCESS_H_INCLUDED
73 : mrModelPart(rModelPart)
85 "model_part_name":"MODEL_PART_NAME",
89 "prediction_level": -1,
92 "steps_update_delay": 4
99 mTime.
Initialize(rParameters[
"time_step"].GetDouble(), rParameters[
"start_time"].GetDouble(), rParameters[
"end_time"].GetDouble());
101 mTime.
SetFactors(rParameters[
"increase_factor"].GetDouble(), rParameters[
"decrease_factor"].GetDouble(), rParameters[
"steps_update_delay"]);
128 if(!rCurrentProcessInfo[CONVERGENCE_ACHIEVED])
137 rCurrentProcessInfo[STEP] += 1;
143 mTime.
Total = rCurrentProcessInfo[TIME];
513 std::string
Info()
const override
515 return "TimeDiscretizationProcess";
521 rOStream <<
"TimeDiscretizationProcess";
554 void Initialize(
const double& rTimeStep,
const double& rStartTime,
const double& rEndTime)
566 void SetFactors(
const double& rIncreaseFactor,
const double& rDecreaseFactor,
const double& rDelay)
634 if( rNewTime > rTime-tolerance && rNewTime < rTime+tolerance )
654 rCurrentProcessInfo[STEP] -= 1;
658 rCurrentProcessInfo.SetValue(DELTA_TIME_CHANGED, mTime.
Decrease());
669 rCurrentProcessInfo.SetValue(DELTA_TIME_CHANGED, mTime.
Update());
717 TimeParameters mTime;
762 TimeDiscretizationProcess& rThis);
766 const TimeDiscretizationProcess& rThis)
768 rThis.PrintInfo(rOStream);
769 rOStream << std::endl;
770 rThis.PrintData(rOStream);
PointerVector< TPointType > PointsArrayType
Definition: geometry.h:118
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
IndexType CloneTimeStep()
Definition: model_part.cpp:143
MeshType::ElementsContainerType ElementsContainerType
Element container. A vector set of Elements with their Id's as key.
Definition: model_part.h:168
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
void ReduceTimeStep(ModelPart &rModelPart, double NewTime)
Definition: model_part.cpp:191
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
int GetInt() const
This method returns the integer contained in the current Parameter.
Definition: kratos_parameters.cpp:666
void ValidateAndAssignDefaults(const Parameters &rDefaultParameters)
This function is designed to verify that the parameters under testing match the form prescribed by th...
Definition: kratos_parameters.cpp:1306
The base class for all processes in Kratos.
Definition: process.h:49
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Short class definition.
Definition: time_discretization_process.hpp:59
TimeDiscretizationProcess(ModelPart &rModelPart, Parameters rParameters)
Default constructor.
Definition: time_discretization_process.hpp:78
void operator()()
Definition: time_discretization_process.hpp:112
void CheckCriticalElement()
Definition: time_discretization_process.hpp:692
void Execute() override
Execute method is used to execute the Process algorithms.
Definition: time_discretization_process.hpp:121
std::string Info() const override
Turn back information as a string.
Definition: time_discretization_process.hpp:513
TimeDiscretizationProcess(ModelPart &rModelPart)
Default constructor.
Definition: time_discretization_process.hpp:72
void PredictTimeStep()
Definition: time_discretization_process.hpp:674
virtual ~TimeDiscretizationProcess()
Destructor.
Definition: time_discretization_process.hpp:108
void PredictTimeStep(double &rTimeStep)
Definition: time_discretization_process.hpp:685
KRATOS_CLASS_POINTER_DEFINITION(TimeDiscretizationProcess)
Pointer definition of TimeDiscretizationProcess.
void UpdateTimeStep()
Definition: time_discretization_process.hpp:663
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: time_discretization_process.hpp:519
ReduceTimeStep()
Definition: time_discretization_process.hpp:649
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
GlobalPointersVector< Element > ElementWeakPtrVectorType
Definition: build_model_part_boundary_process.hpp:60
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
@ Initial
Definition: structural_mechanics_math_utilities.hpp:30
ModelPart::NodesContainerType NodesContainerType
Definition: find_conditions_neighbours_process.h:44
GlobalPointersVector< Node > NodeWeakPtrVectorType
Definition: build_model_part_boundary_process.hpp:59
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
GlobalPointersVector< Condition > ConditionWeakPtrVectorType
Definition: build_model_part_boundary_process.hpp:61
ModelPart::ElementsContainerType ElementsContainerType
Definition: clear_contact_conditions_mesher_process.hpp:43
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
GeometryType::PointsArrayType PointsArrayType
Definition: settle_model_structure_process.hpp:48
e
Definition: run_cpp_mpi_tests.py:31
Definition: time_discretization_process.hpp:532
double PredictedStep
Definition: time_discretization_process.hpp:540
double Start
Definition: time_discretization_process.hpp:544
bool ActiveDelay()
Definition: time_discretization_process.hpp:618
bool PredictActive()
Definition: time_discretization_process.hpp:599
double PreviousStep
Definition: time_discretization_process.hpp:537
double CurrentStep
Definition: time_discretization_process.hpp:538
int DelayCounter
Definition: time_discretization_process.hpp:552
void SetFactors(const double &rIncreaseFactor, const double &rDecreaseFactor, const double &rDelay)
Definition: time_discretization_process.hpp:566
bool Update()
Definition: time_discretization_process.hpp:610
bool Decrease()
Definition: time_discretization_process.hpp:588
int UpdateDelay
Definition: time_discretization_process.hpp:551
double DecreaseFactor
Definition: time_discretization_process.hpp:549
void Initialize(const double &rTimeStep, const double &rStartTime, const double &rEndTime)
Definition: time_discretization_process.hpp:554
bool Increase()
Definition: time_discretization_process.hpp:573
double End
Definition: time_discretization_process.hpp:545
double IncreaseFactor
Definition: time_discretization_process.hpp:548
int PredictionLevel
Definition: time_discretization_process.hpp:534
bool CheckSameTime(const double &rTime, const double &rNewTime)
Definition: time_discretization_process.hpp:631
double Total
Definition: time_discretization_process.hpp:542
double MileStone
Definition: time_discretization_process.hpp:546
double InitialStep
Definition: time_discretization_process.hpp:536