ug4
ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler > Class Template Reference

generic domain discretization implementing the interface More...

#include <domain_disc.h>

+ Inheritance diagram for ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >:

Public Types

typedef TAlgebra algebra_type
 Type of algebra. More...
 
typedef ApproximationSpace< TDomain > approx_space_type
 Type of approximation space. More...
 
typedef TDomain domain_type
 Type of Domain. More...
 
typedef CPUAlgebra::vector_type error_vector_type
 Type of error vector. More...
 
typedef algebra_type::matrix_type matrix_type
 Type of algebra matrix. More...
 
typedef algebra_type::vector_type vector_type
 Type of algebra vector. More...
 
- Public Types inherited from ug::IDomainDiscretization< TAlgebra >
typedef TAlgebra algebra_type
 Algebra type. More...
 
typedef algebra_type::matrix_type matrix_type
 Type of algebra matrix. More...
 
typedef algebra_type::vector_type vector_type
 Type of algebra vector. More...
 
- Public Types inherited from ug::IAssemble< TAlgebra >
typedef TAlgebra algebra_type
 Algebra type. More...
 
typedef TAlgebra::matrix_type matrix_type
 Type of algebra matrix. More...
 
typedef TAlgebra::vector_type vector_type
 Type of algebra vector. More...
 
- Public Types inherited from ug::IDomainErrorIndicator< TAlgebra >
typedef CPUAlgebra::vector_type error_vector_type
 Type of error vector. More...
 
typedef TAlgebra::vector_type vector_type
 Type of algebra vector. More...
 
- Public Types inherited from ug::IDomainMarker< TDomain >
typedef IElementMarkingStrategy< TDomain > element_marking_strategy_type
 Type of algebra vector. More...
 

Public Member Functions

void add (SmartPtr< IDiscretizationItem< TDomain, TAlgebra > > di)
 adds a disc item to the assembling process More...
 
void add (SmartPtr< IDomainConstraint< TDomain, TAlgebra > > pp)
 adds a constraint to the assembling process More...
 
void add (SmartPtr< IElemDisc< TDomain > > elem)
 adds an element discretization to the assembling process More...
 
void add_elem_error_indicator (SmartPtr< IElemError< TDomain > > elem)
 adds an element error indicator to the assembling process More...
 
virtual void adjust_solution (vector_type &u, const GridLevel &gl)
 sets dirichlet values in solution vector More...
 
virtual void adjust_solution (vector_type &u, ConstSmartPtr< DoFDistribution > dd)
 sets dirichlet values in solution vector More...
 
virtual void adjust_solution (vector_type &u, number time, const GridLevel &gl)
 sets dirichlet values in solution vector More...
 
virtual void adjust_solution (vector_type &u, number time, ConstSmartPtr< DoFDistribution > dd)
 sets dirichlet values in solution vector More...
 
SmartPtr< approx_space_typeapproximation_space ()
 
ConstSmartPtr< approx_space_typeapproximation_space () const
 
virtual void assemble_defect (vector_type &d, const vector_type &u, const GridLevel &gl)
 assembles Defect More...
 
virtual void assemble_defect (vector_type &d, const vector_type &u, ConstSmartPtr< DoFDistribution > dd)
 assembles Defect More...
 
virtual void assemble_defect (vector_type &d, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff, const GridLevel &gl)
 assembles Defect More...
 
virtual void assemble_defect (vector_type &d, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff, ConstSmartPtr< DoFDistribution > dd)
 assembles Defect More...
 
virtual void assemble_jacobian (matrix_type &J, const vector_type &u, const GridLevel &gl)
 assembles Jacobian (or Approximation of Jacobian) More...
 
virtual void assemble_jacobian (matrix_type &J, const vector_type &u, ConstSmartPtr< DoFDistribution > dd)
 assembles Jacobian (or Approximation of Jacobian) More...
 
virtual void assemble_jacobian (matrix_type &J, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const number s_a, const GridLevel &gl)
 assembles Jacobian (or Approximation of Jacobian) More...
 
virtual void assemble_jacobian (matrix_type &J, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const number s_a0, ConstSmartPtr< DoFDistribution > dd)
 assembles Jacobian (or Approximation of Jacobian) More...
 
virtual void assemble_linear (matrix_type &A, vector_type &b, ConstSmartPtr< DoFDistribution > dd)
 Assembles Matrix and Right-Hand-Side for a linear problem. More...
 
virtual void assemble_linear (matrix_type &A, vector_type &b, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff, const GridLevel &gl)
 Assembles matrix_type and Right-Hand-Side for a linear problem. More...
 
virtual void assemble_linear (matrix_type &A, vector_type &b, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff, ConstSmartPtr< DoFDistribution > dd)
 Assembles Matrix and Right-Hand-Side for a linear problem. More...
 
virtual void assemble_linear (matrix_type &mat, vector_type &rhs, const GridLevel &gl)
 Assembles Matrix and Right-Hand-Side for a linear problem. More...
 
virtual void assemble_mass_matrix (matrix_type &M, const vector_type &u, const GridLevel &gl)
 assembles the mass matrix More...
 
virtual void assemble_mass_matrix (matrix_type &M, const vector_type &u, ConstSmartPtr< DoFDistribution > dd)
 assembles the mass matrix More...
 
virtual void assemble_rhs (vector_type &b, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff, const GridLevel &gl)
 Assembles Right-Hand-Side for a linear problem. More...
 
virtual void assemble_rhs (vector_type &b, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff, ConstSmartPtr< DoFDistribution > dd)
 assembles the rhs More...
 
virtual void assemble_rhs (vector_type &rhs, const GridLevel &gl)
 assembles the rhs More...
 
virtual void assemble_rhs (vector_type &rhs, const vector_type &u, const GridLevel &gl)
 assembles the rhs More...
 
virtual void assemble_rhs (vector_type &rhs, const vector_type &u, ConstSmartPtr< DoFDistribution > dd)
 assembles rhs More...
 
virtual void assemble_rhs (vector_type &rhs, ConstSmartPtr< DoFDistribution > dd)
 assembles rhs More...
 
virtual void assemble_stiffness_matrix (matrix_type &A, const vector_type &u, const GridLevel &gl)
 assembles the stiffness matrix More...
 
virtual void assemble_stiffness_matrix (matrix_type &A, const vector_type &u, ConstSmartPtr< DoFDistribution > dd)
 assembles the stiffness matrix More...
 
virtual void calc_error (const GridFunction< TDomain, TAlgebra > &u)
 
virtual void calc_error (const GridFunction< TDomain, TAlgebra > &u, error_vector_type *u_vtk)
 
virtual void calc_error (const vector_type &u, const GridLevel &gl, error_vector_type *u_vtk=NULL)
 
virtual void calc_error (const vector_type &u, ConstSmartPtr< DoFDistribution > dd, error_vector_type *u_vtk=NULL)
 
virtual void calc_error (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff, const GridLevel &gl, error_vector_type *u_vtk)
 Transient version. More...
 
virtual void calc_error (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, ConstSmartPtr< DoFDistribution > dd, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff, error_vector_type *u_vtk)
 Transient version. More...
 
virtual SmartPtr< IConstraint< TAlgebra > > constraint (size_t i)
 returns the i'th constraint More...
 
 DomainDiscretizationBase (SmartPtr< approx_space_type > pApproxSpace)
 default Constructor More...
 
virtual void finish_timestep (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const GridLevel &gl)
 
virtual void finish_timestep (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, ConstSmartPtr< DoFDistribution > dd)
 finishes time step More...
 
virtual void finish_timestep_elem (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const GridLevel &gl)
 finishes timestep More...
 
virtual void finish_timestep_elem (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, ConstSmartPtr< DoFDistribution > dd)
 finishes timestep More...
 
virtual void invalidate_error ()
 
virtual bool is_error_valid ()
 returns whether current error values are valid More...
 
virtual void mark_with_strategy (IRefiner &refiner, SmartPtr< IElementMarkingStrategy< TDomain > > strategy)
 
virtual size_t num_constraints () const
 returns number of registered constraints More...
 
virtual void prepare_timestep (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, number future_time, const GridLevel &gl)
 
virtual void prepare_timestep (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, number future_time, ConstSmartPtr< DoFDistribution > dd)
 prepares time step More...
 
virtual void prepare_timestep_elem (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const GridLevel &gl)
 
virtual void prepare_timestep_elem (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, ConstSmartPtr< DoFDistribution > dd)
 prepares time step element-wise More...
 
void remove (SmartPtr< IDomainConstraint< TDomain, TAlgebra > > pp)
 removes a constraint from the assembling process More...
 
void remove (SmartPtr< IElemDisc< TDomain > > elem)
 removes a element discretization from the assembling process More...
 
void remove_elem_error_indicator (SmartPtr< IElemError< TDomain > > elem)
 removes a element discretization from the assembling process More...
 
virtual ~DomainDiscretizationBase ()
 virtual destructor More...
 
void assemble_jacobian (matrix_type &J, GridFunction< TDomain, TAlgebra > &u)
 
void assemble_defect (vector_type &d, GridFunction< TDomain, TAlgebra > &u)
 
void assemble_linear (matrix_type &A, GridFunction< TDomain, TAlgebra > &rhs)
 
void assemble_rhs (vector_type &rhs, GridFunction< TDomain, TAlgebra > &u)
 
void assemble_rhs (GridFunction< TDomain, TAlgebra > &b)
 
void adjust_solution (GridFunction< TDomain, TAlgebra > &u)
 
virtual SmartPtr< AssemblingTuner< TAlgebra > > ass_tuner ()
 
virtual ConstSmartPtr< AssemblingTuner< TAlgebra > > ass_tuner () const
 
- Public Member Functions inherited from ug::IDomainDiscretization< TAlgebra >
void adjust_solution (vector_type &u, number time)
 adjust solution on surface level More...
 
void assemble_defect (vector_type &d, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff)
 assembles defect on surface level More...
 
void assemble_jacobian (matrix_type &J, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const number s_a)
 assembles jacobian on surface level More...
 
void assemble_linear (matrix_type &A, vector_type &b, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff)
 assembles linear on surface level More...
 
void assemble_rhs (vector_type &b, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff)
 assembles rhs on surface level More...
 
virtual void finish_timestep (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol)
 
void finish_timestep_elem (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol)
 finishes timestep on surface level More...
 
virtual void prepare_timestep (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, number future_time)
 
void prepare_timestep_elem (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol)
 prepares timestep on surface level More...
 
virtual ~IDomainDiscretization ()
 
- Public Member Functions inherited from ug::IAssemble< TAlgebra >
void adjust_solution (vector_type &u)
 
void assemble_defect (vector_type &d, const vector_type &u)
 
void assemble_jacobian (matrix_type &J, const vector_type &u)
 
void assemble_linear (matrix_type &A, vector_type &b)
 
void assemble_mass_matrix (matrix_type &M, const vector_type &u)
 
void assemble_rhs (vector_type &b)
 
virtual void assemble_rhs (vector_type &rhs, const vector_type &u)
 
void assemble_stiffness_matrix (matrix_type &A, const vector_type &u)
 
virtual ~IAssemble ()
 Virtual Destructor. More...
 
- Public Member Functions inherited from ug::IDomainErrorIndicator< TAlgebra >
virtual ~IDomainErrorIndicator ()
 
- Public Member Functions inherited from ug::IDomainMarker< TDomain >
virtual ~IDomainMarker ()
 

Static Public Attributes

static const int dim = TDomain::dim
 world dimension More...
 

Protected Member Functions

ConstSmartPtr< DoFDistributiondd (const GridLevel &gl) const
 returns the level dof distribution More...
 
void update_constraints ()
 
void update_disc_items ()
 
void update_elem_discs ()
 set the approximation space in the elem discs and extract IElemDiscs More...
 
void update_elem_errors ()
 
void update_error_items ()
 

Protected Attributes

bool m_bErrorCalculated
 
IMultigridElementIndicators< TDomain > m_mgElemErrors
 
SmartPtr< approx_space_typem_spApproxSpace
 current approximation space More...
 
SmartPtr< AssemblingTuner< TAlgebra > > m_spAssTuner
 this object provides tools to adapt the assemble routine More...
 
std::vector< SmartPtr< IDomainConstraint< TDomain, TAlgebra > > > m_vConstraint
 vector holding all registered constraints More...
 
