ASPECT
interface.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2013 - 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_adiabatic_conditions_interface_h
23 #define _aspect_adiabatic_conditions_interface_h
24 
25 #include <aspect/plugins.h>
28 #include <deal.II/base/parameter_handler.h>
29 #include <deal.II/distributed/tria.h>
30 
31 
32 namespace aspect
33 {
40  namespace AdiabaticConditions
41  {
42  using namespace dealii;
43 
54  template <int dim>
55  class Interface: public SimulatorAccess<dim>, public Plugins::InterfaceBase
56  {
57  public:
65  virtual
66  bool
67  is_initialized () const = 0;
68 
72  virtual
73  double temperature (const Point<dim> &p) const = 0;
74 
78  virtual
79  double pressure (const Point<dim> &p) const = 0;
80 
84  virtual
85  double density (const Point<dim> &p) const = 0;
86 
91  virtual
92  double density_derivative (const Point<dim> &p) const = 0;
93 
105  DEAL_II_DEPRECATED
106  virtual
107  void get_adiabatic_temperature_profile(std::vector<double> &values) const;
108 
115  DEAL_II_DEPRECATED
116  virtual
117  void get_adiabatic_pressure_profile(std::vector<double> &values) const;
118 
125  DEAL_II_DEPRECATED
126  virtual
127  void get_adiabatic_density_profile(std::vector<double> &values) const;
128 
135  DEAL_II_DEPRECATED
136  virtual
137  void get_adiabatic_density_derivative_profile(std::vector<double> &values) const;
138  };
139 
140 
156  template <int dim>
157  void
158  register_adiabatic_conditions (const std::string &name,
159  const std::string &description,
160  void (*declare_parameters_function) (ParameterHandler &),
161  std::unique_ptr<Interface<dim>> (*factory_function) ());
162 
173  template <int dim>
174  std::unique_ptr<Interface<dim>>
175  create_adiabatic_conditions (ParameterHandler &prm);
176 
177 
184  template <int dim>
185  void
186  declare_parameters (ParameterHandler &prm);
187 
188 
198  template <int dim>
199  void
200  write_plugin_graph (std::ostream &output_stream);
201 
202 
210 #define ASPECT_REGISTER_ADIABATIC_CONDITIONS_MODEL(classname, name, description) \
211  template class classname<2>; \
212  template class classname<3>; \
213  namespace ASPECT_REGISTER_ADIABATIC_CONDITIONS_MODEL_ ## classname \
214  { \
215  aspect::internal::Plugins::RegisterHelper<aspect::AdiabaticConditions::Interface<2>,classname<2>> \
216  dummy_ ## classname ## _2d (&aspect::AdiabaticConditions::register_adiabatic_conditions<2>, \
217  name, description); \
218  aspect::internal::Plugins::RegisterHelper<aspect::AdiabaticConditions::Interface<3>,classname<3>> \
219  dummy_ ## classname ## _3d (&aspect::AdiabaticConditions::register_adiabatic_conditions<3>, \
220  name, description); \
221  }
222  }
223 }
224 
225 
226 #endif
void write_plugin_graph(std::ostream &output_stream)
void register_adiabatic_conditions(const std::string &name, const std::string &description, void(*declare_parameters_function)(ParameterHandler &), std::unique_ptr< Interface< dim >>(*factory_function)())
std::unique_ptr< Interface< dim > > create_adiabatic_conditions(ParameterHandler &prm)
void declare_parameters(ParameterHandler &prm)
Definition: compat.h:59
Definition: compat.h:42