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) 2015-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_boundary_fluid_pressure_interface_h
17 #define _aspect_boundary_fluid_pressure_interface_h
18 
19 #include <aspect/plugins.h>
21 
22 namespace aspect
23 {
31  namespace BoundaryFluidPressure
32  {
38  template <int dim>
40  {
41  public:
62  virtual
64  const types::boundary_id boundary_indicator,
65  const MaterialModel::MaterialModelInputs<dim> &material_model_inputs,
66  const MaterialModel::MaterialModelOutputs<dim> &material_model_outputs,
67  const std::vector<Tensor<1,dim>> &normal_vectors,
68  std::vector<double> &fluid_pressure_gradient_outputs
69  ) const = 0;
70  };
71 
72 
88  template <int dim>
89  void
90  register_boundary_fluid_pressure (const std::string &name,
91  const std::string &description,
92  void (*declare_parameters_function) (ParameterHandler &),
93  std::unique_ptr<Interface<dim>> (*factory_function) ());
94 
105  template <int dim>
106  std::unique_ptr<Interface<dim>>
108 
109 
116  template <int dim>
117  void
119 
120 
130  template <int dim>
131  void
132  write_plugin_graph (std::ostream &output_stream);
133 
134 
142 #define ASPECT_REGISTER_BOUNDARY_FLUID_PRESSURE_MODEL(classname, name, description) \
143  template class classname<2>; \
144  template class classname<3>; \
145  namespace ASPECT_REGISTER_BOUNDARY_FLUID_PRESSURE_MODEL_ ## classname \
146  { \
147  aspect::internal::Plugins::RegisterHelper<aspect::BoundaryFluidPressure::Interface<2>,classname<2>> \
148  dummy_ ## classname ## _2d (&aspect::BoundaryFluidPressure::register_boundary_fluid_pressure<2>, \
149  name, description); \
150  aspect::internal::Plugins::RegisterHelper<aspect::BoundaryFluidPressure::Interface<3>,classname<3>> \
151  dummy_ ## classname ## _3d (&aspect::BoundaryFluidPressure::register_boundary_fluid_pressure<3>, \
152  name, description); \
153  }
154  }
155 }
156 
157 
158 #endif
std::unique_ptr< Interface< dim > > create_boundary_fluid_pressure(ParameterHandler &prm)
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)