Loading examples/navier-stokes/navierStokesSolver.h +2 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,8 @@ class navierStokesSolver navierStokesBoundaryConditions< MeshType > boundaryConditions; navierStokesSolverMonitor< RealType, IndexType > solverMonitor; IndexType rhsIndex; }; #include "navierStokesSolver_impl.h" Loading examples/navier-stokes/navierStokesSolver_impl.h +8 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,8 @@ __device__ void computeVelocityFieldCuda( const Index size, template< typename Mesh, typename EulerScheme > navierStokesSolver< Mesh, EulerScheme > :: navierStokesSolver() : p_0( 0.0 ), T( 0.0 ) T( 0.0 ), rhsIndex( 0 ) { this -> mesh. setName( "navier-stokes-mesh" ); Loading Loading @@ -272,6 +273,12 @@ void navierStokesSolver< Mesh, EulerScheme > :: GetExplicitRHS( const RealType& solverMonitor.uAvg = this->mesh.getLpNorm( nsSolver.getU(), 1.0 ); solverMonitor.eMax = this->mesh.getAbsMax( nsSolver.getEnergy() ); solverMonitor.eAvg = this->mesh.getLpNorm( nsSolver.getEnergy(), 1.0 ); /*this->rhsIndex++; nsSolver.writePhysicalVariables( time, this->rhsIndex ); nsSolver.writeConservativeVariables( time, this->rhsIndex ); nsSolver.writeExplicitRhs( time, this->rhsIndex, fu ); getchar();*/ } template< typename Mesh, typename EulerScheme > Loading src/core/vectors/tnlSharedVector.h +4 −0 Original line number Diff line number Diff line Loading @@ -115,8 +115,12 @@ class tnlSharedVector : public tnlSharedArray< Real, Device, Index > void computePrefixSum(); void computePrefixSum( const IndexType begin, const IndexType end ); void computeExclusivePrefixSum(); void computeExclusivePrefixSum( const IndexType begin, const IndexType end ); }; #include <implementation/core/vectors/tnlSharedVector_impl.h> Loading src/core/vectors/tnlVector.h +4 −0 Original line number Diff line number Diff line Loading @@ -117,7 +117,11 @@ class tnlVector : public tnlArray< Real, Device, Index > void computePrefixSum(); void computePrefixSum( const IndexType begin, const IndexType end ); void computeExclusivePrefixSum(); void computeExclusivePrefixSum( const IndexType begin, const IndexType end ); }; #include <implementation/core/vectors/tnlVector_impl.h> Loading src/core/vectors/tnlVectorOperations.h +12 −4 Original line number Diff line number Diff line Loading @@ -109,10 +109,14 @@ class tnlVectorOperations< tnlHost > const typename Vector1::RealType& beta ); template< typename Vector > static void computePrefixSum( Vector& v ); static void computePrefixSum( Vector& v, const typename Vector::IndexType begin, const typename Vector::IndexType end ); template< typename Vector > static void computeExclusivePrefixSum( Vector& v ); static void computeExclusivePrefixSum( Vector& v, const typename Vector::IndexType begin, const typename Vector::IndexType end ); }; Loading Loading @@ -198,10 +202,14 @@ class tnlVectorOperations< tnlCuda > const typename Vector1::RealType& beta ); template< typename Vector > static void computePrefixSum( Vector& v ); static void computePrefixSum( Vector& v, const typename Vector::IndexType begin, const typename Vector::IndexType end ); template< typename Vector > static void computeExclusivePrefixSum( Vector& v ); static void computeExclusivePrefixSum( Vector& v, const typename Vector::IndexType begin, const typename Vector::IndexType end ); }; #include <implementation/core/vectors/tnlVectorOperationsHost_impl.h> Loading Loading
examples/navier-stokes/navierStokesSolver.h +2 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,8 @@ class navierStokesSolver navierStokesBoundaryConditions< MeshType > boundaryConditions; navierStokesSolverMonitor< RealType, IndexType > solverMonitor; IndexType rhsIndex; }; #include "navierStokesSolver_impl.h" Loading
examples/navier-stokes/navierStokesSolver_impl.h +8 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,8 @@ __device__ void computeVelocityFieldCuda( const Index size, template< typename Mesh, typename EulerScheme > navierStokesSolver< Mesh, EulerScheme > :: navierStokesSolver() : p_0( 0.0 ), T( 0.0 ) T( 0.0 ), rhsIndex( 0 ) { this -> mesh. setName( "navier-stokes-mesh" ); Loading Loading @@ -272,6 +273,12 @@ void navierStokesSolver< Mesh, EulerScheme > :: GetExplicitRHS( const RealType& solverMonitor.uAvg = this->mesh.getLpNorm( nsSolver.getU(), 1.0 ); solverMonitor.eMax = this->mesh.getAbsMax( nsSolver.getEnergy() ); solverMonitor.eAvg = this->mesh.getLpNorm( nsSolver.getEnergy(), 1.0 ); /*this->rhsIndex++; nsSolver.writePhysicalVariables( time, this->rhsIndex ); nsSolver.writeConservativeVariables( time, this->rhsIndex ); nsSolver.writeExplicitRhs( time, this->rhsIndex, fu ); getchar();*/ } template< typename Mesh, typename EulerScheme > Loading
src/core/vectors/tnlSharedVector.h +4 −0 Original line number Diff line number Diff line Loading @@ -115,8 +115,12 @@ class tnlSharedVector : public tnlSharedArray< Real, Device, Index > void computePrefixSum(); void computePrefixSum( const IndexType begin, const IndexType end ); void computeExclusivePrefixSum(); void computeExclusivePrefixSum( const IndexType begin, const IndexType end ); }; #include <implementation/core/vectors/tnlSharedVector_impl.h> Loading
src/core/vectors/tnlVector.h +4 −0 Original line number Diff line number Diff line Loading @@ -117,7 +117,11 @@ class tnlVector : public tnlArray< Real, Device, Index > void computePrefixSum(); void computePrefixSum( const IndexType begin, const IndexType end ); void computeExclusivePrefixSum(); void computeExclusivePrefixSum( const IndexType begin, const IndexType end ); }; #include <implementation/core/vectors/tnlVector_impl.h> Loading
src/core/vectors/tnlVectorOperations.h +12 −4 Original line number Diff line number Diff line Loading @@ -109,10 +109,14 @@ class tnlVectorOperations< tnlHost > const typename Vector1::RealType& beta ); template< typename Vector > static void computePrefixSum( Vector& v ); static void computePrefixSum( Vector& v, const typename Vector::IndexType begin, const typename Vector::IndexType end ); template< typename Vector > static void computeExclusivePrefixSum( Vector& v ); static void computeExclusivePrefixSum( Vector& v, const typename Vector::IndexType begin, const typename Vector::IndexType end ); }; Loading Loading @@ -198,10 +202,14 @@ class tnlVectorOperations< tnlCuda > const typename Vector1::RealType& beta ); template< typename Vector > static void computePrefixSum( Vector& v ); static void computePrefixSum( Vector& v, const typename Vector::IndexType begin, const typename Vector::IndexType end ); template< typename Vector > static void computeExclusivePrefixSum( Vector& v ); static void computeExclusivePrefixSum( Vector& v, const typename Vector::IndexType begin, const typename Vector::IndexType end ); }; #include <implementation/core/vectors/tnlVectorOperationsHost_impl.h> Loading