From: michael Date: Thu, 17 Dec 2020 10:17:01 +0000 (+0100) Subject: Corrected an error in the number of velocity components X-Git-Tag: V9_7_0~84 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e91b3af093bd7e371f57ad721b050c446ece9ca1;p=tools%2Fsolverlab.git Corrected an error in the number of velocity components --- diff --git a/CoreFlows/examples/C/WaveSystem_2DFV_SphericalExplosion_CDMATH.cxx b/CoreFlows/examples/C/WaveSystem_2DFV_SphericalExplosion_CDMATH.cxx index 3fe8baa..0299ef2 100755 --- a/CoreFlows/examples/C/WaveSystem_2DFV_SphericalExplosion_CDMATH.cxx +++ b/CoreFlows/examples/C/WaveSystem_2DFV_SphericalExplosion_CDMATH.cxx @@ -173,7 +173,7 @@ void WaveSystem(double tmax, int ntmax, double cfl, int output_freq, const Mesh& cout << "Construction of the initial condition" << endl; Field pressure_field("Pressure",CELLS,my_mesh,1) ; - Field velocity_field("Velocity",CELLS,my_mesh,1) ; + Field velocity_field("Velocity",CELLS,my_mesh,dim) ; initial_conditions_shock(my_mesh,pressure_field, velocity_field); /* iteration vectors */ @@ -269,14 +269,14 @@ int main(int argc, char *argv[]) cout << "- DOMAIN : SQUARE" << endl; cout << "- MESH : CARTESIAN, GENERATED INTERNALLY WITH CDMATH" << endl<< endl; cout << "Construction of a cartesian mesh" << endl; - double xinf=0.0; - double xsup=1.0; - double yinf=0.0; - double ysup=1.0; + double xinf=-0.5; + double xsup= 0.5; + double yinf=-0.5; + double ysup= 0.5; int nx=50; int ny=50; myMesh=Mesh(xinf,xsup,nx,yinf,ysup,ny); - double eps=1.E-10; + double eps=precision; myMesh.setGroupAtPlan(xsup,0,eps,"RightEdge"); myMesh.setGroupAtPlan(xinf,0,eps,"LeftEdge"); myMesh.setGroupAtPlan(yinf,1,eps,"BottomEdge"); diff --git a/CoreFlows/examples/C/WaveSystem_2DFV_SphericalExplosion_MPI.cxx b/CoreFlows/examples/C/WaveSystem_2DFV_SphericalExplosion_MPI.cxx index adcca14..0356da9 100755 --- a/CoreFlows/examples/C/WaveSystem_2DFV_SphericalExplosion_MPI.cxx +++ b/CoreFlows/examples/C/WaveSystem_2DFV_SphericalExplosion_MPI.cxx @@ -238,7 +238,7 @@ void WaveSystem(double tmax, int ntmax, double cfl, int output_freq, const Mesh& cout<<"Building the initial condition on processor 0" << endl; pressure_field=Field("Pressure",CELLS,my_mesh,1) ; - velocity_field=Field("Velocity",CELLS,my_mesh,1) ; + velocity_field=Field("Velocity",CELLS,my_mesh,dim) ; initial_conditions_shock(my_mesh,pressure_field, velocity_field); cout << "Saving the solution at T=" << time <<" on processor 0"<