ug4
|
interface for adjustment of constraints More...
#include <constraint_interface.h>
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... | |
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.
TDomain | type of Domain |
TDoFDistribution | type of DoF Distribution |
TAlgebra | type of Algebra |
typedef TAlgebra ug::IConstraint< TAlgebra >::algebra_type |
Algebra type.
typedef algebra_type::matrix_type ug::IConstraint< TAlgebra >::matrix_type |
Type of algebra matrix.
typedef algebra_type::vector_type ug::IConstraint< TAlgebra >::vector_type |
Type of algebra vector.
|
inlinevirtual |
virtual destructor
|
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().
|
pure virtual |
adapts defect to enforce constraints
Implemented in ug::LSGFConstraint< TDomain, TAlgebra, TExtrapolation >, ug::DiscConstraintFVCR< class >, ug::DiscConstraintFVCR< class >, ug::Electromagnetism::NedelecDirichletBC< class, class >, ug::DirichletBoundary< TDomain, TAlgebra >, ug::OneSideP1Constraints< TDomain, TAlgebra >, ug::SymP1Constraints< TDomain, TAlgebra >, and ug::IObstacleConstraint< TDomain, TAlgebra >.
|
inlinevirtual |
adjusts the assembled error estimator values in the attachments according to the constraint
Reimplemented in ug::DirichletBoundary< TDomain, TAlgebra >.
|
pure virtual |
adapts jacobian to enforce constraints
Implemented in ug::LSGFConstraint< TDomain, TAlgebra, TExtrapolation >, ug::Electromagnetism::NedelecDirichletBC< class, class >, ug::DirichletBoundary< TDomain, TAlgebra >, ug::OneSideP1Constraints< TDomain, TAlgebra >, ug::SymP1Constraints< TDomain, TAlgebra >, ug::IObstacleConstraint< TDomain, TAlgebra >, and ug::DiscConstraintFVCR< class >.
|
pure virtual |
adapts matrix and rhs (linear case) to enforce constraints
Implemented in ug::OneSideP1Constraints< TDomain, TAlgebra >, ug::SymP1Constraints< TDomain, TAlgebra >, ug::DiscConstraintFVCR< class >, ug::DiscConstraintFVCR< class >, ug::LSGFConstraint< TDomain, TAlgebra, TExtrapolation >, ug::DirichletBoundary< TDomain, TAlgebra >, ug::IObstacleConstraint< TDomain, TAlgebra >, and ug::Electromagnetism::NedelecDirichletBC< class, class >.
|
inlinevirtual |
adjust linear residual
References ug::IConstraint< TAlgebra >::adjust_correction(), and ug::IConstraint< TAlgebra >::type().
|
inlinevirtual |
sets constraints in prolongation
Reimplemented in ug::DirichletBoundary< TDomain, TAlgebra >, ug::OneSideP1Constraints< TDomain, TAlgebra >, ug::SymP1Constraints< TDomain, TAlgebra >, and ug::IObstacleConstraint< TDomain, TAlgebra >.
|
inlinevirtual |
sets the constraints in a solution vector
|
inlinevirtual |
sets constraints in restriction
Reimplemented in ug::DirichletBoundary< TDomain, TAlgebra >, ug::OneSideP1Constraints< TDomain, TAlgebra >, ug::SymP1Constraints< TDomain, TAlgebra >, and ug::IObstacleConstraint< TDomain, TAlgebra >.
|
inlinevirtual |
sets the constraints in a solution vector
|
pure virtual |
adapts a rhs to enforce constraints
Implemented in ug::OneSideP1Constraints< TDomain, TAlgebra >, ug::SymP1Constraints< TDomain, TAlgebra >, ug::DiscConstraintFVCR< class >, ug::DiscConstraintFVCR< class >, ug::LSGFConstraint< TDomain, TAlgebra, TExtrapolation >, ug::DirichletBoundary< TDomain, TAlgebra >, ug::IObstacleConstraint< TDomain, TAlgebra >, and ug::Electromagnetism::NedelecDirichletBC< class, class >.
|
pure virtual |
sets the constraints in a solution vector
Implemented in ug::LSGFConstraint< TDomain, TAlgebra, TExtrapolation >, ug::DirichletBoundary< TDomain, TAlgebra >, ug::OneSideP1Constraints< TDomain, TAlgebra >, ug::SymP1Constraints< TDomain, TAlgebra >, ug::IObstacleConstraint< TDomain, TAlgebra >, ug::DiscConstraintFVCR< class >, ug::DiscConstraintFVCR< class >, and ug::Electromagnetism::NedelecDirichletBC< class, class >.
Referenced by ug::IConstraint< TAlgebra >::adjust_correction().
|
inlinevirtual |
modify_solution for instationary case
|
inlinevirtual |
modifies solution vector before calling the assembling routine
|
pure virtual |
returns the type of constraints
Implemented in ug::IDomainConstraint< TDomain, TPotAlgebra >, ug::IDomainConstraint< TGridFunction::domain_type, TGridFunction::algebra_type >, ug::IDomainConstraint< TDomain, TAlgebra >, ug::LSGFConstraint< TDomain, TAlgebra, TExtrapolation >, ug::DirichletBoundary< TDomain, TAlgebra >, ug::OneSideP1Constraints< TDomain, TAlgebra >, ug::SymP1Constraints< TDomain, TAlgebra >, ug::IObstacleConstraint< TDomain, TAlgebra >, ug::Electromagnetism::NedelecProject::AuxLaplaceRHS, ug::DiscConstraintFVCR< class >, ug::DiscConstraintFVCR< class >, ug::Electromagnetism::NedelecDirichletBC< class, class >, and ug::Electromagnetism::NedelecLoopCurrent< class, class >::OutOfSource.
Referenced by ug::IConstraint< TAlgebra >::adjust_correction(), and ug::IConstraint< TAlgebra >::adjust_linear_residual().