ASPECT
Public Member Functions | Protected Attributes | List of all members
aspect::Utilities::AsciiDataProfile< dim > Class Template Reference
Inheritance diagram for aspect::Utilities::AsciiDataProfile< dim >:
Inheritance graph
[legend]

Public Member Functions

 AsciiDataProfile ()
 
virtual void initialize (const MPI_Comm communicator)
 
double get_data_component (const Point< 1 > &position, const unsigned int component) const
 
std::vector< std::string > get_column_names () const
 
const std::vector< double > & get_interpolation_point_coordinates () const
 
unsigned int get_column_index_from_name (const std::string &column_name) const
 
unsigned int maybe_get_column_index_from_name (const std::string &column_name) const
 
std::string get_column_name_from_index (const unsigned int column_index) const
 
- Public Member Functions inherited from aspect::Utilities::AsciiDataBase< dim >
 AsciiDataBase ()
 
void parse_parameters (ParameterHandler &prm, const std::string &subsection_name="Ascii data model")
 

Protected Attributes

std::unique_ptr< aspect::Utilities::StructuredDataLookup< 1 > > lookup
 

Additional Inherited Members

- Static Public Member Functions inherited from aspect::Utilities::AsciiDataBase< dim >
static void declare_parameters (ParameterHandler &prm, const std::string &default_directory, const std::string &default_filename, const std::string &subsection_name="Ascii data model")
 
- Public Attributes inherited from aspect::Utilities::AsciiDataBase< dim >
std::string data_directory
 
std::string data_file_name
 
double scale_factor
 

Detailed Description

template<int dim>
class aspect::Utilities::AsciiDataProfile< dim >

A base class that reads in a data profile and provides its values.

Definition at line 699 of file structured_data.h.

Constructor & Destructor Documentation

§ AsciiDataProfile()

Constructor

Member Function Documentation

§ initialize()

template<int dim>
virtual void aspect::Utilities::AsciiDataProfile< dim >::initialize ( const MPI_Comm  communicator)
virtual

Initialization function. This function is called once at the beginning of the program. Checks preconditions.

§ get_data_component()

template<int dim>
double aspect::Utilities::AsciiDataProfile< dim >::get_data_component ( const Point< 1 > &  position,
const unsigned int  component 
) const

Returns the data component at the given position.

§ get_column_names()

template<int dim>
std::vector<std::string> aspect::Utilities::AsciiDataProfile< dim >::get_column_names ( ) const

Returns a vector that contains the names of all data columns in the order of their appearance in the data file (and their order in the memory data table). Returns an empty vector if no names are provided or the file is not read in yet.

§ get_interpolation_point_coordinates()

template<int dim>
const std::vector<double>& aspect::Utilities::AsciiDataProfile< dim >::get_interpolation_point_coordinates ( ) const

Returns the coordinates of the interpolation points at which data is stored. This function can be used to determine the number of data points in each of the coordinate directions, or to query data only at exactly the positions at which they are available (avoiding interpolation).

Because this class represents a one-dimensional profile, the returned values correspond to the values of the sole coordinate of the interpolation points, in contrast to the StructuredDataLookup::get_interpolation_point_coordinates() function that takes an integer argument indicating which coordinate is to be selected.

§ get_column_index_from_name()

template<int dim>
unsigned int aspect::Utilities::AsciiDataProfile< dim >::get_column_index_from_name ( const std::string &  column_name) const

Returns the column index of a column with the given name column_name. Throws an exception if no such column exists or no names were provided in the file.

§ maybe_get_column_index_from_name()

template<int dim>
unsigned int aspect::Utilities::AsciiDataProfile< dim >::maybe_get_column_index_from_name ( const std::string &  column_name) const

Returns the column index of a column with the given name column_name. Returns an invalid unsigned int if no such column exists or no names were provided in the file.

§ get_column_name_from_index()

template<int dim>
std::string aspect::Utilities::AsciiDataProfile< dim >::get_column_name_from_index ( const unsigned int  column_index) const

Returns a string that contains the name of the column with index column_index. Returns an empty string if no such column exists or no name was provided in the file.

Member Data Documentation

§ lookup

template<int dim>
std::unique_ptr<aspect::Utilities::StructuredDataLookup<1> > aspect::Utilities::AsciiDataProfile< dim >::lookup
protected

Pointer to an object that reads and processes data we get from text files.

Definition at line 777 of file structured_data.h.


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