Loading examples/inviscid-flow/2d/EulerPressureGetter.h +2 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,8 @@ class EulerPressureGetter __cuda_callable__ Real operator[]( const IndexType& idx ) const { return ( this->gamma - 1.0 ) * ( this->energy[ idx ] - 0.5 * this->rho[ idx ] * if (this->rho[ idx ]==0) return 0; else return ( this->gamma - 1.0 ) * ( this->energy[ idx ] - 0.5 * this->rho[ idx ] * ( this->rhoVelX[ idx ] / this->rho[ idx ] + this->rhoVelY[ idx ] / this->rho[ idx ]) ); } Loading examples/inviscid-flow/2d/EulerVelGetter.h +2 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,8 @@ class EulerVelGetter __cuda_callable__ Real operator[]( const IndexType& idx ) const { return sqrt( pow( this->rhoVelX[ idx ] / this->rho[ idx ], 2) + pow( this->rhoVelY[ idx ] / this->rho[ idx ], 2) ) ; cout << idx << endl; if (this->rho[ idx ]==0) return 0; else return sqrt( pow( this->rhoVelX[ idx ] / this->rho[ idx ], 2) + pow( this->rhoVelY[ idx ] / this->rho[ idx ], 2) ) ; } Loading examples/inviscid-flow/2d/EulerVelXGetter.h +1 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ class EulerVelXGetter __cuda_callable__ Real operator[]( const IndexType& idx ) const { return this->rhoVel[ idx ] / this->rho[ idx ]; if (this->rho[ idx ]==0) return 0; else return this->rhoVel[ idx ] / this->rho[ idx ]; } Loading examples/inviscid-flow/2d/LaxFridrichsContinuity.h +12 −12 Original line number Diff line number Diff line Loading @@ -37,14 +37,14 @@ class LaxFridrichsContinuity< tnlGrid< 1,MeshReal, Device, MeshIndex >, Real, In this->tau = tau; }; void setVelocityX(const MeshFunctionType& velocityX) void setVelocityX(MeshFunctionType& velocityX) { this->velocityX = velocityX; this->velocityX.bind(velocityX); }; void setVelocityY(const MeshFunctionType& velocityY) void setVelocityY(MeshFunctionType& velocityY) { this->velocityY = velocityY; this->velocityY.bind(velocityY); }; Loading Loading @@ -98,14 +98,14 @@ class LaxFridrichsContinuity< tnlGrid< 2,MeshReal, Device, MeshIndex >, Real, In this->tau = tau; }; void setVelocityX(const MeshFunctionType& velocityX) void setVelocityX(MeshFunctionType& velocityX) { this->velocityX = velocityX; this->velocityX.bind(velocityX); }; void setVelocityY(const MeshFunctionType& velocityY) void setVelocityY(MeshFunctionType& velocityY) { this->velocityY = velocityY; this->velocityY.bind(velocityY); }; Loading Loading @@ -159,14 +159,14 @@ class LaxFridrichsContinuity< tnlGrid< 3,MeshReal, Device, MeshIndex >, Real, In this->tau = tau; }; void setVelocityX(const MeshFunctionType& velocityX) void setVelocityX(MeshFunctionType& velocityX) { this->velocityX = velocityX; this->velocityX.bind(velocityX); }; void setVelocityY(const MeshFunctionType& velocityY) void setVelocityY(MeshFunctionType& velocityY) { this->velocityY = velocityY; this->velocityY.bind(velocityY); }; Loading examples/inviscid-flow/2d/LaxFridrichsContinuity_impl .h +2 −2 Original line number Diff line number Diff line Loading @@ -152,9 +152,9 @@ operator()( const MeshFunction& u, const IndexType& west = neighbourEntities.template getEntityIndex< -1, 0 >(); const IndexType& north = neighbourEntities.template getEntityIndex< 0, 1 >(); const IndexType& south = neighbourEntities.template getEntityIndex< 0, -1 >(); return (0.5 * this->tau) * ( u[ west ] + u[ east ] + u[ south ] + u[ north ] - 4.0 * u[ center ] ) return (0.25 / this->tau) * ( u[ west ] + u[ east ] + u[ south ] + u[ north ] - 4.0 * u[ center ] ) - 0.5 * hxInverse * ( u[ west ] * this->velocityX[ west ] - u[ east ] * this->velocityX[ east ] ) - 0.5 * hyInverse * ( u[ north ] * this->velocityY[ north ] - u[ south ] * this->velocityY[ east ] ); - 0.5 * hyInverse * ( u[ south ] * this->velocityY[ south ] - u[ north ] * this->velocityY[ north ] ); } template< typename MeshReal, Loading Loading
examples/inviscid-flow/2d/EulerPressureGetter.h +2 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,8 @@ class EulerPressureGetter __cuda_callable__ Real operator[]( const IndexType& idx ) const { return ( this->gamma - 1.0 ) * ( this->energy[ idx ] - 0.5 * this->rho[ idx ] * if (this->rho[ idx ]==0) return 0; else return ( this->gamma - 1.0 ) * ( this->energy[ idx ] - 0.5 * this->rho[ idx ] * ( this->rhoVelX[ idx ] / this->rho[ idx ] + this->rhoVelY[ idx ] / this->rho[ idx ]) ); } Loading
examples/inviscid-flow/2d/EulerVelGetter.h +2 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,8 @@ class EulerVelGetter __cuda_callable__ Real operator[]( const IndexType& idx ) const { return sqrt( pow( this->rhoVelX[ idx ] / this->rho[ idx ], 2) + pow( this->rhoVelY[ idx ] / this->rho[ idx ], 2) ) ; cout << idx << endl; if (this->rho[ idx ]==0) return 0; else return sqrt( pow( this->rhoVelX[ idx ] / this->rho[ idx ], 2) + pow( this->rhoVelY[ idx ] / this->rho[ idx ], 2) ) ; } Loading
examples/inviscid-flow/2d/EulerVelXGetter.h +1 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ class EulerVelXGetter __cuda_callable__ Real operator[]( const IndexType& idx ) const { return this->rhoVel[ idx ] / this->rho[ idx ]; if (this->rho[ idx ]==0) return 0; else return this->rhoVel[ idx ] / this->rho[ idx ]; } Loading
examples/inviscid-flow/2d/LaxFridrichsContinuity.h +12 −12 Original line number Diff line number Diff line Loading @@ -37,14 +37,14 @@ class LaxFridrichsContinuity< tnlGrid< 1,MeshReal, Device, MeshIndex >, Real, In this->tau = tau; }; void setVelocityX(const MeshFunctionType& velocityX) void setVelocityX(MeshFunctionType& velocityX) { this->velocityX = velocityX; this->velocityX.bind(velocityX); }; void setVelocityY(const MeshFunctionType& velocityY) void setVelocityY(MeshFunctionType& velocityY) { this->velocityY = velocityY; this->velocityY.bind(velocityY); }; Loading Loading @@ -98,14 +98,14 @@ class LaxFridrichsContinuity< tnlGrid< 2,MeshReal, Device, MeshIndex >, Real, In this->tau = tau; }; void setVelocityX(const MeshFunctionType& velocityX) void setVelocityX(MeshFunctionType& velocityX) { this->velocityX = velocityX; this->velocityX.bind(velocityX); }; void setVelocityY(const MeshFunctionType& velocityY) void setVelocityY(MeshFunctionType& velocityY) { this->velocityY = velocityY; this->velocityY.bind(velocityY); }; Loading Loading @@ -159,14 +159,14 @@ class LaxFridrichsContinuity< tnlGrid< 3,MeshReal, Device, MeshIndex >, Real, In this->tau = tau; }; void setVelocityX(const MeshFunctionType& velocityX) void setVelocityX(MeshFunctionType& velocityX) { this->velocityX = velocityX; this->velocityX.bind(velocityX); }; void setVelocityY(const MeshFunctionType& velocityY) void setVelocityY(MeshFunctionType& velocityY) { this->velocityY = velocityY; this->velocityY.bind(velocityY); }; Loading
examples/inviscid-flow/2d/LaxFridrichsContinuity_impl .h +2 −2 Original line number Diff line number Diff line Loading @@ -152,9 +152,9 @@ operator()( const MeshFunction& u, const IndexType& west = neighbourEntities.template getEntityIndex< -1, 0 >(); const IndexType& north = neighbourEntities.template getEntityIndex< 0, 1 >(); const IndexType& south = neighbourEntities.template getEntityIndex< 0, -1 >(); return (0.5 * this->tau) * ( u[ west ] + u[ east ] + u[ south ] + u[ north ] - 4.0 * u[ center ] ) return (0.25 / this->tau) * ( u[ west ] + u[ east ] + u[ south ] + u[ north ] - 4.0 * u[ center ] ) - 0.5 * hxInverse * ( u[ west ] * this->velocityX[ west ] - u[ east ] * this->velocityX[ east ] ) - 0.5 * hyInverse * ( u[ north ] * this->velocityY[ north ] - u[ south ] * this->velocityY[ east ] ); - 0.5 * hyInverse * ( u[ south ] * this->velocityY[ south ] - u[ north ] * this->velocityY[ north ] ); } template< typename MeshReal, Loading