22 #ifndef _aspect_structured_data_h 23 #define _aspect_structured_data_h 69 const double scale_factor);
114 void reinit(
const std::vector<std::string> &column_names,
115 std::vector<std::vector<double>> &&coordinate_values,
116 std::vector<Table<dim,double>> &&data_table,
117 const MPI_Comm mpi_communicator = MPI_COMM_SELF,
118 const unsigned int root_process = numbers::invalid_unsigned_int);
138 load_ascii(
const std::string &filename,
139 const MPI_Comm communicator);
150 load_netcdf(
const std::string &filename,
const std::vector<std::string> &data_column_names = {});
168 load_file(
const std::string &filename,
169 const MPI_Comm communicator);
182 get_data(
const Point<dim> &position,
183 const unsigned int component)
const;
195 get_gradients(
const Point<dim> &position,
196 const unsigned int component);
204 std::vector<std::string>
205 get_column_names()
const;
213 has_equidistant_coordinates()
const;
227 const std::vector<double> &
228 get_interpolation_point_coordinates(
const unsigned int dimension)
const;
236 get_column_index_from_name(
const std::string &column_name)
const;
244 get_column_name_from_index(
const unsigned int column_index)
const;
249 double get_maximum_component_value(
const unsigned int component)
const;
269 std::vector<std::unique_ptr<Function<dim>>>
data;
303 compute_table_indices(
const TableIndices<dim> &sizes,
const std::size_t idx)
const;
326 const std::string &default_directory,
327 const std::string &default_filename,
328 const std::string &subsection_name =
"Ascii data model");
334 parse_parameters (ParameterHandler &prm,
335 const std::string &subsection_name =
"Ascii data model");
377 initialize (
const std::set<types::boundary_id> &boundary_ids,
378 const unsigned int components);
393 get_data_component (
const types::boundary_id boundary_indicator,
394 const Point<dim> &position,
395 const unsigned int component)
const;
401 get_maximum_component_value (
const types::boundary_id boundary_indicator,
402 const unsigned int component)
const;
408 vector_gradient(
const types::boundary_id boundary_indicator,
410 const unsigned int component)
const;
431 const std::string &default_directory,
432 const std::string &default_filename,
433 const std::string &subsection_name =
"Ascii data model",
434 const bool declare_time_dependent_parameters =
true);
450 parse_parameters (ParameterHandler &prm,
451 const std::string &subsection_name =
"Ascii data model",
452 const bool parse_time_dependent_parameters =
true);
498 std::map<types::boundary_id,
504 std::map<types::boundary_id,
511 update_data (
const types::boundary_id boundary_id,
512 const bool reload_both_files);
519 end_time_dependence ();
525 create_filename (
const int filenumber,
526 const types::boundary_id boundary_id)
const;
557 get_data_component (
const Point<dim> &position,
558 const unsigned int component)
const;
566 const std::string &default_directory,
567 const std::string &default_filename,
568 const std::string &subsection_name =
"Ascii data model");
574 parse_parameters (ParameterHandler &prm,
575 const std::string &subsection_name =
"Ascii data model");
582 std::unique_ptr<aspect::Utilities::StructuredDataLookup<dim>>
lookup;
589 std::unique_ptr<aspect::Utilities::StructuredDataLookup<3>>
slice_lookup;
632 get_data_component (
const Point<dim> &position,
633 const unsigned int component)
const;
642 const std::string &default_directory,
643 const std::string &default_filename,
644 const std::string &subsection_name =
"Ascii data model");
650 parse_parameters (ParameterHandler &prm,
651 const std::string &subsection_name =
"Ascii data model");
711 get_data_component (
const Point<1> &position,
712 const unsigned int component)
const;
720 std::vector<std::string>
721 get_column_names()
const;
737 const std::vector<double> &
738 get_interpolation_point_coordinates()
const;
746 get_column_index_from_name(
const std::string &column_name)
const;
754 maybe_get_column_index_from_name(
const std::string &column_name)
const;
762 get_column_name_from_index(
const unsigned int column_index)
const;
768 std::unique_ptr<aspect::Utilities::StructuredDataLookup<1>>
lookup;
std::string interpolation_scheme
TableIndices< dim > table_points
std::unique_ptr< aspect::Utilities::StructuredDataLookup< 3 > > slice_lookup
std::string data_file_name
std::map< types::boundary_id, std::unique_ptr< aspect::Utilities::StructuredDataLookup< dim-1 > > > lookups
unsigned int n_components
std::vector< std::unique_ptr< Function< dim > > > data
std::vector< std::string > data_component_names
void declare_parameters(ParameterHandler &prm)
bool coordinate_values_are_equidistant
std::vector< std::string > data_file_names
bool decreasing_file_order
int first_data_file_number
std::vector< double > maximum_component_value
std::vector< std::unique_ptr< aspect::Utilities::StructuredDataLookup< dim-1 > > > lookups
double data_file_time_step
std::unique_ptr< aspect::Utilities::StructuredDataLookup< 1 > > lookup
std::string data_directory
std::map< types::boundary_id, std::unique_ptr< aspect::Utilities::StructuredDataLookup< dim-1 > > > old_lookups
Tensor< 2, 3 > rotation_matrix
std::array< std::vector< double >, dim > coordinate_values
std::string data_directory
const double scale_factor
unsigned int number_of_layer_boundaries
std::unique_ptr< aspect::Utilities::StructuredDataLookup< dim > > lookup