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;
258 unsigned int get_number_of_coordinates(
const unsigned int dimension)
const;
278 std::vector<std::unique_ptr<Function<dim>>>
data;
312 compute_table_indices(
const TableIndices<dim> &sizes,
const std::size_t idx)
const;
335 const std::string &default_directory,
336 const std::string &default_filename,
337 const std::string &subsection_name =
"Ascii data model");
343 parse_parameters (ParameterHandler &prm,
344 const std::string &subsection_name =
"Ascii data model");
386 initialize (
const std::set<types::boundary_id> &boundary_ids,
387 const unsigned int components);
402 get_data_component (
const types::boundary_id boundary_indicator,
403 const Point<dim> &position,
404 const unsigned int component)
const;
410 get_maximum_component_value (
const types::boundary_id boundary_indicator,
411 const unsigned int component)
const;
417 vector_gradient(
const types::boundary_id boundary_indicator,
419 const unsigned int component)
const;
440 const std::string &default_directory,
441 const std::string &default_filename,
442 const std::string &subsection_name =
"Ascii data model",
443 const bool declare_time_dependent_parameters =
true);
459 parse_parameters (ParameterHandler &prm,
460 const std::string &subsection_name =
"Ascii data model",
461 const bool parse_time_dependent_parameters =
true);
507 std::map<types::boundary_id,
513 std::map<types::boundary_id,
520 update_data (
const types::boundary_id boundary_id,
521 const bool reload_both_files);
528 end_time_dependence ();
534 create_filename (
const int filenumber,
535 const types::boundary_id boundary_id)
const;
566 get_data_component (
const Point<dim> &position,
567 const unsigned int component)
const;
575 const std::string &default_directory,
576 const std::string &default_filename,
577 const std::string &subsection_name =
"Ascii data model");
583 parse_parameters (ParameterHandler &prm,
584 const std::string &subsection_name =
"Ascii data model");
591 std::unique_ptr<aspect::Utilities::StructuredDataLookup<dim>>
lookup;
598 std::unique_ptr<aspect::Utilities::StructuredDataLookup<3>>
slice_lookup;
641 get_data_component (
const Point<dim> &position,
642 const unsigned int component)
const;
651 const std::string &default_directory,
652 const std::string &default_filename,
653 const std::string &subsection_name =
"Ascii data model");
659 parse_parameters (ParameterHandler &prm,
660 const std::string &subsection_name =
"Ascii data model");
720 get_data_component (
const Point<1> &position,
721 const unsigned int component)
const;
729 std::vector<std::string>
730 get_column_names()
const;
746 const std::vector<double> &
747 get_interpolation_point_coordinates()
const;
755 get_column_index_from_name(
const std::string &column_name)
const;
763 maybe_get_column_index_from_name(
const std::string &column_name)
const;
771 get_column_name_from_index(
const unsigned int column_index)
const;
777 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