Reference documentation for deal.II version 9.5.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
DoFPrintSolverStep< dim, SolverType, VectorType > Class Template Reference

#include <deal.II/numerics/dof_print_solver_step.h>

Inheritance diagram for DoFPrintSolverStep< dim, SolverType, VectorType >:
[legend]

Public Member Functions

 DoFPrintSolverStep (SolverControl &control, VectorMemory< VectorType > &mem, DataOut< dim > &data_out, const std::string &basename)
 
virtual void print_vectors (const unsigned int step, const VectorType &x, const VectorType &r, const VectorType &d) const
 

Private Attributes

DataOut< dim > & out
 
const std::string basename
 

Detailed Description

template<int dim, typename SolverType, class VectorType = Vector<double>>
class DoFPrintSolverStep< dim, SolverType, VectorType >

Print intermediate solutions in solvers. This is derived from a solver class provided as template argument. It implements the print_vector function of the solver using a DoFHandler. This way, the intermediate vectors can be viewed as finite element functions. This class might be used first to understand how solvers work (for example to visualize the smoothing properties of various solvers, e.g. in a multigrid context), and second to investigate why and how a solver fails to solve certain classes of problems.

Objects of this class are provided with a solver class through a template argument, and with a file name (as a string), with which a new file is constructed in each iteration (named basename.[step].[suffix]) and into which the solution is written as a finite element field using the DataOut class. Please note that this class may produce enormous amounts of data!

Definition at line 55 of file dof_print_solver_step.h.

Constructor & Destructor Documentation

◆ DoFPrintSolverStep()

template<int dim, typename SolverType , class VectorType >
DoFPrintSolverStep< dim, SolverType, VectorType >::DoFPrintSolverStep ( SolverControl control,
VectorMemory< VectorType > &  mem,
DataOut< dim > &  data_out,
const std::string &  basename 
)

Constructor. First, we take the arguments needed for the solver. data_out is the object doing the output as a finite element function.

One output file with the name basename.[step].[suffix] will be produced for each iteration step.

Definition at line 95 of file dof_print_solver_step.h.

Member Function Documentation

◆ print_vectors()

template<int dim, typename SolverType , class VectorType >
void DoFPrintSolverStep< dim, SolverType, VectorType >::print_vectors ( const unsigned int  step,
const VectorType &  x,
const VectorType &  r,
const VectorType &  d 
) const
virtual

Call-back function for the iterative method.

Definition at line 108 of file dof_print_solver_step.h.

Member Data Documentation

◆ out

template<int dim, typename SolverType , class VectorType = Vector<double>>
DataOut<dim>& DoFPrintSolverStep< dim, SolverType, VectorType >::out
private

Output object.

Definition at line 83 of file dof_print_solver_step.h.

◆ basename

template<int dim, typename SolverType , class VectorType = Vector<double>>
const std::string DoFPrintSolverStep< dim, SolverType, VectorType >::basename
private

Base of filenames.

Definition at line 88 of file dof_print_solver_step.h.


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