ASPECT
interface.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2015 - 2017 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>
47  class Interface
48  {
49  public:
54  virtual ~Interface();
55 
61  virtual void initialize ();
62 
63 
84  virtual
85  void fluid_pressure_gradient (
86  const types::boundary_id boundary_indicator,
87  const MaterialModel::MaterialModelInputs<dim> &material_model_inputs,
88  const MaterialModel::MaterialModelOutputs<dim> &material_model_outputs,
89  const std::vector<Tensor<1,dim> > &normal_vectors,
90  std::vector<double> &fluid_pressure_gradient_outputs
91  ) const = 0;
92 
99  static
100  void
102 
109  virtual
110  void
111  parse_parameters (ParameterHandler &prm);
112  };
113 
114 
130  template <int dim>
131  void
132  register_boundary_fluid_pressure (const std::string &name,
133  const std::string &description,
134  void (*declare_parameters_function) (ParameterHandler &),
135  Interface<dim> *(*factory_function) ());
136 
147  template <int dim>
150 
151 
158  template <int dim>
159  void
161 
162 
172  template <int dim>
173  void
174  write_plugin_graph (std::ostream &output_stream);
175 
176 
184 #define ASPECT_REGISTER_BOUNDARY_FLUID_PRESSURE_MODEL(classname, name, description) \
185  template class classname<2>; \
186  template class classname<3>; \
187  namespace ASPECT_REGISTER_BOUNDARY_FLUID_PRESSURE_MODEL_ ## classname \
188  { \
189  aspect::internal::Plugins::RegisterHelper<aspect::BoundaryFluidPressure::Interface<2>,classname<2> > \
190  dummy_ ## classname ## _2d (&aspect::BoundaryFluidPressure::register_boundary_fluid_pressure<2>, \
191  name, description); \
192  aspect::internal::Plugins::RegisterHelper<aspect::BoundaryFluidPressure::Interface<3>,classname<3> > \
193  dummy_ ## classname ## _3d (&aspect::BoundaryFluidPressure::register_boundary_fluid_pressure<3>, \
194  name, description); \
195  }
196  }
197 }
198 
199 
200 #endif
void register_boundary_fluid_pressure(const std::string &name, const std::string &description, void(*declare_parameters_function)(ParameterHandler &), Interface< dim > *(*factory_function)())
void write_plugin_graph(std::ostream &output_stream)
Interface< dim > * create_boundary_fluid_pressure(ParameterHandler &prm)
void declare_parameters(ParameterHandler &prm)
unsigned int boundary_id