26 "Specifies the maximum number of Picard iterations. " 27 "Mainly used when wanting to do Picard iterations with MultiApps " 28 "that are set to execute_on timestep_end or timestep_begin. " 29 "Setting this parameter to 1 turns off the Picard iterations.",
30 "Deprecated, use fixed_point_max_its");
32 "accept_on_max_picard_iteration",
34 "True to treat reaching the maximum number of Picard iterations as converged.",
35 "Deprecated, use accept_on_max_fixed_point_iteration");
37 "disable_picard_residual_norm_check",
39 "Disable the Picard residual norm evaluation thus the three parameters " 40 "picard_rel_tol, picard_abs_tol and picard_force_norms.",
41 "Deprecated, use disable_fixed_point_residual_norm_check");
44 "The relative nonlinear residual drop to shoot for " 45 "during Picard iterations. This check is " 46 "performed based on the Master app's nonlinear " 48 "Deprecated, use fixed_point_rel_tol");
51 "The absolute nonlinear residual to shoot for " 52 "during Picard iterations. This check is " 53 "performed based on the Master app's nonlinear " 55 "Deprecated, use fixed_point_abs_tol");
57 "Postprocessor for custom picard convergence check.",
58 "Deprecated, use custom_pp");
59 params.
deprecateParam(
"picard_custom_pp",
"custom_pp",
"06/06/2024");
64 "Force the evaluation of both the TIMESTEP_BEGIN and TIMESTEP_END norms regardless of the " 65 "existence of active MultiApps with those execute_on flags, default: false.",
66 "Deprecated, use fixed_point_force_norms");
74 if (!
parameters().isParamSetByAddParam(
"picard_max_its"))
104 Real relaxation_factor;
106 const std::vector<PostprocessorName> * transformed_pps;
107 std::vector<std::vector<PostprocessorValue>> * transformed_pps_values;
125 if (relaxation_factor != 1.)
131 (*transformed_pps_values).resize((*transformed_pps).size());
132 for (
size_t i = 0; i < (*transformed_pps).size(); i++)
133 (*transformed_pps_values)[i].resize(1);
140 Real relaxation_factor;
153 if (relaxation_factor != 1.)
158 transformed_old = solution;
165 Real relaxation_factor;
166 const std::vector<PostprocessorName> * transformed_pps;
167 std::vector<std::vector<PostprocessorValue>> * transformed_pps_values;
181 if (relaxation_factor != 1.)
183 for (
size_t i = 0; i < (*transformed_pps).size(); i++)
201 Real relaxation_factor;
202 const std::vector<PostprocessorName> * transformed_pps;
203 std::vector<std::vector<PostprocessorValue>> * transformed_pps_values;
218 for (
size_t i = 0; i < (*transformed_pps).size(); i++)
222 const Real old_value = (*transformed_pps_values)[i][0];
225 Real new_value = current_value;
226 new_value = relaxation_factor * current_value + (1 - relaxation_factor) * old_value;
234 Real relaxation_factor;
250 for (
const auto & dof : transformed_dofs)
252 (transformed_old(dof) * (1.0 - relaxation_factor)) +
253 (solution(dof) * relaxation_factor));
std::vector< std::vector< PostprocessorValue > > _transformed_pps_values
Previous values of the relaxed postprocessors.
virtual void update(bool update_libmesh_system=true)
Update the system (doing libMesh magic)
std::vector< std::vector< PostprocessorValue > > _secondary_transformed_pps_values
Previous values of the postprocessors relaxed outside of the fixed point iteration (used as a subapp)...
static InputParameters validParams()
FEProblemBase & _problem
Reference to FEProblem.
virtual void savePostprocessorValues(const bool primary) override final
Saves the current values of the postprocessors, and update the old(er) vectors.
virtual void transformPostprocessors(const bool primary) override final
Use the fixed point algorithm to transform the postprocessors.
Real _fixed_point_initial_norm
Initial residual norm.
NumericVector< Number > & solution()
NumericVector< Number > & addVector(const std::string &vector_name, const bool project, const ParallelType type)
Adds a solution length vector to the system.
void setPostprocessorValueByName(const PostprocessorName &name, const PostprocessorValue &value, std::size_t t_index=0)
Set the value of a PostprocessorValue.
bool _has_fixed_point_its
Whether or not we activate fixed point iteration.
bool _fixed_point_force_norms
Whether or not we force evaluation of residual norms even without multiapps.
std::vector< Real > _fixed_point_timestep_end_norm
Full history of residual norm after evaluation of timestep_end.
virtual TagID addVectorTag(const TagName &tag_name, const Moose::VectorTagType type=Moose::VECTOR_TAG_RESIDUAL)
Create a Tag.
bool _has_fixed_point_norm
Whether or not to use residual norm to check the fixed point convergence.
const PostprocessorValue * _fixed_point_custom_pp
Postprocessor value for user-defined fixed point convergence check.
virtual void printFixedPointConvergenceHistory() override final
Print the convergence history of the coupling, at every coupling iteration.
const PostprocessorValue & getPostprocessorValue(const std::string ¶m_name, const unsigned int index=0) const
doco-normal-methods-begin Retrieve the value of a Postprocessor or one of it's old or older values ...
std::vector< PostprocessorName > _secondary_transformed_pps
Postprocessors to be relaxed outside of fixed point iteration (used as a subapp)
auto max(const L &left, const R &right)
const std::vector< PostprocessorName > _transformed_pps
The postprocessors (transferred or not) that are going to be relaxed.
Real _fixed_point_rel_tol
Relative tolerance on residual norm.
virtual bool useFixedPointAlgorithmUpdateInsteadOfPicard(const bool primary) override final
Use the fixed point algorithm transform instead of simply using the Picard update.
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
std::vector< Real > _fixed_point_timestep_begin_norm
Full history of residual norm after evaluation of timestep_begin.
const Real _relax_factor
Relaxation factor for fixed point Iteration.
Executioners are objects that do the actual work of solving your problem.
TagID _old_tag_id
Vector tag id for the previous solution variable, as a main app.
unsigned int _max_fixed_point_its
Maximum fixed point iterations.
Real _secondary_relaxation_factor
Relaxation factor outside of fixed point iteration (used as a subapp)
virtual const PostprocessorValue & getPostprocessorValueByName(const PostprocessorName &name) const
Retrieve the value of the Postprocessor.
unsigned int _fixed_point_it
TagID _secondary_old_tag_id
Vector tag id for the previous solution variable, as a sub app.
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static std::string outputNorm(const Real &old_norm, const Real &norm, const unsigned int precision=6)
A helper function for outputting norms in color.
virtual void allocateStorage(const bool primary) override final
Allocate storage for the fixed point algorithm.
const InputParameters & parameters() const
Get the parameters of the object.
virtual void set(const numeric_index_type i, const Number value)=0
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
NonlinearSystemBase & _nl
Reference to nonlinear system base for faster access.
Real _fixed_point_abs_tol
Absolute tolerance on residual norm.
virtual void saveVariableValues(const bool primary) override final
Saves the current values of the variables, and update the old(er) vectors.
PicardSolve(Executioner &ex)
virtual void transformVariables(const std::set< dof_id_type > &transformed_dofs, const bool primary) override final
Use the fixed point algorithm to transform the variables.
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
bool _accept_max_it
Whether or not to treat reaching maximum number of fixed point iteration as converged.
unsigned int _main_fixed_point_it
fixed point iteration counter for the main app