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

Classes

class  Element
 

Public Types

using bases_list = BasisTypes
 
typedef Feel::detail::bases2< typename mpl::transform< bases_list, GetComponentBasis< mpl::_1 >, mpl::back_inserter< fusion::vector<> > >::type > component_basis_vector_type
 
typedef mpl::transform< bases_list, ChangeBasisToComponentBasis< mpl::_1 >, mpl::back_inserter< fusion::vector<> > >::type component_functionspace_vector_type
 
typedef mpl::transform< bases_list, ChangeBasis< mpl::_1 >, mpl::back_inserter< fusion::vector<> > >::type functionspace_vector_type
 
using meshes_list = MeshTypes
 
using mortar_list = MortarType
 
using mortar_type = mortar_list
 
using periodicity_type = PeriodicityType
 
using super = FunctionSpaceBase
 
using value_type = T
 
- Public Types inherited from Feel::FunctionSpaceBase
using super = CommObject
 
using super2 = JournalWatcher
 
- Public Types inherited from Feel::JournalWatcher
using function_update_information_type = std::function< void(nl::json &)>
 
using notify_type = nl::json
 

Public Member Functions

template<typename FSpaceHead >
void initHead (FSpaceHead &head)
 
template<typename FSpaceHead , typename... FSpaceTail>
void initList (FSpaceHead &head, FSpaceTail... tail)
 
- Public Member Functions inherited from Feel::FunctionSpaceBase
 FunctionSpaceBase ()
 
 FunctionSpaceBase (std::string const &name, worldcomm_ptr_t const &w)
 
 FunctionSpaceBase (FunctionSpaceBase const &)=default
 
 FunctionSpaceBase (FunctionSpaceBase &&)=default
 
 ~FunctionSpaceBase () override=default
 destructor
 
FunctionSpaceBase & operator= (FunctionSpaceBase const &o)
 copy operator
 
- Public Member Functions inherited from Feel::CommObject
WorldComm const & comm () const
 
 CommObject (CommObject &&)=default
 
 CommObject (CommObject const &)=default
 
 CommObject (worldcomm_ptr_t &w)
 
 CommObject (worldcomm_ptr_t const &w)
 
bool hasWorldComm () const
 returns true if worldcomm is allocated, false othewise
 
CommObject & operator= (CommObject &&)=default
 
CommObject & operator= (CommObject const &)=default
 
virtual void setWorldComm (worldcomm_ptr_t const &w)
 
virtual void setWorldComm (worldcomm_t &w)
 
worldcomm_ptr_t & subWorldCommSeqPtr ()
 
worldcomm_ptr_t const & subWorldCommSeqPtr () const
 
WorldComm & worldComm ()
 
WorldComm const & worldComm () const
 
worldcomm_ptr_t & worldCommPtr ()
 
worldcomm_ptr_t const & worldCommPtr () const
 
- Public Member Functions inherited from Feel::JournalWatcher
 JournalWatcher (std::string const &category="", std::string const &name="", bool connect=JournalManager::journalAutoMode())
 Constructors. More...
 
 JournalWatcher (std::string const &category, bool useDefaultName, bool connect=JournalManager::journalAutoMode())
 
 JournalWatcher (function_update_information_type const &func, std::string const &category="", std::string const &name="", bool useDefaultNameIfEmpty=true, bool connect=JournalManager::journalAutoMode())
 
 JournalWatcher (JournalWatcher const &jw)
 Copy constructor.
 
virtual ~JournalWatcher ()
 Default destructor. The (inherited) object is always disconnected from the journal during the destruction.
 
bool journalIsConnected () const
 GettersCheck if the object is connected to the journal. More...
 
std::string const & journalWatcherInstanceName () const
 Return the full instance name for this watched object. The name is composed with the base name and a suffix index corresponding to the nth call. More...
 
nl::json::json_pointer journalSection () const
 Return the section into the journal as json_pointer.
 
nl::json const & informationObject () const
 Return the information into property tree.
 
void journalConnect ()
 Setters. More...
 
void journalDisconnect ()
 Disconnect the derived object from the simulation info manager. The disconnection is safe.
 
void setInformationObject (nl::json const &informationObject)
 set information object
 
void putInformationObject (nl::json const &informationObject)
 put information object
 
void addInformationObject (nl::json const &informationObject)
 add information object
 
void journalFinalize ()
 finalize journal publication
 

Constants

typedef meshes_list MeshesListType
 
typedef GetMesh< meshes_list, 0 >::type mesh_0_type
 
using index_type = typename mesh_0_type::index_type
 
using size_type = typename mesh_0_type::size_type
 
typedef mpl::if_< boost::is_base_of< MeshBase<>, meshes_list >, mpl::identity< meshes_list >, mpl::identity< mesh_0_type > >::type::type mesh_type
 
typedef mpl::if_< boost::is_base_of< MeshBase<>, meshes_list >, mpl::identity< std::shared_ptr< mesh_type > >, mpl::identity< typenamempl::transform< meshes_list, ChangeToMeshPtr< mpl::_1 >, mpl::back_inserter< meshes<> > >::type > >::type::type mesh_ptrtype
 
typedef mpl::if_< boost::is_base_of< MeshBase<>, meshes_list >, mpl::identity< typenamemesh_type::element_type >, mpl::identity< typenamemesh_0_type::element_type > >::type::type convex_type
 
typedef mpl::transform< functionspace_vector_type, ChangeMeshSupport< mpl::_1 >, mpl::back_inserter< fusion::vector<> > >::type mesh_support_vector_type
 
