Rheolef  7.2
an efficient C++ finite element environment
Loading...
Searching...
No Matches
field_expr.h

Go to the source code of this file.

Classes

class  enable_if< details::is_field_expr_affine_homogeneous< Expr1 >::value &&details::is_field_expr_affine_homogeneous< Expr2 >::value, promote< Expr1::float_type, Expr2::float_type >::type >

Namespaces

namespace  rheolef
 This file is part of Rheolef.

Macros

#define _RHEOLEF_field_expr_v2_op_assign_field(OP, FUNCTOR)
#define _RHEOLEF_field_expr_v2_op_assign_auxil(OP, FUNCTOR, NAME, IDX)
#define _RHEOLEF_field_expr_v2_op_assign(OP, FUNCTOR)
#define _RHEOLEF_field_expr_v2_op_assign_constant_field(OP, FUNCTOR)
#define _RHEOLEF_field_expr_v2_op_assign_constant_auxil(OP, FUNCTOR, NAME, IDX)
#define _RHEOLEF_field_expr_v2_op_assign_constant(OP, FUNCTOR)

Typedefs

typedef Expr1::float_type T

Functions

 _RHEOLEF_field_expr_v2_op_assign (+=, details::plus_assign) _RHEOLEF_field_expr_v2_op_assign(-
 _RHEOLEF_field_expr_v2_op_assign_constant (+=, details::plus_assign) _RHEOLEF_field_expr_v2_op_assign_constant(-
details::minus_assign _RHEOLEF_field_expr_v2_op_assign_constant details::multiplies_assign _RHEOLEF_field_expr_v2_op_assign_constant (/=, details::divides_assign) template< class Expr1
rheolef::std::enable_if< details::is_field_expr_affine_homogeneous< Expr1 >::value &&details::is_field_expr_affine_homogeneous< Expr2 >::value, promote< Expr1::float_type, Expr2::float_type >::type > type dual const Expr1 expr1, const Expr2 expr2 dual (const Expr1 &expr1, const Expr2 &expr2)
 check_macro (expr1.have_homogeneous_space(Xh1), "dual(expr1,expr2); expr1 should have homogeneous space. HINT: use dual(interpolate(Xh, expr1),expr2)")
 check_macro (expr2.have_homogeneous_space(Xh2), "dual(expr1,expr2); expr2 should have homogeneous space. HINT: use dual(expr1,interpolate(Xh, expr2))")
 check_macro (Xh1.name()==Xh2.name(), "dual(expr1,expr2); incompatible \""<< Xh1.name()<<"\" and \""<< Xh2.name()<<" spaces for expr1 and expr2")
return dis_inner_product (expr1.begin_dof(), expr2.begin_dof(), Xh1.ndof(), Xh1.ownership().comm(), M())
template<class Expr1, class Expr2>
std::enable_if< details::is_field_expr_affine_homogeneous< Expr1 >::value &&details::is_field_expr_v2_constant< Expr2 >::value, typenameExpr1::float_type >::type dual (const Expr1 &expr1, const Expr2 &expr2)
template<class Expr>
std::enable_if< details::has_field_rdof_interface< Expr >::value &&!details::is_field< Expr >::value, form_basic< typenameExpr::value_type, typenameExpr::memory_type > >::type diag (const Expr &expr)

Variables

space_basic< T, MXh1
space_basic< T, MXh2

Macro Definition Documentation

◆ _RHEOLEF_field_expr_v2_op_assign_field

#define _RHEOLEF_field_expr_v2_op_assign_field ( OP,
FUNCTOR )
Value:
template<class T, class M, class Expr> \
inline \
typename std::enable_if< \
details::is_field_expr_affine_homogeneous<Expr>::value, \
field_basic<T,M>& \
>::type \
operator OP (field_basic<T,M>& uh, const Expr& expr) \
{ \
space_basic<T,M> Xh; \
check_macro (expr.have_homogeneous_space (Xh), \
"field [domain] " << #OP << " expr; expr should have homogeneous space. " \
<< "HINT: use field [domain] " << #OP << " interpolate(Xh, expr)"); \
check_macro (uh.get_space().name() == Xh.name(), "field " << #OP << " field_expression : incompatible spaces " \
<< uh.get_space().name() << " and " << Xh.name()); \
details::assign_with_operator (uh.begin_dof(), uh.end_dof(), expr.begin_dof(), FUNCTOR()); \
return uh; \
}

Definition at line 98 of file field_expr.h.

◆ _RHEOLEF_field_expr_v2_op_assign_auxil

#define _RHEOLEF_field_expr_v2_op_assign_auxil ( OP,
FUNCTOR,
NAME,
IDX )
Value:
template<class FieldWdof, class FieldRdof> \
inline \
typename std::enable_if< \
details::is_field_expr_affine_homogeneous<FieldRdof>::value, \
NAME<FieldWdof>& \
>::type \
operator OP (NAME<FieldWdof>&& uh, const FieldRdof& expr) \
{ \
using space_type = typename FieldWdof::space_type; \
space_type Xh; \
check_macro (expr.have_homogeneous_space (Xh), \
"field [" << #IDX << "] " << #OP << " expr; expr should have homogeneous space. " \
<< "HINT: use field [" << #IDX << "] " << #OP << " interpolate(Xh, expr)"); \
check_macro (uh.get_space().name() == Xh.name(), "field [" << #IDX << "] " << #OP << " field_expression : incompatible spaces " \
<< uh.get_space().name() << " and " << Xh.name()); \
details::assign_with_operator (uh.begin_dof(), uh.end_dof(), expr.begin_dof(), FUNCTOR()); \
return uh; \
}

Definition at line 117 of file field_expr.h.

◆ _RHEOLEF_field_expr_v2_op_assign

#define _RHEOLEF_field_expr_v2_op_assign ( OP,
FUNCTOR )
Value:
_RHEOLEF_field_expr_v2_op_assign_auxil(OP, FUNCTOR, details::field_wdof_sliced, "i_comp") \
_RHEOLEF_field_expr_v2_op_assign_auxil(OP, FUNCTOR, details::field_wdof_indirect, "domain")
#define _RHEOLEF_field_expr_v2_op_assign_field(OP, FUNCTOR)
Definition field_expr.h:98

Definition at line 137 of file field_expr.h.

◆ _RHEOLEF_field_expr_v2_op_assign_constant_field

#define _RHEOLEF_field_expr_v2_op_assign_constant_field ( OP,
FUNCTOR )
Value:
template<class T, class M, class Expr> \
inline \
typename std::enable_if< \
details::is_field_expr_v2_constant<Expr>::value \
,field_basic<T,M>& \
>::type \
operator OP (field_basic<T,M>& uh, const Expr& expr) \
{ \
details::assign_with_operator (uh.begin_dof(), uh.end_dof(), details::iterator_on_constant<Expr>(expr), FUNCTOR()); \
return uh; \
}

