Finite Volume Solver  prototype
A framework to build finite volume solvers for the AG Klein at the Freie Universität Berlin.
CompressibleAdvectionIntegratorContext.hpp
Go to the documentation of this file.
1 // Copyright (c) 2019 Maikel Nadolski
2 //
3 // Permission is hereby granted, free of charge, to any person obtaining a copy
4 // of this software and associated documentation files (the "Software"), to deal
5 // in the Software without restriction, including without limitation the rights
6 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 // copies of the Software, and to permit persons to whom the Software is
8 // furnished to do so, subject to the following conditions:
9 //
10 // The above copyright notice and this permission notice shall be included in
11 // all copies or substantial portions of the Software.
12 //
13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 // SOFTWARE.
20 
21 #ifndef FUB_AMREX_COMPRESSIBLE_ADVECTION_INTEGRATOR_CONTEXT_HPP
22 #define FUB_AMREX_COMPRESSIBLE_ADVECTION_INTEGRATOR_CONTEXT_HPP
23 
25 
26 namespace fub::amrex {
27 
29  ::amrex::MultiFab on_cells;
30  std::array<::amrex::MultiFab, AMREX_SPACEDIM> on_faces;
31 };
32 
33 /// \ingroup IntegratorContext
35 public:
37  std::shared_ptr<GriddingAlgorithm> gridding, HyperbolicMethod method);
38 
40  std::shared_ptr<GriddingAlgorithm> gridding, HyperbolicMethod method,
41  int cell_gcw, int face_gcw);
42 
43  /// \brief Deeply copies a context and all its distributed data for all MPI
44  /// ranks.
49 
54 
57  GetAdvectiveFluxes(int level) const;
58 
59  /// \brief Replaces the underlying gridding algorithm with the specified one.
61  std::shared_ptr<GriddingAlgorithm> gridding) override;
62 
63  /// \brief Whenever the gridding algorithm changes the data hierarchy this
64  /// function will regrid all distributed helper variables managed by the
65  /// context.
66  ///
67  /// \param[in] level The level number of the coarsest level which changed its
68  /// shape. Regrid all levels finer than level.
69  void ResetHierarchyConfiguration(int level = 0) override;
70 
71 private:
72  std::vector<CompressibleAdvectionAdvectiveFluxes> Pv_;
73 };
74 
75 } // namespace fub::amrex
76 
77 #endif
Definition: CompressibleAdvectionIntegratorContext.hpp:34
CompressibleAdvectionAdvectiveFluxes & GetAdvectiveFluxes(int level)
CompressibleAdvectionIntegratorContext(const CompressibleAdvectionIntegratorContext &)
Deeply copies a context and all its distributed data for all MPI ranks.
CompressibleAdvectionIntegratorContext(std::shared_ptr< GriddingAlgorithm > gridding, HyperbolicMethod method)
std::vector< CompressibleAdvectionAdvectiveFluxes > Pv_
Definition: CompressibleAdvectionIntegratorContext.hpp:72
CompressibleAdvectionIntegratorContext(CompressibleAdvectionIntegratorContext &&)=default
CompressibleAdvectionIntegratorContext & operator=(CompressibleAdvectionIntegratorContext &&)=default
const CompressibleAdvectionAdvectiveFluxes & GetAdvectiveFluxes(int level) const
CompressibleAdvectionIntegratorContext(std::shared_ptr< GriddingAlgorithm > gridding, HyperbolicMethod method, int cell_gcw, int face_gcw)
CompressibleAdvectionIntegratorContext operator=(const CompressibleAdvectionIntegratorContext &)
void ResetHierarchyConfiguration(int level=0) override
Whenever the gridding algorithm changes the data hierarchy this function will regrid all distributed ...
void ResetHierarchyConfiguration(std::shared_ptr< GriddingAlgorithm > gridding) override
Replaces the underlying gridding algorithm with the specified one.
This class is used by the HypebrolicSplitLevelIntegrator and delegates AMR related tasks to the AMReX...
Definition: AMReX/IntegratorContext.hpp:49
The amrex namespace.
Definition: AverageState.hpp:33
Definition: HyperbolicMethod.hpp:150
Definition: CompressibleAdvectionIntegratorContext.hpp:28
std::array<::amrex::MultiFab, AMREX_SPACEDIM > on_faces
Definition: CompressibleAdvectionIntegratorContext.hpp:30
::amrex::MultiFab on_cells
Definition: CompressibleAdvectionIntegratorContext.hpp:29