OGS 6.2.1-76-gbb689931b
CoupledSolutionsForStaggeredScheme.h
Go to the documentation of this file.
1 
13 #pragma once
14 
15 #include <utility>
16 #include <vector>
17 
19 
20 namespace ProcessLib
21 {
31 {
33  std::vector<std::reference_wrapper<GlobalVector const>> const&
34  coupled_xs_,
35  const double dt_, const int process_id_);
36 
38  std::vector<std::reference_wrapper<GlobalVector const>> const& coupled_xs;
39 
41  std::vector<GlobalVector*> coupled_xs_t0;
42 
43  const double dt;
44  const int process_id;
45 };
46 
56 {
57  LocalCoupledSolutions(const double dt_, const int process_id_,
58  std::vector<std::vector<double>>&& local_coupled_xs0_,
59  std::vector<std::vector<double>>&& local_coupled_xs_)
60  : dt(dt_),
61  process_id(process_id_),
62  local_coupled_xs0(std::move(local_coupled_xs0_)),
63  local_coupled_xs(std::move(local_coupled_xs_))
64  {
65  }
66 
67  const double dt;
68  const int process_id;
69 
71  std::vector<std::vector<double>> const local_coupled_xs0;
73  std::vector<std::vector<double>> const local_coupled_xs;
74 };
75 
83 std::vector<std::vector<double>> getPreviousLocalSolutions(
85  const std::vector<std::vector<GlobalIndexType>>& indices);
86 
94 std::vector<std::vector<double>> getCurrentLocalSolutions(
96  const std::vector<std::vector<GlobalIndexType>>& indices);
97 } // namespace ProcessLib
CoupledSolutionsForStaggeredScheme(std::vector< std::reference_wrapper< GlobalVector const >> const &coupled_xs_, const double dt_, const int process_id_)
std::vector< std::reference_wrapper< GlobalVector const > > const & coupled_xs
References to the current solutions of the coupled processes.
std::vector< std::vector< double > > const local_coupled_xs0
Local solutions of the previous time step.
std::vector< std::vector< double > > getPreviousLocalSolutions(const CoupledSolutionsForStaggeredScheme &cpl_xs, const std::vector< std::vector< GlobalIndexType >> &indices)
LocalCoupledSolutions(const double dt_, const int process_id_, std::vector< std::vector< double >> &&local_coupled_xs0_, std::vector< std::vector< double >> &&local_coupled_xs_)
std::vector< std::vector< double > > const local_coupled_xs
Local solutions of the current time step.
std::vector< GlobalVector * > coupled_xs_t0
Pointers to the vector of the solutions of the previous time step.
std::vector< std::vector< double > > getCurrentLocalSolutions(const CoupledSolutionsForStaggeredScheme &cpl_xs, const std::vector< std::vector< GlobalIndexType >> &indices)