ug4
ug::StdInjection< TDomain, TAlgebra > Class Template Reference

#include <std_injection.h>

+ Inheritance diagram for ug::StdInjection< TDomain, TAlgebra >:

Public Types

typedef TAlgebra algebra_type
 Type of algebra. More...
 
typedef ITransferOperator< TDomain, TAlgebra > base_type
 Type of base class. More...
 
typedef TDomain domain_type
 Type of Domain. More...
 
typedef TAlgebra::matrix_type matrix_type
 Type of Vector. More...
 
typedef TAlgebra::vector_type vector_type
 Type of Vector. More...
 
- Public Types inherited from ug::ITransferOperator< TDomain, TAlgebra >
typedef TDomain domain_type
 Domain type. More...
 
typedef TAlgebra::matrix_type matrix_type
 Matrix type. More...
 
typedef TAlgebra::vector_type vector_type
 Vector type. More...
 

Public Member Functions

virtual SmartPtr< ITransferOperator< TDomain, TAlgebra > > clone ()
 clones the operator More...
 
virtual void do_restrict (vector_type &uCoarse, const vector_type &uFine)
 Apply Transposed Operator u = L^T*f. More...
 
virtual void init ()
 Init operator. More...
 
virtual void prolongate (vector_type &uFine, const vector_type &uCoarse)
 Project uFine to uCoarse; uCoarse = P(uFine);. More...
 
void set_approximation_space (SmartPtr< ApproximationSpace< TDomain > > approxSpace)
 Set Approximation Space. More...
 
void set_levels (GridLevel coarseLevel, GridLevel fineLevel)
 Set approximation level. More...
 
 StdInjection ()
 Constructor. More...
 
 StdInjection (SmartPtr< ApproximationSpace< TDomain > > approxSpace)
 Constructor. More...
 
virtual ~StdInjection ()
 virtual Destructor More...
 
- Public Member Functions inherited from ug::ITransferOperator< TDomain, TAlgebra >
virtual void add_constraint (SmartPtr< IConstraint< TAlgebra > > pp)
 adds a dirichlet post process (not added if already registered) More...
 
virtual void clear_constraints ()
 clears dirichlet post processes More...
 
 ITransferOperator ()
 constructor More...
 
virtual SmartPtr< matrix_typeprolongation (const GridLevel &fineGL, const GridLevel &coarseGL, ConstSmartPtr< ApproximationSpace< TDomain > > spApproxSpace)
 returns prolongation as a matrix More...
 
virtual void remove_constraint (SmartPtr< IConstraint< TAlgebra > > pp)
 removes a post process More...
 
virtual SmartPtr< matrix_typerestriction (const GridLevel &coarseGL, const GridLevel &fineGL, ConstSmartPtr< ApproximationSpace< TDomain > > spApproxSpace)
 returns restriction as a matrix More...
 
virtual ~ITransferOperator ()
 virtual destructor More...
 

Protected Member Functions

template<typename TElem >
void set_identity_on_pure_surface (matrix_type &mat, const DoFDistribution &coarseDD, const DoFDistribution &fineDD)
 
void set_identity_on_pure_surface (matrix_type &mat, const DoFDistribution &coarseDD, const DoFDistribution &fineDD)
 

Protected Attributes

bool m_bInit
 init flag More...
 
GridLevel m_coarseLevel
 coarse level of approximation space More...
 
GridLevel m_fineLevel
 fine level of approximation space More...
 
matrix_type m_matrix
 matrix used for projection More...
 
SmartPtr< ApproximationSpace< TDomain > > m_spApproxSpace
 the underlying approximation space More...
 
- Protected Attributes inherited from ug::ITransferOperator< TDomain, TAlgebra >
std::vector< SmartPtr< IConstraint< TAlgebra > > > m_vConstraint
 list of post processes More...
 

Detailed Description

template<typename TDomain, typename TAlgebra>
class ug::StdInjection< TDomain, TAlgebra >

The Projection operator transfers is used to transfer vectors between two grid levels. It implements a purely algebraic interface, just mapping between two algebraic vectors, but given the approximation space this is indeed a mapping between two grid functions.

Template Parameters
TDomainthe domain
TAlgebrathe algebra

Member Typedef Documentation

◆ algebra_type

template<typename TDomain , typename TAlgebra >
typedef TAlgebra ug::StdInjection< TDomain, TAlgebra >::algebra_type

Type of algebra.

◆ base_type

template<typename TDomain , typename TAlgebra >
typedef ITransferOperator<TDomain, TAlgebra> ug::StdInjection< TDomain, TAlgebra >::base_type

Type of base class.

◆ domain_type

template<typename TDomain , typename TAlgebra >
typedef TDomain ug::StdInjection< TDomain, TAlgebra >::domain_type

Type of Domain.

◆ matrix_type

template<typename TDomain , typename TAlgebra >
typedef TAlgebra::matrix_type ug::StdInjection< TDomain, TAlgebra >::matrix_type

Type of Vector.

◆ vector_type

template<typename TDomain , typename TAlgebra >
typedef TAlgebra::vector_type ug::StdInjection< TDomain, TAlgebra >::vector_type

Type of Vector.

Constructor & Destructor Documentation

◆ StdInjection() [1/2]

template<typename TDomain , typename TAlgebra >
ug::StdInjection< TDomain, TAlgebra >::StdInjection ( )
inline

Constructor.

◆ StdInjection() [2/2]

template<typename TDomain , typename TAlgebra >
ug::StdInjection< TDomain, TAlgebra >::StdInjection ( SmartPtr< ApproximationSpace< TDomain > >  approxSpace)
inline

Constructor.

◆ ~StdInjection()

template<typename TDomain , typename TAlgebra >
virtual ug::StdInjection< TDomain, TAlgebra >::~StdInjection ( )
inlinevirtual

virtual Destructor

Member Function Documentation

◆ clone()

template<typename TDomain , typename TAlgebra >
SmartPtr< ITransferOperator< TDomain, TAlgebra > > ug::StdInjection< TDomain, TAlgebra >::clone
virtual

clones the operator

Implements ug::ITransferOperator< TDomain, TAlgebra >.

◆ do_restrict()

template<typename TDomain , typename TAlgebra >
void ug::StdInjection< TDomain, TAlgebra >::do_restrict ( vector_type uCoarse,
const vector_type uFine 
)
virtual

Apply Transposed Operator u = L^T*f.

Implements ug::ITransferOperator< TDomain, TAlgebra >.

References PROFILE_FUNC_GROUP, UG_ASSERT, UG_CATCH_THROW, and UG_THROW.

◆ init()

template<typename TDomain , typename TAlgebra >
void ug::StdInjection< TDomain, TAlgebra >::init
virtual

◆ prolongate()

template<typename TDomain , typename TAlgebra >
void ug::StdInjection< TDomain, TAlgebra >::prolongate ( vector_type uFine,
const vector_type uCoarse 
)
virtual

Project uFine to uCoarse; uCoarse = P(uFine);.

Implements ug::ITransferOperator< TDomain, TAlgebra >.

References PROFILE_FUNC_GROUP, UG_ASSERT, and UG_THROW.

◆ set_approximation_space()

template<typename TDomain , typename TAlgebra >
void ug::StdInjection< TDomain, TAlgebra >::set_approximation_space ( SmartPtr< ApproximationSpace< TDomain > >  approxSpace)

Set Approximation Space.

◆ set_identity_on_pure_surface() [1/2]

template<typename TDomain , typename TAlgebra >
template<typename TElem >
void ug::StdInjection< TDomain, TAlgebra >::set_identity_on_pure_surface ( matrix_type mat,
const DoFDistribution coarseDD,
const DoFDistribution fineDD 
)
protected

◆ set_identity_on_pure_surface() [2/2]

template<typename TDomain , typename TAlgebra >
void ug::StdInjection< TDomain, TAlgebra >::set_identity_on_pure_surface ( matrix_type mat,
const DoFDistribution coarseDD,
const DoFDistribution fineDD 
)
protected

◆ set_levels()

template<typename TDomain , typename TAlgebra >
void ug::StdInjection< TDomain, TAlgebra >::set_levels ( GridLevel  coarseLevel,
GridLevel  fineLevel 
)
virtual

Set approximation level.

Implements ug::ITransferOperator< TDomain, TAlgebra >.

References UG_THROW.

Member Data Documentation

◆ m_bInit

template<typename TDomain , typename TAlgebra >
bool ug::StdInjection< TDomain, TAlgebra >::m_bInit
protected

init flag

◆ m_coarseLevel

template<typename TDomain , typename TAlgebra >
GridLevel ug::StdInjection< TDomain, TAlgebra >::m_coarseLevel
protected

coarse level of approximation space

◆ m_fineLevel

template<typename TDomain , typename TAlgebra >
GridLevel ug::StdInjection< TDomain, TAlgebra >::m_fineLevel
protected

fine level of approximation space

◆ m_matrix

template<typename TDomain , typename TAlgebra >
matrix_type ug::StdInjection< TDomain, TAlgebra >::m_matrix
protected

matrix used for projection

◆ m_spApproxSpace

template<typename TDomain , typename TAlgebra >
SmartPtr<ApproximationSpace<TDomain> > ug::StdInjection< TDomain, TAlgebra >::m_spApproxSpace
protected

the underlying approximation space


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