Saddle-Point
Loading...
Searching...
No Matches
SaddlePointProblem< dim >::Parameters Class Reference

Run-time options read from a ParameterHandler input file. More...

#include <step-6.h>

Public Member Functions

 Parameters ()
 Default-construct the Parameters with sensible fallbacks.
 
void get_parameters (ParameterHandler &prm)
 Read the parameter values out of a (previously parsed) ParameterHandler into this Parameters object.
 

Static Public Member Functions

static void declare_parameters (ParameterHandler &prm)
 Register every Parameters field with the given ParameterHandler.
 

Public Attributes

unsigned int n_refinement_cycles
 Number of refinement cycles (global refinements) to perform.
 
unsigned int fe_degree
 Polynomial degree \(k\) of the \(Q_k\) scalar element used for each of the two FESystem components.
 
double convergence_tolerance
 Tolerance used by the Conjugate Gradient solver: iterations stop when the residual norm is below this value times the L2-norm of the right-hand-side vector.
 
std::string custom_rhs_0
 Symbolic expression for the right-hand side \(f_0\) of the first component, parsed at run time by FunctionParser.
 
std::string custom_rhs_1
 Symbolic expression for the right-hand side \(f_1\) of the second component, parsed at run time by FunctionParser.
 
std::string custom_rhs_gamma
 Symbolic expression for the boundary forcing \(g\) that appears in the boundary integral, parsed at run time by FunctionParser.
 

Detailed Description

template<int dim>
class SaddlePointProblem< dim >::Parameters

Run-time options read from a ParameterHandler input file.

The Parameters class collects all values that the user can change without recompiling. It is declared inside SaddlePointProblem because every parameter only makes sense in the context of a SaddlePointProblem run.

Two static-style helpers are provided:

  • declare_parameters() registers each parameter together with its default value and a textual description with a ParameterHandler.
  • get_parameters() reads the values back from a ParameterHandler that has already parsed an input file.

Constructor & Destructor Documentation

◆ Parameters()

template<int dim>
SaddlePointProblem< dim >::Parameters::Parameters ( )

Default-construct the Parameters with sensible fallbacks.

Constructor of the nested SaddlePointProblem::Parameters class.

The numeric defaults are: 8 refinement cycles, finite-element degree 2, and a CG convergence tolerance of \(10^{-12}\).

Initializes the numeric defaults that are used when the user does not supply a value (or before parse_input is called):

  • n_refinement_cycles = 8,
  • fe_degree = 2 (i.e. \(Q_2\) elements),
  • convergence_tolerance = \(10^{-12}\).

The string-valued right-hand-side entries are left empty here and are filled in by get_parameters() after the input file has been parsed.

Member Function Documentation

◆ declare_parameters()

template<int dim>
void SaddlePointProblem< dim >::Parameters::declare_parameters ( ParameterHandler &  prm)
static

Register every Parameters field with the given ParameterHandler.

After calling this function, prm knows the name, default value, pattern (integer/double/string) and description of every parameter that this class needs. It is normally followed by a call to prm.parse_input(filename) and then to get_parameters().

Parameters
[in,out]prmParameterHandler that will receive the entries.

◆ get_parameters()

template<int dim>
void SaddlePointProblem< dim >::Parameters::get_parameters ( ParameterHandler &  prm)

Read the parameter values out of a (previously parsed) ParameterHandler into this Parameters object.

Parameters
[in]prmParameterHandler that has already called parse_input.

Member Data Documentation

◆ convergence_tolerance

template<int dim>
double SaddlePointProblem< dim >::Parameters::convergence_tolerance

Tolerance used by the Conjugate Gradient solver: iterations stop when the residual norm is below this value times the L2-norm of the right-hand-side vector.

◆ custom_rhs_0

template<int dim>
std::string SaddlePointProblem< dim >::Parameters::custom_rhs_0

Symbolic expression for the right-hand side \(f_0\) of the first component, parsed at run time by FunctionParser.

◆ custom_rhs_1

template<int dim>
std::string SaddlePointProblem< dim >::Parameters::custom_rhs_1

Symbolic expression for the right-hand side \(f_1\) of the second component, parsed at run time by FunctionParser.

◆ custom_rhs_gamma

template<int dim>
std::string SaddlePointProblem< dim >::Parameters::custom_rhs_gamma

Symbolic expression for the boundary forcing \(g\) that appears in the boundary integral, parsed at run time by FunctionParser.

◆ fe_degree

template<int dim>
unsigned int SaddlePointProblem< dim >::Parameters::fe_degree

Polynomial degree \(k\) of the \(Q_k\) scalar element used for each of the two FESystem components.

◆ n_refinement_cycles

template<int dim>
unsigned int SaddlePointProblem< dim >::Parameters::n_refinement_cycles

Number of refinement cycles (global refinements) to perform.


The documentation for this class was generated from the following files: