ug4
ug::UserDataDistIntegrandSq< TData, TGridFunction > Class Template Reference

For arbitrary UserData \(f\) and grid functions \(u_1\) and \(u_2\), this class (should) define the integrand \( (f(u_1)- f(u_2))^2 \). More...

#include <integrate.h>

+ Inheritance diagram for ug::UserDataDistIntegrandSq< TData, TGridFunction >:

Public Member Functions

template<int elemDim>
void evaluate (number vValue[], const MathVector< worldDim > vGlobIP[], GridObject *pFineElem, const MathVector< worldDim > vCornerCoords[], const MathVector< elemDim > vFineLocIP[], const MathMatrix< elemDim, worldDim > vJT[], const size_t numIP)
 returns the values of the integrand for a bunch of ips More...
 
virtual void set_subset (int si)
 sets subset More...
 
 UserDataDistIntegrandSq (SmartPtr< UserData< TData, worldDim > > spData, TGridFunction &fineGridFct, size_t fineCmp, TGridFunction &coarseGridFct, size_t coarseCmp)
 constructor (1st is fine grid function) More...
 
virtual ~UserDataDistIntegrandSq ()
 
- Public Member Functions inherited from ug::StdIntegrand< number, TGridFunction::dim, UserDataDistIntegrandSq< TData, TGridFunction > >
virtual void values (number vValue[], const MathVector< worldDim > vGlobIP[], GridObject *pElem, const MathVector< worldDim > vCornerCoords[], const MathVector< 1 > vLocIP[], const MathMatrix< 1, worldDim > vJT[], const size_t numIP)
 
virtual void values (number vValue[], const MathVector< worldDim > vGlobIP[], GridObject *pElem, const MathVector< worldDim > vCornerCoords[], const MathVector< 2 > vLocIP[], const MathMatrix< 2, worldDim > vJT[], const size_t numIP)
 
virtual void values (number vValue[], const MathVector< worldDim > vGlobIP[], GridObject *pElem, const MathVector< worldDim > vCornerCoords[], const MathVector< 3 > vLocIP[], const MathMatrix< 3, worldDim > vJT[], const size_t numIP)
 
- Public Member Functions inherited from ug::IIntegrand< TData, TWorldDim >
int subset () const
 returns the subset More...
 
virtual ~IIntegrand ()
 
virtual void values (TData vValue[], const MathVector< worldDim > vGlobIP[], GridObject *pElem, const MathVector< worldDim > vCornerCoords[], const MathVector< 1 > vLocIP[], const MathMatrix< 1, worldDim > vJT[], const size_t numIP)=0
 returns the values of the integrand for a bunch of ips More...
 
virtual void values (TData vValue[], const MathVector< worldDim > vGlobIP[], GridObject *pElem, const MathVector< worldDim > vCornerCoords[], const MathVector< 2 > vLocIP[], const MathMatrix< 2, worldDim > vJT[], const size_t numIP)=0
 returns the values of the integrand for a bunch of ips More...
 
virtual void values (TData vValue[], const MathVector< worldDim > vGlobIP[], GridObject *pElem, const MathVector< worldDim > vCornerCoords[], const MathVector< 3 > vLocIP[], const MathMatrix< 3, worldDim > vJT[], const size_t numIP)=0
 returns the values of the integrand for a bunch of ips More...
 

Static Public Attributes

static const int worldDim = TGridFunction::dim
 world dimension of grid function More...
 
- Static Public Attributes inherited from ug::StdIntegrand< number, TGridFunction::dim, UserDataDistIntegrandSq< TData, TGridFunction > >
static const int worldDim
 world dimension More...
 
- Static Public Attributes inherited from ug::IIntegrand< TData, TWorldDim >
static const int worldDim = TWorldDim
 world dimension More...
 

Protected Member Functions

number inner_dist2 (const MathVector< worldDim > &v1, const MathVector< worldDim > &v2)
 
number inner_dist2 (const number &v1, const number &v2)
 
template<typename T >
number inner_dist2 (const T &d1, const T &d2)
 
number inner_prod (const MathVector< worldDim > &d1, const MathVector< worldDim > &d2)
 
number inner_prod (const number &d1, const number &d2)
 
template<typename T >
number inner_prod (const T &d1, const T &d2)
 
- Protected Member Functions inherited from ug::StdIntegrand< number, TGridFunction::dim, UserDataDistIntegrandSq< TData, TGridFunction > >
UserDataDistIntegrandSq< TData, TGridFunction > & getImpl ()
 access to implementation More...
 
const UserDataDistIntegrandSq< TData, TGridFunction > & getImpl () const
 const access to implementation More...
 

Protected Attributes

ScalarGridFunctionData< TGridFunction > m_coarseData
 
const int m_coarseTopLevel
 
ScalarGridFunctionData< TGridFunction > m_fineData
 
const int m_fineTopLevel
 
SmartPtr< UserData< TData, worldDim > > m_spData
 
SmartPtr< MultiGridm_spMG
 multigrid More...
 
