/* GRChombo * Copyright 2012 The GRChombo collaboration. * Please refer to LICENSE in GRChombo's root directory. */ #ifndef COSMODIAGNOSTICS_HPP_ #define COSMODIAGNOSTICS_HPP_ #include "CCZ4Geometry.hpp" #include "CCZ4Vars.hpp" #include "Cell.hpp" #include "Coordinates.hpp" #include "DiagnosticVariables.hpp" #include "FourthOrderDerivatives.hpp" #include "GRInterval.hpp" #include "NewMatterConstraints.hpp" #include "Tensor.hpp" #include "simd.hpp" #include //! Calculates all relevant variables, which //! are stored as diagnostics template class CosmoDiagnostics // public MatterConstraints { public: // Inherit the variable definitions from CCZ4 + matter_t template using CCZ4Vars = typename CCZ4::template Vars; template using MatterVars = typename matter_t::template Vars; template struct Vars : public CCZ4Vars, public MatterVars { /// Defines the mapping between members of Vars and Chombo grid /// variables (enum in User_Variables) template void enum_mapping(mapping_function_t mapping_function) { CCZ4Vars::enum_mapping(mapping_function); MatterVars::enum_mapping(mapping_function); } }; //! Constructor of class CosmoDiagnostics CosmoDiagnostics(const matter_t a_matter, double dx, double G_Newton) : m_matter(a_matter), m_deriv(dx) { } //! The compute member which calculates the diagnostics at each point in the //! box template void compute(Cell current_cell) const; protected: matter_t m_matter; //!< The matter object, e.g. a scalar field const FourthOrderDerivatives m_deriv; }; #include "CosmoDiagnostics.impl.hpp" #endif /* COSMODIAGNOSTICS_HPP_ */