typedef mpl::at_c< bases_list, 0 >::type::template apply< GetMesh< meshes_list, 0 >::type::nDim, GetMesh< meshes_list, 0 >::type::nRealDim, value_type, typenameGetMesh< meshes_list, 0 >::type::element_type >::type basis_0_type
 
typedef basis_0_type::continuity_type continuity_type
 
typedef mpl::if_< mpl::bool_< is_composite >, mpl::identity< boost::none_t >, mpl::identity< typenamebasis_0_type::polyset_type > >::type::type polyset_type
 
typedef GetPeriodicity< periodicity_type, 0 >::type periodicity_0_type
 
typedef GetMortar< mortar_list, 0 >::type mortar_0_type
 
static const bool is_composite = ( mpl::size<bases_list>::type::value > 1 )
 
static constexpr uint16_type nDim
 
static constexpr uint16_type nRealDim
 
static constexpr uint16_type rank = ( is_composite? invalid_uint16_type_value : basis_0_type::rank )
 
static constexpr bool is_scalar = ( is_composite? false : basis_0_type::is_scalar )
 
static constexpr bool is_vectorial = ( is_composite? false : basis_0_type::is_vectorial )
 
static constexpr bool is_tensor2 = ( is_composite? false : basis_0_type::is_tensor2 && !is_symm_v<basis_0_type> )
 
static constexpr bool is_tensor2symm = ( is_composite? false : basis_0_type::is_tensor2 && is_symm_v<basis_0_type> )
 
static constexpr bool is_continuous = ( is_composite? false : basis_0_type::isContinuous )
 
static constexpr bool is_modal = ( is_composite? false : basis_0_type::is_modal )
 
static constexpr bool is_nodal = !is_modal
 
static constexpr uint16_type nComponents1 = ( is_composite? invalid_uint16_type_value : basis_0_type::nComponents1 )
 
static constexpr uint16_type nComponents2 = ( is_composite? invalid_uint16_type_value : basis_0_type::nComponents2 )
 
static constexpr bool is_product = ( is_composite? false : basis_0_type::is_product )
 
static constexpr uint16_type nComponents
 
static constexpr uint16_type N_COMPONENTS = nComponents
 
static constexpr uint16_type nSpaces = mpl::size<bases_list>::type::value
 
static constexpr uint16_type nRealComponents = is_tensor2symm?basis_0_type::nComponents1*(basis_0_type::nComponents1+1)/2:nComponents
 
static constexpr bool is_periodic = periodicity_0_type::is_periodic
 
static const bool is_mortar = mortar_0_type::is_mortar
 
static const bool is_hdiv_conforming = Feel::is_hdiv_conforming<basis_0_type>::value
 
static const bool is_hcurl_conforming = Feel::is_hcurl_conforming<basis_0_type>::value
 

Typedefs

typedef ublas::type_traits< value_type >::real_type real_type
 
typedef node< value_type >::type node_type
 
typedef FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType > functionspace_type
 
typedef functionspace_type space_type
 
typedef std::shared_ptr< functionspace_type > functionspace_ptrtype
 
typedef std::shared_ptr< functionspace_type > pointer_type
 
typedef FunctionSpace< meshes_list, component_basis_vector_type, value_type, periodicity_type, mortar_list > component_functionspace_type
 
typedef std::shared_ptr< component_functionspace_type > component_functionspace_ptrtype
 
typedef bases_list BasisType
 
typedef mpl::if_< mpl::bool_< is_composite >, mpl::identity< bases_list >, mpl::identity< basis_0_type > >::type::type basis_type
 
typedef std::shared_ptr< basis_type > basis_ptrtype
 
typedef basis_type reference_element_type
 
typedef std::shared_ptr< reference_element_type > reference_element_ptrtype
 
typedef reference_element_type fe_type
 
typedef mpl::if_< mpl::bool_< is_composite >, mpl::identity< fe_type >, mpl::identity< typenamebasis_0_type::SSpace::type > >::type::type mortar_fe_type
 
typedef reference_element_ptrtype fe_ptrtype
 
typedef mpl::if_< mpl::bool_< is_composite >, mpl::identity< boost::none_t >, mpl::identity< typenamebasis_0_type::PreCompute > >::type pc_type
 
typedef std::shared_ptr< pc_type > pc_ptrtype
 
using local_interpolant_type = local_interpolant_t< basis_0_type >
 interpolate type if available
 
using local_interpolants_type = local_interpolants_t< basis_0_type >
 
typedef mpl::if_< mpl::bool_< is_composite >, mpl::identity< component_basis_vector_type >, typenamempl::at_c< component_basis_vector_type, 0 >::type::templateapply< nDim, nRealDim, value_type, convex_type > >::type::type component_basis_type
 
typedef std::shared_ptr< component_basis_type > component_basis_ptrtype
 
using is_trace_applicable = mp11::mp_bool<(nDim > 1)>
 
using trace_mesh_type = mp11::mp_if< is_trace_applicable, typename mesh_type::template trace_mesh_type<>, void >
 
using trace_mesh_ptrtype = mp11::mp_if< is_trace_applicable, typename mesh_type::template trace_mesh_ptrtype<>, void >
 
using trace_functionspace_type = mp11::mp_if< is_trace_applicable, FunctionSpace< trace_mesh_type, bases_list >, void >
 
using trace_functionspace_ptrtype = std::shared_ptr< trace_functionspace_type >
 
