Plugins
Loading...
Searching...
No Matches
ug::LevelSet::FVLSIntegral< TGridFunction > Class Template Reference

#include <ls_integral.h>

Classes

struct  AddIntegrals
 helper class for the computation of the volumes More...
 

Public Types

typedef gf_type::algebra_type algebra_type
 algebra type
 
typedef gf_type::domain_type domain_type
 domain type
 
typedef TGridFunction gf_type
 type of the grid function
 
typedef GridFunction< domain_type, lsf_algebra_typels_gf_type
 grid function type for the LSF
 
typedef CPUAlgebra lsf_algebra_type
 algebra type for the LSF
 
typedef domain_type::position_accessor_type position_accessor_type
 type of the position accessor
 
typedef FVLSIntegral< gf_typethis_type
 this type
 

Public Member Functions

void compute_for (SmartPtr< gf_type > sp_gf, const char *fct_name)
 computes the integrals
 
 FVLSIntegral (SmartPtr< ls_gf_type > sp_lsf)
 Constructor.
 
number integral () const
 return the integral over the entire negative subdomain
 
number integral_over_subsets (const char *ss_names) const
 returns the integral over the negative part of subsets
 
void on_subsets (const char *ss_names)
 sets the subsets to restrict the computation on
 
virtual ~FVLSIntegral ()
 Destructor.
 

Static Public Attributes

static const int dim = gf_type::dim
 world dimension
 

Private Member Functions

template<typename TElem >
void add_integrals_of_all ()
 adds contributions of all elements of a given type
 

Private Attributes

size_t m_fct
 the function inside of the grid function
 
number m_integral
 the entire integral
 
SmartPtr< gf_typem_sp_gf
 the grid function
 
SmartPtr< ls_gf_typem_spLSF
 the specified LSF
 
std::vector< numberm_ss_integral
 integrals over the subsets
 
SubsetGroup m_ssGrp
 the subset group (if subsets specified)
 

Detailed Description

template<typename TGridFunction>
class ug::LevelSet::FVLSIntegral< TGridFunction >

Class for integration of a grid function in the finite volumes (of the Donald diagrams).

This class computes the integral of a given grid function over the given full-dim. subsets.

Template Parameters
TGridFunctype of the grid function with the values to integrade

Member Typedef Documentation

◆ algebra_type

template<typename TGridFunction >
typedef gf_type::algebra_type ug::LevelSet::FVLSIntegral< TGridFunction >::algebra_type

algebra type

◆ domain_type

template<typename TGridFunction >
typedef gf_type::domain_type ug::LevelSet::FVLSIntegral< TGridFunction >::domain_type

domain type

◆ gf_type

template<typename TGridFunction >
typedef TGridFunction ug::LevelSet::FVLSIntegral< TGridFunction >::gf_type

type of the grid function

◆ ls_gf_type

template<typename TGridFunction >
typedef GridFunction<domain_type, lsf_algebra_type> ug::LevelSet::FVLSIntegral< TGridFunction >::ls_gf_type

grid function type for the LSF

◆ lsf_algebra_type

template<typename TGridFunction >
typedef CPUAlgebra ug::LevelSet::FVLSIntegral< TGridFunction >::lsf_algebra_type

algebra type for the LSF

◆ position_accessor_type

template<typename TGridFunction >
typedef domain_type::position_accessor_type ug::LevelSet::FVLSIntegral< TGridFunction >::position_accessor_type

type of the position accessor

◆ this_type

template<typename TGridFunction >
typedef FVLSIntegral<gf_type> ug::LevelSet::FVLSIntegral< TGridFunction >::this_type

this type

Constructor & Destructor Documentation

◆ FVLSIntegral()

template<typename TGridFunction >
ug::LevelSet::FVLSIntegral< TGridFunction >::FVLSIntegral ( SmartPtr< ls_gf_type sp_lsf)
inline

Constructor.

Parameters
sp_lsfthe leve-set function (if any)

◆ ~FVLSIntegral()

template<typename TGridFunction >
virtual ug::LevelSet::FVLSIntegral< TGridFunction >::~FVLSIntegral ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ add_integrals_of_all()

template<typename TGridFunc >
template<typename TElem >
void ug::LevelSet::FVLSIntegral< TGridFunc >::add_integrals_of_all ( )
private

◆ compute_for()

template<typename TGridFunc >
void ug::LevelSet::FVLSIntegral< TGridFunc >::compute_for ( SmartPtr< gf_type sp_gf,
const char *  fct_name 
)

computes the integrals

Sums up the (partial) integrals of all the elements of all the types.

Parameters
sp_gfthe grid function
fct_name'function' to take the data from

References pcl::ProcessCommunicator::allreduce(), ug::LFEID::LAGRANGE, PCL_RO_SUM, and UG_THROW.

◆ integral()

template<typename TGridFunction >
number ug::LevelSet::FVLSIntegral< TGridFunction >::integral ( ) const
inline

return the integral over the entire negative subdomain

References ug::LevelSet::FVLSIntegral< TGridFunction >::m_integral.

◆ integral_over_subsets()

template<typename TGridFunc >
number ug::LevelSet::FVLSIntegral< TGridFunc >::integral_over_subsets ( const char *  ss_names) const

returns the integral over the negative part of subsets

Extracts the integral over the given subsets

Parameters
ss_namesname of the subset

References ug::SubsetGroup::add(), ug::SubsetGroup::size(), and ug::TokenizeString().

◆ on_subsets()

template<typename TGridFunction >
void ug::LevelSet::FVLSIntegral< TGridFunction >::on_subsets ( const char *  ss_names)
inline

Member Data Documentation

◆ dim

template<typename TGridFunction >
const int ug::LevelSet::FVLSIntegral< TGridFunction >::dim = gf_type::dim
static

world dimension

◆ m_fct

template<typename TGridFunction >
size_t ug::LevelSet::FVLSIntegral< TGridFunction >::m_fct
private

the function inside of the grid function

◆ m_integral

template<typename TGridFunction >
number ug::LevelSet::FVLSIntegral< TGridFunction >::m_integral
private

the entire integral

Referenced by ug::LevelSet::FVLSIntegral< TGridFunction >::integral().

◆ m_sp_gf

template<typename TGridFunction >
SmartPtr<gf_type> ug::LevelSet::FVLSIntegral< TGridFunction >::m_sp_gf
private

◆ m_spLSF

template<typename TGridFunction >
SmartPtr<ls_gf_type> ug::LevelSet::FVLSIntegral< TGridFunction >::m_spLSF
private

the specified LSF

◆ m_ss_integral

template<typename TGridFunction >
std::vector<number> ug::LevelSet::FVLSIntegral< TGridFunction >::m_ss_integral
private

integrals over the subsets

◆ m_ssGrp

template<typename TGridFunction >
SubsetGroup ug::LevelSet::FVLSIntegral< TGridFunction >::m_ssGrp
private

the subset group (if subsets specified)

Referenced by ug::LevelSet::FVLSIntegral< TGridFunction >::on_subsets().


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