#include <users_modules/tutorials/cor-2to5/src/AuxPoissonFunctions.hpp>
◆ AuxFunctions()
Definition at line 16 of file AuxPoissonFunctions.hpp.
virtual MPI_Comm & get_comm() const =0
virtual int get_comm_rank() const =0
◆ assembleGhostVector()
MoFEMErrorCode PoissonExample::AuxFunctions::assembleGhostVector |
( |
Vec |
ghost_vec | ) |
const |
|
inline |
Assemble error vector.
- Examples
- AuxPoissonFunctions.hpp, analytical_nonlinear_poisson.cpp, analytical_poisson.cpp, and analytical_poisson_field_split.cpp.
Definition at line 43 of file AuxPoissonFunctions.hpp.
43 {
44
46 CHKERR VecAssemblyBegin(ghost_vec);
47 CHKERR VecAssemblyEnd(ghost_vec);
48
49 CHKERR VecGhostUpdateBegin(ghost_vec, ADD_VALUES, SCATTER_REVERSE);
50 CHKERR VecGhostUpdateEnd(ghost_vec, ADD_VALUES, SCATTER_REVERSE);
51
52 CHKERR VecGhostUpdateBegin(ghost_vec, INSERT_VALUES, SCATTER_FORWARD);
53 CHKERR VecGhostUpdateEnd(ghost_vec, INSERT_VALUES, SCATTER_FORWARD);
55 }
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
◆ createGhostVec()
MoFEMErrorCode PoissonExample::AuxFunctions::createGhostVec |
( |
Vec * |
ghost_vec | ) |
const |
|
inline |
Create ghost vector to assemble errors from all element on distributed mesh. Ghost vector has size 1, where one element is owned by processor 0, other processor have one ghost element of zero element at processor 0.
[createGhostVec description]
- Parameters
-
ghost_vec | pointer to created ghost vector |
- Returns
- error code
- Examples
- AuxPoissonFunctions.hpp, analytical_nonlinear_poisson.cpp, analytical_poisson.cpp, and analytical_poisson_field_split.cpp.
Definition at line 30 of file AuxPoissonFunctions.hpp.
30 {
31
33 int ghosts[] = {0};
34 int nb_locals =
rAnk == 0 ? 1 : 0;
35 int nb_ghosts =
rAnk > 0 ? 1 : 0;
36 CHKERR VecCreateGhost(
cOmm, nb_locals, 1, nb_ghosts, ghosts, ghost_vec);
38 }
◆ printError()
MoFEMErrorCode PoissonExample::AuxFunctions::printError |
( |
Vec |
ghost_vec | ) |
|
|
inline |
◆ testError()
MoFEMErrorCode PoissonExample::AuxFunctions::testError |
( |
Vec |
ghost_vec | ) |
|
|
inline |
◆ cOmm
MPI_Comm PoissonExample::AuxFunctions::cOmm |
|
private |
◆ rAnk
const int PoissonExample::AuxFunctions::rAnk |
|
private |
The documentation for this struct was generated from the following file: