World Builder  1.1.0-pre
A geodynamic initial conditions generator
WorldBuilder::Features::Interface Class Referenceabstract

#include <interface.h>

Inheritance diagram for WorldBuilder::Features::Interface:
Collaboration diagram for WorldBuilder::Features::Interface:

Public Member Functions

 Interface ()
 
virtual ~Interface ()
 
void get_coordinates (const std::string &name, Parameters &prm, const CoordinateSystem coordinate_system)
 
virtual void parse_entries (Parameters &prm)=0
 
virtual void properties (const Point< 3 > &position_in_cartesian_coordinates, const Objects::NaturalCoordinate &position_in_natural_coordinates, const double depth, const std::vector< std::array< unsigned int, 3 >> &properties, const double gravity, const std::vector< size_t > &entry_in_output, std::vector< double > &output) const =0
 
std::string get_name () const
 
virtual Objects::PlaneDistances distance_to_feature_plane (const Point< 3 > &position_in_cartesian_coordinates, const Objects::NaturalCoordinate &position_in_natural_coordinates, const double depth) const
 

Static Public Member Functions

static void declare_entries (Parameters &prm, const std::string &parent_name, const std::vector< std::string > &required_entries)
 
static void registerType (const std::string &name, void(*)(Parameters &, const std::string &, const std::vector< std::string > &required_entries), void(*make_snippet)(Parameters &), ObjectFactory *factory)
 
static std::unique_ptr< Interfacecreate (const std::string &name, WorldBuilder::World *world)
 

Protected Attributes

WorldBuilder::Worldworld
 
std::string name
 
size_t tag_index
 
WorldBuilder::Utilities::InterpolationType interpolation_type
 
std::size_t original_number_of_coordinates
 
std::vector< Point< 2 > > coordinates
 
WorldBuilder::Objects::BezierCurve bezier_curve
 
std::string temperature_submodule_name
 
std::string composition_submodule_name
 

Static Private Member Functions

static std::map< std::string, ObjectFactory * > & get_factory_map ()
 
static std::map< std::string, void(*)(Parameters &, const std::string &, const std::vector< std::string > &required_entries)> & get_declare_map ()
 
static std::map< std::string, void(*)(Parameters &)> & get_snippet_map ()
 

Detailed Description

This class is an interface for the specific plate tectonic feature classes, such as continental plate, oceanic plate and subduction zone.

Definition at line 42 of file interface.h.

Constructor & Destructor Documentation

◆ Interface()

WorldBuilder::Features::Interface::Interface ( )
default

constructor

◆ ~Interface()

WorldBuilder::Features::Interface::~Interface ( )
virtualdefault

Destructor

Member Function Documentation

◆ create()

std::unique_ptr< Interface > WorldBuilder::Features::Interface::create ( const std::string &  name,
WorldBuilder::World world 
)
static

A function to create a new type. This is part of the automatic registration of the object factory.

Definition at line 179 of file interface.cc.

Here is the caller graph for this function:

◆ declare_entries()

void WorldBuilder::Features::Interface::declare_entries ( Parameters prm,
const std::string &  parent_name,
const std::vector< std::string > &  required_entries 
)
static

declare and read in the world builder file into the parameters class

Definition at line 67 of file interface.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ distance_to_feature_plane()

Objects::PlaneDistances WorldBuilder::Features::Interface::distance_to_feature_plane ( const Point< 3 > &  position_in_cartesian_coordinates,
const Objects::NaturalCoordinate position_in_natural_coordinates,
const double  depth 
) const
virtual

Returns a PlaneDistances object that has the distance from and along a feature plane, calculated from the coordinates and the depth of the point.

Reimplemented in WorldBuilder::Features::SubductingPlate, and WorldBuilder::Features::Fault.

Definition at line 200 of file interface.cc.

Here is the caller graph for this function:

◆ get_coordinates()

void WorldBuilder::Features::Interface::get_coordinates ( const std::string &  name,
Parameters prm,
const CoordinateSystem  coordinate_system 
)

helper function to parse coordinates.

Definition at line 140 of file interface.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_declare_map()

static std::map<std::string, void ( *)(Parameters &, const std::string &, const std::vector<std::string>& required_entries)>& WorldBuilder::Features::Interface::get_declare_map ( )
inlinestaticprivate

Definition at line 182 of file interface.h.

◆ get_factory_map()

static std::map<std::string, ObjectFactory *>& WorldBuilder::Features::Interface::get_factory_map ( )
inlinestaticprivate

Definition at line 174 of file interface.h.

◆ get_name()

std::string WorldBuilder::Features::Interface::get_name ( ) const
inline

Definition at line 100 of file interface.h.

Here is the call graph for this function:

◆ get_snippet_map()

static std::map<std::string, void ( *)(Parameters &)>& WorldBuilder::Features::Interface::get_snippet_map ( )
inlinestaticprivate

Definition at line 190 of file interface.h.

◆ parse_entries()

virtual void WorldBuilder::Features::Interface::parse_entries ( Parameters prm)
pure virtual

◆ properties()

virtual void WorldBuilder::Features::Interface::properties ( const Point< 3 > &  position_in_cartesian_coordinates,
const Objects::NaturalCoordinate position_in_natural_coordinates,
const double  depth,
const std::vector< std::array< unsigned int, 3 >> &  properties,
const double  gravity,
const std::vector< size_t > &  entry_in_output,
std::vector< double > &  output 
) const
pure virtual

◆ registerType()

static void WorldBuilder::Features::Interface::registerType ( const std::string &  name,
void(*)(Parameters &, const std::string &, const std::vector< std::string > &required_entries)  ,
void(*)(Parameters &)  make_snippet,
ObjectFactory factory 
)
static

A function to register a new type. This is part of the automatic registration of the object factory.

Member Data Documentation

◆ bezier_curve

WorldBuilder::Objects::BezierCurve WorldBuilder::Features::Interface::bezier_curve
protected

The x and y spline

Definition at line 159 of file interface.h.

◆ composition_submodule_name

std::string WorldBuilder::Features::Interface::composition_submodule_name
protected

The name of the composition submodule used by this feature.

Definition at line 170 of file interface.h.

◆ coordinates

std::vector<Point<2> > WorldBuilder::Features::Interface::coordinates
protected

The coordinates at the surface of the feature

Definition at line 154 of file interface.h.

◆ interpolation_type

WorldBuilder::Utilities::InterpolationType WorldBuilder::Features::Interface::interpolation_type
protected

The type of interpolation used to get the line position between the points.

Definition at line 143 of file interface.h.

◆ name

std::string WorldBuilder::Features::Interface::name
protected

The name of the feature type.

Definition at line 132 of file interface.h.

◆ original_number_of_coordinates

std::size_t WorldBuilder::Features::Interface::original_number_of_coordinates
protected

number of original coordinates, before adding more automatically.

Definition at line 149 of file interface.h.

◆ tag_index

size_t WorldBuilder::Features::Interface::tag_index
protected

The index of the tag for this feature. This corresponds to the index in the feature_tags variable which is store in the World.

Definition at line 138 of file interface.h.

◆ temperature_submodule_name

std::string WorldBuilder::Features::Interface::temperature_submodule_name
protected

The name of the temperature submodule used by this feature.

Definition at line 165 of file interface.h.

◆ world

WorldBuilder::World* WorldBuilder::Features::Interface::world
protected

A pointer to the world class to retrieve variables.

Definition at line 127 of file interface.h.


The documentation for this class was generated from the following files: