11 #if !defined(KRATOS_TABLE_KEY_VARIABLES_H_INCLUDED )
12 #define KRATOS_TABLE_KEY_VARIABLES_H_INCLUDED
48 template<
class TArgumentType,
class TResultType = TArgumentType>
59 typedef __int64 int64_t;
84 TableKeyVariables::Pointer
Clone()
const
86 return Kratos::make_shared< TableKeyVariables >(*
this);
102 mKeys.push_back(Key(rXVariable.
Key(), rYVariable.
Key()));
109 for(
i=0;
i<mKeys.size(); ++
i)
110 if(mKeys[
i]==rTableKey)
112 return *(mData[
i].first);
118 for(
i=0;
i<mKeys.size(); ++
i)
119 if(mKeys[
i]==rTableKey)
121 return *(mData[
i].second);
139 return "TableKeyVariables";
145 rOStream <<
"TableKeyVariables";
151 rOStream <<
"This table keys contain " << mData.size() <<
" variables";
198 std::vector<int64_t> mKeys;
211 int64_t Key(std::size_t XKey, std::size_t YKey)
const
213 int64_t result_key = XKey;
214 result_key = result_key << 32;
227 rSerializer.
save(
"mKeys", mKeys);
228 rSerializer.
save(
"mData", mData);
233 rSerializer.
load(
"mKeys", mKeys);
234 rSerializer.
load(
"mData", mData);
266 template<
class TArgumentType,
class TResultType>
271 template<
class TArgumentType,
class TResultType>
276 rOStream << std::endl;
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
TableKeyVariables.
Definition: table_key_variables.hpp:50
std::string Info() const
Turn back information as a string.
Definition: table_key_variables.hpp:137
void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: table_key_variables.hpp:143
TableKeyVariables::Pointer Clone() const
Clone.
Definition: table_key_variables.hpp:84
TableKeyVariables()
Default constructor.
Definition: table_key_variables.hpp:75
std::vector< TableVariablesType > TableVariablesContainerType
Definition: table_key_variables.hpp:68
Variable< TResultType > YVariableType
Definition: table_key_variables.hpp:64
TableKeyVariables(const TableKeyVariables &rOther)
Copy constructor.
Definition: table_key_variables.hpp:78
void RegisterTable(const XVariableType &rXVariable, const YVariableType &rYVariable)
Definition: table_key_variables.hpp:100
~TableKeyVariables()
Destructor.
Definition: table_key_variables.hpp:90
KRATOS_CLASS_POINTER_DEFINITION(TableKeyVariables)
Pointer definition of TableKeyVariables.
const YVariableType & GetYVariable(int64_t rTableKey) const
Definition: table_key_variables.hpp:115
const XVariableType & GetXVariable(int64_t rTableKey) const
Definition: table_key_variables.hpp:106
void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: table_key_variables.hpp:149
std::pair< const XVariableType *, const YVariableType * > TableVariablesType
Definition: table_key_variables.hpp:66
Variable< TArgumentType > XVariableType
Definition: table_key_variables.hpp:62
KeyType Key() const
Definition: variable_data.h:187
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
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