ug4
|
#include <lagrange_dirichlet_boundary.h>
Classes | |
struct | CondNumberData |
grouping for subset and conditional data More... | |
struct | ConstNumberData |
grouping for subset and constant data More... | |
struct | NumberData |
grouping for subset and non-conditional data More... | |
struct | OldNumberData |
grouping for subset and the data already stored in the solution More... | |
struct | VectorData |
grouping for subset and non-conditional vector data More... | |
Public Types | |
typedef TAlgebra | algebra_type |
Type of algebra. More... | |
typedef IDomainConstraint< TDomain, TAlgebra > | base_type |
Base Type. More... | |
typedef TDomain | domain_type |
Type of domain. More... | |
typedef MultipleSideAndElemErrEstData< TDomain > | err_est_type |
error estimator type More... | |
typedef algebra_type::matrix_type | matrix_type |
Type of algebra matrix. More... | |
typedef domain_type::position_type | position_type |
Type of position coordinates (e.g. position_type) More... | |
typedef matrix_type::value_type | value_type |
Type of value type. More... | |
typedef algebra_type::vector_type | vector_type |
Type of algebra vector. More... | |
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 | |
void | add (const char *functions, const char *subsets) |
adds a number Dirichlet condition whose value is taken from the solution vector itself More... | |
void | add (const std::vector< std::string > &Fcts, const std::vector< std::string > &Subsets) |
void | add (number value, const char *function, const char *subsets) |
adds a constant value as dirichlet condition for a function on subsets More... | |
void | add (number value, const std::vector< std::string > &Fcts, const std::vector< std::string > &Subsets) |
void | add (SmartPtr< UserData< MathVector< dim >, dim > > func, const char *functions, const char *subsets) |
adds a user-defined vector as dirichlet condition for a vector-function on subsets More... | |
void | add (SmartPtr< UserData< MathVector< dim >, dim > > func, const std::vector< std::string > &Fcts, const std::vector< std::string > &Subsets) |
void | add (SmartPtr< UserData< number, dim > > func, const char *function, const char *subsets) |
adds a user-defined value as dirichlet condition for a function on subsets More... | |
void | add (SmartPtr< UserData< number, dim > > func, const std::vector< std::string > &Fcts, const std::vector< std::string > &Subsets) |
void | add (SmartPtr< UserData< number, dim, bool > > func, const char *function, const char *subsets) |
adds a lua callback (cond and non-cond) More... | |
void | add (SmartPtr< UserData< number, dim, bool > > func, const std::vector< std::string > &Fcts, const std::vector< std::string > &Subsets) |
virtual void | adjust_correction (vector_type &c, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0) |
sets zero to correction More... | |
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) |
sets a zero value in the defect for all dirichlet indices 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... | |
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) |
sets a unity row for all dirichlet indices More... | |
void | adjust_linear (matrix_type &A, vector_type &b, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0) |
sets unity rows in A and dirichlet values in right-hand side b 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_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 &b, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0) |
sets the dirichlet value in the right-hand side More... | |
void | adjust_solution (vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0) |
sets the dirichlet value in the solution for all dirichlet indices More... | |
void | assemble_dirichlet_rows (matrix_type &mat, ConstSmartPtr< DoFDistribution > dd, number time=0.0) |
Sets dirichlet rows for all registered dirichlet values. More... | |
void | clear () |
removes all scheduled dirichlet data. More... | |
DirichletBoundary () | |
constructor More... | |
DirichletBoundary (bool DirichletColumns) | |
constructor with flag for Dirichlet-Columns. More... | |
void | invert_subset_selection () |
inverts the subset selection making the conditions be imposed on the rest of the domain More... | |
void | set_approximation_space (SmartPtr< ApproximationSpace< TDomain > > approxSpace) |
sets the approximation space to work on More... | |
virtual int | type () const |
returns the type of the constraints More... | |
~DirichletBoundary () | |
destructor More... | |
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... | |
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_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... | |
Static Public Attributes | |
static const int | dim = domain_type::dim |
world Dimension More... | |
Protected Member Functions | |
template<typename TUserData > | |
void | adjust_correction (const std::map< int, std::vector< TUserData * > > &mvUserData, vector_type &c, ConstSmartPtr< DoFDistribution > dd, number time) |
template<typename TBaseElem , typename TUserData > | |
void | adjust_correction (const std::vector< TUserData * > &vUserData, int si, vector_type &c, ConstSmartPtr< DoFDistribution > dd, number time) |
template<typename TUserData > | |
void | adjust_defect (const std::map< int, std::vector< TUserData * > > &mvUserData, vector_type &d, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, number time) |
template<typename TBaseElem , typename TUserData > | |
void | adjust_defect (const std::vector< TUserData * > &vUserData, int si, vector_type &d, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, number time) |
template<typename TUserData > | |
void | adjust_error (const std::map< int, std::vector< TUserData * > > &mvUserData, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, number time) |
template<typename TUserData > | |
void | adjust_jacobian (const std::map< int, std::vector< TUserData * > > &mvUserData, matrix_type &J, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, number time) |
template<typename TBaseElem , typename TUserData > | |
void | adjust_jacobian (const std::vector< TUserData * > &vUserData, int si, matrix_type &J, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, number time) |
template<typename TUserData > | |
void | adjust_linear (const std::map< int, std::vector< TUserData * > > &mvUserData, matrix_type &A, vector_type &b, ConstSmartPtr< DoFDistribution > dd, number time) |
template<typename TBaseElem , typename TUserData > | |
void | adjust_linear (const std::vector< TUserData * > &vUserData, int si, matrix_type &A, vector_type &b, ConstSmartPtr< DoFDistribution > dd, number time) |
template<typename TUserData > | |
void | adjust_prolongation (const std::map< int, std::vector< TUserData * > > &mvUserData, matrix_type &P, ConstSmartPtr< DoFDistribution > ddFine, ConstSmartPtr< DoFDistribution > ddCoarse, number time) |
template<typename TBaseElem , typename TUserData > | |
void | adjust_prolongation (const std::vector< TUserData * > &vUserData, int si, matrix_type &P, ConstSmartPtr< DoFDistribution > ddFine, ConstSmartPtr< DoFDistribution > ddCoarse, number time) |
template<typename TUserData > | |
void | adjust_restriction (const std::map< int, std::vector< TUserData * > > &mvUserData, matrix_type &R, ConstSmartPtr< DoFDistribution > ddCoarse, ConstSmartPtr< DoFDistribution > ddFine, number time) |
template<typename TBaseElem , typename TUserData > | |
void | adjust_restriction (const std::vector< TUserData * > &vUserData, int si, matrix_type &R, ConstSmartPtr< DoFDistribution > ddCoarse, ConstSmartPtr< DoFDistribution > ddFine, number time) |
template<typename TUserData > | |
void | adjust_rhs (const std::map< int, std::vector< TUserData * > > &mvUserData, vector_type &b, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, number time) |
template<typename TBaseElem , typename TUserData > | |
void | adjust_rhs (const std::vector< TUserData * > &vUserData, int si, vector_type &b, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, number time) |
template<typename TUserData > | |
void | adjust_solution (const std::map< int, std::vector< TUserData * > > &mvUserData, vector_type &u, ConstSmartPtr< DoFDistribution > dd, number time) |
template<typename TBaseElem , typename TUserData > | |
void | adjust_solution (const std::vector< TUserData * > &vUserData, int si, vector_type &u, ConstSmartPtr< DoFDistribution > dd, number time) |
void | check_functions_and_subsets (FunctionGroup &functionGroup, SubsetGroup &subsetGroup, size_t numFct) const |
void | extract_data () |
template<typename TUserData , typename TScheduledUserData > | |
void | extract_data (std::map< int, std::vector< TUserData * > > &mvUserDataBndSegment, std::vector< TScheduledUserData > &vUserData) |
Protected Member Functions inherited from ug::IDomainConstraint< TDomain, TAlgebra > | |
ConstSmartPtr< DoFDistribution > | dd (const GridLevel &gl) const |
returns the level dof distribution More... | |
Protected Attributes | |
matrix_type * | m_A |
domain_type::position_accessor_type | m_aaPos |
current position accessor More... | |
bool | m_bDirichletColumns |
flag for setting dirichlet columns More... | |
bool | m_bInvertSubsetSelection |
flag for inverting the subset selection: use Dirichlet throughout except for the given subsets More... | |
std::map< int, std::map< int, std::map< int, value_type > > > | m_dirichletMap |
std::map< int, std::vector< CondNumberData * > > | m_mBNDNumberBndSegment |
conditional boundary values for all subsets More... | |
std::map< int, std::vector< ConstNumberData * > > | m_mConstNumberBndSegment |
constant boundary values for all subsets More... | |
std::map< int, std::vector< NumberData * > > | m_mNumberBndSegment |
non-conditional boundary values for all subsets More... | |
std::map< int, std::vector< OldNumberData * > > | m_mOldNumberBndSegment |
non-conditional boundary values for all subsets More... | |
std::map< int, std::vector< VectorData * > > | m_mVectorBndSegment |
non-conditional boundary values for all subsets More... | |
SmartPtr< ApproximationSpace< TDomain > > | m_spApproxSpace |
current ApproxSpace More... | |
SmartPtr< TDomain > | m_spDomain |
current domain More... | |
std::vector< CondNumberData > | m_vBNDNumberData |
std::vector< ConstNumberData > | m_vConstNumberData |
std::vector< NumberData > | m_vNumberData |
std::vector< OldNumberData > | m_vOldNumberData |
std::vector< VectorData > | m_vVectorData |
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... | |
typedef TAlgebra ug::DirichletBoundary< TDomain, TAlgebra >::algebra_type |
Type of algebra.
typedef IDomainConstraint<TDomain, TAlgebra> ug::DirichletBoundary< TDomain, TAlgebra >::base_type |
Base Type.
typedef TDomain ug::DirichletBoundary< TDomain, TAlgebra >::domain_type |
Type of domain.
typedef MultipleSideAndElemErrEstData<TDomain> ug::DirichletBoundary< TDomain, TAlgebra >::err_est_type |
error estimator type
typedef algebra_type::matrix_type ug::DirichletBoundary< TDomain, TAlgebra >::matrix_type |
Type of algebra matrix.
typedef domain_type::position_type ug::DirichletBoundary< TDomain, TAlgebra >::position_type |
Type of position coordinates (e.g. position_type)
typedef matrix_type::value_type ug::DirichletBoundary< TDomain, TAlgebra >::value_type |
Type of value type.
typedef algebra_type::vector_type ug::DirichletBoundary< TDomain, TAlgebra >::vector_type |
Type of algebra vector.
|
inline |
constructor
If you want to have Dirichlet columns than use the constructor with the flag The default ist without Dirichlet columns.
References ug::DirichletBoundary< TDomain, TAlgebra >::clear().
|
inline |
constructor with flag for Dirichlet-Columns.
References ug::DirichletBoundary< TDomain, TAlgebra >::clear().
|
inline |
destructor
void ug::DirichletBoundary< TDomain, TAlgebra >::add | ( | const char * | functions, |
const char * | subsets | ||
) |
adds a number Dirichlet condition whose value is taken from the solution vector itself
void ug::DirichletBoundary< TDomain, TAlgebra >::add | ( | const std::vector< std::string > & | Fcts, |
const std::vector< std::string > & | Subsets | ||
) |
void ug::DirichletBoundary< TDomain, TAlgebra >::add | ( | number | value, |
const char * | function, | ||
const char * | subsets | ||
) |
adds a constant value as dirichlet condition for a function on subsets
void ug::DirichletBoundary< TDomain, TAlgebra >::add | ( | number | value, |
const std::vector< std::string > & | Fcts, | ||
const std::vector< std::string > & | Subsets | ||
) |
void ug::DirichletBoundary< TDomain, TAlgebra >::add | ( | SmartPtr< UserData< MathVector< dim >, dim > > | func, |
const char * | functions, | ||
const char * | subsets | ||
) |
adds a user-defined vector as dirichlet condition for a vector-function on subsets
References func().
void ug::DirichletBoundary< TDomain, TAlgebra >::add | ( | SmartPtr< UserData< MathVector< dim >, dim > > | func, |
const std::vector< std::string > & | Fcts, | ||
const std::vector< std::string > & | Subsets | ||
) |
References func().
void ug::DirichletBoundary< TDomain, TAlgebra >::add | ( | SmartPtr< UserData< number, dim > > | func, |
const char * | function, | ||
const char * | subsets | ||
) |
adds a user-defined value as dirichlet condition for a function on subsets
References func().
void ug::DirichletBoundary< TDomain, TAlgebra >::add | ( | SmartPtr< UserData< number, dim > > | func, |
const std::vector< std::string > & | Fcts, | ||
const std::vector< std::string > & | Subsets | ||
) |
References func().
void ug::DirichletBoundary< TDomain, TAlgebra >::add | ( | SmartPtr< UserData< number, dim, bool > > | func, |
const char * | function, | ||
const char * | subsets | ||
) |
adds a lua callback (cond and non-cond)
adds a conditional user-defined value as dirichlet condition for a function on subsets
References func().
void ug::DirichletBoundary< TDomain, TAlgebra >::add | ( | SmartPtr< UserData< number, dim, bool > > | func, |
const std::vector< std::string > & | Fcts, | ||
const std::vector< std::string > & | Subsets | ||
) |
References func().
|
protected |
References ug::EDGE, ug::FACE, UG_CATCH_THROW, ug::VERTEX, and ug::VOLUME.
|
protected |
References UG_ASSERT.
|
virtual |
sets zero to correction
Reimplemented from ug::IConstraint< TAlgebra >.
|
protected |
References ug::EDGE, ug::FACE, UG_CATCH_THROW, ug::VERTEX, and ug::VOLUME.
|
protected |
References UG_ASSERT.
|
virtual |
sets a zero value in the defect for all dirichlet indices
Implements ug::IConstraint< TAlgebra >.
|
protected |
|
virtual |
adjusts the assembled error estimator values in the attachments according to the constraint
Reimplemented from ug::IConstraint< TAlgebra >.
References UG_THROW.
|
protected |
References ug::EDGE, ug::FACE, UG_CATCH_THROW, ug::VERTEX, and ug::VOLUME.
|
protected |
References UG_ASSERT.
|
virtual |
sets a unity row for all dirichlet indices
Implements ug::IConstraint< TAlgebra >.
|
protected |
References ug::EDGE, ug::FACE, UG_CATCH_THROW, ug::VERTEX, and ug::VOLUME.
|
protected |
References ug::find(), UG_ASSERT, and UG_COND_THROW.
|
virtual |
sets unity rows in A and dirichlet values in right-hand side b
Implements ug::IConstraint< TAlgebra >.
|
protected |
References ug::EDGE, ug::FACE, UG_CATCH_THROW, ug::VERTEX, and ug::VOLUME.
|
protected |
References ug::DoFRef(), ug::SetRow(), and UG_ASSERT.
|
virtual |
sets constraints in prolongation
Reimplemented from ug::IConstraint< TAlgebra >.
|
protected |
References ug::EDGE, ug::FACE, UG_CATCH_THROW, ug::VERTEX, and ug::VOLUME.
|
protected |
References ug::DoFRef(), ug::SetRow(), and UG_ASSERT.
|
virtual |
sets constraints in restriction
Reimplemented from ug::IConstraint< TAlgebra >.
|
protected |
References ug::EDGE, ug::FACE, UG_CATCH_THROW, ug::VERTEX, and ug::VOLUME.
|
protected |
References ug::DoFRef(), ug::find(), and UG_ASSERT.
|
virtual |
sets the dirichlet value in the right-hand side
Implements ug::IConstraint< TAlgebra >.
|
protected |
References ug::EDGE, ug::FACE, UG_CATCH_THROW, ug::VERTEX, and ug::VOLUME.
|
protected |
References UG_ASSERT.
|
virtual |
sets the dirichlet value in the solution for all dirichlet indices
Implements ug::IConstraint< TAlgebra >.
void ug::DirichletBoundary< TDomain, TAlgebra >::assemble_dirichlet_rows | ( | matrix_type & | mat, |
ConstSmartPtr< DoFDistribution > | dd, | ||
number | time = 0.0 |
||
) |
Sets dirichlet rows for all registered dirichlet values.
(implemented by Mr. Xylouris and Mr. Reiter)
This method is just an attempt to allow to set dirichlet rows in a matrix. It should probably be a virtual method derived from IDirichletPostProcess.
Note that adjust_jacobian does the same (...!!!) You should thus use adjust_jacobian.
This method is probably removed in the near future!
It could make sense to keep it but implement it as an overload of adjust_jacobian...
If Mr. Vogel decides that this is nonsense, he may of course remove it!!!
|
protected |
References ug::FunctionGroup::size(), ug::SubsetGroup::size(), and UG_THROW.
void ug::DirichletBoundary< TDomain, TAlgebra >::clear |
removes all scheduled dirichlet data.
Referenced by ug::DirichletBoundary< TDomain, TAlgebra >::DirichletBoundary().
|
protected |
References UG_THROW.
|
protected |
References ug::FunctionGroup::size(), UG_CATCH_THROW, and UG_THROW.
|
inline |
inverts the subset selection making the conditions be imposed on the rest of the domain
References ug::DirichletBoundary< TDomain, TAlgebra >::m_bInvertSubsetSelection.
|
virtual |
sets the approximation space to work on
Reimplemented from ug::IDomainConstraint< TDomain, TAlgebra >.
|
inlinevirtual |
returns the type of the constraints
Implements ug::IDomainConstraint< TDomain, TAlgebra >.
References ug::CT_DIRICHLET.
|
static |
world Dimension
|
protected |
|
protected |
current position accessor
|
protected |
flag for setting dirichlet columns
|
protected |
flag for inverting the subset selection: use Dirichlet throughout except for the given subsets
Referenced by ug::DirichletBoundary< TDomain, TAlgebra >::invert_subset_selection().
|
protected |
maps a column dirichlet index to the row and its corresponding matrix entry.
|
protected |
conditional boundary values for all subsets
|
protected |
constant boundary values for all subsets
|
protected |
non-conditional boundary values for all subsets
|
protected |
non-conditional boundary values for all subsets
|
protected |
non-conditional boundary values for all subsets
|
protected |
current ApproxSpace
|
protected |
current domain
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |