ASPECT
interface.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2015 - 2024 by the authors of the ASPECT code.
3 
4  This file is part of ASPECT.
5 
6  ASPECT is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2, or (at your option)
9  any later version.
10 
11  ASPECT is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with ASPECT; see the file LICENSE. If not see
18  <http://www.gnu.org/licenses/>.
19 */
20 
21 
22 #ifndef _aspect_boundary_heat_flux_interface_h
23 #define _aspect_boundary_heat_flux_interface_h
24 
25 #include <aspect/plugins.h>
27 
28 namespace aspect
29 {
36  namespace BoundaryHeatFlux
37  {
38  using namespace dealii;
39 
45  template <int dim>
46  class Interface : public Plugins::InterfaceBase
47  {
48  public:
75  virtual
76  std::vector<Tensor<1,dim>>
77  heat_flux (const types::boundary_id boundary_indicator,
78  const MaterialModel::MaterialModelInputs<dim> &material_model_inputs,
79  const MaterialModel::MaterialModelOutputs<dim> &material_model_outputs,
80  const std::vector<Tensor<1,dim>> &normal_vectors) const = 0;
81  };
82 
83 
99  template <int dim>
100  void
101  register_boundary_heat_flux (const std::string &name,
102  const std::string &description,
103  void (*declare_parameters_function) (ParameterHandler &),
104  std::unique_ptr<Interface<dim>> (*factory_function) ());
105 
116  template <int dim>
117  std::unique_ptr<Interface<dim>>
118  create_boundary_heat_flux (ParameterHandler &prm);
119 
120 
127  template <int dim>
128  void
129  declare_parameters (ParameterHandler &prm);
130 
131 
141  template <int dim>
142  void
143  write_plugin_graph (std::ostream &output_stream);
144 
145 
153 #define ASPECT_REGISTER_BOUNDARY_HEAT_FLUX_MODEL(classname, name, description) \
154  template class classname<2>; \
155  template class classname<3>; \
156  namespace ASPECT_REGISTER_BOUNDARY_HEAT_FLUX_MODEL_ ## classname \
157  { \
158  aspect::internal::Plugins::RegisterHelper<aspect::BoundaryHeatFlux::Interface<2>,classname<2>> \
159  dummy_ ## classname ## _2d (&aspect::BoundaryHeatFlux::register_boundary_heat_flux<2>, \
160  name, description); \
161  aspect::internal::Plugins::RegisterHelper<aspect::BoundaryHeatFlux::Interface<3>,classname<3>> \
162  dummy_ ## classname ## _3d (&aspect::BoundaryHeatFlux::register_boundary_heat_flux<3>, \
163  name, description); \
164  }
165  }
166 }
167 
168 
169 #endif
Definition: compat.h:59
void register_boundary_heat_flux(const std::string &name, const std::string &description, void(*declare_parameters_function)(ParameterHandler &), std::unique_ptr< Interface< dim >>(*factory_function)())
void write_plugin_graph(std::ostream &output_stream)
std::unique_ptr< Interface< dim > > create_boundary_heat_flux(ParameterHandler &prm)
Definition: compat.h:42
void declare_parameters(ParameterHandler &prm)