14 #if !defined( KRATOS_PROCESS_INFO_H_INCLUDED )
15 #define KRATOS_PROCESS_INFO_H_INCLUDED
83 mpPreviousSolutionStepInfo(),
84 mpPreviousTimeStepInfo()
92 mIsTimeStep(Other.mIsTimeStep),
93 mSolutionStepIndex(Other.mSolutionStepIndex),
94 mpPreviousSolutionStepInfo(Other.mpPreviousSolutionStepInfo),
95 mpPreviousTimeStepInfo(Other.mpPreviousTimeStepInfo)
113 mIsTimeStep = rOther.mIsTimeStep;
114 mSolutionStepIndex = rOther.mSolutionStepIndex;
115 mpPreviousSolutionStepInfo = rOther.mpPreviousSolutionStepInfo;
116 mpPreviousTimeStepInfo = rOther.mpPreviousTimeStepInfo;
127 CreateSolutionStepInfo(SolutionStepIndex);
133 CreateSolutionStepInfo(SolutionStepIndex);
145 CloneSolutionStepInfo(SolutionStepIndex, SourceSolutionStepInfo);
151 CreateTimeStepInfo(SolutionStepIndex);
152 SetCurrentTime(NewTime);
157 CloneTimeStepInfo(SourceSolutionStepIndex);
158 SetCurrentTime(NewTime);
175 CloneTimeStepInfo(SolutionStepIndex, SourceSolutionStepInfo);
176 SetCurrentTime(NewTime);
179 void SetAsTimeStepInfo();
181 void SetAsTimeStepInfo(
double NewTime);
183 ProcessInfo::Pointer pGetPreviousTimeStepInfo(
IndexType StepsBefore = 1);
185 const ProcessInfo::Pointer pGetPreviousTimeStepInfo(
IndexType StepsBefore = 1)
const;
189 return *pGetPreviousTimeStepInfo(StepsBefore);
194 return *pGetPreviousTimeStepInfo(StepsBefore);
199 return GetPreviousTimeStepInfo(StepsBefore).GetSolutionStepIndex();
206 void SetCurrentTime(
double NewTime);
215 void CreateSolutionStepInfo(
IndexType SolutionStepIndex = 0);
242 void CloneSolutionStepInfo();
244 void CloneSolutionStepInfo(
IndexType SourceSolutionStepIndex);
246 void CloneSolutionStepInfo(
IndexType SolutionStepIndex,
ProcessInfo const & SourceSolutionStepInfo);
250 void RemoveSolutionStepInfo(
IndexType SolutionStepIndex);
252 void ClearHistory(
IndexType StepsBefore = 0);
254 ProcessInfo::Pointer pGetPreviousSolutionStepInfo(
IndexType StepsBefore = 1);
256 const ProcessInfo::Pointer pGetPreviousSolutionStepInfo(
IndexType StepsBefore = 1)
const;
260 return *pGetPreviousSolutionStepInfo(StepsBefore);
265 return *pGetPreviousSolutionStepInfo(StepsBefore);
270 return GetPreviousSolutionStepInfo(StepsBefore).GetSolutionStepIndex();
279 return mSolutionStepIndex;
284 mSolutionStepIndex = NewIndex;
297 std::string
Info()
const override
299 return "Process Info";
311 rOStream <<
" Current solution step index : " << mSolutionStepIndex << std::endl;
312 BaseType::PrintData(rOStream);
372 ProcessInfo::Pointer mpPreviousSolutionStepInfo;
374 ProcessInfo::Pointer mpPreviousTimeStepInfo;
391 void save(
Serializer& rSerializer)
const override;
434 rOStream << std::endl;
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:93
Container for storing data values associated with variables.
Definition: data_value_container.h:63
std::size_t IndexType
Definition: flags.h:74
Flags & operator=(Flags const &rOther)
Assignment operator.
Definition: flags.h:151
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
ProcessInfo()
Default constructor.
Definition: process_info.h:78
IndexType GetPreviousSolutionStepIndex(IndexType StepsBefore=1) const
Definition: process_info.h:268
ProcessInfo const & GetPreviousSolutionStepInfo(IndexType StepsBefore=1) const
Definition: process_info.h:263
void CreateTimeStepInfo(IndexType SolutionStepIndex=0)
Definition: process_info.h:125
~ProcessInfo() override
Destructor.
Definition: process_info.h:100
IndexType GetPreviousTimeStepIndex(IndexType StepsBefore=1) const
Definition: process_info.h:197
void CreateTimeStepInfo(double NewTime, IndexType SolutionStepIndex=0)
Definition: process_info.h:149
void CloneTimeStepInfo(double NewTime, IndexType SourceSolutionStepIndex=0)
Definition: process_info.h:155
std::size_t SizeType
Definition: process_info.h:69
void SetSolutionStepIndex(IndexType NewIndex)
Definition: process_info.h:282
ProcessInfo const & GetPreviousTimeStepInfo(IndexType StepsBefore=1) const
Definition: process_info.h:192
ProcessInfo & GetPreviousSolutionStepInfo(IndexType StepsBefore=1)
Definition: process_info.h:258
std::size_t IndexType
Definition: process_info.h:71
ProcessInfo(const ProcessInfo &Other)
Copy constructor.
Definition: process_info.h:89
DataValueContainer BaseType
Definition: process_info.h:67
void CloneTimeStepInfo(double NewTime, IndexType SolutionStepIndex, ProcessInfo const &SourceSolutionStepInfo)
Definition: process_info.h:173
void CloneTimeStepInfo(IndexType SolutionStepIndex=0)
Definition: process_info.h:131
ProcessInfo & operator=(const ProcessInfo &rOther)
Assignment operator.
Definition: process_info.h:108
ProcessInfo & GetPreviousTimeStepInfo(IndexType StepsBefore=1)
Definition: process_info.h:187
void CloneTimeStepInfo(IndexType SolutionStepIndex, ProcessInfo const &SourceSolutionStepInfo)
Definition: process_info.h:143
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: process_info.h:309
std::string Info() const override
Turn back information as a string.
Definition: process_info.h:297
IndexType GetSolutionStepIndex() const
Definition: process_info.h:277
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: process_info.h:303
KRATOS_CLASS_POINTER_DEFINITION(ProcessInfo)
Pointer definition of ProcessInfo.
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
std::size_t IndexType
The definition of the index type.
Definition: key_hash.h:35
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::size_t SizeType
The definition of the size type.
Definition: mortar_classes.h:43
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