ug4
ug::AssembledLinearOperator< TAlgebra > Class Template Reference

matrix operator based on the assembling of a problem More...

#include <assembled_linear_operator.h>

+ Inheritance diagram for ug::AssembledLinearOperator< TAlgebra >:

Public Types

typedef TAlgebra algebra_type
 Type of Algebra. More...
 
typedef MatrixOperator< matrix_type, vector_typebase_type
 Type of base class. More...
 
typedef TAlgebra::matrix_type matrix_type
 Type of Matrix. More...
 
typedef TAlgebra::vector_type vector_type
 Type of Vector. More...
 
- Public Types inherited from ug::MatrixOperator< TAlgebra::matrix_type, TAlgebra::vector_type >
typedef TAlgebra::vector_type codomain_function_type
 
typedef TAlgebra::vector_type domain_function_type
 
typedef TAlgebra::matrix_type matrix_type
 
- Public Types inherited from ug::ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type >
typedef TAlgebra::vector_type codomain_function_type
 Range space. More...
 
typedef TAlgebra::vector_type domain_function_type
 Domain space. More...
 
- Public Types inherited from ug::IOperator< X, Y >
typedef Y codomain_function_type
 Range space. More...
 
typedef X domain_function_type
 Domain space. More...
 

Public Member Functions

virtual void apply (vector_type &d, const vector_type &c)
 compute d = J(u)*c (here, J(u) is a Matrix) More...
 
virtual void apply_sub (vector_type &d, const vector_type &c)
 Compute d := d - J(u)*c. More...
 
 AssembledLinearOperator ()
 Default Constructor. More...
 
 AssembledLinearOperator (SmartPtr< IAssemble< TAlgebra > > ass)
 Constructor. More...
 
 AssembledLinearOperator (SmartPtr< IAssemble< TAlgebra > > ass, const GridLevel &gl)
 Constructor. More...
 
SmartPtr< IAssemble< TAlgebra > > discretization ()
 returns the discretization to be used More...
 
virtual void init ()
 initialize the operator More...
 
virtual void init (const vector_type &u)
 initializes the operator that may depend on the current solution More...
 
void init_op_and_rhs (vector_type &b)
 initializes the operator and assembles the passed rhs vector More...
 
const GridLevellevel () const
 returns the level More...
 
void set_dirichlet_values (vector_type &u)
 Set Dirichlet values. More...
 
void set_discretization (SmartPtr< IAssemble< TAlgebra > > ass)
 sets the discretization to be used More...
 
void set_level (const GridLevel &gl)
 sets the level used for assembling More...
 
virtual ~AssembledLinearOperator ()
 Destructor. More...
 
- Public Member Functions inherited from ug::MatrixOperator< TAlgebra::matrix_type, TAlgebra::vector_type >
virtual TAlgebra::matrix_typeget_matrix ()
 
- Public Member Functions inherited from ug::ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type >
virtual void prepare (TAlgebra::vector_type &u)
 default implementation for IOperator interface More...
 
virtual ~ILinearOperator ()
 virtual destructor More...
 
- Public Member Functions inherited from ug::IOperator< X, Y >
virtual void apply (Y &d, const X &u)=0
 computes the nonlinear mapping d := N(u) More...
 
virtual void prepare (X &u)=0
 prepares domain and codomain functions for application More...
 
virtual ~IOperator ()
 virtual destructor More...
 

Protected Attributes

GridLevel m_gridLevel
 
SmartPtr< IAssemble< TAlgebra > > m_spAss
 

Detailed Description

template<typename TAlgebra>
class ug::AssembledLinearOperator< TAlgebra >

matrix operator based on the assembling of a problem

This operator implements the MatrixOperator interface, thus is basically a matrix that can be applied to vectors. In addition the class allows to set an IAssemble object and an the GridLevel. Invoking the init method the matrix is created using the IAssemble routine on the given GridLevel.

Template Parameters
TAlgebraalgebra type

Member Typedef Documentation

◆ algebra_type

template<typename TAlgebra >
typedef TAlgebra ug::AssembledLinearOperator< TAlgebra >::algebra_type

Type of Algebra.

◆ base_type

template<typename TAlgebra >
typedef MatrixOperator<matrix_type,vector_type> ug::AssembledLinearOperator< TAlgebra >::base_type

Type of base class.

◆ matrix_type

