Commit e46b224a authored by Jan Schäfer's avatar Jan Schäfer
Browse files

euler 1D is running, boundary conditions not

parent 03d6239e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 ]);
      }

      
+1 −1
Original line number Diff line number Diff line
@@ -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 ];
      }

      
+2 −2
Original line number Diff line number Diff line
@@ -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 >
@@ -147,7 +147,7 @@ class LaxFridrichsContinuity< tnlGrid< 3,MeshReal, Device, MeshIndex >, Real, In

      void setVelocity(MeshFunctionType& velocity)
      {
          velocity.bind( velocity );
          this->velocity.bind( velocity );
      };


+1 −1
Original line number Diff line number Diff line
@@ -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 ] );
}

+12 −12
Original line number Diff line number Diff line
@@ -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 >
@@ -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 >
@@ -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