KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
Namespaces | Macros | Functions
container_expression.cpp File Reference
#include <numeric>
#include <sstream>
#include "includes/define.h"
#include "expression/unary_combine_expression.h"
#include "expression/unary_reshape_expression.h"
#include "expression/unary_slice_expression.h"
#include "expression/arithmetic_operators.h"
#include "container_expression.h"
Include dependency graph for container_expression.cpp:

Namespaces

 Kratos
 REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
 
 Kratos::ContainerExpressionHelperUtilities
 

Macros

#define KRATOS_DEFINE_BINARY_CONTAINER_EXPRESSION_OPERATOR(OPERATOR_NAME)
 
#define KRATOS_INSTANTIATE_BINARY_CONTAINER_EXPRESSION_OPERATOR( OPERATOR_NAME, CONTAINER_TYPE, MESH_TYPE)
 
#define KRATOS_INSTANTIATE_UNARY_CONTAINER_EXPRESSION_OPERATOR( OPERATOR_NAME, EXPRESSION_OPERATOR_NAME, CONTAINER_TYPE, MESH_TYPE)
 
#define KRATOS_INSTANTIATE_CONTAINER_EXPRESSION_OPERATOR_GROUP(CONTAINER_TYPE, MESH_TYPE)
 
#define KRATOS_INSTANTIATE_CONTAINER_EXPRESSION_OPERATOR_GROUP_CONTAINER_TYPE(CONTAINER_TYPE)
 

Functions

template<MeshType TMeshType>
ModelPart::MeshType & Kratos::ContainerExpressionHelperUtilities::GetMesh (ModelPart &rModelPart)
 
template<>
ModelPart::MeshType & Kratos::ContainerExpressionHelperUtilities::GetMesh< MeshType::Local > (ModelPart &rModelPart)
 
template<>
ModelPart::MeshType & Kratos::ContainerExpressionHelperUtilities::GetMesh< MeshType::Ghost > (ModelPart &rModelPart)
 
template<>
ModelPart::MeshType & Kratos::ContainerExpressionHelperUtilities::GetMesh< MeshType::Interface > (ModelPart &rModelPart)
 
template<MeshType TMeshType>
const ModelPart::MeshType & Kratos::ContainerExpressionHelperUtilities::GetMesh (const ModelPart &rModelPart)
 
template<>
const ModelPart::MeshType & Kratos::ContainerExpressionHelperUtilities::GetMesh< MeshType::Local > (const ModelPart &rModelPart)
 
template<>
const ModelPart::MeshType & Kratos::ContainerExpressionHelperUtilities::GetMesh< MeshType::Ghost > (const ModelPart &rModelPart)
 
template<>
const ModelPart::MeshType & Kratos::ContainerExpressionHelperUtilities::GetMesh< MeshType::Interface > (const ModelPart &rModelPart)
 
template<class TContainerType >
TContainerType & Kratos::ContainerExpressionHelperUtilities::GetContainer (ModelPart::MeshType &rMesh)
 
template<>
ModelPart::NodesContainerType & Kratos::ContainerExpressionHelperUtilities::GetContainer< ModelPart::NodesContainerType > (ModelPart::MeshType &rMesh)
 
template<>
ModelPart::ConditionsContainerType & Kratos::ContainerExpressionHelperUtilities::GetContainer< ModelPart::ConditionsContainerType > (ModelPart::MeshType &rMesh)
 
template<>
ModelPart::ElementsContainerType & Kratos::ContainerExpressionHelperUtilities::GetContainer< ModelPart::ElementsContainerType > (ModelPart::MeshType &rMesh)
 
template<class TContainerType >
const TContainerType & Kratos::ContainerExpressionHelperUtilities::GetContainer (const ModelPart::MeshType &rMesh)
 
template<>
const ModelPart::NodesContainerType & Kratos::ContainerExpressionHelperUtilities::GetContainer< ModelPart::NodesContainerType > (const ModelPart::MeshType &rMesh)
 
template<>
const ModelPart::ConditionsContainerType & Kratos::ContainerExpressionHelperUtilities::GetContainer< ModelPart::ConditionsContainerType > (const ModelPart::MeshType &rMesh)
 
template<>
const ModelPart::ElementsContainerType & Kratos::ContainerExpressionHelperUtilities::GetContainer< ModelPart::ElementsContainerType > (const ModelPart::MeshType &rMesh)
 

Macro Definition Documentation

◆ KRATOS_DEFINE_BINARY_CONTAINER_EXPRESSION_OPERATOR

#define KRATOS_DEFINE_BINARY_CONTAINER_EXPRESSION_OPERATOR (   OPERATOR_NAME)
Value:
template <class TContainerType, MeshType TMeshType> \
ContainerExpression<TContainerType, TMeshType> OPERATOR_NAME( \
const ContainerExpression<TContainerType, TMeshType>& rLeft, const double Right) \
{ \
ContainerExpression<TContainerType, TMeshType> result(*rLeft.pGetModelPart()); \
result.SetExpression(Kratos::OPERATOR_NAME(rLeft.pGetExpression(), Right)); \
return result; \
} \
\
template <class TContainerType, MeshType TMeshType> \
ContainerExpression<TContainerType, TMeshType> OPERATOR_NAME( \
const double Left, const ContainerExpression<TContainerType, TMeshType>& rRight) \
{ \
ContainerExpression<TContainerType, TMeshType> result(*rRight.pGetModelPart()); \
result.SetExpression(Kratos::OPERATOR_NAME(Left, rRight.pGetExpression())); \
return result; \
} \
\
template <class TContainerType, MeshType TMeshType> \
ContainerExpression<TContainerType, TMeshType> OPERATOR_NAME( \
const ContainerExpression<TContainerType, TMeshType>& rLeft, \
const ContainerExpression<TContainerType, TMeshType>& rRight) \
{ \
ContainerExpression<TContainerType, TMeshType> result(*rLeft.pGetModelPart()); \
result.SetExpression(Kratos::OPERATOR_NAME(rLeft.pGetExpression(), \
rRight.pGetExpression())); \
return result; \
}

◆ KRATOS_INSTANTIATE_BINARY_CONTAINER_EXPRESSION_OPERATOR

#define KRATOS_INSTANTIATE_BINARY_CONTAINER_EXPRESSION_OPERATOR (   OPERATOR_NAME,
  CONTAINER_TYPE,
  MESH_TYPE 
)
Value:
template KRATOS_API(KRATOS_CORE) ContainerExpression<CONTAINER_TYPE, MESH_TYPE> OPERATOR_NAME( \
const ContainerExpression<CONTAINER_TYPE, MESH_TYPE>&, const double); \
template KRATOS_API(KRATOS_CORE) ContainerExpression<CONTAINER_TYPE, MESH_TYPE> OPERATOR_NAME( \
const double, const ContainerExpression<CONTAINER_TYPE, MESH_TYPE>&); \
template KRATOS_API(KRATOS_CORE) ContainerExpression<CONTAINER_TYPE, MESH_TYPE> OPERATOR_NAME( \
const ContainerExpression<CONTAINER_TYPE, MESH_TYPE>&, \
const ContainerExpression<CONTAINER_TYPE, MESH_TYPE>&);
#define KRATOS_API(...)
Definition: kratos_export_api.h:40

◆ KRATOS_INSTANTIATE_CONTAINER_EXPRESSION_OPERATOR_GROUP

#define KRATOS_INSTANTIATE_CONTAINER_EXPRESSION_OPERATOR_GROUP (   CONTAINER_TYPE,
  MESH_TYPE 
)
Value:
template class ContainerExpression<CONTAINER_TYPE, MESH_TYPE>; \
KRATOS_INSTANTIATE_BINARY_CONTAINER_EXPRESSION_OPERATOR(operator+, CONTAINER_TYPE, MESH_TYPE) \
KRATOS_INSTANTIATE_BINARY_CONTAINER_EXPRESSION_OPERATOR(operator-, CONTAINER_TYPE, MESH_TYPE) \
KRATOS_INSTANTIATE_BINARY_CONTAINER_EXPRESSION_OPERATOR(operator*, CONTAINER_TYPE, MESH_TYPE) \
KRATOS_INSTANTIATE_BINARY_CONTAINER_EXPRESSION_OPERATOR(operator/, CONTAINER_TYPE, MESH_TYPE) \
KRATOS_INSTANTIATE_UNARY_CONTAINER_EXPRESSION_OPERATOR(operator+=, operator+, \
CONTAINER_TYPE, MESH_TYPE) \
KRATOS_INSTANTIATE_UNARY_CONTAINER_EXPRESSION_OPERATOR(operator-=, operator-, \
CONTAINER_TYPE, MESH_TYPE) \
KRATOS_INSTANTIATE_UNARY_CONTAINER_EXPRESSION_OPERATOR(operator*=, operator*, \
CONTAINER_TYPE, MESH_TYPE) \
KRATOS_INSTANTIATE_UNARY_CONTAINER_EXPRESSION_OPERATOR(operator/=, operator/, \
CONTAINER_TYPE, MESH_TYPE) \

◆ KRATOS_INSTANTIATE_CONTAINER_EXPRESSION_OPERATOR_GROUP_CONTAINER_TYPE

#define KRATOS_INSTANTIATE_CONTAINER_EXPRESSION_OPERATOR_GROUP_CONTAINER_TYPE (   CONTAINER_TYPE)
Value:
KRATOS_INSTANTIATE_CONTAINER_EXPRESSION_OPERATOR_GROUP(CONTAINER_TYPE, MeshType::Interface) \
KRATOS_INSTANTIATE_CONTAINER_EXPRESSION_OPERATOR_GROUP(CONTAINER_TYPE, MeshType::Ghost)
#define KRATOS_INSTANTIATE_CONTAINER_EXPRESSION_OPERATOR_GROUP(CONTAINER_TYPE, MESH_TYPE)
Definition: container_expression.cpp:331
@ Local
Definition: traits.h:20
@ Ghost
Definition: traits.h:21
@ Interface
Definition: traits.h:22

◆ KRATOS_INSTANTIATE_UNARY_CONTAINER_EXPRESSION_OPERATOR

#define KRATOS_INSTANTIATE_UNARY_CONTAINER_EXPRESSION_OPERATOR (   OPERATOR_NAME,
  EXPRESSION_OPERATOR_NAME,
  CONTAINER_TYPE,
  MESH_TYPE 
)
Value:
template <> \
ContainerExpression<CONTAINER_TYPE, MESH_TYPE>& ContainerExpression<CONTAINER_TYPE, MESH_TYPE>::OPERATOR_NAME( \
const double Value) \
{ \
this->mpExpression = EXPRESSION_OPERATOR_NAME(this->mpExpression.value(), Value); \
return *this; \
} \
template <> \
ContainerExpression<CONTAINER_TYPE, MESH_TYPE>& ContainerExpression<CONTAINER_TYPE, MESH_TYPE>::OPERATOR_NAME( \
const ContainerExpression<CONTAINER_TYPE, MESH_TYPE>& Value) \
{ \
this->mpExpression = \
EXPRESSION_OPERATOR_NAME(this->mpExpression.value(), Value.pGetExpression()); \
return *this; \
}