v0.9.0
Public Types | Public Member Functions | Public Attributes | Private Attributes | Friends | List of all members
MoFEM::SnesCtx Struct Reference

Interface for nonlinear (SNES) solver. More...

#include <src/petsc/SnesCtx.hpp>

Collaboration diagram for MoFEM::SnesCtx:
[legend]

Public Types

typedef MoFEM::PairNameFEMethodPtr PairNameFEMethodPtr
 
typedef MoFEM::FEMethodsSequence FEMethodsSequence
 
typedef MoFEM::BasicMethodsSequence BasicMethodsSequence
 

Public Member Functions

MoFEMErrorCode copyLoops (const SnesCtx &snes_ctx)
 Copy sequences from other SNES contex. More...
 
MoFEMErrorCode clearLoops ()
 
 SnesCtx (Interface &m_field, const std::string &problem_name)
 
virtual ~SnesCtx ()
 
FEMethodsSequenceget_loops_to_do_Mat ()
 
FEMethodsSequenceget_loops_to_do_Rhs ()
 
BasicMethodsSequenceget_preProcess_to_do_Rhs ()
 
BasicMethodsSequenceget_postProcess_to_do_Rhs ()
 
BasicMethodsSequenceget_preProcess_to_do_Mat ()
 
BasicMethodsSequenceget_postProcess_to_do_Mat ()
 

Public Attributes

DEPRECATED typedef MoFEM::PairNameFEMethodPtr loop_pair_type
 
DEPRECATED typedef MoFEM::FEMethodsSequence loops_to_do_type
 
DEPRECATED typedef MoFEM::BasicMethodsSequence basic_method_to_do
 
MoFEM::InterfacemField
 database Interface More...
 
moab::Interface & moab
 moab Interface More...
 
std::string problemName
 problem name More...
 
MoFEMTypes bH
 If set to MF_EXIST check if element exist, default MF_EXIST. More...
 
bool zeroPreCondMatrixB
 
MatAssemblyType typeOfAssembly
 type of assembly at the end More...
 
bool vErify
 If true verify vector. More...
 
FEMethodsSequence loops_to_do_Mat
 
FEMethodsSequence loops_to_do_Rhs
 
BasicMethodsSequence preProcess_Mat
 
BasicMethodsSequence postProcess_Mat
 
BasicMethodsSequence preProcess_Rhs
 Sequence of methods run before residual is assembled. More...
 
BasicMethodsSequence postProcess_Rhs
 Sequence of methods run after residual is assembled. More...
 

Private Attributes

boost::movelib::unique_ptr< boolvecAssembleSwitch
 
boost::movelib::unique_ptr< boolmatAssembleSwitch
 
PetscLogEvent MOFEM_EVENT_SnesRhs
 Log events to assemble residual. More...
 
PetscLogEvent MOFEM_EVENT_SnesMat
 Log events to assemble tangent matrix. More...
 

Friends

PetscErrorCode SnesRhs (SNES snes, Vec x, Vec f, void *ctx)
 This is MoFEM implementation for the right hand side (residual vector) evaluation in SNES solver. More...
 
PetscErrorCode SnesMat (SNES snes, Vec x, Mat A, Mat B, void *ctx)
 This is MoFEM implementation for the left hand side (tangent matrix) evaluation in SNES solver. More...
 
MoFEMErrorCode SNESMoFEMSetAssmblyType (SNES snes, MatAssemblyType type)
 
MoFEMErrorCode SnesMoFEMSetBehavior (SNES snes, MoFEMTypes bh)
 Set behavior if finite element in sequence does not exist. More...
 

Detailed Description

Interface for nonlinear (SNES) solver.

Examples
minimal_surface_area.cpp, testing_jacobian_of_hook_element.cpp, and testing_jacobian_of_hook_scaled_with_density_element.cpp.

Definition at line 27 of file SnesCtx.hpp.

Member Typedef Documentation

◆ BasicMethodsSequence

Definition at line 51 of file SnesCtx.hpp.

◆ FEMethodsSequence

Definition at line 50 of file SnesCtx.hpp.

◆ PairNameFEMethodPtr

Definition at line 49 of file SnesCtx.hpp.

Constructor & Destructor Documentation

◆ SnesCtx()

MoFEM::SnesCtx::SnesCtx ( Interface m_field,
const std::string &  problem_name 
)

Definition at line 93 of file SnesCtx.hpp.

