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  {
43  template <int dim>
44  class Interface : public Plugins::InterfaceBase
45  {
46  public:
73  virtual
74  std::vector<Tensor<1,dim>>
75  heat_flux (const types::boundary_id boundary_indicator,
76  const MaterialModel::MaterialModelInputs<dim> &material_model_inputs,
77  const MaterialModel::MaterialModelOutputs<dim> &material_model_outputs,
78  const std::vector<Tensor<1,dim>> &normal_vectors) const = 0;
79  };
80 
81 
97  template <int dim>
98  void
99  register_boundary_heat_flux (const std::string &name,
100  const std::string &description,
101  void (*declare_parameters_function) (ParameterHandler &),
102  std::unique_ptr<Interface<dim>> (*factory_function) ());
103 
114  template <int dim>
115  std::unique_ptr<Interface<dim>>
116  create_boundary_heat_flux (ParameterHandler &prm);
117 
118 
125  template <int dim>
126  void
127  declare_parameters (ParameterHandler &prm);
128 
129 
139  template <int dim>
140  void
141  write_plugin_graph (std::ostream &output_stream);
142 
143 
151 #define ASPECT_REGISTER_BOUNDARY_HEAT_FLUX_MODEL(classname, name, description) \
152  template class classname<2>; \
153  template class classname<3>; \
154  namespace ASPECT_REGISTER_BOUNDARY_HEAT_FLUX_MODEL_ ## classname \
155  { \
156  aspect::internal::Plugins::RegisterHelper<aspect::BoundaryHeatFlux::Interface<2>,classname<2>> \
157  dummy_ ## classname ## _2d (&aspect::BoundaryHeatFlux::register_boundary_heat_flux<2>, \
158  name, description); \
159  aspect::internal::Plugins::RegisterHelper<aspect::BoundaryHeatFlux::Interface<3>,classname<3>> \
160  dummy_ ## classname ## _3d (&aspect::BoundaryHeatFlux::register_boundary_heat_flux<3>, \
161  name, description); \
162  }
163  }
164 }
165 
166 
167 #endif
Definition: compat.h:59
virtual std::vector< Tensor< 1, dim > > heat_flux(const types::boundary_id boundary_indicator, const MaterialModel::MaterialModelInputs< dim > &material_model_inputs, const MaterialModel::MaterialModelOutputs< dim > &material_model_outputs, const std::vector< Tensor< 1, dim >> &normal_vectors) const =0
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)
static void declare_parameters(ParameterHandler &prm)