Line data Source code
1 0 : // Distributed under the MIT License. 2 : // See LICENSE.txt for details. 3 : 4 : #pragma once 5 : 6 : #include <memory> 7 : 8 : #include "DataStructures/DataBox/Tag.hpp" 9 : #include "NumericalAlgorithms/SpatialDiscretization/OptionTags.hpp" 10 : #include "Utilities/TMPL.hpp" 11 : 12 : namespace evolution { 13 0 : namespace OptionTags { 14 : /// The boundary correction used for coupling the local PDE system solution to 15 : /// solutions from neighboring elements or applying boundary conditions. 16 : /// 17 : /// In the finite volume/difference and discontinuous Galerkin literature this 18 : /// is often referred to as the "numerical flux". We avoid that nomenclature 19 : /// because in the discontinuous Galerkin and finite volume case it is not the 20 : /// flux that is modified, but the integrand of the boundary integral. 21 : template <typename System> 22 1 : struct BoundaryCorrection { 23 0 : using type = std::unique_ptr<typename System::boundary_correction_base>; 24 0 : using group = SpatialDiscretization::OptionTags::SpatialDiscretizationGroup; 25 0 : static constexpr Options::String help = "The boundary correction to use."; 26 : }; 27 : } // namespace OptionTags 28 : 29 0 : namespace Tags { 30 : /// The boundary correction used for coupling together neighboring cells or 31 : /// applying boundary conditions. 32 : /// 33 : /// In the finite volume/difference and discontinuous Galerkin literature this 34 : /// is ofter referred to as the "numerical flux". We avoid that nomenclature 35 : /// because in the discontinuous Galerkin and finite volume case it is not the 36 : /// flux that is modified, but the integrand of the boundary integral. 37 : template <typename System> 38 1 : struct BoundaryCorrection : db::SimpleTag { 39 0 : using type = std::unique_ptr<typename System::boundary_correction_base>; 40 : 41 0 : using option_tags = tmpl::list<OptionTags::BoundaryCorrection<System>>; 42 0 : static constexpr bool pass_metavariables = false; 43 0 : static type create_from_options(const type& boundary_correction) { 44 : return boundary_correction->get_clone(); 45 : } 46 : }; 47 : } // namespace Tags 48 : } // namespace evolution