![]() |
v0.15.0 |
Set of functions called by PETSc solver used to refine and update mesh. More...
Public Member Functions | |
| TSPrePostProc ()=default | |
| virtual | ~TSPrePostProc ()=default |
| MoFEMErrorCode | tsSetUp (TS ts) |
| Used to setup TS solver. | |
| TSPrePostProc ()=default | |
| virtual | ~TSPrePostProc ()=default |
| MoFEMErrorCode | tsSetUp (TS ts) |
| Used to setup TS solver. | |
| SmartPetscObj< VecScatter > | getScatter (Vec x, Vec y, enum FR fr) |
| Get scatter context for vector operations. | |
| SmartPetscObj< Vec > | getSubVector () |
| Create sub-problem vector. | |
Static Public Member Functions | |
| static MoFEMErrorCode | tsPostStage (TS ts, PetscReal stagetime, PetscInt stageindex, Vec *Y) |
| [Boundary condition] | |
| static MoFEMErrorCode | tsPostStep (TS ts) |
| static MoFEMErrorCode | tsPreStep (TS ts) |
Public Attributes | |
| Example * | fsRawPtr |
| SmartPetscObj< DM > | solverSubDM |
| SmartPetscObj< Vec > | globSol |
| FreeSurface * | fsRawPtr |
Static Private Member Functions | |
| static MoFEMErrorCode | tsPreProc (TS ts) |
| Pre process time step. | |
| static MoFEMErrorCode | tsPostProc (TS ts) |
| Post process time step. | |
| static MoFEMErrorCode | tsPreStage (TS ts) |
| Pre-stage processing for time stepping. | |
| static MoFEMErrorCode | tsSetIFunction (TS ts, PetscReal t, Vec u, Vec u_t, Vec f, void *ctx) |
| Set implicit function for time stepping. | |
| static MoFEMErrorCode | tsSetIJacobian (TS ts, PetscReal t, Vec u, Vec u_t, PetscReal a, Mat A, Mat B, void *ctx) |
| Set implicit Jacobian for time stepping. | |
| static MoFEMErrorCode | tsMonitor (TS ts, PetscInt step, PetscReal t, Vec u, void *ctx) |
| Monitor solution during time stepping. | |
| static MoFEMErrorCode | pcSetup (PC pc) |
| Setup preconditioner. | |
| static MoFEMErrorCode | pcApply (PC pc, Vec pc_f, Vec pc_x) |
| Apply preconditioner. | |
Private Attributes | |
| SmartPetscObj< Vec > | globRes |
| SmartPetscObj< Mat > | subB |
| SmartPetscObj< KSP > | subKSP |
| boost::shared_ptr< SnesCtx > | snesCtxPtr |
| boost::shared_ptr< TsCtx > | tsCtxPtr |
Set of functions called by PETSc solver used to refine and update mesh.
Definition at line 383 of file dynamic_first_order_con_law.cpp.
|
default |
|
virtualdefault |
|
default |
|
virtualdefault |
| SmartPetscObj< VecScatter > TSPrePostProc::getScatter | ( | Vec | x, |
| Vec | y, | ||
| enum FR | fr | ||
| ) |
Get scatter context for vector operations.
| x | Local sub-vector |
| y | Global vector |
| fr | Direction flag (F=forward, R=reverse) |
Creates scatter context to transfer data between global and sub-problem vectors
Definition at line 3559 of file free_surface.cpp.
| SmartPetscObj< Vec > TSPrePostProc::getSubVector | ( | ) |
Create sub-problem vector.
Creates a vector with proper size and ghost structure for sub-problem
Definition at line 3579 of file free_surface.cpp.
|
staticprivate |
Apply preconditioner.
| pc | PETSc preconditioner object |
| pc_f | Input vector (right-hand side) |
| pc_x | Output vector (preconditioned solution) |
Applies preconditioner by solving sub-problem with KSP
Definition at line 3539 of file free_surface.cpp.
|
staticprivate |
Setup preconditioner.
| pc | PETSc preconditioner object |
Initializes KSP solver for shell preconditioner
Definition at line 3529 of file free_surface.cpp.
|
staticprivate |
Monitor solution during time stepping.
| ts | PETSc time stepping object |
| step | Current time step number |
| t | Current time value |
| u | Current solution vector |
| ctx | User context (pointer to FreeSurface) |
Called after each time step to monitor solution and save output Wrapper for TS monitor
Definition at line 3504 of file free_surface.cpp.
|
staticprivate |
Post process time step.
Currently this function does not make anything major
| ts | PETSc time stepping object |
Called after each time step completion for cleanup operations
Definition at line 3439 of file free_surface.cpp.
|
static |
[Boundary condition]
Definition at line 580 of file dynamic_first_order_con_law.cpp.
|
static |
Definition at line 611 of file dynamic_first_order_con_law.cpp.
|
staticprivate |
Pre process time step.
Refine mesh and update fields before each time step
| ts | PETSc time stepping object |
This function is called before each time step to:
cut-off values at nodes, i.e. abs("H") <= 1
Definition at line 3324 of file free_surface.cpp.
|
staticprivate |
Pre-stage processing for time stepping.
| ts | PETSc time stepping object |
|
static |
Definition at line 624 of file dynamic_first_order_con_law.cpp.
|
staticprivate |
Set implicit function for time stepping.
| ts | PETSc time stepping object |
| t | Current time |
| u | Solution vector at current time |
| u_t | Time derivative of solution |
| f | Output residual vector F(t,u,u_t) |
| ctx | User context (unused) |
Wrapper that scatters global vectors to sub-problem and evaluates residual
Definition at line 3449 of file free_surface.cpp.
|
staticprivate |
Set implicit Jacobian for time stepping.
| ts | PETSc time stepping object |
| t | Current time |
| u | Solution vector at current time |
| u_t | Time derivative of solution |
| a | Shift parameter for implicit methods |
| A | Jacobian matrix (input) |
| B | Jacobian matrix (output, often same as A) |
| ctx | User context (unused) |
Wrapper that assembles Jacobian matrix for sub-problem Wrapper for SNES Lhs
Definition at line 3477 of file free_surface.cpp.
| MoFEMErrorCode TSPrePostProc::tsSetUp | ( | TS | ts | ) |
Used to setup TS solver.
| ts |
Definition at line 3583 of file free_surface.cpp.
| MoFEMErrorCode TSPrePostProc::tsSetUp | ( | TS | ts | ) |
Used to setup TS solver.
| ts | PETSc time stepping object to configure |
Sets up time stepping solver with custom preconditioner, monitors, and callback functions for mesh refinement and solution projection
| Example* TSPrePostProc::fsRawPtr |
Definition at line 397 of file dynamic_first_order_con_law.cpp.
| FreeSurface* TSPrePostProc::fsRawPtr |
Definition at line 672 of file free_surface.cpp.
|
private |
Definition at line 784 of file free_surface.cpp.
| SmartPetscObj<Vec> TSPrePostProc::globSol |
Definition at line 671 of file free_surface.cpp.
|
private |
Definition at line 789 of file free_surface.cpp.
| SmartPetscObj<DM> TSPrePostProc::solverSubDM |
Definition at line 670 of file free_surface.cpp.
|
private |
Definition at line 785 of file free_surface.cpp.
|
private |
Definition at line 786 of file free_surface.cpp.
|
private |
Definition at line 791 of file free_surface.cpp.