https://mooseframework.inl.gov
Loading...
Searching...
No Matches
TopResidualDebugOutput.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 "PetscOutput.h"
14
15#include "libmesh/system.h"
16
18
24{
25 unsigned int _var;
26 std::set<SubdomainID> _subdomain_ids;
27 dof_id_type _id;
28 Point _point;
32
34 : _var(0),
36 _id(0),
37 _point(Point()),
38 _residual(0.),
39 _is_scalar(false),
40 _is_nodal(true)
41 {
42 }
43
45 std::set<SubdomainID> subdomain_ids,
46 dof_id_type id,
47 Point point,
48 Real residual,
49 bool is_scalar = false,
50 bool is_nodal = true)
51 : _var(var),
52 _subdomain_ids(subdomain_ids),
53 _id(id),
54 _point(point),
55 _residual(residual),
56 _is_scalar(is_scalar),
57 _is_nodal(is_nodal)
58 {
59 }
60};
61
73{
74public:
76
82
83protected:
87 virtual void output() override;
88
94 void printTopResiduals(const NumericVector<Number> & residual, unsigned int n);
95
105
107 unsigned int _num_residuals;
108
111
114};
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
Nonlinear system to be solved.
Adds the ability to output on every nonlinear and/or linear residual.
Definition PetscOutput.h:42
A class for producing various debug related outputs.
NonlinearSystemBase & _nl
Reference to MOOSE's nonlinear system.
static InputParameters validParams()
unsigned int _num_residuals
Number of residuals to display.
static bool sortTopResidualData(TopResidualDebugOutputTopResidualData i, TopResidualDebugOutputTopResidualData j)
Method for sorting the residuals data from TopResidualDebugOutputTopResidualData structs.
virtual void output() override
Perform the debugging output.
void printTopResiduals(const NumericVector< Number > &residual, unsigned int n)
Prints the n top residuals for the variables in the system.
libMesh::System & _sys
Reference to libMesh system.
A structure for storing data related to top residuals.
TopResidualDebugOutputTopResidualData(unsigned int var, std::set< SubdomainID > subdomain_ids, dof_id_type id, Point point, Real residual, bool is_scalar=false, bool is_nodal=true)