13 #if !defined(KRATOS_TEMPORAL_METHOD_UTILITIES_H_INCLUDED)
14 #define KRATOS_TEMPORAL_METHOD_UTILITIES_H_INCLUDED
33 namespace TemporalMethodUtilities
35 template <
class TContainerType,
class TContainerItemType,
template <
class T>
class TDataRetrievalFunctor,
template <
class T>
class TDataStorageFunctor,
class TDataType>
37 TContainerType& rContainer,
41 if (rContainer.size() > 0)
43 const int number_of_items = rContainer.size();
44 #pragma omp parallel for
45 for (
int i = 0;
i < number_of_items; ++
i)
47 TContainerItemType& r_item = *(rContainer.begin() +
i);
49 const TDataType& r_reference_value =
50 TDataRetrievalFunctor<TContainerItemType>()(r_item, rReferenceVariable);
51 TDataType output_value = rOutputVariable.
Zero();
52 MethodUtilities::DataTypeSizeInitializer<TDataType>(output_value, r_reference_value);
53 TDataStorageFunctor<TContainerItemType>()(r_item, rOutputVariable, output_value);
58 template <
class TContainerType,
class TContainerItemType,
template <
class T>
class TDataStorageFunctor>
61 if (rContainer.size() > 0)
63 const int number_of_items = rContainer.size();
64 #pragma omp parallel for
65 for (
int i = 0;
i < number_of_items; ++
i)
67 TContainerItemType& r_item = *(rContainer.begin() +
i);
68 TDataStorageFunctor<TContainerItemType>()(r_item, rOutputVariable, InitializerValue);
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
const TDataType & Zero() const
This method returns the zero value of the variable type.
Definition: variable.h:346
void InitializeVariables(TContainerType &rContainer, const Variable< TDataType > &rOutputVariable, const Variable< TDataType > &rReferenceVariable)
Definition: temporal_method_utilities.h:36
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
integer i
Definition: TensorModule.f:17