using is_trace_trace_applicable = mp11::mp_bool<(nDim > 2)>
 
using trace_trace_mesh_type = mp11::mp_if< is_trace_trace_applicable, typename mesh_type::template trace_trace_mesh_type<>, void >
 
using trace_trace_mesh_ptrtype = mp11::mp_if< is_trace_trace_applicable, typename mesh_type::template trace_trace_mesh_ptrtype<>, void >
 
using trace_trace_functionspace_type = mp11::mp_if< is_trace_trace_applicable, FunctionSpace< trace_trace_mesh_type, bases_list >, void >
 
using trace_trace_functionspace_ptrtype = std::shared_ptr< trace_trace_functionspace_type >
 
using gm_type = typename mesh_type::gm_type
 
using gm1_type = typename mesh_type::gm1_type
 
using geoelement_type = typename mesh_type::element_type
 
typedef mpl::if_< mpl::greater< mpl::int_< nDim >, mpl::int_< 0 > >, mpl::identity< typenamemesh_type::face_type >, mpl::identity< mpl::void_ > >::type::type geoface_type
 
typedef mpl::if_< mpl::greater< mpl::int_< nDim >, mpl::int_< 0 > >, mpl::identity< typenamemesh_type::edge_type >, mpl::identity< mpl::void_ > >::type::type geoedge_type
 
typedef mpl::if_< mpl::greater< mpl::int_< nDim >, mpl::int_< 0 > >, mpl::identity< typenamemesh_type::point_type >, mpl::identity< mpl::void_ > >::type::type geopoint_type
 
typedef std::shared_ptr< gm_type > gm_ptrtype
 
typedef std::shared_ptr< gm1_type > gm1_ptrtype
 
using pts_gmc_type = typename gm_type::template Context< geoelement_type >
 
typedef mpl::if_< mpl::greater< mpl::int_< nDim >, mpl::int_< 0 > >, mpl::identity< typenamegm_type::templateContext< geoelement_type > >, mpl::identity< mpl::void_ > >::type::type gmc_type
 
typedef std::shared_ptr< gmc_type > gmc_ptrtype
 
typedef mpl::if_< mpl::greater< mpl::int_< nDim >, mpl::int_< 0 > >, mpl::identity< typenamegm_type::precompute_ptrtype >, mpl::identity< mpl::void_ > >::type::type geopc_ptrtype
 
typedef mpl::if_< mpl::greater< mpl::int_< nDim >, mpl::int_< 0 > >, mpl::identity< typenamegm_type::precompute_type >, mpl::identity< mpl::void_ > >::type::type geopc_type
 
typedef mpl::if_< mpl::bool_< is_composite >, mpl::identity< mpl::void_ >, mpl::identity< typenamebasis_0_type::templateContext< basis_context_value, basis_0_type, gm_type, geoelement_type > > >::type::type basis_context_type
 
typedef std::shared_ptr< basis_context_type > basis_context_ptrtype
 
typedef mpl::if_< mpl::bool_< is_composite >, mpl::identity< DofComposite >, mpl::identity< DofTable< mesh_type, basis_type, periodicity_0_type, mortar_0_type > > >::type::type dof_type
 
typedef std::shared_ptr< dof_type > dof_ptrtype
 
typedef std::shared_ptr< DataMap<> > datamap_ptrtype
 
typedef std::shared_ptr< IndexSplit > indexsplit_ptrtype
 
typedef mpl::if_< mpl::equal_to< mpl::int_< N_COMPONENTS >, mpl::int_< 1 > >, mpl::identity< value_type >, mpl::identity< node_type > >::type::type return_type
 
typedef boost::function< return_type(node_type const &)> function_type
 
template<int i>
using sub_functionspace_type = typename sub_functionspace< i >::type
 
template<int i>
using sub_functionspace_ptrtype = typename sub_functionspace< i >::ptrtype
 
typedef Element< value_type > element_type
 
typedef std::shared_ptr< element_type > element_ptrtype
 
typedef Element< value_type > real_element_type
 
typedef std::map< size_type, std::vector< size_type > > proc_dist_map_type
 
static const size_type basis_context_value
 

Accessors

typedef std::vector< element_ptrtype > elements_ptrtype
 
template<typename Context_t >
matrix_node< value_type >::type ptsInContext (Context_t const &context, mpl::int_< 2 >) const
 
periodicity_type const & periodicity () const
 
uint16_type qDim () const
 return 1 if scalar space or the number of components if vectorial space
 
size_type nDof () const
 
size_type nLocalDof () const
 
size_type nLocalDofWithGhost () const
 
size_type nLocalDofWithoutGhost () const
 
size_type nLocalDofWithGhostOnProc (const int proc) const
 
size_type nLocalDofWithoutGhostOnProc (const int proc) const
 
FEELPP_DEPRECATED proc_dist_map_type getProcDistMap () const
 
size_type nDofStart (size_type i=0) const
 
size_type nLocalDofStart (size_type i=0) const
 
size_type nLocalDofWithGhostStart (size_type i=0) const
 
size_type nLocalDofWithoutGhostStart (size_type i=0) const
 
size_type nLocalDofWithGhostOnProcStart (const int proc, size_type i=0) const
 
size_type nLocalDofWithoutGhostOnProcStart (const int proc, size_type i=0) const
 
uint16_type nSubFunctionSpace () const
 
size_type nDofPerComponent () const
 
size_type nLocalDofPerComponent () const
 
