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

#include <p1_continuity_constraints.h>

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

Public Types

typedef TAlgebra algebra_type
 
typedef algebra_type::matrix_type matrix_type
 
typedef algebra_type::vector_type vector_type
 
- Public Types inherited from ug::IDomainConstraint< TDomain, TAlgebra >
typedef TAlgebra algebra_type
 Algebra type. More...
 
typedef TDomain domain_type
 Domain 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::IConstraint< 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 Member Functions

virtual void adjust_correction (vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0)
 
void adjust_defect (vector_type &d, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol=NULL, const std::vector< number > *vScaleMass=NULL, const std::vector< number > *vScaleStiff=NULL)
 adapts defect to enforce constraints More...
 
void adjust_jacobian (matrix_type &J, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol=NULL, const number s_a0=1.0)
 adapts jacobian to enforce constraints More...
 
void adjust_linear (matrix_type &mat, vector_type &rhs, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0)
 adapts matrix and rhs (linear case) to enforce constraints More...
 
void adjust_prolongation (matrix_type &P, ConstSmartPtr< DoFDistribution > ddFine, ConstSmartPtr< DoFDistribution > ddCoarse, int type, number time=0.0)
 sets constraints in prolongation More...
 
void adjust_restriction (matrix_type &R, ConstSmartPtr< DoFDistribution > ddCoarse, ConstSmartPtr< DoFDistribution > ddFine, int type, number time=0.0)
 sets constraints in restriction More...
 
void adjust_rhs (vector_type &rhs, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0)
 adapts a rhs to enforce constraints More...
 
void adjust_solution (vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0)
 sets the constraints in a solution vector More...
 
 SymP1Constraints ()
 
virtual int type () const
 returns the type of constraints More...
 
virtual ~SymP1Constraints ()
 
- Public Member Functions inherited from ug::IDomainConstraint< TDomain, TAlgebra >
SmartPtr< ApproximationSpace< TDomain > > approximation_space ()
 returns approximation space More...
 
ConstSmartPtr< ApproximationSpace< TDomain > > approximation_space () const
 returns approximation space More...
 
virtual SmartPtr< IErrEstData< TDomain > > err_est_data ()
 returns the pointer to the error estimator data object (or NULL) More...
 
bool err_est_enabled () const
 find out whether or not a posteriori error estimation is to be performed for this disc More...
 
 IDomainConstraint ()
 constructor More...
 
virtual void set_approximation_space (SmartPtr< ApproximationSpace< TDomain > > approxSpace)
 sets the approximation space More...
 
void set_ass_tuner (ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssemblingTuner=NULL)
 sets the assemble adapter for the constraints More...
 
void set_error_estimator (SmartPtr< IErrEstData< TDomain > > ee)
 sets the pointer to an error estimator data object (or NULL) More...
 
- Public Member Functions inherited from ug::IConstraint< TAlgebra >
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_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 (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 (vector_type &uCoarse, GridLevel coarseLvl, const vector_type &uFine, GridLevel fineLvl, int type)
 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 ~IConstraint ()
 virtual destructor More...
 

Protected Attributes

bool m_bAssembleLinearProblem
 
- Protected Attributes inherited from ug::IDomainConstraint< TDomain, TAlgebra >
SmartPtr< ApproximationSpace< TDomain > > m_spApproxSpace
 Approximation Space. More...
 
ConstSmartPtr< AssemblingTuner< TAlgebra > > m_spAssTuner
 Assemble adapter. More...
 
SmartPtr< IErrEstData< TDomain > > m_spErrEstData
 error estimation object associated to the element discretization More...
 

Additional Inherited Members

- Protected Member Functions inherited from ug::IDomainConstraint< TDomain, TAlgebra >
ConstSmartPtr< DoFDistributiondd (const GridLevel &gl) const
 returns the level dof distribution More...
 

Member Typedef Documentation

◆ algebra_type

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

◆ matrix_type

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

◆ vector_type

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

Constructor & Destructor Documentation

◆ SymP1Constraints()

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

◆ ~SymP1Constraints()

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

Member Function Documentation

◆ adjust_correction()

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

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 from ug::IConstraint< TAlgebra >.

References ug::get_algebra_indices(), and UG_THROW.

◆ adjust_defect()

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

adapts defect to enforce constraints

Implements ug::IConstraint< TAlgebra >.

References ug::get_algebra_indices(), ug::SplitAddRhs_Symmetric(), and UG_THROW.

◆ adjust_jacobian()

template<typename TDomain , typename TAlgebra >
void ug::SymP1Constraints< TDomain, TAlgebra >::adjust_jacobian ( matrix_type J,
const vector_type u,
ConstSmartPtr< DoFDistribution dd,
int  type,
number  time = 0.0,
ConstSmartPtr< VectorTimeSeries< vector_type > >  vSol = NULL,
const number  s_a0 = 1.0 
)
virtual

adapts jacobian to enforce constraints

Implements ug::IConstraint< TAlgebra >.

References ug::get_algebra_indices(), ug::SetInterpolation(), ug::SplitAddRow_Symmetric(), and UG_THROW.

◆ adjust_linear()

template<typename TDomain , typename TAlgebra >
void ug::SymP1Constraints< TDomain, TAlgebra >::adjust_linear ( matrix_type mat,
vector_type rhs,
ConstSmartPtr< DoFDistribution dd,
int  type,
number  time = 0.0 
)
virtual

adapts matrix and rhs (linear case) to enforce constraints

Implements ug::IConstraint< TAlgebra >.

References ug::get_algebra_indices(), ug::SetInterpolation(), ug::SplitAddRhs_Symmetric(), ug::SplitAddRow_Symmetric(), and UG_THROW.

◆ adjust_prolongation()

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

sets constraints in prolongation

Reimplemented from ug::IConstraint< TAlgebra >.

References ug::get_algebra_indices(), ug::SetRow(), and UG_THROW.

◆ adjust_restriction()

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

sets constraints in restriction

Reimplemented from ug::IConstraint< TAlgebra >.

◆ adjust_rhs()

template<typename TDomain , typename TAlgebra >
void ug::SymP1Constraints< TDomain, TAlgebra >::adjust_rhs ( vector_type rhs,
const vector_type u,
ConstSmartPtr< DoFDistribution dd,
int  type,
number  time = 0.0 
)
virtual

adapts a rhs to enforce constraints

Implements ug::IConstraint< TAlgebra >.

References ug::get_algebra_indices(), ug::SplitAddRhs_Symmetric(), and UG_THROW.

◆ adjust_solution()

template<typename TDomain , typename TAlgebra >
void ug::SymP1Constraints< TDomain, TAlgebra >::adjust_solution ( vector_type u,
ConstSmartPtr< DoFDistribution dd,
int  type,
number  time = 0.0 
)
virtual

sets the constraints in a solution vector

Implements ug::IConstraint< TAlgebra >.

References ug::get_algebra_indices(), ug::InterpolateValues(), and UG_THROW.

◆ type()

template<typename TDomain , typename TAlgebra >
virtual int ug::SymP1Constraints< TDomain, TAlgebra >::type ( ) const
inlinevirtual

returns the type of constraints

Implements ug::IDomainConstraint< TDomain, TAlgebra >.

References ug::CT_HANGING.

Member Data Documentation

◆ m_bAssembleLinearProblem

template<typename TDomain , typename TAlgebra >
bool ug::SymP1Constraints< TDomain, TAlgebra >::m_bAssembleLinearProblem
protected

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