https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ElementJacobianDamper.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 "GeneralDamper.h"
14#include "MooseVariable.h"
15
16// Forward Declarations
17class FEProblemBase;
18class MooseMesh;
20
25{
26public:
28
30
31 virtual void initialSetup() override;
32
36 virtual Real computeDamping(const NumericVector<Number> & /* solution */,
37 const NumericVector<Number> & update) override;
38
43 bool probeDamping(const NumericVector<Number> & update,
44 Real damping,
45 Real & max_difference,
46 std::string & error_message);
47
48protected:
52
54 const QBase * const & _qrule;
55
58
61
63 MooseSharedPointer<DisplacedProblem> _displaced_problem;
64
67
69 std::vector<MooseVariable *> _disp_var;
70
72 unsigned int _ndisp;
73
75 std::vector<VariableValue> _disp_incr;
76
79
82
85
87 const unsigned int _max_backtrack_steps;
88};
unsigned int THREAD_ID
This class implements a damper that limits the change in the Jacobian of elements.
std::vector< MooseVariable * > _disp_var
The displacement variables.
static InputParameters validParams()
const QBase *const & _qrule
Quadrature rule.
std::vector< VariableValue > _disp_incr
The current Newton increment in the displacement variables.
const Real _max_jacobian_diff
Maximum allowed relative increment in Jacobian.
unsigned int _ndisp
The number of displacement variables.
MooseSharedPointer< DisplacedProblem > _displaced_problem
The displaced problem.
const unsigned int _max_backtrack_steps
Maximum number of backtracking attempts.
MooseMesh * _mesh
The displaced mesh.
const bool _use_backtracking
Whether to backtrack the trial update when probing would otherwise create a degenerate map.
FEProblemBase & _fe_problem
The FE problem.
const MooseArray< Real > & _JxW
Transformed Jacobian weights.
bool probeDamping(const NumericVector< Number > &update, Real damping, Real &max_difference, std::string &error_message)
Probe a damped update on the displaced mesh and report the maximum relative change in JxW.
virtual Real computeDamping(const NumericVector< Number > &, const NumericVector< Number > &update) override
Computes this Damper's damping.
virtual void initialSetup() override
const Real _backtrack_factor
Multiplicative cutback applied during backtracking.
const InputParameters & parameters() const