World Builder  1.1.0-pre
A geodynamic initial conditions generator
WorldBuilder::Features::Fault Class Referencefinal

#include <fault.h>

Inheritance diagram for WorldBuilder::Features::Fault:
Collaboration diagram for WorldBuilder::Features::Fault:

Public Member Functions

 Fault (WorldBuilder::World *world)
 
 ~Fault () override final
 
void parse_entries (Parameters &prm) override final
 
const BoundingBox< 2 > & get_surface_bounding_box () const
 
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 override final
 
Objects::PlaneDistances distance_to_feature_plane (const Point< 3 > &position_in_cartesian_coordinates, const Objects::NaturalCoordinate &position_in_natural_coordinates, const double depth) const override
 
- Public Member Functions inherited from WorldBuilder::Features::Interface
 Interface ()
 
virtual ~Interface ()
 
void get_coordinates (const std::string &name, Parameters &prm, const CoordinateSystem coordinate_system)
 
std::string get_name () 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 make_snippet (Parameters &prm)
 
- Static Public Member Functions inherited from WorldBuilder::Features::Interface
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)
 

Private Attributes

std::vector< std::shared_ptr< Features::FaultModels::Temperature::Interface > > default_temperature_models
 
std::vector< std::shared_ptr< Features::FaultModels::Composition::Interface > > default_composition_models
 
std::vector< std::shared_ptr< Features::FaultModels::Grains::Interface > > default_grains_models
 
std::vector< std::shared_ptr< Features::FaultModels::Velocity::Interface > > default_velocity_models
 
std::vector< Objects::Segment< Features::FaultModels::Temperature::Interface, Features::FaultModels::Composition::Interface, Features::FaultModels::Grains::Interface, Features::FaultModels::Velocity::Interface > > default_segment_vector
 
std::vector< std::vector< Objects::Segment< Features::FaultModels::Temperature::Interface, Features::FaultModels::Composition::Interface, Features::FaultModels::Grains::Interface, Features::FaultModels::Velocity::Interface > > > sections_segment_vector
 
std::vector< std::vector< Objects::Segment< Features::FaultModels::Temperature::Interface, Features::FaultModels::Composition::Interface, Features::FaultModels::Grains::Interface, Features::FaultModels::Velocity::Interface > > > segment_vector
 
double starting_depth
 
double maximum_depth
 
BoundingBox< 2 > surface_bounding_box
 
WorldBuilder::Point< 2 > reference_point
 
std::vector< std::vector< double > > fault_segment_lengths
 
std::vector< std::vector< Point< 2 > > > fault_segment_thickness
 
std::vector< std::vector< Point< 2 > > > fault_segment_top_truncation
 
std::vector< std::vector< Point< 2 > > > fault_segment_angles
 
std::vector< double > total_fault_length
 
double maximum_total_fault_length
 
double maximum_fault_thickness
 
double min_along_x
 
double max_along_x
 
double min_along_y
 
double max_along_y
 
double min_lat_cos_inv
 
double max_lat_cos_inv
 
double buffer_around_fault_cartesian
 

Additional Inherited Members

- Protected Attributes inherited from WorldBuilder::Features::Interface
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
 

Detailed Description

This class represents a fault and can implement submodules for temperature and composition. These submodules determine what the returned temperature or composition of the temperature and composition functions of this class will be.

Definition at line 66 of file fault.h.

Constructor & Destructor Documentation

◆ Fault()

WorldBuilder::Features::Fault::Fault ( WorldBuilder::World world)

constructor

Definition at line 42 of file fault.cc.

Here is the call graph for this function:

◆ ~Fault()

WorldBuilder::Features::Fault::~Fault ( )
finaloverridedefault

Destructor

Here is the caller graph for this function:

Member Function Documentation

◆ declare_entries()

void WorldBuilder::Features::Fault::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 73 of file fault.cc.

Here is the call graph for this function:

◆ distance_to_feature_plane()

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

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

Reimplemented from WorldBuilder::Features::Interface.

Definition at line 783 of file fault.cc.

Here is the call graph for this function:

◆ get_surface_bounding_box()

const BoundingBox< 2 > & WorldBuilder::Features::Fault::get_surface_bounding_box ( ) const

Computes the bounding points for a BoundingBox object using two extreme points in all the surface coordinates and an additional buffer zone that accounts for the fault thickness and length. The first and second points correspond to the lower left and the upper right corners of the bounding box, respectively (see the documentation in include/bounding_box.h). For the spherical system, the buffer zone along the longitudal direction is calculated using the corresponding latitude points.

Definition at line 465 of file fault.cc.

Here is the caller graph for this function:

◆ make_snippet()

void WorldBuilder::Features::Fault::make_snippet ( Parameters prm)
static

Produce a JSON snippet for the schema

Definition at line 55 of file fault.cc.

Here is the call graph for this function:

◆ parse_entries()

void WorldBuilder::Features::Fault::parse_entries ( Parameters prm)
finaloverridevirtual

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

Implements WorldBuilder::Features::Interface.

Definition at line 132 of file fault.cc.

Here is the call graph for this function:

◆ properties()

void WorldBuilder::Features::Fault::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
finaloverridevirtual

Returns different values at a single point in one go stored in a vector of doubles.

The properties input decides what each entry means, and the output is generated in the same order as the properties input. The properties input consists of a 3D array, where the first entry identifies the property and the last two entries provide extra information about that property.

