Feel++ 0.111.0-preview.14
Finite Element Embedded Library in C++
Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont > Class Template Reference
+ Inheritance diagram for Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >:
+ Collaboration diagram for Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >:

Classes

struct  AddOffContainer
 useful in // with composite case store the off views More...
 
struct  ChangeElement
 
struct  sub_element
 

Public Types

typedef mpl::transform< bases_list, AddOffContainer< mpl::_1 >, mpl::back_inserter< fusion::vector<> > >::type container_vector_type
 
typedef Cont ct_type
 
typedef Eigen::Matrix< value_type, Eigen::Dynamic, 1 > eigen_type
 
typedef mpl::transform< bases_list, rangeElementStorageType, ChangeElement< mpl::_1, mpl::_2 >, mpl::back_inserter< fusion::vector<> > >::type element_vector_type
 
typedef std::shared_ptr< functionspace_type > functionspace_ptrtype
 
using functionspace_type = FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >
 
using index_type = typename mesh_type::index_type
 
using mesh_ptrtype = typename functionspace_type::mesh_ptrtype
 
using mesh_type = typename functionspace_type::mesh_type
 
typedef mpl::range_c< int, 0, functionspace_type::nSpaces > rangeElementStorageType
 
typedef Eigen::Matrix< value_type, Eigen::Dynamic, Eigen::Dynamic > tensor_evaluation_type
 Matrix type returned by semantic tensor-field evaluation helpers.
 
typedef TT value_type
 

Public Member Functions

template<int i, typename ExprT >
FunctionSpace< A0, A1, A2, A3, A4 >::template Element< Y, Cont >::template sub_element< i >::type & element (ExprT e, std::string const &name, bool updateOffViews, typename std::enable_if< std::is_base_of< ExprBase, ExprT >::value >::type *)
 
template<int i>
FunctionSpace< A0, A1, A2, A3, A4 >::template Element< Y, Cont >::template sub_element< i >::type elementImpl (std::string const &name, bool updateOffViews)
 
template<typename IteratorType , typename ExprType >
void onImpl (std::pair< IteratorType, IteratorType > const &r, ExprType const &ex, std::string const &prefix, GeomapStrategyType geomap_strategy, bool accumulate, bool verbose, mpl::int_< MESH_EDGES >)
 
template<typename IteratorType , typename ExprType >
void onImpl (std::pair< IteratorType, IteratorType > const &r, ExprType const &ex, std::string const &prefix, GeomapStrategyType geomap_strategy, bool accumulate, bool verbose, mpl::int_< MESH_ELEMENTS >)
 
template<typename IteratorType , typename ExprType >
void onImpl (std::pair< IteratorType, IteratorType > const &r, ExprType const &ex, std::string const &prefix, GeomapStrategyType geomap_strategy, bool accumulate, bool verbose, mpl::int_< MESH_FACES >)
 
template<typename IteratorType , typename ExprType >
void onImpl (std::pair< IteratorType, IteratorType > const &r, ExprType const &ex, std::string const &prefix, GeomapStrategyType geomap_strategy, bool accumulate, bool verbose, mpl::int_< MESH_FACES >, mpl::false_)
 
template<typename IteratorType , typename ExprType >
void onImpl (std::pair< IteratorType, IteratorType > const &r, ExprType const &ex, std::string const &prefix, GeomapStrategyType geomap_strategy, bool accumulate, bool verbose, mpl::int_< MESH_FACES >, mpl::true_)
 
template<typename IteratorType , typename ExprType >
void onImpl (std::pair< IteratorType, IteratorType > const &r, ExprType const &ex, std::string const &prefix, GeomapStrategyType geomap_strategy, bool accumulate, bool verbose, mpl::int_< MESH_POINTS >)
 
template<typename ContOtherType >
FunctionSpace< A0, A1, A2, A3, A4 >::template Element< Y, Cont > & operator= (Element< Y, ContOtherType > const &v)
 
template<typename VectorExpr >
FunctionSpace< A0, A1, A2, A3, A4 >::template Element< Y, Cont > & operator= (VectorExpr const &__v)
 
template<typename ContextType , typename EType >
requires EType
::is_vectorial void symmetricGradient (ContextType const &context, grad_array_type &v) const
 

Static Public Attributes

static constexpr bool is_composite = functionspace_type::is_composite
 
static constexpr bool is_continuous = functionspace_type::is_continuous
 
static constexpr bool is_hcurl_conforming = functionspace_type::is_hcurl_conforming
 
static constexpr bool is_hdiv_conforming = functionspace_type::is_hdiv_conforming
 
static constexpr bool is_mortar = functionspace_type::is_mortar
 
static constexpr bool is_scalar = functionspace_type::is_scalar
 
static constexpr bool is_tensor2 = functionspace_type::is_tensor2
 
static constexpr bool is_tensor2symm = functionspace_type::is_tensor2symm
 
static constexpr bool is_vectorial = functionspace_type::is_vectorial
 
static constexpr uint16_type nComponents = functionspace_type::nComponents
 
static constexpr uint16_type nComponents1 = functionspace_type::nComponents1
 
static constexpr uint16_type nComponents2 = functionspace_type::nComponents2
 
static constexpr uint16_type nDim = mesh_type::nDim
 
