]> SALOME platform Git repositories - tools/solverlab.git/commitdiff
Salome HOME
Corrected an error in the number of velocity components
authormichael <michael@localhost.localdomain>
Thu, 17 Dec 2020 10:17:01 +0000 (11:17 +0100)
committermichael <michael@localhost.localdomain>
Thu, 17 Dec 2020 10:17:01 +0000 (11:17 +0100)
CoreFlows/examples/C/WaveSystem_2DFV_SphericalExplosion_CDMATH.cxx
CoreFlows/examples/C/WaveSystem_2DFV_SphericalExplosion_MPI.cxx

index 3fe8baaab0146577de6e05862b1d4e2d9cde0cc9..0299ef2d7c8068d28db2dbb7785e502dccc843bb 100755 (executable)
@@ -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");
index adcca141c67dd4291247fbc16767bd4fc1d399d6..0356da9a001a960d32e2adb78240b4183fb5f184 100755 (executable)
@@ -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"<<endl;
@@ -367,15 +367,15 @@ 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 on processor 0" << 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");