94  : mField(m_field), moab(m_field.get_moab()), problemName(problem_name),
96  typeOfAssembly(MAT_FINAL_ASSEMBLY), vErify(false) {
97  PetscLogEventRegister("LoopSNESRhs", 0, &MOFEM_EVENT_SnesRhs);
98  PetscLogEventRegister("LoopSNESMat", 0, &MOFEM_EVENT_SnesMat);
99  }
moab::Interface & moab
moab Interface
Definition: SnesCtx.hpp:30
MatAssemblyType typeOfAssembly
type of assembly at the end
Definition: SnesCtx.hpp:37
bool zeroPreCondMatrixB
Definition: SnesCtx.hpp:35
PetscLogEvent MOFEM_EVENT_SnesMat
Log events to assemble tangent matrix.
Definition: SnesCtx.hpp:158
PetscLogEvent MOFEM_EVENT_SnesRhs
Log events to assemble residual.
Definition: SnesCtx.hpp:157
MoFEM::Interface & mField
database Interface
Definition: SnesCtx.hpp:29
std::string problemName
problem name
Definition: SnesCtx.hpp:32
bool vErify
If true verify vector.
Definition: SnesCtx.hpp:38
MoFEMTypes bH
If set to MF_EXIST check if element exist, default MF_EXIST.
Definition: SnesCtx.hpp:34

◆ ~SnesCtx()

virtual MoFEM::SnesCtx::~SnesCtx ( )
virtual

Definition at line 101 of file SnesCtx.hpp.

101 {}

Member Function Documentation

◆ clearLoops()

MoFEMErrorCode MoFEM::SnesCtx::clearLoops ( )

Definition at line 82 of file SnesCtx.hpp.

82  {
84  loops_to_do_Mat.clear();
85  loops_to_do_Rhs.clear();
86  preProcess_Mat.clear();
87  postProcess_Mat.clear();
88  preProcess_Rhs.clear();
89  postProcess_Rhs.clear();
91  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:501
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
BasicMethodsSequence postProcess_Rhs
Sequence of methods run after residual is assembled.
Definition: SnesCtx.hpp:64
FEMethodsSequence loops_to_do_Rhs
Definition: SnesCtx.hpp:55
FEMethodsSequence loops_to_do_Mat
Definition: SnesCtx.hpp:53
BasicMethodsSequence postProcess_Mat
Definition: SnesCtx.hpp:59
BasicMethodsSequence preProcess_Rhs
Sequence of methods run before residual is assembled.
Definition: SnesCtx.hpp:62
BasicMethodsSequence preProcess_Mat
Definition: SnesCtx.hpp:57

◆ copyLoops()

MoFEMErrorCode MoFEM::SnesCtx::copyLoops ( const SnesCtx snes_ctx)

Copy sequences from other SNES contex.

Parameters
snes_ctxSNES contex from which Sequence is copied from
Returns
error code

Definition at line 71 of file SnesCtx.hpp.

71  {
73  loops_to_do_Mat = snes_ctx.loops_to_do_Mat;
74  loops_to_do_Rhs = snes_ctx.loops_to_do_Rhs;
75  preProcess_Mat = snes_ctx.preProcess_Mat;
76  postProcess_Mat = snes_ctx.postProcess_Mat;
77  preProcess_Rhs = snes_ctx.preProcess_Rhs;
78  postProcess_Rhs = snes_ctx.postProcess_Rhs;
80  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:501
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
BasicMethodsSequence postProcess_Rhs
Sequence of methods run after residual is assembled.
Definition: SnesCtx.hpp:64
FEMethodsSequence loops_to_do_Rhs
Definition: SnesCtx.hpp:55
FEMethodsSequence loops_to_do_Mat
Definition: SnesCtx.hpp:53
BasicMethodsSequence postProcess_Mat
Definition: SnesCtx.hpp:59
BasicMethodsSequence preProcess_Rhs
Sequence of methods run before residual is assembled.
Definition: SnesCtx.hpp:62
BasicMethodsSequence preProcess_Mat
Definition: SnesCtx.hpp:57

◆ get_loops_to_do_Mat()

FEMethodsSequence& MoFEM::SnesCtx::get_loops_to_do_Mat ( )
Returns
return reference to vector with FEMethod to calculate tangent matrix

Definition at line 107 of file SnesCtx.hpp.

107 { return loops_to_do_Mat; }
FEMethodsSequence loops_to_do_Mat
Definition: SnesCtx.hpp:53

◆ get_loops_to_do_Rhs()

FEMethodsSequence& MoFEM::SnesCtx::get_loops_to_do_Rhs ( )
Returns
return vector to vector with FEMethod to calculate residual

Definition at line 112 of file SnesCtx.hpp.

112 { return loops_to_do_Rhs; }
FEMethodsSequence loops_to_do_Rhs
Definition: SnesCtx.hpp:55

◆ get_postProcess_to_do_Mat()

BasicMethodsSequence& MoFEM::SnesCtx::get_postProcess_to_do_Mat ( )

The sequence of BasicMethod is executed after tangent matrix is calculated. It can be used to setup data structures, e.g. aggregate data from processors or to apply essential boundary conditions.

Returns
reference to BasicMethod for postprocessing

Definition at line 144 of file SnesCtx.hpp.

144 { return postProcess_Mat; }
BasicMethodsSequence postProcess_Mat
Definition: SnesCtx.hpp:59

◆ get_postProcess_to_do_Rhs()

BasicMethodsSequence& MoFEM::SnesCtx::get_postProcess_to_do_Rhs ( )

The sequence of BasicMethod is executed after residual is calculated. It can be used to setup data structures, e.g. aggregate data from processors or to apply essential boundary conditions.

Returns
reference to BasicMethod for postprocessing

Definition at line 130 of file SnesCtx.hpp.

130 { return postProcess_Rhs; }
BasicMethodsSequence postProcess_Rhs
Sequence of methods run after residual is assembled.
Definition: SnesCtx.hpp:64

◆ get_preProcess_to_do_Mat()

BasicMethodsSequence& MoFEM::SnesCtx::get_preProcess_to_do_Mat ( )
Returns
reference to BasicMethod for preprocessing

Definition at line 135 of file SnesCtx.hpp.

135 { return preProcess_Mat; }
BasicMethodsSequence preProcess_Mat
Definition: SnesCtx.hpp:57

◆ get_preProcess_to_do_Rhs()

BasicMethodsSequence& MoFEM::SnesCtx::get_preProcess_to_do_Rhs ( )

The sequence of BasicMethod is executed before residual is calculated. It can be used to setup data structures, e.g. zero global variable which is integrated in domain, e.g. for calculation of strain energy.

Returns
reference to BasicMethod for preprocessing

Definition at line 121 of file SnesCtx.hpp.

121 { return preProcess_Rhs; }
BasicMethodsSequence preProcess_Rhs
Sequence of methods run before residual is assembled.
Definition: SnesCtx.hpp:62

Friends And Related Function Documentation

◆ SnesMat

PetscErrorCode SnesMat ( SNES  snes,
Vec  x,
Mat  A,
Mat  B,
void *  ctx 
)
friend

This is MoFEM implementation for the left hand side (tangent matrix) evaluation in SNES solver.

For more information pleas look to PETSc manual, i.e. SNESSetJacobian http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/SNES/SNESSetJacobian.html#SNESSetJacobian

Parameters
snesSNES solver
xSolution vector at current iteration
ATangent matrix
BPreconditioner tangent matrix
ctxPointer to context i.e. SnesCtx
Returns
Error code

Definition at line 121 of file SnesCtx.cpp.

121  {
122  SnesCtx *snes_ctx = (SnesCtx *)ctx;
123  // PetscValidHeaderSpecific(snes,SNES_CLASSID,1);
125  PetscLogEventBegin(snes_ctx->MOFEM_EVENT_SnesMat, 0, 0, 0, 0);
126  if (snes_ctx->zeroPreCondMatrixB)
127  CHKERR MatZeroEntries(B);
128 
129  snes_ctx->matAssembleSwitch = boost::movelib::make_unique<bool>(true);
130 
131  CHKERR VecGhostUpdateBegin(x, INSERT_VALUES, SCATTER_FORWARD);
132  CHKERR VecGhostUpdateEnd(x, INSERT_VALUES, SCATTER_FORWARD);
133  CHKERR snes_ctx->mField.getInterface<VecManager>()->setLocalGhostVector(
134  snes_ctx->problemName, COL, x, INSERT_VALUES, SCATTER_REVERSE);
135  for (auto &bit : snes_ctx->preProcess_Mat) {
136  bit->matAssembleSwitch = boost::move(snes_ctx->matAssembleSwitch);
137  CHKERR bit->setSnes(snes);
138  bit->snes_x = x;
139  bit->snes_A = A;
140  bit->snes_B = B;
141  CHKERR bit->setSnesCtx(SnesMethod::CTX_SNESSETJACOBIAN);
142  CHKERR snes_ctx->mField.problem_basic_method_preProcess(
143  snes_ctx->problemName, *bit);
144  CHKERR bit->setSnesCtx(SnesMethod::CTX_SNESNONE);
145  snes_ctx->matAssembleSwitch = boost::move(bit->matAssembleSwitch);
146  }
147  for (auto &lit : snes_ctx->loops_to_do_Mat) {
148  lit.second->matAssembleSwitch = boost::move(snes_ctx->matAssembleSwitch);
149  CHKERR lit.second->setSnesCtx(SnesMethod::CTX_SNESSETJACOBIAN);
150  CHKERR lit.second->setSnes(snes);
151  lit.second->snes_x = x;
152  lit.second->snes_A = A;
153  lit.second->snes_B = B;
154  CHKERR snes_ctx->mField.loop_finite_elements(
155  snes_ctx->problemName, lit.first, *(lit.second), nullptr, snes_ctx->bH);
156  CHKERR lit.second->setSnesCtx(SnesMethod::CTX_SNESNONE);
157  snes_ctx->matAssembleSwitch = boost::move(lit.second->matAssembleSwitch);
158  }
159  for (auto &bit : snes_ctx->postProcess_Mat) {
160  bit->matAssembleSwitch = boost::move(snes_ctx->matAssembleSwitch);
161  CHKERR bit->setSnes(snes);
162  bit->snes_x = x;
163  bit->snes_A = A;
164  bit->snes_B = B;
165  CHKERR bit->setSnesCtx(SnesMethod::CTX_SNESSETJACOBIAN);
166  CHKERR snes_ctx->mField.problem_basic_method_postProcess(
167  snes_ctx->problemName, *bit);
168  CHKERR bit->setSnesCtx(SnesMethod::CTX_SNESNONE);
169  snes_ctx->matAssembleSwitch = boost::move(bit->matAssembleSwitch);
170  }
171  if (*snes_ctx->matAssembleSwitch) {
172  CHKERR MatAssemblyBegin(B, snes_ctx->typeOfAssembly);
173  CHKERR MatAssemblyEnd(B, snes_ctx->typeOfAssembly);
174  }
175  PetscLogEventEnd(snes_ctx->MOFEM_EVENT_SnesMat, 0, 0, 0, 0);
177 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
#define CHKERR
Inline error check.
Definition: definitions.h:596
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407

◆ SNESMoFEMSetAssmblyType

MoFEMErrorCode SNESMoFEMSetAssmblyType ( SNES  snes,
MatAssemblyType  type 
)
friend

◆ SnesMoFEMSetBehavior

MoFEMErrorCode SnesMoFEMSetBehavior ( SNES  snes,
MoFEMTypes  bh 
)
friend

Set behavior if finite element in sequence does not exist.

Parameters
snes
bhIf set to MF_EXIST check if element exist, default MF_EXIST. Otherwise set MF_ZERO
Returns
error code

Definition at line 188 of file SnesCtx.cpp.

188  {
189  SnesCtx *snes_ctx;
191  CHKERR SNESGetApplicationContext(snes, &snes_ctx);
192  snes_ctx->bH = bh;
194 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
#define CHKERR
Inline error check.
Definition: definitions.h:596
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407

◆ SnesRhs

PetscErrorCode SnesRhs ( SNES  snes,
Vec  x,
Vec  f,
void *  ctx 
)
friend

This is MoFEM implementation for the right hand side (residual vector) evaluation in SNES solver.

For more information pleas look to PETSc manual, i.e. SNESSetFunction http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/SNES/SNESSetFunction.html

Parameters
snesSNES solver
xSolution vector at current iteration
fThe right hand side vector
ctxPointer to context i.e. SnesCtx
Returns
Error code

Definition at line 23 of file SnesCtx.cpp.

23  {
24  SnesCtx *snes_ctx = (SnesCtx *)ctx;
25  // PetscValidHeaderSpecific(snes,SNES_CLASSID,1);
27  PetscLogEventBegin(snes_ctx->MOFEM_EVENT_SnesRhs, 0, 0, 0, 0);
28  CHKERR VecGhostUpdateBegin(x, INSERT_VALUES, SCATTER_FORWARD);
29  CHKERR VecGhostUpdateEnd(x, INSERT_VALUES, SCATTER_FORWARD);
30  if (snes_ctx->vErify) {
31  // Verify finite elements, check for not a number
32  CHKERR VecAssemblyBegin(f);
33  CHKERR VecAssemblyEnd(f);
34  MPI_Comm comm = PetscObjectComm((PetscObject)f);
35  PetscSynchronizedPrintf(comm, "SNES Verify x\n");
36  const Problem *prb_ptr;
37  CHKERR snes_ctx->mField.get_problem(snes_ctx->problemName, &prb_ptr);
38  CHKERR snes_ctx->mField.getInterface<Tools>()->checkVectorForNotANumber(
39  prb_ptr, COL, x);
40  }
41  CHKERR snes_ctx->mField.getInterface<VecManager>()->setLocalGhostVector(
42  snes_ctx->problemName, COL, x, INSERT_VALUES, SCATTER_REVERSE);
43 
44  auto zero_ghost_vec = [](Vec g) {
46  Vec l;
47  CHKERR VecGhostGetLocalForm(g, &l);
48  double *a;
49  CHKERR VecGetArray(l, &a);
50  int s;
51  CHKERR VecGetLocalSize(l, &s);
52  for (int i = 0; i != s; ++i)
53  a[i] = 0;
54  CHKERR VecRestoreArray(l, &a);
55  CHKERR VecGhostRestoreLocalForm(g, &l);
57  };
58  CHKERR zero_ghost_vec(f);
59 
60  snes_ctx->vecAssembleSwitch =
61  boost::movelib::make_unique<bool>(true);
62 
63  for (auto &bit : snes_ctx->preProcess_Rhs) {
64  bit->vecAssembleSwitch = boost::move(snes_ctx->vecAssembleSwitch);
65  CHKERR bit->setSnes(snes);
66  bit->snes_x = x;
67  bit->snes_f = f;
68  CHKERR bit->setSnesCtx(SnesMethod::CTX_SNESSETFUNCTION);
69  CHKERR snes_ctx->mField.problem_basic_method_preProcess(
70  snes_ctx->problemName, *bit);
71  CHKERR bit->setSnesCtx(SnesMethod::CTX_SNESNONE);
72  snes_ctx->vecAssembleSwitch = boost::move(bit->vecAssembleSwitch);
73  }
74 
75  for (auto &lit : snes_ctx->loops_to_do_Rhs) {
76  lit.second->vecAssembleSwitch = boost::move(snes_ctx->vecAssembleSwitch);
77  CHKERR lit.second->setSnesCtx(SnesMethod::CTX_SNESSETFUNCTION);
78  CHKERR lit.second->setSnes(snes);
79  lit.second->snes_x = x;
80  lit.second->snes_f = f;
81  CHKERR snes_ctx->mField.loop_finite_elements(
82  snes_ctx->problemName, lit.first, *lit.second, nullptr, snes_ctx->bH);
83  CHKERR lit.second->setSnesCtx(SnesMethod::CTX_SNESNONE);
84  if (snes_ctx->vErify) {
85  // Verify finite elements, check for not a number
86  CHKERR VecAssemblyBegin(f);
87  CHKERR VecAssemblyEnd(f);
88  MPI_Comm comm = PetscObjectComm((PetscObject)f);
89  PetscSynchronizedPrintf(comm, "SNES Verify f FE < %s >\n",
90  lit.first.c_str());
91  const Problem *prb_ptr;
92  CHKERR snes_ctx->mField.get_problem(snes_ctx->problemName, &prb_ptr);
93  CHKERR snes_ctx->mField.getInterface<Tools>()->checkVectorForNotANumber(
94  prb_ptr, ROW, f);
95  }
96  snes_ctx->vecAssembleSwitch = boost::move(lit.second->vecAssembleSwitch);
97  }
98 
99  for (auto &bit : snes_ctx->postProcess_Rhs) {
100  bit->vecAssembleSwitch = boost::move(snes_ctx->vecAssembleSwitch);
101  CHKERR bit->setSnes(snes);
102  bit->snes_x = x;
103  bit->snes_f = f;
104  CHKERR bit->setSnesCtx(SnesMethod::CTX_SNESSETFUNCTION);
105  CHKERR snes_ctx->mField.problem_basic_method_postProcess(
106  snes_ctx->problemName, *bit);
107  CHKERR bit->setSnesCtx(SnesMethod::CTX_SNESNONE);
108  snes_ctx->vecAssembleSwitch = boost::move(bit->vecAssembleSwitch);
109  }
110 
111  if (snes_ctx->vecAssembleSwitch) {
112  CHKERR VecGhostUpdateBegin(f, ADD_VALUES, SCATTER_REVERSE);
113  CHKERR VecGhostUpdateEnd(f, ADD_VALUES, SCATTER_REVERSE);
114  CHKERR VecAssemblyBegin(f);
115  CHKERR VecAssemblyEnd(f);
116  }
117  PetscLogEventEnd(snes_ctx->MOFEM_EVENT_SnesRhs, 0, 0, 0, 0);
119 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
#define CHKERR
Inline error check.
Definition: definitions.h:596
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407

Member Data Documentation

◆ basic_method_to_do

DEPRECATED typedef MoFEM::BasicMethodsSequence MoFEM::SnesCtx::basic_method_to_do
Deprecated:
use BasicMethodsSequence

Definition at line 47 of file SnesCtx.hpp.

◆ bH

MoFEMTypes MoFEM::SnesCtx::bH

If set to MF_EXIST check if element exist, default MF_EXIST.

Definition at line 34 of file SnesCtx.hpp.

◆ loop_pair_type

DEPRECATED typedef MoFEM::PairNameFEMethodPtr MoFEM::SnesCtx::loop_pair_type
Deprecated:
use PairNameFEMethodPtr

Definition at line 41 of file SnesCtx.hpp.

◆ loops_to_do_Mat

FEMethodsSequence MoFEM::SnesCtx::loops_to_do_Mat

Sequence of finite elements instances assembling tangent matrix

Definition at line 53 of file SnesCtx.hpp.

◆ loops_to_do_Rhs

FEMethodsSequence MoFEM::SnesCtx::loops_to_do_Rhs

Sequence of finite elements instances assembling residual vector

Definition at line 55 of file SnesCtx.hpp.

◆ loops_to_do_type

DEPRECATED typedef MoFEM::FEMethodsSequence MoFEM::SnesCtx::loops_to_do_type
Deprecated:
use FEMethodsSequence

Definition at line 44 of file SnesCtx.hpp.

◆ matAssembleSwitch

boost::movelib::unique_ptr<bool> MoFEM::SnesCtx::matAssembleSwitch
private

Definition at line 156 of file SnesCtx.hpp.

◆ mField

MoFEM::Interface& MoFEM::SnesCtx::mField

database Interface

Definition at line 29 of file SnesCtx.hpp.

◆ moab

moab::Interface& MoFEM::SnesCtx::moab

moab Interface

Definition at line 30 of file SnesCtx.hpp.

◆ MOFEM_EVENT_SnesMat

PetscLogEvent MoFEM::SnesCtx::MOFEM_EVENT_SnesMat
private

Log events to assemble tangent matrix.

Definition at line 158 of file SnesCtx.hpp.

◆ MOFEM_EVENT_SnesRhs

PetscLogEvent MoFEM::SnesCtx::MOFEM_EVENT_SnesRhs
private

Log events to assemble residual.

Definition at line 157 of file SnesCtx.hpp.

◆ postProcess_Mat

BasicMethodsSequence MoFEM::SnesCtx::postProcess_Mat

Sequence of methods run after tangent matrix is assembled

Definition at line 59 of file SnesCtx.hpp.

◆ postProcess_Rhs

BasicMethodsSequence MoFEM::SnesCtx::postProcess_Rhs

Sequence of methods run after residual is assembled.

Definition at line 64 of file SnesCtx.hpp.

◆ preProcess_Mat

BasicMethodsSequence MoFEM::SnesCtx::preProcess_Mat

Sequence of methods run before tangent matrix is assembled

Definition at line 57 of file SnesCtx.hpp.

◆ preProcess_Rhs

BasicMethodsSequence MoFEM::SnesCtx::preProcess_Rhs

Sequence of methods run before residual is assembled.

Definition at line 62 of file SnesCtx.hpp.

◆ problemName

std::string MoFEM::SnesCtx::problemName

problem name

Definition at line 32 of file SnesCtx.hpp.

◆ typeOfAssembly

MatAssemblyType MoFEM::SnesCtx::typeOfAssembly

type of assembly at the end

Definition at line 37 of file SnesCtx.hpp.

◆ vecAssembleSwitch

boost::movelib::unique_ptr<bool> MoFEM::SnesCtx::vecAssembleSwitch
private

Definition at line 155 of file SnesCtx.hpp.

◆ vErify

bool MoFEM::SnesCtx::vErify

If true verify vector.

Definition at line 38 of file SnesCtx.hpp.

◆ zeroPreCondMatrixB

bool MoFEM::SnesCtx::zeroPreCondMatrixB

If true zero matrix, otherwise user need to do it, default true

Definition at line 35 of file SnesCtx.hpp.


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