ug4
ug::IConstraint< TAlgebra > Class Template Referenceabstract

interface for adjustment of constraints More...

#include <constraint_interface.h>

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

Public Types

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 Member Functions

virtual void adjust_correction (vector_type &c, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0)
 
virtual void adjust_defect (vector_type &d, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol=SPNULL, const std::vector< number > *vScaleMass=NULL, const std::vector< number > *vScaleStiff=NULL)=0
 adapts defect to enforce constraints More...
 
virtual void adjust_error (const vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol=SPNULL, const std::vector< number > *vScaleMass=NULL, const std::vector< number > *vScaleStiff=NULL)
 adjusts the assembled error estimator values in the attachments according to the constraint More...
 
virtual void adjust_jacobian (matrix_type &J, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol=SPNULL, const number s_a0=1.0)=0
 adapts jacobian to enforce constraints More...
 
virtual void adjust_linear (matrix_type &mat, vector_type &rhs, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0)=0
 adapts matrix and rhs (linear case) to enforce constraints More...
 
virtual void adjust_linear_residual (vector_type &d, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0)
 adjust linear residual More...
 
virtual void adjust_prolongation (matrix_type &P, ConstSmartPtr< DoFDistribution > ddFine, ConstSmartPtr< DoFDistribution > ddCoarse, int type, number time=0.0)
 sets constraints in prolongation More...
 
virtual void adjust_prolongation (vector_type &uFine, GridLevel fineLvl, const vector_type &uCoarse, GridLevel coarseLvl, int type)
 sets the constraints in a solution vector More...
 
virtual void adjust_restriction (matrix_type &R, ConstSmartPtr< DoFDistribution > ddCoarse, ConstSmartPtr< DoFDistribution > ddFine, int type, number time=0.0)
 sets constraints in restriction More...
 
virtual void adjust_restriction (vector_type &uCoarse, GridLevel coarseLvl, const vector_type &uFine, GridLevel fineLvl, int type)
 sets the constraints in a solution vector More...
 
virtual void adjust_rhs (vector_type &rhs, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0)=0
 adapts a rhs to enforce constraints More...
 
virtual void adjust_solution (vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0)=0
 sets the constraints in a solution vector More...
 
virtual void modify_solution (SmartPtr< VectorTimeSeries< vector_type > > vSolMod, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, ConstSmartPtr< DoFDistribution > dd, int type)
 modify_solution for instationary case More...
 
virtual void modify_solution (vector_type &uMod, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type)
 modifies solution vector before calling the assembling routine More...
 
virtual int type () const =0
 returns the type of constraints More...
 
virtual ~IConstraint ()
 virtual destructor More...
 

Detailed Description

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

interface for adjustment of constraints

This class is the base class for the handling of constraints. Implementations should adjust the jacobian/defect in order to guarantee the constraints. The constraints can also be set in a solution vector by calling the adjust_solution method. Each implementation must specify the type of constraints since in some situations it is important to apply the constraint modification in a certain order.

Template Parameters
TDomaintype of Domain
TDoFDistributiontype of DoF Distribution
TAlgebratype of Algebra

Member Typedef Documentation

◆ algebra_type

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

Algebra type.

◆ matrix_type

template<typename TAlgebra >
typedef algebra_type::matrix_type ug::IConstraint< TAlgebra >::matrix_type

Type of algebra matrix.

◆ vector_type

template<typename TAlgebra >
typedef algebra_type::vector_type ug::IConstraint< TAlgebra >::vector_type

Type of algebra vector.

Constructor & Destructor Documentation

◆ ~IConstraint()

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

virtual destructor

Member Function Documentation

◆ adjust_correction()

template<typename TAlgebra >
virtual void ug::IConstraint< TAlgebra >::adjust_correction ( vector_type c,
ConstSmartPtr< DoFDistribution dd,
int  type,
number  time = 0.0 
)
inlinevirtual

adapts correction to enforce constraints for additive constraints (e.g. linear constraints, but NOT Dirichlet other than Dirichlet-0!), this is the same as adjust_solution, therefore default implementation

Reimplemented in ug::OneSideP1Constraints< TDomain, TAlgebra >, ug::SymP1Constraints< TDomain, TAlgebra >, and ug::DirichletBoundary< TDomain, TAlgebra >.

References ug::IConstraint< TAlgebra >::adjust_solution(), and ug::IConstraint< TAlgebra >::type().

Referenced by ug::IConstraint< TAlgebra >::adjust_linear_residual().

◆ adjust_defect()

template<typename TAlgebra >
virtual void ug::IConstraint< TAlgebra >::adjust_defect ( vector_type d,
const vector_type u,
ConstSmartPtr< DoFDistribution dd,
int  type,
number  time = 0.0,
ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol = SPNULL,
const std::vector< number > *  vScaleMass = NULL,
const std::vector< number > *  vScaleStiff = NULL 
)
pure virtual

◆ adjust_error()

template<typename TAlgebra >
virtual void ug::IConstraint< TAlgebra >::adjust_error ( const vector_type u,
ConstSmartPtr< DoFDistribution dd,
int  type,
number  time = 0.0,
ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol = SPNULL,
const std::vector< number > *  vScaleMass = NULL,
const std::vector< number > *  vScaleStiff = NULL 
)
inlinevirtual

adjusts the assembled error estimator values in the attachments according to the constraint

Reimplemented in ug::DirichletBoundary< TDomain, TAlgebra >.

◆ adjust_jacobian()

◆ adjust_linear()

◆ adjust_linear_residual()

template<typename TAlgebra >
virtual void ug::IConstraint< TAlgebra >::adjust_linear_residual ( vector_type d,
const vector_type u,
ConstSmartPtr< DoFDistribution dd,
int  type,
number  time = 0.0 
)
inlinevirtual

◆ adjust_prolongation() [1/2]

template<typename TAlgebra >
virtual void ug::IConstraint< TAlgebra >::adjust_prolongation ( matrix_type P,
ConstSmartPtr< DoFDistribution ddFine,
ConstSmartPtr< DoFDistribution ddCoarse,
int  type,
number  time = 0.0 
)
inlinevirtual

◆ adjust_prolongation() [2/2]

template<typename TAlgebra >
virtual void ug::IConstraint< TAlgebra >::adjust_prolongation ( vector_type uFine,
GridLevel  fineLvl,
const vector_type uCoarse,
GridLevel  coarseLvl,
int  type 
)
inlinevirtual

sets the constraints in a solution vector

◆ adjust_restriction() [1/2]

template<typename TAlgebra >
virtual void ug::IConstraint< TAlgebra >::adjust_restriction ( matrix_type R,
ConstSmartPtr< DoFDistribution ddCoarse,
ConstSmartPtr< DoFDistribution ddFine,
int  type,
number  time = 0.0 
)
inlinevirtual

◆ adjust_restriction() [2/2]

template<typename TAlgebra >
virtual void ug::IConstraint< TAlgebra >::adjust_restriction ( vector_type uCoarse,
GridLevel  coarseLvl,
const vector_type uFine,
GridLevel  fineLvl,
int  type 
)
inlinevirtual

sets the constraints in a solution vector

◆ adjust_rhs()

◆ adjust_solution()

◆ modify_solution() [1/2]

template<typename TAlgebra >
virtual void ug::IConstraint< TAlgebra >::modify_solution ( SmartPtr< VectorTimeSeries< vector_type > >  vSolMod,
ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol,
ConstSmartPtr< DoFDistribution dd,
int  type 
)
inlinevirtual

modify_solution for instationary case

◆ modify_solution() [2/2]

template<typename TAlgebra >
virtual void ug::IConstraint< TAlgebra >::modify_solution ( vector_type uMod,
const vector_type u,
ConstSmartPtr< DoFDistribution dd,
int  type 
)
inlinevirtual

modifies solution vector before calling the assembling routine

◆ type()


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