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_fluid_pressure_interface_h
23 #define _aspect_boundary_fluid_pressure_interface_h
24 
25 #include <aspect/plugins.h>
27 
28 namespace aspect
29 {
37  namespace BoundaryFluidPressure
38  {
39  using namespace dealii;
40 
46  template <int dim>
48  {
49  public:
70  virtual
71  void fluid_pressure_gradient (
72  const types::boundary_id boundary_indicator,
73  const MaterialModel::MaterialModelInputs<dim> &material_model_inputs,
74  const MaterialModel::MaterialModelOutputs<dim> &material_model_outputs,
75  const std::vector<Tensor<1,dim>> &normal_vectors,
76  std::vector<double> &fluid_pressure_gradient_outputs
77  ) const = 0;
78  };
79 
80 
96  template <int dim>
97  void
98  register_boundary_fluid_pressure (const std::string &name,
99  const std::string &description,
100  void (*declare_parameters_function) (ParameterHandler &),
101  std::unique_ptr<Interface<dim>> (*factory_function) ());
102 
113  template <int dim>
114  std::unique_ptr<Interface<dim>>
115  create_boundary_fluid_pressure (ParameterHandler &prm);
116 
117 
124  template <int dim>
125  void
126  declare_parameters (ParameterHandler &prm);
127 
128 
138  template <int dim>
139  void
140  write_plugin_graph (std::ostream &output_stream);
141 
142 
150 #define ASPECT_REGISTER_BOUNDARY_FLUID_PRESSURE_MODEL(classname, name, description) \
151  template class classname<2>; \
152  template class classname<3>; \
153  namespace ASPECT_REGISTER_BOUNDARY_FLUID_PRESSURE_MODEL_ ## classname \
154  { \
155  aspect::internal::Plugins::RegisterHelper<aspect::BoundaryFluidPressure::Interface<2>,classname<2>> \
156  dummy_ ## classname ## _2d (&aspect::BoundaryFluidPressure::register_boundary_fluid_pressure<2>, \
157  name, description); \
158  aspect::internal::Plugins::RegisterHelper<aspect::BoundaryFluidPressure::Interface<3>,classname<3>> \
159  dummy_ ## classname ## _3d (&aspect::BoundaryFluidPressure::register_boundary_fluid_pressure<3>, \
160  name, description); \
161  }
162  }
163 }
164 
165 
166 #endif
std::unique_ptr< Interface< dim > > create_boundary_fluid_pressure(ParameterHandler &prm)
Definition: compat.h:59
void register_boundary_fluid_pressure(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)
void declare_parameters(ParameterHandler &prm)
Definition: compat.h:42