v0.15.0
Loading...
Searching...
No Matches
ConvectiveMassElement::MatShellCtx Struct Reference

#include "users_modules/basic_finite_elements/src/ConvectiveMassElement.hpp"

Collaboration diagram for ConvectiveMassElement::MatShellCtx:
[legend]

Public Member Functions

 MatShellCtx ()
 
virtual ~MatShellCtx ()
 
MoFEMErrorCode iNit ()
 
MoFEMErrorCode dEstroy ()
 

Public Attributes

Mat K
 
Mat M
 
VecScatter scatterU
 
VecScatter scatterV
 
double ts_a
 
bool iNitialized
 
Mat barK
 
Vec u
 
Vec v
 
Vec Ku
 
Vec Mv
 

Friends

MoFEMErrorCode MultOpA (Mat A, Vec x, Vec f)
 
MoFEMErrorCode ZeroEntriesOp (Mat A)
 

Detailed Description

Examples
nonlinear_dynamics.cpp.

Definition at line 502 of file ConvectiveMassElement.hpp.

Constructor & Destructor Documentation

◆ MatShellCtx()

ConvectiveMassElement::MatShellCtx::MatShellCtx ( )

◆ ~MatShellCtx()

ConvectiveMassElement::MatShellCtx::~MatShellCtx ( )
virtual

Definition at line 2345 of file ConvectiveMassElement.cpp.

2345 {
2346 if (iNitialized) {
2347
2348 CHKERR dEstroy();
2349 CHKERRABORT(PETSC_COMM_WORLD, ierr);
2350 }
2351}
#define CHKERR
Inline error check.
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr

Member Function Documentation

◆ dEstroy()

MoFEMErrorCode ConvectiveMassElement::MatShellCtx::dEstroy ( )

Definition at line 2370 of file ConvectiveMassElement.cpp.

2370 {
2372 if (iNitialized) {
2373
2374 CHKERR VecDestroy(&u);
2375 CHKERR VecDestroy(&Ku);
2376 CHKERR VecDestroy(&v);
2377 CHKERR VecDestroy(&Mv);
2378 CHKERR MatDestroy(&barK);
2379 iNitialized = false;
2380 }
2382}
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...

◆ iNit()

MoFEMErrorCode ConvectiveMassElement::MatShellCtx::iNit ( )
Examples
nonlinear_dynamics.cpp.

Definition at line 2353 of file ConvectiveMassElement.cpp.

2353 {
2355 if (!iNitialized) {
2356
2357#if PETSC_VERSION_GE(3, 5, 3)
2358 CHKERR MatCreateVecs(K, &u, &Ku);
2359 CHKERR MatCreateVecs(M, &v, &Mv);
2360#else
2361 CHKERR MatGetVecs(K, &u, &Ku);
2362 CHKERR MatGetVecs(M, &v, &Mv);
2363#endif
2364 CHKERR MatDuplicate(K, MAT_SHARE_NONZERO_PATTERN, &barK);
2365 iNitialized = true;
2366 }
2368}

Friends And Related Symbol Documentation

◆ MultOpA

MoFEMErrorCode MultOpA ( Mat A,
Vec x,
Vec f )
friend

◆ ZeroEntriesOp

MoFEMErrorCode ZeroEntriesOp ( Mat A)
friend

Member Data Documentation

◆ barK

Mat ConvectiveMassElement::MatShellCtx::barK
Examples
nonlinear_dynamics.cpp.

Definition at line 512 of file ConvectiveMassElement.hpp.

◆ iNitialized

bool ConvectiveMassElement::MatShellCtx::iNitialized

Definition at line 508 of file ConvectiveMassElement.hpp.

◆ K

Mat ConvectiveMassElement::MatShellCtx::K
Examples
nonlinear_dynamics.cpp.

Definition at line 504 of file ConvectiveMassElement.hpp.

◆ Ku

Vec ConvectiveMassElement::MatShellCtx::Ku

Definition at line 513 of file ConvectiveMassElement.hpp.

◆ M

Mat ConvectiveMassElement::MatShellCtx::M
Examples
nonlinear_dynamics.cpp.

Definition at line 504 of file ConvectiveMassElement.hpp.

◆ Mv

Vec ConvectiveMassElement::MatShellCtx::Mv

Definition at line 513 of file ConvectiveMassElement.hpp.

◆ scatterU

VecScatter ConvectiveMassElement::MatShellCtx::scatterU
Examples
nonlinear_dynamics.cpp.

Definition at line 505 of file ConvectiveMassElement.hpp.

◆ scatterV

VecScatter ConvectiveMassElement::MatShellCtx::scatterV
Examples
nonlinear_dynamics.cpp.

Definition at line 505 of file ConvectiveMassElement.hpp.

◆ ts_a

double ConvectiveMassElement::MatShellCtx::ts_a

Definition at line 506 of file ConvectiveMassElement.hpp.

◆ u

Vec ConvectiveMassElement::MatShellCtx::u
Examples
nonlinear_dynamics.cpp.

Definition at line 513 of file ConvectiveMassElement.hpp.

◆ v

Vec ConvectiveMassElement::MatShellCtx::v
Examples
nonlinear_dynamics.cpp.

Definition at line 513 of file ConvectiveMassElement.hpp.


The documentation for this struct was generated from the following files: