33 #ifndef __H__UG__LIB_DISC__SPATIAL_DISC__CONSTRAINTS__CONSTRAINTS__INTERFACE__
34 #define __H__UG__LIB_DISC__SPATIAL_DISC__CONSTRAINTS__CONSTRAINTS__INTERFACE__
61 template <
typename TAlgebra>
79 const number s_a0 = 1.0) = 0;
85 const std::vector<number>* vScaleMass = NULL,
86 const std::vector<number>* vScaleStiff = NULL) = 0;
115 const std::vector<number>* vScaleMass = NULL,
116 const std::vector<number>* vScaleStiff = NULL) {};
160 template <
typename TDomain,
typename TAlgebra>
Definition: smart_pointer.h:296
Definition: smart_pointer.h:108
base class for approximation spaces without type of algebra or dof distribution
Definition: approximation_space.h:279
The AssemblingTuner class combines tools to adapt the assembling routine.
Definition: ass_tuner.h:90
Definition: grid_level.h:42
interface for adjustment of constraints
Definition: constraint_interface.h:63
virtual void adjust_restriction(matrix_type &R, ConstSmartPtr< DoFDistribution > ddCoarse, ConstSmartPtr< DoFDistribution > ddFine, int type, number time=0.0)
sets constraints in restriction
Definition: constraint_interface.h:126
virtual void adjust_correction(vector_type &c, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0)
Definition: constraint_interface.h:103
virtual void modify_solution(vector_type &uMod, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type)
modifies solution vector before calling the assembling routine
Definition: constraint_interface.h:143
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
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
algebra_type::vector_type vector_type
Type of algebra vector.
Definition: constraint_interface.h:72
virtual void modify_solution(SmartPtr< VectorTimeSeries< vector_type > > vSolMod, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, ConstSmartPtr< DoFDistribution > dd, int type)
modify_solution for instationary case
Definition: constraint_interface.h:147
virtual void adjust_solution(vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0)=0
sets the constraints in a solution vector
virtual ~IConstraint()
virtual destructor
Definition: constraint_interface.h:156
virtual int type() const =0
returns the type of constraints
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
virtual void adjust_restriction(vector_type &uCoarse, GridLevel coarseLvl, const vector_type &uFine, GridLevel fineLvl, int type)
sets the constraints in a solution vector
Definition: constraint_interface.h:133
virtual void adjust_prolongation(matrix_type &P, ConstSmartPtr< DoFDistribution > ddFine, ConstSmartPtr< DoFDistribution > ddCoarse, int type, number time=0.0)
sets constraints in prolongation
Definition: constraint_interface.h:119
algebra_type::matrix_type matrix_type
Type of algebra matrix.
Definition: constraint_interface.h:69
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
Definition: constraint_interface.h:112
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
TAlgebra algebra_type
Algebra type.
Definition: constraint_interface.h:66
virtual void adjust_prolongation(vector_type &uFine, GridLevel fineLvl, const vector_type &uCoarse, GridLevel coarseLvl, int type)
sets the constraints in a solution vector
Definition: constraint_interface.h:138
virtual void adjust_linear_residual(vector_type &d, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0)
adjust linear residual
Definition: constraint_interface.h:107
Definition: constraint_interface.h:162
SmartPtr< ApproximationSpace< TDomain > > m_spApproxSpace
Approximation Space.
Definition: constraint_interface.h:249
algebra_type::vector_type vector_type
Type of algebra vector.
Definition: constraint_interface.h:174
SmartPtr< IErrEstData< TDomain > > m_spErrEstData
error estimation object associated to the element discretization
Definition: constraint_interface.h:235
algebra_type::matrix_type matrix_type
Type of algebra matrix.
Definition: constraint_interface.h:171
bool err_est_enabled() const
find out whether or not a posteriori error estimation is to be performed for this disc
Definition: constraint_interface.h:224
virtual int type() const =0
returns the type of constraints
SmartPtr< ApproximationSpace< TDomain > > approximation_space()
returns approximation space
Definition: constraint_interface.h:188
IDomainConstraint()
constructor
Definition: constraint_interface.h:178
void set_error_estimator(SmartPtr< IErrEstData< TDomain > > ee)
sets the pointer to an error estimator data object (or NULL)
Definition: constraint_interface.h:221
ConstSmartPtr< DoFDistribution > dd(const GridLevel &gl) const
returns the level dof distribution
Definition: constraint_interface.h:242
ConstSmartPtr< AssemblingTuner< TAlgebra > > m_spAssTuner
Assemble adapter.
Definition: constraint_interface.h:252
void set_ass_tuner(ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssemblingTuner=NULL)
sets the assemble adapter for the constraints
Definition: constraint_interface.h:203
virtual SmartPtr< IErrEstData< TDomain > > err_est_data()
returns the pointer to the error estimator data object (or NULL)
Definition: constraint_interface.h:227
virtual void set_approximation_space(SmartPtr< ApproximationSpace< TDomain > > approxSpace)
sets the approximation space
Definition: constraint_interface.h:182
TDomain domain_type
Domain Type.
Definition: constraint_interface.h:165
bool m_bDoErrEst
flag indicating whether or not a posteriori error estimation is to be performed for this disc
Definition: constraint_interface.h:231
TAlgebra algebra_type
Algebra type.
Definition: constraint_interface.h:168
ConstSmartPtr< ApproximationSpace< TDomain > > approximation_space() const
returns approximation space
Definition: constraint_interface.h:194
Base class for error estimator data.
Definition: err_est_data.h:71
time series of solutions and corresponding time point
Definition: solution_time_series.h:59
const NullSmartPtr SPNULL
The equivalent to NULL for smart pointers.
Definition: smart_pointer.h:90
double number
Definition: types.h:124