Commit ebcf1213 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Fixing the Lax-Fridrichs scheme.

parent 2ff4b2bf
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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();
+1 −1
Original line number Diff line number Diff line
@@ -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;
}

+3 −0
Original line number Diff line number Diff line
@@ -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,