size_type nLocalDofWithoutGhostPerComponent () const
 
size_type nLocalGhostPerComponent () const
 
mesh_ptrtype & mesh ()
 
mesh_ptrtype const & mesh () const
 
template<int i>
GetMesh< mesh_ptrtype, i >::type mesh () const
 
template<int i>
GetMeshSupport< mesh_ptrtype, i >::ptrtype meshSupport () const
 
template<int i>
GetMeshSupport< mesh_ptrtype, i >::range_type rangeElements () const
 
basis_ptrtype const & basis () const
 
std::string basisName () const
 
std::string basisName (mpl::bool_< true >) const
 
std::string basisName (mpl::bool_< false >) const
 
std::vector< int > basisOrder () const
 
std::vector< int > basisOrder (mpl::bool_< true >) const
 
std::vector< int > basisOrder (mpl::bool_< false >) const
 
reference_element_ptrtype const & fe () const
 
gm_ptrtype const & gm () const
 
gm1_ptrtype const & gm1 () const
 
DataMap< size_type > const & map () const
 
datamap_ptrtype mapPtr () const override
 
DataMap< size_type > const & mapOn () const
 
DataMap< size_type > const & mapOnOff () const
 
dof_ptrtype dof ()
 
dof_ptrtype dofOn ()
 
dof_ptrtype dofOnOff ()
 
dof_ptrtype const & dof () const
 
dof_ptrtype const & dofOn () const
 
dof_ptrtype const & dofOnOff () const
 
std::vector< DofTableExtendedType > const & extendedDofTableComposite () const
 
DofTableExtendedType extendedDofTable () const
 
constexpr bool isMortar () const
 
functionspace_vector_type const & functionSpaces () const
 get the FunctionSpace vector
 
std::shared_ptr< IndexSplit > buildDofIndexSplit ()
 
std::shared_ptr< IndexSplit > buildDofIndexSplitWithComponents ()
 
std::shared_ptr< IndexSplit > const & dofIndexSplit () const
 
element_type element (std::string const &name="u", std::string const &desc="u")
 
template<typename ExprT >
element_type element (ExprT e, std::string const &name="u", std::string const &desc="u", typename std::enable_if< std::is_base_of< ExprBase, ExprT >::value >::type *=0)
 
element_type elementFromExpr (std::string const &e, std::string const &name, std::string const &desc="u")
 
element_ptrtype elementPtr (std::string const &name="u", std::string const &desc="u")
 
template<typename ExprT >
element_ptrtype elementPtr (ExprT e, std::string const &name="u", std::string const &desc="u", typename std::enable_if< std::is_base_of< ExprBase, ExprT >::value >::type *=0)
 
elements_ptrtype elementsPtr (int r, std::string const &name="u")
 
template<typename ExprT >
element_ptrtype elementPtr (int r, ExprT e, std::string const &name="u", typename std::enable_if< std::is_base_of< ExprBase, ExprT >::value >::type *=0)
 
element_type element (std::shared_ptr< Vector< value_type > > &vec, int blockIdStart=0)
 Build a read-only element view from a shared vector. More...
 
element_type element (std::shared_ptr< Vector< value_type > > const &vec, int blockIdStart=0)
 
element_type element (Vector< value_type > &vec, int blockIdStart=0)
 
element_type element (Vector< value_type > const &vec, int blockIdStart=0)
 Build a read-only element whose storage directly views a PETSc Vec. More...
 
element_ptrtype elementPtr (Vector< value_type > const &vec, int blockIdStart=0)
 Create a read-only finite element view backed by a PETSc Vec (const overload). More...
 
element_ptrtype elementPtr (Vector< value_type > &vec, int blockIdStart=0)
 Create a writeable finite element view backed by a PETSc Vec (non-const overload). More...
 
template<int i>
mpl::at_c< functionspace_vector_type, i >::type functionSpace ()
 get the i -th FunctionSpace out the list
 
template<int i>
mpl::at_c< functionspace_vector_type, i >::type const & functionSpace () const
 get the i -th FunctionSpace out the list
 
bool hasCompSpace () const
 
component_functionspace_ptrtype const & compSpace () const
 
trace_functionspace_ptrtype trace () const
 
template<typename RangeT >
trace_functionspace_ptrtype trace (RangeT range) const
 
trace_trace_functionspace_ptrtype wireBasket () const
 
template<typename RangeT >
trace_trace_functionspace_ptrtype wireBasket (RangeT range) const
 
bool hasRegionTree () const
 
region_tree_ptrtype const & regionTree () const
 
void updateRegionTree () const
 
bool findPoint (node_type const &pt, size_type &cv, node_type &ptr) const
 find a point(real coordinate) pt in the mesh associated with the space and provide: (i) the reference coordinates ptr and (ii) the index of the element containing it. More...
 
void buildComponentSpace () const
 build component space in vectorial case
 
void rebuildDofPoints ()
 rebuild dof points after a mesh mover for example
 
template<typename RangeType >
std::set< size_type > dofs (RangeType const &range, ComponentType c1=ComponentType::NO_COMPONENT, bool onlyMultiProcessDofs=false) const
 return the index of dof defined on a range
 
static std::map< std::string, element_type > elementsMap ()
 map of elements More...
 

Methods

class ComponentSpace
 
worldscomm_ptr_t M_worldsComm
 
mesh_ptrtype M_mesh
 
periodicity_type M_periodicity
 
reference_element_ptrtype M_ref_fe
 finite element reference type
 