Temperature is identified by 1 and no extra information is needed. So temperature input usually looks like {1,0,0}. A temperature query prodoces one entry in the output vector.

Composition is identified by 2. This produces one value in the output. The second entry identifies the composition number and the third number is not used. So a commposition query asking about composition 1 looks like this: {2,1,0}. A composition query prodoces one entry in the output vector.

Grains are identified by 2. The second entry is the grain composition number and the third entry is the number of grains. A query about the grains, where it asks about composition 1 (for example enstatite) and 500 grains, looks like this: {2,1,500}. A composition query prodoces n_grains*10 entries in the output vector. The first n_grains entries are the sizes of all the grains, and the other 9 entries are sets of rotation matrices. The rotation matrix entries are ordered [0][0],[0][1],[0][2],[1][0],[1][1],etc.

The entries in output variable relates the index of the property to the index in the output.

Implements WorldBuilder::Features::Interface.

Definition at line 472 of file fault.cc.

Here is the call graph for this function:

Member Data Documentation

◆ buffer_around_fault_cartesian

double WorldBuilder::Features::Fault::buffer_around_fault_cartesian
private

Definition at line 232 of file fault.h.

◆ default_composition_models

std::vector<std::shared_ptr<Features::FaultModels::Composition::Interface> > WorldBuilder::Features::Fault::default_composition_models
private

Definition at line 155 of file fault.h.

◆ default_grains_models

std::vector<std::shared_ptr<Features::FaultModels::Grains::Interface> > WorldBuilder::Features::Fault::default_grains_models
private

Definition at line 156 of file fault.h.

◆ default_segment_vector

◆ default_temperature_models

std::vector<std::shared_ptr<Features::FaultModels::Temperature::Interface> > WorldBuilder::Features::Fault::default_temperature_models
private

Definition at line 154 of file fault.h.

◆ default_velocity_models

std::vector<std::shared_ptr<Features::FaultModels::Velocity::Interface> > WorldBuilder::Features::Fault::default_velocity_models
private

Definition at line 157 of file fault.h.

◆ fault_segment_angles

std::vector<std::vector<Point<2> > > WorldBuilder::Features::Fault::fault_segment_angles
private

Definition at line 221 of file fault.h.

◆ fault_segment_lengths

std::vector<std::vector<double> > WorldBuilder::Features::Fault::fault_segment_lengths
private

Definition at line 218 of file fault.h.

◆ fault_segment_thickness

std::vector<std::vector<Point<2> > > WorldBuilder::Features::Fault::fault_segment_thickness
private

Definition at line 219 of file fault.h.

◆ fault_segment_top_truncation

std::vector<std::vector<Point<2> > > WorldBuilder::Features::Fault::fault_segment_top_truncation
private

Definition at line 220 of file fault.h.

◆ max_along_x

double WorldBuilder::Features::Fault::max_along_x
private

Definition at line 227 of file fault.h.

◆ max_along_y

double WorldBuilder::Features::Fault::max_along_y
private

Definition at line 229 of file fault.h.

◆ max_lat_cos_inv

double WorldBuilder::Features::Fault::max_lat_cos_inv
private

Definition at line 231 of file fault.h.

◆ maximum_depth

double WorldBuilder::Features::Fault::maximum_depth
private

The depth which below the fault may no longer be present. This can not only help setting up models with less effort, but can also improve performance, because the algorithm doesn't have to search in locations below this depth.

Definition at line 201 of file fault.h.

◆ maximum_fault_thickness

double WorldBuilder::Features::Fault::maximum_fault_thickness
private

Definition at line 224 of file fault.h.

◆ maximum_total_fault_length

double WorldBuilder::Features::Fault::maximum_total_fault_length
private

Definition at line 223 of file fault.h.

◆ min_along_x

double WorldBuilder::Features::Fault::min_along_x
private

Definition at line 226 of file fault.h.

◆ min_along_y

double WorldBuilder::Features::Fault::min_along_y
private

Definition at line 228 of file fault.h.

◆ min_lat_cos_inv

double WorldBuilder::Features::Fault::min_lat_cos_inv
private

Definition at line 230 of file fault.h.

◆ reference_point

WorldBuilder::Point<2> WorldBuilder::Features::Fault::reference_point
private

A point on the surface to which the fault dips.

Definition at line 216 of file fault.h.

◆ sections_segment_vector

Definition at line 167 of file fault.h.

◆ segment_vector

◆ starting_depth

double WorldBuilder::Features::Fault::starting_depth
private

This variable stores the depth at which the fault starts. It makes this depth effectively the surface of the model for the fault.

Definition at line 192 of file fault.h.

◆ surface_bounding_box

BoundingBox<2> WorldBuilder::Features::Fault::surface_bounding_box
private

Computee bounding points for a BoundingBox object using two extreme points in all the surface coordinates and an additional buffer zone that accounts for the fault thickness and length. The first and second points correspond to the lower left and the upper right corners of the bounding box, respectively (see the documentation in include/bounding_box.h). For the spherical system, the buffer zone along the longitudal direction is calculated using the corresponding latitude points.

Definition at line 211 of file fault.h.

◆ total_fault_length

std::vector<double> WorldBuilder::Features::Fault::total_fault_length
private

Definition at line 222 of file fault.h.


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