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  {
44  template <int dim>
46  {
47  public:
68  virtual
70  const types::boundary_id boundary_indicator,
71  const MaterialModel::MaterialModelInputs<dim> &material_model_inputs,
72  const MaterialModel::MaterialModelOutputs<dim> &material_model_outputs,
73  const std::vector<Tensor<1,dim>> &normal_vectors,
74  std::vector<double> &fluid_pressure_gradient_outputs
75  ) const = 0;
76  };
77 
78 
94  template <int dim>
95  void
96  register_boundary_fluid_pressure (const std::string &name,
97  const std::string &description,
98  void (*declare_parameters_function) (ParameterHandler &),
99  std::unique_ptr<Interface<dim>> (*factory_function) ());
100 
111  template <int dim>
112  std::unique_ptr<Interface<dim>>
113  create_boundary_fluid_pressure (ParameterHandler &prm);
114 
115 
122  template <int dim>
123  void
124  declare_parameters (ParameterHandler &prm);
125 
126 
136  template <int dim>
137  void
138  write_plugin_graph (std::ostream &output_stream);
139 
140 
148 #define ASPECT_REGISTER_BOUNDARY_FLUID_PRESSURE_MODEL(classname, name, description) \
149  template class classname<2>; \
150  template class classname<3>; \
151  namespace ASPECT_REGISTER_BOUNDARY_FLUID_PRESSURE_MODEL_ ## classname \
152  { \
153  aspect::internal::Plugins::RegisterHelper<aspect::BoundaryFluidPressure::Interface<2>,classname<2>> \
154  dummy_ ## classname ## _2d (&aspect::BoundaryFluidPressure::register_boundary_fluid_pressure<2>, \
155  name, description); \
156  aspect::internal::Plugins::RegisterHelper<aspect::BoundaryFluidPressure::Interface<3>,classname<3>> \
157  dummy_ ## classname ## _3d (&aspect::BoundaryFluidPressure::register_boundary_fluid_pressure<3>, \
158  name, description); \
159  }
160  }
161 }
162 
163 
164 #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)
virtual void fluid_pressure_gradient(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, std::vector< double > &fluid_pressure_gradient_outputs) const =0
static void declare_parameters(ParameterHandler &prm)