Loading examples/inviscid-flow/1d/EulerPressureGetter.h +1 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ class EulerPressureGetter __cuda_callable__ Real operator[]( const IndexType& idx ) const { return ( this->gamma - 1.0 ) * ( this->energy[ idx ] - 0.5 * this->rhoVel[ idx ] * this->rhoVel[ idx ] / this->rho[ idx ]); if (this->rho[ idx ]==0) return 0; else return ( this->gamma - 1.0 ) * ( this->energy[ idx ] - 0.5 * this->rhoVel[ idx ] * this->rhoVel[ idx ] / this->rho[ idx ]); } Loading examples/inviscid-flow/1d/EulerVelGetter.h +1 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ class EulerVelGetter __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/1d/LaxFridrichsContinuity.h +2 −2 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ class LaxFridrichsContinuity< tnlGrid< 1,MeshReal, Device, MeshIndex >, Real, In void setVelocity(MeshFunctionType& velocity) { velocity.bind( velocity ); this->velocity.bind( velocity ); }; template< typename MeshFunction, typename MeshEntity > Loading Loading @@ -147,7 +147,7 @@ class LaxFridrichsContinuity< tnlGrid< 3,MeshReal, Device, MeshIndex >, Real, In void setVelocity(MeshFunctionType& velocity) { velocity.bind( velocity ); this->velocity.bind( velocity ); }; Loading examples/inviscid-flow/1d/LaxFridrichsContinuity_impl.h +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ operator()( const MeshFunction& u, const IndexType& center = entity.getIndex(); const IndexType& east = neighbourEntities.template getEntityIndex< 1 >(); const IndexType& west = neighbourEntities.template getEntityIndex< -1 >(); return (0.5 * this->tau) * ( u[ west ] - 2.0 * u[ center ] + u[ east ] ) return (0.5 / this->tau) * ( u[ west ] - 2.0 * u[ center ] + u[ east ] ) - 0.5 * hxInverse * ( u[ west ] * this->velocity[ west ] - u[ east ] * this->velocity[ east ] ); } Loading examples/inviscid-flow/1d/LaxFridrichsEnergy.h +12 −12 Original line number Diff line number Diff line Loading @@ -37,14 +37,14 @@ class LaxFridrichsEnergy< tnlGrid< 1,MeshReal, Device, MeshIndex >, Real, Index this->tau = tau; }; void setVelocity(const MeshFunctionType& velocity) void setVelocity(MeshFunctionType& velocity) { this->velocity = velocity; this->velocity.bind(velocity); }; void setPressure(const MeshFunctionType& pressure) void setPressure(MeshFunctionType& pressure) { this->pressure = pressure; this->pressure.bind(pressure); }; template< typename MeshFunction, typename MeshEntity > Loading Loading @@ -97,14 +97,14 @@ class LaxFridrichsEnergy< tnlGrid< 2,MeshReal, Device, MeshIndex >, Real, Index this->tau = tau; }; void setVelocity(const MeshFunctionType& velocity) void setVelocity(MeshFunctionType& velocity) { this->velocity = velocity; this->velocity.bind(velocity); }; void setPressure(const MeshFunctionType& pressure) void setPressure(MeshFunctionType& pressure) { this->pressure = pressure; this->pressure.bind(pressure); }; template< typename MeshFunction, typename MeshEntity > Loading Loading @@ -157,14 +157,14 @@ class LaxFridrichsEnergy< tnlGrid< 3,MeshReal, Device, MeshIndex >, Real, Index this->tau = tau; }; void setVelocity(const MeshFunctionType& velocity) void setVelocity(MeshFunctionType& velocity) { this->velocity = velocity; this->velocity.bind(velocity); }; void setPressure(const MeshFunctionType& pressure) void setPressure(MeshFunctionType& pressure) { this->pressure = pressure; this->pressure.bind(pressure); }; template< typename MeshFunction, typename MeshEntity > Loading Loading
examples/inviscid-flow/1d/EulerPressureGetter.h +1 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ class EulerPressureGetter __cuda_callable__ Real operator[]( const IndexType& idx ) const { return ( this->gamma - 1.0 ) * ( this->energy[ idx ] - 0.5 * this->rhoVel[ idx ] * this->rhoVel[ idx ] / this->rho[ idx ]); if (this->rho[ idx ]==0) return 0; else return ( this->gamma - 1.0 ) * ( this->energy[ idx ] - 0.5 * this->rhoVel[ idx ] * this->rhoVel[ idx ] / this->rho[ idx ]); } Loading
examples/inviscid-flow/1d/EulerVelGetter.h +1 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ class EulerVelGetter __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/1d/LaxFridrichsContinuity.h +2 −2 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ class LaxFridrichsContinuity< tnlGrid< 1,MeshReal, Device, MeshIndex >, Real, In void setVelocity(MeshFunctionType& velocity) { velocity.bind( velocity ); this->velocity.bind( velocity ); }; template< typename MeshFunction, typename MeshEntity > Loading Loading @@ -147,7 +147,7 @@ class LaxFridrichsContinuity< tnlGrid< 3,MeshReal, Device, MeshIndex >, Real, In void setVelocity(MeshFunctionType& velocity) { velocity.bind( velocity ); this->velocity.bind( velocity ); }; Loading
examples/inviscid-flow/1d/LaxFridrichsContinuity_impl.h +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ operator()( const MeshFunction& u, const IndexType& center = entity.getIndex(); const IndexType& east = neighbourEntities.template getEntityIndex< 1 >(); const IndexType& west = neighbourEntities.template getEntityIndex< -1 >(); return (0.5 * this->tau) * ( u[ west ] - 2.0 * u[ center ] + u[ east ] ) return (0.5 / this->tau) * ( u[ west ] - 2.0 * u[ center ] + u[ east ] ) - 0.5 * hxInverse * ( u[ west ] * this->velocity[ west ] - u[ east ] * this->velocity[ east ] ); } Loading
examples/inviscid-flow/1d/LaxFridrichsEnergy.h +12 −12 Original line number Diff line number Diff line Loading @@ -37,14 +37,14 @@ class LaxFridrichsEnergy< tnlGrid< 1,MeshReal, Device, MeshIndex >, Real, Index this->tau = tau; }; void setVelocity(const MeshFunctionType& velocity) void setVelocity(MeshFunctionType& velocity) { this->velocity = velocity; this->velocity.bind(velocity); }; void setPressure(const MeshFunctionType& pressure) void setPressure(MeshFunctionType& pressure) { this->pressure = pressure; this->pressure.bind(pressure); }; template< typename MeshFunction, typename MeshEntity > Loading Loading @@ -97,14 +97,14 @@ class LaxFridrichsEnergy< tnlGrid< 2,MeshReal, Device, MeshIndex >, Real, Index this->tau = tau; }; void setVelocity(const MeshFunctionType& velocity) void setVelocity(MeshFunctionType& velocity) { this->velocity = velocity; this->velocity.bind(velocity); }; void setPressure(const MeshFunctionType& pressure) void setPressure(MeshFunctionType& pressure) { this->pressure = pressure; this->pressure.bind(pressure); }; template< typename MeshFunction, typename MeshEntity > Loading Loading @@ -157,14 +157,14 @@ class LaxFridrichsEnergy< tnlGrid< 3,MeshReal, Device, MeshIndex >, Real, Index this->tau = tau; }; void setVelocity(const MeshFunctionType& velocity) void setVelocity(MeshFunctionType& velocity) { this->velocity = velocity; this->velocity.bind(velocity); }; void setPressure(const MeshFunctionType& pressure) void setPressure(MeshFunctionType& pressure) { this->pressure = pressure; this->pressure.bind(pressure); }; template< typename MeshFunction, typename MeshEntity > Loading