ug4
|
geometric multi grid preconditioner More...
#include <mg_solver.h>
Classes | |
struct | LevData |
struct | LevelIndex |
struct | SurfLevelMap |
Public Types | |
typedef TAlgebra | algebra_type |
Algebra type. More... | |
typedef TDomain | domain_type |
Domain. More... | |
typedef GridFunction< TDomain, TAlgebra > | GF |
Grid Function type. More... | |
typedef algebra_type::matrix_type | matrix_type |
Matrix type. More... | |
typedef MGStats< TDomain, TAlgebra > | mg_stats_type |
MGStats type. More... | |
typedef algebra_type::vector_type | vector_type |
Vector type. More... | |
Public Types inherited from ug::ILinearIterator< TAlgebra::vector_type > | |
typedef TAlgebra::vector_type | codomain_function_type |
Range space. More... | |
typedef TAlgebra::vector_type | domain_function_type |
Domain space. More... | |
Public Member Functions | |
void | add_prolongation_post_process (SmartPtr< ITransferPostProcess< TDomain, TAlgebra > > PP) |
add prolongation post process More... | |
void | add_restriction_post_process (SmartPtr< ITransferPostProcess< TDomain, TAlgebra > > PP) |
add restriction post process More... | |
AssembledMultiGridCycle () | |
constructor without arguments More... | |
AssembledMultiGridCycle (SmartPtr< ApproximationSpace< TDomain > > approxSpace) | |
constructor setting approximation space More... | |
void | clear_transfer_post_process () |
clears all transfer post process More... | |
virtual std::string | config_string () const |
returns information about configuration parameters More... | |
virtual bool | init (SmartPtr< ILinearOperator< vector_type > > J, const vector_type &u) |
Prepare for Operator J(u) and linearization point u (current solution) More... | |
virtual bool | init (SmartPtr< ILinearOperator< vector_type > > L) |
Prepare for Linear Operator L. More... | |
virtual const char * | name () const |
name More... | |
void | set_approximation_space (SmartPtr< ApproximationSpace< TDomain > > approxSpace) |
sets the approximation space More... | |
void | set_base_level (int baseLevel) |
sets the level where exact solving is performed in the mg cycle More... | |
void | set_base_solver (SmartPtr< ILinearOperatorInverse< vector_type > > baseSolver) |
sets the base solver that is used More... | |
void | set_comm_comp_overlap (bool bOverlap) |
sets if communication and computation should be overlaped More... | |
void | set_cycle_type (const std::string &type) |
sets the cycle type (1 = V-cycle, 2 = W-cycle, ...) More... | |
void | set_cycle_type (int type) |
sets the cycle type (1 = V-cycle, 2 = W-cycle, ...) More... | |
void | set_debug (SmartPtr< GridFunctionDebugWriter< TDomain, TAlgebra > > spDebugWriter) |
set debug output More... | |
void | set_discretization (SmartPtr< IAssemble< TAlgebra > > spAss) |
sets the assembling procedure that is used to compute coarse grid matrices More... | |
void | set_emulate_full_refined_grid (bool bEmulate) |
sets if copies should be used to emulate a full-refined grid More... | |
void | set_gathered_base_solver_if_ambiguous (bool bGathered) |
sets if the base solver is applied in parallel More... | |
void | set_mg_stats (SmartPtr< mg_stats_type > mgstats) |
sets MGStats, an object which records statistics for individual iterations More... | |
void | set_num_postsmooth (int num) |
sets the number of post-smoothing steps to be performed More... | |
void | set_num_presmooth (int num) |
sets the number of pre-smoothing steps to be performed More... | |
void | set_postsmoother (SmartPtr< ILinearIterator< vector_type > > smoother) |
sets the post-smoother that is used More... | |
void | set_presmoother (SmartPtr< ILinearIterator< vector_type > > smoother) |
sets the pre-smoother that is used More... | |
void | set_projection (SmartPtr< ITransferOperator< TDomain, TAlgebra > > P) |
sets the projection operator More... | |
void | set_prolongation (SmartPtr< ITransferOperator< TDomain, TAlgebra > > P) |
sets the prolongation operator More... | |
void | set_rap (bool bRAP) |
sets if RAP - Product used to build coarse grid matrices More... | |
void | set_restriction (SmartPtr< ITransferOperator< TDomain, TAlgebra > > P) |
sets the restriction operator More... | |
void | set_smooth_on_surface_rim (bool bSmooth) |
sets if smoothing is performed on surface rim More... | |
void | set_smoother (SmartPtr< ILinearIterator< vector_type > > smoother) |
sets the smoother that is used More... | |
void | set_surface_level (int topLevel) |
sets the surface level (default is top-surface) More... | |
void | set_transfer (SmartPtr< ITransferOperator< TDomain, TAlgebra > > P) |
sets the transfer operator More... | |
virtual bool | supports_parallel () const |
returns if parallel solving is supported More... | |
Public Member Functions inherited from ug::ILinearIterator< TAlgebra::vector_type > | |
virtual bool | apply (TAlgebra::vector_type &c, const TAlgebra::vector_type &d)=0 |
compute new correction c = B*d More... | |
virtual bool | apply_update_defect (TAlgebra::vector_type &c, TAlgebra::vector_type &d)=0 |
compute new correction c = B*d and update defect d := d - A*c More... | |
SmartPtr< IDamping< TAlgebra::vector_type, TAlgebra::vector_type > > | damping () |
returns the scaling More... | |
ILinearIterator () | |
constructor More... | |
ILinearIterator (const ILinearIterator< TAlgebra::vector_type, TAlgebra::vector_type > &parent) | |
copy constructor More... | |
virtual bool | init (SmartPtr< ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type > > J, const TAlgebra::vector_type &u)=0 |
initialize for operator J(u) and linearization point u More... | |
virtual bool | init (SmartPtr< ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type > > L)=0 |
initialize for linear operator L More... | |
void | set_damp (number factor) |
sets the damping to a constant factor More... | |
void | set_damp (SmartPtr< IDamping< TAlgebra::vector_type, TAlgebra::vector_type > > spScaling) |
sets a scaling for the correction More... | |
virtual | ~ILinearIterator () |
virtual destructor More... | |
Protected Member Functions | |
void | copy_ghost_to_noghost (SmartPtr< GF > spVecTo, ConstSmartPtr< GF > spVecFrom, const std::vector< size_t > &vMapPatchToGlobal) |
copies vector to smoothing patch using cached mapping More... | |
void | copy_noghost_to_ghost (SmartPtr< GF > spVecTo, ConstSmartPtr< GF > spVecFrom, const std::vector< size_t > &vMapPatchToGlobal) |
copies vector from smoothing patch using cached mapping More... | |
void | copy_noghost_to_ghost (SmartPtr< matrix_type > spMatTo, ConstSmartPtr< matrix_type > spMatFrom, const std::vector< size_t > &vMapPatchToGlobal) |
copies matrix from smoothing patch using cached mapping More... | |
void | enter_debug_writer_section (GridLevel &orig_gl, const char *sec_name, int lev, int cycleNo=-1, int callNo=-1) |
enters a new debugger section for smoothers, base solver etc More... | |
bool | gathered_base_master () const |
returns if gathered base master More... | |
void | leave_debug_writer_section (GridLevel &orig_gl) |
leaves the current debugger section More... | |
void | log_debug_data (int lvl, int cycleNo, std::string name) |
logs a level-data-struct to the terminal More... | |
void | mg_stats_defect (GF &gf, int lvl, typename mg_stats_type::Stage stage) |
Calls MGStats::set_defect (if available) with the given parameters. More... | |
void | write_debug (const GF &rGF, std::string name, int cycleNo=-1) |
void | write_debug (ConstSmartPtr< GF > spGF, std::string name, int cycleNo=-1) |
writes debug output for a level vector only on smooth path More... | |
template<typename TElem > | |
void | init_noghost_to_ghost_mapping (std::vector< size_t > &vNoGhostToGhostMap, ConstSmartPtr< DoFDistribution > spNoGhostDD, ConstSmartPtr< DoFDistribution > spGhostDD) |
void | init_noghost_to_ghost_mapping (int lev) |
void | write_debug (const matrix_type &mat, std::string name, const GridLevel &glTo, const GridLevel &glFrom) |
writes debug output for a level matrix only on smooth path More... | |
void | write_debug (const matrix_type &mat, std::string name, const GF &rTo, const GF &rFrom) |
writes debug output for a level matrix only on smooth path More... | |
Protected Attributes | |
bool | m_bGatheredBaseIfAmbiguous |
flag, if to solve base problem in parallel when gathered and (!) parallel possible More... | |
bool | m_bGatheredBaseUsed |
flag if using parallel base solver More... | |
bool | m_bMatrixStructureIsConst |
flag indicating whether the matrix structure is supposed to stay the same in the next init phase More... | |
pcl::InterfaceCommunicator< IndexLayout > | m_Com |
communicator More... | |
int | m_dbgIterCnt |
counter for debug, to distinguish the iterations More... | |
bool | m_ignoreInitForBaseSolver |
flag indicating whether the base-solver shall be initialized during a call to init() More... | |
SmartPtr< mg_stats_type > | m_mgstats |
MGStats are used for debugging to record statistics on individual iterations. More... | |
GF * | m_pC |
current surface correction More... | |
SmartPtr< GridFunctionDebugWriter< TDomain, TAlgebra > > | m_spDebugWriter |
Debug Writer. More... | |
std::vector< SmartPtr< LevData > > | m_vLevData |
storage for all level More... | |
SmartPtr< GF > | spGatheredBaseCorr |
vector for gathered base solver More... | |
SmartPtr< MatrixOperator< matrix_type, vector_type > > | spGatheredBaseMat |
Matrix for gathered base solver. More... | |
Protected Attributes inherited from ug::ILinearIterator< TAlgebra::vector_type > | |
SmartPtr< IDamping< TAlgebra::vector_type, TAlgebra::vector_type > > | m_spDamping |
the scaling More... | |
ConstSmartPtr< matrix_type > | m_spSurfaceMat |
operator to invert (surface grid) More... | |
const vector_type * | m_pSurfaceSol |
Solution on surface grid. More... | |
SmartPtr< IAssemble< TAlgebra > > | m_spAss |
assembling routine for coarse grid matrices More... | |
SmartPtr< ApproximationSpace< TDomain > > | m_spApproxSpace |
approximation space for level and surface grid More... | |
int | m_topLev |
int | m_surfaceLev |
operator to invert (surface grid) More... | |
int | m_baseLev |
base level (where exact inverse is computed) More... | |
int | m_cycleType |
cylce type (1 = V-cycle, 2 = W-cylcle, ...) More... | |
int | m_numPreSmooth |
number of Presmooth steps More... | |
int | m_numPostSmooth |
number of Postsmooth steps More... | |
int | m_LocalFullRefLevel |
lowest level containing surface geom obj (proc-locally) More... | |
GridLevel::ViewType | m_GridLevelType |
grid-view for level vectors More... | |
bool | m_bUseRAP |
using RAP-Product (assemble coarse-grid matrices otherwise) More... | |
bool | m_bSmoothOnSurfaceRim |
flag if smoothing on surface rim More... | |
bool | m_bCommCompOverlap |
flag if overlapping communication and computation More... | |
RevisionCounter | m_ApproxSpaceRevision |
approximation space revision of cached values More... | |
SmartPtr< ILinearIterator< vector_type > > | m_spPreSmootherPrototype |
prototype for pre-smoother More... | |
SmartPtr< ILinearIterator< vector_type > > | m_spPostSmootherPrototype |
prototype for post-smoother More... | |
SmartPtr< ITransferOperator< TDomain, TAlgebra > > | m_spProjectionPrototype |
prototype for projection operator More... | |
SmartPtr< ITransferOperator< TDomain, TAlgebra > > | m_spProlongationPrototype |
prototype for prolongation operator More... | |
SmartPtr< ITransferOperator< TDomain, TAlgebra > > | m_spRestrictionPrototype |
prototype for restriction operator More... | |
std::vector< SmartPtr< ITransferPostProcess< TDomain, TAlgebra > > > | m_vspProlongationPostProcess |
prototpe for transfer post process More... | |
std::vector< SmartPtr< ITransferPostProcess< TDomain, TAlgebra > > > | m_vspRestrictionPostProcess |
operator to invert (surface grid) More... | |
SmartPtr< ILinearOperatorInverse< vector_type > > | m_spBaseSolver |
base solver for the coarse problem More... | |
std::vector< LevelIndex > | m_vSurfToLevelMap |
operator to invert (surface grid) More... | |
static const int | _V_ = 1 |
operator to invert (surface grid) More... | |
static const int | _W_ = 2 |
operator to invert (surface grid) More... | |
static const int | _F_ = -1 |
operator to invert (surface grid) More... | |
virtual void | ignore_init_for_base_solver (bool ignore) |
does not call init on base-solver during initialization More... | |
virtual bool | ignore_init_for_base_solver () const |
operator to invert (surface grid) More... | |
void | set_matrix_structure_is_const (bool b) |
void | force_reinit () |
reinit transfer operators More... | |
virtual bool | apply (vector_type &c, const vector_type &d) |
Compute new correction c = B*d. More... | |
virtual bool | apply_update_defect (vector_type &c, vector_type &d) |
Compute new correction c = B*d and return new defect d := d - A*c. More... | |
SmartPtr< ILinearIterator< vector_type > > | clone () |
Clone. More... | |
~AssembledMultiGridCycle () | |
Destructor. More... | |
void | lmgc (int lev, int cycleType) |
compute correction on level and update defect More... | |
void | presmooth_and_restriction (int lev) |
performs presmoothing on the given level More... | |
void | prolongation_and_postsmooth (int lev) |
performs prolongation to the level above More... | |
void | base_solve (int lev) |
compute base solver More... | |
void | init_level_memory (int baseLev, int topLev) |
allocates the memory More... | |
void | init () |
initializes common part More... | |
void | init_smoother () |
initializes the smoother and base solver More... | |
void | assemble_level_operator () |
initializes the coarse grid matrices More... | |
void | init_rap_operator () |
operator to invert (surface grid) More... | |
void | init_base_solver () |
initializes the smoother and base solver More... | |
void | init_transfer () |
initializes the transfers More... | |
void | init_projection () |
initializes the prolongation More... | |
void | assemble_rim_cpl (const vector_type *u) |
void | init_rap_rim_cpl () |
operator to invert (surface grid) More... | |
template<typename TElem > | |
void | init_index_mappings () |
operator to invert (surface grid) More... | |
void | init_index_mappings () |
operator to invert (surface grid) More... | |
geometric multi grid preconditioner
This class implements one step of the geometric multi grid as a preconditioner for linear iteration schemes such as linear iteration, cg or bicgstab.
The coarse grid spaces are build up according to the Approximation Space that is set from outside. In addition an Assembling routine must be specified that is used to assemble the coarse grid matrices.
TApproximationSpace | Type of Approximation Space |
TAlgebra | Type of Algebra |
typedef TAlgebra ug::AssembledMultiGridCycle< TDomain, TAlgebra >::algebra_type |
Algebra type.
typedef TDomain ug::AssembledMultiGridCycle< TDomain, TAlgebra >::domain_type |
typedef GridFunction<TDomain, TAlgebra> ug::AssembledMultiGridCycle< TDomain, TAlgebra >::GF |
Grid Function type.
typedef algebra_type::matrix_type ug::AssembledMultiGridCycle< TDomain, TAlgebra >::matrix_type |
Matrix type.
typedef MGStats<TDomain, TAlgebra> ug::AssembledMultiGridCycle< TDomain, TAlgebra >::mg_stats_type |
MGStats type.
typedef algebra_type::vector_type ug::AssembledMultiGridCycle< TDomain, TAlgebra >::vector_type |
Vector type.
ug::AssembledMultiGridCycle< TDomain, TAlgebra >::AssembledMultiGridCycle |
constructor without arguments
References new().
ug::AssembledMultiGridCycle< TDomain, TAlgebra >::AssembledMultiGridCycle | ( | SmartPtr< ApproximationSpace< TDomain > > | approxSpace | ) |
constructor setting approximation space
References new().
ug::AssembledMultiGridCycle< TDomain, TAlgebra >::~AssembledMultiGridCycle |
Destructor.
|
inline |
add prolongation post process
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_vspProlongationPostProcess.
|
inline |
add restriction post process
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_vspRestrictionPostProcess.
|
virtual |
Compute new correction c = B*d.
References GMG_PROFILE_BEGIN, GMG_PROFILE_END, GMG_PROFILE_FUNC, kappa, ug::LIB_DISC_MULTIGRID, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::n_base_calls, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::n_post_calls, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::n_pre_calls, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::n_prolong_calls, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::n_restr_calls, ug::PST_CONSISTENT, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::sc, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::sd, UG_CATCH_THROW, UG_DLOG, and UG_THROW.
|
virtual |
Compute new correction c = B*d and return new defect d := d - A*c.
References GMG_PROFILE_FUNC, and UG_THROW.
|
protected |
initializes the coarse grid matrices
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::A, GMG_PROFILE_BEGIN, GMG_PROFILE_END, GMG_PROFILE_FUNC, ug::GridLevel::LEVEL, ug::LIB_DISC_MULTIGRID, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::Projection, ug::PST_CONSISTENT, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::st, ug::GridLevel::SURFACE, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::t, UG_ASSERT, UG_CATCH_THROW, UG_DLOG, UG_THROW, and ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::vMapPatchToGlobal.
|
protected |
assembles the missing matrix part on the coarse level, that must be added if the correction has been computed to ensure a correctly updated defect. (i.e. assembles A^c, with d^f -= A^c * c^c)
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::A, GMG_PROFILE_FUNC, ug::LIB_DISC_MULTIGRID, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::RimCpl_Coarse_Fine, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::RimCpl_Fine_Coarse, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::sc, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::sd, ug::SetRow(), ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::st, UG_DLOG, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::vShadowing, and ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::vSurfShadowing.
|
protected |
compute base solver
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::A, SmartPtr< T, FreePolicy >::get(), GMG_PROFILE_BEGIN, GMG_PROFILE_END, GMG_PROFILE_FUNC, ug::LIB_DISC_MULTIGRID, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::n_base_calls, ug::PST_CONSISTENT, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::sc, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::sd, ug::SetLayoutValues(), ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::t, UG_CATCH_THROW, UG_DLOG, UG_THROW, and ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::vMapPatchToGlobal.
|
inline |
clears all transfer post process
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_vspProlongationPostProcess, and ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_vspRestrictionPostProcess.
|
virtual |
Clone.
Implements ug::ILinearIterator< TAlgebra::vector_type >.
|
virtual |
returns information about configuration parameters
Reimplemented from ug::ILinearIterator< TAlgebra::vector_type >.
References ug::ConfigShift().
|
protected |
copies vector to smoothing patch using cached mapping
References GMG_PROFILE_FUNC, UG_ASSERT, and UG_THROW.
|
protected |
copies vector from smoothing patch using cached mapping
References GMG_PROFILE_FUNC, UG_ASSERT, and UG_THROW.
|
protected |
copies matrix from smoothing patch using cached mapping
References ug::ParallelMatrix< TMatrix >::get_storage_mask(), GMG_PROFILE_FUNC, ug::ParallelMatrix< TMatrix >::set_storage_type(), and UG_ASSERT.
|
inlineprotected |
enters a new debugger section for smoothers, base solver etc
References PROFILE_FUNC_GROUP.
void ug::AssembledMultiGridCycle< TDomain, TAlgebra >::force_reinit |
reinit transfer operators
|
protected |
returns if gathered base master
References UG_THROW.
|
virtual |
operator to invert (surface grid)
|
virtual |
does not call init on base-solver during initialization
Use this method with care. It can be useful e.g. during repeated adaption of a linear problem, where the base-level does not change.
References pcl::NumProcs(), and UG_COND_THROW.
|
protected |
initializes common part
References ug::GridFunction< TDomain, TAlgebra >::dof_distribution(), GMG_PROFILE_BEGIN, GMG_PROFILE_END, GMG_PROFILE_FUNC, ug::LIB_DISC_MULTIGRID, ug::GridLevel::TOP, UG_CATCH_THROW, UG_DLOG, and UG_THROW.
|
virtual |
Prepare for Operator J(u) and linearization point u (current solution)
References GMG_PROFILE_FUNC, init(), ug::LIB_DISC_MULTIGRID, UG_DLOG, and SmartPtr< T, FreePolicy >::valid().
|
virtual |
Prepare for Linear Operator L.
References GMG_PROFILE_FUNC, init(), ug::LIB_DISC_MULTIGRID, UG_DLOG, and SmartPtr< T, FreePolicy >::valid().
|
protected |
initializes the smoother and base solver
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::A, GMG_PROFILE_FUNC, ug::LIB_DISC_MULTIGRID, pcl::PCD_LOCAL, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::st, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::t, UG_DLOG, and UG_THROW.
|
protected |
operator to invert (surface grid)
References ug::SurfaceView::ALL, ug::PeriodicBoundaryManager::is_slave(), ug::GridLevel::LEVEL, ug::SurfaceView::MG_SHADOW_RIM_COPY, ug::SurfaceView::MG_SURFACE_RIM, ug::GridLevel::SURFACE, UG_ASSERT, and UG_THROW.
|
protected |
operator to invert (surface grid)
References ug::EDGE, ug::FACE, GMG_PROFILE_FUNC, ug::GridLevel::SURFACE, UG_THROW, ug::VERTEX, and ug::VOLUME.
|
protected |
allocates the memory
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::A, GMG_PROFILE_FUNC, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::PostSmoother, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::PreSmoother, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::Projection, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::Prolongation, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::Restriction, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::sc, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::sd, ug::ILevelPreconditioner< TAlgebra >::set_grid_level(), SPNULL, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::st, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::t, and UG_THROW.
|
protected |
init mapping from noghost -> w/ ghost
References ug::EDGE, ug::FACE, GMG_PROFILE_FUNC, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::st, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::t, ug::VERTEX, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::vMapPatchToGlobal, and ug::VOLUME.
|
protected |
init mapping from noghost -> w/ ghost
References UG_ASSERT.
|
protected |
|
protected |
operator to invert (surface grid)
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::A, ug::AddMultiplyOf(), GMG_PROFILE_BEGIN, GMG_PROFILE_END, GMG_PROFILE_FUNC, ug::ParallelMatrix< TMatrix >::layouts(), ug::LIB_DISC_MULTIGRID, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::Prolongation, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::Restriction, ug::ParallelMatrix< TMatrix >::set_layouts(), SPNULL, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::st, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::t, UG_ASSERT, UG_CATCH_THROW, UG_DLOG, and ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::vMapPatchToGlobal.
|
protected |
operator to invert (surface grid)
References GMG_PROFILE_FUNC, ug::LIB_DISC_MULTIGRID, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::RimCpl_Coarse_Fine, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::RimCpl_Fine_Coarse, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::sc, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::sd, UG_DLOG, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::vShadowing, and ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::vSurfShadowing.
|
protected |
initializes the smoother and base solver
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::A, GMG_PROFILE_FUNC, ug::LIB_DISC_MULTIGRID, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::PostSmoother, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::PreSmoother, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::sc, UG_CATCH_THROW, UG_DLOG, and UG_THROW.
|
protected |
initializes the transfers
References GMG_PROFILE_FUNC, ug::LIB_DISC_MULTIGRID, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::Prolongation, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::Restriction, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::st, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::t, and UG_DLOG.
|
inlineprotected |
leaves the current debugger section
|
protected |
compute correction on level and update defect
References GMG_PROFILE_FUNC, ug::LIB_DISC_MULTIGRID, UG_CATCH_THROW, UG_DLOG, and UG_THROW.
|
protected |
logs a level-data-struct to the terminal
References name, ug::PST_ADDITIVE, ug::PST_CONSISTENT, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::sc, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::sd, ug::ToString(), UG_LOG, and ug::VecProd().
|
protected |
Calls MGStats::set_defect (if available) with the given parameters.
|
inlinevirtual |
name
Implements ug::ILinearIterator< TAlgebra::vector_type >.
|
protected |
performs presmoothing on the given level
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::A, GMG_PROFILE_BEGIN, GMG_PROFILE_END, GMG_PROFILE_FUNC, ug::LIB_DISC_MULTIGRID, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::n_pre_calls, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::n_restr_calls, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::PreSmoother, ug::PST_ADDITIVE, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::Restriction, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::RimCpl_Coarse_Fine, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::sc, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::sd, ug::SetLayoutValues(), ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::st, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::t, UG_CATCH_THROW, UG_DLOG, UG_THROW, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::vMapPatchToGlobal, and ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::vShadowing.
|
protected |
performs prolongation to the level above
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::A, GMG_PROFILE_BEGIN, GMG_PROFILE_END, GMG_PROFILE_FUNC, ug::LIB_DISC_MULTIGRID, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::n_post_calls, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::n_prolong_calls, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::PostSmoother, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::Prolongation, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::RimCpl_Coarse_Fine, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::RimCpl_Fine_Coarse, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::sc, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::sd, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::st, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::t, UG_CATCH_THROW, UG_DLOG, UG_THROW, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::vMapPatchToGlobal, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::vShadowing, and ug::AssembledMultiGridCycle< TDomain, TAlgebra >::LevData::vSurfLevelMap.
void ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_approximation_space | ( | SmartPtr< ApproximationSpace< TDomain > > | approxSpace | ) |
sets the approximation space
References make_sp().
|
inline |
sets the level where exact solving is performed in the mg cycle
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_baseLev.
|
inline |
sets the base solver that is used
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_spBaseSolver.
|
inline |
sets if communication and computation should be overlaped
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_bCommCompOverlap.
|
inline |
sets the cycle type (1 = V-cycle, 2 = W-cycle, ...)
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::_F_, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::_V_, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::_W_, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_cycleType, ug::TrimString(), and UG_THROW.
|
inline |
sets the cycle type (1 = V-cycle, 2 = W-cycle, ...)
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_cycleType.
|
inline |
set debug output
If a DebugWriter is passed by this method, the multi grid cycle writes the level/surface vectors and matrices for debug purposes.
[in] | debugWriter | Debug Writer to use |
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_spDebugWriter.
|
inline |
sets the assembling procedure that is used to compute coarse grid matrices
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_spAss.
|
inline |
sets if copies should be used to emulate a full-refined grid
References ug::GridLevel::LEVEL, ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_GridLevelType, and ug::GridLevel::SURFACE.
|
inline |
sets if the base solver is applied in parallel
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_bGatheredBaseIfAmbiguous.
|
inline |
\ If the nonzero entry pattern of the matrix does not change (which is usually the case in time-dependent problems without space adaptation), then keeping the entry structure between re-inits saves time during level matrix assembling.
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_bMatrixStructureIsConst.
|
inline |
sets MGStats, an object which records statistics for individual iterations
Setting MGStats is optional. If set, a runtime overhead is incurred. Only useful for debugging.
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_mgstats.
|
inline |
sets the number of post-smoothing steps to be performed
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_numPostSmooth.
|
inline |
sets the number of pre-smoothing steps to be performed
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_numPreSmooth.
|
inline |
sets the post-smoother that is used
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_spPostSmootherPrototype.
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_smoother().
|
inline |
sets the pre-smoother that is used
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_spPreSmootherPrototype.
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_smoother().
|
inline |
sets the projection operator
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_spProjectionPrototype.
|
inline |
sets the prolongation operator
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_spProlongationPrototype.
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_transfer().
|
inline |
sets if RAP - Product used to build coarse grid matrices
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_bUseRAP.
|
inline |
sets the restriction operator
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_spRestrictionPrototype.
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_transfer().
|
inline |
sets if smoothing is performed on surface rim
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_bSmoothOnSurfaceRim.
|
inline |
sets the smoother that is used
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_postsmoother(), and ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_presmoother().
|
inline |
sets the surface level (default is top-surface)
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_surfaceLev.
|
inline |
sets the transfer operator
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_prolongation(), and ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_restriction().
|
inlinevirtual |
returns if parallel solving is supported
Implements ug::ILinearIterator< TAlgebra::vector_type >.
References ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_spPostSmootherPrototype, and ug::AssembledMultiGridCycle< TDomain, TAlgebra >::m_spPreSmootherPrototype.
|
protected |
|
protected |
writes debug output for a level matrix only on smooth path
This method writes the level matrix to a debug file, if a debug writer has been set.
[in] | mat | Level Matrix to write for debug purpose |
[in] | name | Filename |
References ug::GridFunction< TDomain, TAlgebra >::grid_level(), and name.
|
protected |
writes debug output for a level matrix only on smooth path
This method writes the level matrix to a debug file, if a debug writer has been set.
[in] | mat | Level Matrix to write for debug purpose |
[in] | name | Filename |
References ug::GridLevelAppendix(), name, and PROFILE_FUNC_GROUP.
|
inlineprotected |
|
staticprotected |
operator to invert (surface grid)
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_cycle_type().
|
staticprotected |
operator to invert (surface grid)
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_cycle_type().
|
staticprotected |
operator to invert (surface grid)
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_cycle_type().
|
protected |
approximation space revision of cached values
|
protected |
base level (where exact inverse is computed)
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_base_level().
|
protected |
flag if overlapping communication and computation
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_comm_comp_overlap().
|
protected |
flag, if to solve base problem in parallel when gathered and (!) parallel possible
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_gathered_base_solver_if_ambiguous().
|
protected |
flag if using parallel base solver
|
protected |
flag indicating whether the matrix structure is supposed to stay the same in the next init phase
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_matrix_structure_is_const().
|
protected |
flag if smoothing on surface rim
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_smooth_on_surface_rim().
|
protected |
using RAP-Product (assemble coarse-grid matrices otherwise)
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_rap().
|
protected |
communicator
|
protected |
cylce type (1 = V-cycle, 2 = W-cylcle, ...)
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_cycle_type().
|
protected |
counter for debug, to distinguish the iterations
|
protected |
grid-view for level vectors
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_emulate_full_refined_grid().
|
protected |
flag indicating whether the base-solver shall be initialized during a call to init()
|
protected |
lowest level containing surface geom obj (proc-locally)
|
protected |
MGStats are used for debugging to record statistics on individual iterations.
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_mg_stats().
|
protected |
number of Postsmooth steps
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_num_postsmooth().
|
protected |
number of Presmooth steps
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_num_presmooth().
|
protected |
current surface correction
|
protected |
Solution on surface grid.
|
protected |
approximation space for level and surface grid
|
protected |
assembling routine for coarse grid matrices
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_discretization().
|
protected |
base solver for the coarse problem
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_base_solver().
|
protected |
Debug Writer.
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_debug().
|
protected |
prototype for post-smoother
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_postsmoother(), and ug::AssembledMultiGridCycle< TDomain, TAlgebra >::supports_parallel().
|
protected |
prototype for pre-smoother
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_presmoother(), and ug::AssembledMultiGridCycle< TDomain, TAlgebra >::supports_parallel().
|
protected |
prototype for projection operator
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_projection().
|
protected |
prototype for prolongation operator
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_prolongation().
|
protected |
prototype for restriction operator
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_restriction().
|
protected |
operator to invert (surface grid)
|
protected |
operator to invert (surface grid)
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::set_surface_level().
|
protected |
top level (i.e. highest level in hierarchy. This is the surface level in case of non-adaptive refinement)
|
protected |
storage for all level
|
protected |
prototpe for transfer post process
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::add_prolongation_post_process(), and ug::AssembledMultiGridCycle< TDomain, TAlgebra >::clear_transfer_post_process().
|
protected |
operator to invert (surface grid)
Referenced by ug::AssembledMultiGridCycle< TDomain, TAlgebra >::add_restriction_post_process(), and ug::AssembledMultiGridCycle< TDomain, TAlgebra >::clear_transfer_post_process().
|
protected |
operator to invert (surface grid)
|
protected |
vector for gathered base solver
|
protected |
Matrix for gathered base solver.