22 #ifndef _aspect_gravity_model_interface_h 23 #define _aspect_gravity_model_interface_h 26 #include <deal.II/base/point.h> 27 #include <deal.II/base/parameter_handler.h> 37 namespace GravityModel
47 class Interface :
public Plugins::InterfaceBase
53 virtual Tensor<1,dim> gravity_vector (
const Point<dim> &position)
const = 0;
77 const std::string &description,
78 void (*declare_parameters_function) (ParameterHandler &),
79 std::unique_ptr<Interface<dim>> (*factory_function) ());
92 std::unique_ptr<Interface<dim>>
127 #define ASPECT_REGISTER_GRAVITY_MODEL(classname,name,description) \ 128 template class classname<2>; \ 129 template class classname<3>; \ 130 namespace ASPECT_REGISTER_GRAVITY_MODEL_ ## classname \ 132 aspect::internal::Plugins::RegisterHelper<aspect::GravityModel::Interface<2>,classname<2>> \ 133 dummy_ ## classname ## _2d (&aspect::GravityModel::register_gravity_model<2>, \ 134 name, description); \ 135 aspect::internal::Plugins::RegisterHelper<aspect::GravityModel::Interface<3>,classname<3>> \ 136 dummy_ ## classname ## _3d (&aspect::GravityModel::register_gravity_model<3>, \ 137 name, description); \ void register_gravity_model(const std::string &name, const std::string &description, void(*declare_parameters_function)(ParameterHandler &), std::unique_ptr< Interface< dim >>(*factory_function)())
std::unique_ptr< Interface< dim > > create_gravity_model(ParameterHandler &prm)
void declare_parameters(ParameterHandler &prm)
void write_plugin_graph(std::ostream &output_stream)