component_functionspace_ptrtype M_comp_space
 component fe space
 
dof_ptrtype M_dof
 Degrees of freedom.
 
dof_ptrtype M_dofOnOff
 Degrees of freedom (only init wiht mpi)
 
std::vector< DofTableExtendedType > M_extendedDofTableComposite
 build the extended dof table in //
 
boost::optional< region_tree_ptrtype > M_rt
 region tree associated with the mesh
 
void printInfo () const
 
template<typename TT = functionspace_type>
requires (!TT::is_composite)
void save (std::string const &filepathstr) const
 save on disk some information in json + hdF5 files as doftable (require HDF5 support) More...
 
template<typename TT = functionspace_type>
requires (!TT::is_composite)
std::vector< index_type > relationFromFile (std::string const &filepathstr) const
 get relation with current doftable and one stored on disk (mesh points should be same) More...
 
template<typename TT = functionspace_type>
requires TT
::is_composite std::vector< index_type > relationFromFile (std::string const &filepathstr) const
 
 FunctionSpace (FunctionSpace const &__fe)
 
void updateInformationObject (nl::json &p) const override
 update information for the current object More...
 

Subclasses

Context context ()
 
basis_context_ptrtype contextBasis (std::pair< int, basis_context_ptrtype > const &p, Context const &c)
 

Constructors, destructor

 FunctionSpace (mesh_ptrtype const &mesh, mesh_support_vector_type const &meshSupport=mesh_support_vector_type(), size_type mesh_components=MESH_RENUMBER|MESH_CHECK, periodicity_type periodicity=periodicity_type(), worldscomm_ptr_t const &_worldsComm=Environment::worldsComm(nSpaces), std::vector< DofTableExtendedType > extendedDofTable=std::vector< DofTableExtendedType >(nSpaces, DofTableExtendedType::DEFAULT), const std::string &name="")
 FunctionSpace constructor More...
 
 FunctionSpace (mesh_ptrtype const &mesh, mesh_support_vector_type const &meshSupport, std::vector< Dof< typename mesh_type::size_type > > const &dofindices, periodicity_type periodicity=periodicity_type(), worldscomm_ptr_t const &_worldsComm=Environment::worldsComm(nSpaces), std::vector< DofTableExtendedType > extendedDofTable=std::vector< DofTableExtendedType >(nSpaces, DofTableExtendedType::DEFAULT), const std::string &name="")
 
 FunctionSpace (worldcomm_ptr_t const &worldcomm=Environment::worldCommPtr(), const std::string &name="")
 
template<typename SimilarSpaceType >
void shallowCopy (std::shared_ptr< SimilarSpaceType > const &simSpace)
 copy shared_ptr pointers of a FunctionSpace but not totally a view : must be use we caution
 
void init (mesh_ptrtype const &mesh, mesh_support_vector_type const &meshSupport, size_type mesh_components, std::vector< Dof< typename mesh_type::size_type > > const &dofindices, periodicity_type periodicity=periodicity_type())
 initialize the function space More...
 
void init (mesh_ptrtype const &mesh, mesh_support_vector_type const &meshSupport, size_type mesh_components=MESH_RENUMBER|MESH_CHECK, periodicity_type periodicity=periodicity_type())
 
 ~FunctionSpace () override
 destructor: do nothing thanks to shared_ptr<>
 
void setWorldsComm (worldscomm_ptr_t const &_worldsComm)
 
worldscomm_ptr_t & worldsComm ()
 
worldscomm_ptr_t const & worldsComm () const
 
bool hasEntriesForAllSpaces ()
 
template<typename ... Ts>
requires (sizeof...(Ts) != 0) && (NA::is_named_argument_v<Ts> && ...)
static pointer_type New (Ts &&... v)
 helper static function to create a std::shared_ptr<> out of the FunctionSpace
 
static pointer_type New (mesh_ptrtype const &m)
 
static pointer_type NewImpl (mesh_ptrtype const &__m, mesh_support_vector_type const &meshSupport, worldscomm_ptr_t const &worldscomm=Environment::worldsComm(nSpaces), size_type mesh_components=MESH_RENUMBER|MESH_CHECK, periodicity_type periodicity=periodicity_type(), std::vector< DofTableExtendedType > extendedDofTable=std::vector< DofTableExtendedType >(nSpaces, DofTableExtendedType::DEFAULT))
 
template<typename ... FSpaceList>
static pointer_type NewFromList (FSpaceList... fspacelist)
 

Operator overloads

void operator() (MESH_CHANGES mesh_changes)
 update element when mesh has been changed
 
void updateAfterMeshChange (MESH_CHANGES mesh_changes) override
 Refresh mesh-dependent function-space data after a mesh change. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Feel::JournalWatcher
void applyUpdateInformationObject ()
 Protected Methods.
 

Detailed Description

template<typename MeshTypes, typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
class Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >
Author
Function Space Class

FunctionSpace is a representation of a functional space parametrized by the type of the mesh (MeshType)

Author
Christophe Prud'homme chris.nosp@m.toph.nosp@m.e.pru.nosp@m.dhom.nosp@m.me@fe.nosp@m.elpp.nosp@m..org

Constructor & Destructor Documentation

◆ FunctionSpace()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::FunctionSpace ( mesh_ptrtype const &  mesh,
mesh_support_vector_type const &  meshSupport = mesh_support_vector_type(),
size_type  mesh_components = MESH_RENUMBER | MESH_CHECK,
periodicity_type  periodicity = periodicity_type(),
worldscomm_ptr_t const &  _worldsComm = Environment::worldsComm(nSpaces),
std::vector< DofTableExtendedType >  extendedDofTable = std::vector<DofTableExtendedType>(nSpaces,DofTableExtendedType::DEFAULT),
const std::string &  name = "" 
)

FunctionSpace constructor

Parameters
mesha mesh data structure

Member Function Documentation

◆ basis()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
basis_ptrtype const & Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::basis ( ) const
Returns
the reference finite element

◆ basisName()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
std::string Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::basisName ( ) const
Returns
the basis name
Note
in the case of product of space, this is the concatenation of the basis name of each function space

◆ basisOrder()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
std::vector< int > Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::basisOrder ( ) const
Returns
the basis order
Note
in the case of product of space, this is the concatenation of the orders in a vector

◆ compSpace()

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

◆ context()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
Context Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::context ( )
Returns
function space context

◆ dof() [1/2]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
dof_ptrtype Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::dof ( )
Returns
the degrees of freedom

◆ dof() [2/2]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
dof_ptrtype const & Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::dof ( ) const
Returns
the degrees of freedom

◆ dofOn() [1/2]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
dof_ptrtype Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::dofOn ( )
Returns
the degrees of freedom (ON processor)

◆ dofOn() [2/2]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
dof_ptrtype const & Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::dofOn ( ) const
Returns
the degrees of freedom (ON processor)

◆ dofOnOff() [1/2]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
dof_ptrtype Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::dofOnOff ( )
Returns
the degrees of freedom (ON and OFF processor)

◆ dofOnOff() [2/2]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
dof_ptrtype const & Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::dofOnOff ( ) const
Returns
the degrees of freedom (ON and OFF processor)

◆ element() [1/4]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename ExprT >
element_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::element ( ExprT  e,
std::string const &  name = "u",
std::string const &  desc = "u",
typename std::enable_if< std::is_base_of< ExprBase, ExprT >::value >::type *  = 0 
)
Parameters
eexpression to initialize the element
uname of the element
Returns
an element initialized with expression e

◆ element() [2/4]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
element_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::element ( std::shared_ptr< Vector< value_type > > &  vec,
int  blockIdStart = 0 
)

Build a read-only element view from a shared vector.

Non-const shared vectors keep the legacy external-array view semantics; const shared vectors use the const vector overload below.

Parameters
vecShared pointer to an input vector (PETSc-backed).
blockIdStartIf vec was built from a VectorBlock, the starting block id inside the distribution map (default: 0).
Returns
element_type Element built from vec.

◆ element() [3/4]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
element_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::element ( std::string const &  name = "u",
std::string const &  desc = "u" 
)
Returns
the element 0 of the function space

◆ element() [4/4]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
element_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::element ( Vector< value_type > const &  vec,
int  blockIdStart = 0 
)

Build a read-only element whose storage directly views a PETSc Vec.

For PETSc >= 3.22 this overload copies the current local values so it does not keep a read lock on vec while the returned element lives.

Layout follows the distribution map: active DOFs first, then ghost DOFs.

Parameters
vecInput vector (must be PETSc-backed VectorPetsc<value_type>).
blockIdStartIf vec was built from a VectorBlock, the starting block id inside the distribution map (default: 0). Must satisfy 0 ≤ blockIdStart < vec.map().numberOfDofIdToContainerId().
Returns
element_type Read-only element view backed by vec.
Precondition
Feel++ built with PETSc support.
std::is_same_v<value_type, PetscScalar>.
The vector distribution map matches this function space.
Postcondition
PETSc >= 3.22: no PETSc array lock is kept after this function returns.
Warning
Do not nest unrelated VecGetArray* calls on the same Vec while this element exists; PETSc 3.22 enforces lock correctness.
See also
setBackingGuard(std::shared_ptr<void>)

◆ elementPtr() [1/5]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename ExprT >
element_ptrtype Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::elementPtr ( ExprT  e,
std::string const &  name = "u",
std::string const &  desc = "u",
typename std::enable_if< std::is_base_of< ExprBase, ExprT >::value >::type *  = 0 
)
Parameters
eexpression to initialize the element
uname of the element
Returns
a pointer to an element initialized with expression e

◆ elementPtr() [2/5]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename ExprT >
element_ptrtype Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::elementPtr ( int  r,
ExprT  e,
std::string const &  name = "u",
typename std::enable_if< std::is_base_of< ExprBase, ExprT >::value >::type *  = 0 
)
Parameters
eexpression to initialize the element
uname of the element
Returns
a pointer to an element initialized with expression e

◆ elementPtr() [3/5]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
element_ptrtype Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::elementPtr ( std::string const &  name = "u",
std::string const &  desc = "u" 
)
Returns
the element 0 of the function space

◆ elementPtr() [4/5]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
element_ptrtype Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::elementPtr ( Vector< value_type > &  vec,
int  blockIdStart = 0 
)

Create a writeable finite element view backed by a PETSc Vec (non-const overload).

This function builds an element_type that directly views (and can modify) the underlying PETSc vector storage for the local process.

Offsets are computed using the vector’s distribution map so that

  • blockIdStart selects the (sub-)block,
  • active DOFs come first, followed by ghost DOFs.
Parameters
[in,out]vecThe source vector. Must be a PETSc-backed VectorPetsc<value_type>.
[in]blockIdStartStarting block index inside the distribution map (default: 0). Must satisfy 0 <= blockIdStart < vec.map().numberOfDofIdToContainerId().
Returns
element_ptrtype A smart pointer to an element_type that provides write access to the local active and ghost DOFs of vec.
Precondition
Feel++ built with PETSc support.
std::is_same_v<value_type, PetscScalar> (enforced via static_assert).
vec is initialized and its distribution map matches this function space.
blockIdStart is in range; see parameter description.
Postcondition
The returned element follows the legacy external-array view behavior.
Note
The caller is responsible for any required PETSc assembly or synchronization after modifying the element (e.g., VecAssemblyBegin/End if values are set through PETSc APIs elsewhere).
Warning
The returned element aliases PETSc-owned storage. Keep its lifetime short and avoid PETSc operations that may reallocate the same Vec.
MPI / Thread Safety
The view is local to the calling process and only covers the range [firstLocal, lastLocal). It is not thread-safe to concurrently call other PETSc Get/Restore operations on the same Vec from different threads.
Complexity
O(1) excluding distribution-map lookups.
Exceptions
abortsAborts via CHKERRABORT if PETSc reports an error (e.g., invalid state, mismatched distribution, lock conflicts).
Since
PETSc 3.22-safe implementation (array locks enforced).
See also
elementPtr(Vector<value_type> const&, int), setBackingGuard(std::shared_ptr<void>)

◆ elementPtr() [5/5]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
element_ptrtype Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::elementPtr ( Vector< value_type > const &  vec,
int  blockIdStart = 0 
)

Create a read-only finite element view backed by a PETSc Vec (const overload).

For PETSc >= 3.22 this function copies the current local PETSc values into the returned element so no PETSc read lock is kept after the call returns.

Offsets are computed using the vector’s distribution map so that

  • blockIdStart selects the (sub-)block,
  • active DOFs come first, followed by ghost DOFs.
Parameters
[in]vecThe source vector. Must be a PETSc-backed VectorPetsc<value_type>.
[in]blockIdStartStarting block index inside the distribution map (default: 0). Must satisfy 0 <= blockIdStart < vec.map().numberOfDofIdToContainerId().
Returns
element_ptrtype A smart pointer to an element_type that provides read-only access to the local active and ghost DOFs of vec.
Precondition
Feel++ built with PETSc support.
std::is_same_v<value_type, PetscScalar> (enforced via static_assert).
vec is initialized and its distribution map matches this function space.
blockIdStart is in range; see parameter description.
Postcondition
PETSc >= 3.22: no PETSc array lock is kept after this function returns.
Note
This overload never writes into the PETSc Vec. Any attempt to modify the element data must use the non-const overload (writeable view) instead.
Warning
The PETSc >= 3.22 path is a snapshot; later changes to vec are not reflected in the returned element.
MPI / Thread Safety
The view is local to the calling process and only covers the range [firstLocal, lastLocal). It is not thread-safe to concurrently call other PETSc Get/Restore operations on the same Vec from different threads.
Complexity
O(1) excluding distribution-map lookups.
Exceptions
abortsAborts via CHKERRABORT if PETSc reports an error (e.g., invalid state, mismatched distribution, lock conflicts).
Since
PETSc 3.22 snapshot implementation (no persistent read lock).
See also
elementPtr(Vector<value_type>&, int), setBackingGuard(std::shared_ptr<void>)

◆ elementsMap()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
static std::map< std::string, element_type > Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::elementsMap ( )
static

map of elements

Returns
a map of elements

◆ elementsPtr()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
elements_ptrtype Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::elementsPtr ( int  r,
std::string const &  name = "u" 
)
Parameters
uname of the elements
Returns
a pointer to an element initialized with expression e

◆ extendedDofTableComposite()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
std::vector< DofTableExtendedType > const & Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::extendedDofTableComposite ( ) const
Returns
true if need to build extended DofTable

◆ fe()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
reference_element_ptrtype const & Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::fe ( ) const
Returns
the reference finite element

◆ findPoint()

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
bool Feel::FunctionSpace< A0, A1, A2, A3, A4 >::findPoint ( node_type const &  pt,
size_type &  cv,
node_type &  ptr 
) const

find a point(real coordinate) pt in the mesh associated with the space and provide: (i) the reference coordinates ptr and (ii) the index of the element containing it.

Parameters
ptpoint to be looked for (real coordinates)
ptrreference coordinates of the point
cvindex of the element containing the point pt

◆ getProcDistMap()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
FEELPP_DEPRECATED proc_dist_map_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::getProcDistMap ( ) const
Returns
the distribution of the dofs among the processors

◆ gm()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
gm_ptrtype const & Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::gm ( ) const
Returns
the geometric mapping

◆ gm1()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
gm1_ptrtype const & Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::gm1 ( ) const
Returns
the geometric mapping

◆ hasCompSpace()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
bool Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::hasCompSpace ( ) const
Returns
true if component Space was built

◆ hasRegionTree()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
bool Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::hasRegionTree ( ) const
Returns
true if Space has a region tree to localize points

◆ init()

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
void Feel::FunctionSpace< A0, A1, A2, A3, A4 >::init ( mesh_ptrtype const &  mesh,
mesh_support_vector_type const &  meshSupport,
size_type  mesh_components,
std::vector< Dof< typename mesh_type::size_type > > const &  dofindices,
periodicity_type  periodicity = periodicity_type() 
)

initialize the function space

Parameters
meshmesh data
meshSupport
mesh_components

