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

#include <lagrange_dirichlet_boundary.h>

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

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< DoFDistributiondd (const GridLevel &gl) const
 returns the level dof distribution More...
 

Protected Attributes

matrix_typem_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< CondNumberDatam_vBNDNumberData
 
std::vector< ConstNumberDatam_vConstNumberData
 
std::vector< NumberDatam_vNumberData
 
std::vector< OldNumberDatam_vOldNumberData
 
std::vector< VectorDatam_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...
 

Member Typedef Documentation

◆ algebra_type

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

Type of algebra.

◆ base_type

template<typename TDomain , typename TAlgebra >
typedef IDomainConstraint<TDomain, TAlgebra> ug::DirichletBoundary< TDomain, TAlgebra >::base_type

Base Type.

◆ domain_type

template<typename TDomain , typename TAlgebra >
typedef TDomain ug::DirichletBoundary< TDomain, TAlgebra >::domain_type

Type of domain.

◆ err_est_type

template<typename TDomain , typename TAlgebra >
typedef MultipleSideAndElemErrEstData<TDomain> ug::DirichletBoundary< TDomain, TAlgebra >::err_est_type

error estimator type

◆ matrix_type

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

Type of algebra matrix.

◆ position_type

template<typename TDomain , typename TAlgebra >
typedef domain_type::position_type ug::DirichletBoundary< TDomain, TAlgebra >::position_type

Type of position coordinates (e.g. position_type)

◆ value_type

template<typename TDomain , typename TAlgebra >
typedef matrix_type::value_type ug::DirichletBoundary< TDomain, TAlgebra >::value_type

Type of value type.

◆ vector_type

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

Type of algebra vector.

Constructor & Destructor Documentation

◆ DirichletBoundary() [1/2]

template<typename TDomain , typename TAlgebra >
ug::DirichletBoundary< TDomain, TAlgebra >::DirichletBoundary ( )
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().

◆ DirichletBoundary() [2/2]

template<typename TDomain , typename TAlgebra >
ug::DirichletBoundary< TDomain, TAlgebra >::DirichletBoundary ( bool  DirichletColumns)
inline

constructor with flag for Dirichlet-Columns.

References ug::DirichletBoundary< TDomain, TAlgebra >::clear().

◆ ~DirichletBoundary()

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

destructor

Member Function Documentation

◆ add() [1/10]

template<typename TDomain , typename TAlgebra >
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

◆ add() [2/10]

template<typename TDomain , typename TAlgebra >
void ug::DirichletBoundary< TDomain, TAlgebra >::add ( const std::vector< std::string > &  Fcts,
const std::vector< std::string > &  Subsets 
)

◆ add() [3/10]

template<typename TDomain , typename TAlgebra >
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

◆ add() [4/10]

template<typename TDomain , typename TAlgebra >
void ug::DirichletBoundary< TDomain, TAlgebra >::add ( number  value,
const std::vector< std::string > &  Fcts,
const std::vector< std::string > &  Subsets 
)

◆ add() [5/10]

template<typename TDomain , typename TAlgebra >
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().

◆ add() [6/10]

template<typename TDomain , typename TAlgebra >
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().

◆ add() [7/10]

template<typename TDomain , typename TAlgebra >
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().

◆ add() [8/10]

template<typename TDomain , typename TAlgebra >
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().

◆ add() [9/10]

template<typename TDomain , typename TAlgebra >
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().

◆ add() [10/10]

template<typename TDomain , typename TAlgebra >
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().

◆ adjust_correction() [1/3]

template<typename TDomain , typename TAlgebra >
template<typename TUserData >
void ug::DirichletBoundary< TDomain, TAlgebra >::adjust_correction ( const std::map< int, std::vector< TUserData * > > &  mvUserData,
vector_type c,
ConstSmartPtr< DoFDistribution dd,
number  time 
)
protected

◆ adjust_correction() [2/3]

template<typename TDomain , typename TAlgebra >
template<typename TBaseElem , typename TUserData >
void ug::DirichletBoundary< TDomain, TAlgebra >::adjust_correction ( const std::vector< TUserData * > &  vUserData,
int  si,
vector_type c,
ConstSmartPtr< DoFDistribution dd,
number  time 
)
protected

References UG_ASSERT.

◆ adjust_correction() [3/3]

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

sets zero to correction

Reimplemented from ug::IConstraint< TAlgebra >.

◆ adjust_defect() [1/3]

template<typename TDomain , typename TAlgebra >
template<typename TUserData >
void ug::DirichletBoundary< TDomain, TAlgebra >::adjust_defect ( const std::map< int, std::vector< TUserData * > > &  mvUserData,
vector_type d,
const vector_type u,
ConstSmartPtr< DoFDistribution dd,
number  time 
)
protected

