Loading examples/CMakeLists.txt +1 −0 Original line number Diff line number Diff line Loading @@ -11,5 +11,6 @@ add_subdirectory( navier-stokes ) #add_subdirectory( narrow-band ) add_subdirectory( inviscid-flow ) add_subdirectory( inviscid-flow-sw ) #add_subdirectory( mean-curvature-flow ) add_subdirectory( flow ) examples/flow/DensityBoundaryConditionCavity.h +4 −4 Original line number Diff line number Diff line Loading @@ -253,20 +253,20 @@ class DensityBoundaryConditionsCavity< Meshes::Grid< 2, MeshReal, Device, MeshIn const IndexType& index = entity.getIndex(); if( entity.getCoordinates().x() == 0 ) { return u[ neighborEntities.template getEntityIndex< 0, 0 >() ]; return u[ neighborEntities.template getEntityIndex< 1, 0 >() ]; } if( entity.getCoordinates().x() == entity.getMesh().getDimensions().x() - 1 ) { return u[ neighborEntities.template getEntityIndex< 0, 0 >() ]; return u[ neighborEntities.template getEntityIndex< -1, 0 >() ]; } if( entity.getCoordinates().y() == 0 ) { return u[ neighborEntities.template getEntityIndex< 0, 0 >() ]; return u[ neighborEntities.template getEntityIndex< 0, 1 >() ]; } // The following line is commented to avoid compiler warning //if( entity.getCoordinates().y() == entity.getMesh().getDimensions().y() - 1 ) { return u[ neighborEntities.template getEntityIndex< 0, 0 >() ]; return u[ neighborEntities.template getEntityIndex< 0, -1 >() ]; } } Loading examples/flow/EnergyBoundaryConditionCavity.h +15 −15 Original line number Diff line number Diff line Loading @@ -271,12 +271,12 @@ class EnergyBoundaryConditionsCavity< Meshes::Grid< 2, MeshReal, Device, MeshInd const IndexType& index = entity.getIndex(); if( entity.getCoordinates().x() == 0 ) { return u[ neighborEntities.template getEntityIndex< 0, 0 >() ]; /*( (* this->pressure)[ neighborEntities.template getEntityIndex< 0, 0 >() ] return //u[ neighborEntities.template getEntityIndex< 0, 0 >() ]; ( (* this->pressure)[ neighborEntities.template getEntityIndex< 1, 0 >() ] / ( this->gamma - 1 ) ) + 0.5 * (* this->compressibleConservativeVariables->getDensity())[neighborEntities.template getEntityIndex< 0, 0 >()] + 0 * (* this->compressibleConservativeVariables->getDensity())[neighborEntities.template getEntityIndex< 1, 0 >()] * ( ( (* (* this->compressibleConservativeVariables->getMomentum())[ 1 ])[neighborEntities.template getEntityIndex< 1, 0 >()] / (* this->compressibleConservativeVariables->getDensity())[neighborEntities.template getEntityIndex< 1, 0 >()] Loading @@ -287,15 +287,15 @@ class EnergyBoundaryConditionsCavity< Meshes::Grid< 2, MeshReal, Device, MeshInd / (* this->compressibleConservativeVariables->getDensity())[neighborEntities.template getEntityIndex< 1, 0 >()] + 0 ) );*/ ); } if( entity.getCoordinates().x() == entity.getMesh().getDimensions().x() - 1 ) { return u[ neighborEntities.template getEntityIndex< 0, 0 >() ]; /*( (* this->pressure)[ neighborEntities.template getEntityIndex< 0, 0 >() ] return //u[ neighborEntities.template getEntityIndex< 0, 0 >() ]; ( (* this->pressure)[ neighborEntities.template getEntityIndex< -1, 0 >() ] / ( this->gamma - 1 ) ) + 0.5 + 0 * (* this->compressibleConservativeVariables->getDensity())[neighborEntities.template getEntityIndex< 0, 0 >()] * ( ( (* (* this->compressibleConservativeVariables->getMomentum())[ 1 ])[neighborEntities.template getEntityIndex< -1, 0 >()] Loading @@ -306,15 +306,15 @@ class EnergyBoundaryConditionsCavity< Meshes::Grid< 2, MeshReal, Device, MeshInd / (* this->compressibleConservativeVariables->getDensity())[neighborEntities.template getEntityIndex< -1, 0 >()] + 0 ) );*/ ); } if( entity.getCoordinates().y() == 0 ) { return u[ neighborEntities.template getEntityIndex< 0, 0 >() ]; /*( (* this->pressure)[ neighborEntities.template getEntityIndex< 0, 0 >() ] return //u[ neighborEntities.template getEntityIndex< 0, 0 >() ]; ( (* this->pressure)[ neighborEntities.template getEntityIndex< 0, 1 >() ] / ( this->gamma - 1 ) ) + 0.5 + 0 * (* this->compressibleConservativeVariables->getDensity())[neighborEntities.template getEntityIndex< 0, 0 >()] * ( ( (* (* this->compressibleConservativeVariables->getMomentum())[ 0 ])[neighborEntities.template getEntityIndex< 0, 1 >()] Loading @@ -325,16 +325,16 @@ class EnergyBoundaryConditionsCavity< Meshes::Grid< 2, MeshReal, Device, MeshInd / (* this->compressibleConservativeVariables->getDensity())[neighborEntities.template getEntityIndex< 0, 1 >()] + 0 ) );*/ ); } // The following line is commented to avoid compiler warning //if( entity.getCoordinates().y() == entity.getMesh().getDimensions().y() - 1 ) { return ( (* this->pressure)[ neighborEntities.template getEntityIndex< 0, 0 >() ] return ( (* this->pressure)[ neighborEntities.template getEntityIndex< 0, -1 >() ] / ( this->gamma - 1 ) ) + 0.5 * (* this->compressibleConservativeVariables->getDensity())[neighborEntities.template getEntityIndex< 0, 0 >()] * (* this->compressibleConservativeVariables->getDensity())[neighborEntities.template getEntityIndex< 0, -1 >()] * ( this->cavitySpeed/* * ( Loading examples/flow/LaxFridrichsEnergy.h +9 −9 Original line number Diff line number Diff line Loading @@ -236,22 +236,22 @@ class LaxFridrichsEnergy< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, Real, + ( 4.0 / 3.0 * ( velocity_x_east * velocity_x_center - velocity_x_center * velocity_x_west - velocity_x_center * velocity_x_center + velocity_x_west * velocity_x_west ) * hxSquareInverse - 2.0 / 3.0 * ( velocity_y_northEast * velocity_x_east - velocity_y_southEast * velocity_x_east /* - 2.0 / 3.0 * ( velocity_y_northEast * velocity_x_east - velocity_y_southEast * velocity_x_east - velocity_y_northWest * velocity_x_west + velocity_y_southWest * velocity_x_west ) * hxInverse * hyInverse / 4 ) * hxInverse * hyInverse / 4*/ ) * this->dynamicalViscosity // vT_21_x + ( ( velocity_y_northEast * velocity_y_east - velocity_y_southEast * velocity_y_east + ( /*( velocity_y_northEast * velocity_y_east - velocity_y_southEast * velocity_y_east - velocity_y_northWest * velocity_y_west + velocity_y_southWest * velocity_y_west ) * hxInverse * hyInverse / 4 ) * hxInverse * hyInverse / 4*/ + ( velocity_x_east * velocity_y_center - velocity_x_center * velocity_y_west - velocity_x_center * velocity_y_center + velocity_x_west * velocity_y_west ) * hxSquareInverse ) * this->dynamicalViscosity // uT_12_y + ( ( velocity_x_northEast * velocity_x_north - velocity_x_southEast * velocity_x_south + ( /*( velocity_x_northEast * velocity_x_north - velocity_x_southEast * velocity_x_south - velocity_x_northWest * velocity_x_north + velocity_x_southWest * velocity_x_south ) * hxInverse * hyInverse / 4 ) * hxInverse * hyInverse / 4*/ + ( velocity_y_north * velocity_x_center - velocity_y_center * velocity_x_south - velocity_y_center * velocity_x_center + velocity_y_south * velocity_x_south ) * hySquareInverse Loading @@ -260,9 +260,9 @@ class LaxFridrichsEnergy< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, Real, + ( 4.0 / 3.0 * ( velocity_y_north * velocity_y_center - velocity_y_center * velocity_y_south - velocity_y_center * velocity_y_center + velocity_y_south * velocity_y_south ) * hySquareInverse - 2.0 / 3.0 * ( velocity_x_northEast * velocity_y_north - velocity_x_southEast * velocity_y_east /* - 2.0 / 3.0 * ( velocity_x_northEast * velocity_y_north - velocity_x_southEast * velocity_y_east - velocity_x_northWest * velocity_y_north + velocity_x_southWest * velocity_y_west ) * hxInverse * hyInverse / 4 ) * hxInverse * hyInverse / 4*/ ) * this->dynamicalViscosity; } Loading Loading @@ -476,7 +476,7 @@ class LaxFridrichsEnergy< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, Real, ) * hzSquareInverse ) * this->dynamicalViscosity // 3D T_33_z - ( 4.0 / 3.0 * ( velocity_z_up * velocity_z_center - velocity_z_center * velocity_z_down + ( 4.0 / 3.0 * ( velocity_z_up * velocity_z_center - velocity_z_center * velocity_z_down - velocity_z_center * velocity_z_center + velocity_z_down * velocity_z_down ) * hzSquareInverse - 2.0 / 3.0 * ( velocity_y_upNorth * velocity_z_up - velocity_y_downNorth * velocity_z_down Loading examples/flow/LaxFridrichsMomentumX.h +4 −4 Original line number Diff line number Diff line Loading @@ -186,13 +186,13 @@ class LaxFridrichsMomentumX< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, Rea // 2D T_11_x + ( 4.0 / 3.0 * ( velocity_x_east - 2 * velocity_x_center + velocity_x_west ) * hxSquareInverse - 2.0 / 3.0 * ( velocity_y_northEast - velocity_y_southEast - velocity_y_northWest + velocity_y_southWest ) * hxInverse * hyInverse / 4 /* - 2.0 / 3.0 * ( velocity_y_northEast - velocity_y_southEast - velocity_y_northWest + velocity_y_southWest ) * hxInverse * hyInverse / 4*/ ) * this->dynamicalViscosity // T_21_y + ( ( velocity_y_northEast - velocity_y_southEast - velocity_y_northWest + velocity_y_southWest + (/* ( velocity_y_northEast - velocity_y_southEast - velocity_y_northWest + velocity_y_southWest ) * hxInverse * hyInverse / 4 + ( velocity_x_north - 2 * velocity_x_center + velocity_x_south + */( velocity_x_north - 2 * velocity_x_center + velocity_x_south ) * hxInverse * hyInverse ) * this->dynamicalViscosity; } Loading Loading
examples/CMakeLists.txt +1 −0 Original line number Diff line number Diff line Loading @@ -11,5 +11,6 @@ add_subdirectory( navier-stokes ) #add_subdirectory( narrow-band ) add_subdirectory( inviscid-flow ) add_subdirectory( inviscid-flow-sw ) #add_subdirectory( mean-curvature-flow ) add_subdirectory( flow )
examples/flow/DensityBoundaryConditionCavity.h +4 −4 Original line number Diff line number Diff line Loading @@ -253,20 +253,20 @@ class DensityBoundaryConditionsCavity< Meshes::Grid< 2, MeshReal, Device, MeshIn const IndexType& index = entity.getIndex(); if( entity.getCoordinates().x() == 0 ) { return u[ neighborEntities.template getEntityIndex< 0, 0 >() ]; return u[ neighborEntities.template getEntityIndex< 1, 0 >() ]; } if( entity.getCoordinates().x() == entity.getMesh().getDimensions().x() - 1 ) { return u[ neighborEntities.template getEntityIndex< 0, 0 >() ]; return u[ neighborEntities.template getEntityIndex< -1, 0 >() ]; } if( entity.getCoordinates().y() == 0 ) { return u[ neighborEntities.template getEntityIndex< 0, 0 >() ]; return u[ neighborEntities.template getEntityIndex< 0, 1 >() ]; } // The following line is commented to avoid compiler warning //if( entity.getCoordinates().y() == entity.getMesh().getDimensions().y() - 1 ) { return u[ neighborEntities.template getEntityIndex< 0, 0 >() ]; return u[ neighborEntities.template getEntityIndex< 0, -1 >() ]; } } Loading
examples/flow/EnergyBoundaryConditionCavity.h +15 −15 Original line number Diff line number Diff line Loading @@ -271,12 +271,12 @@ class EnergyBoundaryConditionsCavity< Meshes::Grid< 2, MeshReal, Device, MeshInd const IndexType& index = entity.getIndex(); if( entity.getCoordinates().x() == 0 ) { return u[ neighborEntities.template getEntityIndex< 0, 0 >() ]; /*( (* this->pressure)[ neighborEntities.template getEntityIndex< 0, 0 >() ] return //u[ neighborEntities.template getEntityIndex< 0, 0 >() ]; ( (* this->pressure)[ neighborEntities.template getEntityIndex< 1, 0 >() ] / ( this->gamma - 1 ) ) + 0.5 * (* this->compressibleConservativeVariables->getDensity())[neighborEntities.template getEntityIndex< 0, 0 >()] + 0 * (* this->compressibleConservativeVariables->getDensity())[neighborEntities.template getEntityIndex< 1, 0 >()] * ( ( (* (* this->compressibleConservativeVariables->getMomentum())[ 1 ])[neighborEntities.template getEntityIndex< 1, 0 >()] / (* this->compressibleConservativeVariables->getDensity())[neighborEntities.template getEntityIndex< 1, 0 >()] Loading @@ -287,15 +287,15 @@ class EnergyBoundaryConditionsCavity< Meshes::Grid< 2, MeshReal, Device, MeshInd / (* this->compressibleConservativeVariables->getDensity())[neighborEntities.template getEntityIndex< 1, 0 >()] + 0 ) );*/ ); } if( entity.getCoordinates().x() == entity.getMesh().getDimensions().x() - 1 ) { return u[ neighborEntities.template getEntityIndex< 0, 0 >() ]; /*( (* this->pressure)[ neighborEntities.template getEntityIndex< 0, 0 >() ] return //u[ neighborEntities.template getEntityIndex< 0, 0 >() ]; ( (* this->pressure)[ neighborEntities.template getEntityIndex< -1, 0 >() ] / ( this->gamma - 1 ) ) + 0.5 + 0 * (* this->compressibleConservativeVariables->getDensity())[neighborEntities.template getEntityIndex< 0, 0 >()] * ( ( (* (* this->compressibleConservativeVariables->getMomentum())[ 1 ])[neighborEntities.template getEntityIndex< -1, 0 >()] Loading @@ -306,15 +306,15 @@ class EnergyBoundaryConditionsCavity< Meshes::Grid< 2, MeshReal, Device, MeshInd / (* this->compressibleConservativeVariables->getDensity())[neighborEntities.template getEntityIndex< -1, 0 >()] + 0 ) );*/ ); } if( entity.getCoordinates().y() == 0 ) { return u[ neighborEntities.template getEntityIndex< 0, 0 >() ]; /*( (* this->pressure)[ neighborEntities.template getEntityIndex< 0, 0 >() ] return //u[ neighborEntities.template getEntityIndex< 0, 0 >() ]; ( (* this->pressure)[ neighborEntities.template getEntityIndex< 0, 1 >() ] / ( this->gamma - 1 ) ) + 0.5 + 0 * (* this->compressibleConservativeVariables->getDensity())[neighborEntities.template getEntityIndex< 0, 0 >()] * ( ( (* (* this->compressibleConservativeVariables->getMomentum())[ 0 ])[neighborEntities.template getEntityIndex< 0, 1 >()] Loading @@ -325,16 +325,16 @@ class EnergyBoundaryConditionsCavity< Meshes::Grid< 2, MeshReal, Device, MeshInd / (* this->compressibleConservativeVariables->getDensity())[neighborEntities.template getEntityIndex< 0, 1 >()] + 0 ) );*/ ); } // The following line is commented to avoid compiler warning //if( entity.getCoordinates().y() == entity.getMesh().getDimensions().y() - 1 ) { return ( (* this->pressure)[ neighborEntities.template getEntityIndex< 0, 0 >() ] return ( (* this->pressure)[ neighborEntities.template getEntityIndex< 0, -1 >() ] / ( this->gamma - 1 ) ) + 0.5 * (* this->compressibleConservativeVariables->getDensity())[neighborEntities.template getEntityIndex< 0, 0 >()] * (* this->compressibleConservativeVariables->getDensity())[neighborEntities.template getEntityIndex< 0, -1 >()] * ( this->cavitySpeed/* * ( Loading
examples/flow/LaxFridrichsEnergy.h +9 −9 Original line number Diff line number Diff line Loading @@ -236,22 +236,22 @@ class LaxFridrichsEnergy< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, Real, + ( 4.0 / 3.0 * ( velocity_x_east * velocity_x_center - velocity_x_center * velocity_x_west - velocity_x_center * velocity_x_center + velocity_x_west * velocity_x_west ) * hxSquareInverse - 2.0 / 3.0 * ( velocity_y_northEast * velocity_x_east - velocity_y_southEast * velocity_x_east /* - 2.0 / 3.0 * ( velocity_y_northEast * velocity_x_east - velocity_y_southEast * velocity_x_east - velocity_y_northWest * velocity_x_west + velocity_y_southWest * velocity_x_west ) * hxInverse * hyInverse / 4 ) * hxInverse * hyInverse / 4*/ ) * this->dynamicalViscosity // vT_21_x + ( ( velocity_y_northEast * velocity_y_east - velocity_y_southEast * velocity_y_east + ( /*( velocity_y_northEast * velocity_y_east - velocity_y_southEast * velocity_y_east - velocity_y_northWest * velocity_y_west + velocity_y_southWest * velocity_y_west ) * hxInverse * hyInverse / 4 ) * hxInverse * hyInverse / 4*/ + ( velocity_x_east * velocity_y_center - velocity_x_center * velocity_y_west - velocity_x_center * velocity_y_center + velocity_x_west * velocity_y_west ) * hxSquareInverse ) * this->dynamicalViscosity // uT_12_y + ( ( velocity_x_northEast * velocity_x_north - velocity_x_southEast * velocity_x_south + ( /*( velocity_x_northEast * velocity_x_north - velocity_x_southEast * velocity_x_south - velocity_x_northWest * velocity_x_north + velocity_x_southWest * velocity_x_south ) * hxInverse * hyInverse / 4 ) * hxInverse * hyInverse / 4*/ + ( velocity_y_north * velocity_x_center - velocity_y_center * velocity_x_south - velocity_y_center * velocity_x_center + velocity_y_south * velocity_x_south ) * hySquareInverse Loading @@ -260,9 +260,9 @@ class LaxFridrichsEnergy< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, Real, + ( 4.0 / 3.0 * ( velocity_y_north * velocity_y_center - velocity_y_center * velocity_y_south - velocity_y_center * velocity_y_center + velocity_y_south * velocity_y_south ) * hySquareInverse - 2.0 / 3.0 * ( velocity_x_northEast * velocity_y_north - velocity_x_southEast * velocity_y_east /* - 2.0 / 3.0 * ( velocity_x_northEast * velocity_y_north - velocity_x_southEast * velocity_y_east - velocity_x_northWest * velocity_y_north + velocity_x_southWest * velocity_y_west ) * hxInverse * hyInverse / 4 ) * hxInverse * hyInverse / 4*/ ) * this->dynamicalViscosity; } Loading Loading @@ -476,7 +476,7 @@ class LaxFridrichsEnergy< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, Real, ) * hzSquareInverse ) * this->dynamicalViscosity // 3D T_33_z - ( 4.0 / 3.0 * ( velocity_z_up * velocity_z_center - velocity_z_center * velocity_z_down + ( 4.0 / 3.0 * ( velocity_z_up * velocity_z_center - velocity_z_center * velocity_z_down - velocity_z_center * velocity_z_center + velocity_z_down * velocity_z_down ) * hzSquareInverse - 2.0 / 3.0 * ( velocity_y_upNorth * velocity_z_up - velocity_y_downNorth * velocity_z_down Loading
examples/flow/LaxFridrichsMomentumX.h +4 −4 Original line number Diff line number Diff line Loading @@ -186,13 +186,13 @@ class LaxFridrichsMomentumX< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, Rea // 2D T_11_x + ( 4.0 / 3.0 * ( velocity_x_east - 2 * velocity_x_center + velocity_x_west ) * hxSquareInverse - 2.0 / 3.0 * ( velocity_y_northEast - velocity_y_southEast - velocity_y_northWest + velocity_y_southWest ) * hxInverse * hyInverse / 4 /* - 2.0 / 3.0 * ( velocity_y_northEast - velocity_y_southEast - velocity_y_northWest + velocity_y_southWest ) * hxInverse * hyInverse / 4*/ ) * this->dynamicalViscosity // T_21_y + ( ( velocity_y_northEast - velocity_y_southEast - velocity_y_northWest + velocity_y_southWest + (/* ( velocity_y_northEast - velocity_y_southEast - velocity_y_northWest + velocity_y_southWest ) * hxInverse * hyInverse / 4 + ( velocity_x_north - 2 * velocity_x_center + velocity_x_south + */( velocity_x_north - 2 * velocity_x_center + velocity_x_south ) * hxInverse * hyInverse ) * this->dynamicalViscosity; } Loading