v0.14.0
Public Member Functions | Public Attributes | Friends | List of all members
ConvectiveMassElement::PCShellCtx Struct Reference

#include <users_modules/basic_finite_elements/src/ConvectiveMassElement.hpp>

Collaboration diagram for ConvectiveMassElement::PCShellCtx:
[legend]

Public Member Functions

 PCShellCtx (Mat shell_mat)
 
MoFEMErrorCode iNit ()
 
MoFEMErrorCode dEstroy ()
 

Public Attributes

Mat shellMat
 
bool initPC
 check if PC is initialized More...
 
PC pC
 

Friends

MoFEMErrorCode PCShellSetUpOp (PC pc)
 
MoFEMErrorCode PCShellDestroy (PC pc)
 
MoFEMErrorCode PCShellApplyOp (PC pc, Vec f, Vec x)
 

Detailed Description

Examples
nonlinear_dynamics.cpp.

Definition at line 600 of file ConvectiveMassElement.hpp.

Constructor & Destructor Documentation

◆ PCShellCtx()

ConvectiveMassElement::PCShellCtx::PCShellCtx ( Mat  shell_mat)
inline

Definition at line 605 of file ConvectiveMassElement.hpp.

605 : shellMat(shell_mat), initPC(false) {}

Member Function Documentation

◆ dEstroy()

MoFEMErrorCode ConvectiveMassElement::PCShellCtx::dEstroy ( )

Definition at line 2395 of file ConvectiveMassElement.cpp.

2395  {
2397 
2398  if (initPC) {
2399  CHKERR PCDestroy(&pC);
2400  initPC = false;
2401  }
2403 }

◆ iNit()

MoFEMErrorCode ConvectiveMassElement::PCShellCtx::iNit ( )

Definition at line 2383 of file ConvectiveMassElement.cpp.

2383  {
2385 
2386  if (!initPC) {
2387  MPI_Comm comm;
2388  CHKERR PetscObjectGetComm((PetscObject)shellMat, &comm);
2389  CHKERR PCCreate(comm, &pC);
2390  initPC = true;
2391  }
2393 }

Friends And Related Function Documentation

◆ PCShellApplyOp

MoFEMErrorCode PCShellApplyOp ( PC  pc,
Vec  f,
Vec  x 
)
friend

◆ PCShellDestroy

MoFEMErrorCode PCShellDestroy ( PC  pc)
friend

◆ PCShellSetUpOp

MoFEMErrorCode PCShellSetUpOp ( PC  pc)
friend

Member Data Documentation

◆ initPC

bool ConvectiveMassElement::PCShellCtx::initPC

check if PC is initialized

Definition at line 603 of file ConvectiveMassElement.hpp.

◆ pC

PC ConvectiveMassElement::PCShellCtx::pC

Definition at line 607 of file ConvectiveMassElement.hpp.

◆ shellMat

Mat ConvectiveMassElement::PCShellCtx::shellMat

Definition at line 602 of file ConvectiveMassElement.hpp.


The documentation for this struct was generated from the following files:
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
ConvectiveMassElement::PCShellCtx::shellMat
Mat shellMat
Definition: ConvectiveMassElement.hpp:602
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:535
ConvectiveMassElement::PCShellCtx::pC
PC pC
Definition: ConvectiveMassElement.hpp:607
ConvectiveMassElement::PCShellCtx::initPC
bool initPC
check if PC is initialized
Definition: ConvectiveMassElement.hpp:603
MoFEMFunctionBeginHot
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:440