static constexpr uint16_type nRealComponents = functionspace_type::nRealComponents
 
static constexpr uint16_type nRealDim = mesh_type::nRealDim
 
static constexpr uint16_type nSpaces = functionspace_type::nSpaces
 
static constexpr int rank = functionspace_type::rank
 

Friends

class FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >
 

Typedefs

typedef ublas::type_traits< value_type >::real_type real_type
 
typedef T element_type
 
typedef Cont super
 
typedef Cont container_type
 
typedef container_type vector_temporary_type
 
using polyset_type = mp11::mp_if_c< is_composite, boost::none_t, typename basis_0_type::polyset_type >
 
using pc_type = mp11::mp_if_c< is_composite, boost::none_t, typename basis_0_type::PreCompute >
 
using pc_ptrtype = std::shared_ptr< pc_type >
 
typedef functionspace_type::return_type return_type
 
typedef matrix_node< value_type >::type matrix_node_type
 
using polynomial_view_type = mp11::mp_if_c< is_composite, boost::none_t, typename basis_0_type::polynomial_type >
 
using local_interpolant_type = mp11::mp_if_c< is_modal, boost::none_t, local_interpolant_t< basis_0_type > >
 
using local_interpolants_type = mp11::mp_if_c< is_modal, boost::none_t, local_interpolants_t< basis_0_type > >
 
typedef Element< T, Cont > this_type
 
using self_t = this_type
 
template<int i>
using sub_element_ptrtype = typename mpl::at_c< element_vector_type, i >::type::second_type
 
template<int i>
using sub_element_type = typename mpl::at_c< element_vector_type, i >::type::second_type::element_type
 
typedef functionspace_type::component_functionspace_type component_functionspace_type
 
typedef functionspace_type::component_functionspace_ptrtype component_functionspace_ptrtype
 
typedef component_functionspace_type::template Element< T, Cont > component_type
 
typedef mesh_type::element_type geoelement_type
 geometry typedef
 
typedef functionspace_type::gm_type gm_type
 
typedef std::shared_ptr< gm_type > gm_ptrtype
 
typedef gm_type::template Context< geoelement_type > gmc_type
 
typedef std::shared_ptr< gmc_type > gmc_ptrtype
 
typedef gm_type::precompute_ptrtype geopc_ptrtype
 
typedef gm_type::precompute_type geopc_type
 
using fe_type = typename functionspace_type::fe_type
 
template<size_type FECTX = DefaultCTX, size_type GEOCTX = DefaultCTX>
using fec_t = typename basis_0_type::template Context< FECTX, fe_type, gm_type, geoelement_type, GEOCTX >
 
template<size_type FECTX = DefaultCTX, size_type GEOCTX = DefaultCTX>
using fec_ptr_t = std::shared_ptr< fec_t< FECTX, GEOCTX > >
 
static constexpr size_type DefaultCTX = (is_hdiv_conforming?vm::POINT|vm::JACOBIAN:(is_hcurl_conforming?vm::POINT|vm::KB:vm::POINT))
 

Operator overloads

using p0dh_t = FunctionSpace< mesh_type, bases< Lagrange< 0, Scalar, Discontinuous > > >
 
using p0dh_element_t = typename FunctionSpace< mesh_type, bases< Lagrange< 0, Scalar, Discontinuous > > >::template Element< value_type >
 
self_t operator+ (value_type f_, self_t const &e_)
 
self_t operator- (value_type f_, self_t const &e_)
 
self_t operator* (value_type f_, self_t const &e_)
 
Element & operator= (Element &&__e)
 
Element & operator= (Element const &__e)
 
template<typename ContOtherType >
Element & operator= (Element< TT, ContOtherType > const &v)
 
template<typename VectorExpr >
Element & operator= (VectorExpr const &v)
 
super const & container () const
 
super & container ()
 
value_type globalValue (size_type i) const
 
template<ComponentType THECOMP>
component_type comp ()
 get the component of the element More...
 
component_type comp (ComponentType i, ComponentType j=ComponentType::NO_COMPONENT) const
 get the component of the element const version More...
 
component_type comp (ComponentType i, ComponentType j=ComponentType::NO_COMPONENT)
 
component_type tensorComponent (ComponentType i, ComponentType j) const
 Extract a tensor component using explicit tensor semantics. More...
 
component_type tensorComponent (ComponentType i, ComponentType j)
 Extract a mutable tensor component using explicit tensor semantics. More...
 
component_type operator[] (ComponentType i)
 
component_type operator[] (ComponentType i) const
 
value_type & operator[] (index_type i)
 
value_type operator[] (index_type i) const
 
value_type localToGlobal (index_type e, index_type l, int c) const
 
Element & operator+= (Element const &_e)
 
template<typename elt_t = p0dh_element_t>
requires (!std::is_same_v<elt_t, this_type>)
Element & plusAssign (elt_t const &_e, const value_type sign=1.)
 
template<typename elt_t = p0dh_element_t>
requires (!std::is_same_v<elt_t, this_type>)
Element & operator+= (elt_t const &_e)
 
template<typename elt_t = p0dh_element_t>
requires (!std::is_same_v<elt_t, this_type>)
Element & operator-= (elt_t const &_e)
 
Element & operator-= (Element const &_e)
 
Element operator- () const
 
self_t operator+ (value_type f) const
 
self_t operator- (value_type f) const
 
self_t operator* (value_type f_) const
 
void operator() (MESH_CHANGES mesh_changes)
 update element when mesh has been changed
 
template<typename AE >
container_type & assign (const ublas::vector_expression< AE > &ae)
 
void assign (index_type ie, uint16_type il, uint16_type c, value_type const &__v)
 
void plus_assign (index_type ie, uint16_type il, uint16_type c, value_type const &__v)
 
local_interpolant_type element (std::vector< index_type > const &e) const
 
template<typename B = basis_0_type>
requires (!B::is_modal)
void element (std::vector< index_type > const &e, Eigen::Ref< local_interpolant_t< B > > l) const
 
template<typename B = basis_0_type>
requires (!B::is_modal)
void element (std::vector< index_type > const &e, local_interpolant_type &l) const
 
std::vector< int > dofs (std::vector< index_type > const &e) const
 
std::vector< int > dofs (std::vector< index_type > const &e, DataMap< size_type > const &dm, int block) const
 
template<typename Tloc >
void assignE (index_type e, Tloc &&loc, bool symm=true)
 
void assign (index_type e, local_interpolant_type const &Ihloc)
 
void plus_assign (index_type e, local_interpolant_type const &Ihloc)
 
void assign (geoelement_type const &e, local_interpolant_type const &Ihloc)
 
template<typename EltType >
void assign (EltType const &e, local_interpolant_type const &Ihloc, typename std::enable_if< is_3d_real< EltType >::value &&is_edge< EltType >::value >::type *=nullptr)
 
template<typename EltType >
void assign (EltType const &e, local_interpolant_type const &Ihloc, std::pair< index_type, uint16_type > const &eltsInfo, typename std::enable_if< is_3d_real< EltType >::value &&is_edge< EltType >::value >::type *=nullptr)
 
void assign (geopoint_type const &p, local_interpolant_type const &Ihloc)
 
void assign (geopoint_type const &p, local_interpolant_type const &Ihloc, std::pair< index_type, uint16_type > const &eltsInfo)
 
void assign (geoface_type const &e, uint16_type faceConnectionId, local_interpolant_type const &Ihloc)
 
void plus_assign (geoelement_type const &e, local_interpolant_type const &Ihloc)
 
void plus_assign (geoface_type const &e, uint16_type faceConnectionId, local_interpolant_type const &Ihloc)
 
template<typename EltType >
void plus_assign (EltType const &e, local_interpolant_type const &Ihloc, typename std::enable_if< is_3d_real< EltType >::value &&is_edge< EltType >::value >::type *=nullptr)
 
template<typename EltType >
void plus_assign (EltType const &e, local_interpolant_type const &Ihloc, std::pair< index_type, uint16_type > const &eltsInfo, typename std::enable_if< is_3d_real< EltType >::value &&is_edge< EltType >::value >::type *=nullptr)
 
void plus_assign (geopoint_type const &p, local_interpolant_type const &Ihloc)
 
void plus_assign (geopoint_type const &p, local_interpolant_type const &Ihloc, std::pair< index_type, uint16_type > const &eltsInfo)
 

Accessors

typedef boost::multi_array< value_type, 3 > array_type
 
typedef Eigen::TensorFixedSize< value_type, Eigen::Sizes< nComponents1, nComponents2 > > _id_type
 
typedef Eigen::TensorFixedSize< value_type, Eigen::Sizes< nComponents1, nRealDim > > _grad_type
 
typedef Eigen::TensorFixedSize< value_type, Eigen::Sizes< nComponents1, nComponents2 > > _dn_type
 
typedef Eigen::TensorFixedSize< value_type, Eigen::Sizes< nRealDim, nRealDim > > _hess_type
 
typedef Eigen::TensorFixedSize< value_type, Eigen::Sizes< nComponents2, 1 > > _div_type
 
typedef Eigen::TensorFixedSize< value_type, Eigen::Sizes<(nRealDim==3)?nRealDim:1, 1 > > _curl_type
 
typedef boost::multi_array< _id_type, 1 > id_array_type
 
typedef boost::multi_array< _grad_type, 1 > grad_array_type
 
typedef boost::multi_array< _dn_type, 1 > dn_array_type
 
typedef boost::multi_array< _hess_type, 1 > hess_array_type
 
typedef boost::multi_array< _div_type, 1 > div_array_type
 
typedef boost::multi_array< _curl_type, 1 > curl_array_type
 
typedef boost::multi_array< _div_type, 1 > comp_curl_array_type
 
using id_type = Feel::detail::ID< value_type, nComponents1, nComponents2 >
 Interpolation at a set of points. More...
 
using laplacian_type = id_type
 
typedef Feel::detail::DD< value_type, nComponents1, nRealDim > grad_type
 gradient interpolation tool
 
typedef Feel::detail::D< value_type, 0, nComponents1, 1 > dx_type
 
typedef Feel::detail::D< value_type, 1, nComponents1, 1 > dy_type
 
typedef Feel::detail::D< value_type, 2, nComponents1, 1 > dz_type
 
typedef Feel::detail::Div< value_type, nComponents2 > div_type
 