double m_time
 
- Protected Attributes inherited from ug::IIntegrand< TData, TWorldDim >
int m_si
 subset More...
 

Additional Inherited Members

- Public Types inherited from ug::StdIntegrand< number, TGridFunction::dim, UserDataDistIntegrandSq< TData, TGridFunction > >
typedef number data_type
 data type More...
 
- Public Types inherited from ug::IIntegrand< TData, TWorldDim >
typedef TData data_type
 data type More...
 

Detailed Description

template<typename TData, typename TGridFunction>
class ug::UserDataDistIntegrandSq< TData, TGridFunction >

For arbitrary UserData \(f\) and grid functions \(u_1\) and \(u_2\), this class (should) define the integrand \( (f(u_1)- f(u_2))^2 \).

Constructor & Destructor Documentation

◆ UserDataDistIntegrandSq()

template<typename TData , typename TGridFunction >
ug::UserDataDistIntegrandSq< TData, TGridFunction >::UserDataDistIntegrandSq ( SmartPtr< UserData< TData, worldDim > >  spData,
TGridFunction &  fineGridFct,
size_t  fineCmp,
TGridFunction &  coarseGridFct,
size_t  coarseCmp 
)
inline

◆ ~UserDataDistIntegrandSq()

template<typename TData , typename TGridFunction >
virtual ug::UserDataDistIntegrandSq< TData, TGridFunction >::~UserDataDistIntegrandSq ( )
inlinevirtual

Member Function Documentation

◆ evaluate()

template<typename TData , typename TGridFunction >
template<int elemDim>
void ug::UserDataDistIntegrandSq< TData, TGridFunction >::evaluate ( number  vValue[],
const MathVector< worldDim vGlobIP[],
GridObject pFineElem,
const MathVector< worldDim vCornerCoords[],
const MathVector< elemDim >  vFineLocIP[],
const MathMatrix< elemDim, worldDim vJT[],
const size_t  numIP 
)
inline

◆ inner_dist2() [1/3]

template<typename TData , typename TGridFunction >
number ug::UserDataDistIntegrandSq< TData, TGridFunction >::inner_dist2 ( const MathVector< worldDim > &  v1,
const MathVector< worldDim > &  v2 
)
inlineprotected

References ug::VecDistanceSq().

◆ inner_dist2() [2/3]

template<typename TData , typename TGridFunction >
number ug::UserDataDistIntegrandSq< TData, TGridFunction >::inner_dist2 ( const number v1,
const number v2 
)
inlineprotected

◆ inner_dist2() [3/3]

template<typename TData , typename TGridFunction >
template<typename T >
number ug::UserDataDistIntegrandSq< TData, TGridFunction >::inner_dist2 ( const T &  d1,
const T &  d2 
)
inlineprotected

References UG_ASSERT.

◆ inner_prod() [1/3]

template<typename TData , typename TGridFunction >
number ug::UserDataDistIntegrandSq< TData, TGridFunction >::inner_prod ( const MathVector< worldDim > &  d1,
const MathVector< worldDim > &  d2 
)
inlineprotected

References ug::VecDot().

◆ inner_prod() [2/3]

template<typename TData , typename TGridFunction >
number ug::UserDataDistIntegrandSq< TData, TGridFunction >::inner_prod ( const number d1,
const number d2 
)
inlineprotected

◆ inner_prod() [3/3]

template<typename TData , typename TGridFunction >
template<typename T >
number ug::UserDataDistIntegrandSq< TData, TGridFunction >::inner_prod ( const T &  d1,
const T &  d2 
)
inlineprotected

References UG_ASSERT.

◆ set_subset()

template<typename TData , typename TGridFunction >
virtual void ug::UserDataDistIntegrandSq< TData, TGridFunction >::set_subset ( int  si)
inlinevirtual

Member Data Documentation

◆ m_coarseData

◆ m_coarseTopLevel

template<typename TData , typename TGridFunction >
const int ug::UserDataDistIntegrandSq< TData, TGridFunction >::m_coarseTopLevel
protected

◆ m_fineData

◆ m_fineTopLevel

template<typename TData , typename TGridFunction >
const int ug::UserDataDistIntegrandSq< TData, TGridFunction >::m_fineTopLevel
protected

◆ m_spData

template<typename TData , typename TGridFunction >
SmartPtr<UserData<TData, worldDim> > ug::UserDataDistIntegrandSq< TData, TGridFunction >::m_spData
protected

◆ m_spMG

template<typename TData , typename TGridFunction >
SmartPtr<MultiGrid> ug::UserDataDistIntegrandSq< TData, TGridFunction >::m_spMG
protected

◆ m_time

template<typename TData , typename TGridFunction >
double ug::UserDataDistIntegrandSq< TData, TGridFunction >::m_time
protected

◆ worldDim

template<typename TData , typename TGridFunction >
const int ug::UserDataDistIntegrandSq< TData, TGridFunction >::worldDim = TGridFunction::dim
static

world dimension of grid function


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