22 #ifndef _aspect_structured_data_h 23 #define _aspect_structured_data_h 93 const double scale_factor,
139 void reinit(
const std::vector<std::string> &column_names,
142 const MPI_Comm mpi_communicator = MPI_COMM_SELF,
164 const MPI_Comm communicator);
175 load_netcdf(
const std::string &filename,
const std::vector<std::string> &data_column_names = {});
198 const MPI_Comm communicator);
215 const unsigned int component,
216 const bool crash_if_not_in_range =
false)
const;
229 const unsigned int component);
237 std::vector<std::string>
260 const std::vector<double> &
311 std::vector<std::unique_ptr<Function<dim>>>
data;
374 const std::string &default_directory,
375 const std::string &default_filename,
376 const std::string &subsection_name =
"Ascii data model");
383 const std::string &subsection_name =
"Ascii data model");
425 initialize (
const std::set<types::boundary_id> &boundary_ids,
426 const unsigned int components);
443 const unsigned int component)
const;
450 const unsigned int component)
const;
458 const unsigned int component)
const;
479 const std::string &default_directory,
480 const std::string &default_filename,
481 const std::string &subsection_name =
"Ascii data model",
482 const bool declare_time_dependent_parameters =
true);
499 const std::string &subsection_name =
"Ascii data model",
500 const bool parse_time_dependent_parameters =
true);
559 update_data (
const types::boundary_id boundary_id,
560 const bool reload_both_files);
567 end_time_dependence ();
573 create_filename (
const int filenumber,
574 const types::boundary_id boundary_id)
const;
605 get_data_component (
const Point<dim> &position,
606 const unsigned int component)
const;
614 const std::string &default_directory,
615 const std::string &default_filename,
616 const std::string &subsection_name =
"Ascii data model");
623 const std::string &subsection_name =
"Ascii data model");
630 std::unique_ptr<aspect::Utilities::StructuredDataLookup<dim>>
lookup;
637 std::unique_ptr<aspect::Utilities::StructuredDataLookup<3>>
slice_lookup;
680 get_data_component (
const Point<dim> &position,
681 const unsigned int component)
const;
690 const std::string &default_directory,
691 const std::string &default_filename,
692 const std::string &subsection_name =
"Ascii data model");
699 const std::string &subsection_name =
"Ascii data model");
753 get_data_component (
const Point<1> &position,
754 const unsigned int component)
const;
762 std::vector<std::string>
779 const std::vector<double> &
796 maybe_get_column_index_from_name(
const std::string &column_name)
const;
810 std::unique_ptr<aspect::Utilities::StructuredDataLookup<1>>
lookup;
std::string interpolation_scheme
constexpr unsigned int invalid_unsigned_int
std::unique_ptr< aspect::Utilities::StructuredDataLookup< 3 > > slice_lookup
Tensor< 1, dim > get_gradients(const Point< dim > &position, const unsigned int component)
TableIndices< dim > points_per_direction
double get_data(const Point< dim > &position, const unsigned int component, const bool crash_if_not_in_range=false) const
std::string data_file_name
std::string get_column_name_from_index(const unsigned int column_index) const
std::map< types::boundary_id, std::unique_ptr< aspect::Utilities::StructuredDataLookup< dim-1 > > > lookups
std::set< unsigned int > log_components
void load_ascii(const std::string &filename, const MPI_Comm communicator)
unsigned int n_components
bool has_equidistant_coordinates() const
std::vector< std::unique_ptr< Function< dim > > > data
double get_maximum_component_value(const unsigned int component) const
const std::vector< double > & get_interpolation_point_coordinates(const unsigned int dimension) const
std::vector< std::string > get_column_names() const
std::vector< std::string > data_component_names
void declare_parameters(ParameterHandler &prm)
void load_netcdf(const std::string &filename, const std::vector< std::string > &data_column_names={})
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
void load_file(const std::string &filename, const MPI_Comm communicator)
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
TableIndices< dim > compute_table_indices(const TableIndices< dim > &sizes, const std::size_t idx) const
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
StructuredDataLookup(const unsigned int n_components, const double scale_factor)
void reinit(const std::vector< std::string > &column_names, std::vector< std::vector< double >> &&coordinate_values, std::vector< Table< dim, double >> &&data_table, const MPI_Comm mpi_communicator=MPI_COMM_SELF, const unsigned int root_process=numbers::invalid_unsigned_int)
unsigned int get_column_index_from_name(const std::string &column_name) const
unsigned int get_number_of_coordinates(const unsigned int dimension) const
const double scale_factor
unsigned int number_of_layer_boundaries
std::unique_ptr< aspect::Utilities::StructuredDataLookup< dim > > lookup