https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PetscOutput.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
12// MOOSE includes
13#include "Output.h"
14
15class PetscOutput;
16
18{
19public:
21
22protected:
24
29 static PetscErrorCode petscNonlinearOutput(SNES, PetscInt its, PetscReal fnorm, void * void_ptr);
30
35 static PetscErrorCode petscLinearOutput(KSP, PetscInt its, PetscReal fnorm, void * void_ptr);
36};
37
42{
43public:
45
51
60 virtual Real time() override;
61
62protected:
78 virtual Real getOutputTime();
79
81 Real _norm;
82
85
87 PetscInt _linear_iter;
88
91
94
95private:
99 void solveSetup() override;
100
103
106
109
112
115
118
121
124
127
130
132};
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
Based class for output objects.
Definition Output.h:52
Real & _time
The current time for output purposes.
Definition Output.h:214
Real _t_tol
Time checking tolerance.
Definition Output.h:262
static PetscErrorCode petscLinearOutput(KSP, PetscInt its, PetscReal fnorm, void *void_ptr)
Performs the output onlinear iterations This is the monitor method that PETSc will call on linear ite...
Definition PetscOutput.C:76
static PetscErrorCode petscNonlinearOutput(SNES, PetscInt its, PetscReal fnorm, void *void_ptr)
Performs the output on non-linear iterations This is the monitor method that PETSc will call on non-l...
Definition PetscOutput.C:26
PetscOutput * _petsc_output
Definition PetscOutput.h:23
Adds the ability to output on every nonlinear and/or linear residual.
Definition PetscOutput.h:42
virtual Real time() override
Get the output time.
Real _nonlinear_start_time
Non-linear residual output start time.
static InputParameters validParams()
Real _linear_end_time
Linear residual output end time.
bool _on_linear_residual
True if current output calls is on the linear residual (used by time())
Definition PetscOutput.h:90
Real _nonlinear_dt
The pseuedo non-linear time step.
PetscInt _nonlinear_iter
Current non-linear iteration returned from PETSc.
Definition PetscOutput.h:84
bool inLinearTimeWindow()
Definition PetscOutput.h:67
Real _nonlinear_time
The psuedo non-linear time.
Real _norm
Current norm returned from PETSc.
Definition PetscOutput.h:81
virtual Real getOutputTime()
Get the time that will be used for stream/file outputting.
Real _nonlinear_end_time
Non-linear residual output end time.
Real _nonlinear_dt_divisor
Pseudo non-linear timestep divisor.
void solveSetup() override
Internal setup function that executes at the beginning of the time step.
bool inNonlinearTimeWindow()
Definition PetscOutput.h:63
Real _linear_start_time
Linear residual output start time.
Real _linear_time
Psuedo linear time.
PetscInt _linear_iter
Current linear iteration returned from PETSc.
Definition PetscOutput.h:87
Real _linear_dt
Psuedo linear time step.
bool _on_nonlinear_residual
True if current output call is on the non-linear residual (used by time())
Definition PetscOutput.h:93
Real _linear_dt_divisor
Pseudo linear timestep divisor.