Namespaces | Classes | Macros | Functions
Describing the properties of the gravity




class  aspect::GravityModel::AsciiData< dim >
class  aspect::GravityModel::Function< dim >
class  aspect::GravityModel::Interface< dim >
class  aspect::GravityModel::RadialConstant< dim >
class  aspect::GravityModel::RadialEarthLike< dim >
class  aspect::GravityModel::RadialLinear< dim >
class  aspect::GravityModel::Vertical< dim >


#define ASPECT_REGISTER_GRAVITY_MODEL(classname, name, description)


template<int dim>
void aspect::GravityModel::register_gravity_model (const std::string &name, const std::string &description, void(*declare_parameters_function)(ParameterHandler &), Interface< dim > *(*factory_function)())
template<int dim>
Interface< dim > * aspect::GravityModel::create_gravity_model (ParameterHandler &prm)
template<int dim>
void aspect::GravityModel::declare_parameters (ParameterHandler &prm)

Detailed Description

A module for the definition of gravity. Gravity is described as a class that provides a function that returns the gravity vector direction and magnitude as a function of location. The module also contains the various functions necessary to add different gravity models that can then be selected in the input file.

Macro Definition Documentation


#define ASPECT_REGISTER_GRAVITY_MODEL (   classname,
template class classname<2>; \
template class classname<3>; \
namespace ASPECT_REGISTER_GRAVITY_MODEL_ ## classname \
{ \
aspect::internal::Plugins::RegisterHelper<aspect::GravityModel::Interface<2>,classname<2> > \
dummy_ ## classname ## _2d (&aspect::GravityModel::register_gravity_model<2>, \
name, description); \
aspect::internal::Plugins::RegisterHelper<aspect::GravityModel::Interface<3>,classname<3> > \
dummy_ ## classname ## _3d (&aspect::GravityModel::register_gravity_model<3>, \
name, description); \

Given a class name, a name, and a description for the parameter file for a gravity model, register it with the functions that can declare their parameters and create these objects.

Definition at line 171 of file interface.h.

Function Documentation

§ register_gravity_model()

template<int dim>
void aspect::GravityModel::register_gravity_model ( const std::string &  name,
const std::string &  description,
void(*)(ParameterHandler &)  declare_parameters_function,
Interface< dim > *(*)()  factory_function 

Register a gravity model so that it can be selected from the parameter file.

nameA string that identifies the gravity model
descriptionA text description of what this model does and that will be listed in the documentation of the parameter file.
declare_parameters_functionA pointer to a function that can be used to declare the parameters that this gravity model wants to read from input files.
factory_functionA pointer to a function that can create an object of this gravity model.

§ create_gravity_model()

template<int dim>
Interface<dim>* aspect::GravityModel::create_gravity_model ( ParameterHandler prm)

A function that given the name of a model returns a pointer to an object that describes it. Ownership of the pointer is transferred to the caller.

The model object returned is not yet initialized and has not read its runtime parameters yet.

§ declare_parameters()

template<int dim>
void aspect::GravityModel::declare_parameters ( ParameterHandler prm)

Declare the runtime parameters of the registered gravity models.