Definition at line 151 of file field_expr.h.

◆ _RHEOLEF_field_expr_v2_op_assign_constant_auxil

#define _RHEOLEF_field_expr_v2_op_assign_constant_auxil ( OP,
FUNCTOR,
NAME,
IDX )
Value:
template<class FieldWdof, class Expr> \
inline \
typename std::enable_if< \
details::is_field_expr_v2_constant<Expr>::value \
,NAME<FieldWdof>& \
>::type \
operator OP (NAME<FieldWdof>&& uh, const Expr& expr) \
{ \
details::assign_with_operator (uh.begin_dof(), uh.end_dof(), details::iterator_on_constant<Expr>(expr), FUNCTOR()); \
return uh; \
}

Definition at line 164 of file field_expr.h.

◆ _RHEOLEF_field_expr_v2_op_assign_constant

#define _RHEOLEF_field_expr_v2_op_assign_constant ( OP,
FUNCTOR )
Value:
_RHEOLEF_field_expr_v2_op_assign_constant_auxil(OP, FUNCTOR, details::field_wdof_sliced, "i_comp") \
_RHEOLEF_field_expr_v2_op_assign_constant_auxil(OP, FUNCTOR, details::field_wdof_indirect, "domain")
#define _RHEOLEF_field_expr_v2_op_assign_constant_field(OP, FUNCTOR)
Definition field_expr.h:151

Definition at line 177 of file field_expr.h.

Typedef Documentation

◆ T

typedef Expr1::float_type T

Definition at line 230 of file field_expr.h.

Function Documentation

◆ check_macro() [1/3]

check_macro ( expr1. have_homogeneous_spaceXh1,
"dual(expr1,expr2); expr1 should have homogeneous space. HINT: use dual(interpolate(Xh, expr1),expr2)"  )

◆ check_macro() [2/3]

check_macro ( expr2. have_homogeneous_spaceXh2,
"dual(expr1,expr2); expr2 should have homogeneous space. HINT: use dual(expr1,interpolate(Xh, expr2))"  )

◆ check_macro() [3/3]

check_macro ( Xh1. name() = =Xh2.name(),
"dual(expr1,expr2); incompatible \""<< Xh1.name()<<"\" and \""<< Xh2.name()<<" spaces for expr1 and expr2"  )

◆ dis_inner_product()

return dis_inner_product ( expr1. begin_dof(),
expr2. begin_dof(),
Xh1. ndof(),
Xh1. ownership).comm(,
M()  )

Variable Documentation

◆ Xh1

◆ Xh2

space_basic<T,M> Xh2

Definition at line 232 of file field_expr.h.