Matrix Free Solver 1.0.0
A matrix free solver for the Advection Diffusion Reaction problem implemented with deal.II
Loading...
Searching...
No Matches
DTR_mf::DTRProblem< dim, degree_finite_element > Class Template Reference

The DTRProblem class represents the DTR problem and provides methods to solve it. More...

#include <DTR_mf.hpp>

Public Member Functions

 DTRProblem (bool verbose=true)
 Constructor for the DTRProblem class.
 
 DTRProblem (std::ofstream &dimension_time_file, bool verbose=true)
 Constructor for the DTRProblem class with a dimension-time file output stream.
 
void run (unsigned int n_initial_refinements=3, unsigned int n_cycles=9)
 Compute the solution of the DTR problem.
 
double compute_error (const VectorTools::NormType &norm_type) const
 Compute the error of the solution using the given norm type.
 
unsigned int get_cells () const
 Get the number of global active cells in the triangulation.
 
unsigned int get_dofs () const
 Get the number of degrees of freedom.
 
unsigned int get_fe_degree () const
 Get the degree of the finite element.
 
 DTRProblem (bool verbose=true)
 
 DTRProblem (std::ofstream &dimension_time_file, bool verbose=true)
 
void run (unsigned int n_initial_refinements=3, unsigned int n_cycles=9)
 Compute the solution of the ADR problem. It executes the setup, rhs assembly, solve, and output_results steps for the solution of the problem for a given number of times. The given number of initial refinements determines the number of cells in the mesh at the first solution as initial number of cells = dim^(initial_refinements-dim). The number of executed cycles is n_cycles - dim.
 
double compute_error (const VectorTools::NormType &norm_type) const
 
unsigned int get_cells () const
 
unsigned int get_dofs () const
 
unsigned int get_fe_degree () const
 

Detailed Description

template<int dim, int degree_finite_element = 2>
class DTR_mf::DTRProblem< dim, degree_finite_element >

The DTRProblem class represents the DTR problem and provides methods to solve it.

This class encapsulates the setup, assembly, solution, and output of the DTR problem.

Template Parameters
dimThe dimension of the problem.
degree_finite_elementThe degree of the finite element used (default is 2).

Constructor & Destructor Documentation

◆ DTRProblem() [1/4]

template<int dim, int degree_finite_element>
DTR_mf::DTRProblem< dim, degree_finite_element >::DTRProblem ( bool verbose = true)

Constructor for the DTRProblem class.

Parameters
verboseA flag indicating whether to print verbose output (default is true).

◆ DTRProblem() [2/4]

template<int dim, int degree_finite_element>
DTR_mf::DTRProblem< dim, degree_finite_element >::DTRProblem ( std::ofstream & dimension_time_file,
bool verbose = true )

Constructor for the DTRProblem class with a dimension-time file output stream.

Parameters
dimension_time_fileAn output stream for writing dimension and time information.
verboseA flag indicating whether to print verbose output (default is true).

◆ DTRProblem() [3/4]

template<int dim, int degree_finite_element = 2>
DTR_mf::DTRProblem< dim, degree_finite_element >::DTRProblem ( bool verbose = true)

◆ DTRProblem() [4/4]

template<int dim, int degree_finite_element = 2>
DTR_mf::DTRProblem< dim, degree_finite_element >::DTRProblem ( std::ofstream & dimension_time_file,
bool verbose = true )

Member Function Documentation

◆ compute_error() [1/2]

template<int dim, int degree_finite_element>
double DTR_mf::DTRProblem< dim, degree_finite_element >::compute_error ( const VectorTools::NormType & norm_type) const

Compute the error of the solution using the given norm type.

Parameters
norm_typeThe norm type to use for computing the error.
Returns
The computed error.

◆ compute_error() [2/2]

template<int dim, int degree_finite_element = 2>
double DTR_mf::DTRProblem< dim, degree_finite_element >::compute_error ( const VectorTools::NormType & norm_type) const

◆ get_cells() [1/2]

template<int dim, int degree_finite_element = 2>
unsigned int DTR_mf::DTRProblem< dim, degree_finite_element >::get_cells ( ) const
inline

Get the number of global active cells in the triangulation.

Returns
The number of global active cells.

◆ get_cells() [2/2]

template<int dim, int degree_finite_element = 2>
unsigned int DTR_mf::DTRProblem< dim, degree_finite_element >::get_cells ( ) const
inline

◆ get_dofs() [1/2]

template<int dim, int degree_finite_element = 2>
unsigned int DTR_mf::DTRProblem< dim, degree_finite_element >::get_dofs ( ) const
inline

Get the number of degrees of freedom.

Returns
The number of degrees of freedom.

◆ get_dofs() [2/2]

template<int dim, int degree_finite_element = 2>
unsigned int DTR_mf::DTRProblem< dim, degree_finite_element >::get_dofs ( ) const
inline

◆ get_fe_degree() [1/2]

template<int dim, int degree_finite_element = 2>
unsigned int DTR_mf::DTRProblem< dim, degree_finite_element >::get_fe_degree ( ) const
inline

Get the degree of the finite element.

Returns
The degree of the finite element.

◆ get_fe_degree() [2/2]

template<int dim, int degree_finite_element = 2>
unsigned int DTR_mf::DTRProblem< dim, degree_finite_element >::get_fe_degree ( ) const
inline

◆ run() [1/2]

template<int dim, int degree_finite_element>
void DTR_mf::DTRProblem< dim, degree_finite_element >::run ( unsigned int n_initial_refinements = 3,
unsigned int n_cycles = 9 )

Compute the solution of the DTR problem.

This method executes the setup, right-hand side assembly, solution, and output steps for the DTR problem for a given number of times. The number of initial refinements determines the number of cells in the mesh at the first solution, and the number of executed cycles determines the number of additional refinements performed.

Parameters
n_initial_refinementsThe number of initial refinements to perform on the mesh.
n_cyclesThe number of solutions to compute by adding a refinement at each iteration.

◆ run() [2/2]

template<int dim, int degree_finite_element = 2>
void DTR_mf::DTRProblem< dim, degree_finite_element >::run ( unsigned int n_initial_refinements = 3,
unsigned int n_cycles = 9 )

Compute the solution of the ADR problem. It executes the setup, rhs assembly, solve, and output_results steps for the solution of the problem for a given number of times. The given number of initial refinements determines the number of cells in the mesh at the first solution as initial number of cells = dim^(initial_refinements-dim). The number of executed cycles is n_cycles - dim.

Parameters
n_initial_refinementsthe number of initial refinements to perform on the mesh.
n_cyclesthe number of solutions to compute adding a refinement at each iteration.

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