adamantine
experimental_data_utils.hh
Go to the documentation of this file.
1 /* SPDX-FileCopyrightText: Copyright (c) 2021-2023, the adamantine authors.
2  * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3  */
4 
5 #ifndef EXPERIMENTAL_DATA_UTILS_HH
6 #define EXPERIMENTAL_DATA_UTILS_HH
7 
8 #include <deal.II/base/point.h>
9 #include <deal.II/dofs/dof_handler.h>
10 #include <deal.II/lac/la_parallel_vector.h>
11 
12 #include <boost/property_tree/ptree.hpp>
13 
14 namespace adamantine
15 {
20 template <int dim>
22 {
23  std::vector<dealii::Point<dim>> points;
24  std::vector<double> values;
25 };
26 
31 template <int dim>
32 std::vector<PointsValues<dim>> read_experimental_data_point_cloud(
33  MPI_Comm const &communicator,
34  boost::property_tree::ptree const &experiment_database);
35 
40 template <int dim>
41 std::pair<std::vector<dealii::types::global_dof_index>,
42  std::vector<dealii::Point<dim>>>
43 get_dof_to_support_mapping(dealii::DoFHandler<dim> const &dof_handler);
44 
49 template <int dim>
50 std::pair<std::vector<int>, std::vector<int>>
51 get_expt_to_dof_mapping(PointsValues<dim> const &points_values,
52  dealii::DoFHandler<dim> const &dof_handler);
53 
57 template <int dim>
59  MPI_Comm const &communicator, PointsValues<dim> const &points_values,
60  std::pair<std::vector<int>, std::vector<int>> &expt_to_dof_mapping,
61  dealii::LinearAlgebra::distributed::Vector<double> &temperature,
62  bool verbose_output);
63 
75 std::vector<std::vector<double>>
76 read_frame_timestamps(boost::property_tree::ptree const &experiment_database);
77 
78 } // namespace adamantine
79 
80 #endif
std::pair< std::vector< dealii::types::global_dof_index >, std::vector< dealii::Point< dim > > > get_dof_to_support_mapping(dealii::DoFHandler< dim > const &dof_handler)
std::pair< std::vector< int >, std::vector< int > > get_expt_to_dof_mapping(PointsValues< dim > const &points_values, dealii::DoFHandler< dim > const &dof_handler)
std::vector< PointsValues< dim > > read_experimental_data_point_cloud(MPI_Comm const &communicator, boost::property_tree::ptree const &experiment_database)
void set_with_experimental_data(MPI_Comm const &communicator, PointsValues< dim > const &points_values, std::pair< std::vector< int >, std::vector< int >> &expt_to_dof_mapping, dealii::LinearAlgebra::distributed::Vector< double > &temperature, bool verbose_output)
std::vector< std::vector< double > > read_frame_timestamps(boost::property_tree::ptree const &experiment_database)
std::vector< dealii::Point< dim > > points