ASPECT
|
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 |
A base class that reads in a data profile and provides its values.
Definition at line 699 of file structured_data.h.
aspect::Utilities::AsciiDataProfile< dim >::AsciiDataProfile | ( | ) |
Constructor
|
virtual |
Initialization function. This function is called once at the beginning of the program. Checks preconditions.
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.
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.
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.
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.
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.
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.
|
protected |
Pointer to an object that reads and processes data we get from text files.
Definition at line 777 of file structured_data.h.