Branch data Line data Source code
1 : : /*! 2 : : \file src/PDE/CompFlow/Problem/RotatedSodShocktube.cpp 3 : : \copyright 2012-2015 J. Bakosi, 4 : : 2016-2018 Los Alamos National Security, LLC., 5 : : 2019-2021 Triad National Security, LLC. 6 : : All rights reserved. See the LICENSE file for details. 7 : : \brief Problem configuration for the compressible flow equations 8 : : \details This file defines a Problem policy class for the compressible flow 9 : : equations, defined in PDE/CompFlow/CompFlow.h. See PDE/CompFlow/Problem.h 10 : : for general requirements on Problem policy classes for CompFlow. 11 : : */ 12 : : // ***************************************************************************** 13 : : 14 : : #include "Vector.hpp" 15 : : #include "RotatedSodShocktube.hpp" 16 : : #include "EoS/EOS.hpp" 17 : : 18 : : using inciter::CompFlowProblemRotatedSodShocktube; 19 : : 20 : : tk::InitializeFn::result_type 21 : 153116 : CompFlowProblemRotatedSodShocktube::initialize( 22 : : ncomp_t ncomp, 23 : : const std::vector< EOS >& mat_blk, 24 : : tk::real x, 25 : : tk::real y, 26 : : tk::real z, 27 : : tk::real t ) 28 : : // ***************************************************************************** 29 : : //! Evaluate analytical solution at (x,y,z,t) for all components 30 : : //! \param[in] ncomp Number of scalar components in this PDE system 31 : : //! \param[in] x X coordinate where to evaluate the solution 32 : : //! \param[in] y Y coordinate where to evaluate the solution 33 : : //! \param[in] z Z coordinate where to evaluate the solution 34 : : //! \param[in] t Time at which to evaluate the solution 35 : : //! \return Values of all components evaluated at (x) 36 : : //! \note The function signature must follow tk::InitializeFn 37 : : // ***************************************************************************** 38 : : { 39 : : // Assume the domain is rotated by 45 degrees about the X, Y, and then Z 40 : : // axis compared to the original tube with largest dimension in X 41 : : tk::real a = -45.0*M_PI/180.0; 42 : 153116 : auto c = tk::rotateX( tk::rotateY( tk::rotateZ( {{ x, y, z }}, a ), a ), a ); 43 : : return CompFlowProblemSodShocktube:: 44 : 153116 : initialize( ncomp, mat_blk, c[0], c[1], c[2], t ); 45 : : }