ASPECT
interface.h
Go to the documentation of this file.
1 // ------------------------------------------------------
2 //
3 // SPDX-License-Identifier: GPL-2.0-or-later
4 //
5 // SPDX-FileCopyrightText: Copyright (C) 2015-2025 by the ASPECT authors.
6 //
7 // This file is part of ASPECT.
8 //
9 // Detailed license information governing the source code and
10 // contributions can be found in the folder LICENSES and in
11 // LICENSE and CONTRIBUTING.md at the top level directory.
12 //
13 // ------------------------------------------------------
14 
15 
16 #ifndef _aspect_boundary_heat_flux_interface_h
17 #define _aspect_boundary_heat_flux_interface_h
18 
19 #include <aspect/plugins.h>
21 
22 namespace aspect
23 {
30  namespace BoundaryHeatFlux
31  {
37  template <int dim>
38  class Interface : public Plugins::InterfaceBase
39  {
40  public:
67  virtual
68  std::vector<Tensor<1,dim>>
69  heat_flux (const types::boundary_id boundary_indicator,
70  const MaterialModel::MaterialModelInputs<dim> &material_model_inputs,
71  const MaterialModel::MaterialModelOutputs<dim> &material_model_outputs,
72  const std::vector<Tensor<1,dim>> &normal_vectors) const = 0;
73  };
74 
75 
91  template <int dim>
92  void
93  register_boundary_heat_flux (const std::string &name,
94  const std::string &description,
95  void (*declare_parameters_function) (ParameterHandler &),
96  std::unique_ptr<Interface<dim>> (*factory_function) ());
97 
108  template <int dim>
109  std::unique_ptr<Interface<dim>>
111 
112 
119  template <int dim>
120  void
122 
123 
133  template <int dim>
134  void
135  write_plugin_graph (std::ostream &output_stream);
136 
137 
145 #define ASPECT_REGISTER_BOUNDARY_HEAT_FLUX_MODEL(classname, name, description) \
146  template class classname<2>; \
147  template class classname<3>; \
148  namespace ASPECT_REGISTER_BOUNDARY_HEAT_FLUX_MODEL_ ## classname \
149  { \
150  aspect::internal::Plugins::RegisterHelper<aspect::BoundaryHeatFlux::Interface<2>,classname<2>> \
151  dummy_ ## classname ## _2d (&aspect::BoundaryHeatFlux::register_boundary_heat_flux<2>, \
152  name, description); \
153  aspect::internal::Plugins::RegisterHelper<aspect::BoundaryHeatFlux::Interface<3>,classname<3>> \
154  dummy_ ## classname ## _3d (&aspect::BoundaryHeatFlux::register_boundary_heat_flux<3>, \
155  name, description); \
156  }
157  }
158 }
159 
160 
161 #endif
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)
unsigned int boundary_id
static void declare_parameters(ParameterHandler &prm)