DOLFIN-X
DOLFIN-X C++ interface
Classes | Public Member Functions | List of all members
dolfinx::fem::FormIntegrals< T > Class Template Reference

Integrals of a Form, including those defined over cells, interior and exterior facets, and vertices. More...

#include <FormIntegrals.h>

Public Member Functions

 FormIntegrals (const std::map< IntegralType, std::vector< std::pair< int, std::function< void(T *, const T *, const T *, const double *, const int *, const std::uint8_t *, const std::uint32_t)>>>> &integrals, bool needs_permutation_data)
 Construct object from (index, tabulate function) pairs for different integral types. More...
 
const std::function< void(T *, const T *, const T *, const double *, const int *, const std::uint8_t *, const std::uint32_t)> & get_tabulate_tensor (IntegralType type, int i) const
 Get the function for 'tabulate_tensor' for integral i of given type. More...
 
void set_tabulate_tensor (IntegralType type, int i, const std::function< void(T *, const T *, const T *, const double *, const int *, const std::uint8_t *, const std::uint32_t)> &fn)
 
std::set< IntegralTypetypes () const
 Get types of integrals in the form. More...
 
int num_integrals (IntegralType type) const
 Number of integrals of given type. More...
 
std::vector< int > integral_ids (IntegralType type) const
 Get the integer IDs of integrals of type t. The IDs correspond to the domains which the integrals are defined for in the form, except ID -1, which denotes the default integral. More...
 
const std::vector< std::int32_t > & integral_domains (IntegralType type, int i) const
 Get the list of active entities for the ith integral of type t. Note, these are not retrieved by ID, but stored in order. The IDs can be obtained with "FormIntegrals::integral_ids()". For cell integrals, a list of cells. For facet integrals, a list of facets etc. More...
 
void set_domains (IntegralType type, const mesh::MeshTags< int > &marker)
 Set the valid domains for the integrals of a given type from a MeshTags "marker". Note the MeshTags is not stored, so if there any changes to the integration domain this must be called again. More...
 
void set_default_domains (const mesh::Mesh &mesh)
 If there exists a default integral of any type, set the list of entities for those integrals from the mesh topology. For cell integrals, this is all cells. For facet integrals, it is either all interior or all exterior facets. More...
 
bool needs_permutation_data () const
 Get bool indicating whether permutation data needs to be passed into these integrals. More...
 

Detailed Description

template<typename T>
class dolfinx::fem::FormIntegrals< T >

Integrals of a Form, including those defined over cells, interior and exterior facets, and vertices.

Constructor & Destructor Documentation

◆ FormIntegrals()

template<typename T >
dolfinx::fem::FormIntegrals< T >::FormIntegrals ( const std::map< IntegralType, std::vector< std::pair< int, std::function< void(T *, const T *, const T *, const double *, const int *, const std::uint8_t *, const std::uint32_t)>>>> &  integrals,
bool  needs_permutation_data 
)
inline

Construct object from (index, tabulate function) pairs for different integral types.

Parameters
[in]integralsFor each integral type (domain index, tabulate function) pairs for each integral. Domain index -1 means for all entities.
[in]needs_permutation_dataPass true if an integral requires mesh entity permutation data

Member Function Documentation

◆ get_tabulate_tensor()

template<typename T >
const std::function<void(T*, const T*, const T*, const double*, const int*, const std::uint8_t*, const std::uint32_t)>& dolfinx::fem::FormIntegrals< T >::get_tabulate_tensor ( IntegralType  type,
int  i 
) const
inline

Get the function for 'tabulate_tensor' for integral i of given type.

Parameters
[in]typeIntegral type
[in]iIntegral number
Returns
Function to call for tabulate_tensor

◆ integral_domains()

template<typename T >
const std::vector<std::int32_t>& dolfinx::fem::FormIntegrals< T >::integral_domains ( IntegralType  type,
int  i 
) const
inline

Get the list of active entities for the ith integral of type t. Note, these are not retrieved by ID, but stored in order. The IDs can be obtained with "FormIntegrals::integral_ids()". For cell integrals, a list of cells. For facet integrals, a list of facets etc.

Parameters
[in]typeIntegral type
[in]iIntegral number
Returns
List of active entities for this integral

◆ integral_ids()

template<typename T >
std::vector<int> dolfinx::fem::FormIntegrals< T >::integral_ids ( IntegralType  type) const
inline

Get the integer IDs of integrals of type t. The IDs correspond to the domains which the integrals are defined for in the form, except ID -1, which denotes the default integral.

Parameters
[in]typeIntegral type
Returns
List of IDs for this integral

◆ needs_permutation_data()

template<typename T >
bool dolfinx::fem::FormIntegrals< T >::needs_permutation_data ( ) const
inline

Get bool indicating whether permutation data needs to be passed into these integrals.

Returns
True if cell permutation data is required

◆ num_integrals()

template<typename T >
int dolfinx::fem::FormIntegrals< T >::num_integrals ( IntegralType  type) const
inline

Number of integrals of given type.

Parameters
[in]typeIntegral type
Returns
Number of integrals

◆ set_default_domains()

template<typename T >
void dolfinx::fem::FormIntegrals< T >::set_default_domains ( const mesh::Mesh mesh)
inline

If there exists a default integral of any type, set the list of entities for those integrals from the mesh topology. For cell integrals, this is all cells. For facet integrals, it is either all interior or all exterior facets.

Parameters
[in]meshMesh

◆ set_domains()

template<typename T >
void dolfinx::fem::FormIntegrals< T >::set_domains ( IntegralType  type,
const mesh::MeshTags< int > &  marker 
)
inline

Set the valid domains for the integrals of a given type from a MeshTags "marker". Note the MeshTags is not stored, so if there any changes to the integration domain this must be called again.

Parameters
[in]typeIntegral type
[in]markerMeshTags mapping entities to integrals

◆ set_tabulate_tensor()

template<typename T >
void dolfinx::fem::FormIntegrals< T >::set_tabulate_tensor ( IntegralType  type,
int  i,
const std::function< void(T *, const T *, const T *, const double *, const int *, const std::uint8_t *, const std::uint32_t)> &  fn 
)
inline
Todo:
Should this be removed

Set the function for 'tabulate_tensor' for integral i of given type

Parameters
[in]typeIntegral type
[in]iIntegral number
[in]fntabulate function

◆ types()

template<typename T >
std::set<IntegralType> dolfinx::fem::FormIntegrals< T >::types ( ) const
inline

Get types of integrals in the form.

Returns
Integrals types

The documentation for this class was generated from the following file: