ug4
|
Global assembler based on the straightforward application of the local discretizations. More...
#include <elem_disc_assemble_util.h>
Static Public Member Functions | |
template<typename TElem , typename TIterator > | |
static void | AssembleDefect (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, vector_type &d, const vector_type &u, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner) |
template<typename TElem , typename TIterator > | |
static void | AssembleDefect (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, vector_type &d, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner) |
template<typename TElem , typename TIterator > | |
static void | AssembleErrorEstimator (const std::vector< IElemError< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol) |
template<typename TElem , typename TIterator > | |
static void | AssembleErrorEstimator (const std::vector< IElemError< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, const vector_type &u) |
template<typename TElem , typename TIterator > | |
static void | AssembleJacobian (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, matrix_type &J, const vector_type &u, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner) |
template<typename TElem , typename TIterator > | |
static void | AssembleJacobian (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, matrix_type &J, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, number s_a0, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner) |
template<typename TElem , typename TIterator > | |
static void | AssembleLinear (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, matrix_type &A, vector_type &rhs, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner) |
template<typename TElem , typename TIterator > | |
static void | AssembleLinear (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, matrix_type &A, vector_type &rhs, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner) |
template<typename TElem , typename TIterator > | |
static void | AssembleMassMatrix (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, matrix_type &M, const vector_type &u, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner) |
template<typename TElem , typename TIterator > | |
static void | AssembleRhs (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, vector_type &rhs, const vector_type &u, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner) |
template<typename TElem , typename TIterator > | |
static void | AssembleRhs (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, vector_type &rhs, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner) |
template<typename TElem , typename TIterator > | |
static void | AssembleStiffnessMatrix (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, matrix_type &A, const vector_type &u, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner) |
static void | FinishTimestep (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< DoFDistribution > dd, bool bNonRegularGrid, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner) |
template<typename TElem , typename TIterator > | |
static void | FinishTimestepElem (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner) |
static void | PrepareTimestep (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< DoFDistribution > dd, bool bNonRegularGrid, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, number future_time, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner) |
template<typename TElem , typename TIterator > | |
static void | PrepareTimestepElem (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner) |
Private Types | |
typedef TAlgebra | algebra_type |
Algebra type. More... | |
typedef TDomain | domain_type |
Domain type. More... | |
typedef algebra_type::matrix_type | matrix_type |
Matrix type in the algebra. More... | |
typedef algebra_type::vector_type | vector_type |
Vector type in the algebra. More... | |
Global assembler based on the straightforward application of the local discretizations.
Template class of the global assembler that applyes the local (element) discretizations to the elements in given subsets and adds the local data to the global ones.
TDomain | domain type |
TAlgebra | algebra type |
|
private |
Algebra type.
|
private |
Domain type.
|
private |
Matrix type in the algebra.
|
private |
Vector type in the algebra.
|
inlinestatic |
This function adds the contributions of all passed element discretizations on one given subset to the global Defect in the stationary case. (This version processes elements in a given interval.)
[in] | vElemDisc | element discretizations |
[in] | spDomain | domain |
[in] | dd | DoF Distribution |
[in] | iterBegin | element iterator |
[in] | iterEnd | element iterator |
[in] | si | subset index |
[in] | bNonRegularGrid | flag to indicate if non regular grid is used |
[in,out] | d | defect |
[in] | u | solution |
[in] | spAssTuner | assemble adapter |
References ug::bridge::AlgebraCommon::Eval(), ug::FillCornerCoordinates(), ug::GetLocalVector(), ug::hex_rules::NUM_VERTICES, ug::LocalVector::resize(), ug::RHS, ug::LocalVector::scale_append(), ug::STIFF, and UG_CATCH_THROW.
|
inlinestatic |
This function adds the contributions of all passed element discretizations on one given subset to the global Defect in the instationary case. (This version processes elements in a given interval.)
[in] | vElemDisc | element discretizations |
[in] | spDomain | domain |
[in] | dd | DoF Distribution |
[in] | iterBegin | element iterator |
[in] | iterEnd | element iterator |
[in] | si | subset index |
[in] | bNonRegularGrid | flag to indicate if non regular grid is used |
[in,out] | d | defect |
[in] | vSol | current and previous solutions |
[in] | vScaleMass | scaling factors for mass part |
[in] | vScaleStiff | scaling factors for stiffness part |
[in] | spAssTuner | assemble adapter |
References ug::bridge::AlgebraCommon::Eval(), ug::EXPL, ug::FillCornerCoordinates(), ug::MASS, ug::hex_rules::NUM_VERTICES, ug::PT_INSTATIONARY, ug::PT_STATIONARY, ug::LocalVectorTimeSeries::read_times(), ug::LocalVectorTimeSeries::read_values(), ug::LocalVector::resize(), ug::RHS, ug::LocalVector::scale_append(), ug::LocalVectorTimeSeries::solution(), ug::STIFF, UG_CATCH_THROW, and UG_THROW.
|
inlinestatic |
This function assembles the error estimator associated with all the element discretizations in the internal data structure for one given subset. (This version processes elements in a given interval.)
[in] | vElemDisc | element discretizations |
[in] | spDomain | domain |
[in] | dd | DoF Distribution |
[in] | iterBegin | element iterator |
[in] | iterEnd | element iterator |
[in] | si | subset index |
[in] | bNonRegularGrid | flag to indicate if non regular grid is used |
[in] | vScaleMass | scaling factors for mass part |
[in] | vScaleStiff | scaling factors for stiffness part |
[in] | vSol | solution |
References ug::bridge::AlgebraCommon::Eval(), ug::FillCornerCoordinates(), ug::MASS, ug::hex_rules::NUM_VERTICES, ug::LocalVectorTimeSeries::read_times(), ug::LocalVectorTimeSeries::read_values(), ug::RHS, ug::LocalVectorTimeSeries::solution(), ug::STIFF, UG_CATCH_THROW, and UG_THROW.
|
inlinestatic |
This function assembles the error estimator associated with all the element discretizations in the internal data structure for one given subset. (This version processes elements in a given interval.)
[in] | vElemDisc | element discretizations |
[in] | spDomain | domain |
[in] | dd | DoF Distribution |
[in] | iterBegin | element iterator |
[in] | iterEnd | element iterator |
[in] | si | subset index |
[in] | bNonRegularGrid | flag to indicate if non regular grid is used |
[in] | u | solution |
References ug::bridge::AlgebraCommon::Eval(), ug::FillCornerCoordinates(), ug::GetLocalVector(), ug::hex_rules::NUM_VERTICES, ug::LocalVector::resize(), ug::RHS, ug::STIFF, and UG_CATCH_THROW.
|
inlinestatic |
This function adds the contributions of all passed element discretizations on one given subset to the global Jacobian in the stationary case. (This version processes elements in a given interval.)
[in] | vElemDisc | element discretizations |
[in] | spDomain | domain |
[in] | iterBegin | element iterator |
[in] | iterEnd | element iterator |
[in] | si | subset index |
[in] | bNonRegularGrid | flag to indicate if non regular grid is used |
[in,out] | J | jacobian |
[in] | u | solution |
[in] | spAssTuner | assemble adapter |
References ug::bridge::AlgebraCommon::Eval(), ug::FillCornerCoordinates(), ug::GetLocalVector(), ug::hex_rules::NUM_VERTICES, ug::LocalVector::resize(), ug::LocalMatrix::resize(), ug::RHS, ug::STIFF, and UG_CATCH_THROW.
|
inlinestatic |
This function adds the contributions of all passed element discretizations on one given subset to the global Jacobian in the time-dependent case. Note, that s_m0 == 1 (This version processes elements in a given interval.)
[in] | vElemDisc | element discretizations |
[in] | spDomain | domain |
[in] | dd | DoF Distribution |
[in] | iterBegin | element iterator |
[in] | iterEnd | element iterator |
[in] | si | subset index |
[in] | bNonRegularGrid | flag to indicate if non regular grid is used |
[in,out] | J | jacobian |
[in] | vSol | current and previous solutions |
[in] | s_a0 | scaling factor for stiffness part |
[in] | spAssTuner | assemble adapter |
References EL_PROFILE_BEGIN, EL_PROFILE_END, ug::bridge::AlgebraCommon::Eval(), ug::FillCornerCoordinates(), ug::GetLocalVector(), ug::MASS, ug::hex_rules::NUM_VERTICES, ug::PT_INSTATIONARY, ug::PT_STATIONARY, ug::LocalVectorTimeSeries::read_times(), ug::LocalVectorTimeSeries::read_values(), ug::LocalVector::resize(), ug::LocalMatrix::resize(), ug::RHS, ug::STIFF, and UG_CATCH_THROW.
|
inlinestatic |
This function adds the contributions of all passed element discretizations on one given subset to the global Matrix and the global Right-Hand Side of the Linear problem in the stationary case. (This version processes elements in a given interval.)
[in] | vElemDisc | element discretizations |
[in] | spDomain | domain |
[in] | dd | DoF Distribution |
[in] | iterBegin | element iterator |
[in] | iterEnd | element iterator |
[in] | si | subset index |
[in] | bNonRegularGrid | flag to indicate if non regular grid is used |
[in,out] | A | Matrix |
[in,out] | rhs | Right-hand side |
[in] | spAssTuner | assemble adapter |
References ug::DID_ELEM_DISC_ASSEMBLE_UTIL, ug::bridge::AlgebraCommon::Eval(), ug::FillCornerCoordinates(), ug::hex_rules::NUM_VERTICES, ug::LocalVector::resize(), ug::LocalMatrix::resize(), ug::RHS, ug::STIFF, UG_CATCH_THROW, and UG_DLOG.
|
inlinestatic |
This function adds the contributions of all passed element discretizations on one given subset to the global Matrix and the global Right-Hand Side of the Linear problem in the time-dependent case. (This version processes elements in a given interval.)
[in] | vElemDisc | element discretizations |
[in] | spDomain | domain |
[in] | dd | DoF Distribution |
[in] | iterBegin | element iterator |
[in] | iterEnd | element iterator |
[in] | si | subset index |
[in] | bNonRegularGrid | flag to indicate if non regular grid is used |
[in,out] | A | Matrix |
[in,out] | rhs | Right-hand side |
[in] | vSol | current and previous solutions |
[in] | vScaleMass | scaling factors for mass part |
[in] | vScaleStiff | scaling factors for stiffness part |
[in] | spAssTuner | assemble adapter |
References ug::bridge::AlgebraCommon::Eval(), ug::FillCornerCoordinates(), ug::MASS, ug::hex_rules::NUM_VERTICES, ug::PT_INSTATIONARY, ug::PT_STATIONARY, ug::LocalVectorTimeSeries::read_times(), ug::LocalVectorTimeSeries::read_values(), ug::LocalVector::resize(), ug::LocalMatrix::resize(), ug::RHS, ug::LocalVector::scale_append(), ug::LocalMatrix::scale_append(), ug::LocalVectorTimeSeries::solution(), ug::STIFF, UG_CATCH_THROW, and UG_THROW.
|
inlinestatic |
This function adds the contributions of all passed element discretizations on one given subset to the global Mass matrix. (This version processes elements in a given interval.)
[in] | vElemDisc | element discretizations |
[in] | spDomain | domain |
[in] | dd | DoF Distribution |
[in] | iterBegin | element iterator |
[in] | iterEnd | element iterator |
[in] | si | subset index |
[in] | bNonRegularGrid | flag to indicate if non regular grid is used |
[in,out] | M | Mass matrix |
[in] | u | solution |
[in] | spAssTuner | assemble adapter |
References ug::bridge::AlgebraCommon::Eval(), ug::FillCornerCoordinates(), ug::GetLocalVector(), ug::MASS, ug::hex_rules::NUM_VERTICES, ug::LocalVector::resize(), ug::LocalMatrix::resize(), and UG_CATCH_THROW.
|
inlinestatic |
This function adds the contributions of all passed element discretizations on one given subset to the global Right-Hand Side. (This version processes elements in a given interval.)
[in] | vElemDisc | element discretizations |
[in] | spDomain | domain |
[in] | dd | DoF Distribution |
[in] | iterBegin | element iterator |
[in] | iterEnd | element iterator |
[in] | si | subset index |
[in] | bNonRegularGrid | flag to indicate if non regular grid is used |
[in,out] | rhs | Right-hand side |
[in] | u | solution |
[in] | spAssTuner | assemble adapter |
References ug::bridge::AlgebraCommon::Eval(), ug::FillCornerCoordinates(), ug::GetLocalVector(), ug::hex_rules::NUM_VERTICES, ug::LocalVector::resize(), ug::RHS, and UG_CATCH_THROW.
|
inlinestatic |
This function adds the contributions of all passed element discretizations on one given subset to the global Right-Hand Side in the time-dependent case. (This version processes elements in a given interval.)
[in] | vElemDisc | element discretizations |
[in] | spDomain | domain |
[in] | dd | DoF Distribution |
[in] | iterBegin | element iterator |
[in] | iterEnd | element iterator |
[in] | si | subset index |
[in] | bNonRegularGrid | flag to indicate if non regular grid is used |
[in,out] | rhs | Right-hand side |
[in] | vSol | current and previous solutions |
[in] | vScaleMass | scaling factors for mass part |
[in] | vScaleStiff | scaling factors for stiffness part |
[in] | spAssTuner | assemble adapter |
References ug::bridge::AlgebraCommon::Eval(), ug::FillCornerCoordinates(), ug::MASS, ug::hex_rules::NUM_VERTICES, ug::PT_INSTATIONARY, ug::PT_STATIONARY, ug::LocalVectorTimeSeries::read_times(), ug::LocalVectorTimeSeries::read_values(), ug::LocalVector::resize(), ug::RHS, ug::LocalVector::scale_append(), ug::LocalVectorTimeSeries::solution(), ug::STIFF, UG_CATCH_THROW, and UG_THROW.
|
inlinestatic |
This function adds the contributions of all passed element discretizations on one given subset to the global Stiffness matrix. (This version processes elements in a given interval.)
[in] | vElemDisc | element discretizations |
[in] | spDomain | domain |
[in] | dd | DoF Distribution |
[in] | iterBegin | element iterator |
[in] | iterEnd | element iterator |
[in] | si | subset index |
[in] | bNonRegularGrid | flag to indicate if non regular grid is used |
[in,out] | A | Stiffness matrix |
[in] | u | solution |
[in] | spAssTuner | assemble adapter |
References ug::bridge::AlgebraCommon::Eval(), ug::FillCornerCoordinates(), ug::GetLocalVector(), ug::hex_rules::NUM_VERTICES, ug::LocalVector::resize(), ug::LocalMatrix::resize(), ug::STIFF, and UG_CATCH_THROW.
|
inlinestatic |
This function finishes the global discretization for a time-stepping scheme by calling the "finish_timestep" methods of all passed element discretizations.
[in] | vElemDisc | element discretizations |
[in] | dd | DoF Distribution |
[in] | bNonRegularGrid | flag to indicate if non regular grid is used |
[in] | vSol | current and previous solutions |
[in] | spAssTuner | assemble adapter |
References ug::bridge::AlgebraCommon::Eval(), ug::bridge::AlgebraTypeIDProvider::id(), ug::bridge::AlgebraTypeIDProvider::instance(), ug::NONE, ug::LocalVectorTimeSeries::read_times(), and UG_CATCH_THROW.
|
inlinestatic |
This function finalizes the global discretization in a time-stepping scheme by calling the "finish_timestep_elem" methods of all passed element discretizations on one given subset. (This version processes elements in a given interval.)
[in] | vElemDisc | element discretizations |
[in] | dd | DoF Distribution |
[in] | iterBegin | element iterator |
[in] | iterEnd | element iterator |
[in] | si | subset index |
[in] | bNonRegularGrid | flag to indicate if non regular grid is used |
[in] | vSol | current and previous solutions |
[in] | spAssTuner | assemble adapter |
References ug::bridge::AlgebraCommon::Eval(), ug::FillCornerCoordinates(), ug::GetLocalVector(), ug::NONE, ug::hex_rules::NUM_VERTICES, ug::LocalVectorTimeSeries::read_times(), ug::LocalVectorTimeSeries::read_values(), ug::LocalVector::resize(), ug::LocalVectorTimeSeries::time(), and UG_CATCH_THROW.
|
inlinestatic |
This function prepares the global discretization for a time-stepping scheme by calling the "prepare_timestep" methods of all passed element discretizations.
[in] | vElemDisc | element discretizations |
[in] | dd | DoF Distribution |
[in] | bNonRegularGrid | flag to indicate if non regular grid is used |
[in] | vSol | current and previous solutions |
[in] | spAssTuner | assemble adapter |
References ug::bridge::AlgebraCommon::Eval(), ug::bridge::AlgebraTypeIDProvider::id(), ug::bridge::AlgebraTypeIDProvider::instance(), ug::NONE, ug::LocalVectorTimeSeries::read_times(), and UG_CATCH_THROW.
|
inlinestatic |
This function prepares the global discretization for a time-stepping scheme by calling the "prepare_timestep_elem" methods of all passed element discretizations on one given subset. (This version processes elements in a given interval.)
[in] | vElemDisc | element discretizations |
[in] | spDomain | domain |
[in] | dd | DoF Distribution |
[in] | iterBegin | element iterator |
[in] | iterEnd | element iterator |
[in] | si | subset index |
[in] | bNonRegularGrid | flag to indicate if non regular grid is used |
[in] | vSol | current and previous solutions |
[in] | spAssTuner | assemble adapter |
References ug::bridge::AlgebraCommon::Eval(), ug::FillCornerCoordinates(), ug::GetLocalVector(), ug::NONE, ug::hex_rules::NUM_VERTICES, ug::LocalVectorTimeSeries::read_times(), ug::LocalVectorTimeSeries::read_values(), ug::LocalVector::resize(), and UG_CATCH_THROW.