From: michael Date: Sat, 17 Oct 2020 19:50:27 +0000 (+0200) Subject: Corrected errors in make test X-Git-Tag: V9_6_0~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=96c90f491024ca3dcd9f75fd61d56ea56cf99bc9;p=tools%2Fsolverlab.git Corrected errors in make test --- diff --git a/CDMATH/tests/examples/Poisson3DSphereEF/CMakeLists.txt b/CDMATH/tests/examples/Poisson3DSphereEF/CMakeLists.txt index 4d64cd1..1d8b478 100755 --- a/CDMATH/tests/examples/Poisson3DSphereEF/CMakeLists.txt +++ b/CDMATH/tests/examples/Poisson3DSphereEF/CMakeLists.txt @@ -3,7 +3,7 @@ SET(MESH_MED ../../ressources/meshSphere.med ) -file(COPY ${MESH_MED} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/tests/examples/Poisson3DSphereEF) +file(COPY ${MESH_MED} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) install(FILES ${MESH_MED} DESTINATION share/examples/Poisson3DSphereEF) if (CDMATH_WITH_PYTHON AND CDMATH_WITH_PETSC AND CDMATH_WITH_POSTPRO) diff --git a/CDMATH/tests/examples/WaveSystem1DStaggered_RiemannProblem/WaveSystem1DStaggered_RiemannProblem.py b/CDMATH/tests/examples/WaveSystem1DStaggered_RiemannProblem/WaveSystem1DStaggered_RiemannProblem.py index 363c0e0..675f3dd 100755 --- a/CDMATH/tests/examples/WaveSystem1DStaggered_RiemannProblem/WaveSystem1DStaggered_RiemannProblem.py +++ b/CDMATH/tests/examples/WaveSystem1DStaggered_RiemannProblem/WaveSystem1DStaggered_RiemannProblem.py @@ -52,17 +52,17 @@ def computeStaggeredDivergenceMatrix(a,b,nx,nbVoisinsMax,dt,scaling): S1,S2 = staggeredMatrices(dt/dx,scaling) for k in range(nbCells):#On parcourt les cellules if ( k==0) : - implMat.addValue(k*nbComp, (k+1)*nbComp, S1) - implMat.addValue(k*nbComp, k *nbComp, S1*(-1.)) + implMat.addValue(k*nbComp, (k+1)*nbComp, S1) + implMat.addValue(k*nbComp, k *nbComp, S1*(-1.)) elif ( k==nbCells-1) : - implMat.addValue(k*nbComp, k *nbComp, S2) - implMat.addValue(k*nbComp, (k-1)*nbComp, S2*(-1.)) + implMat.addValue(k*nbComp, k *nbComp, S2) + implMat.addValue(k*nbComp, (k-1)*nbComp, S2*(-1.)) else : - implMat.addValue(k*nbComp, (k+1)*nbComp, S1) - implMat.addValue(k*nbComp, k *nbComp, S1*(-1.)) + implMat.addValue(k*nbComp, (k+1)*nbComp, S1) + implMat.addValue(k*nbComp, k *nbComp, S1*(-1.)) - implMat.addValue(k*nbComp, k *nbComp, S2) - implMat.addValue(k*nbComp, (k-1)*nbComp, S2*(-1.)) + implMat.addValue(k*nbComp, k *nbComp, S2) + implMat.addValue(k*nbComp, (k-1)*nbComp, S2*(-1.)) return implMat diff --git a/CDMATH/tests/examples/WaveSystem1DUpwind/WaveSystem1DUpwind.py b/CDMATH/tests/examples/WaveSystem1DUpwind/WaveSystem1DUpwind.py index 1adc62a..00cbdec 100755 --- a/CDMATH/tests/examples/WaveSystem1DUpwind/WaveSystem1DUpwind.py +++ b/CDMATH/tests/examples/WaveSystem1DUpwind/WaveSystem1DUpwind.py @@ -100,7 +100,7 @@ def computeFluxes(U, SumFluxes): Fr=numericalFlux(Uj,Ujp1,absA) Fl=numericalFlux(Ujm1,Uj,absA) - sumFluxCourant = (Fr - Fl)*0.5/Cj.getMeasure() + sumFluxCourant = (Fr - Fl)*0.5*(1./Cj.getMeasure()) #On divise par le volume de la cellule la contribution des flux au snd membre for i in range(nbComp): diff --git a/CDMATH/tests/examples/WaveSystem1DUpwind_RiemannProblem/WaveSystem1DUpwind_RiemannProblem.py b/CDMATH/tests/examples/WaveSystem1DUpwind_RiemannProblem/WaveSystem1DUpwind_RiemannProblem.py index 9ae483b..7fcb86d 100755 --- a/CDMATH/tests/examples/WaveSystem1DUpwind_RiemannProblem/WaveSystem1DUpwind_RiemannProblem.py +++ b/CDMATH/tests/examples/WaveSystem1DUpwind_RiemannProblem/WaveSystem1DUpwind_RiemannProblem.py @@ -59,17 +59,17 @@ def computeUpwindDivergenceMatrix(a,b,nx,nbVoisinsMax,dt,scaling): A,absA= jacobianMatrices(dt/dx,scaling) for j in range(nbCells):#On parcourt les cellules if ( j==0) : - implMat.addValue(j*nbComp,(j+1)*nbComp,(A-absA)/2) - implMat.addValue(j*nbComp, j*nbComp,(A-absA)/2*(-1.)) + implMat.addValue(j*nbComp,(j+1)*nbComp,(A-absA)*(1./2)) + implMat.addValue(j*nbComp, j*nbComp,(A-absA)*(-1./2)) elif ( j==nbCells-1) : - implMat.addValue(j*nbComp, j*nbComp,(A+absA)/2) - implMat.addValue(j*nbComp,(j-1)*nbComp,(A+absA)/2*(-1.)) + implMat.addValue(j*nbComp, j*nbComp,(A+absA)*(1./2)) + implMat.addValue(j*nbComp,(j-1)*nbComp,(A+absA)*(-1./2)) else : - implMat.addValue(j*nbComp,(j+1)*nbComp,(A-absA)/2) - implMat.addValue(j*nbComp, j*nbComp,(A-absA)/2*(-1.)) + implMat.addValue(j*nbComp,(j+1)*nbComp,(A-absA)*(1./2)) + implMat.addValue(j*nbComp, j*nbComp,(A-absA)*(-1./2)) - implMat.addValue(j*nbComp, j*nbComp,(A+absA)/2) - implMat.addValue(j*nbComp,(j-1)*nbComp,(A+absA)/2*(-1.)) + implMat.addValue(j*nbComp, j*nbComp,(A+absA)*(1./2)) + implMat.addValue(j*nbComp,(j-1)*nbComp,(A+absA)*(-1./2)) return implMat diff --git a/CDMATH/tests/examples/WaveSystem2DUpwind_RiemannProblem/WaveSystemUpwind.py b/CDMATH/tests/examples/WaveSystem2DUpwind_RiemannProblem/WaveSystemUpwind.py index 964aeff..db1a426 100755 --- a/CDMATH/tests/examples/WaveSystem2DUpwind_RiemannProblem/WaveSystemUpwind.py +++ b/CDMATH/tests/examples/WaveSystem2DUpwind_RiemannProblem/WaveSystemUpwind.py @@ -65,7 +65,7 @@ def jacobianMatrices(normal,coeff): for j in range(dim): absA[i+1,j+1]=c0*normal[i]*normal[j]*coeff - return (A - absA)/2 + return (A - absA)*(1./2) def computeDivergenceMatrix(my_mesh,nbVoisinsMax,dt): nbCells = my_mesh.getNumberOfCells() diff --git a/CDMATH/tests/examples/WaveSystem_Shock/WaveSystemCentered/WaveSystemCentered.py b/CDMATH/tests/examples/WaveSystem_Shock/WaveSystemCentered/WaveSystemCentered.py index bed8816..d541fe9 100755 --- a/CDMATH/tests/examples/WaveSystem_Shock/WaveSystemCentered/WaveSystemCentered.py +++ b/CDMATH/tests/examples/WaveSystem_Shock/WaveSystemCentered/WaveSystemCentered.py @@ -84,7 +84,7 @@ def jacobianMatrices(normal, coeff, signun): A[i+1,0]=normal[i]*coeff A[0,i+1]=c0*c0*normal[i]*coeff - return A/2 + return A*(1./2) def computeDivergenceMatrix(my_mesh,nbVoisinsMax,dt): diff --git a/CDMATH/tests/examples/WaveSystem_Shock/WaveSystemPStag/WaveSystemPStag.py b/CDMATH/tests/examples/WaveSystem_Shock/WaveSystemPStag/WaveSystemPStag.py index 593997b..ea33335 100755 --- a/CDMATH/tests/examples/WaveSystem_Shock/WaveSystemPStag/WaveSystemPStag.py +++ b/CDMATH/tests/examples/WaveSystem_Shock/WaveSystemPStag/WaveSystemPStag.py @@ -87,7 +87,7 @@ def jacobianMatrices(normal, coeff, signun): A[0,i+1]=c0*c0*normal[i]*coeff absA[0,i+1]=signun*A[0,i+1] - return (A-absA)/2 + return (A-absA)*(1./2) def computeDivergenceMatrix(my_mesh,nbVoisinsMax,dt): diff --git a/CDMATH/tests/examples/WaveSystem_Shock/WaveSystemUpwind/WaveSystemUpwind.py b/CDMATH/tests/examples/WaveSystem_Shock/WaveSystemUpwind/WaveSystemUpwind.py index 8569197..fdf7416 100755 --- a/CDMATH/tests/examples/WaveSystem_Shock/WaveSystemUpwind/WaveSystemUpwind.py +++ b/CDMATH/tests/examples/WaveSystem_Shock/WaveSystemUpwind/WaveSystemUpwind.py @@ -87,7 +87,7 @@ def jacobianMatrices(normal,coeff): for j in range(dim): absA[i+1,j+1]=c0*normal[i]*normal[j]*coeff - return (A - absA)/2 + return (A - absA)*(1./2) def computeDivergenceMatrix(my_mesh,nbVoisinsMax,dt): nbCells = my_mesh.getNumberOfCells() diff --git a/CDMATH/tests/examples/WaveSystem_Stationary/WaveSystemCentered/WaveSystemCentered.py b/CDMATH/tests/examples/WaveSystem_Stationary/WaveSystemCentered/WaveSystemCentered.py index 76c67b1..f1ad05b 100755 --- a/CDMATH/tests/examples/WaveSystem_Stationary/WaveSystemCentered/WaveSystemCentered.py +++ b/CDMATH/tests/examples/WaveSystem_Stationary/WaveSystemCentered/WaveSystemCentered.py @@ -87,7 +87,7 @@ def jacobianMatrices(normal, coeff, signun): A[i+1,0]=normal[i]*coeff A[0,i+1]=c0*c0*normal[i]*coeff - return A/2 + return A*(1./2) def computeDivergenceMatrix(my_mesh,nbVoisinsMax,dt): diff --git a/CDMATH/tests/examples/WaveSystem_Stationary/WaveSystemPStag/WaveSystemPStag.py b/CDMATH/tests/examples/WaveSystem_Stationary/WaveSystemPStag/WaveSystemPStag.py index 3189433..a86f0f7 100755 --- a/CDMATH/tests/examples/WaveSystem_Stationary/WaveSystemPStag/WaveSystemPStag.py +++ b/CDMATH/tests/examples/WaveSystem_Stationary/WaveSystemPStag/WaveSystemPStag.py @@ -90,7 +90,7 @@ def jacobianMatrices(normal, coeff, signun): A[0,i+1]=c0*c0*normal[i]*coeff absA[0,i+1]=signun*A[0,i+1] - return (A-absA)/2 + return (A-absA)*(1./2) def computeDivergenceMatrix(my_mesh,nbVoisinsMax,dt): diff --git a/CDMATH/tests/examples/WaveSystem_Stationary/WaveSystemUpwind/WaveSystemUpwind.py b/CDMATH/tests/examples/WaveSystem_Stationary/WaveSystemUpwind/WaveSystemUpwind.py index 7cff68b..3cd4021 100755 --- a/CDMATH/tests/examples/WaveSystem_Stationary/WaveSystemUpwind/WaveSystemUpwind.py +++ b/CDMATH/tests/examples/WaveSystem_Stationary/WaveSystemUpwind/WaveSystemUpwind.py @@ -90,7 +90,7 @@ def jacobianMatrices(normal,coeff): for j in range(dim): absA[i+1,j+1]=c0*normal[i]*normal[j]*coeff - return (A - absA)/2 + return (A - absA)*(1./2) def computeDivergenceMatrix(my_mesh,nbVoisinsMax,dt): nbCells = my_mesh.getNumberOfCells()