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);
126 load_file(
const std::string &filename,
127 const MPI_Comm &communicator);
137 void load_netcdf(
const std::string &filename,
const std::vector<std::string> &data_column_names = {});
150 get_data(
const Point<dim> &position,
151 const unsigned int component)
const;
163 get_gradients(
const Point<dim> &position,
164 const unsigned int component);
172 std::vector<std::string>
173 get_column_names()
const;
181 has_equidistant_coordinates()
const;
195 const std::vector<double> &
196 get_interpolation_point_coordinates(
const unsigned int dimension)
const;
204 get_column_index_from_name(
const std::string &column_name)
const;
212 get_column_name_from_index(
const unsigned int column_index)
const;
217 double get_maximum_component_value(
const unsigned int component)
const;
237 std::vector<std::unique_ptr<Function<dim>>>
data;
271 compute_table_indices(
const TableIndices<dim> &sizes,
const std::size_t idx)
const;
294 const std::string &default_directory,
295 const std::string &default_filename,
296 const std::string &subsection_name =
"Ascii data model");
302 parse_parameters (ParameterHandler &prm,
303 const std::string &subsection_name =
"Ascii data model");
345 initialize (
const std::set<types::boundary_id> &boundary_ids,
346 const unsigned int components);
361 get_data_component (
const types::boundary_id boundary_indicator,
362 const Point<dim> &position,
363 const unsigned int component)
const;
369 get_maximum_component_value (
const types::boundary_id boundary_indicator,
370 const unsigned int component)
const;
376 vector_gradient(
const types::boundary_id boundary_indicator,
378 const unsigned int component)
const;
399 const std::string &default_directory,
400 const std::string &default_filename,
401 const std::string &subsection_name =
"Ascii data model",
402 const bool declare_time_dependent_parameters =
true);
418 parse_parameters (ParameterHandler &prm,
419 const std::string &subsection_name =
"Ascii data model",
420 const bool parse_time_dependent_parameters =
true);
466 std::map<types::boundary_id,
472 std::map<types::boundary_id,
479 update_data (
const types::boundary_id boundary_id,
480 const bool reload_both_files);
487 end_time_dependence ();
493 create_filename (
const int filenumber,
494 const types::boundary_id boundary_id)
const;
525 get_data_component (
const Point<dim> &position,
526 const unsigned int component)
const;
534 const std::string &default_directory,
535 const std::string &default_filename,
536 const std::string &subsection_name =
"Ascii data model");
542 parse_parameters (ParameterHandler &prm,
543 const std::string &subsection_name =
"Ascii data model");
550 std::unique_ptr<aspect::Utilities::StructuredDataLookup<dim>>
lookup;
557 std::unique_ptr<aspect::Utilities::StructuredDataLookup<3>>
slice_lookup;
600 get_data_component (
const Point<dim> &position,
601 const unsigned int component)
const;
610 const std::string &default_directory,
611 const std::string &default_filename,
612 const std::string &subsection_name =
"Ascii data model");
618 parse_parameters (ParameterHandler &prm,
619 const std::string &subsection_name =
"Ascii data model");
679 get_data_component (
const Point<1> &position,
680 const unsigned int component)
const;
688 std::vector<std::string>
689 get_column_names()
const;
705 const std::vector<double> &
706 get_interpolation_point_coordinates()
const;
714 get_column_index_from_name(
const std::string &column_name)
const;
722 maybe_get_column_index_from_name(
const std::string &column_name)
const;
730 get_column_name_from_index(
const unsigned int column_index)
const;
736 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