14 #ifndef KRATOS_PERIODIC_VARIABLES_CONTAINER_H
15 #define KRATOS_PERIODIC_VARIABLES_CONTAINER_H
23 #include <boost/iterator/indirect_iterator.hpp>
91 mPeriodicDoubleVars(rOther.mPeriodicDoubleVars)
108 this->mPeriodicDoubleVars = rOther.mPeriodicDoubleVars;
119 mPeriodicDoubleVars.push_back(&rThisVariable);
125 mPeriodicDoubleVars.clear();
147 return mPeriodicDoubleVars.size();
162 std::stringstream buffer;
163 buffer <<
"PeriodicVariablesContainer";
170 rOStream <<
"PeriodicVariablesContainer";
176 rOStream <<
"Double Variables:" << std::endl;
177 for (DoubleVariablesContainerType::const_iterator it = mPeriodicDoubleVars.begin(); it != mPeriodicDoubleVars.end(); ++it)
179 (*it)->PrintInfo(rOStream);
180 rOStream << std::endl;
257 virtual void save(
Serializer& rSerializer)
const
259 std::size_t DoubleVarSize= mPeriodicDoubleVars.size();
260 rSerializer.
save(
"DoubleVarSize",DoubleVarSize);
261 for(std::size_t
i = 0;
i < DoubleVarSize;
i++)
262 rSerializer.
save(
"Variable Name", mPeriodicDoubleVars[
i]->Name());
268 std::size_t DoubleVarSize;
269 rSerializer.
load(
"DoubleVarSize",DoubleVarSize);
270 for(std::size_t
i = 0;
i < DoubleVarSize;
i++)
272 rSerializer.
load(
"Variable Name", Name);
319 rOStream << std::endl;
KratosComponents class encapsulates a lookup table for a family of classes in a generic way.
Definition: kratos_components.h:49
A container of Kratos variables used to define a periodic boundary condition.
Definition: periodic_variables_container.h:60
Variable< double > DoubleVariableType
Kratos double Variable.
Definition: periodic_variables_container.h:69
DoubleVariablesConstIterator DoubleVariablesEnd() const
Iterator for the list of scalar variables.
Definition: periodic_variables_container.h:139
PeriodicVariablesContainer()
Default constructor.
Definition: periodic_variables_container.h:84
boost::indirect_iterator< DoubleVariablesContainerType::const_iterator > DoubleVariablesConstIterator
Double Variable iterator.
Definition: periodic_variables_container.h:75
PeriodicVariablesContainer(PeriodicVariablesContainer const &rOther)
Copy constructor.
Definition: periodic_variables_container.h:90
DoubleVariablesConstIterator DoubleVariablesBegin() const
Iterator for the list of scalar variables.
Definition: periodic_variables_container.h:133
std::vector< const DoubleVariableType * > DoubleVariablesContainerType
Container of pointers to Kratos double variables.
Definition: periodic_variables_container.h:72
std::string Info() const
Turn back information as a string.
Definition: periodic_variables_container.h:160
void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: periodic_variables_container.h:168
~PeriodicVariablesContainer()
Destructor.
Definition: periodic_variables_container.h:96
void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: periodic_variables_container.h:174
SizeType size() const
Total number of periodic variables (including scalars and vector components)
Definition: periodic_variables_container.h:145
PeriodicVariablesContainer & operator=(PeriodicVariablesContainer const &rOther)
Assignment operator.
Definition: periodic_variables_container.h:106
void Add(DoubleVariableType const &rThisVariable)
Add a scalar variable to the list of variables where periodic conditions will be imposed.
Definition: periodic_variables_container.h:117
KRATOS_CLASS_POINTER_DEFINITION(PeriodicVariablesContainer)
Pointer definition of PeriodicVariablesContainer.
void Clear()
Erase all information contained in this object.
Definition: periodic_variables_container.h:123
std::size_t SizeType
Definition: periodic_variables_container.h:77
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
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
integer i
Definition: TensorModule.f:17