1 #ifndef VERTEXCFD_MESH_RESTART_HPP
2 #define VERTEXCFD_MESH_RESTART_HPP
4 #include <Panzer_GlobalIndexer.hpp>
5 #include <Panzer_STK_Interface.hpp>
7 #include <Thyra_VectorBase.hpp>
9 #include <Teuchos_Comm.hpp>
10 #include <Teuchos_ParameterList.hpp>
11 #include <Teuchos_RCP.hpp>
28 setupDofMapData(
const Teuchos::RCP<const panzer_stk::STK_Interface>& mesh,
29 const Teuchos::RCP<const panzer::GlobalIndexer>& dof_manager,
31 int& local_num_own_elem,
32 std::vector<int>& owned_element_lids);
41 RestartWriter(
const Teuchos::RCP<const panzer_stk::STK_Interface>& mesh,
42 const Teuchos::RCP<const panzer::GlobalIndexer>& dof_manager,
43 const Teuchos::ParameterList& output_params,
44 const bool allow_dofmap_overwrite =
false);
49 writeSolution(
const Teuchos::RCP<
const Thyra::VectorBase<double>>& x,
50 const Teuchos::RCP<
const Thyra::VectorBase<double>>& x_dot,
52 const double time = 0.0);
55 Teuchos::RCP<const panzer::GlobalIndexer> _dof_manager;
56 std::string _file_prefix;
57 std::vector<int> _displacements;
58 std::unordered_map<panzer::GlobalOrdinal, int> _global_to_local;
59 MPI_Datatype _dof_type;
66 RestartReader(
const Teuchos::RCP<
const Teuchos::Comm<int>>& comm,
67 const Teuchos::ParameterList& input_params);
70 readSolution(
const Teuchos::RCP<const panzer_stk::STK_Interface>& mesh,
71 const Teuchos::RCP<const panzer::GlobalIndexer>& dof_manager,
72 const Teuchos::RCP<Thyra::VectorBase<double>>& x,
73 const Teuchos::RCP<Thyra::VectorBase<double>>& x_dot);
75 double initialStateTime()
const {
return _t_init; }
78 std::string _restart_file_name;
79 std::string _dofmap_file_name;
82 void update_vector(
const Teuchos::RCP<Thyra::VectorBase<double>>& vec,
83 const std::vector<double>& data)
const;
91 #endif // end VERTEXCFD_MESH_RESTART_HPP