DOpE
Public Member Functions | Static Public Member Functions | Protected Member Functions
DOpE::InstatStepNewtonSolver< INTEGRATOR, LINEARSOLVER, VECTOR > Class Template Reference

#include <instat_step_newtonsolver.h>

Inheritance diagram for DOpE::InstatStepNewtonSolver< INTEGRATOR, LINEARSOLVER, VECTOR >:

Public Member Functions

 InstatStepNewtonSolver (INTEGRATOR &integrator, ParameterReader &param_reader)
 
 ~InstatStepNewtonSolver ()
 
template<typename PROBLEM >
void ReInit (PROBLEM &pde)
 
template<typename PROBLEM >
bool NonlinearSolve (PROBLEM &pde, const VECTOR &last_time_solution, VECTOR &solution, bool apply_boundary_values=true, bool force_matrix_build=false, int priority=5, std::string algo_level="\t\t ")
 
template<typename PROBLEM >
bool NonlinearSolve_Initial (PROBLEM &pde, VECTOR &solution, bool apply_boundary_values=true, bool force_matrix_build=false, int priority=5, std::string algo_level="\t\t ")
 
template<typename PROBLEM >
void NonlinearLastTimeEvals (PROBLEM &pde, const VECTOR &last_time_solution, VECTOR &residual)
 

Static Public Member Functions

static void declare_params (ParameterReader &param_reader)
 

Protected Member Functions

INTEGRATOR & GetIntegrator ()
 

Detailed Description

template<typename INTEGRATOR, typename LINEARSOLVER, typename VECTOR>
class DOpE::InstatStepNewtonSolver< INTEGRATOR, LINEARSOLVER, VECTOR >

A nonlinear solver class to compute solutions to time dependent PDE- and optimization problems with One-Step theta schemes. This class differ from the FractionalStepThetaStepNewtonSolver since the time interval is not split up.

Template Parameters
<INTEGRATOR>Integration routines to compute domain-, face-, and right-hand side values.
<LINEARSOLVER>A linear solver to solve the linear subproblems.
<VECTOR>A template class for arbitrary vectors which are given to the FS scheme and where the solution is stored in.

Constructor & Destructor Documentation

template<typename INTEGRATOR , typename LINEARSOLVER , typename VECTOR >
DOpE::InstatStepNewtonSolver< INTEGRATOR, LINEARSOLVER, VECTOR >::InstatStepNewtonSolver ( INTEGRATOR &  integrator,
ParameterReader param_reader 
)

Constructor of this class. Initialization of parameters which are used during computation. E.g., maximal number of newton iterations, global tolerance of the nonlinear solver etc.

Parameters
integratorA reference of the integrator is given to the nonlinear solver.
param_readerAn object which has run time data for the nonlinear solver.
template<typename INTEGRATOR , typename LINEARSOLVER , typename VECTOR >
DOpE::InstatStepNewtonSolver< INTEGRATOR, LINEARSOLVER, VECTOR >::~InstatStepNewtonSolver ( )

Member Function Documentation

template<typename INTEGRATOR , typename LINEARSOLVER , typename VECTOR >
void DOpE::InstatStepNewtonSolver< INTEGRATOR, LINEARSOLVER, VECTOR >::declare_params ( ParameterReader param_reader)
static
template<typename INTEGRATOR , typename LINEARSOLVER , typename VECTOR >
INTEGRATOR & DOpE::InstatStepNewtonSolver< INTEGRATOR, LINEARSOLVER, VECTOR >::GetIntegrator ( )
inlineprotected
template<typename INTEGRATOR , typename LINEARSOLVER , typename VECTOR >
template<typename PROBLEM >
void DOpE::InstatStepNewtonSolver< INTEGRATOR, LINEARSOLVER, VECTOR >::NonlinearLastTimeEvals ( PROBLEM &  pde,
const VECTOR &  last_time_solution,
VECTOR &  residual 
)

