From 3895eaf85f54e35fe95df15f375d8bbb83c49c36 Mon Sep 17 00:00:00 2001 From: michael Date: Thu, 13 Jan 2022 17:57:37 +0100 Subject: [PATCH] Added visualisation of spectrum in examples --- .../SpectrumLaplace2DEF/SpectrumLaplace2DEF_SQUARE.py | 4 +++- .../SpectrumLaplace2DVF/SpectrumLaplace2DVF_SQUARE.py | 2 ++ .../SpectrumFiniteElements3DLaplace-Beltrami.py | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) 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é #========================================== -- 2.39.2