◆ isMortar()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
constexpr bool Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::isMortar ( ) const
constexpr
Returns
true if mortar, false otherwise

References Feel::elements().

◆ map()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
DataMap< size_type > const & Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::map ( ) const
Returns
the degrees of freedom

◆ mapOn()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
DataMap< size_type > const & Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::mapOn ( ) const
Returns
the degrees of freedom

◆ mapOnOff()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
DataMap< size_type > const & Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::mapOnOff ( ) const
Returns
the degrees of freedom

◆ mapPtr()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
datamap_ptrtype Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::mapPtr ( ) const
overridevirtual
Returns
the degrees of freedom

Implements Feel::FunctionSpaceBase.

◆ mesh() [1/2]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
mesh_ptrtype & Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::mesh ( )
Returns
the mesh associated with the approximation

◆ mesh() [2/2]

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
mesh_ptrtype const & Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::mesh ( ) const
Returns
the mesh associated with the approximation

◆ meshSupport()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<int i>
GetMeshSupport< mesh_ptrtype, i >::ptrtype Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::meshSupport ( ) const
Returns
the i-th mesh support if it exists, if not create one

◆ nDof()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
size_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::nDof ( ) const
Returns
the number of degrees of freedom for each space overall the entire domain

◆ nDofPerComponent()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
size_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::nDofPerComponent ( ) const
Returns
the number of degrees of freedom per dim

◆ nDofStart()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
size_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::nDofStart ( size_type  i = 0) const
Returns
the starting value of the global dof numbering

◆ nLocalDof()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
size_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::nLocalDof ( ) const
Returns
the number of degrees of freedom for each space on the current subdomain

◆ nLocalDofPerComponent()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
size_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::nLocalDofPerComponent ( ) const
Returns
the number of degrees of freedom per dim

◆ nLocalDofWithoutGhostPerComponent()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
size_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::nLocalDofWithoutGhostPerComponent ( ) const
Returns
the number of degrees of freedom per dim

◆ nLocalGhostPerComponent()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
size_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::nLocalGhostPerComponent ( ) const
Returns
the number of degrees of freedom per dim

◆ rangeElements()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<int i>
GetMeshSupport< mesh_ptrtype, i >::range_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::rangeElements ( ) const
Returns
the range of elements on which the i-th space is defined

◆ regionTree()

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
region_tree_ptrtype const & Feel::FunctionSpace< A0, A1, A2, A3, A4 >::regionTree
Returns
the Region Tree

◆ relationFromFile()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = functionspace_type>
requires (!TT::is_composite)
std::vector< index_type > Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::relationFromFile ( std::string const &  filepathstr) const

get relation with current doftable and one stored on disk (mesh points should be same)

Parameters
filepathpath of the json files on the disk

◆ save()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
template<typename TT = functionspace_type>
requires (!TT::is_composite)
void Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::save ( std::string const &  filepathstr) const

save on disk some information in json + hdF5 files as doftable (require HDF5 support)

Parameters
filepathpath of the json files generated (extension can be automatically added if not given)

References Feel::vf::vec().

◆ trace()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
trace_functionspace_ptrtype Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::trace ( ) const
Returns
trace space

References Feel::vf::vec().

◆ updateAfterMeshChange()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
void Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::updateAfterMeshChange ( MESH_CHANGES  mesh_changes)
overridevirtual

Refresh mesh-dependent function-space data after a mesh change.

Parameters
mesh_changeskind of mesh change to process

Reimplemented from Feel::FunctionSpaceBase.

◆ updateInformationObject()

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
void Feel::FunctionSpace< A0, A1, A2, A3, A4 >::updateInformationObject ( nl::json &  p) const
overridevirtual

update information for the current object

Reimplemented from Feel::JournalWatcher.

◆ updateRegionTree()

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
void Feel::FunctionSpace< A0, A1, A2, A3, A4 >::updateRegionTree
Returns
update the Region Tree

◆ wireBasket()

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
trace_trace_functionspace_ptrtype Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::wireBasket ( ) const
Returns
trace trace space

Member Data Documentation

◆ basis_context_value

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
const size_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::basis_context_value
static
Initial value:
= ( basis_0_type::is_product && nComponents > 1 )?
vm::POINT|vm::GRAD|vm::JACOBIAN|vm::KB :
vm::POINT|vm::GRAD|vm::JACOBIAN|vm::HESSIAN|vm::KB

◆ nComponents

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
constexpr uint16_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::nComponents
staticconstexpr
Initial value:
= mpl::transform<bases_list,
GetNComponents<mpl::_1>,
mpl::inserter<mpl::int_<0>,mpl::plus<mpl::_,mpl::_> > >::type::value

◆ nDim

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
constexpr uint16_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::nDim
staticconstexpr
Initial value:
= mpl::if_<boost::is_base_of<MeshBase<>, meshes_list >,
mpl::identity<meshes_list >,
mpl::identity<nodim> >::type::type::nDim

◆ nRealDim

template<typename MeshTypes , typename BasisTypes = Feel::bases<Lagrange<1,Scalar> >, typename T = double, typename PeriodicityType = Periodicity<NoPeriodicity>, typename MortarType = mortars<NoMortar>>
constexpr uint16_type Feel::FunctionSpace< MeshTypes, BasisTypes, T, PeriodicityType, MortarType >::nRealDim
staticconstexpr
Initial value:
= mpl::if_<boost::is_base_of<MeshBase<>, meshes_list >,
mpl::identity<meshes_list>,
mpl::identity<nodim> >::type::type::nRealDim