![Logo](MoFEMLogo.png) |
| v0.14.0
|
◆ PCMGSetUpViaApproxOrdersCtx()
MoFEM::PCMGSetUpViaApproxOrdersCtx::PCMGSetUpViaApproxOrdersCtx |
( |
DM |
dm, |
|
|
Mat |
a, |
|
|
bool |
shell_sub_a |
|
) |
| |
|
inline |
◆ ~PCMGSetUpViaApproxOrdersCtx()
virtual MoFEM::PCMGSetUpViaApproxOrdersCtx::~PCMGSetUpViaApproxOrdersCtx |
( |
| ) |
|
|
virtualdefault |
◆ buildProlongationOperator()
MoFEMErrorCode MoFEM::PCMGSetUpViaApproxOrdersCtx::buildProlongationOperator |
( |
bool |
use_mat_a, |
|
|
int |
verb = 0 |
|
) |
| |
|
virtual |
Set up data structures for MG.
- Parameters
-
- Returns
- error code
Definition at line 567 of file PCMGSetUpViaApproxOrders.cpp.
573 CHKERR PetscObjectGetComm((PetscObject)
dM, &comm);
575 MOFEM_LOG_C(
"PCMGViaApproximationOrders", Sev::inform,
"set MG levels %u\n",
584 for (
int kk = 0; kk <
nbLevels; kk++) {
588 CHKERR ISGetSize(is_vec[kk], &is_glob_size[kk]);
589 CHKERR ISGetLocalSize(is_vec[kk], &is_loc_size[kk]);
592 "Nb. dofs at level [ %d ] global %u local %d\n", kk,
593 is_glob_size[kk], is_loc_size[kk]);
596 if (is_glob_size[kk] == 0) {
601 for (
int kk = 0; kk !=
nbLevels; kk++) {
602 if (kk ==
nbLevels - 1 && use_mat_a) {
619 for (
unsigned int kk = 0; kk < is_vec.size(); kk++) {
◆ createIsAtLevel()
MoFEMErrorCode MoFEM::PCMGSetUpViaApproxOrdersCtx::createIsAtLevel |
( |
int |
kk, |
|
|
IS * |
is |
|
) |
| |
|
virtual |
Set IS for levels.
- Parameters
-
- Returns
- error code
Definition at line 533 of file PCMGSetUpViaApproxOrders.cpp.
540 const Problem *problem_ptr;
544 int first = problem_ptr->getNumeredRowDofsPtr()
545 ->get<PetscGlobalIdx_mi_tag>()
548 ->getPetscGlobalDofIdx();
549 CHKERR ISCreateStride(PETSC_COMM_WORLD, problem_ptr->getNbLocalDofsRow(),
554 string problem_name = problem_ptr->getName();
556 order_at_next_level, is);
◆ destroyIsAtLevel()
MoFEMErrorCode MoFEM::PCMGSetUpViaApproxOrdersCtx::destroyIsAtLevel |
( |
int |
kk, |
|
|
IS * |
is |
|
) |
| |
|
virtual |
◆ getOptions()
get options from line command
- Returns
- error code
Definition at line 508 of file PCMGSetUpViaApproxOrders.cpp.
510 ierr = PetscOptionsBegin(PETSC_COMM_WORLD,
"",
511 "MOFEM Multi-Grid (Orders) pre-conditioner",
"none");
514 CHKERR PetscOptionsInt(
"-mofem_mg_levels",
"nb levels of multi-grid solver",
516 CHKERR PetscOptionsInt(
"-mofem_mg_coarse_order",
517 "approximation order of coarse level",
"", 2,
519 CHKERR PetscOptionsInt(
"-mofem_mg_order_at_last_level",
"order at last level",
521 CHKERR PetscOptionsInt(
"-mofem_mg_verbose",
"nb levels of multi-grid solver",
523 PetscBool shell_sub_a =
shellSubA ? PETSC_TRUE : PETSC_FALSE;
524 CHKERR PetscOptionsBool(
"-mofem_mg_shell_a",
"use shell matrix as sub matrix",
525 "", shell_sub_a, &shell_sub_a, NULL);
528 ierr = PetscOptionsEnd();
Mat MoFEM::PCMGSetUpViaApproxOrdersCtx::A |
◆ coarseOrder
int MoFEM::PCMGSetUpViaApproxOrdersCtx::coarseOrder |
◆ dM
DM MoFEM::PCMGSetUpViaApproxOrdersCtx::dM |
◆ nbLevels
int MoFEM::PCMGSetUpViaApproxOrdersCtx::nbLevels |
◆ orderAtLastLevel
int MoFEM::PCMGSetUpViaApproxOrdersCtx::orderAtLastLevel |
◆ shellSubA
bool MoFEM::PCMGSetUpViaApproxOrdersCtx::shellSubA |
◆ verboseLevel
int MoFEM::PCMGSetUpViaApproxOrdersCtx::verboseLevel |
The documentation for this struct was generated from the following file:
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
virtual MoFEMErrorCode destroyIsAtLevel(int kk, IS *is)
Destroy IS if internally created.
#define MOFEM_LOG_SEVERITY_SYNC(comm, severity)
Synchronise "SYNC" on curtain severity level.
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
int nbLevels
number of multi-grid levels
DM dM
Distributed mesh manager.
Deprecated interface functions.
#define CHKERR
Inline error check.
Section manager is used to create indexes and sections.
#define MOFEM_LOG_C(channel, severity, format,...)
Mat A
Matrix at fine level.
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
PetscErrorCode DMoFEMGetInterfacePtr(DM dm, MoFEM::Interface **m_field_ptr)
Get pointer to MoFEM::Interface.
int orderAtLastLevel
set maximal evaluated order
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
@ MOFEM_DATA_INCONSISTENCY
PetscErrorCode DMMoFEMGetProblemPtr(DM dm, const MoFEM::Problem **problem_ptr)
Get pointer to problem data structure.
MoFEMErrorCode DMMGViaApproxOrdersPushBackCoarseningIS(DM dm, IS is, Mat A, bool create_sub_matrix, bool shell_sub_a)
Push back coarsening level to MG via approximation orders.
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
MoFEMErrorCode isCreateProblemOrder(const std::string problem_name, RowColData rc, int min_order, int max_order, IS *is) const
create IS for given order range (collective)
int coarseOrder
approximation order of coarse level
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
virtual MoFEMErrorCode createIsAtLevel(int kk, IS *is)
Set IS for levels.
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...