www.mooseframework.org
PetscOutput.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef PETSCOUTPUT_H
16 #define PETSCOUTPUT_H
17 
18 // MOOSE includes
19 #include "Output.h"
20 
21 // Forward declerations
22 class PetscOutput;
23 
24 template <>
26 
30 class PetscOutput : public Output
31 {
32 public:
38 
47  virtual Real time() override;
48 
49 protected:
51  Real _norm;
52 
54  PetscInt _nonlinear_iter;
55 
57  PetscInt _linear_iter;
58 
59 private:
63  void solveSetup() override;
64 
65 #ifdef LIBMESH_HAVE_PETSC
66 
71  static PetscErrorCode petscNonlinearOutput(SNES, PetscInt its, PetscReal fnorm, void * void_ptr);
72 
78  static PetscErrorCode petscLinearOutput(KSP, PetscInt its, PetscReal fnorm, void * void_ptr);
79 #endif
80 
83 
86 
89 
91  Real _linear_dt;
92 
95 
98 
101 
104 
107 
110 
113 
116 };
117 #endif // PETSCOUTPUT_H
static PetscErrorCode petscLinearOutput(KSP, PetscInt its, PetscReal fnorm, void *void_ptr)
Performs the output onlinear iterations.
Definition: PetscOutput.C:218
virtual Real time() override
Get the output time.
Definition: PetscOutput.C:258
void solveSetup() override
Internal setup function that executes at the beginning of the time step.
Definition: PetscOutput.C:134
bool _on_linear_residual
True if current output calls is on the linear residual (used by time())
Definition: PetscOutput.h:94
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Real _nonlinear_dt
The pseuedo non-linear time step.
Definition: PetscOutput.h:85
Real _linear_time
Psuedo linear time.
Definition: PetscOutput.h:88
bool _on_nonlinear_residual
True if current output call is on the non-linear residual (used by time())
Definition: PetscOutput.h:97
Real _linear_start_time
Linear residual output start time.
Definition: PetscOutput.h:109
Real _nonlinear_start_time
Non-linear residual output start time.
Definition: PetscOutput.h:106
Based class for output objects.
Definition: Output.h:45
Real _linear_end_time
Linear residual output end time.
Definition: PetscOutput.h:115
PetscInt _linear_iter
Current linear iteration returned from PETSc.
Definition: PetscOutput.h:57
Real _linear_dt
Psuedo linear time step.
Definition: PetscOutput.h:91
Real _nonlinear_time
The psuedo non-linear time.
Definition: PetscOutput.h:82
Real _norm
Current norm returned from PETSc.
Definition: PetscOutput.h:51
PetscOutput(const InputParameters &parameters)
Class constructor.
Definition: PetscOutput.C:85
InputParameters validParams< PetscOutput >()
Definition: PetscOutput.C:25
Real _nonlinear_dt_divisor
Pseudo non-linear timestep divisor.
Definition: PetscOutput.h:100
static PetscErrorCode petscNonlinearOutput(SNES, PetscInt its, PetscReal fnorm, void *void_ptr)
Performs the output on non-linear iterations.
Definition: PetscOutput.C:178
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
Real _linear_dt_divisor
Pseudo linear timestep divisor.
Definition: PetscOutput.h:103
Adds the ability to output on every nonlinear and/or linear residual.
Definition: PetscOutput.h:30
Real _nonlinear_end_time
Non-linear residual output end time.
Definition: PetscOutput.h:112
PetscInt _nonlinear_iter
Current non-linear iteration returned from PETSc.
Definition: PetscOutput.h:54