◆ adjust_defect() [2/3]

template<typename TDomain , typename TAlgebra >
template<typename TBaseElem , typename TUserData >
void ug::DirichletBoundary< TDomain, TAlgebra >::adjust_defect ( const std::vector< TUserData * > &  vUserData,
int  si,
vector_type d,
const vector_type u,
ConstSmartPtr< DoFDistribution dd,
number  time 
)
protected

References UG_ASSERT.

◆ adjust_defect() [3/3]

template<typename TDomain , typename TAlgebra >
void ug::DirichletBoundary< 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

sets a zero value in the defect for all dirichlet indices

Implements ug::IConstraint< TAlgebra >.

◆ adjust_error() [1/2]

template<typename TDomain , typename TAlgebra >
template<typename TUserData >
void ug::DirichletBoundary< TDomain, TAlgebra >::adjust_error ( const std::map< int, std::vector< TUserData * > > &  mvUserData,
const vector_type u,
ConstSmartPtr< DoFDistribution dd,
number  time 
)
protected

◆ adjust_error() [2/2]

template<typename TDomain , typename TAlgebra >
void ug::DirichletBoundary< TDomain, 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 
)
virtual

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

Reimplemented from ug::IConstraint< TAlgebra >.

References UG_THROW.

◆ adjust_jacobian() [1/3]

template<typename TDomain , typename TAlgebra >
template<typename TUserData >
void ug::DirichletBoundary< TDomain, TAlgebra >::adjust_jacobian ( const std::map< int, std::vector< TUserData * > > &  mvUserData,
matrix_type J,
const vector_type u,
ConstSmartPtr< DoFDistribution dd,
number  time 
)
protected

◆ adjust_jacobian() [2/3]

template<typename TDomain , typename TAlgebra >
template<typename TBaseElem , typename TUserData >
void ug::DirichletBoundary< TDomain, TAlgebra >::adjust_jacobian ( const std::vector< TUserData * > &  vUserData,
int  si,
matrix_type J,
const vector_type u,
ConstSmartPtr< DoFDistribution dd,
number  time 
)
protected

References UG_ASSERT.

◆ adjust_jacobian() [3/3]

template<typename TDomain , typename TAlgebra >
void ug::DirichletBoundary< 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

sets a unity row for all dirichlet indices

Implements ug::IConstraint< TAlgebra >.

◆ adjust_linear() [1/3]

template<typename TDomain , typename TAlgebra >
template<typename TUserData >
void ug::DirichletBoundary< TDomain, TAlgebra >::adjust_linear ( const std::map< int, std::vector< TUserData * > > &  mvUserData,
matrix_type A,
vector_type b,
ConstSmartPtr< DoFDistribution dd,
number  time 
)
protected

◆ adjust_linear() [2/3]

template<typename TDomain , typename TAlgebra >
template<typename TBaseElem , typename TUserData >
void ug::DirichletBoundary< TDomain, TAlgebra >::adjust_linear ( const std::vector< TUserData * > &  vUserData,
int  si,
matrix_type A,
vector_type b,
ConstSmartPtr< DoFDistribution dd,
number  time 
)
protected

References ug::find(), UG_ASSERT, and UG_COND_THROW.

◆ adjust_linear() [3/3]

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

sets unity rows in A and dirichlet values in right-hand side b

Implements ug::IConstraint< TAlgebra >.

◆ adjust_prolongation() [1/3]

template<typename TDomain , typename TAlgebra >
template<typename TUserData >
void ug::DirichletBoundary< TDomain, TAlgebra >::adjust_prolongation ( const std::map< int, std::vector< TUserData * > > &  mvUserData,
matrix_type P,
ConstSmartPtr< DoFDistribution ddFine,
ConstSmartPtr< DoFDistribution ddCoarse,
number  time 
)
protected

◆ adjust_prolongation() [2/3]

template<typename TDomain , typename TAlgebra >
template<typename TBaseElem , typename TUserData >
void ug::DirichletBoundary< TDomain, TAlgebra >::adjust_prolongation ( const std::vector< TUserData * > &  vUserData,
int  si,
matrix_type P,
ConstSmartPtr< DoFDistribution ddFine,
ConstSmartPtr< DoFDistribution ddCoarse,
number  time 
)
protected

References ug::DoFRef(), ug::SetRow(), and UG_ASSERT.

◆ adjust_prolongation() [3/3]

template<typename TDomain , typename TAlgebra >
void ug::DirichletBoundary< 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 >.

◆ adjust_restriction() [1/3]

