16 #ifndef _aspect_structured_data_h 17 #define _aspect_structured_data_h 87 const double scale_factor,
133 void reinit(
const std::vector<std::string> &column_names,
136 const MPI_Comm mpi_communicator = MPI_COMM_SELF,
158 const MPI_Comm communicator);
169 load_netcdf(
const std::string &filename,
const std::vector<std::string> &data_column_names = {});
192 const MPI_Comm communicator);
209 const unsigned int component,
210 const bool crash_if_not_in_range =
false)
const;
223 const unsigned int component);
231 std::vector<std::string>
254 const std::vector<double> &
305 std::vector<std::unique_ptr<Function<dim>>>
data;
368 const std::string &default_directory,
369 const std::string &default_filename,
370 const std::string &subsection_name =
"Ascii data model");
377 const std::string &subsection_name =
"Ascii data model");
419 initialize (
const std::set<types::boundary_id> &boundary_ids,
420 const unsigned int components);
437 const unsigned int component)
const;
444 const unsigned int component)
const;
452 const unsigned int component)
const;
473 const std::string &default_directory,
474 const std::string &default_filename,
475 const std::string &subsection_name =
"Ascii data model",
476 const bool declare_time_dependent_parameters =
true);
493 const std::string &subsection_name =
"Ascii data model",
494 const bool parse_time_dependent_parameters =
true);
553 update_data (
const types::boundary_id boundary_id,
554 const bool reload_both_files);
561 end_time_dependence ();
567 create_filename (
const int filenumber,
568 const types::boundary_id boundary_id)
const;
599 get_data_component (
const Point<dim> &position,
600 const unsigned int component)
const;
608 const std::string &default_directory,
609 const std::string &default_filename,
610 const std::string &subsection_name =
"Ascii data model");
617 const std::string &subsection_name =
"Ascii data model");
624 std::unique_ptr<aspect::Utilities::StructuredDataLookup<dim>>
lookup;
631 std::unique_ptr<aspect::Utilities::StructuredDataLookup<3>>
slice_lookup;
674 get_data_component (
const Point<dim> &position,
675 const unsigned int component)
const;
684 const std::string &default_directory,
685 const std::string &default_filename,
686 const std::string &subsection_name =
"Ascii data model");
693 const std::string &subsection_name =
"Ascii data model");
747 get_data_component (
const Point<1> &position,
748 const unsigned int component)
const;
756 std::vector<std::string>
773 const std::vector<double> &
790 maybe_get_column_index_from_name(
const std::string &column_name)
const;
804 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