Evaluates the timestep Problem at the previous time-point, this is part of the rhs for the Solution

Template Parameters
<PROBLEM>The description of the problem we want to solve.
Parameters
pdeThe problem
last_time_solutionA Vector stores the solution from the previous timestep
residualA Vector that will store the results upon completion
template<typename INTEGRATOR , typename LINEARSOLVER , typename VECTOR >
template<typename PROBLEM >
bool DOpE::InstatStepNewtonSolver< INTEGRATOR, LINEARSOLVER, VECTOR >::NonlinearSolve ( PROBLEM &  pde,
const VECTOR &  last_time_solution,
VECTOR &  solution,
bool  apply_boundary_values = true,
bool  force_matrix_build = false,
int  priority = 5,
std::string  algo_level = "\t\t " 
)

Solves the nonlinear PDE coming from a One-Step theta time-discretization described by the PROBLEM using a Newton-Method

Template Parameters
<PROBLEM>The description of the problem we want to solve.
Parameters
pdeThe problem
last_time_solutionA Vector stores the solution from the previous timestep It is also the starting value of this iteration
solutionA Vector that will store the solution upon completion It is expected that solution is initially set to the return value of residual in NonlinearLastTimeEvals!
apply_boundary_valuesA boolean that decides whether we apply strong dirichlet boundary values to the Vector solution or not. If true (default) the Values will be applied However if it is set to false, solution will be used unchanged as initial condition. Be aware of the fact that NewtonsMethod can only converge in this case if the initial Value of solution has the correct boundary values.
force_build_matrixA boolean value, that indicates whether the Matrix should be build by the linear solver in the first iteration. The default is false, meaning that if we have no idea we don't want to build a matrix.
priorityA number that defines the offset for the priority of the output
algo_levelA prefix string to adjust indentation of the output.
Returns
a boolean, that indicates whether it should be required to build the matrix next time that this method is used, e.g. the value for force_build_matrix of the next call.
template<typename INTEGRATOR , typename LINEARSOLVER , typename VECTOR >
template<typename PROBLEM >
bool DOpE::InstatStepNewtonSolver< INTEGRATOR, LINEARSOLVER, VECTOR >::NonlinearSolve_Initial ( PROBLEM &  pde,
VECTOR &  solution,
bool  apply_boundary_values = true,
bool  force_matrix_build = false,
int  priority = 5,
std::string  algo_level = "\t\t " 
)

Solves the nonlinear PDE to determine the initial value for the PROBLEM, i.e., there is no time dependence in this problem! using a Newton-Method

Template Parameters
<PROBLEM>The description of the problem we want to solve.
Parameters
pdeThe problem
solutionA Vector that will store the solution upon completion It is expected that solution is initially set to the return value of residual in NonlinearLastTimeEvals!
apply_boundary_valuesA boolean that decides whether we apply strong dirichlet boundary values to the Vector solution or not. If true (default) the Values will be applied However if it is set to false, solution will be used unchanged as initial condition. Be aware of the fact that NewtonsMethod can only converge in this case if the initial Value of solution has the correct boundary values.
force_build_matrixA boolean value, that indicates whether the Matrix should be build by the linear solver in the first iteration. The default is false, meaning that if we have no idea we don't want to build a matrix.
priorityA number that defines the offset for the priority of the output
algo_levelA prefix string to adjust indentation of the output.
Returns
a boolean, that indicates whether it should be required to build the matrix next time that this method is used, e.g. the value for force_build_matrix of the next call.
template<typename INTEGRATOR , typename LINEARSOLVER , typename VECTOR >
template<typename PROBLEM >
void DOpE::InstatStepNewtonSolver< INTEGRATOR, LINEARSOLVER, VECTOR >::ReInit ( PROBLEM &  pde)

This Function should be called once after grid refinement, or changes in boundary values to recompute sparsity patterns, and constraint matrices.


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