From ebcf12130add01d0bcdf8f2d98d3217546ace624 Mon Sep 17 00:00:00 2001 From: Tomas Oberhuber <tomas.oberhuber@fjfi.cvut.cz> Date: Tue, 14 May 2013 17:23:25 +0200 Subject: [PATCH] Fixing the Lax-Fridrichs scheme. --- src/implementation/mesh/tnlGrid2D_impl.h | 4 ++-- src/implementation/mesh/tnlIdenticalGridGeometry_impl.h | 2 +- src/implementation/schemes/euler/fvm/tnlLaxFridrichs_impl.h | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/implementation/mesh/tnlGrid2D_impl.h b/src/implementation/mesh/tnlGrid2D_impl.h index fc8ce76308..b475d06f44 100644 --- a/src/implementation/mesh/tnlGrid2D_impl.h +++ b/src/implementation/mesh/tnlGrid2D_impl.h @@ -194,8 +194,8 @@ template< typename Real, void tnlGrid< 2, Real, Device, Index, Geometry > :: getElementCoordinates( const Index element, CoordinatesType& coordinates ) const { - tnlAssert( i >= 0 && i < dofs, - cerr << " i = " << i << " dofs = " << dofs + tnlAssert( element >= 0 && element < dofs, + cerr << " element = " << element << " dofs = " << dofs << " in tnlGrid " << this -> getName(); ); coordinates. x() = element % this -> dimensions. x(); diff --git a/src/implementation/mesh/tnlIdenticalGridGeometry_impl.h b/src/implementation/mesh/tnlIdenticalGridGeometry_impl.h index f288d9edbe..fdc91b8605 100644 --- a/src/implementation/mesh/tnlIdenticalGridGeometry_impl.h +++ b/src/implementation/mesh/tnlIdenticalGridGeometry_impl.h @@ -97,7 +97,7 @@ template< Index dx > void tnlIdenticalGridGeometry< 1, Real, Device, Index > :: getEdgeNormal( const Index i, VertexType& normal ) const { - tnlAssert( dx == 1 || dx == -1, cerr << " dx = " << dx << " dy = " << dy << endl ); + tnlAssert( dx == 1 || dx == -1, cerr << " dx = " << dx << endl ); normal. x() = dx; } diff --git a/src/implementation/schemes/euler/fvm/tnlLaxFridrichs_impl.h b/src/implementation/schemes/euler/fvm/tnlLaxFridrichs_impl.h index 352924c31a..44b2bf9abb 100644 --- a/src/implementation/schemes/euler/fvm/tnlLaxFridrichs_impl.h +++ b/src/implementation/schemes/euler/fvm/tnlLaxFridrichs_impl.h @@ -31,6 +31,9 @@ tnlLaxFridrichs< tnlGrid< 2, Real, Device, Index, GridGeometry >, mesh( 0 ), pressureGradient( 0 ) { + rho. setName( "Lax-Fridrichs:rho" ); + rho_u1. setName( "Lax-Fridrichs:rho_u1" ); + rho_u2. setName( "Lax-Fridrichs:rho_u2" ); } template< typename Real, -- GitLab