std::vector< SmartPtr< IElemDisc< TDomain > > > m_vDomainElemDisc
 vector holding all registered elem discs More...
 
std::vector< SmartPtr< IElemError< TDomain > > > m_vDomainElemError
 vector holding all registered elem discs More...
 
std::vector< IElemDisc< TDomain > * > m_vElemDisc
 vector holding all registered elem discs More...
 
std::vector< IElemError< TDomain > * > m_vElemError
 vector holding all registered elem discs More...
 

Private Types

typedef TGlobAssembler gass_type
 Type of the global assembler. More...
 

Private Member Functions

template<typename TElem >
void AssembleDefect (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< DoFDistribution > dd, int si, bool bNonRegularGrid, vector_type &d, const vector_type &u)
 
template<typename TElem >
void AssembleDefect (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< DoFDistribution > dd, int si, bool bNonRegularGrid, vector_type &d, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff)
 
template<typename TElem >
void AssembleErrorEstimator (const std::vector< IElemError< domain_type > * > &vElemDisc, ConstSmartPtr< DoFDistribution > dd, int si, bool bNonRegularGrid, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol)
 
template<typename TElem >
void AssembleErrorEstimator (const std::vector< IElemError< domain_type > * > &vElemDisc, ConstSmartPtr< DoFDistribution > dd, int si, bool bNonRegularGrid, const vector_type &u)
 
template<typename TElem >
void AssembleJacobian (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< DoFDistribution > dd, int si, bool bNonRegularGrid, matrix_type &J, const vector_type &u)
 
template<typename TElem >
void AssembleJacobian (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< DoFDistribution > dd, int si, bool bNonRegularGrid, matrix_type &J, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, number s_a0)
 
template<typename TElem >
void AssembleLinear (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< DoFDistribution > dd, int si, bool bNonRegularGrid, matrix_type &A, vector_type &rhs)
 
template<typename TElem >
void AssembleLinear (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< DoFDistribution > dd, int si, bool bNonRegularGrid, matrix_type &A, vector_type &rhs, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff)
 
template<typename TElem >
void AssembleMassMatrix (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< DoFDistribution > dd, int si, bool bNonRegularGrid, matrix_type &M, const vector_type &u)
 
template<typename TElem >
void AssembleRhs (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< DoFDistribution > dd, int si, bool bNonRegularGrid, vector_type &rhs, const vector_type &u)
 
template<typename TElem >
void AssembleRhs (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< DoFDistribution > dd, int si, bool bNonRegularGrid, vector_type &rhs, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff)
 
template<typename TElem >
void AssembleStiffnessMatrix (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< DoFDistribution > dd, int si, bool bNonRegularGrid, matrix_type &A, const vector_type &u)
 
template<typename TElem >
void FinishTimestepElem (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< DoFDistribution > dd, int si, bool bNonRegularGrid, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol)
 
template<typename TElem >
void PrepareTimestepElem (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< DoFDistribution > dd, int si, bool bNonRegularGrid, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol)
 

Detailed Description

template<typename TDomain, typename TAlgebra, typename TGlobAssembler>
class ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >

generic domain discretization implementing the interface

This class template is an implementation of the IDomainDiscretization interface based on the simple groupping of several local (element) discretizations and constraints.

Functions of this class template prepare lists of the local discretizations and elements (where to assemble) for every subset, whereas assembling itself is performed by functions of the so-called 'global assembler class' specified by the TGlobAssembler template parameter. The latter class implements assembling for the generic lists of elements belonging to only one subset. Cf. class StdGlobAssembler for a complete example. Note that all the functions from that example should be implemented (no matter where as regular or static members).

Template Parameters
TDomaindomain type
TAlgebraalgebra type
TGlobAssemblerglobal assembler type

Member Typedef Documentation

◆ algebra_type

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
typedef TAlgebra ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::algebra_type

Type of algebra.

◆ approx_space_type

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
typedef ApproximationSpace<TDomain> ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::approx_space_type

Type of approximation space.

◆ domain_type

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
typedef TDomain ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::domain_type

Type of Domain.

◆ error_vector_type

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
typedef CPUAlgebra::vector_type ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::error_vector_type

Type of error vector.

◆ gass_type

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
typedef TGlobAssembler ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::gass_type
private

Type of the global assembler.

◆ matrix_type

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
typedef algebra_type::matrix_type ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::matrix_type

Type of algebra matrix.

◆ vector_type

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
typedef algebra_type::vector_type ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::vector_type

Type of algebra vector.

Constructor & Destructor Documentation

◆ DomainDiscretizationBase()

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::DomainDiscretizationBase ( SmartPtr< approx_space_type pApproxSpace)
inline

default Constructor

References new().

◆ ~DomainDiscretizationBase()

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

virtual destructor

Member Function Documentation

◆ add() [1/3]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::add ( SmartPtr< IDiscretizationItem< TDomain, TAlgebra > >  di)
inline

adds a disc item to the assembling process

This function adds a IDiscretizationItem to the assembling. The contained elem discs and constraints are sorted into the lists

Parameters
[in]diDisc Item

References ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::add().

◆ add() [2/3]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::add ( SmartPtr< IDomainConstraint< TDomain, TAlgebra > >  pp)
inline

adds a constraint to the assembling process

This function adds a IConstraint to the assembling. The constraint is called when all element-wise assembling have been performed.

Parameters
[in]ppConstraint to be added

References ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::m_spApproxSpace, and ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::m_vConstraint.

◆ add() [3/3]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::add ( SmartPtr< IElemDisc< TDomain > >  elem)
inline

adds an element discretization to the assembling process

This function adds an Element Discretization to the assembling. During the assembling process the elem disc will assemble a given group of subsets and add the output to the passed vectors and matrices. For each Elem Disc one loop over all elements of the subset will be performed.

Parameters
[in]elemElement Discretization to be added

References ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::m_spApproxSpace, and ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::m_vDomainElemDisc.

Referenced by ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::add().

◆ add_elem_error_indicator()

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::add_elem_error_indicator ( SmartPtr< IElemError< TDomain > >  elem)
inline

adds an element error indicator to the assembling process

This function adds an Element Discretization to the assembling. During the assembling process the elem disc will assemble a given group of subsets and add the output to the passed vectors and matrices. For each Elem Disc one loop over all elements of the subset will be performed.

Parameters
[in]elemElement error indicator to be added

References ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::m_spApproxSpace, and ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::m_vDomainElemError.

◆ adjust_solution() [1/5]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::adjust_solution ( GridFunction< TDomain, TAlgebra > &  u)
inline

◆ adjust_solution() [2/5]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::adjust_solution ( vector_type u,
const GridLevel gl 
)
inlinevirtual

sets dirichlet values in solution vector

Sets dirichlet values of the NumericalSolution u when components are dirichlet

Parameters
[out]uNumerical Solution
[in]ddDoF Distribution

Implements ug::IDomainDiscretization< TAlgebra >.

References ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::adjust_solution(), and ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::dd().

◆ adjust_solution() [3/5]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::adjust_solution ( vector_type u,
ConstSmartPtr< DoFDistribution dd 
)
virtual

sets dirichlet values in solution vector

Sets dirichlet values of the NumericalSolution u when components are dirichlet

Parameters
[out]uNumerical Solution
[in]glGrid Level

Implements ug::IDomainDiscretization< TAlgebra >.

References ug::CT_ASSEMBLED, ug::CT_CONSTRAINTS, ug::CT_DIRICHLET, ug::CT_HANGING, ug::CT_MAY_DEPEND_ON_HANGING, PROFILE_FUNC_GROUP, and UG_CATCH_THROW.

Referenced by ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::adjust_solution().

◆ adjust_solution() [4/5]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::adjust_solution ( vector_type u,
number  time,
const GridLevel gl 
)
inlinevirtual

sets dirichlet values in solution vector

Sets dirichlet values of the Solution u when components are dirichlet

Parameters
[in]uSolution to set values at
[in]timetime of next (to be computed) timestep
[in]ddDoF Distribution

Implements ug::IDomainDiscretization< TAlgebra >.

References ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::adjust_solution(), and ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::dd().

◆ adjust_solution() [5/5]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::adjust_solution ( vector_type u,
number  time,
ConstSmartPtr< DoFDistribution dd 
)
virtual

sets dirichlet values in solution vector

Sets dirichlet values of the NumericalSolution u when components are dirichlet

Parameters
[out]uNumerical Solution
[in]ddDoF Distribution

Implements ug::IDomainDiscretization< TAlgebra >.

References ug::CT_CONSTRAINTS, ug::CT_DIRICHLET, ug::CT_HANGING, ug::CT_MAY_DEPEND_ON_HANGING, PROFILE_FUNC_GROUP, and UG_CATCH_THROW.

◆ approximation_space() [1/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
SmartPtr<approx_space_type> ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::approximation_space ( )
inline

◆ approximation_space() [2/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
ConstSmartPtr<approx_space_type> ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::approximation_space ( ) const
inline

◆ ass_tuner() [1/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual SmartPtr<AssemblingTuner<TAlgebra> > ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::ass_tuner ( )
inlinevirtual

◆ ass_tuner() [2/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual ConstSmartPtr<AssemblingTuner<TAlgebra> > ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::ass_tuner ( ) const
inlinevirtual

◆ assemble_defect() [1/5]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_defect ( vector_type d,
const vector_type u,
const GridLevel gl 
)
inlinevirtual

assembles Defect

Assembles Defect at a given Solution u.

Parameters
[out]dDefect d(u) to be filled
[in]uCurrent iterate
[in]ddDoF Distribution

Implements ug::IDomainDiscretization< TAlgebra >.

References ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_defect(), and ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::dd().

◆ assemble_defect() [2/5]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_defect ( vector_type d,
const vector_type u,
ConstSmartPtr< DoFDistribution dd 
)
virtual

◆ assemble_defect() [3/5]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_defect ( vector_type d,
ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol,
const std::vector< number > &  vScaleMass,
const std::vector< number > &  vScaleStiff,
const GridLevel gl 
)
inlinevirtual

assembles Defect

Assembles Defect at a given Solution u.

Parameters
[out]dDefect d(u) to be filled
[in]vSolvector of previous and current (iterated) solution
[in]vScaleMassscaling factors for mass matrix
[in]vScaleStiffscaling factors for stiffness matrix
[in]ddDoF Distribution

Implements ug::IDomainDiscretization< TAlgebra >.

References ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_defect(), and ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::dd().

◆ assemble_defect() [4/5]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_defect ( vector_type d,
ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol,
const std::vector< number > &  vScaleMass,
const std::vector< number > &  vScaleStiff,
ConstSmartPtr< DoFDistribution dd 
)
virtual

assembles Defect

Assembles Defect at a given Solution u.

Parameters
[out]dDefect d(u) to be filled
[in]uCurrent iterate
[in]ddDoF Distribution

Implements ug::IDomainDiscretization< TAlgebra >.

References ug::CreateSubsetGroups(), ug::CT_ALL, dim, ug::DimensionOfSubset(), ug::GetElemDiscOnSubset(), ug::post_assemble_loop(), ug::prep_assemble_loop(), PROFILE_FUNC_GROUP, ug::PST_ADDITIVE, ug::SubsetGroup::regular_grid(), ug::SubsetGroup::size(), UG_CATCH_THROW, and UG_THROW.

◆ assemble_defect() [5/5]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_defect ( vector_type d,
GridFunction< TDomain, TAlgebra > &  u 
)
inline

◆ assemble_jacobian() [1/5]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_jacobian ( matrix_type J,
const vector_type u,
const GridLevel gl 
)
inlinevirtual

assembles Jacobian (or Approximation of Jacobian)

Assembles Jacobian at a given iterate u.

Parameters
[out]JJacobian J(u) matrix to be filled
[in]uCurrent iterate
[in]ddDoF Distribution

Implements ug::IDomainDiscretization< TAlgebra >.

References ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_jacobian(), and ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::dd().

◆ assemble_jacobian() [2/5]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_jacobian ( matrix_type J,
const vector_type u,
ConstSmartPtr< DoFDistribution dd 
)
virtual

assembles Jacobian (or Approximation of Jacobian)

Assembles Jacobian at a given iterate u.

Parameters
[out]JJacobian J(u) matrix to be filled
[in]uCurrent iterate
[in]glGrid Level

Implements ug::IDomainDiscretization< TAlgebra >.

References SmartPtr< T, FreePolicy >::get(), ug::prep_assemble_loop(), and PROFILE_FUNC_GROUP.

Referenced by ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_jacobian().

◆ assemble_jacobian() [3/5]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_jacobian ( matrix_type J,
ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol,
const number  s_a,
const GridLevel gl 
)
inlinevirtual

assembles Jacobian (or Approximation of Jacobian)

Assembles Jacobian at a given Solution u.

Parameters
[out]JJacobian J(u) Matrix to be filled
[in]vSolvector of previous and current (iterated) solution
[in]s_ascaling factors for mass matrix
[in]ddDoF Distribution

Implements ug::IDomainDiscretization< TAlgebra >.

References ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_jacobian(), and ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::dd().

◆ assemble_jacobian() [4/5]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_jacobian ( matrix_type J,
ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol,
const number  s_a0,
ConstSmartPtr< DoFDistribution dd 
)
virtual

assembles Jacobian (or Approximation of Jacobian)

Assembles Jacobian at a given iterate u.

Parameters
[out]JJacobian J(u) matrix to be filled
[in]uCurrent iterate
[in]ddDoF Distribution

Implements ug::IDomainDiscretization< TAlgebra >.

References ug::CreateSubsetGroups(), ug::CT_ALL, dim, ug::DimensionOfSubset(), ug::GetElemDiscOnSubset(), ug::post_assemble_loop(), ug::prep_assemble_loop(), PROFILE_FUNC_GROUP, ug::PST_ADDITIVE, ug::SubsetGroup::regular_grid(), ug::SubsetGroup::size(), UG_CATCH_THROW, and UG_THROW.

◆ assemble_jacobian() [5/5]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_jacobian ( matrix_type J,
GridFunction< TDomain, TAlgebra > &  u 
)
inline

◆ assemble_linear() [1/5]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_linear ( matrix_type A,
GridFunction< TDomain, TAlgebra > &  rhs 
)
inline

◆ assemble_linear() [2/5]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_linear ( matrix_type A,
vector_type b,
ConstSmartPtr< DoFDistribution dd 
)
virtual

Assembles Matrix and Right-Hand-Side for a linear problem.

Assembles matrix_type and Right-Hand-Side for a linear problem

Parameters
[out]AMass-/Stiffness- Matrix
[out]bRight-Hand-Side
[in]glGrid Level

Implements ug::IDomainDiscretization< TAlgebra >.

References ug::CreateSubsetGroups(), ug::CT_ALL, dim, ug::DimensionOfSubset(), ug::GetElemDiscOnSubset(), ug::post_assemble_loop(), ug::prep_assemble_loop(), PROFILE_FUNC_GROUP, ug::PST_ADDITIVE, ug::SubsetGroup::regular_grid(), ug::SubsetGroup::size(), UG_CATCH_THROW, and UG_THROW.

Referenced by ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_linear().

◆ assemble_linear() [3/5]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_linear ( matrix_type A,
vector_type b,
ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol,
const std::vector< number > &  vScaleMass,
const std::vector< number > &  vScaleStiff,
const GridLevel gl 
)
inlinevirtual

Assembles matrix_type and Right-Hand-Side for a linear problem.

Assembles matrix_type and Right-Hand-Side for a linear problem

Parameters
[out]AMass-/Stiffness- matrix_type of the discretization
[out]bRight-Hand-Side of the discretization
[in]vSolvector of previous and current (iterated) solution
[in]vScaleMassscaling factors for mass matrix
[in]vScaleStiffscaling factors for stiffness matrix
[in]ddDoF Distribution

Implements ug::IDomainDiscretization< TAlgebra >.

References ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_linear(), and ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::dd().

◆ assemble_linear() [4/5]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_linear ( matrix_type A,
vector_type b,
ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol,
const std::vector< number > &  vScaleMass,
const std::vector< number > &  vScaleStiff,
ConstSmartPtr< DoFDistribution dd 
)
virtual

Assembles Matrix and Right-Hand-Side for a linear problem.

Assembles matrix_type and Right-Hand-Side for a linear problem

Parameters
[out]AMass-/Stiffness- Matrix
[out]bRight-Hand-Side
[in]ddDoF Distribution

Implements ug::IDomainDiscretization< TAlgebra >.

References ug::CreateSubsetGroups(), ug::CT_ALL, dim, ug::DimensionOfSubset(), ug::GetElemDiscOnSubset(), PROFILE_FUNC_GROUP, ug::PST_ADDITIVE, ug::SubsetGroup::regular_grid(), ug::SubsetGroup::size(), UG_CATCH_THROW, and UG_THROW.

◆ assemble_linear() [5/5]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_linear ( matrix_type A,
vector_type b,
const GridLevel gl 
)
inlinevirtual

Assembles Matrix and Right-Hand-Side for a linear problem.

Assembles matrix_type and Right-Hand-Side for a linear problem

Parameters
[out]AMass-/Stiffness- Matrix
[out]bRight-Hand-Side
[in]ddDoF Distribution

Implements ug::IDomainDiscretization< TAlgebra >.

References ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_linear(), and ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::dd().

◆ assemble_mass_matrix() [1/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_mass_matrix ( matrix_type M,
const vector_type u,
const GridLevel gl 
)
inlinevirtual

◆ assemble_mass_matrix() [2/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_mass_matrix ( matrix_type M,
const vector_type u,
ConstSmartPtr< DoFDistribution dd 
)
virtual

◆ assemble_rhs() [1/8]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_rhs ( GridFunction< TDomain, TAlgebra > &  b)
inline

◆ assemble_rhs() [2/8]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_rhs ( vector_type b,
ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol,
const std::vector< number > &  vScaleMass,
const std::vector< number > &  vScaleStiff,
const GridLevel gl 
)
inlinevirtual

Assembles Right-Hand-Side for a linear problem.

Assembles Right-Hand-Side for a linear problem

Parameters
[out]bRight-Hand-Side of the discretization
[in]vSolvector of previous and current (iterated) solution
[in]vScaleMassscaling factors for mass matrix
[in]vScaleStiffscaling factors for stiffness matrix
[in]ddDoF Distribution

Implements ug::IDomainDiscretization< TAlgebra >.

References ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_rhs(), and ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::dd().

◆ assemble_rhs() [3/8]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_rhs ( vector_type b,
ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol,
const std::vector< number > &  vScaleMass,
const std::vector< number > &  vScaleStiff,
ConstSmartPtr< DoFDistribution dd 
)
virtual

◆ assemble_rhs() [4/8]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_rhs ( vector_type b,
const GridLevel gl 
)
inlinevirtual

◆ assemble_rhs() [5/8]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_rhs ( vector_type rhs,
const vector_type u,
const GridLevel gl 
)
inlinevirtual

◆ assemble_rhs() [6/8]

◆ assemble_rhs() [7/8]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_rhs ( vector_type rhs,
ConstSmartPtr< DoFDistribution dd 
)
inlinevirtual

◆ assemble_rhs() [8/8]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_rhs ( vector_type rhs,
GridFunction< TDomain, TAlgebra > &  u 
)
inline

◆ assemble_stiffness_matrix() [1/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_stiffness_matrix ( matrix_type A,
const vector_type u,
const GridLevel gl 
)
inlinevirtual

◆ assemble_stiffness_matrix() [2/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::assemble_stiffness_matrix ( matrix_type A,
const vector_type u,
ConstSmartPtr< DoFDistribution dd 
)
virtual

◆ AssembleDefect() [1/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
template<typename TElem >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::AssembleDefect ( const std::vector< IElemDisc< domain_type > * > &  vElemDisc,
ConstSmartPtr< DoFDistribution dd,
int  si,
bool  bNonRegularGrid,
vector_type d,
const vector_type u 
)
private

This function adds the contributions of all passed element discretizations on one given subset to the global Defect in the stationary case.

Parameters
[in]vElemDiscelement discretizations
[in]ddDoF Distribution
[in]sisubset index
[in]bNonRegularGridflag to indicate if non regular grid is used
[in,out]ddefect
[in]usolution

◆ AssembleDefect() [2/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
template<typename TElem >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::AssembleDefect ( const std::vector< IElemDisc< domain_type > * > &  vElemDisc,
ConstSmartPtr< DoFDistribution dd,
int  si,
bool  bNonRegularGrid,
vector_type d,
ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol,
const std::vector< number > &  vScaleMass,
const std::vector< number > &  vScaleStiff 
)
private

◆ AssembleErrorEstimator() [1/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
template<typename TElem >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::AssembleErrorEstimator ( const std::vector< IElemError< domain_type > * > &  vElemDisc,
ConstSmartPtr< DoFDistribution dd,
int  si,
bool  bNonRegularGrid,
const std::vector< number > &  vScaleMass,
const std::vector< number > &  vScaleStiff,
ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol 
)
inlineprivate

This function assembles the error estimator associated with all the element discretizations in the internal data structure for one given subset.

Parameters
[in]vElemDiscelement discretizations
[in]ddDoF Distribution
[in]sisubset index
[in]bNonRegularGridflag to indicate if non regular grid is used
[in]vScaleMassscaling factors for mass part
[in]vScaleStiffscaling factors for stiffness part
[in]vSolsolution

◆ AssembleErrorEstimator() [2/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
template<typename TElem >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::AssembleErrorEstimator ( const std::vector< IElemError< domain_type > * > &  vElemDisc,
ConstSmartPtr< DoFDistribution dd,
int  si,
bool  bNonRegularGrid,
const vector_type u 
)
inlineprivate

This function assembles the error estimator associated with all the element discretizations in the internal data structure for one given subset.

Parameters
[in]vElemDiscelement discretizations
[in]ddDoF Distribution
[in]sisubset index
[in]bNonRegularGridflag to indicate if non regular grid is used
[in]usolution

◆ AssembleJacobian() [1/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
template<typename TElem >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::AssembleJacobian ( const std::vector< IElemDisc< domain_type > * > &  vElemDisc,
ConstSmartPtr< DoFDistribution dd,
int  si,
bool  bNonRegularGrid,
matrix_type J,
const vector_type u 
)
private

This function adds the contributions of all passed element discretizations on one given subset to the global Jacobian in the stationary case.

Parameters
[in]vElemDiscelement discretizations
[in]sisubset index
[in]bNonRegularGridflag to indicate if non regular grid is used
[in,out]Jjacobian
[in]usolution

◆ AssembleJacobian() [2/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
template<typename TElem >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::AssembleJacobian ( const std::vector< IElemDisc< domain_type > * > &  vElemDisc,
ConstSmartPtr< DoFDistribution dd,
int  si,
bool  bNonRegularGrid,
matrix_type J,
ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol,
number  s_a0 
)
private

This function adds the contributions of all passed element discretizations on one given subset to the global Jacobian in the time-dependent case. Note, that s_m0 == 1

Parameters
[in]vElemDiscelement discretizations
[in]ddDoF Distribution
[in]sisubset index
[in]bNonRegularGridflag to indicate if non regular grid is used
[in,out]Jjacobian
[in]vSolcurrent and previous solutions
[in]s_a0scaling factor for stiffness part

◆ AssembleLinear() [1/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
template<typename TElem >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::AssembleLinear ( const std::vector< IElemDisc< domain_type > * > &  vElemDisc,
ConstSmartPtr< DoFDistribution dd,
int  si,
bool  bNonRegularGrid,
matrix_type A,
vector_type rhs 
)
private

This function adds the contributions of all passed element discretizations on one given subset to the global Matrix and the global Right-Hand Side of the Linear problem in the stationary case.

Parameters
[in]vElemDiscelement discretizations
[in]ddDoF Distribution
[in]sisubset index
[in]bNonRegularGridflag to indicate if non regular grid is used
[in,out]AMatrix
[in,out]rhsRight-hand side

◆ AssembleLinear() [2/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
template<typename TElem >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::AssembleLinear ( const std::vector< IElemDisc< domain_type > * > &  vElemDisc,
ConstSmartPtr< DoFDistribution dd,
int  si,
bool  bNonRegularGrid,
matrix_type A,
vector_type rhs,
ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol,
const std::vector< number > &  vScaleMass,
const std::vector< number > &  vScaleStiff 
)
private

This function adds the contributions of all passed element discretizations on one given subset to the global Matrix and the global Right-Hand Side of the Linear problem in the stationary case.

Parameters
[in]vElemDiscelement discretizations
[in]ddDoF Distribution
[in]sisubset index
[in]bNonRegularGridflag to indicate if non regular grid is used
[in,out]AMatrix
[in,out]rhsRight-hand side
[in]vSolcurrent and previous solutions
[in]vScaleMassscaling factors for mass part
[in]vScaleStiffscaling factors for stiffness part

◆ AssembleMassMatrix()

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
template<typename TElem >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::AssembleMassMatrix ( const std::vector< IElemDisc< domain_type > * > &  vElemDisc,
ConstSmartPtr< DoFDistribution dd,
int  si,
bool  bNonRegularGrid,
matrix_type M,
const vector_type u 
)
private

This function adds the contributions of all passed element discretizations on one given subset to the global Mass matrix.

Parameters
[in]vElemDiscelement discretizations
[in]ddDoF Distribution
[in]sisubset index
[in]bNonRegularGridflag to indicate if non regular grid is used
[in,out]MMass matrix
[in]usolution

◆ AssembleRhs() [1/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
template<typename TElem >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::AssembleRhs ( const std::vector< IElemDisc< domain_type > * > &  vElemDisc,
ConstSmartPtr< DoFDistribution dd,
int  si,
bool  bNonRegularGrid,
vector_type rhs,
const vector_type u 
)
private

This function adds the contributions of all passed element discretizations on one given subset to the global Right-Hand Side.

Parameters
[in]vElemDiscelement discretizations
[in]ddDoF Distribution
[in]sisubset index
[in]bNonRegularGridflag to indicate if non regular grid is used
[in,out]rhsRight-hand side
[in]usolution

◆ AssembleRhs() [2/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
template<typename TElem >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::AssembleRhs ( const std::vector< IElemDisc< domain_type > * > &  vElemDisc,
ConstSmartPtr< DoFDistribution dd,
int  si,
bool  bNonRegularGrid,
vector_type rhs,
ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol,
const std::vector< number > &  vScaleMass,
const std::vector< number > &  vScaleStiff 
)
private

This function adds the contributions of all passed element discretizations on one given subset to the global Right-Hand Side in the time-dependent case.

Parameters
[in]vElemDiscelement discretizations
[in]ddDoF Distribution
[in]sisubset index
[in]bNonRegularGridflag to indicate if non regular grid is used
[in,out]rhsRight-hand side
[in]vSolcurrent and previous solutions
[in]vScaleMassscaling factors for mass part
[in]vScaleStiffscaling factors for stiffness part

◆ AssembleStiffnessMatrix()

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
template<typename TElem >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::AssembleStiffnessMatrix ( const std::vector< IElemDisc< domain_type > * > &  vElemDisc,
ConstSmartPtr< DoFDistribution dd,
int  si,
bool  bNonRegularGrid,
matrix_type A,
const vector_type u 
)
private

This function adds the contributions of all passed element discretizations on one given subset to the global Stiffness matrix.

Parameters
[in]vElemDiscelement discretizations
[in]ddDoF Distribution
[in]sisubset index
[in]bNonRegularGridflag to indicate if non regular grid is used
[in,out]AStiffness matrix
[in]usolution

◆ calc_error() [1/6]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::calc_error ( const GridFunction< TDomain, TAlgebra > &  u)
inlinevirtual

◆ calc_error() [2/6]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::calc_error ( const GridFunction< TDomain, TAlgebra > &  u,
error_vector_type u_vtk 
)
inlinevirtual

◆ calc_error() [3/6]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::calc_error ( const vector_type u,
const GridLevel gl,
error_vector_type u_vtk = NULL 
)
inlinevirtual

Computes the error estimator.

Parameters
[in]uvector of the solution to estimate the error for
[in]ddDoF Distribution

Implements ug::IDomainErrorIndicator< TAlgebra >.

References ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::calc_error(), and ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::dd().

◆ calc_error() [4/6]

◆ calc_error() [5/6]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::calc_error ( ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol,
const std::vector< number > &  vScaleMass,
const std::vector< number > &  vScaleStiff,
const GridLevel gl,
error_vector_type u_vtk 
)
inlinevirtual

◆ calc_error() [6/6]

◆ constraint()

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual SmartPtr<IConstraint<TAlgebra> > ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::constraint ( size_t  i)
inlinevirtual

◆ dd()

◆ finish_timestep() [1/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::finish_timestep ( ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol,
const GridLevel gl 
)
inlinevirtual

◆ finish_timestep() [2/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::finish_timestep ( ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol,
ConstSmartPtr< DoFDistribution dd 
)
virtual

finishes time step

Finishes time step at a given solution u. This method is called only once after any time step.

Parameters
[in]vSolvector of previous and current (iterated) solution
[in]ddDoF distribution

Implements ug::IDomainDiscretization< TAlgebra >.

References ug::post_assemble_loop(), ug::prep_assemble_loop(), PROFILE_FUNC_GROUP, ug::SubsetIsRegularGrid(), and UG_CATCH_THROW.

Referenced by ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::finish_timestep().

◆ finish_timestep_elem() [1/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::finish_timestep_elem ( ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol,
const GridLevel gl 
)
inlinevirtual

finishes timestep

finishes timestep at a given Solution u.

Parameters
[in]vSolvector of previous and current (iterated) solution
[in]ddDoF Distribution

Implements ug::IDomainDiscretization< TAlgebra >.

References ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::dd(), and ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::finish_timestep_elem().

◆ finish_timestep_elem() [2/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::finish_timestep_elem ( ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol,
ConstSmartPtr< DoFDistribution dd 
)
virtual

finishes timestep

finishes timestep at a given Solution u.

Parameters
[in]vSolvector of previous and current (iterated) solution
[in]ddDoF Distribution

Implements ug::IDomainDiscretization< TAlgebra >.

References ug::CreateSubsetGroups(), dim, ug::DimensionOfSubset(), ug::GetElemDiscOnSubset(), PROFILE_FUNC_GROUP, ug::SubsetGroup::regular_grid(), ug::SubsetGroup::size(), UG_CATCH_THROW, and UG_THROW.

Referenced by ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::finish_timestep_elem().

◆ FinishTimestepElem()

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
template<typename TElem >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::FinishTimestepElem ( const std::vector< IElemDisc< domain_type > * > &  vElemDisc,
ConstSmartPtr< DoFDistribution dd,
int  si,
bool  bNonRegularGrid,
ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol 
)
private

This function finalizes the global discretization in a time-stepping scheme by calling the "finish_timestep_elem" methods of all passed element discretizations on one given subset.

Parameters
[in]vElemDiscelement discretizations
[in]ddDoF Distribution
[in]sisubset index
[in]bNonRegularGridflag to indicate if non regular grid is used
[in]vSolcurrent and previous solutions

◆ invalidate_error()

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::invalidate_error
virtual

marks error indicators as invalid; in order to revalidate them, they will have to be newly calculated by a call to calc_error

Implements ug::IDomainErrorIndicator< TAlgebra >.

◆ is_error_valid()

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
bool ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::is_error_valid
virtual

returns whether current error values are valid

Implements ug::IDomainErrorIndicator< TAlgebra >.

◆ mark_with_strategy()

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::mark_with_strategy ( IRefiner refiner,
SmartPtr< IElementMarkingStrategy< TDomain > >  strategy 
)
virtual

◆ num_constraints()

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual size_t ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::num_constraints ( ) const
inlinevirtual

◆ prepare_timestep() [1/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::prepare_timestep ( ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol,
number  future_time,
const GridLevel gl 
)
inlinevirtual

◆ prepare_timestep() [2/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::prepare_timestep ( ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol,
number  future_time,
ConstSmartPtr< DoFDistribution dd 
)
virtual

prepares time step

Prepares time step at a given solution u. This method is called only once before any time step.

Parameters
[in]vSolvector of previous and current (iterated) solution
[in]ddDoF distribution

Implements ug::IDomainDiscretization< TAlgebra >.

References ug::post_assemble_loop(), ug::prep_assemble_loop(), PROFILE_FUNC_GROUP, ug::SubsetIsRegularGrid(), and UG_CATCH_THROW.

Referenced by ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::prepare_timestep().

◆ prepare_timestep_elem() [1/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
virtual void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::prepare_timestep_elem ( ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol,
const GridLevel gl 
)
inlinevirtual

◆ prepare_timestep_elem() [2/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::prepare_timestep_elem ( ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol,
ConstSmartPtr< DoFDistribution dd 
)
virtual

prepares time step element-wise

prepares time step element-wise at a given solution u.

Parameters
[in]vSolvector of previous and current (iterated) solution
[in]ddDoF Distribution

Implements ug::IDomainDiscretization< TAlgebra >.

References ug::CreateSubsetGroups(), dim, ug::DimensionOfSubset(), ug::GetElemDiscOnSubset(), ug::post_assemble_loop(), ug::prep_assemble_loop(), PROFILE_FUNC_GROUP, ug::SubsetGroup::regular_grid(), ug::SubsetGroup::size(), UG_CATCH_THROW, and UG_THROW.

Referenced by ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::prepare_timestep_elem().

◆ PrepareTimestepElem()

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
template<typename TElem >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::PrepareTimestepElem ( const std::vector< IElemDisc< domain_type > * > &  vElemDisc,
ConstSmartPtr< DoFDistribution dd,
int  si,
bool  bNonRegularGrid,
ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol 
)
private

This function prepares the global discretization for a time-stepping scheme by calling the "prepare_timestep_elem" methods of all passed element discretizations on one given subset.

Parameters
[in]vElemDiscelement discretizations
[in]ddDoF Distribution
[in]sisubset index
[in]bNonRegularGridflag to indicate if non regular grid is used
[in]vSolcurrent and previous solutions

◆ remove() [1/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::remove ( SmartPtr< IDomainConstraint< TDomain, TAlgebra > >  pp)
inline

removes a constraint from the assembling process

This function removes a previously added IConstraint from the assembling. The constraint's assemblings are no longer called.

Parameters
[in]ppconstraint to be removed

References ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::m_vConstraint, and UG_LOG.

◆ remove() [2/2]

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::remove ( SmartPtr< IElemDisc< TDomain > >  elem)
inline

removes a element discretization from the assembling process

This function removes a previously added IElemDisc from the assembling. The element-wise assemblings are no longer called.

Parameters
[in]elemelem disc to be removed

References ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::m_vDomainElemDisc, and UG_LOG.

◆ remove_elem_error_indicator()

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::remove_elem_error_indicator ( SmartPtr< IElemError< TDomain > >  elem)
inline

removes a element discretization from the assembling process

This function removes a previously added IElemDisc from the assembling. The element-wise assemblings are no longer called.

Parameters
[in]elemelem disc to be removed

References ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::m_vDomainElemError, and UG_LOG.

◆ update_constraints()

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::update_constraints
protected

References UG_THROW.

◆ update_disc_items()

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::update_disc_items
protected

◆ update_elem_discs()

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::update_elem_discs
protected

set the approximation space in the elem discs and extract IElemDiscs

References boost::get(), and UG_THROW.

◆ update_elem_errors()

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::update_elem_errors
protected

References boost::get(), and UG_THROW.

◆ update_error_items()

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
void ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::update_error_items
protected

Member Data Documentation

◆ dim

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
const int ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::dim = TDomain::dim
static

world dimension

◆ m_bErrorCalculated

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
bool ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::m_bErrorCalculated
protected

◆ m_mgElemErrors

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
IMultigridElementIndicators<TDomain> ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::m_mgElemErrors
protected

◆ m_spApproxSpace

◆ m_spAssTuner

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
SmartPtr<AssemblingTuner<TAlgebra> > ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::m_spAssTuner
protected

this object provides tools to adapt the assemble routine

Referenced by ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::ass_tuner().

◆ m_vConstraint

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
std::vector<SmartPtr<IDomainConstraint<TDomain, TAlgebra> > > ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::m_vConstraint
protected

◆ m_vDomainElemDisc

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
std::vector<SmartPtr<IElemDisc<TDomain> > > ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::m_vDomainElemDisc
protected

◆ m_vDomainElemError

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
std::vector<SmartPtr<IElemError<TDomain> > > ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::m_vDomainElemError
protected

◆ m_vElemDisc

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
std::vector<IElemDisc<TDomain>*> ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::m_vElemDisc
protected

vector holding all registered elem discs

◆ m_vElemError

template<typename TDomain , typename TAlgebra , typename TGlobAssembler >
std::vector<IElemError<TDomain>*> ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::m_vElemError
protected

vector holding all registered elem discs


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