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) 2011-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_geometry_model_initial_topography_model_interface_h
17 #define _aspect_geometry_model_initial_topography_model_interface_h
18 
19 #include <aspect/plugins.h>
21 #include <deal.II/base/point.h>
22 
23 #include <set>
24 
25 
26 namespace aspect
27 {
36  namespace InitialTopographyModel
37  {
44  template <int dim>
45  class Interface : public Plugins::InterfaceBase
46  {
47  public:
58  virtual
59  double value (const Point<dim-1> &surface_point) const = 0;
60 
64  virtual
65  double max_topography () const = 0;
66  };
67 
68 
69 
85  template <int dim>
86  void
87  register_initial_topography_model (const std::string &name,
88  const std::string &description,
89  void (*declare_parameters_function) (ParameterHandler &),
90  std::unique_ptr<Interface<dim>> (*factory_function) ());
91 
102  template <int dim>
103  std::unique_ptr<Interface<dim>>
105 
106 
113  template <int dim>
114  void
116 
117 
127  template <int dim>
128  void
129  write_plugin_graph (std::ostream &output_stream);
130 
131 
139 #define ASPECT_REGISTER_INITIAL_TOPOGRAPHY_MODEL(classname,name,description) \
140  template class classname<2>; \
141  template class classname<3>; \
142  namespace ASPECT_REGISTER_INITIAL_TOPOGRAPHY_MODEL_ ## classname \
143  { \
144  aspect::internal::Plugins::RegisterHelper<aspect::InitialTopographyModel::Interface<2>,classname<2>> \
145  dummy_ ## classname ## _2d (&aspect::InitialTopographyModel::register_initial_topography_model<2>, \
146  name, description); \
147  aspect::internal::Plugins::RegisterHelper<aspect::InitialTopographyModel::Interface<3>,classname<3>> \
148  dummy_ ## classname ## _3d (&aspect::InitialTopographyModel::register_initial_topography_model<3>, \
149  name, description); \
150  }
151  }
152 }
153 
154 
155 #endif
void register_initial_topography_model(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_initial_topography_model(ParameterHandler &prm)
virtual double max_topography() const =0
virtual double value(const Point< dim-1 > &surface_point) const =0
void write_plugin_graph(std::ostream &output_stream)
static void declare_parameters(ParameterHandler &prm)