ug4
|
The AssemblingTuner class combines tools to adapt the assembling routine. More...
#include <ass_tuner.h>
Public Types | |
typedef TAlgebra | algebra_type |
Algebra type. | |
typedef algebra_type::matrix_type | matrix_type |
Type of algebra matrix. | |
typedef vector_type::value_type | value_type |
Type of algebra value. | |
typedef algebra_type::vector_type | vector_type |
Type of algebra vector. | |
Public Member Functions | |
void | add_local_mat_to_global (matrix_type &mat, const LocalMatrix &lmat, ConstSmartPtr< DoFDistribution > dd) const |
void | add_local_vec_to_global (vector_type &vec, const LocalVector &lvec, ConstSmartPtr< DoFDistribution > dd) const |
LocalToGlobalMapper-function calls. | |
AssemblingTuner () | |
constructor | |
template<typename TElem > | |
void | collect_selected_elements (std::vector< TElem * > &vElem, ConstSmartPtr< DoFDistribution > dd, int si) const |
gets the element iterator from the Selector | |
bool | constraint_type_enabled (int type) const |
returns if constraint type enabled | |
void | disable_clear_on_resize () |
void | disable_single_index_assembling () |
sets an index for which the assembling should be carried out | |
bool | elem_disc_type_enabled (int type) const |
returns if elem disc type enabled | |
template<typename TElem > | |
bool | element_used (TElem *elem) const |
returns if element is to be used in assembling | |
void | enable_constraints (int bEnableTypes) |
enables constraints | |
void | enable_elem_discs (int bEnableTypes) |
enables elem discs | |
void | enable_modify_solution (bool bEnable) |
enables the usage of modify solution | |
int | enabled_constraints () const |
returns flags of enabled constraints | |
int | enabled_elem_discs () const |
returns flags of enabled elem discs | |
bool | matrix_is_const () const |
void | modify_LocalSol (LocalVector &vecMod, const LocalVector &lvec, ConstSmartPtr< DoFDistribution > dd) const |
bool | modify_solution_enabled () const |
checks whether the assemble index is set or not | |
bool | regular_grid_forced () const |
returns if assembling is to considered as regular grid | |
void | resize (ConstSmartPtr< DoFDistribution > dd, matrix_type &mat) const |
void | resize (ConstSmartPtr< DoFDistribution > dd, vector_type &vec) const |
resize functions used in assemble funcs | |
bool | selected_elements_used () const |
returns if only selected elements used for assembling | |
void | set_dirichlet_row (matrix_type &mat, const DoFIndex &ind) const |
void | set_dirichlet_val (vector_type &vec, const DoFIndex &ind, const double val) const |
virtual void | set_force_regular_grid (bool bForce) |
forces the assembling to consider the grid as regular | |
void | set_mapping (ILocalToGlobalMapper< TAlgebra > *pMapper=NULL) |
set local to global mapping | |
void | set_marker (BoolMarker *mark=NULL) |
sets a marker to exclude elements from assembling | |
void | set_matrix_is_const (bool bCh) |
void | set_matrix_structure_is_const (bool b) |
void | set_selector (Selector *sel=NULL) |
sets a selector of elements for assembling | |
void | set_single_index_assembling (const size_t index) |
bool | single_index_assembling_enabled () const |
checks whether the assemble DoFindex is set or not | |
virtual | ~AssemblingTuner () |
destructor | |
Protected Attributes | |
bool | m_bClearOnResize |
disables clearing of vector/matrix on resize | |
bool | m_bForceRegGrid |
forces the assembling to regard the grid as regular | |
bool | m_bMatrixIsConst |
disables matrix assembling if set to false | |
bool | m_bMatrixStructureIsConst |
keeps matrix structure from last call if set to true | |
bool | m_bModifySolutionImplemented |
bool | m_bSingleAssIndex |
object for DoFindex-wise assemble routine | |
int | m_ConstraintTypesEnabled |
enables the constraints | |
LocalToGlobalMapper< TAlgebra > | m_defaultMapper |
default LocalToGlobalMapper | |
int | m_ElemTypesEnabled |
enables the constraints | |
BoolMarker * | m_pBoolMarker |
marker used to skip elements | |
ILocalToGlobalMapper< TAlgebra > * | m_pMapper |
LocalToGlobalMapper. | |
Selector * | m_pSelector |
selector used to set a list of elements for the assembling | |
size_t | m_SingleAssIndex |
The AssemblingTuner class combines tools to adapt the assembling routine.
typedef TAlgebra ug::AssemblingTuner< TAlgebra >::algebra_type |
Algebra type.
typedef algebra_type::matrix_type ug::AssemblingTuner< TAlgebra >::matrix_type |
Type of algebra matrix.
typedef vector_type::value_type ug::AssemblingTuner< TAlgebra >::value_type |
Type of algebra value.
typedef algebra_type::vector_type ug::AssemblingTuner< TAlgebra >::vector_type |
Type of algebra vector.
|
inline |
constructor
|
inlinevirtual |
destructor
|
inline |
|
inline |
LocalToGlobalMapper-function calls.
References ug::AssemblingTuner< TAlgebra >::m_defaultMapper, and ug::AssemblingTuner< TAlgebra >::m_pMapper.
void ug::AssemblingTuner< TAlgebra >::collect_selected_elements | ( | std::vector< TElem * > & | vElem, |
ConstSmartPtr< DoFDistribution > | dd, | ||
int | si | ||
) | const |
gets the element iterator from the Selector
References ug::Selector::begin(), ug::Selector::end(), ug::ISubsetHandler::get_subset_index(), and UG_THROW.
|
inline |
returns if constraint type enabled
References ug::AssemblingTuner< TAlgebra >::m_ConstraintTypesEnabled.
|
inline |
Disable clearing of matrix/vector when resizing. This is useful when an IAssemble object consists of more than one domain disc, e.g., CompositeTimeDisc.
References ug::AssemblingTuner< TAlgebra >::m_bClearOnResize.
|
inline |
sets an index for which the assembling should be carried out
This methods sets a boolean if an DoFindex-wise assemble routine should be used. This proceeding is e.g. useful for a nonlinear Gauss-Seidel or nonlinear Jacobi solver. The specific index is passed.
[in] | ind | DoFIndex |
References ug::AssemblingTuner< TAlgebra >::m_bSingleAssIndex.
|
inline |
returns if elem disc type enabled
References ug::AssemblingTuner< TAlgebra >::m_ElemTypesEnabled.
bool ug::AssemblingTuner< TAlgebra >::element_used | ( | TElem * | elem | ) | const |
returns if element is to be used in assembling
|
inline |
enables constraints
References ug::AssemblingTuner< TAlgebra >::m_ConstraintTypesEnabled.
|
inline |
enables elem discs
References ug::AssemblingTuner< TAlgebra >::m_ElemTypesEnabled.
|
inline |
enables the usage of modify solution
References ug::AssemblingTuner< TAlgebra >::m_bModifySolutionImplemented.
|
inline |
returns flags of enabled constraints
References ug::AssemblingTuner< TAlgebra >::m_ConstraintTypesEnabled.
|
inline |
returns flags of enabled elem discs
References ug::AssemblingTuner< TAlgebra >::m_ElemTypesEnabled.
|
inline |
whether matrix is to be modified by assembling
References ug::AssemblingTuner< TAlgebra >::m_bMatrixIsConst.
|
inline |
References ug::AssemblingTuner< TAlgebra >::m_pMapper.
|
inline |
checks whether the assemble index is set or not
References ug::AssemblingTuner< TAlgebra >::m_bModifySolutionImplemented.
|
inline |
returns if assembling is to considered as regular grid
References ug::AssemblingTuner< TAlgebra >::m_bForceRegGrid.
void ug::AssemblingTuner< TAlgebra >::resize | ( | ConstSmartPtr< DoFDistribution > | dd, |
matrix_type & | mat | ||
) | const |
References UG_COND_THROW.
void ug::AssemblingTuner< TAlgebra >::resize | ( | ConstSmartPtr< DoFDistribution > | dd, |
vector_type & | vec | ||
) | const |
resize functions used in assemble funcs
|
inline |
returns if only selected elements used for assembling
References ug::AssemblingTuner< TAlgebra >::m_pSelector.
void ug::AssemblingTuner< TAlgebra >::set_dirichlet_row | ( | matrix_type & | mat, |
const DoFIndex & | ind | ||
) | const |
only one index will be set to Dirichlet in case of index-wise assembling instead of setting a complete matrix row to Dirichlet
References ug::SetDirichletRow(), and UG_THROW.
void ug::AssemblingTuner< TAlgebra >::set_dirichlet_val | ( | vector_type & | vec, |
const DoFIndex & | ind, | ||
const double | val | ||
) | const |
References ug::BlockRef(), ug::DoFRef(), and UG_THROW.
|
inlinevirtual |
forces the assembling to consider the grid as regular
Reimplemented in ug::CompositeTimeDiscretization< TAlgebra >::CompositeAssTuner.
References ug::AssemblingTuner< TAlgebra >::m_bForceRegGrid.
|
inline |
set local to global mapping
References ug::AssemblingTuner< TAlgebra >::m_pMapper.
|
inline |
sets a marker to exclude elements from assembling
This methods sets a marker. Only elements that are marked will be assembled during assembling process. If no marker is set, this corresponds to a marker where all elements have been marked.
[in] | mark | BoolMarker |
References ug::AssemblingTuner< TAlgebra >::m_pBoolMarker.
|
inline |
specify whether matrix will be modified by assembling disables matrix assembling if set to true
bCh | set true if matrix is not to be changed during assembling |
References ug::AssemblingTuner< TAlgebra >::m_bMatrixIsConst.
|
inline |
|
inline |
sets a selector of elements for assembling
This methods sets an element list. Only elements of this list will be assembled during assembling process. The list especially defines the begin and end of the element-iterator in the element assembling-loop. If no element list is set, this corresponds to an assembling where the loop is carried out over all elements of a subset.
[in] | sel | Selector |
References ug::AssemblingTuner< TAlgebra >::m_pSelector.
|
inline |
|
inline |
checks whether the assemble DoFindex is set or not
References ug::AssemblingTuner< TAlgebra >::m_bSingleAssIndex.
|
protected |
disables clearing of vector/matrix on resize
Referenced by ug::AssemblingTuner< TAlgebra >::disable_clear_on_resize().
|
protected |
forces the assembling to regard the grid as regular
Referenced by ug::AssemblingTuner< TAlgebra >::regular_grid_forced(), and ug::AssemblingTuner< TAlgebra >::set_force_regular_grid().
|
protected |
disables matrix assembling if set to false
Referenced by ug::AssemblingTuner< TAlgebra >::matrix_is_const(), and ug::AssemblingTuner< TAlgebra >::set_matrix_is_const().
|
protected |
keeps matrix structure from last call if set to true
Referenced by ug::AssemblingTuner< TAlgebra >::set_matrix_structure_is_const().
|
protected |
calls the 'modify_solution()' method of constraints; gives the modified solution to the assembling methods
Referenced by ug::AssemblingTuner< TAlgebra >::enable_modify_solution(), and ug::AssemblingTuner< TAlgebra >::modify_solution_enabled().
|
protected |
object for DoFindex-wise assemble routine
Referenced by ug::AssemblingTuner< TAlgebra >::disable_single_index_assembling(), ug::AssemblingTuner< TAlgebra >::set_single_index_assembling(), and ug::AssemblingTuner< TAlgebra >::single_index_assembling_enabled().
|
protected |
enables the constraints
Referenced by ug::AssemblingTuner< TAlgebra >::constraint_type_enabled(), ug::AssemblingTuner< TAlgebra >::enable_constraints(), and ug::AssemblingTuner< TAlgebra >::enabled_constraints().
|
protected |
|
protected |
enables the constraints
Referenced by ug::AssemblingTuner< TAlgebra >::elem_disc_type_enabled(), ug::AssemblingTuner< TAlgebra >::enable_elem_discs(), and ug::AssemblingTuner< TAlgebra >::enabled_elem_discs().
|
protected |
marker used to skip elements
Referenced by ug::AssemblingTuner< TAlgebra >::set_marker().
|
protected |
|
protected |
selector used to set a list of elements for the assembling
Referenced by ug::AssemblingTuner< TAlgebra >::selected_elements_used(), and ug::AssemblingTuner< TAlgebra >::set_selector().
|
protected |