30 static constexpr int nVarsFlow = 5;
31 static constexpr int I4 = 4;
33 using TU = Eigen::Vector<real, nVarsFlow>;
34 using TDiffU = Eigen::Matrix<real, 3, nVarsFlow>;
36 using TUFull = Eigen::Vector<real, Eigen::Dynamic>;
37 using TDiffUFull = Eigen::Matrix<real, 3, Eigen::Dynamic>;
62 return v.template block<3, 1>(1, 0);
74 return v.template block<3, 1>(0, 0);
90 template <
class TDerived>
107 auto *dThis =
static_cast<TDerived *
>(
this);
109 auto wait_all = [&](std::string name,
auto &
v)
111 auto do_wait = [B, name](
auto &vv)
115 DNDS_check_throw_info(vv->trans.father.get() == vv->father.get(), name +
" needs father == trans.father");
126 vv->trans.waitPersistentPull(B);
131 for (
size_t i = 0; i <
v.size(); i++)
Degree-of-freedom array with vector-space operations (MPI-collective).
Core type aliases, constants, and metaprogramming utilities for the DNDS framework.
#define DNDS_DEVICE_CALLABLE
#define DNDS_check_throw_info(expr, info)
Same as DNDS_check_throw but attaches a user-supplied info message to the thrown std::runtime_error.
CRTP base class for packed kernel argument structs used by the Evaluator.
void WaitAllPull(DeviceBackend B)
Completes MPI ghost exchange for all ArrayDof members on the specified backend.
Namespace for the EulerP alternative evaluator module with GPU support.
Eigen::Vector< real, Eigen::Dynamic > TUFull
Dynamic-size state vector for extended variables (flow + turbulence model variables).
Eigen::Map< TUFull > TUFullMap
Eigen::Map wrapper for non-owning access to a dynamic-size state vector.
Eigen::Matrix< real, 3, Eigen::Dynamic > TDiffUFull
Dynamic-size 3xN spatial gradient for extended variables.
DNDS_DEVICE_CALLABLE DNDS_FORCEINLINE auto U123(TU &&v)
Extracts the momentum components (indices 1,2,3) from a state vector as a 3x1 block.
Eigen::Map< TDiffUFull > TDiffUFullMap
Eigen::Map wrapper for non-owning access to a dynamic-size gradient matrix.
Eigen::Vector< real, nVarsFlow > TU
Fixed-size 5-component conservative state vector (rho, rhoU, rhoV, rhoW, E).
DNDS_DEVICE_CALLABLE DNDS_FORCEINLINE auto U012(TU &&v)
Extracts the first 3 components (indices 0,1,2) from a vector as a 3x1 block.
Eigen::Matrix< real, 3, nVarsFlow > TDiffU
Fixed-size 3x5 spatial gradient of the conservative state (one row per spatial dimension).
DeviceBackend
Enumerates the backends a DeviceStorage / Array can live on.
const char * device_backend_name(DeviceBackend B)
Canonical string name for a DeviceBackend (used in log messages).
std::remove_cv_t< std::remove_reference_t< T > > remove_cvref_t
Convenience remove_cv + remove_reference composition (C++17 port of C++20's std::remove_cvref_t).
void for_each_member_ptr_list(Class &obj, TList &&obj_member_ptr_list, F &&f)
Invoke f(name, obj.*ptr) for every member in a list of MemberPtr.
Eigen::Matrix< real, 5, 1 > v