From: michael Date: Thu, 13 Jan 2022 16:57:37 +0000 (+0100) Subject: Added visualisation of spectrum in examples X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3895eaf85f54e35fe95df15f375d8bbb83c49c36;p=tools%2Fsolverlab.git Added visualisation of spectrum in examples --- diff --git a/CDMATH/tests/examples/SpectrumLaplace/SpectrumLaplace2DEF/SpectrumLaplace2DEF_SQUARE.py b/CDMATH/tests/examples/SpectrumLaplace/SpectrumLaplace2DEF/SpectrumLaplace2DEF_SQUARE.py index 3301a1d..984733a 100755 --- a/CDMATH/tests/examples/SpectrumLaplace/SpectrumLaplace2DEF/SpectrumLaplace2DEF_SQUARE.py +++ b/CDMATH/tests/examples/SpectrumLaplace/SpectrumLaplace2DEF/SpectrumLaplace2DEF_SQUARE.py @@ -117,7 +117,9 @@ for i in range(nbCells): #else: si condition limite non nulle au bord, ajouter la contribution du bord au second membre de la cellule j print("Stiffness matrix construction done") -quit() +Rigidite.viewMatrix(True, 0, "RigidityMatrix_FiniteElementsOn"+mesh_name+"Laplace") +Rigidite.plotEigenvalues("FiniteElementsOn"+mesh_name+"Laplace") + # Conditionnement de la matrice de rigidité #================================= cond = Rigidite.getConditionNumber() diff --git a/CDMATH/tests/examples/SpectrumLaplace/SpectrumLaplace2DVF/SpectrumLaplace2DVF_SQUARE.py b/CDMATH/tests/examples/SpectrumLaplace/SpectrumLaplace2DVF/SpectrumLaplace2DVF_SQUARE.py index a60054c..40eb0ba 100755 --- a/CDMATH/tests/examples/SpectrumLaplace/SpectrumLaplace2DVF/SpectrumLaplace2DVF_SQUARE.py +++ b/CDMATH/tests/examples/SpectrumLaplace/SpectrumLaplace2DVF/SpectrumLaplace2DVF_SQUARE.py @@ -74,6 +74,8 @@ for i in range(nbCells): Rigidite.addValue(i,i,coeff) # terme diagonal print("Stiffness matrix construction done") +Rigidite.viewMatrix(True, 0, "RigidityMatrix_FiniteVolumesOn"+mesh_name+"Laplace") +Rigidite.plotEigenvalues("FiniteVolumesOn"+mesh_name+"Laplace") # Conditionnement de la matrice de rigidité #================================= diff --git a/CDMATH/tests/examples/SpectrumLaplace/SpectrumLaplaceBeltrami3DEF/SpectrumFiniteElements3DLaplace-Beltrami.py b/CDMATH/tests/examples/SpectrumLaplace/SpectrumLaplaceBeltrami3DEF/SpectrumFiniteElements3DLaplace-Beltrami.py index a6b3f3e..0b99481 100755 --- a/CDMATH/tests/examples/SpectrumLaplace/SpectrumLaplaceBeltrami3DEF/SpectrumFiniteElements3DLaplace-Beltrami.py +++ b/CDMATH/tests/examples/SpectrumLaplace/SpectrumLaplaceBeltrami3DEF/SpectrumFiniteElements3DLaplace-Beltrami.py @@ -110,6 +110,8 @@ for i in range(nbCells): Rigidite.addValue(j,k,GradShapeFuncs[j]*GradShapeFuncs[k]/Ci.getMeasure()) print("Linear system matrix building done") +Rigidite.viewMatrix(True, 0, "RigidityMatrix_FiniteElementsOn"+mesh_name+"LaplaceBeltrami") +Rigidite.plotEigenvalues("FiniteElementsOn"+mesh_name+"LaplaceBeltrami") # Conditionnement de la matrice de rigidité #==========================================