plan.hpp serif/model/equilibrium_plan.hpp serif/solver/normalization/configuration.hpp serif/solver/normalization/physical_coordinates.hpp src/compile_time_checks/serif/model/barotropic_density.cpp src/compile_time_checks/serif/model/density_primal.cpp src/compile_time_checks/serif/model/normalization.cpp src/include/serif/backend/mfem/model/normalization/computations.hpp src/include/serif/utils/serialize/numerics.hpp serif::model::normalization::SurfaceRows serif::model::normalization::InfinityRows serif::model::normalization::detail::Metric serif::model::normalization::detail::Metric< Term, true > serif::model::normalization::detail::ValueRule serif::model::normalization::detail::ValueRule< Coordinates, blocks::surface_deformation::coefficients > serif::model::normalization::detail::SurfaceRule serif::model::normalization::detail::SurfaceRule< Method, Row, Plan, true > serif::model::normalization::detail::InfinityRule serif::model::normalization::detail::ResidualRules< dependencies::Bindings< Interior... >, dependencies::Bindings< Shape... > > serif::model::normalization::detail::AutomaticRules< Coordinates, Plan, dependencies::KeyList< Values... >, utils::types::TypeList< Equations... > > serif::model::normalization::detail::SelectPlan serif::model::normalization::detail::SelectPlan< numerical::AutomaticPlan, Coordinates, Bound > serif::model::normalization::detail::MethodMetrics serif::model::normalization::detail::MethodMetrics< numerical::PhysicalRieszCoordinate< Quantity, Metric > > serif::model::normalization::detail::MethodMetrics< numerical::DimensionlessRieszCoordinate< Quantity, Metric, Geometry > > serif::model::normalization::detail::MethodMetrics< numerical::WithPointRows< Method, Quantity, Selection > > serif::model::normalization::detail::RuleMetrics< dependencies::Bindings< Rules... > > serif serif::model serif::model::normalization serif::model::normalization::detail #pragmaonce #include"serif/model/equilibrium_plan.hpp" #include"serif/solver/normalization/configuration.hpp" #include"serif/solver/normalization/physical_coordinates.hpp" namespaceserif::model::normalization{ structSurfaceRowsfinal{}; structInfinityRowsfinal{}; namespacedetail{ namespacenumerical=solver::normalization; namespacedependencies=utils::dependencies; namespaceblocks=discretization::blocks; template<typenameCoordinates,typenameQuantity,typenameMetric> usingCoordinate=numerical::DimensionlessRieszCoordinate<Quantity,Metric>; template<typenameTerm,boolSpatial=blocks::SpatialTerm<Term>> structMetric{ usingType=numerical::UnitMetric; }; template<typenameTerm> structMetric<Term,true>{ usingType=numerical::ReferenceVolumeMetric<Term>; }; template<typenameCoordinates,typenameTerm> structValueRule{ usingType=dependencies::Binding<Term,Coordinate<Coordinates,typenameTerm::Quantity,typenameMetric<Term>::Type>>; }; template<typenameCoordinates> structValueRule<Coordinates,blocks::surface_deformation::coefficients>{ usingType=dependencies::Binding<blocks::surface_deformation::coefficients, Coordinate<Coordinates, dimensions::Length, geometry::deformation::keys::SurfaceMetric>>; }; template<typenameMethod,typenameRow,typenamePlan,boolSurface=Plan::has_surface> structSurfaceRule{ usingType=Method; }; template<typenameMethod,typenameRow,typenamePlan> structSurfaceRule<Method,Row,Plan,true>{ usingFormulation=typenamePlan::Surface::Formulation; usingType=std::conditional_t<std::same_as<Row,typenameFormulation::Test>, numerical::WithPointRows<Method,typenameFormulation::ResidualQuantity,SurfaceRows>,Method>; }; template<typenameMethod,typenameRow,typenamePlan> structInfinityRule{ usingType=std::conditional_t<Plan::has_primal_gravity&&std::same_as<Row,blocks::gravity::potential>, numerical::WithPointRows<Method,dimensions::GravitationalPotential,InfinityRows>,Method>; }; template<typenameInterior,typenameShape> structResidualRules; template<typename...Interior,typename...Shape> structResidualRules<dependencies::Bindings<Interior...>,dependencies::Bindings<Shape...>>{ usingType=dependencies::Bindings<Interior...,Shape...>; }; template<typenameCoordinates,typenamePlan,typenameValues,typenameEquations> structAutomaticRules; template<typenameCoordinates,typenamePlan,typename...Values,typename...Equations> structAutomaticRules<Coordinates,Plan,dependencies::KeyList<Values...>,utils::types::TypeList<Equations...>>{ static_assert((requires{typenameEquations::ResidualQuantity;}&&...), "Automaticnormalizationrequiresaresidualquantityforeachequation;otherwisesupplyanexplicitnormalizationplan."); usingValueRules=dependencies::Bindings<typenameValueRule<Coordinates,Values>::Type...>; usingInteriorRules=dependencies::Bindings<dependencies::Binding<typenameEquations::Test, typenameInfinityRule<typename SurfaceRule<Coordinate<Coordinates, typename Equations::ResidualQuantity, typename Metric<typename Equations::Test>::Type>,typenameEquations::Test,Plan>::Type, typenameEquations::Test,Plan>::Type>...>; usingShapeRules=std::conditional_t<Plan::has_shape, dependencies::Bindings<dependencies::Binding<blocks::surface_deformation::shape_equilibrium, Coordinate<Coordinates, dimensions::GravitationalPotential, numerical::UnitMetric>>>,dependencies::Bindings<>>; usingType=numerical::NormalizationPlan<ValueRules,typenameResidualRules<InteriorRules,ShapeRules>::Type>; }; template<typenameSelection,typenameCoordinates,typenameBound> structSelectPlan{ usingType=Selection; }; template<typenameCoordinates,typenameBound> structSelectPlan<numerical::AutomaticPlan,Coordinates,Bound>:AutomaticRules<Coordinates,typenameBound::Plan, typenameBound::Plan::Values,typenameBound::Plan::ResidualEquations>{}; template<typenameMethod> structMethodMetrics{ usingType=dependencies::KeyList<>; }; template<typenameQuantity,typenameMetric> structMethodMetrics<numerical::PhysicalRieszCoordinate<Quantity,Metric>>{ usingType=dependencies::KeyList<Metric>; }; template<typenameQuantity,typenameMetric,numerical::ReferenceGeometryGeometry> structMethodMetrics<numerical::DimensionlessRieszCoordinate<Quantity,Metric,Geometry>>{ usingType=dependencies::KeyList<Metric>; }; template<typenameMethod,typenameQuantity,typenameSelection> structMethodMetrics<numerical::WithPointRows<Method,Quantity,Selection>>:MethodMetrics<Method>{}; template<typenameRules> structRuleMetrics; template<typename...Rules> structRuleMetrics<dependencies::Bindings<Rules...>>{ usingType=dependencies::CombinedKeyList<typenameMethodMetrics<typenameRules::Target>::Type...>; }; } template<typenameSelection,typenameCoordinates,typenameBound> usingPlanFor=typenamedetail::SelectPlan<Selection, Coordinates, Bound>::Type; template<typenamePlan> usingMetricsFor=utils::dependencies::CombinedKeyList<typename detail::RuleMetrics<typename Plan::Values>::Type, typenamedetail::RuleMetrics<typename Plan::Residuals>::Type>; }