Public Member Functions | |
DoFPrintSolverStep (SolverControl &control, VectorMemory< VECTOR > &mem, DataOut< dim > &data_out, const std::string &basename) | |
virtual void | print_vectors (const unsigned int step, const VECTOR &x, const VECTOR &r, const VECTOR &d) const |
Private Attributes | |
DataOut< dim > & | out |
const std::string | basename |
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!
DoFPrintSolverStep< dim, SOLVER, VECTOR >::DoFPrintSolverStep | ( | SolverControl & | control, | |
VectorMemory< VECTOR > & | mem, | |||
DataOut< dim > & | data_out, | |||
const std::string & | basename | |||
) | [inline] |
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.
void DoFPrintSolverStep< dim, SOLVER, VECTOR >::print_vectors | ( | const unsigned int | step, | |
const VECTOR & | x, | |||
const VECTOR & | r, | |||
const VECTOR & | d | |||
) | const [inline, virtual] |
Call-back function for the iterative method.
References DataOut_DoFData< DH, patch_dim, patch_space_dim >::add_data_vector(), DoFPrintSolverStep< dim, SOLVER, VECTOR >::basename, DataOut< dim, DH >::build_patches(), DataOut_DoFData< DH, patch_dim, patch_space_dim >::clear_data_vectors(), deallog, DataOutInterface< dim, spacedim >::default_suffix(), DoFPrintSolverStep< dim, SOLVER, VECTOR >::out, and DataOutInterface< dim, spacedim >::write().
DataOut<dim>& DoFPrintSolverStep< dim, SOLVER, VECTOR >::out [private] |
Output object.
Referenced by DoFPrintSolverStep< dim, SOLVER, VECTOR >::print_vectors().
const std::string DoFPrintSolverStep< dim, SOLVER, VECTOR >::basename [private] |
Base of filenames.
Referenced by DoFPrintSolverStep< dim, SOLVER, VECTOR >::print_vectors().