typedef Feel::detail::Curl< value_type,-1, nRealDim > curl_type
 
typedef Feel::detail::Curl< value_type, 0, 1 > curlx_type
 
typedef Feel::detail::Curl< value_type, 1, 1 > curly_type
 
typedef Feel::detail::Curl< value_type, 2, 1 > curlz_type
 
typedef Feel::detail::H< value_type, nRealDim, nRealDim > hess_type
 
mesh_ptrtype mesh ()
 
mesh_ptrtype mesh () const
 
dof_ptrtype dof () const
 
Element< T, Cont > sqrt () const
 
Element< T, Cont > pow (int n) const
 
template<typename p0_space_type >
p0_space_type::element_type extremeValue (std::shared_ptr< p0_space_type > const &P0h, std::string const &extreme)
 
value_type max () const override
 
value_type max (bool parallel) const
 
template<typename p0_space_type >
p0_space_type::element_type max (std::shared_ptr< p0_space_type > const &P0h)
 
value_type min () const override
 
value_type min (bool parallel) const
 
template<typename p0_space_type >
p0_space_type::element_type min (std::shared_ptr< p0_space_type > const &P0h)
 
template<typename ... CTX>
basis_context_ptrtype selectContext (CTX const &... ctx) const
 
template<typename ContextType >
boost::array< typename array_type::index, 1 > idExtents (ContextType const &context) const
 
template<typename Context_t >
id_type id (Context_t const &context) const
 
template<typename Context_t >
void id_ (Context_t const &context, id_array_type &v) const
 interpolate the function at a set of points(defined in the reference element) in an element. More...
 
template<typename Context_t >
void id (Context_t const &context, id_array_type &v) const
 
Eigen::Matrix< value_type, Eigen::Dynamic, 1 > evaluate (functionspace_type::Context const &context, bool do_communications=true) const
 
tensor_evaluation_type evaluateSymmetric (functionspace_type::Context const &context, SymmetricTensorFormat const &format=SymmetricTensorFormat{}, bool do_communications=true) const
 Evaluate a symmetric tensor field in an explicit tensor format. More...
 
tensor_evaluation_type evaluateSymmetricStorage (functionspace_type::Context const &context, bool do_communications=true) const
 Evaluate a symmetric tensor field in legacy compact storage order. More...
 
tensor_evaluation_type evaluateTensor (functionspace_type::Context const &context, bool do_communications=true) const
 Evaluate a tensor field as full row-major matrix components. More...
 
value_type evaluate (functionspace_type::Context const &context, int i, bool do_communications=true) const
 
void idInterpolate (matrix_node_type __ptsReal, id_array_type &v, bool conformalEval, matrix_node_type const &setPointsConf) const
 
template<typename Context_t >
matrix_node_type ptsInContext (Context_t const &context, mpl::int_< 1 >) const
 
template<typename Context_t >
matrix_node_type ptsInContext (Context_t const &context, mpl::int_< 2 >) const
 
gmc_ptrtype geomapPtr (geoelement_type const &elt) const
 
pc_ptrtype pcPtr (geoelement_type const &elt) const
 
id_type operator() (Eigen::Matrix< value_type, nDim, 1 > const &__x, bool extrapolate=false, bool parallel=true) const
 
id_type operator() (node_type const &__x, bool extrapolate=false, bool parallel=true) const
 interpolate the function at node (real coordinate) x More...
 
template<typename ContextType >
boost::array< typename array_type::index, 1 > gradExtents (ContextType const &context) const
 
template<typename ContextType >
grad_type grad (ContextType const &context) const
 
template<typename ElementType >
void grad (ElementType const &elt, grad_array_type &v) const
 
template<typename ContextType >
void grad_ (ContextType const &context, grad_array_type &v) const
 interpolate the function derivative in the first component at a set of points(defined in the reference element) in an element. More...
 
template<typename ContextType , typename EType = this_type>
requires EType
::is_vectorial void symmetricGradient (ContextType const &context, grad_array_type &v) const
 compute Symmetric Gradient only in the vectorial case
 
void gradInterpolate (matrix_node_type __ptsReal, grad_array_type &v, bool conformalEval, matrix_node_type const &setPointsConf) const
 
grad_type grad (node_type const &__x) const
 interpolate the gradient of the function at node (real coordinate) x More...
 
template<typename ContextType >
dx_type dx (ContextType const &context) const
 
template<typename ContextType >
dy_type dy (ContextType const &context) const
 
template<typename ContextType >
dz_type dz (ContextType const &context) const
 
template<typename ContextType >
boost::array< typename array_type::index, 1 > dxExtents (ContextType const &context) const
 
template<typename ContextType >
boost::array< typename array_type::index, 1 > dyExtents (ContextType const &context) const
 
template<typename ContextType >
boost::array< typename array_type::index, 1 > dzExtents (ContextType const &context) const
 
template<typename ContextType >
boost::array< typename array_type::index, 1 > dExtents (ContextType const &context) const
 
template<typename ContextType >
void d_ (int N, ContextType const &context, id_array_type &v) const
 
template<typename ContextType >
void dx (ContextType const &context, id_array_type &v) const
 
template<typename ContextType >
void dy (ContextType const &context, id_array_type &v) const
 
template<typename ContextType >
void dz (ContextType const &context, id_array_type &v) const
 
void dxInterpolate (matrix_node_type __ptsReal, id_array_type &v, bool conformalEval, matrix_node_type const &setPointsConf) const
 
void dyInterpolate (matrix_node_type __ptsReal, id_array_type &v, bool conformalEval, matrix_node_type const &setPointsConf) const
 
void dzInterpolate (matrix_node_type __ptsReal, id_array_type &v, bool conformalEval, matrix_node_type const &setPointsConf) const
 
template<typename ContextType >
boost::array< typename array_type::index, 1 > dnExtents (ContextType const &context) const
 
template<typename ContextType >
void dn (ContextType const &context, dn_array_type &v) const
 
template<typename ContextType >
void dn_ (ContextType const &context, dn_array_type &v) const
 
void dnInterpolate (matrix_node_type __ptsReal, dn_array_type &v, bool conformalEval, matrix_node_type const &setPointsConf) const
 
template<typename ContextType >
boost::array< typename array_type::index, 1 > divExtents (ContextType const &context) const
 
template<typename ContextType >
div_type div (ContextType const &context) const
 
template<typename ContextType >
void div (ContextType const &context, div_array_type &v) const
 
template<typename ContextType >
void div_ (ContextType const &context, div_array_type &v) const
 
void divInterpolate (matrix_node_type __ptsReal, div_array_type &v, bool conformalEval, matrix_node_type const &setPointsConf) const
 
template<typename ContextType >
curl_type curl (ContextType const &context) const
 
template<typename ContextType >
curlx_type curlx (ContextType const &context) const
 
template<typename ContextType >
curly_type curly (ContextType const &context) const
 
template<typename ContextType >
curlz_type curlz (ContextType const &context) const
 
template<typename ContextType >
boost::array< typename array_type::index, 1 > curlExtents (ContextType const &context) const
 
template<typename ContextType >
void curl (ContextType const &context, curl_array_type &v) const
 
void curlInterpolate (matrix_node_type __ptsReal, curl_array_type &v, bool conformalEval, matrix_node_type const &setPointsConf) const
 
template<typename ContextType >
void curl_ (ContextType const &context, curl_array_type &v) const
 
template<typename ContextType >
void curl_ (ContextType const &context, comp_curl_array_type &v, int comp) const
 
template<typename ContextType >
boost::array< typename array_type::index, 1 > curlxExtents (ContextType const &context) const
 
template<typename ContextType >
boost::array< typename array_type::index, 1 > curlyExtents (ContextType const &context) const
 
template<typename ContextType >
boost::array< typename array_type::index, 1 > curlzExtents (ContextType const &context) const
 
template<typename ContextType >
void curlx (ContextType const &context, comp_curl_array_type &v) const
 
template<typename ContextType >
void curly (ContextType const &context, comp_curl_array_type &v) const
 
template<typename ContextType >
void curlz (ContextType const &context, comp_curl_array_type &v) const
 
void curlxInterpolate (matrix_node_type __ptsReal, comp_curl_array_type &v, bool conformalEval, matrix_node_type const &setPointsConf) const
 
void curlyInterpolate (matrix_node_type __ptsReal, comp_curl_array_type &v, bool conformalEval, matrix_node_type const &setPointsConf) const
 
void curlzInterpolate (matrix_node_type __ptsReal, comp_curl_array_type &v, bool conformalEval, matrix_node_type const &setPointsConf) const
 
template<typename ContextType >
boost::array< typename array_type::index, 1 > hessExtents (ContextType const &context) const
 
template<typename ContextType >
void hess_ (ContextType const &context, hess_array_type &v) const
 interpolate the function second order derivatives at a set of points(defined in the reference element) in an element. More...
 
template<typename ContextType >
void hess_ (ContextType const &context, hess_array_type &v, mpl::int_< 0 >) const
 
void hessInterpolate (matrix_node_type __ptsReal, hess_array_type &v, bool conformalEval, matrix_node_type const &setPointsConf) const
 
template<typename ContextType >
hess_type hess (ContextType const &context) const
 
template<typename ContextType >
void hess (ContextType const &context, hess_array_type &v) const
 
template<typename ElementType >
void hess (ElementType const &elt, hess_array_type &v)
 
template<typename ContextType >
boost::array< typename array_type::index, 1 > laplacianExtents (ContextType const &context) const
 
template<typename ContextType >
void laplacian_ (ContextType const &context, id_array_type &v) const
 
template<typename ContextType >
void laplacian_ (ContextType const &context, id_array_type &v, mpl::int_< 0 >) const
 
template<typename ContextType >
void laplacian_ (ContextType const &context, id_array_type &v, mpl::int_< 1 >) const
 
void laplacianInterpolate (matrix_node_type __ptsReal, id_array_type &v, bool conformalEval, matrix_node_type const &setPointsConf) const
 
template<typename ContextType >
laplacian_type laplacian (ContextType const &context) const
 
template<typename ContextType >
void laplacian (ContextType const &context, id_array_type &v) const
 
template<typename ElementType >
void laplacian (ElementType const &elt, id_array_type &v)
 
functionspace_ptrtype const & functionSpace () const
 
