HybridADRSolver
Loading...
Searching...
No Matches
HybridADRSolver::ProblemInterface< dim > Class Template Referenceabstract

Abstract interface for defining a physical problem. More...

#include <problem_definition.h>

Inheritance diagram for HybridADRSolver::ProblemInterface< dim >:

Public Member Functions

virtual ~ProblemInterface ()=default
virtual double diffusion_coefficient (const Point< dim > &p) const =0
 Returns the diffusion coefficient \( \mu(\mathbf{x}) \).
virtual Tensor< 1, dim > advection_field (const Point< dim > &p) const =0
 Returns the advection velocity field \(\mathbf{\beta}(\mathbf{x}) \).
virtual double reaction_coefficient (const Point< dim > &p) const =0
 Returns the reaction coefficient \( \gamma(\mathbf{x}) \).
virtual double source_term (const Point< dim > &p) const =0
 Returns the source term \( f(\mathbf{x}) \).
virtual std::set< types::boundary_id > get_dirichlet_ids () const =0
 Returns the set of boundary IDs where Dirichlet conditions are applied.
virtual std::set< types::boundary_id > get_neumann_ids () const =0
 Returns the set of boundary IDs where Neumann conditions are applied.
virtual const Function< dim > & get_dirichlet_function (types::boundary_id id) const =0
 Gets the function describing the Dirichlet boundary value \(g_D(\mathbf{x}) \) for a specific boundary ID.
virtual const Function< dim > & get_neumann_function (types::boundary_id id) const =0
 Gets the function describing the Neumann flux \( g_N(\mathbf{x}) = \nabla u \cdot \mathbf{n} \) for a specific boundary ID.
virtual bool has_exact_solution () const =0
 Checks if an analytical exact solution is available.
virtual const Function< dim > & get_exact_solution () const =0
 Returns the exact solution function object (if available).
virtual bool is_symmetric () const =0
 Checks if the problem system matrix is symmetric.
virtual std::string get_name () const =0
 Returns a descriptive name of the problem.

Detailed Description

template<int dim>
class HybridADRSolver::ProblemInterface< dim >

Abstract interface for defining a physical problem.

This class defines the necessary interfaces for coefficients (diffusion, advection, reaction), source terms, boundary conditions, and exact solutions. The solver relies solely on this interface, allowing for dependency inversion.

Template Parameters
dimSpatial dimension of the problem.

Constructor & Destructor Documentation

◆ ~ProblemInterface()

template<int dim>
virtual HybridADRSolver::ProblemInterface< dim >::~ProblemInterface ( )
virtualdefault

Member Function Documentation

◆ advection_field()

template<int dim>
virtual Tensor< 1, dim > HybridADRSolver::ProblemInterface< dim >::advection_field ( const Point< dim > & p) const
pure virtual

Returns the advection velocity field \(\mathbf{\beta}(\mathbf{x}) \).

Implemented in HybridADRSolver::Problems::ADRProblem< dim >.

◆ diffusion_coefficient()

template<int dim>
virtual double HybridADRSolver::ProblemInterface< dim >::diffusion_coefficient ( const Point< dim > & p) const
pure virtual

Returns the diffusion coefficient \( \mu(\mathbf{x}) \).

Implemented in HybridADRSolver::Problems::ADRProblem< dim >.

◆ get_dirichlet_function()

template<int dim>
virtual const Function< dim > & HybridADRSolver::ProblemInterface< dim >::get_dirichlet_function ( types::boundary_id id) const
pure virtual

Gets the function describing the Dirichlet boundary value \(g_D(\mathbf{x}) \) for a specific boundary ID.

Implemented in HybridADRSolver::Problems::ADRProblem< dim >.

◆ get_dirichlet_ids()

template<int dim>
virtual std::set< types::boundary_id > HybridADRSolver::ProblemInterface< dim >::get_dirichlet_ids ( ) const
nodiscardpure virtual

Returns the set of boundary IDs where Dirichlet conditions are applied.

Implemented in HybridADRSolver::Problems::ADRProblem< dim >.

◆ get_exact_solution()

template<int dim>
virtual const Function< dim > & HybridADRSolver::ProblemInterface< dim >::get_exact_solution ( ) const
pure virtual

Returns the exact solution function object (if available).

Implemented in HybridADRSolver::Problems::ADRProblem< dim >.

◆ get_name()

template<int dim>
virtual std::string HybridADRSolver::ProblemInterface< dim >::get_name ( ) const
nodiscardpure virtual

Returns a descriptive name of the problem.

Implemented in HybridADRSolver::Problems::ADRProblem< dim >.

◆ get_neumann_function()

template<int dim>
virtual const Function< dim > & HybridADRSolver::ProblemInterface< dim >::get_neumann_function ( types::boundary_id id) const
pure virtual

Gets the function describing the Neumann flux \( g_N(\mathbf{x}) = \nabla u \cdot \mathbf{n} \) for a specific boundary ID.

Implemented in HybridADRSolver::Problems::ADRProblem< dim >.

◆ get_neumann_ids()

template<int dim>
virtual std::set< types::boundary_id > HybridADRSolver::ProblemInterface< dim >::get_neumann_ids ( ) const
nodiscardpure virtual

Returns the set of boundary IDs where Neumann conditions are applied.

Implemented in HybridADRSolver::Problems::ADRProblem< dim >.

◆ has_exact_solution()

template<int dim>
virtual bool HybridADRSolver::ProblemInterface< dim >::has_exact_solution ( ) const
nodiscardpure virtual

Checks if an analytical exact solution is available.

Implemented in HybridADRSolver::Problems::ADRProblem< dim >.

◆ is_symmetric()

template<int dim>
virtual bool HybridADRSolver::ProblemInterface< dim >::is_symmetric ( ) const
nodiscardpure virtual

Checks if the problem system matrix is symmetric.

Returns
true if symmetric (e.g., pure diffusion), false otherwise (e.g., with advection).

Implemented in HybridADRSolver::Problems::ADRProblem< dim >.

◆ reaction_coefficient()

template<int dim>
virtual double HybridADRSolver::ProblemInterface< dim >::reaction_coefficient ( const Point< dim > & p) const
pure virtual

Returns the reaction coefficient \( \gamma(\mathbf{x}) \).

Implemented in HybridADRSolver::Problems::ADRProblem< dim >.

◆ source_term()

template<int dim>
virtual double HybridADRSolver::ProblemInterface< dim >::source_term ( const Point< dim > & p) const
pure virtual

Returns the source term \( f(\mathbf{x}) \).

Implemented in HybridADRSolver::Problems::ADRProblem< dim >.


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