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 
17 #ifndef _aspect_prescribed_stokes_solution_interface_h
18 #define _aspect_prescribed_stokes_solution_interface_h
19 
20 #include <aspect/plugins.h>
21 
22 #include <deal.II/base/point.h>
24 
25 #include <deal.II/base/function.h>
26 
27 namespace aspect
28 {
35  namespace PrescribedStokesSolution
36  {
47  template <int dim>
49  {
50  public:
57  virtual
58  void stokes_solution (const Point<dim> &p, Vector<double> &value) const = 0;
59  };
60 
61 
62 
63 
80  template <int dim>
81  void
82  register_prescribed_stokes_solution_model (const std::string &name,
83  const std::string &description,
84  void (*declare_parameters_function) (ParameterHandler &),
85  std::unique_ptr<Interface<dim>> (*factory_function) ());
86 
97  template <int dim>
98  std::unique_ptr<Interface<dim>>
100 
101 
108  template <int dim>
109  void
111 
112 
122  template <int dim>
123  void
124  write_plugin_graph (std::ostream &output_stream);
125 
126 
127 
135 #define ASPECT_REGISTER_PRESCRIBED_STOKES_SOLUTION(classname,name,description) \
136  template class classname<2>; \
137  template class classname<3>; \
138  namespace ASPECT_REGISTER_PRESCRIBED_STOKES_SOLUTION_ ## classname \
139  { \
140  aspect::internal::Plugins::RegisterHelper<aspect::PrescribedStokesSolution::Interface<2>,classname<2>> \
141  dummy_ ## classname ## _2d (&aspect::PrescribedStokesSolution::register_prescribed_stokes_solution_model<2>, \
142  name, description); \
143  aspect::internal::Plugins::RegisterHelper<aspect::PrescribedStokesSolution::Interface<3>,classname<3>> \
144  dummy_ ## classname ## _3d (&aspect::PrescribedStokesSolution::register_prescribed_stokes_solution_model<3>, \
145  name, description); \
146  }
147  }
148 }
149 
150 
151 #endif
void register_prescribed_stokes_solution_model(const std::string &name, const std::string &description, void(*declare_parameters_function)(ParameterHandler &), std::unique_ptr< Interface< dim >>(*factory_function)())
virtual void stokes_solution(const Point< dim > &p, Vector< double > &value) const =0
std::unique_ptr< Interface< dim > > create_prescribed_stokes_solution(ParameterHandler &prm)
void write_plugin_graph(std::ostream &output_stream)
static void declare_parameters(ParameterHandler &prm)