functionspace_vector_type const & functionSpaces () const
 get the FunctionSpace vector
 
template<int i>
mpl::at_c< functionspace_vector_type, i >::type functionSpace () const
 get the i -th FunctionSpace out the list
 
template<typename BackendType >
BackendType::vector_ptrtype extractValuesWithMarker (std::string const &m, std::shared_ptr< BackendType > backend)
 
template<typename BackendType >
BackendType::vector_ptrtype extractValuesWithoutMarker (std::string const &m, std::shared_ptr< BackendType > backend)
 
template<int i>
sub_element< i >::type elementImpl (std::string const &name="u", bool updateOffViews=true)
 
template<int i, typename ExprT >
sub_element< i >::type & element (ExprT e, std::string const &name="u", bool updateOffViews=true, typename std::enable_if< std::is_base_of< ExprBase, ExprT >::value >::type *=0)
 
template<int i>
sub_element< i >::type & element (std::string const &name="u", bool updateOffViews=true)
 
template<int i>
sub_element< i >::type const & element (std::string const &name="u", bool updateOffViews=true) const
 
template<int i>
sub_element< i >::ptrtype & elementPtr ()
 
template<int i>
sub_element< i >::ptrtype const & elementPtr () const
 
component_functionspace_ptrtype const & compSpace () const
 
worldscomm_ptr_t const & worldsComm () const
 subWorlds : vector of WorldComm ( >1 if composite)
 
WorldComm & worldComm ()
 world communicator
 
WorldComm const & worldComm () const
 world communicator
 
size_type nDof () const
 
size_type nLocalDof () const
 
size_type nDofPerComponent () const
 
std::string const & name () const
 
std::string const & description () const
 
size_type start () const
 
bool isAComponent () const
 
ComponentType component () const
 
std::string componentToString (ComponentType ct) const
 

Mutators

class boost::serialization::access
 
void setName (std::string const &__name)
 set the name of the field More...
 