template<typename TDomain , typename TAlgebra >
template<typename TUserData >
void ug::DirichletBoundary< TDomain, TAlgebra >::adjust_restriction ( const std::map< int, std::vector< TUserData * > > &  mvUserData,
matrix_type R,
ConstSmartPtr< DoFDistribution ddCoarse,
ConstSmartPtr< DoFDistribution ddFine,
number  time 
)
protected

◆ adjust_restriction() [2/3]

template<typename TDomain , typename TAlgebra >
template<typename TBaseElem , typename TUserData >
void ug::DirichletBoundary< TDomain, TAlgebra >::adjust_restriction ( const std::vector< TUserData * > &  vUserData,
int  si,
matrix_type R,
ConstSmartPtr< DoFDistribution ddCoarse,
ConstSmartPtr< DoFDistribution ddFine,
number  time 
)
protected

References ug::DoFRef(), ug::SetRow(), and UG_ASSERT.

◆ adjust_restriction() [3/3]

template<typename TDomain , typename TAlgebra >
void ug::DirichletBoundary< 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() [1/3]

template<typename TDomain , typename TAlgebra >
template<typename TUserData >
void ug::DirichletBoundary< TDomain, TAlgebra >::adjust_rhs ( const std::map< int, std::vector< TUserData * > > &  mvUserData,
vector_type b,
const vector_type u,
ConstSmartPtr< DoFDistribution dd,
number  time 
)
protected

◆ adjust_rhs() [2/3]

template<typename TDomain , typename TAlgebra >
template<typename TBaseElem , typename TUserData >
void ug::DirichletBoundary< TDomain, TAlgebra >::adjust_rhs ( const std::vector< TUserData * > &  vUserData,
int  si,
vector_type b,
const vector_type u,
ConstSmartPtr< DoFDistribution dd,
number  time 
)
protected

References ug::DoFRef(), ug::find(), and UG_ASSERT.

◆ adjust_rhs() [3/3]

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

sets the dirichlet value in the right-hand side

Implements ug::IConstraint< TAlgebra >.

◆ adjust_solution() [1/3]

template<typename TDomain , typename TAlgebra >
template<typename TUserData >
void ug::DirichletBoundary< TDomain, TAlgebra >::adjust_solution ( const std::map< int, std::vector< TUserData * > > &  mvUserData,
vector_type u,
ConstSmartPtr< DoFDistribution dd,
number  time 
)
protected

◆ adjust_solution() [2/3]

template<typename TDomain , typename TAlgebra >
template<typename TBaseElem , typename TUserData >
void ug::DirichletBoundary< TDomain, TAlgebra >::adjust_solution ( const std::vector< TUserData * > &  vUserData,
int  si,
vector_type u,
ConstSmartPtr< DoFDistribution dd,
number  time 
)
protected

References UG_ASSERT.

◆ adjust_solution() [3/3]

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

sets the dirichlet value in the solution for all dirichlet indices

Implements ug::IConstraint< TAlgebra >.

◆ assemble_dirichlet_rows()

template<typename TDomain , typename 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!!!

◆ check_functions_and_subsets()

template<typename TDomain , typename TAlgebra >
void ug::DirichletBoundary< TDomain, TAlgebra >::check_functions_and_subsets ( FunctionGroup functionGroup,
SubsetGroup subsetGroup,
size_t  numFct 
) const
protected

◆ clear()

template<typename TDomain , typename TAlgebra >
void ug::DirichletBoundary< TDomain, TAlgebra >::clear

removes all scheduled dirichlet data.

Referenced by ug::DirichletBoundary< TDomain, TAlgebra >::DirichletBoundary().

◆ extract_data() [1/2]

template<typename TDomain , typename TAlgebra >
void ug::DirichletBoundary< TDomain, TAlgebra >::extract_data
protected

References UG_THROW.

◆ extract_data() [2/2]

template<typename TDomain , typename TAlgebra >
template<typename TUserData , typename TScheduledUserData >
void ug::DirichletBoundary< TDomain, TAlgebra >::extract_data ( std::map< int, std::vector< TUserData * > > &  mvUserDataBndSegment,
std::vector< TScheduledUserData > &  vUserData 
)
protected

◆ invert_subset_selection()

template<typename TDomain , typename TAlgebra >
void ug::DirichletBoundary< TDomain, TAlgebra >::invert_subset_selection ( )
inline

inverts the subset selection making the conditions be imposed on the rest of the domain

References ug::DirichletBoundary< TDomain, TAlgebra >::m_bInvertSubsetSelection.

◆ set_approximation_space()

template<typename TDomain , typename TAlgebra >
void ug::DirichletBoundary< TDomain, TAlgebra >::set_approximation_space ( SmartPtr< ApproximationSpace< TDomain > >  approxSpace)
virtual

