Loading examples/advection/advectionProblem.h +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ class advectionProblem: int dimension; tnlString choice; RealType size; int step = 0; long step = 0; MeshFunctionType analyt; RealType speedX; RealType speedY; Loading examples/advection/advectionProblem_impl.h +9 −0 Original line number Diff line number Diff line Loading @@ -290,6 +290,7 @@ makeSnapshot( const RealType& time, FileNameBaseNumberEnding( "a-", step, 5, ".tnl", fileName ); if( ! this->analyt.save( fileName ) ) return false; cin.ignore(); return true; } Loading @@ -310,6 +311,8 @@ getExplicitRHS( const RealType& time, typedef typename MeshType::Cell Cell; double count = mesh.template getEntitiesCount< Cell >(); double inverseSquareCount = sqrt(count); if (tau > 10e-9) { if (this->choice == "square") { if (dimension == 1) Loading Loading @@ -409,6 +412,12 @@ getExplicitRHS( const RealType& time, }; }; }; }; /* cout << step << endl; cout << tau << endl; cout << this->speedX << endl; cout << step * 10 * tau * this->speedX<< endl;*/ this->bindDofs( mesh, _u ); tnlExplicitUpdater< Mesh, MeshFunctionType, DifferentialOperator, BoundaryCondition, RightHandSide > explicitUpdater; MeshFunctionType u( mesh, _u ); Loading examples/inviscid-flow/2d/eulerProblem_impl.h +4 −4 Original line number Diff line number Diff line Loading @@ -143,7 +143,7 @@ setInitialCondition( const tnlParameterContainer& parameters, uRho[j*sqrt(size)+i] = rhoLd; uRhoVelocityX[j*sqrt(size)+i] = rhoLd * velLdX; uRhoVelocityY[j*sqrt(size)+i] = rhoLd * velLdY; uEnergy[j*sqrt(size)+i] = eL; uEnergy[j*sqrt(size)+i] = eLd; velocity[j*sqrt(size)+i] = sqrt(pow(velLdX,2)+pow(velLdY,2)); velocityX[j*sqrt(size)+i] = velLdX; velocityY[j*sqrt(size)+i] = velLdY; Loading @@ -153,8 +153,8 @@ setInitialCondition( const tnlParameterContainer& parameters, if ((i >= x0 * sqrt(size))&&(j < x0 * sqrt(size)) ) { uRho[j*sqrt(size)+i] = rhoLu; uRhoVelocityX[j*sqrt(size)+i] = rhoLu * velLXu; uRhoVelocityY[j*sqrt(size)+i] = rhoLu * velLYu; uRhoVelocityX[j*sqrt(size)+i] = rhoLu * velLuX; uRhoVelocityY[j*sqrt(size)+i] = rhoLu * velLuY; uEnergy[j*sqrt(size)+i] = eLu; velocity[j*sqrt(size)+i] = sqrt(pow(velLuX,2)+pow(velLuY,2)); velocityX[j*sqrt(size)+i] = velLuX; Loading @@ -164,7 +164,7 @@ setInitialCondition( const tnlParameterContainer& parameters, else if ((i >= x0 * sqrt(size))&&(j >= x0 * sqrt(size)) ) { uRho[j*sqrt(size)+i] = rhoR; uRho[j*sqrt(size)+i] = rhoRu; uRhoVelocityX[j*sqrt(size)+i] = rhoRu * velRuX; uRhoVelocityY[j*sqrt(size)+i] = rhoRu * velRuY; uEnergy[j*sqrt(size)+i] = eRu; Loading Loading
examples/advection/advectionProblem.h +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ class advectionProblem: int dimension; tnlString choice; RealType size; int step = 0; long step = 0; MeshFunctionType analyt; RealType speedX; RealType speedY; Loading
examples/advection/advectionProblem_impl.h +9 −0 Original line number Diff line number Diff line Loading @@ -290,6 +290,7 @@ makeSnapshot( const RealType& time, FileNameBaseNumberEnding( "a-", step, 5, ".tnl", fileName ); if( ! this->analyt.save( fileName ) ) return false; cin.ignore(); return true; } Loading @@ -310,6 +311,8 @@ getExplicitRHS( const RealType& time, typedef typename MeshType::Cell Cell; double count = mesh.template getEntitiesCount< Cell >(); double inverseSquareCount = sqrt(count); if (tau > 10e-9) { if (this->choice == "square") { if (dimension == 1) Loading Loading @@ -409,6 +412,12 @@ getExplicitRHS( const RealType& time, }; }; }; }; /* cout << step << endl; cout << tau << endl; cout << this->speedX << endl; cout << step * 10 * tau * this->speedX<< endl;*/ this->bindDofs( mesh, _u ); tnlExplicitUpdater< Mesh, MeshFunctionType, DifferentialOperator, BoundaryCondition, RightHandSide > explicitUpdater; MeshFunctionType u( mesh, _u ); Loading
examples/inviscid-flow/2d/eulerProblem_impl.h +4 −4 Original line number Diff line number Diff line Loading @@ -143,7 +143,7 @@ setInitialCondition( const tnlParameterContainer& parameters, uRho[j*sqrt(size)+i] = rhoLd; uRhoVelocityX[j*sqrt(size)+i] = rhoLd * velLdX; uRhoVelocityY[j*sqrt(size)+i] = rhoLd * velLdY; uEnergy[j*sqrt(size)+i] = eL; uEnergy[j*sqrt(size)+i] = eLd; velocity[j*sqrt(size)+i] = sqrt(pow(velLdX,2)+pow(velLdY,2)); velocityX[j*sqrt(size)+i] = velLdX; velocityY[j*sqrt(size)+i] = velLdY; Loading @@ -153,8 +153,8 @@ setInitialCondition( const tnlParameterContainer& parameters, if ((i >= x0 * sqrt(size))&&(j < x0 * sqrt(size)) ) { uRho[j*sqrt(size)+i] = rhoLu; uRhoVelocityX[j*sqrt(size)+i] = rhoLu * velLXu; uRhoVelocityY[j*sqrt(size)+i] = rhoLu * velLYu; uRhoVelocityX[j*sqrt(size)+i] = rhoLu * velLuX; uRhoVelocityY[j*sqrt(size)+i] = rhoLu * velLuY; uEnergy[j*sqrt(size)+i] = eLu; velocity[j*sqrt(size)+i] = sqrt(pow(velLuX,2)+pow(velLuY,2)); velocityX[j*sqrt(size)+i] = velLuX; Loading @@ -164,7 +164,7 @@ setInitialCondition( const tnlParameterContainer& parameters, else if ((i >= x0 * sqrt(size))&&(j >= x0 * sqrt(size)) ) { uRho[j*sqrt(size)+i] = rhoR; uRho[j*sqrt(size)+i] = rhoRu; uRhoVelocityX[j*sqrt(size)+i] = rhoRu * velRuX; uRhoVelocityY[j*sqrt(size)+i] = rhoRu * velRuY; uEnergy[j*sqrt(size)+i] = eRu; Loading