void seDescription (std::string const &__desc)
 set the description of the field (e.g. More...
 
void setFunctionSpace (functionspace_ptrtype space)
 
template<typename ... Ts>
void save (Ts &&... v) const
 
void saveImpl (std::string const &path, std::string const &name, std::string const &type="binary", std::string const &suffix="", std::string const &sep="") const
 save function space element in file More...
 
template<typename ... Ts>
bool load (Ts &&... v)
 
bool loadImpl (std::string const &path, std::string const &name, std::string const &type="binary", std::string const &suffix="", std::string const &sep="", std::string const &space_path="")
 load function space element from file More...
 
void printMatlab (std::string fname, bool gmsh=false) const override
 
void printMatlab (std::string fname, functionspace_type::Context const &context, SymmetricTensorFormat const &format=SymmetricTensorFormat{}, bool do_communications=true, std::string const &variableName="tensor_components") const
 Print evaluated symmetric tensor components to a self-describing Matlab file. More...
 
p0dh_element_t ewiseMean (std::shared_ptr< p0dh_t > &P0dh) const
 compute the element wise mean value of an element
 
template<typename ... Ts>
void on (Ts &&... v)
 
template<typename ... Ts>
void plus (Ts &&... v)
 
void setBackingGuard (std::shared_ptr< void > guard)
 
template<typename RangeType , typename ExprType >
FEELPP_NO_EXPORT void onImpl (RangeType const &r, ExprType const &e, std::string const &prefix, GeomapStrategyType geomap_strategy, bool accumulate=true, bool verbose=false)
 

Constructors, destructor

 Element ()
 
 Element (Element &&)=default
 
 Element (Element const &__e)
 
 Element (functionspace_ptrtype const &__functionspace, std::string const &__name, std::string const &__desc, size_type __start=0, ComponentType __ct=ComponentType::NO_COMPONENT)
 
 Element (functionspace_ptrtype const &__functionspace, std::string const &__name="unknown", size_type __start=0, ComponentType __ct=ComponentType::NO_COMPONENT)
 
 Element (functionspace_ptrtype const &__functionspace, container_type const &__c, std::string const &__name, std::string const &__desc, size_type __start=0, ComponentType __ct=ComponentType::NO_COMPONENT, ComponentType __ct2=ComponentType::NO_COMPONENT)
 
 Element (functionspace_ptrtype const &__functionspace, container_type const &__c, std::string const &__name="unknown", size_type __start=0, ComponentType __ct=ComponentType::NO_COMPONENT, ComponentType __ct2=ComponentType::NO_COMPONENT)
 
 Element (functionspace_ptrtype const &__functionspace, size_type nActiveDof, value_type *arrayActiveDof, size_type nGhostDof, value_type *arrayGhostDof)
 
 ~Element () override
 
void initFromSpace (functionspace_ptrtype const &__functionspace, container_type const &__c)
 

Member Typedef Documentation

◆ id_type

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
using Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::id_type = Feel::detail::ID<value_type,nComponents1,nComponents2>

Interpolation at a set of points.

data structure that stores the interpolated values of the element at a set of points

Member Function Documentation

◆ comp() [1/2]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
template<ComponentType THECOMP>
component_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::comp ( )

get the component of the element

Returns
the THECOMP-th component of the element

Referenced by Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::tensorComponent().

◆ comp() [2/2]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
component_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::comp ( ComponentType  i,
ComponentType  j = ComponentType::NO_COMPONENT 
) const

get the component of the element const version

Parameters
icomponent id
Returns
the i-th component of the element

◆ compSpace()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
component_functionspace_ptrtype const & Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::compSpace ( ) const
Returns
the finite element space associated with the n-th component

◆ container() [1/2]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
super & Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::container ( )
Returns
the container read-write

◆ container() [2/2]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
super const & Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::container ( ) const
Returns
the container read-only

◆ description()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
std::string const & Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::description ( ) const
Returns
the description of the element

◆ dof()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
dof_ptrtype Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::dof ( ) const
Returns
the dof table

◆ element() [1/2]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
template<typename B = basis_0_type>
requires (!B::is_modal)
void Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::element ( std::vector< index_type > const &  e,
Eigen::Ref< local_interpolant_t< B > >  l 
) const
Returns
the components of the element associated to the list of elements in e
Note
the vector of components is already allocated
Xh->element( K, EigenVector )

◆ element() [2/2]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
template<typename B = basis_0_type>
requires (!B::is_modal)
void Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::element ( std::vector< index_type > const &  e,
local_interpolant_type &  l 
) const
Returns
the components of the element associated to the list of elements in e
Note
the vector of components is already allocated

◆ evaluateSymmetric()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
tensor_evaluation_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::evaluateSymmetric ( functionspace_type::Context const &  context,
SymmetricTensorFormat const &  format = SymmetricTensorFormat{},
bool  do_communications = true 
) const

Evaluate a symmetric tensor field in an explicit tensor format.

The returned matrix is point-major: rows correspond to context points and columns correspond to the slots of format.order. Compact orders have 3 columns in 2D and 6 columns in 3D. Tensor-six exporter orders always have 6 columns; unused 2D z-components are zero-filled.

Parameters
contextEvaluation context containing the points to evaluate.
formatOutput order and off-diagonal scaling convention.
do_communicationsIf true, collect point values across ranks.
Returns
Matrix with shape context.nPoints() x symmetricTensorComponentCount(nComponents1, format).

◆ evaluateSymmetricStorage()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
tensor_evaluation_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::evaluateSymmetricStorage ( functionspace_type::Context const &  context,
bool  do_communications = true 
) const

Evaluate a symmetric tensor field in legacy compact storage order.

This is a named convenience wrapper for evaluateSymmetric() using storage order and unscaled tensor components. The result is point-major with 3 columns in 2D (xx,xy,yy) and 6 columns in 3D (xx,xy,xz,yy,yz,zz).

Parameters
contextEvaluation context containing the points to evaluate.
do_communicationsIf true, collect point values across ranks.
Returns
Matrix with shape context.nPoints() x symmetricTensorStorageComponentCount(nComponents1).

◆ evaluateTensor()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
tensor_evaluation_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::evaluateTensor ( functionspace_type::Context const &  context,
bool  do_communications = true 
) const

Evaluate a tensor field as full row-major matrix components.

The returned matrix is point-major. Each row contains the full tensor values for one context point, ordered as i*nComponents2 + j. For tensor2-symmetric fields both triangular entries are populated through the symmetric component aliasing used by tensorComponent(i,j).

Parameters
contextEvaluation context containing the points to evaluate.
do_communicationsIf true, collect point values across ranks.
Returns
Matrix with shape context.nPoints() x (nComponents1*nComponents2).

References Feel::vf::evaluate().

◆ functionSpace()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
functionspace_ptrtype const & Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::functionSpace ( ) const
Returns
the finite element space

◆ geomapPtr()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
gmc_ptrtype Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::geomapPtr ( geoelement_type const &  elt) const
Returns
a geometric mapping context associated with the element
Todo:
should be in the element of the mesh

◆ grad()

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename Y , typename Cont >
FunctionSpace< A0, A1, A2, A3, A4 >::template Element< Y, Cont >::grad_type Feel::FunctionSpace< A0, A1, A2, A3, A4 >::Element< Y, Cont >::grad ( node_type const &  __x) const

interpolate the gradient of the function at node (real coordinate) x

Returns
the interpolated value of the gradient function at the real point x

◆ grad_()

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename Y , typename Cont >
template<typename ContextType >
void Feel::FunctionSpace< A0, A1, A2, A3, A4 >::Element< Y, Cont >::grad_ ( ContextType const &  context,
grad_array_type &  v 
) const

interpolate the function derivative in the first component at a set of points(defined in the reference element) in an element.

Warning
this operation assumes that the interpolation is done on the mesh associated with the discretization space
Todo:
handle the case where the mesh/element is not the same as the one associated with the discretization space.
Todo:
need to introduce the geometric transformation to incorporate the pseudo-inverse of the jacobian for the derivative

◆ hess_()

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename Y , typename Cont >
template<typename ContextType >
void Feel::FunctionSpace< A0, A1, A2, A3, A4 >::Element< Y, Cont >::hess_ ( ContextType const &  context,
hess_array_type &  v 
) const

interpolate the function second order derivatives at a set of points(defined in the reference element) in an element.

Warning
this operation assumes that the interpolation is done on the mesh associated with the discretization space
Todo:
handle the case where the mesh/element is not the same as the one associated with the discretization space.
Todo:
need to introduce the geometric transformation to incorporate the pseudo-inverse of the jacobian for the derivative

◆ id_()

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename Y , typename Cont >
template<typename Context_t >
void Feel::FunctionSpace< A0, A1, A2, A3, A4 >::Element< Y, Cont >::id_ ( Context_t const &  context,
id_array_type &  v 
) const

interpolate the function at a set of points(defined in the reference element) in an element.

Warning
this operation assumes that the interpolation is done on the mesh associated with the discretization space
Todo:
handle the case where the mesh/element is not the same as the one associated with the discretization space.

◆ idExtents()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
template<typename ContextType >
boost::array< typename array_type::index, 1 > Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::idExtents ( ContextType const &  context) const
Returns
the extents of the interpolation of the function at a set of points

◆ loadImpl()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
bool Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::loadImpl ( std::string const &  path,
std::string const &  name,
std::string const &  type = "binary",
std::string const &  suffix = "",
std::string const &  sep = "",
std::string const &  space_path = "" 
)

load function space element from file

Parameters
pathpath to file
typefile type binary, ascii, hdf5, xml
suffixfilename suffix to use
sepseparator to use in filename
space_pathpath to space file related to input file path

◆ mesh() [1/2]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
mesh_ptrtype Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::mesh ( )
Returns
the mesh associated to the function

◆ mesh() [2/2]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
mesh_ptrtype Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::mesh ( ) const
Returns
the mesh associated to the function

◆ name()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
std::string const & Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::name ( ) const
Returns
the name of the element

◆ nDof()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
size_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::nDof ( ) const
Returns
the number of dof

◆ nDofPerComponent()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
size_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::nDofPerComponent ( ) const
Returns
the number of dof per component

◆ nLocalDof()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
size_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::nLocalDof ( ) const
Returns
the number of local dof (dof per processor)

◆ operator()()

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename Y , typename Cont >
FunctionSpace< A0, A1, A2, A3, A4 >::template Element< Y, Cont >::id_type Feel::FunctionSpace< A0, A1, A2, A3, A4 >::Element< Y, Cont >::operator() ( node_type const &  __x,
bool  extrapolate = false,
bool  parallel = true 
) const

interpolate the function at node (real coordinate) x

Returns
the interpolated value of the function at the real point x

◆ pcPtr()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
pc_ptrtype Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::pcPtr ( geoelement_type const &  elt) const
Returns
a precomputation of the basis functions
Warning
this seems quite buggy (where is it used?)

◆ pow()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
Element< T, Cont > Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::pow ( int  n) const
Returns
the element-wise power to n

◆ printMatlab()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
void Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::printMatlab ( std::string  fname,
functionspace_type::Context const &  context,
SymmetricTensorFormat const &  format = SymmetricTensorFormat{},
bool  do_communications = true,
std::string const &  variableName = "tensor_components" 
) const

Print evaluated symmetric tensor components to a self-describing Matlab file.

This context-based overload is available only on tensor2-symmetric fields. The existing printMatlab(fname, gmsh) overload remains a raw container dump. The generated Matlab file includes order, scaling, component labels, point-major metadata, and the evaluated tensor component matrix returned by evaluateSymmetric().

Parameters
fnameOutput filename. A .m extension is appended when absent.
contextEvaluation context containing the points to print.
formatOutput order and off-diagonal scaling convention.
do_communicationsIf true, collect point values across ranks.
variableNameMatlab variable prefix for metadata and values.
Exceptions
std::invalid_argumentif variableName is empty.
std::runtime_errorif the output file cannot be opened.

◆ saveImpl()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
void Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::saveImpl ( std::string const &  path,
std::string const &  name,
std::string const &  type = "binary",
std::string const &  suffix = "",
std::string const &  sep = "" 
) const

save function space element in file

Parameters
pathpath to files
typefile type binary, ascii, hdf5, xml
suffixfilename suffix to use
sepseparator to use in filenames

◆ seDescription()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
void Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::seDescription ( std::string const &  __desc)

set the description of the field (e.g.

a formula)

Parameters
__descdescription of the field

◆ setName()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
void Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::setName ( std::string const &  __name)

set the name of the field

Parameters
__namename of the field

◆ sqrt()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
Element< T, Cont > Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::sqrt ( ) const
Returns
the element-wise square root

◆ tensorComponent() [1/2]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
component_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::tensorComponent ( ComponentType  i,
ComponentType  j 
)

Extract a mutable tensor component using explicit tensor semantics.

This overload is only available on elements satisfying Tensor2FieldElement.

Parameters
iTensor row component.
jTensor column component.
Returns
Mutable scalar component element for entry (i,j).

◆ tensorComponent() [2/2]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = double, typename Cont = VectorUblas<TT>>
component_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::tensorComponent ( ComponentType  i,
ComponentType  j 
) const

Extract a tensor component using explicit tensor semantics.

This wrapper is equivalent to comp(i,j) for tensor fields, including symmetric aliasing for tensor2-symmetric spaces. It is only available on elements satisfying Tensor2FieldElement.

Parameters
iTensor row component.
jTensor column component.
Returns
Scalar component element for entry (i,j).

References Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::Element< TT, Cont >::comp().