sets the approximation space to work on

Reimplemented from ug::IDomainConstraint< TDomain, TAlgebra >.

◆ type()

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

returns the type of the constraints

Implements ug::IDomainConstraint< TDomain, TAlgebra >.

References ug::CT_DIRICHLET.

Member Data Documentation

◆ dim

template<typename TDomain , typename TAlgebra >
const int ug::DirichletBoundary< TDomain, TAlgebra >::dim = domain_type::dim
static

world Dimension

◆ m_A

template<typename TDomain , typename TAlgebra >
matrix_type* ug::DirichletBoundary< TDomain, TAlgebra >::m_A
protected

◆ m_aaPos

template<typename TDomain , typename TAlgebra >
domain_type::position_accessor_type ug::DirichletBoundary< TDomain, TAlgebra >::m_aaPos
protected

current position accessor

◆ m_bDirichletColumns

template<typename TDomain , typename TAlgebra >
bool ug::DirichletBoundary< TDomain, TAlgebra >::m_bDirichletColumns
protected

flag for setting dirichlet columns

◆ m_bInvertSubsetSelection

template<typename TDomain , typename TAlgebra >
bool ug::DirichletBoundary< TDomain, TAlgebra >::m_bInvertSubsetSelection
protected

flag for inverting the subset selection: use Dirichlet throughout except for the given subsets

Referenced by ug::DirichletBoundary< TDomain, TAlgebra >::invert_subset_selection().

◆ m_dirichletMap

template<typename TDomain , typename TAlgebra >
std::map<int, std::map<int, std::map<int, value_type> > > ug::DirichletBoundary< TDomain, TAlgebra >::m_dirichletMap
protected

maps a column dirichlet index to the row and its corresponding matrix entry.

◆ m_mBNDNumberBndSegment

template<typename TDomain , typename TAlgebra >
std::map<int, std::vector<CondNumberData*> > ug::DirichletBoundary< TDomain, TAlgebra >::m_mBNDNumberBndSegment
protected

conditional boundary values for all subsets

◆ m_mConstNumberBndSegment

template<typename TDomain , typename TAlgebra >
std::map<int, std::vector<ConstNumberData*> > ug::DirichletBoundary< TDomain, TAlgebra >::m_mConstNumberBndSegment
protected

constant boundary values for all subsets

◆ m_mNumberBndSegment

template<typename TDomain , typename TAlgebra >
std::map<int, std::vector<NumberData*> > ug::DirichletBoundary< TDomain, TAlgebra >::m_mNumberBndSegment
protected

non-conditional boundary values for all subsets

◆ m_mOldNumberBndSegment

template<typename TDomain , typename TAlgebra >
std::map<int, std::vector<OldNumberData*> > ug::DirichletBoundary< TDomain, TAlgebra >::m_mOldNumberBndSegment
protected

non-conditional boundary values for all subsets

◆ m_mVectorBndSegment

template<typename TDomain , typename TAlgebra >
std::map<int, std::vector<VectorData*> > ug::DirichletBoundary< TDomain, TAlgebra >::m_mVectorBndSegment
protected

non-conditional boundary values for all subsets

◆ m_spApproxSpace

template<typename TDomain , typename TAlgebra >
SmartPtr<ApproximationSpace<TDomain> > ug::DirichletBoundary< TDomain, TAlgebra >::m_spApproxSpace
protected

current ApproxSpace

◆ m_spDomain

template<typename TDomain , typename TAlgebra >
SmartPtr<TDomain> ug::DirichletBoundary< TDomain, TAlgebra >::m_spDomain
protected

current domain

◆ m_vBNDNumberData

template<typename TDomain , typename TAlgebra >
std::vector<CondNumberData> ug::DirichletBoundary< TDomain, TAlgebra >::m_vBNDNumberData
protected

◆ m_vConstNumberData

template<typename TDomain , typename TAlgebra >
std::vector<ConstNumberData> ug::DirichletBoundary< TDomain, TAlgebra >::m_vConstNumberData
protected

◆ m_vNumberData

template<typename TDomain , typename TAlgebra >
std::vector<NumberData> ug::DirichletBoundary< TDomain, TAlgebra >::m_vNumberData
protected

◆ m_vOldNumberData

template<typename TDomain , typename TAlgebra >
std::vector<OldNumberData> ug::DirichletBoundary< TDomain, TAlgebra >::m_vOldNumberData
protected

◆ m_vVectorData

template<typename TDomain , typename TAlgebra >
std::vector<VectorData> ug::DirichletBoundary< TDomain, TAlgebra >::m_vVectorData
protected

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