template<typename TAlgebra >
typedef TAlgebra::matrix_type ug::AssembledLinearOperator< TAlgebra >::matrix_type

Type of Matrix.

◆ vector_type

template<typename TAlgebra >
typedef TAlgebra::vector_type ug::AssembledLinearOperator< TAlgebra >::vector_type

Type of Vector.

Constructor & Destructor Documentation

◆ AssembledLinearOperator() [1/3]

template<typename TAlgebra >
ug::AssembledLinearOperator< TAlgebra >::AssembledLinearOperator ( )
inline

Default Constructor.

◆ AssembledLinearOperator() [2/3]

template<typename TAlgebra >
ug::AssembledLinearOperator< TAlgebra >::AssembledLinearOperator ( SmartPtr< IAssemble< TAlgebra > >  ass)
inline

Constructor.

◆ AssembledLinearOperator() [3/3]

template<typename TAlgebra >
ug::AssembledLinearOperator< TAlgebra >::AssembledLinearOperator ( SmartPtr< IAssemble< TAlgebra > >  ass,
const GridLevel gl 
)
inline

Constructor.

◆ ~AssembledLinearOperator()

template<typename TAlgebra >
virtual ug::AssembledLinearOperator< TAlgebra >::~AssembledLinearOperator ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ apply()

template<typename TAlgebra >
void ug::AssembledLinearOperator< TAlgebra >::apply ( vector_type d,
const vector_type c 
)
virtual

compute d = J(u)*c (here, J(u) is a Matrix)

Reimplemented from ug::MatrixOperator< TAlgebra::matrix_type, TAlgebra::vector_type >.

References num_cols(), num_rows(), ug::PST_CONSISTENT, and UG_THROW.

◆ apply_sub()

template<typename TAlgebra >
void ug::AssembledLinearOperator< TAlgebra >::apply_sub ( vector_type d,
const vector_type c 
)
virtual

◆ discretization()

template<typename TAlgebra >
SmartPtr<IAssemble<TAlgebra> > ug::AssembledLinearOperator< TAlgebra >::discretization ( )
inline

returns the discretization to be used

References ug::AssembledLinearOperator< TAlgebra >::m_spAss.

◆ init() [1/2]

template<typename TAlgebra >
void ug::AssembledLinearOperator< TAlgebra >::init
virtual

initialize the operator

Reimplemented from ug::MatrixOperator< TAlgebra::matrix_type, TAlgebra::vector_type >.

References UG_CATCH_THROW, and UG_THROW.

◆ init() [2/2]

template<typename TAlgebra >
void ug::AssembledLinearOperator< TAlgebra >::init ( const vector_type u)
virtual

initializes the operator that may depend on the current solution

Reimplemented from ug::MatrixOperator< TAlgebra::matrix_type, TAlgebra::vector_type >.

References UG_CATCH_THROW, and UG_THROW.

◆ init_op_and_rhs()

template<typename TAlgebra >
void ug::AssembledLinearOperator< TAlgebra >::init_op_and_rhs ( vector_type b)

initializes the operator and assembles the passed rhs vector

References UG_CATCH_THROW, and UG_THROW.

Referenced by ug::AssembleLinearOperatorRhsAndSolution().

◆ level()

template<typename TAlgebra >
const GridLevel& ug::AssembledLinearOperator< TAlgebra >::level ( ) const
inline

◆ set_dirichlet_values()

template<typename TAlgebra >
void ug::AssembledLinearOperator< TAlgebra >::set_dirichlet_values ( vector_type u)

Set Dirichlet values.

References UG_CATCH_THROW, and UG_THROW.

Referenced by ug::AssembleLinearOperatorRhsAndSolution().

◆ set_discretization()

template<typename TAlgebra >
void ug::AssembledLinearOperator< TAlgebra >::set_discretization ( SmartPtr< IAssemble< TAlgebra > >  ass)
inline

sets the discretization to be used

References ug::AssembledLinearOperator< TAlgebra >::m_spAss.

◆ set_level()

template<typename TAlgebra >
void ug::AssembledLinearOperator< TAlgebra >::set_level ( const GridLevel gl)
inline

sets the level used for assembling

References ug::AssembledLinearOperator< TAlgebra >::m_gridLevel.

Member Data Documentation

◆ m_gridLevel

◆ m_spAss


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