v0.14.0 |
Interface for nonlinear (SNES) solver. More...
#include <src/petsc/SnesCtx.hpp>
Public Types | |
typedef MoFEM::PairNameFEMethodPtr | PairNameFEMethodPtr |
typedef MoFEM::FEMethodsSequence | FEMethodsSequence |
typedef MoFEM::BasicMethodsSequence | BasicMethodsSequence |
Public Member Functions | |
SnesCtx (Interface &m_field, const std::string &problem_name) | |
virtual | ~SnesCtx ()=default |
FEMethodsSequence & | getSetOperators () |
FEMethodsSequence & | getComputeRhs () |
BasicMethodsSequence & | getPreProcComputeRhs () |
BasicMethodsSequence & | getPostProcComputeRhs () |
BasicMethodsSequence & | getPreProcSetOperators () |
BasicMethodsSequence & | getPostProcSetOperators () |
MoFEMErrorCode | copyLoops (const SnesCtx &snes_ctx) |
Copy sequences from other SNES contex. More... | |
MoFEMErrorCode | clearLoops () |
Clear loops. More... | |
DEPRECATED FEMethodsSequence & | get_loops_to_do_Mat () |
DEPRECATED FEMethodsSequence & | get_loops_to_do_Rhs () |
DEPRECATED BasicMethodsSequence & | get_preProcess_to_do_Rhs () |
DEPRECATED BasicMethodsSequence & | get_postProcess_to_do_Rhs () |
DEPRECATED BasicMethodsSequence & | get_preProcess_to_do_Mat () |
DEPRECATED BasicMethodsSequence & | get_postProcess_to_do_Mat () |
Public Attributes | |
MoFEM::Interface & | mField |
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< bool > | vecAssembleSwitch |
boost::movelib::unique_ptr< bool > | matAssembleSwitch |
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... | |
Interface for nonlinear (SNES) solver.
Definition at line 13 of file SnesCtx.hpp.
Definition at line 28 of file SnesCtx.hpp.
Definition at line 27 of file SnesCtx.hpp.
Definition at line 26 of file SnesCtx.hpp.
|
inline |
Definition at line 43 of file SnesCtx.hpp.
|
virtualdefault |
MoFEMErrorCode SnesCtx::clearLoops | ( | ) |
MoFEMErrorCode SnesCtx::copyLoops | ( | const SnesCtx & | snes_ctx | ) |
Copy sequences from other SNES contex.
snes_ctx | SNES contex from which Sequence is copied from |
Definition at line 5 of file SnesCtx.cpp.
|
inline |
Definition at line 125 of file SnesCtx.hpp.
|
inline |
Definition at line 130 of file SnesCtx.hpp.
|
inline |
Definition at line 150 of file SnesCtx.hpp.
|
inline |
Definition at line 140 of file SnesCtx.hpp.
|
inline |
Definition at line 145 of file SnesCtx.hpp.
|
inline |
Definition at line 135 of file SnesCtx.hpp.
|
inline |
Definition at line 69 of file SnesCtx.hpp.
|
inline |
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.
Definition at line 87 of file SnesCtx.hpp.
|
inline |
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.
Definition at line 101 of file SnesCtx.hpp.
|
inline |
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.
Definition at line 78 of file SnesCtx.hpp.
|
inline |
|
inline |
Definition at line 64 of file SnesCtx.hpp.
|
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
snes | SNES solver |
x | Solution vector at current iteration |
A | Tangent matrix |
B | Preconditioner tangent matrix |
ctx | Pointer to context i.e. SnesCtx |
Definition at line 139 of file SnesCtx.cpp.
|
friend |
|
friend |
Set behavior if finite element in sequence does not exist.
snes | |
bh | If set to MF_EXIST check if element exist, default MF_EXIST. Otherwise set MF_ZERO |
Definition at line 224 of file SnesCtx.cpp.
|
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
snes | SNES solver |
x | Solution vector at current iteration |
f | The right hand side vector |
ctx | Pointer to context i.e. SnesCtx |
Definition at line 27 of file SnesCtx.cpp.
MoFEMTypes MoFEM::SnesCtx::bH |
If set to MF_EXIST check if element exist, default MF_EXIST.
Definition at line 20 of file SnesCtx.hpp.
FEMethodsSequence MoFEM::SnesCtx::loops_to_do_Mat |
Sequence of finite elements instances assembling tangent matrix
Definition at line 30 of file SnesCtx.hpp.
FEMethodsSequence MoFEM::SnesCtx::loops_to_do_Rhs |
Sequence of finite elements instances assembling residual vector
Definition at line 32 of file SnesCtx.hpp.
|
private |
Definition at line 156 of file SnesCtx.hpp.
MoFEM::Interface& MoFEM::SnesCtx::mField |
database Interface
Definition at line 15 of file SnesCtx.hpp.
moab::Interface& MoFEM::SnesCtx::moab |
moab Interface
Definition at line 16 of file SnesCtx.hpp.
|
private |
Log events to assemble tangent matrix.
Definition at line 158 of file SnesCtx.hpp.
|
private |
Log events to assemble residual.
Definition at line 157 of file SnesCtx.hpp.
BasicMethodsSequence MoFEM::SnesCtx::postProcess_Mat |
Sequence of methods run after tangent matrix is assembled
Definition at line 36 of file SnesCtx.hpp.
BasicMethodsSequence MoFEM::SnesCtx::postProcess_Rhs |
Sequence of methods run after residual is assembled.
Definition at line 41 of file SnesCtx.hpp.
BasicMethodsSequence MoFEM::SnesCtx::preProcess_Mat |
Sequence of methods run before tangent matrix is assembled
Definition at line 34 of file SnesCtx.hpp.
BasicMethodsSequence MoFEM::SnesCtx::preProcess_Rhs |
Sequence of methods run before residual is assembled.
Definition at line 39 of file SnesCtx.hpp.
std::string MoFEM::SnesCtx::problemName |
problem name
Definition at line 18 of file SnesCtx.hpp.
MatAssemblyType MoFEM::SnesCtx::typeOfAssembly |
type of assembly at the end
Definition at line 23 of file SnesCtx.hpp.
|
private |
Definition at line 155 of file SnesCtx.hpp.
bool MoFEM::SnesCtx::vErify |
If true verify vector.
Definition at line 24 of file SnesCtx.hpp.
bool MoFEM::SnesCtx::zeroPreCondMatrixB |
If true zero matrix, otherwise user need to do it, default true
Definition at line 21 of file SnesCtx.hpp.