HyperHDG
template.hxx
Go to the documentation of this file.
1 #pragma once // Ensure that file is included only once in a single compilation.
2 
3 #include <HyperHDG/hypercube.hxx>
4 
5 namespace LocalSolver
6 {
7 /*!*************************************************************************************************
8  * \brief Implementation the interface of local solvers needed by enclosing objects in minimal way.
9  *
10  * The class serves as a template for the implementation of local solvers. It also serves as a
11  * minimal input to other classes using local solvers.The local solver uses no degrees of freedom on
12  * the nodes and also produces no output.
13  **************************************************************************************************/
14 template <int hyEdge_dimT, typename lSol_float_t>
15 class Template
16 {
17  public:
18  /*!***********************************************************************************************
19  * \brief Define type of (hyperedge related) data that is stored in HyDataContainer.
20  ************************************************************************************************/
21  struct data_type
22  {
23  };
24  /*!***********************************************************************************************
25  * \brief Define type of node elements, especially with respect to nodal shape functions.
26  ************************************************************************************************/
27  struct node_element
28  {
29  };
30  /*!***********************************************************************************************
31  * \brief Return template parameter \c hyEdge_dimT.
32  *
33  * \retval hyEdge_dimT Dimension of hypergraph's hyperedges.
34  ************************************************************************************************/
35  static constexpr unsigned int hyEdge_dim() { return hyEdge_dimT; }
36  /*!***********************************************************************************************
37  * \brief Number of degrees of freedom per hypernode.
38  *
39  * \note \c n_dofs_per_nodeT of HyperNodeFactory must be equal to this number.
40  ************************************************************************************************/
41  static constexpr unsigned int n_glob_dofs_per_node() { return 0U; }
42  /*!***********************************************************************************************
43  * \brief The dimension of the local system of partial differential equations
44  ************************************************************************************************/
45  static constexpr unsigned int system_dimension() { return 0U; }
46  /*!***********************************************************************************************
47  * \brief The dimension of the function represented by skeletal unknowns.
48  ************************************************************************************************/
49  static constexpr unsigned int node_system_dimension() { return 0U; }
50  /*!***********************************************************************************************
51  * \brief The local solver as needed by the HDG method
52  ************************************************************************************************/
53  template <typename SmallMatInT, typename SmallMatOutT>
54  SmallMatOutT& trace_to_flux(const SmallMatInT&, SmallMatOutT&) const
55  {
56  return SmallMatOutT();
57  }
58  /*!***********************************************************************************************
59  * \brief The values of the local solution in quadrature points of the cell.
60  *
61  * \retval An array of array with outer size system_dimension() and inner size number of
62  * quadrature points, containing for each component of the solution the values in each
63  * quadrature point.
64  ************************************************************************************************/
65  template <typename AbscissaType, std::size_t AbscissaSize, class InputArrayType>
66  std::array<std::array<lSol_float_t, Hypercube<hyEdge_dimT>::pow(AbscissaSize)>,
68  bulk_values(const std::array<AbscissaType, AbscissaSize>&,
69  const InputArrayType&,
70  const lSol_float_t = 0.) const
71  {
72  return std::array<std::array<lSol_float_t, Hypercube<hyEdge_dimT>::pow(AbscissaSize)>,
73  system_dimension()>();
74  }
75 }; // end of class Template
76 
77 } // end of namespace LocalSolver
LocalSolver::Template::node_system_dimension
static constexpr unsigned int node_system_dimension()
The dimension of the function represented by skeletal unknowns.
Definition: template.hxx:49
LocalSolver::Template::bulk_values
std::array< std::array< lSol_float_t, Hypercube< hyEdge_dimT >::pow(AbscissaSize)>, system_dimension()> bulk_values(const std::array< AbscissaType, AbscissaSize > &, const InputArrayType &, const lSol_float_t=0.) const
The values of the local solution in quadrature points of the cell.
Definition: template.hxx:68
LocalSolver::Template::n_glob_dofs_per_node
static constexpr unsigned int n_glob_dofs_per_node()
Number of degrees of freedom per hypernode.
Definition: template.hxx:41
LocalSolver
A namespace for local solvers.
Definition: advection_parab_ldgh.hxx:11
LocalSolver::Template::trace_to_flux
SmallMatOutT & trace_to_flux(const SmallMatInT &, SmallMatOutT &) const
The local solver as needed by the HDG method.
Definition: template.hxx:54
LocalSolver::Template::hyEdge_dim
static constexpr unsigned int hyEdge_dim()
Return template parameter hyEdge_dimT.
Definition: template.hxx:35
LocalSolver::Template::node_element
Define type of node elements, especially with respect to nodal shape functions.
Definition: template.hxx:27
LocalSolver::Template::system_dimension
static constexpr unsigned int system_dimension()
The dimension of the local system of partial differential equations.
Definition: template.hxx:45
LocalSolver::Template
Implementation the interface of local solvers needed by enclosing objects in minimal way.
Definition: template.hxx:15
hypercube.hxx
LocalSolver::Template::data_type
Define type of (hyperedge related) data that is stored in HyDataContainer.
Definition: template.hxx:21