![]() |
v0.14.0 |
implementation of multi-grid solver for p- adaptivity More...
#include <MoFEM.hpp>
#include <UnknownInterface.hpp>
#include <PCMGSetUpViaApproxOrders.hpp>
#include <petsc-private/petscimpl.h>
#include <petsc-private/dmimpl.h>
#include <petsc-private/vecimpl.h>
Go to the source code of this file.
Classes | |
struct | PCMGSubMatrixCtx_private |
Macros | |
#define | PETSC_VERSION_RELEASE 1 |
#define | GET_DM_FIELD(DM) |
Functions | |
template<InsertMode MODE> | |
MoFEMErrorCode | sub_mat_mult_generic (Mat a, Vec x, Vec f) |
MoFEMErrorCode | sub_mat_mult (Mat a, Vec x, Vec f) |
MoFEMErrorCode | sub_mat_mult_add (Mat a, Vec x, Vec f) |
MoFEMErrorCode | sub_mat_sor (Mat mat, Vec b, PetscReal omega, MatSORType flag, PetscReal shift, PetscInt its, PetscInt lits, Vec x) |
MoFEMErrorCode | DMMGViaApproxOrdersGetCtx (DM dm, DMMGViaApproxOrdersCtx **ctx) |
MoFEMErrorCode | DMMGViaApproxOrdersSetAO (DM dm, AO ao) |
Set DM ordering. More... | |
MoFEMErrorCode | DMMGViaApproxOrdersGetCoarseningISSize (DM dm, int *size) |
Gets size of coarseningIS in internal data struture DMMGViaApproxOrdersCtx. More... | |
MoFEMErrorCode | DMMGViaApproxOrdersPushBackCoarseningIS (DM dm, IS is, Mat A, Mat *subA, bool create_sub_matrix, bool shell_sub_a) |
Push back coarsening level to MG via approximation orders. More... | |
MoFEMErrorCode | DMMGViaApproxOrdersPopBackCoarseningIS (DM dm) |
Pop is form MG via approximation orders. More... | |
MoFEMErrorCode | DMMGViaApproxOrdersClearCoarseningIS (DM dm) |
Clear approximation orders. More... | |
MoFEMErrorCode | DMMGViaApproxOrdersReplaceCoarseningIS (DM dm, IS *is_vec, int nb_elems, Mat A, int verb) |
Replace coarsening IS in DM via approximation orders. More... | |
MoFEMErrorCode | DMMGViaApproxOrdersGetCtx (DM dm, const DMMGViaApproxOrdersCtx **ctx) |
MoFEMErrorCode | DMRegister_MGViaApproxOrders (const char sname[]) |
Register DM for Multi-Grid via approximation orders. More... | |
static MoFEMErrorCode | ksp_set_operators (KSP ksp, Mat A, Mat B, void *ctx) |
MoFEMErrorCode | DMCreate_MGViaApproxOrders (DM dm) |
Create DM data structure for Multi-Grid via approximation orders. More... | |
MoFEMErrorCode | DMCreateMatrix_MGViaApproxOrders (DM dm, Mat *M) |
Create matrix for Multi-Grid via approximation orders. More... | |
MoFEMErrorCode | DMCoarsen_MGViaApproxOrders (DM dm, MPI_Comm comm, DM *dmc) |
Coarsen DM. More... | |
MoFEMErrorCode | DMCreateInterpolation_MGViaApproxOrders (DM dm1, DM dm2, Mat *mat, Vec *vec) |
Create interpolation matrix between data managers dm1 and dm2. More... | |
MoFEMErrorCode | DMCreateGlobalVector_MGViaApproxOrders (DM dm, Vec *g) |
Create global vector for DMGViaApproxOrders. More... | |
MoFEMErrorCode | PCMGSetUpViaApproxOrders (PC pc, PCMGSetUpViaApproxOrdersCtx *ctx, int verb) |
implementation of multi-grid solver for p- adaptivity
Definition in file PCMGSetUpViaApproxOrders.cpp.
#define GET_DM_FIELD | ( | DM | ) |
Definition at line 169 of file PCMGSetUpViaApproxOrders.cpp.
#define PETSC_VERSION_RELEASE 1 |
Definition at line 16 of file PCMGSetUpViaApproxOrders.cpp.
MoFEMErrorCode DMCreate_MGViaApproxOrders | ( | DM | dm | ) |
Create DM data structure for Multi-Grid via approximation orders.
It set data structure and operators needed
dm | Discrete manager |
Definition at line 408 of file PCMGSetUpViaApproxOrders.cpp.
MoFEMErrorCode DMCreateGlobalVector_MGViaApproxOrders | ( | DM | dm, |
Vec * | g | ||
) |
Create global vector for DMGViaApproxOrders.
dm | Distributed mesh data structure |
g | returned pointer to vector |
Definition at line 575 of file PCMGSetUpViaApproxOrders.cpp.
MoFEMErrorCode DMCreateInterpolation_MGViaApproxOrders | ( | DM | dm1, |
DM | dm2, | ||
Mat * | mat, | ||
Vec * | vec | ||
) |
Create interpolation matrix between data managers dm1 and dm2.
dm1 | Distributed mesh data structure |
dm2 | Distributed mesh data structure |
mat | Pointer to returned interpolation matrix |
vec | Pointer to scaling vector here returned NULL |
Definition at line 476 of file PCMGSetUpViaApproxOrders.cpp.
MoFEMErrorCode DMMGViaApproxOrdersGetCoarseningISSize | ( | DM | dm, |
int * | size | ||
) |
Gets size of coarseningIS in internal data struture DMMGViaApproxOrdersCtx.
dm | DM |
size | size of coarseningIS |
Definition at line 197 of file PCMGSetUpViaApproxOrders.cpp.
MoFEMErrorCode DMMGViaApproxOrdersGetCtx | ( | DM | dm, |
const DMMGViaApproxOrdersCtx ** | ctx | ||
) |
Definition at line 366 of file PCMGSetUpViaApproxOrders.cpp.
MoFEMErrorCode DMMGViaApproxOrdersGetCtx | ( | DM | dm, |
DMMGViaApproxOrdersCtx ** | ctx | ||
) |
Definition at line 174 of file PCMGSetUpViaApproxOrders.cpp.
MoFEMErrorCode DMMGViaApproxOrdersReplaceCoarseningIS | ( | DM | dm, |
IS * | is_vec, | ||
int | nb_elems, | ||
Mat | A, | ||
int | verb = 0 |
||
) |
Replace coarsening IS in DM via approximation orders.
dm | dm |
is_vec | Pointer to vector of is |
nb_elems | Number of elements |
A | Fine matrix |
Definition at line 284 of file PCMGSetUpViaApproxOrders.cpp.
MoFEMErrorCode DMMGViaApproxOrdersSetAO | ( | DM | dm, |
AO | ao | ||
) |
Set DM ordering.
IS can be given is some other ordering, AO will transform indices from coarseningIS ordering to ordering used to construct fine matrix.
dm | [description] |
ao | [description] |
AO will transform indices from coarseningIS ordering to ordering used to construct fine matrix.
dm | [description] |
ao | [description] |
Definition at line 182 of file PCMGSetUpViaApproxOrders.cpp.
|
static |
Definition at line 403 of file PCMGSetUpViaApproxOrders.cpp.
MoFEMErrorCode PCMGSetUpViaApproxOrders | ( | PC | pc, |
PCMGSetUpViaApproxOrdersCtx * | ctx, | ||
int | verb | ||
) |
Definition at line 727 of file PCMGSetUpViaApproxOrders.cpp.
MoFEMErrorCode sub_mat_mult | ( | Mat | a, |
Vec | x, | ||
Vec | f | ||
) |
Definition at line 106 of file PCMGSetUpViaApproxOrders.cpp.
MoFEMErrorCode sub_mat_mult_add | ( | Mat | a, |
Vec | x, | ||
Vec | f | ||
) |
Definition at line 110 of file PCMGSetUpViaApproxOrders.cpp.
MoFEMErrorCode sub_mat_mult_generic | ( | Mat | a, |
Vec | x, | ||
Vec | f | ||
) |
Definition at line 88 of file PCMGSetUpViaApproxOrders.cpp.
MoFEMErrorCode sub_mat_sor | ( | Mat | mat, |
Vec | b, | ||
PetscReal | omega, | ||
MatSORType | flag, | ||
PetscReal | shift, | ||
PetscInt | its, | ||
PetscInt | lits, | ||
Vec | x | ||
) |
Definition at line 114 of file PCMGSetUpViaApproxOrders.cpp.