From d3093dfa64fc199eccff0c4affc117be06efa682 Mon Sep 17 00:00:00 2001 From: Mika Malinen Date: Thu, 26 Sep 2024 17:09:21 +0300 Subject: [PATCH 01/38] A change to use correct terminology --- fem/src/SOLVER.KEYWORDS | 1 + fem/src/SolverUtils.F90 | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/fem/src/SOLVER.KEYWORDS b/fem/src/SOLVER.KEYWORDS index d99d46a78c..594476a95b 100644 --- a/fem/src/SOLVER.KEYWORDS +++ b/fem/src/SOLVER.KEYWORDS @@ -1547,6 +1547,7 @@ solver:string: 'velocity variable name' solver:string: 'velocity variable' solver:string: 'magnetic field variable' solver:string: 'weight variable' +solver:logical: 'calculate energy inner product' solver:logical: 'calculate energy norm' solver:string: 'field variable' solver:string: 'eletric field variable' diff --git a/fem/src/SolverUtils.F90 b/fem/src/SolverUtils.F90 index 7a3a9c9377..74af478de8 100644 --- a/fem/src/SolverUtils.F90 +++ b/fem/src/SolverUtils.F90 @@ -13808,7 +13808,8 @@ SUBROUTINE CalculateLoads( Solver, Aaid, x, DOFs, UseBulkValues, NodalLoads, Nod CALL MatrixVectorMultiply( Aaid, x, TempVector ) END IF - IF( ListGetLogical(Solver % Values, 'Calculate Energy Norm', Found) ) THEN + IF(ListGetLogical(Solver % Values, 'Calculate Energy Inner Product', Found) .OR. & + ListGetLogical(Solver % Values, 'Calculate Energy Norm', Found) ) THEN Energy = 0._dp IF( ListGetLogical(Solver % Values, 'Linear System Complex', Found) ) THEN Energy_im = 0._dp @@ -13823,16 +13824,16 @@ SUBROUTINE CalculateLoads( Solver, Aaid, x, DOFs, UseBulkValues, NodalLoads, Nod Energy = ParallelReduction(Energy) Energy_im = ParallelReduction(Energy_im) - CALL ListAddConstReal( Solver % Values, 'Energy norm', Energy) - CALL ListAddConstReal( Solver % Values, 'Energy norm im', Energy_im) + CALL ListAddConstReal( Solver % Values, 'Energy inner product', Energy) + CALL ListAddConstReal( Solver % Values, 'Energy inner product im', Energy_im) - WRITE( Message,'(A,A,A)') 'res: ',GetVarname(Solver % Variable),' Energy Norm' + WRITE( Message,'(A,A,A)') 'res: ',GetVarname(Solver % Variable),' Energy inner product' CALL ListAddConstReal( CurrentModel % Simulation, Message, Energy ) - WRITE( Message,'(A,A,A)') 'res: ',GetVarname(Solver % Variable),' Energy Norm im' + WRITE( Message,'(A,A,A)') 'res: ',GetVarname(Solver % Variable),' Energy inner product im' CALL ListAddConstReal( CurrentModel % Simulation, Message, Energy_im ) - WRITE( Message, * ) 'Energy Norm (Energy Functional): ', Energy, Energy_im + WRITE( Message, * ) 'Energy inner product: ', Energy, Energy_im CALL Info( 'CalculateLoads', Message, Level=5) ELSE DO i=1,Aaid % NumberOfRows @@ -13843,12 +13844,12 @@ SUBROUTINE CalculateLoads( Solver, Aaid, x, DOFs, UseBulkValues, NodalLoads, Nod Energy = Energy + x(i)*TempVector(i) END DO Energy = ParallelReduction(Energy) - CALL ListAddConstReal( Solver % Values, 'Energy norm', Energy ) + CALL ListAddConstReal( Solver % Values, 'Energy inner product', Energy ) - WRITE( Message,'(A,A,A)') 'res: ',GetVarname(Solver % Variable),' Energy Norm' + WRITE( Message,'(A,A,A)') 'res: ',GetVarname(Solver % Variable),' Energy inner product' CALL ListAddConstReal( CurrentModel % Simulation, Message, Energy ) - WRITE( Message, * ) '(The square of) Energy Norm: ', Energy + WRITE( Message, * ) 'Energy inner product: ', Energy CALL Info( 'CalculateLoads', Message, Level=5) END IF END IF From 03f6363e9cf252a2f95655f0564a81832b568951 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Thu, 19 Sep 2024 18:57:39 +0200 Subject: [PATCH 02/38] Make building with UMFPACK optional. Add new CMake variable `WITH_UMFPACK` which can be used to build without using any functions from the UMFPACK library. The default for this new variable is `TRUE` so there is no difference in the build configuration to before unless a user explicitly configures with, e.g., `-DWITH_UMFPACK=OFF`. This probably fixes the issue described in #578. --- CMakeLists.txt | 62 +++++++++++++++++++++++++++------------------- fem/config.h.cmake | 2 +- 2 files changed, 37 insertions(+), 27 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f8edd14602..75308512c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,6 +81,7 @@ SET(WITH_MKL FALSE CACHE BOOL "Use Intel Math Kernel library") SET(WITH_Mumps FALSE CACHE BOOL "Use Mumps sparse direct solver") SET(WITH_Hypre FALSE CACHE BOOL "Use Hypre linear algebra library") SET(WITH_CHOLMOD FALSE CACHE BOOL "Use CHOLMOD linear algebra library") +SET(WITH_UMFPACK TRUE CACHE BOOL "Use UMFPACK for LU factorization") SET(WITH_ELMERGUI FALSE CACHE BOOL "Include ElmerGUI") SET(WITH_ElmerIce FALSE CACHE BOOL "Include ElmerIce") SET(WITH_XIOS FALSE CACHE BOOL "Include XIOS") @@ -626,29 +627,35 @@ IF(WITH_ElmerIce) ADD_SUBDIRECTORY(elmerice) ENDIF(WITH_ElmerIce) -IF (EXTERNAL_UMFPACK) - MESSAGE(STATUS "Using external UMFPACK instead of built-in") - FIND_PACKAGE(UMFPACK REQUIRED) - - # Check for size of "SuiteSparse_long" - INCLUDE(CheckTypeSize) - SET(old_CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES}) - SET(old_CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES}) - LIST(APPEND CMAKE_REQUIRED_INCLUDES "${UMFPACK_INCLUDE_DIR}") - LIST(APPEND CMAKE_EXTRA_INCLUDE_FILES "umfpack.h") - CHECK_TYPE_SIZE("SuiteSparse_long" SIZEOF_SUITESPARSE_LONG LANGUAGE C) - SET(CMAKE_REQUIRED_INCLUDES ${old_CMAKE_REQUIRED_INCLUDES}) - SET(CMAKE_EXTRA_INCLUDE_FILES ${old_CMAKE_EXTRA_INCLUDE_FILES}) - IF (HAVE_SIZEOF_SUITESPARSE_LONG) - IF (SIZEOF_SUITESPARSE_LONG EQUAL 4) - SET(UMFPACK_LONG_FORTRAN_TYPE "C_INT32_T") - ELSE() - SET(UMFPACK_LONG_FORTRAN_TYPE "C_INT64_T") +IF (WITH_UMFPACK) + IF (EXTERNAL_UMFPACK) + MESSAGE(STATUS "Using external UMFPACK instead of built-in") + FIND_PACKAGE(UMFPACK REQUIRED) + + # Check for size of "SuiteSparse_long" + INCLUDE(CheckTypeSize) + SET(old_CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES}) + SET(old_CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES}) + LIST(APPEND CMAKE_REQUIRED_INCLUDES "${UMFPACK_INCLUDE_DIR}") + LIST(APPEND CMAKE_EXTRA_INCLUDE_FILES "umfpack.h") + CHECK_TYPE_SIZE("SuiteSparse_long" SIZEOF_SUITESPARSE_LONG LANGUAGE C) + SET(CMAKE_REQUIRED_INCLUDES ${old_CMAKE_REQUIRED_INCLUDES}) + SET(CMAKE_EXTRA_INCLUDE_FILES ${old_CMAKE_EXTRA_INCLUDE_FILES}) + IF (HAVE_SIZEOF_SUITESPARSE_LONG) + IF (SIZEOF_SUITESPARSE_LONG EQUAL 4) + SET(UMFPACK_LONG_FORTRAN_TYPE "C_INT32_T") + ELSE() + SET(UMFPACK_LONG_FORTRAN_TYPE "C_INT64_T") + ENDIF() ENDIF() + ELSE() + MESSAGE(STATUS "Using built-in UMFPACK") + ADD_SUBDIRECTORY(umfpack) ENDIF() + SET(HAVE_UMFPACK ON) + MARK_AS_ADVANCED(HAVE_UMFPACK) ELSE() - MESSAGE(STATUS "Using built-in UMFPACK") - ADD_SUBDIRECTORY(umfpack) + MESSAGE(STATUS "Building without UMFPACK") ENDIF() IF(NOT DEFINED UMFPACK_LONG_FORTRAN_TYPE) # Old versions of UMFPACK before "SuiteSparse_long" was defined used "long" @@ -708,13 +715,16 @@ MESSAGE(STATUS "------------------------------------------------") MESSAGE(STATUS " BLAS library: " "${BLAS_LIBRARIES}") MESSAGE(STATUS " LAPACK library: " "${LAPACK_LIBRARIES}") MESSAGE(STATUS "------------------------------------------------") -IF(UMFPACK_FOUND) - MESSAGE(STATUS " UMFPACK library: " "${UMFPACK_LIBRARIES}") - MESSAGE(STATUS " UMFPACK headers: " "${UMFPACK_INCLUDE_DIR}") - MARK_AS_ADVANCED(HAVE_UMFPACK) - MESSAGE(STATUS "------------------------------------------------") +IF(WITH_UMFPACK) + IF(UMFPACK_FOUND) + MESSAGE(STATUS " UMFPACK library: " "${UMFPACK_LIBRARIES}") + MESSAGE(STATUS " UMFPACK headers: " "${UMFPACK_INCLUDE_DIR}") + MESSAGE(STATUS "------------------------------------------------") + ELSE() + MESSAGE(STATUS " UMFPACK library: Using internal Elmer library") + ENDIF() ELSE() - MESSAGE(STATUS " UMFPACK library: Using internal Elmer library") + MESSAGE(STATUS " UMFPACK library: Building without UMFPACK") ENDIF() IF(CHOLMOD_FOUND AND SPQR_FOUND) MESSAGE(STATUS " CHOLMOD library: " "${CHOLMOD_LIBRARIES}") diff --git a/fem/config.h.cmake b/fem/config.h.cmake index 67dc31e1f2..ccb47dd9a4 100644 --- a/fem/config.h.cmake +++ b/fem/config.h.cmake @@ -139,7 +139,7 @@ #define HAVE_SYS_TYPES_H /* Define if you have a UMFPACK library. */ -#define HAVE_UMFPACK +#cmakedefine HAVE_UMFPACK /* Define to the Fortran type that matches SuiteSparse_long. */ #cmakedefine UMFPACK_LONG_FORTRAN_TYPE @UMFPACK_LONG_FORTRAN_TYPE@ From 445366ceea95cb1bc2bfc67769421e7e660b6f5b Mon Sep 17 00:00:00 2001 From: Peter Raback Date: Tue, 24 Sep 2024 15:18:52 +0200 Subject: [PATCH 03/38] Fall back to MUMPS if UMFPACK is not installed but MUMPS is. --- fem/src/MainUtils.F90 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/fem/src/MainUtils.F90 b/fem/src/MainUtils.F90 index 32971add9e..c27f799c74 100644 --- a/fem/src/MainUtils.F90 +++ b/fem/src/MainUtils.F90 @@ -86,12 +86,19 @@ SUBROUTINE CheckLinearSolverOptions( Solver ) END IF END IF +#if !defined (HAVE_UMFPACK) && defined (HAVE_MUMPS) + IF ( str == 'umfpack' .OR. str == 'big umfpack' ) THEN + CALL Warn( 'CheckLinearSolverOptions', 'UMFPACK solver not installed, using MUMPS instead!' ) + str = 'mumps' + CALL ListAddString( Params,'Linear System Direct Method', str) + END IF +#endif + SELECT CASE( str ) CASE('banded' ) - CASE( 'umfpack', 'big umfpack' ) #ifndef HAVE_UMFPACK - CALL Fatal( 'GetMatrixFormat', 'UMFPACK solver has not been installed.' ) + CALL Fatal( 'CheckLinearSolverOptions', 'UMFPACK (and MUMPS) solver has not been installed.' ) #endif CASE( 'mumps', 'mumpslocal' ) #ifndef HAVE_MUMPS From 8d7f48b7e32c6992ea34203cd6023dcaaa712fcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Thu, 19 Sep 2024 20:48:55 +0200 Subject: [PATCH 04/38] Conditionally skip tests that depend on the UMFPACK solver. Some tests are failing when built with `WITH_UMFPACK=OFF` and `WITH_MUMPS=OFF` with an error like the following in the logs: ``` ERROR:: GetMatrixFormat: UMFPACK (and MUMPS) solver has not been installed. ``` Skip all tests conditional on `HAVE_UMFPACK OR HAVE_MUMPS` for which the string "UMFPACK (and MUMPS) solver has not been installed." was found in the logs. --- elmerice/Tests/AIFlowSolve/CMakeLists.txt | 18 +++++++------- elmerice/Tests/BackgroundError/CMakeLists.txt | 14 ++++++----- elmerice/Tests/Buoyancy/CMakeLists.txt | 12 ++++++---- elmerice/Tests/Calving2D/CMakeLists.txt | 16 +++++++------ elmerice/Tests/Calving3D_lset/CMakeLists.txt | 3 +-- .../Tests/ComputeDevStress/CMakeLists.txt | 12 ++++++---- elmerice/Tests/Contact/CMakeLists.txt | 10 ++++---- .../Tests/CovarianceVector/CMakeLists.txt | 19 ++++++++------- .../Tests/CovarianceVector2/CMakeLists.txt | 19 ++++++++------- elmerice/Tests/Damage/CMakeLists.txt | 14 ++++++----- elmerice/Tests/EigenValues/CMakeLists.txt | 12 ++++++---- elmerice/Tests/Emergence/CMakeLists.txt | 14 ++++++----- elmerice/Tests/Enthalpy/CMakeLists.txt | 14 ++++++----- .../Tests/ExportVertically/CMakeLists.txt | 12 ++++++---- elmerice/Tests/ForceToStress/CMakeLists.txt | 12 ++++++---- .../ForceToStress_periodic/CMakeLists.txt | 12 ++++++---- elmerice/Tests/FrictionHeat/CMakeLists.txt | 13 +++++----- .../Tests/FrictionHeatMasked/CMakeLists.txt | 13 +++++----- .../Tests/Friction_Coulomb/CMakeLists.txt | 12 ++++++---- .../Tests/Friction_Coulomb_Pw/CMakeLists.txt | 10 ++++---- .../Tests/Friction_Weertman/CMakeLists.txt | 12 ++++++---- .../Tests/Friction_Weertman2/CMakeLists.txt | 12 ++++++---- .../Friction_WeertmanNewton/CMakeLists.txt | 12 ++++++---- .../Friction_WeertmanNewton2/CMakeLists.txt | 12 ++++++---- elmerice/Tests/GL_MISMIP/CMakeLists.txt | 14 ++++++----- elmerice/Tests/GlaDS/CMakeLists.txt | 12 ++++++---- elmerice/Tests/GlaDS_2d/CMakeLists.txt | 14 ++++++----- elmerice/Tests/GlaDS_3dInt/CMakeLists.txt | 14 ++++++----- elmerice/Tests/GlaDS_3dMesh/CMakeLists.txt | 14 ++++++----- elmerice/Tests/GlaDS_SSA/CMakeLists.txt | 12 ++++++---- elmerice/Tests/Glen_2D/CMakeLists.txt | 10 ++++---- .../Tests/Grid2DInterpolator/CMakeLists.txt | 12 ++++++---- elmerice/Tests/Grounded/CMakeLists.txt | 18 +++++++------- elmerice/Tests/Hydro_Coupled/CMakeLists.txt | 12 ++++++---- elmerice/Tests/Hydro_SedOnly/CMakeLists.txt | 12 ++++++---- .../Tests/IntegrateVertically/CMakeLists.txt | 12 ++++++---- .../Tests/IntegratedVelocity/CMakeLists.txt | 12 ++++++---- elmerice/Tests/LateralFriction/CMakeLists.txt | 12 ++++++---- elmerice/Tests/MISMIP_FS-SSA/CMakeLists.txt | 14 ++++++----- elmerice/Tests/Permafrost_Biot/CMakeLists.txt | 12 ++++++---- elmerice/Tests/SIA/CMakeLists.txt | 10 ++++---- elmerice/Tests/SSA_Coulomb/CMakeLists.txt | 12 ++++++---- elmerice/Tests/SSA_IceSheet/CMakeLists.txt | 10 ++++---- elmerice/Tests/SSA_Weertman/CMakeLists.txt | 12 ++++++---- elmerice/Tests/ShapeFactor/CMakeLists.txt | 12 ++++++---- elmerice/Tests/StrainRate/CMakeLists.txt | 12 ++++++---- elmerice/Tests/Teterousse3a/CMakeLists.txt | 14 ++++++----- elmerice/Tests/Teterousse3a_b/CMakeLists.txt | 14 ++++++----- .../Teterousse_DeformHeat/CMakeLists.txt | 14 ++++++----- elmerice/Tests/ThicknessSolver/CMakeLists.txt | 14 ++++++----- fem/tests/ArteryOutlet/CMakeLists.txt | 14 ++++++----- fem/tests/BatteryDischarge/CMakeLists.txt | 12 ++++++---- .../Beam_3D_Cantilever_Eigen/CMakeLists.txt | 12 ++++++---- .../BlockDomainsFourHeaters/CMakeLists.txt | 12 ++++++---- .../BlockRotatingBCPoisson3D/CMakeLists.txt | 12 ++++++---- fem/tests/CurvedBndryPFEM/CMakeLists.txt | 15 ++++++------ fem/tests/CurvedBndryPFEM2/CMakeLists.txt | 15 ++++++------ fem/tests/CylComAxi/CMakeLists.txt | 13 +++++----- fem/tests/DNS_WaveSimulation/CMakeLists.txt | 12 ++++++---- fem/tests/DirichletNeumann/CMakeLists.txt | 13 +++++----- .../DirichletNeumannSlave/CMakeLists.txt | 13 +++++----- fem/tests/EMWaveBoxHexasEigen/CMakeLists.txt | 12 ++++++---- fem/tests/ElastElstat1DBeam/CMakeLists.txt | 13 +++++----- fem/tests/ElastElstatBeam/CMakeLists.txt | 13 +++++----- fem/tests/ElastElstatBeamNodal/CMakeLists.txt | 12 ++++++---- fem/tests/ElastPelem2dPmultg/CMakeLists.txt | 12 ++++++---- fem/tests/ElastPelem2dQuad/CMakeLists.txt | 12 ++++++---- fem/tests/ElastPelem2dTri/CMakeLists.txt | 12 ++++++---- .../ElasticBeam2DDampingBeta/CMakeLists.txt | 12 ++++++---- .../ElasticBeam2DDampingBetaP2/CMakeLists.txt | 12 ++++++---- fem/tests/ElasticBeamRestart/CMakeLists.txt | 10 ++++---- fem/tests/Electrokinetics/CMakeLists.txt | 12 ++++++---- fem/tests/ExtrudedMesh/CMakeLists.txt | 15 ++++++------ .../ExtrudedMeshBaseline1/CMakeLists.txt | 14 ++++++----- fem/tests/FilmFlowLine/CMakeLists.txt | 12 ++++++---- fem/tests/FilmFlowPipe/CMakeLists.txt | 12 ++++++---- fem/tests/FilmFlowPlane/CMakeLists.txt | 12 ++++++---- fem/tests/FilmFlowPlane2/CMakeLists.txt | 12 ++++++---- fem/tests/FilmFlowPlane3/CMakeLists.txt | 12 ++++++---- fem/tests/HeatEqExitCondition/CMakeLists.txt | 12 ++++++---- fem/tests/HeatPlateSym/CMakeLists.txt | 12 ++++++---- fem/tests/HelmholtzPlaneWaves/CMakeLists.txt | 13 +++++----- .../HelmholtzPlaneWavesAxis/CMakeLists.txt | 13 +++++----- .../HelmholtzPlaneWavesParam/CMakeLists.txt | 12 ++++++---- .../HelmholtzPlaneWavesScan/CMakeLists.txt | 12 ++++++---- .../HelmholtzSolveImpMatrix/CMakeLists.txt | 12 ++++++---- fem/tests/HelmholtzStructure/CMakeLists.txt | 12 ++++++---- fem/tests/HelmholtzStructure2/CMakeLists.txt | 12 ++++++---- fem/tests/HelmholtzStructure3/CMakeLists.txt | 12 ++++++---- fem/tests/IncreaseOrderBrick/CMakeLists.txt | 12 ++++++---- fem/tests/IncreaseOrderPrism/CMakeLists.txt | 12 ++++++---- fem/tests/IncreaseOrderQuad/CMakeLists.txt | 12 ++++++---- fem/tests/IncreaseOrderTet/CMakeLists.txt | 12 ++++++---- fem/tests/IncreaseOrderTri/CMakeLists.txt | 12 ++++++---- fem/tests/InductionHeating/CMakeLists.txt | 13 +++++----- fem/tests/InductionHeating2/CMakeLists.txt | 13 +++++----- .../IntegralConstraintHartmann/CMakeLists.txt | 12 ++++++---- .../IntegralConstraintPoisson/CMakeLists.txt | 12 ++++++---- fem/tests/L2norm/CMakeLists.txt | 14 ++++++----- fem/tests/LevelsetFallingDrop/CMakeLists.txt | 14 ++++++----- fem/tests/LimitDisplacement/CMakeLists.txt | 12 ++++++---- fem/tests/LimitDisplacement3/CMakeLists.txt | 12 ++++++---- fem/tests/LinControlCoordDisp/CMakeLists.txt | 12 ++++++---- fem/tests/LinControlLoadDisp/CMakeLists.txt | 12 ++++++---- .../LinearSolverNamespace/CMakeLists.txt | 12 ++++++---- .../LinearSolverNamespace2/CMakeLists.txt | 12 ++++++---- fem/tests/MarchingODE4/CMakeLists.txt | 12 ++++++---- fem/tests/MeshSwap1/CMakeLists.txt | 12 ++++++---- fem/tests/MonolithicSlave/CMakeLists.txt | 12 ++++++---- fem/tests/MonolithicSlave2/CMakeLists.txt | 12 ++++++---- fem/tests/NormalTangentialBC/CMakeLists.txt | 12 ++++++---- .../ParticleAdvectorZalesak/CMakeLists.txt | 15 ++++++------ fem/tests/PeriodicTime/CMakeLists.txt | 12 ++++++---- fem/tests/PhaseChange2/CMakeLists.txt | 13 +++++----- fem/tests/PhaseChange3/CMakeLists.txt | 13 +++++----- fem/tests/PhaseChange4/CMakeLists.txt | 13 +++++----- fem/tests/PoissonBoltzmann/CMakeLists.txt | 12 ++++++---- fem/tests/PoissonPFEM/CMakeLists.txt | 15 ++++++------ fem/tests/PredictorCorrector/CMakeLists.txt | 12 ++++++---- fem/tests/Q1Q0/CMakeLists.txt | 15 ++++++------ fem/tests/RunControlStructured/CMakeLists.txt | 12 ++++++---- fem/tests/SD_CurvedBndryPFEM/CMakeLists.txt | 15 ++++++------ fem/tests/SD_CurvedBndryPFEM2/CMakeLists.txt | 15 ++++++------ .../SD_DNS_WaveSimulation/CMakeLists.txt | 12 ++++++---- .../SD_ElastPelem2dPmultg/CMakeLists.txt | 12 ++++++---- fem/tests/SD_ElastPelem2dQuad/CMakeLists.txt | 12 ++++++---- .../CMakeLists.txt | 12 ++++++---- fem/tests/SD_FilmFlowPlane/CMakeLists.txt | 12 ++++++---- fem/tests/SD_FilmFlowPlane2/CMakeLists.txt | 12 ++++++---- fem/tests/SD_FilmFlowPlane3/CMakeLists.txt | 12 ++++++---- fem/tests/SD_PoissonPFEM/CMakeLists.txt | 15 ++++++------ fem/tests/SD_SinPlane/CMakeLists.txt | 13 +++++----- .../SD_SolverSpecificMeshes/CMakeLists.txt | 15 ++++++------ .../SD_ViscoElasticMaxwell/CMakeLists.txt | 12 ++++++---- fem/tests/SD_pmultg/CMakeLists.txt | 14 ++++++----- .../CMakeLists.txt | 14 +++++++---- fem/tests/ShoeboxFsiHarmonic/CMakeLists.txt | 12 ++++++---- fem/tests/ShoeboxFsiHarmonic2D/CMakeLists.txt | 12 ++++++---- .../ShoeboxFsiHarmonicPlate/CMakeLists.txt | 12 ++++++---- fem/tests/ShoeboxFsiStatic/CMakeLists.txt | 12 ++++++---- .../ShoeboxFsiStaticPlate/CMakeLists.txt | 12 ++++++---- fem/tests/ShoeboxStaticPlate/CMakeLists.txt | 12 ++++++---- fem/tests/SinPlane/CMakeLists.txt | 13 +++++----- fem/tests/SinusFlowTunedVelo/CMakeLists.txt | 12 ++++++---- fem/tests/SolverSpecificMeshes/CMakeLists.txt | 15 ++++++------ fem/tests/StatCurrentVec/CMakeLists.txt | 12 ++++++---- fem/tests/StatCurrentVec2/CMakeLists.txt | 12 ++++++---- fem/tests/StatCurrentVecAniso/CMakeLists.txt | 12 ++++++---- .../StatCurrentVecFarfield/CMakeLists.txt | 12 ++++++---- fem/tests/Step_v2f/CMakeLists.txt | 12 ++++++---- .../TEAM30a_3ph_transient/CMakeLists.txt | 12 ++++++---- fem/tests/TankAst/CMakeLists.txt | 13 +++++----- fem/tests/ThermalActuator/CMakeLists.txt | 12 ++++++---- fem/tests/ThermalBiMetal/CMakeLists.txt | 14 ++++++----- fem/tests/ThermalBiMetal2/CMakeLists.txt | 14 ++++++----- fem/tests/ThermalCompress/CMakeLists.txt | 12 ++++++---- fem/tests/TimeProfileBC/CMakeLists.txt | 14 ++++++----- .../TopoOptElast2DCompliance/CMakeLists.txt | 12 ++++++---- .../TopoOptElast2DCompliance2/CMakeLists.txt | 12 ++++++---- .../TopoOptHeat2DCompliance/CMakeLists.txt | 12 ++++++---- .../TopoOptHeat2DCompliance2/CMakeLists.txt | 12 ++++++---- fem/tests/TravellingHeater/CMakeLists.txt | 14 ++++++----- fem/tests/TravellingHeater2/CMakeLists.txt | 14 ++++++----- .../CMakeLists.txt | 12 ++++++---- fem/tests/ViscoElasticMaxwell/CMakeLists.txt | 12 ++++++---- fem/tests/WaveEqu/CMakeLists.txt | 13 +++++----- .../WaveEquEigenDampedDirect/CMakeLists.txt | 12 ++++++---- fem/tests/adaptivity4/CMakeLists.txt | 13 +++++----- fem/tests/adaptivity5/CMakeLists.txt | 12 ++++++---- fem/tests/beam-springs/CMakeLists.txt | 14 ++++++----- fem/tests/bodydir/CMakeLists.txt | 13 +++++----- fem/tests/bodydir2/CMakeLists.txt | 14 ++++++----- fem/tests/bodyload/CMakeLists.txt | 13 +++++----- fem/tests/channel_v2f/CMakeLists.txt | 12 ++++++---- .../circuits2D_harmonic_foil/CMakeLists.txt | 19 +++++++++------ .../CMakeLists.txt | 21 +++++++++------- .../CMakeLists.txt | 21 +++++++++------- .../CMakeLists.txt | 21 +++++++++------- .../CMakeLists.txt | 19 +++++++++------ .../circuits2D_scan_harmonics/CMakeLists.txt | 19 +++++++++------ .../circuits2D_transient_foil/CMakeLists.txt | 19 +++++++++------ .../CMakeLists.txt | 21 +++++++++------- .../CMakeLists.txt | 21 +++++++++------- .../circuits2D_with_hysteresis/CMakeLists.txt | 15 ++++++++---- .../CMakeLists.txt | 15 ++++++++---- .../circuits_harmonic_foil/CMakeLists.txt | 21 +++++++++------- .../CMakeLists.txt | 21 +++++++++------- .../CMakeLists.txt | 21 +++++++++------- .../CMakeLists.txt | 19 +++++++++------ .../circuits_harmonic_massive/CMakeLists.txt | 18 ++++++++------ .../circuits_harmonic_stranded/CMakeLists.txt | 18 ++++++++------ .../CMakeLists.txt | 18 ++++++++------ .../CMakeLists.txt | 21 +++++++++------- fem/tests/current/CMakeLists.txt | 13 +++++----- fem/tests/current_heat_control/CMakeLists.txt | 13 +++++----- fem/tests/diffuser_v2f/CMakeLists.txt | 13 +++++----- fem/tests/elstat_source/CMakeLists.txt | 13 +++++----- fem/tests/freesurf_axi/CMakeLists.txt | 12 ++++++---- fem/tests/freesurf_int/CMakeLists.txt | 13 +++++----- fem/tests/fsi_beam_optimize/CMakeLists.txt | 14 ++++++----- fem/tests/fsi_box/CMakeLists.txt | 12 ++++++---- fem/tests/fsi_box2/CMakeLists.txt | 12 ++++++---- fem/tests/heateq_bdf2/CMakeLists.txt | 12 ++++++---- fem/tests/heateq_bdf3/CMakeLists.txt | 12 ++++++---- fem/tests/heateq_newmark/CMakeLists.txt | 12 ++++++---- .../heateq_newmark_global/CMakeLists.txt | 13 +++++----- fem/tests/heateq_spline_table/CMakeLists.txt | 13 +++++----- fem/tests/heateq_steady_start/CMakeLists.txt | 13 +++++----- fem/tests/levelset1/CMakeLists.txt | 14 ++++++----- fem/tests/levelset2/CMakeLists.txt | 14 ++++++----- fem/tests/levelset3/CMakeLists.txt | 12 ++++++---- fem/tests/levelset3b/CMakeLists.txt | 13 +++++----- fem/tests/linearsolvers/CMakeLists.txt | 13 +++++----- fem/tests/linearsolvers_cmplx/CMakeLists.txt | 12 ++++++---- .../mgdyn2D_compute_average_b/CMakeLists.txt | 23 +++++++++--------- .../CMakeLists.txt | 23 +++++++++--------- .../CMakeLists.txt | 23 +++++++++--------- fem/tests/mgdyn2D_pm/CMakeLists.txt | 13 +++++----- .../CMakeLists.txt | 24 +++++++++---------- .../CMakeLists.txt | 12 ++++++---- fem/tests/mhd/CMakeLists.txt | 14 ++++++----- fem/tests/mhd2/CMakeLists.txt | 12 ++++++---- fem/tests/multimesh/CMakeLists.txt | 12 ++++++---- fem/tests/periodic_normal/CMakeLists.txt | 12 ++++++---- fem/tests/periodic_rot/CMakeLists.txt | 12 ++++++---- fem/tests/piezo/CMakeLists.txt | 13 +++++----- fem/tests/pmultg/CMakeLists.txt | 14 ++++++----- fem/tests/pointdir/CMakeLists.txt | 13 +++++----- fem/tests/pointload2/CMakeLists.txt | 12 ++++++---- fem/tests/radiation/CMakeLists.txt | 13 +++++----- fem/tests/radiation2d/CMakeLists.txt | 12 ++++++---- fem/tests/radiation2dAA/CMakeLists.txt | 12 ++++++---- fem/tests/radiation2d_deform/CMakeLists.txt | 12 ++++++---- fem/tests/radiation2dsymm/CMakeLists.txt | 12 ++++++---- fem/tests/radiation3d/CMakeLists.txt | 12 ++++++---- fem/tests/radiation_bin/CMakeLists.txt | 12 ++++++---- fem/tests/reload/CMakeLists.txt | 13 +++++----- fem/tests/stress/CMakeLists.txt | 13 +++++----- fem/tests/structmap4/CMakeLists.txt | 12 ++++++---- fem/tests/structmap5/CMakeLists.txt | 12 ++++++---- fem/tests/structmap6/CMakeLists.txt | 12 ++++++---- fem/tests/structmap7/CMakeLists.txt | 12 ++++++---- fem/tests/structmap8/CMakeLists.txt | 12 ++++++---- fem/tests/structmap_multilayer/CMakeLists.txt | 12 ++++++---- fem/tests/tresca/CMakeLists.txt | 16 +++++++------ 245 files changed, 1879 insertions(+), 1391 deletions(-) diff --git a/elmerice/Tests/AIFlowSolve/CMakeLists.txt b/elmerice/Tests/AIFlowSolve/CMakeLists.txt index 8916062981..e1f71fc94c 100644 --- a/elmerice/Tests/AIFlowSolve/CMakeLists.txt +++ b/elmerice/Tests/AIFlowSolve/CMakeLists.txt @@ -1,13 +1,15 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(AIFlow.sif AIFlow.sif COPYONLY) + CONFIGURE_FILE(AIFlow.sif AIFlow.sif COPYONLY) -SET(FILE_LISTS ${CMAKE_SOURCE_DIR}/elmerice/Solvers/AIFlowSolve_nlS2.F90) -ADD_ELMERICETEST_MODULE(AIFlowSolve AIFlowSolveS2 "${FILE_LISTS}") + SET(FILE_LISTS ${CMAKE_SOURCE_DIR}/elmerice/Solvers/AIFlowSolve_nlS2.F90) + ADD_ELMERICETEST_MODULE(AIFlowSolve AIFlowSolveS2 "${FILE_LISTS}") -TARGET_LINK_LIBRARIES(AIFlowSolve_AIFlowSolveS2 ElmerIceSolvers) + TARGET_LINK_LIBRARIES(AIFlowSolve_AIFlowSolveS2 ElmerIceSolvers) -FILE(COPY ELMERSOLVER_STARTINFO README.txt domec DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO README.txt domec DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(AIFlowSolve) -ADD_ELMERICE_LABEL(AIFlowSolve elmerice-fast) + ADD_ELMERICE_TEST(AIFlowSolve) + ADD_ELMERICE_LABEL(AIFlowSolve elmerice-fast) +ENDIF() diff --git a/elmerice/Tests/BackgroundError/CMakeLists.txt b/elmerice/Tests/BackgroundError/CMakeLists.txt index 50fc2c118c..4f7ad25b8f 100644 --- a/elmerice/Tests/BackgroundError/CMakeLists.txt +++ b/elmerice/Tests/BackgroundError/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(BackgroundError) -ADD_ELMERICE_LABEL(BackgroundError elmerice-fast) -ADD_ELMERICE_LABEL(BackgroundError CovUtils) + ADD_ELMERICE_TEST(BackgroundError) + ADD_ELMERICE_LABEL(BackgroundError elmerice-fast) + ADD_ELMERICE_LABEL(BackgroundError CovUtils) +ENDIF() diff --git a/elmerice/Tests/Buoyancy/CMakeLists.txt b/elmerice/Tests/Buoyancy/CMakeLists.txt index b0556e242c..02a86a1c31 100644 --- a/elmerice/Tests/Buoyancy/CMakeLists.txt +++ b/elmerice/Tests/Buoyancy/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(buoyancy.sif buoyancy.sif COPYONLY) + CONFIGURE_FILE(buoyancy.sif buoyancy.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO README.txt mesh.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO README.txt mesh.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(Buoyancy) -ADD_ELMERICE_LABEL(Buoyancy elmerice-fast) + ADD_ELMERICE_TEST(Buoyancy) + ADD_ELMERICE_LABEL(Buoyancy elmerice-fast) +ENDIF() diff --git a/elmerice/Tests/Calving2D/CMakeLists.txt b/elmerice/Tests/Calving2D/CMakeLists.txt index e26e556d80..47f22f10f5 100644 --- a/elmerice/Tests/Calving2D/CMakeLists.txt +++ b/elmerice/Tests/Calving2D/CMakeLists.txt @@ -1,12 +1,14 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(calving2d.sif calving2d.sif COPYONLY) + CONFIGURE_FILE(calving2d.sif calving2d.sif COPYONLY) -ADD_ELMERICETEST_MODULE(Calving2D bedrockfunction_flat ./PROG/bedrockfunction_flat.f90) + ADD_ELMERICETEST_MODULE(Calving2D bedrockfunction_flat ./PROG/bedrockfunction_flat.f90) -FILE(COPY ELMERSOLVER_STARTINFO block_helheim.msh PROG DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO block_helheim.msh PROG DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -FILE(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/Results/block_helheim") + FILE(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/Results/block_helheim") -ADD_ELMERICE_TEST(Calving2D) -ADD_ELMERICE_LABEL(Calving2D slow) + ADD_ELMERICE_TEST(Calving2D) + ADD_ELMERICE_LABEL(Calving2D slow) +ENDIF() diff --git a/elmerice/Tests/Calving3D_lset/CMakeLists.txt b/elmerice/Tests/Calving3D_lset/CMakeLists.txt index a68b659c26..5312de82e7 100644 --- a/elmerice/Tests/Calving3D_lset/CMakeLists.txt +++ b/elmerice/Tests/Calving3D_lset/CMakeLists.txt @@ -20,8 +20,7 @@ IF(HAVE_MMG AND HAVE_ZOLTAN) IF(${NPROCS} GREATER ${MPI_TEST_MAXPROC} OR ${NPROCS} LESS ${MPI_TEST_MINPROC}) MESSAGE(STATUS "Skipping test Calving3D_lset with ${NPROCS} procs") ELSE() - ADD_ELMERICE_TEST(Calving3D_lset) - ADD_ELMERICE_LABEL(Calving3D_lset slow) + ADD_ELMERICE_TEST(Calving3D_lset LABELS slow) ENDIF() ENDIF() diff --git a/elmerice/Tests/ComputeDevStress/CMakeLists.txt b/elmerice/Tests/ComputeDevStress/CMakeLists.txt index 0e50b91548..d700ae8330 100644 --- a/elmerice/Tests/ComputeDevStress/CMakeLists.txt +++ b/elmerice/Tests/ComputeDevStress/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(computeDevStress.sif computeDevStress.sif COPYONLY) + CONFIGURE_FILE(computeDevStress.sif computeDevStress.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(ComputeDevStress) -ADD_ELMERICE_LABEL(ComputeDevStress elmerice-fast) + ADD_ELMERICE_TEST(ComputeDevStress) + ADD_ELMERICE_LABEL(ComputeDevStress elmerice-fast) +ENDIF() diff --git a/elmerice/Tests/Contact/CMakeLists.txt b/elmerice/Tests/Contact/CMakeLists.txt index 9fa094226c..f0322c9c93 100644 --- a/elmerice/Tests/Contact/CMakeLists.txt +++ b/elmerice/Tests/Contact/CMakeLists.txt @@ -1,7 +1,9 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(cavity.sif cavity.sif COPYONLY) + CONFIGURE_FILE(cavity.sif cavity.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO ice.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO ice.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(Contact) + ADD_ELMERICE_TEST(Contact) +ENDIF() diff --git a/elmerice/Tests/CovarianceVector/CMakeLists.txt b/elmerice/Tests/CovarianceVector/CMakeLists.txt index a0be9efc65..823e5919a5 100644 --- a/elmerice/Tests/CovarianceVector/CMakeLists.txt +++ b/elmerice/Tests/CovarianceVector/CMakeLists.txt @@ -1,13 +1,14 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) + CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(Init.F90 Init.F90 COPYONLY) -CONFIGURE_FILE(case.sif case.sif COPYONLY) -CONFIGURE_FILE(Init.F90 Init.F90 COPYONLY) + FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + ADD_ELMERICETEST_MODULE(CovarianceVector Init ./Init.F90) -ADD_ELMERICETEST_MODULE(CovarianceVector Init ./Init.F90) - -ADD_ELMERICE_TEST(CovarianceVector) -ADD_ELMERICE_LABEL(CovarianceVector elmerice-fast) -ADD_ELMERICE_LABEL(CovarianceVector CovUtils) + ADD_ELMERICE_TEST(CovarianceVector) + ADD_ELMERICE_LABEL(CovarianceVector elmerice-fast) + ADD_ELMERICE_LABEL(CovarianceVector CovUtils) +ENDIF() diff --git a/elmerice/Tests/CovarianceVector2/CMakeLists.txt b/elmerice/Tests/CovarianceVector2/CMakeLists.txt index 3fc40778e7..6492d0fe2d 100644 --- a/elmerice/Tests/CovarianceVector2/CMakeLists.txt +++ b/elmerice/Tests/CovarianceVector2/CMakeLists.txt @@ -1,13 +1,14 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) + CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(Init.F90 Init.F90 COPYONLY) -CONFIGURE_FILE(case.sif case.sif COPYONLY) -CONFIGURE_FILE(Init.F90 Init.F90 COPYONLY) + FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + ADD_ELMERICETEST_MODULE(CovarianceVector2 Init ./Init.F90) -ADD_ELMERICETEST_MODULE(CovarianceVector2 Init ./Init.F90) - -ADD_ELMERICE_TEST(CovarianceVector2) -ADD_ELMERICE_LABEL(CovarianceVector2 elmerice-fast) -ADD_ELMERICE_LABEL(CovarianceVector2 CovUtils) + ADD_ELMERICE_TEST(CovarianceVector2) + ADD_ELMERICE_LABEL(CovarianceVector2 elmerice-fast) + ADD_ELMERICE_LABEL(CovarianceVector2 CovUtils) +ENDIF() diff --git a/elmerice/Tests/Damage/CMakeLists.txt b/elmerice/Tests/Damage/CMakeLists.txt index b9d46c972a..2fb138ddbe 100644 --- a/elmerice/Tests/Damage/CMakeLists.txt +++ b/elmerice/Tests/Damage/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(damage.sif damage.sif COPYONLY) + CONFIGURE_FILE(damage.sif damage.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO mesh.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO mesh.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(Damage) -ADD_ELMERICE_LABEL(Damage elmerice-long) -ADD_ELMERICE_LABEL(Damage slow) + ADD_ELMERICE_TEST(Damage) + ADD_ELMERICE_LABEL(Damage elmerice-long) + ADD_ELMERICE_LABEL(Damage slow) +ENDIF() diff --git a/elmerice/Tests/EigenValues/CMakeLists.txt b/elmerice/Tests/EigenValues/CMakeLists.txt index 0969775fc3..4fb756ab0f 100644 --- a/elmerice/Tests/EigenValues/CMakeLists.txt +++ b/elmerice/Tests/EigenValues/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(carre2D.sif carre2D.sif COPYONLY) + CONFIGURE_FILE(carre2D.sif carre2D.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO mesh.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO mesh.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(EigenValues) -ADD_ELMERICE_LABEL(EigenValues elmerice-fast) + ADD_ELMERICE_TEST(EigenValues) + ADD_ELMERICE_LABEL(EigenValues elmerice-fast) +ENDIF() diff --git a/elmerice/Tests/Emergence/CMakeLists.txt b/elmerice/Tests/Emergence/CMakeLists.txt index 03eb3af1ba..18ad13938e 100644 --- a/elmerice/Tests/Emergence/CMakeLists.txt +++ b/elmerice/Tests/Emergence/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(emergencevelocity_restart.sif emergencevelocity_restart.sif COPYONLY) + CONFIGURE_FILE(emergencevelocity_restart.sif emergencevelocity_restart.sif COPYONLY) -ADD_ELMERICETEST_MODULE(Emergence buelerprofile buelerprofile.f90) -FILE(COPY ELMERSOLVER_STARTINFO buelerprofile.f90 footprint_bueler_f DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + ADD_ELMERICETEST_MODULE(Emergence buelerprofile buelerprofile.f90) + FILE(COPY ELMERSOLVER_STARTINFO buelerprofile.f90 footprint_bueler_f DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(Emergence) -ADD_ELMERICE_LABEL(Emergence elmerice-fast) + ADD_ELMERICE_TEST(Emergence) + ADD_ELMERICE_LABEL(Emergence elmerice-fast) +ENDIF() diff --git a/elmerice/Tests/Enthalpy/CMakeLists.txt b/elmerice/Tests/Enthalpy/CMakeLists.txt index 6db46fb207..99d4b4ebcf 100644 --- a/elmerice/Tests/Enthalpy/CMakeLists.txt +++ b/elmerice/Tests/Enthalpy/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(enthalpy.sif enthalpy.sif COPYONLY) + CONFIGURE_FILE(enthalpy.sif enthalpy.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO WithOutCavity DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO WithOutCavity DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(Enthalpy) -ADD_ELMERICE_LABEL(Enthalpy elmerice-long) -ADD_ELMERICE_LABEL(Enthalpy slow) + ADD_ELMERICE_TEST(Enthalpy) + ADD_ELMERICE_LABEL(Enthalpy elmerice-long) + ADD_ELMERICE_LABEL(Enthalpy slow) +ENDIF() diff --git a/elmerice/Tests/ExportVertically/CMakeLists.txt b/elmerice/Tests/ExportVertically/CMakeLists.txt index 89891b4d37..24c66c5fa9 100644 --- a/elmerice/Tests/ExportVertically/CMakeLists.txt +++ b/elmerice/Tests/ExportVertically/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(exportvertically.sif exportvertically.sif COPYONLY) + CONFIGURE_FILE(exportvertically.sif exportvertically.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO mesh.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO mesh.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(ExportVertically) -ADD_ELMERICE_LABEL(ExportVertically elmerice-fast) + ADD_ELMERICE_TEST(ExportVertically) + ADD_ELMERICE_LABEL(ExportVertically elmerice-fast) +ENDIF() diff --git a/elmerice/Tests/ForceToStress/CMakeLists.txt b/elmerice/Tests/ForceToStress/CMakeLists.txt index 92ed49deee..d4ce09f5cb 100644 --- a/elmerice/Tests/ForceToStress/CMakeLists.txt +++ b/elmerice/Tests/ForceToStress/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(test.sif test.sif COPYONLY) + CONFIGURE_FILE(test.sif test.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO cube.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO cube.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(ForceToStress) -ADD_ELMERICE_LABEL(ForceToStress elmerice-fast) + ADD_ELMERICE_TEST(ForceToStress) + ADD_ELMERICE_LABEL(ForceToStress elmerice-fast) +ENDIF() diff --git a/elmerice/Tests/ForceToStress_periodic/CMakeLists.txt b/elmerice/Tests/ForceToStress_periodic/CMakeLists.txt index d3a57d2c09..cbad50ac21 100644 --- a/elmerice/Tests/ForceToStress_periodic/CMakeLists.txt +++ b/elmerice/Tests/ForceToStress_periodic/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(test.sif test.sif COPYONLY) + CONFIGURE_FILE(test.sif test.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO cube.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO cube.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(ForceToStress_periodic) -ADD_ELMERICE_LABEL(ForceToStress_periodic elmerice-fast) + ADD_ELMERICE_TEST(ForceToStress_periodic) + ADD_ELMERICE_LABEL(ForceToStress_periodic elmerice-fast) +ENDIF() diff --git a/elmerice/Tests/FrictionHeat/CMakeLists.txt b/elmerice/Tests/FrictionHeat/CMakeLists.txt index c13c03116c..255534fbfa 100644 --- a/elmerice/Tests/FrictionHeat/CMakeLists.txt +++ b/elmerice/Tests/FrictionHeat/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(test.sif test.sif COPYONLY) + CONFIGURE_FILE(test.sif test.sif COPYONLY) -ADD_ELMERICETEST_MODULE(FrictionHeat DummySolver DummySolver.f90) -FILE(COPY ELMERSOLVER_STARTINFO DummySolver.f90 cube.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") - -ADD_ELMERICE_TEST(FrictionHeat) + ADD_ELMERICETEST_MODULE(FrictionHeat DummySolver DummySolver.f90) + FILE(COPY ELMERSOLVER_STARTINFO DummySolver.f90 cube.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + ADD_ELMERICE_TEST(FrictionHeat) +ENDIF() diff --git a/elmerice/Tests/FrictionHeatMasked/CMakeLists.txt b/elmerice/Tests/FrictionHeatMasked/CMakeLists.txt index 7f14dc182f..8ea3a2d76b 100644 --- a/elmerice/Tests/FrictionHeatMasked/CMakeLists.txt +++ b/elmerice/Tests/FrictionHeatMasked/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(test.sif test.sif COPYONLY) + CONFIGURE_FILE(test.sif test.sif COPYONLY) -ADD_ELMERICETEST_MODULE(FrictionHeatMasked DummySolver DummySolver.f90) -FILE(COPY ELMERSOLVER_STARTINFO DummySolver.f90 cube.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") - -ADD_ELMERICE_TEST(FrictionHeatMasked) + ADD_ELMERICETEST_MODULE(FrictionHeatMasked DummySolver DummySolver.f90) + FILE(COPY ELMERSOLVER_STARTINFO DummySolver.f90 cube.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + ADD_ELMERICE_TEST(FrictionHeatMasked) +ENDIF() diff --git a/elmerice/Tests/Friction_Coulomb/CMakeLists.txt b/elmerice/Tests/Friction_Coulomb/CMakeLists.txt index eadc72f8d3..cb40d21755 100644 --- a/elmerice/Tests/Friction_Coulomb/CMakeLists.txt +++ b/elmerice/Tests/Friction_Coulomb/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(ismip_coulomb.sif ismip_coulomb.sif COPYONLY) + CONFIGURE_FILE(ismip_coulomb.sif ismip_coulomb.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(Friction_Coulomb) -ADD_ELMERICE_LABEL(Friction_Coulomb elmerice-fast) + ADD_ELMERICE_TEST(Friction_Coulomb) + ADD_ELMERICE_LABEL(Friction_Coulomb elmerice-fast) +ENDIF() diff --git a/elmerice/Tests/Friction_Coulomb_Pw/CMakeLists.txt b/elmerice/Tests/Friction_Coulomb_Pw/CMakeLists.txt index 34eb7e29fe..2d9ab2b817 100644 --- a/elmerice/Tests/Friction_Coulomb_Pw/CMakeLists.txt +++ b/elmerice/Tests/Friction_Coulomb_Pw/CMakeLists.txt @@ -1,7 +1,9 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(ismip_coulomb_pw.sif ismip_coulomb_pw.sif COPYONLY) + CONFIGURE_FILE(ismip_coulomb_pw.sif ismip_coulomb_pw.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(Friction_Coulomb_Pw) + ADD_ELMERICE_TEST(Friction_Coulomb_Pw) +ENDIF() diff --git a/elmerice/Tests/Friction_Weertman/CMakeLists.txt b/elmerice/Tests/Friction_Weertman/CMakeLists.txt index 14d701e2cb..b45a4834f1 100644 --- a/elmerice/Tests/Friction_Weertman/CMakeLists.txt +++ b/elmerice/Tests/Friction_Weertman/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(ismip_weertman.sif ismip_weertman.sif COPYONLY) + CONFIGURE_FILE(ismip_weertman.sif ismip_weertman.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(Friction_Weertman) -ADD_ELMERICE_LABEL(Friction_Weertman elmerice-fast) + ADD_ELMERICE_TEST(Friction_Weertman) + ADD_ELMERICE_LABEL(Friction_Weertman elmerice-fast) +ENDIF() diff --git a/elmerice/Tests/Friction_Weertman2/CMakeLists.txt b/elmerice/Tests/Friction_Weertman2/CMakeLists.txt index de08b5bf2f..9182ca2008 100644 --- a/elmerice/Tests/Friction_Weertman2/CMakeLists.txt +++ b/elmerice/Tests/Friction_Weertman2/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(ismip_weertman2.sif ismip_weertman2.sif COPYONLY) + CONFIGURE_FILE(ismip_weertman2.sif ismip_weertman2.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(Friction_Weertman2) -ADD_ELMERICE_LABEL(Friction_Weertman2 elmerice-fast) + ADD_ELMERICE_TEST(Friction_Weertman2) + ADD_ELMERICE_LABEL(Friction_Weertman2 elmerice-fast) +ENDIF() diff --git a/elmerice/Tests/Friction_WeertmanNewton/CMakeLists.txt b/elmerice/Tests/Friction_WeertmanNewton/CMakeLists.txt index d3f01ff086..2656600dc5 100644 --- a/elmerice/Tests/Friction_WeertmanNewton/CMakeLists.txt +++ b/elmerice/Tests/Friction_WeertmanNewton/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(Friction_WeertmanNewton) -ADD_ELMERICE_LABEL(Friction_WeertmanNewton elmerice-fast) + ADD_ELMERICE_TEST(Friction_WeertmanNewton) + ADD_ELMERICE_LABEL(Friction_WeertmanNewton elmerice-fast) +ENDIF() diff --git a/elmerice/Tests/Friction_WeertmanNewton2/CMakeLists.txt b/elmerice/Tests/Friction_WeertmanNewton2/CMakeLists.txt index c491f399e0..165f80feed 100644 --- a/elmerice/Tests/Friction_WeertmanNewton2/CMakeLists.txt +++ b/elmerice/Tests/Friction_WeertmanNewton2/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(Friction_WeertmanNewton2) -ADD_ELMERICE_LABEL(Friction_WeertmanNewton2 elmerice-fast) + ADD_ELMERICE_TEST(Friction_WeertmanNewton2) + ADD_ELMERICE_LABEL(Friction_WeertmanNewton2 elmerice-fast) +ENDIF() diff --git a/elmerice/Tests/GL_MISMIP/CMakeLists.txt b/elmerice/Tests/GL_MISMIP/CMakeLists.txt index 79b1e3b3e8..e318e0b0cd 100644 --- a/elmerice/Tests/GL_MISMIP/CMakeLists.txt +++ b/elmerice/Tests/GL_MISMIP/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(mismip.sif mismip.sif COPYONLY) + CONFIGURE_FILE(mismip.sif mismip.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO mesh2d DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO mesh2d DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(GL_MISMIP) -ADD_ELMERICE_LABEL(GL_MISMIP elmerice-long) -ADD_ELMERICE_LABEL(GL_MISMIP slow) + ADD_ELMERICE_TEST(GL_MISMIP) + ADD_ELMERICE_LABEL(GL_MISMIP elmerice-long) + ADD_ELMERICE_LABEL(GL_MISMIP slow) +ENDIF() diff --git a/elmerice/Tests/GlaDS/CMakeLists.txt b/elmerice/Tests/GlaDS/CMakeLists.txt index 5ca3e434bf..afab741d32 100644 --- a/elmerice/Tests/GlaDS/CMakeLists.txt +++ b/elmerice/Tests/GlaDS/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(shmip_B5.sif shmip_B5.sif COPYONLY) + CONFIGURE_FILE(shmip_B5.sif shmip_B5.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO mesh_B5 DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO mesh_B5 DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(GlaDS) -ADD_ELMERICE_LABEL(GlaDS slow) + ADD_ELMERICE_TEST(GlaDS) + ADD_ELMERICE_LABEL(GlaDS slow) +ENDIF() diff --git a/elmerice/Tests/GlaDS_2d/CMakeLists.txt b/elmerice/Tests/GlaDS_2d/CMakeLists.txt index aa5daa098c..952784a24e 100644 --- a/elmerice/Tests/GlaDS_2d/CMakeLists.txt +++ b/elmerice/Tests/GlaDS_2d/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(glads_2d.sif glads_2d.sif COPYONLY) + CONFIGURE_FILE(glads_2d.sif glads_2d.sif COPYONLY) -FILE(MAKE_DIRECTORY results) -FILE(COPY ELMERSOLVER_STARTINFO mesh_B5 results DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(MAKE_DIRECTORY results) + FILE(COPY ELMERSOLVER_STARTINFO mesh_B5 results DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(GlaDS_2d) -ADD_ELMERICE_LABEL(GlaDS_2d slow) + ADD_ELMERICE_TEST(GlaDS_2d) + ADD_ELMERICE_LABEL(GlaDS_2d slow) +ENDIF() diff --git a/elmerice/Tests/GlaDS_3dInt/CMakeLists.txt b/elmerice/Tests/GlaDS_3dInt/CMakeLists.txt index 4d06923576..3e87ce3ee6 100644 --- a/elmerice/Tests/GlaDS_3dInt/CMakeLists.txt +++ b/elmerice/Tests/GlaDS_3dInt/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(glads_3dint.sif glads_3dint.sif COPYONLY) + CONFIGURE_FILE(glads_3dint.sif glads_3dint.sif COPYONLY) -FILE(MAKE_DIRECTORY results) -FILE(COPY ELMERSOLVER_STARTINFO mesh_B5 results DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(MAKE_DIRECTORY results) + FILE(COPY ELMERSOLVER_STARTINFO mesh_B5 results DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(GlaDS_3dInt) -ADD_ELMERICE_LABEL(GlaDS_3dInt slow) + ADD_ELMERICE_TEST(GlaDS_3dInt) + ADD_ELMERICE_LABEL(GlaDS_3dInt slow) +ENDIF() diff --git a/elmerice/Tests/GlaDS_3dMesh/CMakeLists.txt b/elmerice/Tests/GlaDS_3dMesh/CMakeLists.txt index 3bbb631810..85011b33a5 100644 --- a/elmerice/Tests/GlaDS_3dMesh/CMakeLists.txt +++ b/elmerice/Tests/GlaDS_3dMesh/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(glads_3dmesh.sif glads_3dmesh.sif COPYONLY) + CONFIGURE_FILE(glads_3dmesh.sif glads_3dmesh.sif COPYONLY) -FILE(MAKE_DIRECTORY results) -FILE(COPY ELMERSOLVER_STARTINFO mesh_B5_3d results DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(MAKE_DIRECTORY results) + FILE(COPY ELMERSOLVER_STARTINFO mesh_B5_3d results DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(GlaDS_3dMesh) -ADD_ELMERICE_LABEL(GlaDS_3dMesh slow) + ADD_ELMERICE_TEST(GlaDS_3dMesh) + ADD_ELMERICE_LABEL(GlaDS_3dMesh slow) +ENDIF() diff --git a/elmerice/Tests/GlaDS_SSA/CMakeLists.txt b/elmerice/Tests/GlaDS_SSA/CMakeLists.txt index 350eff5a66..af0c7c651b 100644 --- a/elmerice/Tests/GlaDS_SSA/CMakeLists.txt +++ b/elmerice/Tests/GlaDS_SSA/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(shmip_B5.sif shmip_B5.sif COPYONLY) + CONFIGURE_FILE(shmip_B5.sif shmip_B5.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO mesh_B5 DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO mesh_B5 DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(GlaDS_SSA) -ADD_ELMERICE_LABEL(GlaDS_SSA slow) + ADD_ELMERICE_TEST(GlaDS_SSA) + ADD_ELMERICE_LABEL(GlaDS_SSA slow) +ENDIF() diff --git a/elmerice/Tests/Glen_2D/CMakeLists.txt b/elmerice/Tests/Glen_2D/CMakeLists.txt index 277f53ee36..ee3b2fdf52 100644 --- a/elmerice/Tests/Glen_2D/CMakeLists.txt +++ b/elmerice/Tests/Glen_2D/CMakeLists.txt @@ -1,7 +1,9 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(test_glenDistrib.sif test_glenDistrib.sif COPYONLY) + CONFIGURE_FILE(test_glenDistrib.sif test_glenDistrib.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO mesh_B.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO mesh_B.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(Glen_2D) + ADD_ELMERICE_TEST(Glen_2D) +ENDIF() diff --git a/elmerice/Tests/Grid2DInterpolator/CMakeLists.txt b/elmerice/Tests/Grid2DInterpolator/CMakeLists.txt index bde4cb7955..92373fda5a 100644 --- a/elmerice/Tests/Grid2DInterpolator/CMakeLists.txt +++ b/elmerice/Tests/Grid2DInterpolator/CMakeLists.txt @@ -1,7 +1,9 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(teterousse1a.sif teterousse1a.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO teterousse1a.msh PROG DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + CONFIGURE_FILE(teterousse1a.sif teterousse1a.sif COPYONLY) + FILE(COPY ELMERSOLVER_STARTINFO teterousse1a.msh PROG DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(Grid2DInterpolator) -ADD_ELMERICE_LABEL(Grid2DInterpolator elmerice) + ADD_ELMERICE_TEST(Grid2DInterpolator) + ADD_ELMERICE_LABEL(Grid2DInterpolator elmerice) +ENDIF() diff --git a/elmerice/Tests/Grounded/CMakeLists.txt b/elmerice/Tests/Grounded/CMakeLists.txt index 6a38e7fe4d..63a5eb8096 100644 --- a/elmerice/Tests/Grounded/CMakeLists.txt +++ b/elmerice/Tests/Grounded/CMakeLists.txt @@ -1,12 +1,14 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(grounded.sif grounded.sif COPYONLY) + CONFIGURE_FILE(grounded.sif grounded.sif COPYONLY) -SET(FILE_LISTS ./PROG/bedrock.f90 - ./PROG/fbed.f90) -ADD_ELMERICETEST_MODULE(Grounded bedrock "${FILE_LISTS}") + SET(FILE_LISTS ./PROG/bedrock.f90 + ./PROG/fbed.f90) + ADD_ELMERICETEST_MODULE(Grounded bedrock "${FILE_LISTS}") -FILE(COPY ELMERSOLVER_STARTINFO Cube.grd PROG DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO Cube.grd PROG DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(Grounded) -ADD_ELMERICE_LABEL(Grounded elmerice-fast) + ADD_ELMERICE_TEST(Grounded) + ADD_ELMERICE_LABEL(Grounded elmerice-fast) +ENDIF() diff --git a/elmerice/Tests/Hydro_Coupled/CMakeLists.txt b/elmerice/Tests/Hydro_Coupled/CMakeLists.txt index a3f5ea3615..4172a094a2 100644 --- a/elmerice/Tests/Hydro_Coupled/CMakeLists.txt +++ b/elmerice/Tests/Hydro_Coupled/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(Coupled.sif Coupled.sif COPYONLY) + CONFIGURE_FILE(Coupled.sif Coupled.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO cube.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO cube.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(Hydro_Coupled) -ADD_ELMERICE_LABEL(Hydro_Coupled obsolete) + ADD_ELMERICE_TEST(Hydro_Coupled) + ADD_ELMERICE_LABEL(Hydro_Coupled obsolete) +ENDIF() diff --git a/elmerice/Tests/Hydro_SedOnly/CMakeLists.txt b/elmerice/Tests/Hydro_SedOnly/CMakeLists.txt index da31454772..54dca3a3cd 100644 --- a/elmerice/Tests/Hydro_SedOnly/CMakeLists.txt +++ b/elmerice/Tests/Hydro_SedOnly/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(SedOnly.sif SedOnly.sif COPYONLY) + CONFIGURE_FILE(SedOnly.sif SedOnly.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO cube.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO cube.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(Hydro_SedOnly) -ADD_ELMERICE_LABEL(Hydro_SedOnly obsolete) + ADD_ELMERICE_TEST(Hydro_SedOnly) + ADD_ELMERICE_LABEL(Hydro_SedOnly obsolete) +ENDIF() diff --git a/elmerice/Tests/IntegrateVertically/CMakeLists.txt b/elmerice/Tests/IntegrateVertically/CMakeLists.txt index 55e76ce592..6730be56b8 100644 --- a/elmerice/Tests/IntegrateVertically/CMakeLists.txt +++ b/elmerice/Tests/IntegrateVertically/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(integratevertically.sif integratevertically.sif COPYONLY) + CONFIGURE_FILE(integratevertically.sif integratevertically.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO mesh.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO mesh.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(IntegrateVertically) -ADD_ELMERICE_LABEL(IntegrateVertically elmerice-fast) + ADD_ELMERICE_TEST(IntegrateVertically) + ADD_ELMERICE_LABEL(IntegrateVertically elmerice-fast) +ENDIF() diff --git a/elmerice/Tests/IntegratedVelocity/CMakeLists.txt b/elmerice/Tests/IntegratedVelocity/CMakeLists.txt index ae83f69906..9371bfd004 100644 --- a/elmerice/Tests/IntegratedVelocity/CMakeLists.txt +++ b/elmerice/Tests/IntegratedVelocity/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(test.sif test.sif COPYONLY) + CONFIGURE_FILE(test.sif test.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(IntegratedVelocity) -ADD_ELMERICE_LABEL(IntegratedVelocity elmerice-fast) + ADD_ELMERICE_TEST(IntegratedVelocity) + ADD_ELMERICE_LABEL(IntegratedVelocity elmerice-fast) +ENDIF() diff --git a/elmerice/Tests/LateralFriction/CMakeLists.txt b/elmerice/Tests/LateralFriction/CMakeLists.txt index b0258abb80..b88a11dfd5 100644 --- a/elmerice/Tests/LateralFriction/CMakeLists.txt +++ b/elmerice/Tests/LateralFriction/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(lateralFriction.sif lateralFriction.sif COPYONLY) + CONFIGURE_FILE(lateralFriction.sif lateralFriction.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(LateralFriction) -ADD_ELMERICE_LABEL(LateralFriction elmerice-fast) + ADD_ELMERICE_TEST(LateralFriction) + ADD_ELMERICE_LABEL(LateralFriction elmerice-fast) +ENDIF() diff --git a/elmerice/Tests/MISMIP_FS-SSA/CMakeLists.txt b/elmerice/Tests/MISMIP_FS-SSA/CMakeLists.txt index 04ab2fd7c4..db681a721e 100644 --- a/elmerice/Tests/MISMIP_FS-SSA/CMakeLists.txt +++ b/elmerice/Tests/MISMIP_FS-SSA/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(coupled.sif coupled.sif COPYONLY) + CONFIGURE_FILE(coupled.sif coupled.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO mesh2d uppersurface.dat DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO mesh2d uppersurface.dat DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(MISMIP_FS-SSA) -ADD_ELMERICE_LABEL(MISMIP_FS-SSA elmerice-long) -ADD_ELMERICE_LABEL(MISMIP_FS-SSA slow) + ADD_ELMERICE_TEST(MISMIP_FS-SSA) + ADD_ELMERICE_LABEL(MISMIP_FS-SSA elmerice-long) + ADD_ELMERICE_LABEL(MISMIP_FS-SSA slow) +ENDIF() diff --git a/elmerice/Tests/Permafrost_Biot/CMakeLists.txt b/elmerice/Tests/Permafrost_Biot/CMakeLists.txt index 1840a6c628..422eba6529 100644 --- a/elmerice/Tests/Permafrost_Biot/CMakeLists.txt +++ b/elmerice/Tests/Permafrost_Biot/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(biot.sif biot.sif COPYONLY) + CONFIGURE_FILE(biot.sif biot.sif COPYONLY) -FILE(COPY biot.dat ELMERSOLVER_STARTINFO biot DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY biot.dat ELMERSOLVER_STARTINFO biot DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(Permafrost_Biot) -ADD_ELMERICE_LABEL(Permafrost_Biot permafrost) + ADD_ELMERICE_TEST(Permafrost_Biot) + ADD_ELMERICE_LABEL(Permafrost_Biot permafrost) +ENDIF() diff --git a/elmerice/Tests/SIA/CMakeLists.txt b/elmerice/Tests/SIA/CMakeLists.txt index df41ffa81a..168269b2ec 100644 --- a/elmerice/Tests/SIA/CMakeLists.txt +++ b/elmerice/Tests/SIA/CMakeLists.txt @@ -1,7 +1,9 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(sia.sif sia.sif COPYONLY) + CONFIGURE_FILE(sia.sif sia.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO mesh_A.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO mesh_A.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(SIA) + ADD_ELMERICE_TEST(SIA) +ENDIF() diff --git a/elmerice/Tests/SSA_Coulomb/CMakeLists.txt b/elmerice/Tests/SSA_Coulomb/CMakeLists.txt index c7bb49a098..e6d33a89ce 100644 --- a/elmerice/Tests/SSA_Coulomb/CMakeLists.txt +++ b/elmerice/Tests/SSA_Coulomb/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(ismip_SSA_2D_Coulomb.sif ismip_SSA_2D_Coulomb.sif COPYONLY) + CONFIGURE_FILE(ismip_SSA_2D_Coulomb.sif ismip_SSA_2D_Coulomb.sif COPYONLY) -FILE(COPY rectangle.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY rectangle.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(SSA_Coulomb) -ADD_ELMERICE_LABEL(SSA_Coulomb elmerice-fast) + ADD_ELMERICE_TEST(SSA_Coulomb) + ADD_ELMERICE_LABEL(SSA_Coulomb elmerice-fast) +ENDIF() diff --git a/elmerice/Tests/SSA_IceSheet/CMakeLists.txt b/elmerice/Tests/SSA_IceSheet/CMakeLists.txt index 9299af6d6b..f135746f5f 100644 --- a/elmerice/Tests/SSA_IceSheet/CMakeLists.txt +++ b/elmerice/Tests/SSA_IceSheet/CMakeLists.txt @@ -1,7 +1,9 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(ssa_IceSheet.sif ssa_IceSheet.sif COPYONLY) + CONFIGURE_FILE(ssa_IceSheet.sif ssa_IceSheet.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(SSA_IceSheet) + ADD_ELMERICE_TEST(SSA_IceSheet) +ENDIF() diff --git a/elmerice/Tests/SSA_Weertman/CMakeLists.txt b/elmerice/Tests/SSA_Weertman/CMakeLists.txt index 73334c895f..4abcc677fd 100644 --- a/elmerice/Tests/SSA_Weertman/CMakeLists.txt +++ b/elmerice/Tests/SSA_Weertman/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(ismip_SSA_2D_Weertman.sif ismip_SSA_2D_Weertman.sif COPYONLY) + CONFIGURE_FILE(ismip_SSA_2D_Weertman.sif ismip_SSA_2D_Weertman.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(SSA_Weertman) -ADD_ELMERICE_LABEL(SSA_Weertman elmerice-fast) + ADD_ELMERICE_TEST(SSA_Weertman) + ADD_ELMERICE_LABEL(SSA_Weertman elmerice-fast) +ENDIF() diff --git a/elmerice/Tests/ShapeFactor/CMakeLists.txt b/elmerice/Tests/ShapeFactor/CMakeLists.txt index 54ffb1d978..e2e7bda12f 100644 --- a/elmerice/Tests/ShapeFactor/CMakeLists.txt +++ b/elmerice/Tests/ShapeFactor/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(shapefactor2d.sif shapefactor2d.sif COPYONLY) + CONFIGURE_FILE(shapefactor2d.sif shapefactor2d.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(ShapeFactor) -ADD_ELMERICE_LABEL(ShapeFactor elmerice-fast) + ADD_ELMERICE_TEST(ShapeFactor) + ADD_ELMERICE_LABEL(ShapeFactor elmerice-fast) +ENDIF() diff --git a/elmerice/Tests/StrainRate/CMakeLists.txt b/elmerice/Tests/StrainRate/CMakeLists.txt index c85b30e6d6..e7d866d084 100644 --- a/elmerice/Tests/StrainRate/CMakeLists.txt +++ b/elmerice/Tests/StrainRate/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(strainrate.sif strainrate.sif COPYONLY) + CONFIGURE_FILE(strainrate.sif strainrate.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO README.txt mesh.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO README.txt mesh.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(StrainRate) -ADD_ELMERICE_LABEL(StrainRate elmerice-fast) + ADD_ELMERICE_TEST(StrainRate) + ADD_ELMERICE_LABEL(StrainRate elmerice-fast) +ENDIF() diff --git a/elmerice/Tests/Teterousse3a/CMakeLists.txt b/elmerice/Tests/Teterousse3a/CMakeLists.txt index 9b3737007e..fccb20b4b8 100644 --- a/elmerice/Tests/Teterousse3a/CMakeLists.txt +++ b/elmerice/Tests/Teterousse3a/CMakeLists.txt @@ -1,10 +1,12 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(teterousse3a.sif teterousse3a.sif COPYONLY) + CONFIGURE_FILE(teterousse3a.sif teterousse3a.sif COPYONLY) -ADD_ELMERICETEST_MODULE(Teterousse3a USF_TR ./PROG/USF_TR.f90) + ADD_ELMERICETEST_MODULE(Teterousse3a USF_TR ./PROG/USF_TR.f90) -FILE(COPY ELMERSOLVER_STARTINFO teterousse.msh PROG DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO teterousse.msh PROG DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(Teterousse3a) -ADD_ELMERICE_LABEL(Teterousse3a elmerice-fast) + ADD_ELMERICE_TEST(Teterousse3a) + ADD_ELMERICE_LABEL(Teterousse3a elmerice-fast) +ENDIF() diff --git a/elmerice/Tests/Teterousse3a_b/CMakeLists.txt b/elmerice/Tests/Teterousse3a_b/CMakeLists.txt index 183ef9a3da..0da106e1e1 100644 --- a/elmerice/Tests/Teterousse3a_b/CMakeLists.txt +++ b/elmerice/Tests/Teterousse3a_b/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(test.sif test.sif COPYONLY) + CONFIGURE_FILE(test.sif test.sif COPYONLY) -ADD_ELMERICETEST_MODULE(Teterousse3a_b USF_TR ./PROG/USF_TR.f90) -FILE(COPY ELMERSOLVER_STARTINFO PROG teterousse.msh DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + ADD_ELMERICETEST_MODULE(Teterousse3a_b USF_TR ./PROG/USF_TR.f90) + FILE(COPY ELMERSOLVER_STARTINFO PROG teterousse.msh DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(Teterousse3a_b) -ADD_ELMERICE_LABEL(Teterousse3a_b elmerice-fast) + ADD_ELMERICE_TEST(Teterousse3a_b) + ADD_ELMERICE_LABEL(Teterousse3a_b elmerice-fast) +ENDIF() diff --git a/elmerice/Tests/Teterousse_DeformHeat/CMakeLists.txt b/elmerice/Tests/Teterousse_DeformHeat/CMakeLists.txt index f0e1e58b65..8ba2cf1611 100644 --- a/elmerice/Tests/Teterousse_DeformHeat/CMakeLists.txt +++ b/elmerice/Tests/Teterousse_DeformHeat/CMakeLists.txt @@ -1,10 +1,12 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(test.sif test.sif COPYONLY) + CONFIGURE_FILE(test.sif test.sif COPYONLY) -ADD_ELMERICETEST_MODULE(Teterousse_DeformHeat USF_TR ./PROG/USF_TR.f90) + ADD_ELMERICETEST_MODULE(Teterousse_DeformHeat USF_TR ./PROG/USF_TR.f90) -FILE(COPY ELMERSOLVER_STARTINFO teterousse.msh PROG DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO teterousse.msh PROG DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(Teterousse_DeformHeat) -ADD_ELMERICE_LABEL(Teterousse_DeformHeat elmerice-fast) + ADD_ELMERICE_TEST(Teterousse_DeformHeat) + ADD_ELMERICE_LABEL(Teterousse_DeformHeat elmerice-fast) +ENDIF() diff --git a/elmerice/Tests/ThicknessSolver/CMakeLists.txt b/elmerice/Tests/ThicknessSolver/CMakeLists.txt index 33f6eedc10..d3361ce1f6 100644 --- a/elmerice/Tests/ThicknessSolver/CMakeLists.txt +++ b/elmerice/Tests/ThicknessSolver/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) -CONFIGURE_FILE(NS_3D.sif NS_3D.sif COPYONLY) + CONFIGURE_FILE(NS_3D.sif NS_3D.sif COPYONLY) -FILE(COPY ELMERSOLVER_STARTINFO cube.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + FILE(COPY ELMERSOLVER_STARTINFO cube.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMERICE_TEST(ThicknessSolver) -ADD_ELMERICE_LABEL(ThicknessSolver elmerice-long) -ADD_ELMERICE_LABEL(ThicknessSolver slow) + ADD_ELMERICE_TEST(ThicknessSolver) + ADD_ELMERICE_LABEL(ThicknessSolver elmerice-long) + ADD_ELMERICE_LABEL(ThicknessSolver slow) +ENDIF() diff --git a/fem/tests/ArteryOutlet/CMakeLists.txt b/fem/tests/ArteryOutlet/CMakeLists.txt index 2c39aa5b86..4179decb67 100644 --- a/fem/tests/ArteryOutlet/CMakeLists.txt +++ b/fem/tests/ArteryOutlet/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) -ADD_ELMERTEST_MODULE(ArteryOutlet Motion Motion.f90) + CONFIGURE_FILE( case.sif case.sif COPYONLY) + ADD_ELMERTEST_MODULE(ArteryOutlet Motion Motion.f90) -file(COPY ELMERSOLVER_STARTINFO Motion.f90 contra.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO Motion.f90 contra.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(ArteryOutlet LABELS elasticsolve transient fsi) + ADD_ELMER_TEST(ArteryOutlet LABELS elasticsolve transient fsi) +ENDIF() diff --git a/fem/tests/BatteryDischarge/CMakeLists.txt b/fem/tests/BatteryDischarge/CMakeLists.txt index 0f6fe074de..7f3087a44a 100644 --- a/fem/tests/BatteryDischarge/CMakeLists.txt +++ b/fem/tests/BatteryDischarge/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY battery1d.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY battery1d.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(BatteryDischarge NPROCS 1 LABELS battery) + ADD_ELMER_TEST(BatteryDischarge NPROCS 1 LABELS battery) +ENDIF() diff --git a/fem/tests/Beam_3D_Cantilever_Eigen/CMakeLists.txt b/fem/tests/Beam_3D_Cantilever_Eigen/CMakeLists.txt index a7e2ac817d..f369b3ee00 100644 --- a/fem/tests/Beam_3D_Cantilever_Eigen/CMakeLists.txt +++ b/fem/tests/Beam_3D_Cantilever_Eigen/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO beam1d DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO beam1d DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(Beam_3D_Cantilever_Eigen LABELS beam eigen) + ADD_ELMER_TEST(Beam_3D_Cantilever_Eigen LABELS beam eigen) +ENDIF() diff --git a/fem/tests/BlockDomainsFourHeaters/CMakeLists.txt b/fem/tests/BlockDomainsFourHeaters/CMakeLists.txt index daba6c0f56..5f72df4e6c 100644 --- a/fem/tests/BlockDomainsFourHeaters/CMakeLists.txt +++ b/fem/tests/BlockDomainsFourHeaters/CMakeLists.txt @@ -1,7 +1,9 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO spots.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + CONFIGURE_FILE(case.sif case.sif COPYONLY) + file(COPY ELMERSOLVER_STARTINFO spots.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(BlockDomainsFourHeaters LABEL block) + ADD_ELMER_TEST(BlockDomainsFourHeaters LABEL block) +ENDIF() diff --git a/fem/tests/BlockRotatingBCPoisson3D/CMakeLists.txt b/fem/tests/BlockRotatingBCPoisson3D/CMakeLists.txt index feff32fc42..69fd89ad9b 100644 --- a/fem/tests/BlockRotatingBCPoisson3D/CMakeLists.txt +++ b/fem/tests/BlockRotatingBCPoisson3D/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO mortar.msh extrude.eg DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO mortar.msh extrude.eg DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(BlockRotatingBCPoisson3D LABELS block mortar namespace) + ADD_ELMER_TEST(BlockRotatingBCPoisson3D LABELS block mortar namespace) +ENDIF() diff --git a/fem/tests/CurvedBndryPFEM/CMakeLists.txt b/fem/tests/CurvedBndryPFEM/CMakeLists.txt index 0292a09f80..2b59fd2c8e 100644 --- a/fem/tests/CurvedBndryPFEM/CMakeLists.txt +++ b/fem/tests/CurvedBndryPFEM/CMakeLists.txt @@ -1,10 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( ptest.sif ptest.sif COPYONLY) -ADD_ELMERTEST_MODULE(CurvedBndryPFEM Poisson Poisson.f90) + CONFIGURE_FILE( ptest.sif ptest.sif COPYONLY) + ADD_ELMERTEST_MODULE(CurvedBndryPFEM Poisson Poisson.f90) -file(COPY Poisson.f90 square.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY Poisson.f90 square.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(CurvedBndryPFEM) -ADD_ELMER_LABEL(CurvedBndryPFEM quick) + ADD_ELMER_TEST(CurvedBndryPFEM LABELS quick) +ENDIF() diff --git a/fem/tests/CurvedBndryPFEM2/CMakeLists.txt b/fem/tests/CurvedBndryPFEM2/CMakeLists.txt index 0ee1d2a102..7078f70ded 100644 --- a/fem/tests/CurvedBndryPFEM2/CMakeLists.txt +++ b/fem/tests/CurvedBndryPFEM2/CMakeLists.txt @@ -1,10 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( ptest.sif ptest.sif COPYONLY) -ADD_ELMERTEST_MODULE(CurvedBndryPFEM2 Poisson Poisson.f90) + CONFIGURE_FILE( ptest.sif ptest.sif COPYONLY) + ADD_ELMERTEST_MODULE(CurvedBndryPFEM2 Poisson Poisson.f90) -file(COPY Poisson.f90 square.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY Poisson.f90 square.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(CurvedBndryPFEM2) -ADD_ELMER_LABEL(CurvedBndryPFEM2 quick) + ADD_ELMER_TEST(CurvedBndryPFEM2 LABELS quick) +ENDIF() diff --git a/fem/tests/CylComAxi/CMakeLists.txt b/fem/tests/CylComAxi/CMakeLists.txt index 5adee1bbdd..3591805bd1 100644 --- a/fem/tests/CylComAxi/CMakeLists.txt +++ b/fem/tests/CylComAxi/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO coarse DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO coarse DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(CylComAxi) -ADD_ELMER_LABEL(CylComAxi aster) + ADD_ELMER_TEST(CylComAxi LABELS aster) +ENDIF() diff --git a/fem/tests/DNS_WaveSimulation/CMakeLists.txt b/fem/tests/DNS_WaveSimulation/CMakeLists.txt index 38a28a24be..3bc1c1f8c7 100644 --- a/fem/tests/DNS_WaveSimulation/CMakeLists.txt +++ b/fem/tests/DNS_WaveSimulation/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( dns.sif dns.sif COPYONLY) + CONFIGURE_FILE( dns.sif dns.sif COPYONLY) -file(COPY tube.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY tube.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(DNS_WaveSimulation LABELS transient) + ADD_ELMER_TEST(DNS_WaveSimulation LABELS transient) +ENDIF() diff --git a/fem/tests/DirichletNeumann/CMakeLists.txt b/fem/tests/DirichletNeumann/CMakeLists.txt index e0127d66ab..651adf2427 100644 --- a/fem/tests/DirichletNeumann/CMakeLists.txt +++ b/fem/tests/DirichletNeumann/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO internal_slope.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO internal_slope.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(DirichletNeumann) -ADD_ELMER_LABEL(DirichletNeumann quick) + ADD_ELMER_TEST(DirichletNeumann LABELS quick) +ENDIF() diff --git a/fem/tests/DirichletNeumannSlave/CMakeLists.txt b/fem/tests/DirichletNeumannSlave/CMakeLists.txt index 7120219e39..17a16739f1 100644 --- a/fem/tests/DirichletNeumannSlave/CMakeLists.txt +++ b/fem/tests/DirichletNeumannSlave/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO internal_slope.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO internal_slope.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(DirichletNeumannSlave) -ADD_ELMER_LABEL(DirichletNeumannSlave quick) + ADD_ELMER_TEST(DirichletNeumannSlave LABELS quick) +ENDIF() \ No newline at end of file diff --git a/fem/tests/EMWaveBoxHexasEigen/CMakeLists.txt b/fem/tests/EMWaveBoxHexasEigen/CMakeLists.txt index 755575ce0d..a08ae66ed2 100644 --- a/fem/tests/EMWaveBoxHexasEigen/CMakeLists.txt +++ b/fem/tests/EMWaveBoxHexasEigen/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(emwave.sif emwave.sif COPYONLY) + CONFIGURE_FILE(emwave.sif emwave.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO shoebox_hexas.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO shoebox_hexas.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(EMWaveBoxHexasEigen LABELS whitney eigen em-wave) + ADD_ELMER_TEST(EMWaveBoxHexasEigen LABELS whitney eigen em-wave) +ENDIF() diff --git a/fem/tests/ElastElstat1DBeam/CMakeLists.txt b/fem/tests/ElastElstat1DBeam/CMakeLists.txt index e4c9efeca7..1d147ce9f6 100644 --- a/fem/tests/ElastElstat1DBeam/CMakeLists.txt +++ b/fem/tests/ElastElstat1DBeam/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO beam_no_air.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO beam_no_air.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(ElastElstat1DBeam) -ADD_ELMER_LABEL(ElastElstat1DBeam quick) + ADD_ELMER_TEST(ElastElstat1DBeam LABELS quick) +ENDIF() diff --git a/fem/tests/ElastElstatBeam/CMakeLists.txt b/fem/tests/ElastElstatBeam/CMakeLists.txt index ce950660be..e2cd3380b0 100644 --- a/fem/tests/ElastElstatBeam/CMakeLists.txt +++ b/fem/tests/ElastElstatBeam/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO beam_in_air.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO beam_in_air.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(ElastElstatBeam) -ADD_ELMER_LABEL(ElastElstatBeam quick) + ADD_ELMER_TEST(ElastElstatBeam LABELS quick) +ENDIF() diff --git a/fem/tests/ElastElstatBeamNodal/CMakeLists.txt b/fem/tests/ElastElstatBeamNodal/CMakeLists.txt index dda4130391..d2a1e9e027 100644 --- a/fem/tests/ElastElstatBeamNodal/CMakeLists.txt +++ b/fem/tests/ElastElstatBeamNodal/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO beam_in_air.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO beam_in_air.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(ElastElstatBeamNodal) + ADD_ELMER_TEST(ElastElstatBeamNodal) +ENDIF() diff --git a/fem/tests/ElastPelem2dPmultg/CMakeLists.txt b/fem/tests/ElastPelem2dPmultg/CMakeLists.txt index 35b8597be8..ea673ec616 100644 --- a/fem/tests/ElastPelem2dPmultg/CMakeLists.txt +++ b/fem/tests/ElastPelem2dPmultg/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY angle.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY angle.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(ElastPelem2dPmultg LABELS p-fem) + ADD_ELMER_TEST(ElastPelem2dPmultg LABELS p-fem) +ENDIF() diff --git a/fem/tests/ElastPelem2dQuad/CMakeLists.txt b/fem/tests/ElastPelem2dQuad/CMakeLists.txt index e98d923749..3e01380e1a 100644 --- a/fem/tests/ElastPelem2dQuad/CMakeLists.txt +++ b/fem/tests/ElastPelem2dQuad/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(ElastPelem2dQuad LABELS quick p-fem) + ADD_ELMER_TEST(ElastPelem2dQuad LABELS quick p-fem) +ENDIF() diff --git a/fem/tests/ElastPelem2dTri/CMakeLists.txt b/fem/tests/ElastPelem2dTri/CMakeLists.txt index 914689d566..a886fcb260 100644 --- a/fem/tests/ElastPelem2dTri/CMakeLists.txt +++ b/fem/tests/ElastPelem2dTri/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(ElastPelem2dTri LABELS quick p-fem) + ADD_ELMER_TEST(ElastPelem2dTri LABELS quick p-fem) +ENDIF() diff --git a/fem/tests/ElasticBeam2DDampingBeta/CMakeLists.txt b/fem/tests/ElasticBeam2DDampingBeta/CMakeLists.txt index e94fed0d3d..24111bed2e 100644 --- a/fem/tests/ElasticBeam2DDampingBeta/CMakeLists.txt +++ b/fem/tests/ElasticBeam2DDampingBeta/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY beam2d.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY beam2d.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(ElasticBeam2DDampingBeta LABELS slow) + ADD_ELMER_TEST(ElasticBeam2DDampingBeta LABELS slow) +ENDIF() diff --git a/fem/tests/ElasticBeam2DDampingBetaP2/CMakeLists.txt b/fem/tests/ElasticBeam2DDampingBetaP2/CMakeLists.txt index 762c80432d..a0593953b7 100644 --- a/fem/tests/ElasticBeam2DDampingBetaP2/CMakeLists.txt +++ b/fem/tests/ElasticBeam2DDampingBetaP2/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY beam2d.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY beam2d.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(ElasticBeam2DDampingBetaP2 LABELS slow) + ADD_ELMER_TEST(ElasticBeam2DDampingBetaP2 LABELS slow) +ENDIF() diff --git a/fem/tests/ElasticBeamRestart/CMakeLists.txt b/fem/tests/ElasticBeamRestart/CMakeLists.txt index d183c6b872..a0736916a1 100644 --- a/fem/tests/ElasticBeamRestart/CMakeLists.txt +++ b/fem/tests/ElasticBeamRestart/CMakeLists.txt @@ -1,7 +1,9 @@ -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( restart.sif restart.sif COPYONLY) + CONFIGURE_FILE( restart.sif restart.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO beam2d.grd ref.sif DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO beam2d.grd ref.sif DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(ElasticBeamRestart LABELS transient restart) + ADD_ELMER_TEST(ElasticBeamRestart LABELS transient restart) +ENDIF() diff --git a/fem/tests/Electrokinetics/CMakeLists.txt b/fem/tests/Electrokinetics/CMakeLists.txt index 938458c38b..5f9120e086 100644 --- a/fem/tests/Electrokinetics/CMakeLists.txt +++ b/fem/tests/Electrokinetics/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( inject.sif inject.sif COPYONLY) + CONFIGURE_FILE( inject.sif inject.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO Tcross.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO Tcross.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(Electrokinetics LABELS transient) + ADD_ELMER_TEST(Electrokinetics LABELS transient) +ENDIF() diff --git a/fem/tests/ExtrudedMesh/CMakeLists.txt b/fem/tests/ExtrudedMesh/CMakeLists.txt index 3e55909691..528cbb7501 100644 --- a/fem/tests/ExtrudedMesh/CMakeLists.txt +++ b/fem/tests/ExtrudedMesh/CMakeLists.txt @@ -1,10 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( ptest.sif ptest.sif COPYONLY) -ADD_ELMERTEST_MODULE(ExtrudedMesh Poisson Poisson.f90) + CONFIGURE_FILE( ptest.sif ptest.sif COPYONLY) + ADD_ELMERTEST_MODULE(ExtrudedMesh Poisson Poisson.f90) -file(COPY Poisson.f90 square.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY Poisson.f90 square.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(ExtrudedMesh) -ADD_ELMER_LABEL(ExtrudedMesh quick) + ADD_ELMER_TEST(ExtrudedMesh LABELS quick) +ENDIF() diff --git a/fem/tests/ExtrudedMeshBaseline1/CMakeLists.txt b/fem/tests/ExtrudedMeshBaseline1/CMakeLists.txt index 7fce1bb9a4..25d31d5d02 100644 --- a/fem/tests/ExtrudedMeshBaseline1/CMakeLists.txt +++ b/fem/tests/ExtrudedMeshBaseline1/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case_baseline.sif case_baseline.sif COPYONLY) -ADD_ELMERTEST_MODULE(ExtrudedMeshBaseline1 Poisson Poisson.f90) + CONFIGURE_FILE( case_baseline.sif case_baseline.sif COPYONLY) + ADD_ELMERTEST_MODULE(ExtrudedMeshBaseline1 Poisson Poisson.f90) -file(COPY Poisson.f90 square.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY Poisson.f90 square.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(ExtrudedMeshBaseline1 LABELS quick useextrude) + ADD_ELMER_TEST(ExtrudedMeshBaseline1 LABELS quick useextrude) +ENDIF() diff --git a/fem/tests/FilmFlowLine/CMakeLists.txt b/fem/tests/FilmFlowLine/CMakeLists.txt index 23d1b4b413..b9c27c3f38 100644 --- a/fem/tests/FilmFlowLine/CMakeLists.txt +++ b/fem/tests/FilmFlowLine/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(film.sif film.sif COPYONLY) + CONFIGURE_FILE(film.sif film.sif COPYONLY) -file(COPY params.sif line.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY params.sif line.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(FilmFlowLine LABELS quick) + ADD_ELMER_TEST(FilmFlowLine LABELS quick) +ENDIF() diff --git a/fem/tests/FilmFlowPipe/CMakeLists.txt b/fem/tests/FilmFlowPipe/CMakeLists.txt index 4dd68e2234..8984c3ab05 100644 --- a/fem/tests/FilmFlowPipe/CMakeLists.txt +++ b/fem/tests/FilmFlowPipe/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(film.sif film.sif COPYONLY) + CONFIGURE_FILE(film.sif film.sif COPYONLY) -file(COPY params.sif line.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY params.sif line.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(FilmFlowPipe LABELS quick) + ADD_ELMER_TEST(FilmFlowPipe LABELS quick) +ENDIF() diff --git a/fem/tests/FilmFlowPlane/CMakeLists.txt b/fem/tests/FilmFlowPlane/CMakeLists.txt index d42f240649..920702c285 100644 --- a/fem/tests/FilmFlowPlane/CMakeLists.txt +++ b/fem/tests/FilmFlowPlane/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(film.sif film.sif COPYONLY) + CONFIGURE_FILE(film.sif film.sif COPYONLY) -file(COPY params.sif rect.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY params.sif rect.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(FilmFlowPlane LABELS quick) + ADD_ELMER_TEST(FilmFlowPlane LABELS quick) +ENDIF() diff --git a/fem/tests/FilmFlowPlane2/CMakeLists.txt b/fem/tests/FilmFlowPlane2/CMakeLists.txt index 10991e8257..4dcd448005 100644 --- a/fem/tests/FilmFlowPlane2/CMakeLists.txt +++ b/fem/tests/FilmFlowPlane2/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(film.sif film.sif COPYONLY) + CONFIGURE_FILE(film.sif film.sif COPYONLY) -file(COPY params.sif rect.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY params.sif rect.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(FilmFlowPlane2 LABELS quick) + ADD_ELMER_TEST(FilmFlowPlane2 LABELS quick) +ENDIF() diff --git a/fem/tests/FilmFlowPlane3/CMakeLists.txt b/fem/tests/FilmFlowPlane3/CMakeLists.txt index fad7976c6e..1832a0a320 100644 --- a/fem/tests/FilmFlowPlane3/CMakeLists.txt +++ b/fem/tests/FilmFlowPlane3/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(film.sif film.sif COPYONLY) + CONFIGURE_FILE(film.sif film.sif COPYONLY) -file(COPY params.sif rect.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY params.sif rect.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(FilmFlowPlane3 LABELS quick) + ADD_ELMER_TEST(FilmFlowPlane3 LABELS quick) +ENDIF() diff --git a/fem/tests/HeatEqExitCondition/CMakeLists.txt b/fem/tests/HeatEqExitCondition/CMakeLists.txt index 38e33acce1..b959a2c67d 100644 --- a/fem/tests/HeatEqExitCondition/CMakeLists.txt +++ b/fem/tests/HeatEqExitCondition/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO square.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO square.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(HeatEqExitCondition LABELS quick transient) + ADD_ELMER_TEST(HeatEqExitCondition LABELS quick transient) +ENDIF() diff --git a/fem/tests/HeatPlateSym/CMakeLists.txt b/fem/tests/HeatPlateSym/CMakeLists.txt index 5988517fc2..3b7dc65da1 100644 --- a/fem/tests/HeatPlateSym/CMakeLists.txt +++ b/fem/tests/HeatPlateSym/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO sym DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO sym DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(HeatPlateSym LABELS aster n-t) + ADD_ELMER_TEST(HeatPlateSym LABELS aster n-t) +ENDIF() diff --git a/fem/tests/HelmholtzPlaneWaves/CMakeLists.txt b/fem/tests/HelmholtzPlaneWaves/CMakeLists.txt index 26be4b88d8..6e26f4a9a8 100644 --- a/fem/tests/HelmholtzPlaneWaves/CMakeLists.txt +++ b/fem/tests/HelmholtzPlaneWaves/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY rect.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY rect.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(HelmholtzPlaneWaves LABELS helmholtz) -ADD_ELMER_LABEL(HelmholtzPlaneWaves quick) + ADD_ELMER_TEST(HelmholtzPlaneWaves LABELS helmholtz quick) +ENDIF() diff --git a/fem/tests/HelmholtzPlaneWavesAxis/CMakeLists.txt b/fem/tests/HelmholtzPlaneWavesAxis/CMakeLists.txt index 77b0f4bfa9..901cce531e 100644 --- a/fem/tests/HelmholtzPlaneWavesAxis/CMakeLists.txt +++ b/fem/tests/HelmholtzPlaneWavesAxis/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY rect.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY rect.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(HelmholtzPlaneWavesAxis LABELS helmholtz) -ADD_ELMER_LABEL(HelmholtzPlaneWavesAxis quick) + ADD_ELMER_TEST(HelmholtzPlaneWavesAxis LABELS helmholtz quick) +ENDIF() diff --git a/fem/tests/HelmholtzPlaneWavesParam/CMakeLists.txt b/fem/tests/HelmholtzPlaneWavesParam/CMakeLists.txt index 5e0a7141b4..4e5f6a3cd8 100644 --- a/fem/tests/HelmholtzPlaneWavesParam/CMakeLists.txt +++ b/fem/tests/HelmholtzPlaneWavesParam/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY rect.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY rect.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(HelmholtzPlaneWavesParam LABELS helmholtz control) + ADD_ELMER_TEST(HelmholtzPlaneWavesParam LABELS helmholtz control) +ENDIF() diff --git a/fem/tests/HelmholtzPlaneWavesScan/CMakeLists.txt b/fem/tests/HelmholtzPlaneWavesScan/CMakeLists.txt index 99b001bd3b..2295c4b6aa 100644 --- a/fem/tests/HelmholtzPlaneWavesScan/CMakeLists.txt +++ b/fem/tests/HelmholtzPlaneWavesScan/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY rect.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY rect.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(HelmholtzPlaneWavesScan LABELS helmholtz) + ADD_ELMER_TEST(HelmholtzPlaneWavesScan LABELS helmholtz) +ENDIF() diff --git a/fem/tests/HelmholtzSolveImpMatrix/CMakeLists.txt b/fem/tests/HelmholtzSolveImpMatrix/CMakeLists.txt index ee7f92f58e..d8bdd6376e 100644 --- a/fem/tests/HelmholtzSolveImpMatrix/CMakeLists.txt +++ b/fem/tests/HelmholtzSolveImpMatrix/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY cross.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY cross.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(HelmholtzSolveImpMatrix LABELS helmholtz cmodes) + ADD_ELMER_TEST(HelmholtzSolveImpMatrix LABELS helmholtz cmodes) +ENDIF() diff --git a/fem/tests/HelmholtzStructure/CMakeLists.txt b/fem/tests/HelmholtzStructure/CMakeLists.txt index 7f517422a9..1f392dc59f 100644 --- a/fem/tests/HelmholtzStructure/CMakeLists.txt +++ b/fem/tests/HelmholtzStructure/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY angle_in_halfcircle ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY angle_in_halfcircle ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(HelmholtzStructure LABELS helmholtz) + ADD_ELMER_TEST(HelmholtzStructure LABELS helmholtz) +ENDIF() diff --git a/fem/tests/HelmholtzStructure2/CMakeLists.txt b/fem/tests/HelmholtzStructure2/CMakeLists.txt index 60939162ae..0e5b0130e6 100644 --- a/fem/tests/HelmholtzStructure2/CMakeLists.txt +++ b/fem/tests/HelmholtzStructure2/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY angle_in_halfcircle ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY angle_in_halfcircle ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(HelmholtzStructure2 LABELS helmholtz quick harmonic failing) + ADD_ELMER_TEST(HelmholtzStructure2 LABELS helmholtz quick harmonic failing) +ENDIF() diff --git a/fem/tests/HelmholtzStructure3/CMakeLists.txt b/fem/tests/HelmholtzStructure3/CMakeLists.txt index 72b8ef25cc..6f8bde635a 100644 --- a/fem/tests/HelmholtzStructure3/CMakeLists.txt +++ b/fem/tests/HelmholtzStructure3/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY angle_in_halfcircle ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY angle_in_halfcircle ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(HelmholtzStructure3 LABELS helmholtz harmonic) + ADD_ELMER_TEST(HelmholtzStructure3 LABELS helmholtz harmonic) +ENDIF() diff --git a/fem/tests/IncreaseOrderBrick/CMakeLists.txt b/fem/tests/IncreaseOrderBrick/CMakeLists.txt index 781eb3d613..a4c10acb26 100644 --- a/fem/tests/IncreaseOrderBrick/CMakeLists.txt +++ b/fem/tests/IncreaseOrderBrick/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(IncreaseOrderBrick LABELS quick) + ADD_ELMER_TEST(IncreaseOrderBrick LABELS quick) +ENDIF() diff --git a/fem/tests/IncreaseOrderPrism/CMakeLists.txt b/fem/tests/IncreaseOrderPrism/CMakeLists.txt index c08eb25fd4..4bab4a3b9b 100644 --- a/fem/tests/IncreaseOrderPrism/CMakeLists.txt +++ b/fem/tests/IncreaseOrderPrism/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(IncreaseOrderPrism LABELS quick) + ADD_ELMER_TEST(IncreaseOrderPrism LABELS quick) +ENDIF() diff --git a/fem/tests/IncreaseOrderQuad/CMakeLists.txt b/fem/tests/IncreaseOrderQuad/CMakeLists.txt index 76d4b09e93..c831e90dc6 100644 --- a/fem/tests/IncreaseOrderQuad/CMakeLists.txt +++ b/fem/tests/IncreaseOrderQuad/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(IncreaseOrderQuad LABELS quick) + ADD_ELMER_TEST(IncreaseOrderQuad LABELS quick) +ENDIF() diff --git a/fem/tests/IncreaseOrderTet/CMakeLists.txt b/fem/tests/IncreaseOrderTet/CMakeLists.txt index 6f3f745e8a..04ad6eb385 100644 --- a/fem/tests/IncreaseOrderTet/CMakeLists.txt +++ b/fem/tests/IncreaseOrderTet/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO angle.msh DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO angle.msh DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(IncreaseOrderTet LABELS quick) + ADD_ELMER_TEST(IncreaseOrderTet LABELS quick) +ENDIF() diff --git a/fem/tests/IncreaseOrderTri/CMakeLists.txt b/fem/tests/IncreaseOrderTri/CMakeLists.txt index 1dd4ba05e6..1176a6368b 100644 --- a/fem/tests/IncreaseOrderTri/CMakeLists.txt +++ b/fem/tests/IncreaseOrderTri/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(IncreaseOrderTri LABELS quick) + ADD_ELMER_TEST(IncreaseOrderTri LABELS quick) +ENDIF() diff --git a/fem/tests/InductionHeating/CMakeLists.txt b/fem/tests/InductionHeating/CMakeLists.txt index bb374f941b..ca7889fc20 100644 --- a/fem/tests/InductionHeating/CMakeLists.txt +++ b/fem/tests/InductionHeating/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( crucible.sif crucible.sif COPYONLY) + CONFIGURE_FILE( crucible.sif crucible.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO crucible.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO crucible.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(InductionHeating) -ADD_ELMER_LABEL(InductionHeating quick) + ADD_ELMER_TEST(InductionHeating LABELS quick) +ENDIF() diff --git a/fem/tests/InductionHeating2/CMakeLists.txt b/fem/tests/InductionHeating2/CMakeLists.txt index 8a98993c7a..95ebbe7131 100644 --- a/fem/tests/InductionHeating2/CMakeLists.txt +++ b/fem/tests/InductionHeating2/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( crucible.sif crucible.sif COPYONLY) + CONFIGURE_FILE( crucible.sif crucible.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO crucible.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO crucible.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(InductionHeating2) -ADD_ELMER_LABEL(InductionHeating2 quick) + ADD_ELMER_TEST(InductionHeating2 LABELS quick) +ENDIF() diff --git a/fem/tests/IntegralConstraintHartmann/CMakeLists.txt b/fem/tests/IntegralConstraintHartmann/CMakeLists.txt index f3078873f3..bf3df97552 100644 --- a/fem/tests/IntegralConstraintHartmann/CMakeLists.txt +++ b/fem/tests/IntegralConstraintHartmann/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO beam.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO beam.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(IntegralConstraintHartmann) + ADD_ELMER_TEST(IntegralConstraintHartmann) +ENDIF() diff --git a/fem/tests/IntegralConstraintPoisson/CMakeLists.txt b/fem/tests/IntegralConstraintPoisson/CMakeLists.txt index 4753d0007f..ca846d52c2 100644 --- a/fem/tests/IntegralConstraintPoisson/CMakeLists.txt +++ b/fem/tests/IntegralConstraintPoisson/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(IntegralConstraintPoisson LABELS quick) + ADD_ELMER_TEST(IntegralConstraintPoisson LABELS quick) +ENDIF() diff --git a/fem/tests/L2norm/CMakeLists.txt b/fem/tests/L2norm/CMakeLists.txt index fd2d476565..42a6bf8470 100644 --- a/fem/tests/L2norm/CMakeLists.txt +++ b/fem/tests/L2norm/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) -ADD_ELMERTEST_MODULE(L2norm Difference Difference.f90) + CONFIGURE_FILE( case.sif case.sif COPYONLY) + ADD_ELMERTEST_MODULE(L2norm Difference Difference.f90) -file(COPY msh2 ELMERSOLVER_STARTINFO msh1 Difference.f90 DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY msh2 ELMERSOLVER_STARTINFO msh1 Difference.f90 DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(L2norm) + ADD_ELMER_TEST(L2norm) +ENDIF() diff --git a/fem/tests/LevelsetFallingDrop/CMakeLists.txt b/fem/tests/LevelsetFallingDrop/CMakeLists.txt index 306ba30e71..8d9a1f3137 100644 --- a/fem/tests/LevelsetFallingDrop/CMakeLists.txt +++ b/fem/tests/LevelsetFallingDrop/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(drop.sif drop.sif COPYONLY) -ADD_ELMERTEST_MODULE(LevelsetFallingDrop DropStuff DropStuff.F90) + CONFIGURE_FILE(drop.sif drop.sif COPYONLY) + ADD_ELMERTEST_MODULE(LevelsetFallingDrop DropStuff DropStuff.F90) -file(COPY ELMERSOLVER_STARTINFO DropStuff.F90 square.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO DropStuff.F90 square.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(LevelsetFallingDrop) + ADD_ELMER_TEST(LevelsetFallingDrop) +ENDIF() diff --git a/fem/tests/LimitDisplacement/CMakeLists.txt b/fem/tests/LimitDisplacement/CMakeLists.txt index deb7c4093d..8f449d4d64 100644 --- a/fem/tests/LimitDisplacement/CMakeLists.txt +++ b/fem/tests/LimitDisplacement/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO beam.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO beam.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(LimitDisplacement LABELS limiter) + ADD_ELMER_TEST(LimitDisplacement LABELS limiter) +ENDIF() diff --git a/fem/tests/LimitDisplacement3/CMakeLists.txt b/fem/tests/LimitDisplacement3/CMakeLists.txt index a2edec80b3..79da771cea 100644 --- a/fem/tests/LimitDisplacement3/CMakeLists.txt +++ b/fem/tests/LimitDisplacement3/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO beam.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO beam.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(LimitDisplacement3 LABELS limiter) + ADD_ELMER_TEST(LimitDisplacement3 LABELS limiter) +ENDIF() diff --git a/fem/tests/LinControlCoordDisp/CMakeLists.txt b/fem/tests/LinControlCoordDisp/CMakeLists.txt index 001b9dcd8c..085a480165 100644 --- a/fem/tests/LinControlCoordDisp/CMakeLists.txt +++ b/fem/tests/LinControlCoordDisp/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY angle.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY angle.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(LinControlCoordDisp LABELS quick control) + ADD_ELMER_TEST(LinControlCoordDisp LABELS quick control) +ENDIF() diff --git a/fem/tests/LinControlLoadDisp/CMakeLists.txt b/fem/tests/LinControlLoadDisp/CMakeLists.txt index c073a5c8e0..0a940c07e5 100644 --- a/fem/tests/LinControlLoadDisp/CMakeLists.txt +++ b/fem/tests/LinControlLoadDisp/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY angle.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY angle.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(LinControlLoadDisp LABELS quick control) + ADD_ELMER_TEST(LinControlLoadDisp LABELS quick control) +ENDIF() diff --git a/fem/tests/LinearSolverNamespace/CMakeLists.txt b/fem/tests/LinearSolverNamespace/CMakeLists.txt index 7214b24a2c..3e551b0e6c 100644 --- a/fem/tests/LinearSolverNamespace/CMakeLists.txt +++ b/fem/tests/LinearSolverNamespace/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(LinearSystemNamespace LABELS quick namespace) + ADD_ELMER_TEST(LinearSystemNamespace LABELS quick namespace) +ENDIF() diff --git a/fem/tests/LinearSolverNamespace2/CMakeLists.txt b/fem/tests/LinearSolverNamespace2/CMakeLists.txt index c16a27d8b3..34fd650f84 100644 --- a/fem/tests/LinearSolverNamespace2/CMakeLists.txt +++ b/fem/tests/LinearSolverNamespace2/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(LinearSystemNamespace2 LABELS quick) + ADD_ELMER_TEST(LinearSystemNamespace2 LABELS quick) +ENDIF() diff --git a/fem/tests/MarchingODE4/CMakeLists.txt b/fem/tests/MarchingODE4/CMakeLists.txt index 160bd018d8..22ee022778 100644 --- a/fem/tests/MarchingODE4/CMakeLists.txt +++ b/fem/tests/MarchingODE4/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY rectangles.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY rectangles.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(MarchingODE4 LABELS quick) + ADD_ELMER_TEST(MarchingODE4 LABELS quick) +ENDIF() diff --git a/fem/tests/MeshSwap1/CMakeLists.txt b/fem/tests/MeshSwap1/CMakeLists.txt index c59f0e395b..c49ff9afa7 100644 --- a/fem/tests/MeshSwap1/CMakeLists.txt +++ b/fem/tests/MeshSwap1/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(MeshSwap1) + ADD_ELMER_TEST(MeshSwap1) +ENDIF() diff --git a/fem/tests/MonolithicSlave/CMakeLists.txt b/fem/tests/MonolithicSlave/CMakeLists.txt index 1a5a622f90..8969b2d456 100644 --- a/fem/tests/MonolithicSlave/CMakeLists.txt +++ b/fem/tests/MonolithicSlave/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO internal_slope.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO internal_slope.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(MonolithicSlave LABELS quick) + ADD_ELMER_TEST(MonolithicSlave LABELS quick) +ENDIF() diff --git a/fem/tests/MonolithicSlave2/CMakeLists.txt b/fem/tests/MonolithicSlave2/CMakeLists.txt index 264389b47e..89a66ff448 100644 --- a/fem/tests/MonolithicSlave2/CMakeLists.txt +++ b/fem/tests/MonolithicSlave2/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO internal_slope.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO internal_slope.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(MonolithicSlave2 LABELS quick) + ADD_ELMER_TEST(MonolithicSlave2 LABELS quick) +ENDIF() diff --git a/fem/tests/NormalTangentialBC/CMakeLists.txt b/fem/tests/NormalTangentialBC/CMakeLists.txt index fcf4ee4292..44aa8d4d74 100644 --- a/fem/tests/NormalTangentialBC/CMakeLists.txt +++ b/fem/tests/NormalTangentialBC/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( cavity.sif cavity.sif COPYONLY) + CONFIGURE_FILE( cavity.sif cavity.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO sinus0.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO sinus0.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(NormalTangentialBC) + ADD_ELMER_TEST(NormalTangentialBC) +ENDIF() diff --git a/fem/tests/ParticleAdvectorZalesak/CMakeLists.txt b/fem/tests/ParticleAdvectorZalesak/CMakeLists.txt index a564dd6680..27633b1b9c 100644 --- a/fem/tests/ParticleAdvectorZalesak/CMakeLists.txt +++ b/fem/tests/ParticleAdvectorZalesak/CMakeLists.txt @@ -1,10 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( zalesak.sif zalesak.sif COPYONLY) -ADD_ELMERTEST_MODULE(ParticleAdvectorZalesak Zalesak Zalesak.f90) + CONFIGURE_FILE( zalesak.sif zalesak.sif COPYONLY) + ADD_ELMERTEST_MODULE(ParticleAdvectorZalesak Zalesak Zalesak.f90) -file(COPY square.grd ELMERSOLVER_STARTINFO Zalesak.f90 DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY square.grd ELMERSOLVER_STARTINFO Zalesak.f90 DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(ParticleAdvectorZalesak) -ADD_ELMER_LABEL(ParticleAdvectorZalesak particle) + ADD_ELMER_TEST(ParticleAdvectorZalesak LABELS particle) +ENDIF() diff --git a/fem/tests/PeriodicTime/CMakeLists.txt b/fem/tests/PeriodicTime/CMakeLists.txt index 9d4866a7f8..3050bc3554 100644 --- a/fem/tests/PeriodicTime/CMakeLists.txt +++ b/fem/tests/PeriodicTime/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO square.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO square.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(PeriodicTime LABELS transient) + ADD_ELMER_TEST(PeriodicTime LABELS transient) +ENDIF() diff --git a/fem/tests/PhaseChange2/CMakeLists.txt b/fem/tests/PhaseChange2/CMakeLists.txt index 62e84f0580..a92184179d 100644 --- a/fem/tests/PhaseChange2/CMakeLists.txt +++ b/fem/tests/PhaseChange2/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( PhaseChangeSS.sif PhaseChangeSS.sif COPYONLY) + CONFIGURE_FILE( PhaseChangeSS.sif PhaseChangeSS.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO PhaseChange.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO PhaseChange.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(PhaseChange2) -ADD_ELMER_LABEL(PhaseChange2 quick) + ADD_ELMER_TEST(PhaseChange2 LABELS quick) +ENDIF() diff --git a/fem/tests/PhaseChange3/CMakeLists.txt b/fem/tests/PhaseChange3/CMakeLists.txt index 75d8f34e11..4bcafec7ae 100644 --- a/fem/tests/PhaseChange3/CMakeLists.txt +++ b/fem/tests/PhaseChange3/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( PhaseChangeTrans.sif PhaseChangeTrans.sif COPYONLY) + CONFIGURE_FILE( PhaseChangeTrans.sif PhaseChangeTrans.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO PhaseChange.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO PhaseChange.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(PhaseChange3) -ADD_ELMER_LABEL(PhaseChange3 quick) + ADD_ELMER_TEST(PhaseChange3 LABELS quick) +ENDIF() diff --git a/fem/tests/PhaseChange4/CMakeLists.txt b/fem/tests/PhaseChange4/CMakeLists.txt index 348acc80b7..b47a172055 100644 --- a/fem/tests/PhaseChange4/CMakeLists.txt +++ b/fem/tests/PhaseChange4/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( PhaseChangeTrans.sif PhaseChangeTrans.sif COPYONLY) + CONFIGURE_FILE( PhaseChangeTrans.sif PhaseChangeTrans.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO PhaseChange.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO PhaseChange.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(PhaseChange4) -ADD_ELMER_LABEL(PhaseChange4 quick) + ADD_ELMER_TEST(PhaseChange4 LABELS quick) +ENDIF() diff --git a/fem/tests/PoissonBoltzmann/CMakeLists.txt b/fem/tests/PoissonBoltzmann/CMakeLists.txt index 11b46e53a1..b397b50ca4 100644 --- a/fem/tests/PoissonBoltzmann/CMakeLists.txt +++ b/fem/tests/PoissonBoltzmann/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( pbe.sif pbe.sif COPYONLY) + CONFIGURE_FILE( pbe.sif pbe.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO corner.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO corner.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(PoissonBoltzmann) + ADD_ELMER_TEST(PoissonBoltzmann) +ENDIF() diff --git a/fem/tests/PoissonPFEM/CMakeLists.txt b/fem/tests/PoissonPFEM/CMakeLists.txt index 242a29810e..aaccc156fb 100644 --- a/fem/tests/PoissonPFEM/CMakeLists.txt +++ b/fem/tests/PoissonPFEM/CMakeLists.txt @@ -1,10 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( ptest.sif ptest.sif COPYONLY) -ADD_ELMERTEST_MODULE(PoissonPFEM Poisson Poisson.f90) + CONFIGURE_FILE( ptest.sif ptest.sif COPYONLY) + ADD_ELMERTEST_MODULE(PoissonPFEM Poisson Poisson.f90) -file(COPY Poisson.f90 square.grd ELMERSOLVER_STARTINFO square DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY Poisson.f90 square.grd ELMERSOLVER_STARTINFO square DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(PoissonPFEM) -ADD_ELMER_LABEL(PoissonPFEM quick) + ADD_ELMER_TEST(PoissonPFEM LABELS quick) +ENDIF() diff --git a/fem/tests/PredictorCorrector/CMakeLists.txt b/fem/tests/PredictorCorrector/CMakeLists.txt index 927fe3e654..692f7e7ac9 100644 --- a/fem/tests/PredictorCorrector/CMakeLists.txt +++ b/fem/tests/PredictorCorrector/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO rectangle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(PredictorCorrector LABELS quick useextrude transient) + ADD_ELMER_TEST(PredictorCorrector LABELS quick useextrude transient) +ENDIF() diff --git a/fem/tests/Q1Q0/CMakeLists.txt b/fem/tests/Q1Q0/CMakeLists.txt index 04bf3b9004..2962309670 100644 --- a/fem/tests/Q1Q0/CMakeLists.txt +++ b/fem/tests/Q1Q0/CMakeLists.txt @@ -1,10 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( Q1Q0.sif Q1Q0.sif COPYONLY) -ADD_ELMERTEST_MODULE(Q1Q0 Q1Q0 Q1Q0.f90) + CONFIGURE_FILE( Q1Q0.sif Q1Q0.sif COPYONLY) + ADD_ELMERTEST_MODULE(Q1Q0 Q1Q0 Q1Q0.f90) -file(COPY ELMERSOLVER_STARTINFO Step.grd Q1Q0.f90 DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO Step.grd Q1Q0.f90 DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(Q1Q0) -ADD_ELMER_LABEL(Q1Q0 quick) + ADD_ELMER_TEST(Q1Q0 LABELS quick) +ENDIF() diff --git a/fem/tests/RunControlStructured/CMakeLists.txt b/fem/tests/RunControlStructured/CMakeLists.txt index e89015681d..b7c7e13633 100644 --- a/fem/tests/RunControlStructured/CMakeLists.txt +++ b/fem/tests/RunControlStructured/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO cube.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO cube.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(RunControlStructured LABELS control useextrude) + ADD_ELMER_TEST(RunControlStructured LABELS control useextrude) +ENDIF() diff --git a/fem/tests/SD_CurvedBndryPFEM/CMakeLists.txt b/fem/tests/SD_CurvedBndryPFEM/CMakeLists.txt index f696448607..91d39c3234 100644 --- a/fem/tests/SD_CurvedBndryPFEM/CMakeLists.txt +++ b/fem/tests/SD_CurvedBndryPFEM/CMakeLists.txt @@ -1,10 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( ptest.sif ptest.sif COPYONLY) -ADD_ELMERTEST_MODULE(SD_CurvedBndryPFEM Poisson Poisson.f90) + CONFIGURE_FILE( ptest.sif ptest.sif COPYONLY) + ADD_ELMERTEST_MODULE(SD_CurvedBndryPFEM Poisson Poisson.f90) -file(COPY Poisson.f90 square.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY Poisson.f90 square.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(SD_CurvedBndryPFEM) -ADD_ELMER_LABEL(SD_CurvedBndryPFEM quick serendipity) + ADD_ELMER_TEST(SD_CurvedBndryPFEM LABELS quick serendipity) +ENDIF() diff --git a/fem/tests/SD_CurvedBndryPFEM2/CMakeLists.txt b/fem/tests/SD_CurvedBndryPFEM2/CMakeLists.txt index e194eff608..ab18c55402 100644 --- a/fem/tests/SD_CurvedBndryPFEM2/CMakeLists.txt +++ b/fem/tests/SD_CurvedBndryPFEM2/CMakeLists.txt @@ -1,10 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( ptest.sif ptest.sif COPYONLY) -ADD_ELMERTEST_MODULE(SD_CurvedBndryPFEM2 Poisson Poisson.f90) + CONFIGURE_FILE( ptest.sif ptest.sif COPYONLY) + ADD_ELMERTEST_MODULE(SD_CurvedBndryPFEM2 Poisson Poisson.f90) -file(COPY Poisson.f90 square.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY Poisson.f90 square.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(SD_CurvedBndryPFEM2) -ADD_ELMER_LABEL(SD_CurvedBndryPFEM2 quick serendipity) + ADD_ELMER_TEST(SD_CurvedBndryPFEM2 LABELS quick serendipity) +ENDIF() diff --git a/fem/tests/SD_DNS_WaveSimulation/CMakeLists.txt b/fem/tests/SD_DNS_WaveSimulation/CMakeLists.txt index 8ed2734a0b..7466d876e9 100644 --- a/fem/tests/SD_DNS_WaveSimulation/CMakeLists.txt +++ b/fem/tests/SD_DNS_WaveSimulation/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( dns.sif dns.sif COPYONLY) + CONFIGURE_FILE( dns.sif dns.sif COPYONLY) -file(COPY tube.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY tube.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(SD_DNS_WaveSimulation LABELS transient serendipity) + ADD_ELMER_TEST(SD_DNS_WaveSimulation LABELS transient serendipity) +ENDIF() diff --git a/fem/tests/SD_ElastPelem2dPmultg/CMakeLists.txt b/fem/tests/SD_ElastPelem2dPmultg/CMakeLists.txt index 0985e503a2..02151c8662 100644 --- a/fem/tests/SD_ElastPelem2dPmultg/CMakeLists.txt +++ b/fem/tests/SD_ElastPelem2dPmultg/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY angle.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY angle.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(SD_ElastPelem2dPmultg LABELS p-fem serendipity) + ADD_ELMER_TEST(SD_ElastPelem2dPmultg LABELS p-fem serendipity) +ENDIF() diff --git a/fem/tests/SD_ElastPelem2dQuad/CMakeLists.txt b/fem/tests/SD_ElastPelem2dQuad/CMakeLists.txt index 20bb58212f..c77d1e680a 100644 --- a/fem/tests/SD_ElastPelem2dQuad/CMakeLists.txt +++ b/fem/tests/SD_ElastPelem2dQuad/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(SD_ElastPelem2dQuad LABELS quick p-fem serendipity) + ADD_ELMER_TEST(SD_ElastPelem2dQuad LABELS quick p-fem serendipity) +ENDIF() diff --git a/fem/tests/SD_ElasticBeam2DDampingBetaP2/CMakeLists.txt b/fem/tests/SD_ElasticBeam2DDampingBetaP2/CMakeLists.txt index 3b3bda8312..4c594995c9 100644 --- a/fem/tests/SD_ElasticBeam2DDampingBetaP2/CMakeLists.txt +++ b/fem/tests/SD_ElasticBeam2DDampingBetaP2/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY beam2d.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY beam2d.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(SD_ElasticBeam2DDampingBetaP2 LABELS slow serendipity) + ADD_ELMER_TEST(SD_ElasticBeam2DDampingBetaP2 LABELS slow serendipity) +ENDIF() diff --git a/fem/tests/SD_FilmFlowPlane/CMakeLists.txt b/fem/tests/SD_FilmFlowPlane/CMakeLists.txt index b3a388c2bf..1979480805 100644 --- a/fem/tests/SD_FilmFlowPlane/CMakeLists.txt +++ b/fem/tests/SD_FilmFlowPlane/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(film.sif film.sif COPYONLY) + CONFIGURE_FILE(film.sif film.sif COPYONLY) -file(COPY params.sif rect.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY params.sif rect.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(SD_FilmFlowPlane LABELS quick serendipity) + ADD_ELMER_TEST(SD_FilmFlowPlane LABELS quick serendipity) +ENDIF() diff --git a/fem/tests/SD_FilmFlowPlane2/CMakeLists.txt b/fem/tests/SD_FilmFlowPlane2/CMakeLists.txt index be4b8feab8..cb43ae0f82 100644 --- a/fem/tests/SD_FilmFlowPlane2/CMakeLists.txt +++ b/fem/tests/SD_FilmFlowPlane2/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(film.sif film.sif COPYONLY) + CONFIGURE_FILE(film.sif film.sif COPYONLY) -file(COPY params.sif rect.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY params.sif rect.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(SD_FilmFlowPlane2 LABELS quick serendipity) + ADD_ELMER_TEST(SD_FilmFlowPlane2 LABELS quick serendipity) +ENDIF() diff --git a/fem/tests/SD_FilmFlowPlane3/CMakeLists.txt b/fem/tests/SD_FilmFlowPlane3/CMakeLists.txt index ac4cd80b80..7e07695f62 100644 --- a/fem/tests/SD_FilmFlowPlane3/CMakeLists.txt +++ b/fem/tests/SD_FilmFlowPlane3/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(film.sif film.sif COPYONLY) + CONFIGURE_FILE(film.sif film.sif COPYONLY) -file(COPY params.sif rect.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY params.sif rect.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(SD_FilmFlowPlane3 LABELS quick serendipity) + ADD_ELMER_TEST(SD_FilmFlowPlane3 LABELS quick serendipity) +ENDIF() diff --git a/fem/tests/SD_PoissonPFEM/CMakeLists.txt b/fem/tests/SD_PoissonPFEM/CMakeLists.txt index 72e2f0a385..b96afdea27 100644 --- a/fem/tests/SD_PoissonPFEM/CMakeLists.txt +++ b/fem/tests/SD_PoissonPFEM/CMakeLists.txt @@ -1,10 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( ptest.sif ptest.sif COPYONLY) -ADD_ELMERTEST_MODULE(SD_PoissonPFEM Poisson Poisson.f90) + CONFIGURE_FILE( ptest.sif ptest.sif COPYONLY) + ADD_ELMERTEST_MODULE(SD_PoissonPFEM Poisson Poisson.f90) -file(COPY Poisson.f90 square.grd ELMERSOLVER_STARTINFO square DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY Poisson.f90 square.grd ELMERSOLVER_STARTINFO square DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(SD_PoissonPFEM) -ADD_ELMER_LABEL(SD_PoissonPFEM quick serendipity) + ADD_ELMER_TEST(SD_PoissonPFEM LABELS quick serendipity) +ENDIF() diff --git a/fem/tests/SD_SinPlane/CMakeLists.txt b/fem/tests/SD_SinPlane/CMakeLists.txt index 3424c4251b..d803ad1b71 100644 --- a/fem/tests/SD_SinPlane/CMakeLists.txt +++ b/fem/tests/SD_SinPlane/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO ssls129a DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO ssls129a DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(SD_SinPlane) -ADD_ELMER_LABEL(SD_SinPlane aster serendipity) + ADD_ELMER_TEST(SD_SinPlane LABELS aster serendipity) +ENDIF() diff --git a/fem/tests/SD_SolverSpecificMeshes/CMakeLists.txt b/fem/tests/SD_SolverSpecificMeshes/CMakeLists.txt index 9f6d635393..49ee47a967 100644 --- a/fem/tests/SD_SolverSpecificMeshes/CMakeLists.txt +++ b/fem/tests/SD_SolverSpecificMeshes/CMakeLists.txt @@ -1,10 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( ptest.sif ptest.sif COPYONLY) -ADD_ELMERTEST_MODULE(SD_SolverSpecificMeshes Poisson Poisson.f90) + CONFIGURE_FILE( ptest.sif ptest.sif COPYONLY) + ADD_ELMERTEST_MODULE(SD_SolverSpecificMeshes Poisson Poisson.f90) -file(COPY Poisson.f90 square.grd ELMERSOLVER_STARTINFO square square2 DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY Poisson.f90 square.grd ELMERSOLVER_STARTINFO square square2 DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(SD_SolverSpecificMeshes) -ADD_ELMER_LABEL(SD_SolverSpecificMeshes quick serendipity) + ADD_ELMER_TEST(SD_SolverSpecificMeshes LABELS quick serendipity) +ENDIF() diff --git a/fem/tests/SD_ViscoElasticMaxwell/CMakeLists.txt b/fem/tests/SD_ViscoElasticMaxwell/CMakeLists.txt index 22ea37b885..a457772127 100644 --- a/fem/tests/SD_ViscoElasticMaxwell/CMakeLists.txt +++ b/fem/tests/SD_ViscoElasticMaxwell/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY square.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY square.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(SD_ViscoElasticMaxwell LABELS elasticity viscoelastic vtu serendipity) + ADD_ELMER_TEST(SD_ViscoElasticMaxwell LABELS elasticity viscoelastic vtu serendipity) +ENDIF() diff --git a/fem/tests/SD_pmultg/CMakeLists.txt b/fem/tests/SD_pmultg/CMakeLists.txt index 9309849ab8..a3fd367807 100644 --- a/fem/tests/SD_pmultg/CMakeLists.txt +++ b/fem/tests/SD_pmultg/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( TempDist.sif TempDist.sif COPYONLY) -ADD_ELMERTEST_MODULE(SD_pmultg Poisson Poisson.f90) + CONFIGURE_FILE( TempDist.sif TempDist.sif COPYONLY) + ADD_ELMERTEST_MODULE(SD_pmultg Poisson Poisson.f90) -file(COPY Poisson.f90 square.grd ELMERSOLVER_STARTINFO square DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY Poisson.f90 square.grd ELMERSOLVER_STARTINFO square DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(SD_pmultg LABELS serendipity) + ADD_ELMER_TEST(SD_pmultg LABELS serendipity) +ENDIF() diff --git a/fem/tests/Shell_with_Solid_Beam_EigenComplex/CMakeLists.txt b/fem/tests/Shell_with_Solid_Beam_EigenComplex/CMakeLists.txt index c6127656cf..47601085ad 100644 --- a/fem/tests/Shell_with_Solid_Beam_EigenComplex/CMakeLists.txt +++ b/fem/tests/Shell_with_Solid_Beam_EigenComplex/CMakeLists.txt @@ -1,6 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO solid.grd shell.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(Shell_with_Solid_Beam_EigenComplex NPROCS 1 LABELS block shell complex_eigen) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + CONFIGURE_FILE(case.sif case.sif COPYONLY) + + file(COPY ELMERSOLVER_STARTINFO solid.grd shell.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + + ADD_ELMER_TEST(Shell_with_Solid_Beam_EigenComplex NPROCS 1 LABELS block shell complex_eigen) +ENDIF() diff --git a/fem/tests/ShoeboxFsiHarmonic/CMakeLists.txt b/fem/tests/ShoeboxFsiHarmonic/CMakeLists.txt index b6a5c8ecbf..39cedceae5 100644 --- a/fem/tests/ShoeboxFsiHarmonic/CMakeLists.txt +++ b/fem/tests/ShoeboxFsiHarmonic/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO shoebox.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO shoebox.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(ShoeboxFsiHarmonic LABELS fsi block) + ADD_ELMER_TEST(ShoeboxFsiHarmonic LABELS fsi block) +ENDIF() diff --git a/fem/tests/ShoeboxFsiHarmonic2D/CMakeLists.txt b/fem/tests/ShoeboxFsiHarmonic2D/CMakeLists.txt index 3027d10733..f7ac6ce293 100644 --- a/fem/tests/ShoeboxFsiHarmonic2D/CMakeLists.txt +++ b/fem/tests/ShoeboxFsiHarmonic2D/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO shoebox2d.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO shoebox2d.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(ShoeboxFsiHarmonic2D LABELS fsi block) + ADD_ELMER_TEST(ShoeboxFsiHarmonic2D LABELS fsi block) +ENDIF() diff --git a/fem/tests/ShoeboxFsiHarmonicPlate/CMakeLists.txt b/fem/tests/ShoeboxFsiHarmonicPlate/CMakeLists.txt index c2949bf4ec..d6da191f44 100644 --- a/fem/tests/ShoeboxFsiHarmonicPlate/CMakeLists.txt +++ b/fem/tests/ShoeboxFsiHarmonicPlate/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO shoebox.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO shoebox.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(ShoeboxFsiHarmonicPlate LABELS fsi block plate) + ADD_ELMER_TEST(ShoeboxFsiHarmonicPlate LABELS fsi block plate) +ENDIF() diff --git a/fem/tests/ShoeboxFsiStatic/CMakeLists.txt b/fem/tests/ShoeboxFsiStatic/CMakeLists.txt index 713122b3ca..bb34865eaf 100644 --- a/fem/tests/ShoeboxFsiStatic/CMakeLists.txt +++ b/fem/tests/ShoeboxFsiStatic/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO shoebox.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO shoebox.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(ShoeboxFsiStatic LABELS fsi block failing) + ADD_ELMER_TEST(ShoeboxFsiStatic LABELS fsi block failing) +ENDIF() diff --git a/fem/tests/ShoeboxFsiStaticPlate/CMakeLists.txt b/fem/tests/ShoeboxFsiStaticPlate/CMakeLists.txt index 4b4ae04f2a..7b2a980144 100644 --- a/fem/tests/ShoeboxFsiStaticPlate/CMakeLists.txt +++ b/fem/tests/ShoeboxFsiStaticPlate/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO shoebox.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO shoebox.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(ShoeboxFsiStaticPlate LABELS fsi block plate) + ADD_ELMER_TEST(ShoeboxFsiStaticPlate LABELS fsi block plate) +ENDIF() diff --git a/fem/tests/ShoeboxStaticPlate/CMakeLists.txt b/fem/tests/ShoeboxStaticPlate/CMakeLists.txt index 97a5309757..bf6d5e4fa2 100644 --- a/fem/tests/ShoeboxStaticPlate/CMakeLists.txt +++ b/fem/tests/ShoeboxStaticPlate/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO shoebox.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO shoebox.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(ShoeboxStaticPlate LABELS plate quick) + ADD_ELMER_TEST(ShoeboxStaticPlate LABELS plate quick) +ENDIF() diff --git a/fem/tests/SinPlane/CMakeLists.txt b/fem/tests/SinPlane/CMakeLists.txt index 7caf53a39f..e955fd09f9 100644 --- a/fem/tests/SinPlane/CMakeLists.txt +++ b/fem/tests/SinPlane/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO ssls129a DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO ssls129a DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(SinPlane) -ADD_ELMER_LABEL(SinPlane aster) + ADD_ELMER_TEST(SinPlane LABELS aster) +ENDIF() diff --git a/fem/tests/SinusFlowTunedVelo/CMakeLists.txt b/fem/tests/SinusFlowTunedVelo/CMakeLists.txt index 5b2196f37c..415e6d29de 100644 --- a/fem/tests/SinusFlowTunedVelo/CMakeLists.txt +++ b/fem/tests/SinusFlowTunedVelo/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( cavity.sif cavity.sif COPYONLY) + CONFIGURE_FILE( cavity.sif cavity.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO sinus0.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO sinus0.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(SinusFlowTunedVelo LABELS control n-t) + ADD_ELMER_TEST(SinusFlowTunedVelo LABELS control n-t) +ENDIF() diff --git a/fem/tests/SolverSpecificMeshes/CMakeLists.txt b/fem/tests/SolverSpecificMeshes/CMakeLists.txt index c04ac6377c..0d09edf1ea 100644 --- a/fem/tests/SolverSpecificMeshes/CMakeLists.txt +++ b/fem/tests/SolverSpecificMeshes/CMakeLists.txt @@ -1,10 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( ptest.sif ptest.sif COPYONLY) -ADD_ELMERTEST_MODULE(SolverSpecificMeshes Poisson Poisson.f90) + CONFIGURE_FILE( ptest.sif ptest.sif COPYONLY) + ADD_ELMERTEST_MODULE(SolverSpecificMeshes Poisson Poisson.f90) -file(COPY Poisson.f90 square.grd ELMERSOLVER_STARTINFO square square2 DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY Poisson.f90 square.grd ELMERSOLVER_STARTINFO square square2 DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(SolverSpecificMeshes) -ADD_ELMER_LABEL(SolverSpecificMeshes quick) + ADD_ELMER_TEST(SolverSpecificMeshes LABELS quick) +ENDIF() diff --git a/fem/tests/StatCurrentVec/CMakeLists.txt b/fem/tests/StatCurrentVec/CMakeLists.txt index 23dac86ceb..5770d1ec63 100644 --- a/fem/tests/StatCurrentVec/CMakeLists.txt +++ b/fem/tests/StatCurrentVec/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(StatCurrentVec LABELS quick) + ADD_ELMER_TEST(StatCurrentVec LABELS quick) +ENDIF() diff --git a/fem/tests/StatCurrentVec2/CMakeLists.txt b/fem/tests/StatCurrentVec2/CMakeLists.txt index 792ebdf7cb..4b57dcf280 100644 --- a/fem/tests/StatCurrentVec2/CMakeLists.txt +++ b/fem/tests/StatCurrentVec2/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(StatCurrentVec2 LABELS quick namespace) + ADD_ELMER_TEST(StatCurrentVec2 LABELS quick namespace) +ENDIF() diff --git a/fem/tests/StatCurrentVecAniso/CMakeLists.txt b/fem/tests/StatCurrentVecAniso/CMakeLists.txt index aa5172005b..ea999fd2a5 100644 --- a/fem/tests/StatCurrentVecAniso/CMakeLists.txt +++ b/fem/tests/StatCurrentVecAniso/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(StatCurrentVecAniso LABELS quick) + ADD_ELMER_TEST(StatCurrentVecAniso LABELS quick) +ENDIF() diff --git a/fem/tests/StatCurrentVecFarfield/CMakeLists.txt b/fem/tests/StatCurrentVecFarfield/CMakeLists.txt index 268fa039a3..c891420b4f 100644 --- a/fem/tests/StatCurrentVecFarfield/CMakeLists.txt +++ b/fem/tests/StatCurrentVecFarfield/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO hole.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO hole.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(StatCurrentVecFarfield LABELS quick) + ADD_ELMER_TEST(StatCurrentVecFarfield LABELS quick) +ENDIF() diff --git a/fem/tests/Step_v2f/CMakeLists.txt b/fem/tests/Step_v2f/CMakeLists.txt index 9ab08966ff..12876d2a8e 100644 --- a/fem/tests/Step_v2f/CMakeLists.txt +++ b/fem/tests/Step_v2f/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( Step_v2f.sif Step_v2f.sif COPYONLY) + CONFIGURE_FILE( Step_v2f.sif Step_v2f.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO Step_v2f.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO Step_v2f.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(Step_v2f) + ADD_ELMER_TEST(Step_v2f) +ENDIF() diff --git a/fem/tests/TEAM30a_3ph_transient/CMakeLists.txt b/fem/tests/TEAM30a_3ph_transient/CMakeLists.txt index 26a59e07c9..3b411ed0e4 100644 --- a/fem/tests/TEAM30a_3ph_transient/CMakeLists.txt +++ b/fem/tests/TEAM30a_3ph_transient/CMakeLists.txt @@ -1,7 +1,9 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(TEAM30a_3ph_transient.sif TEAM30a_3ph_transient.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO TEAM30a_3ph_harmonic.sif TEAM30a_3ph DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + CONFIGURE_FILE(TEAM30a_3ph_transient.sif TEAM30a_3ph_transient.sif COPYONLY) + file(COPY ELMERSOLVER_STARTINFO TEAM30a_3ph_harmonic.sif TEAM30a_3ph DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(TEAM30a_3ph_transient LABELS harmonic restart) + ADD_ELMER_TEST(TEAM30a_3ph_transient LABELS harmonic restart) +ENDIF() diff --git a/fem/tests/TankAst/CMakeLists.txt b/fem/tests/TankAst/CMakeLists.txt index 1e3116a361..2bdfef3c46 100644 --- a/fem/tests/TankAst/CMakeLists.txt +++ b/fem/tests/TankAst/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( tank.sif tank.sif COPYONLY) + CONFIGURE_FILE( tank.sif tank.sif COPYONLY) -file(COPY tank ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") - -ADD_ELMER_TEST(TankAst LABELS aster quick matc) + file(COPY tank ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + ADD_ELMER_TEST(TankAst LABELS aster quick matc) +ENDIF() diff --git a/fem/tests/ThermalActuator/CMakeLists.txt b/fem/tests/ThermalActuator/CMakeLists.txt index 60b6211b34..0cdd84a764 100644 --- a/fem/tests/ThermalActuator/CMakeLists.txt +++ b/fem/tests/ThermalActuator/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( thermal_actuator.sif thermal_actuator.sif COPYONLY) + CONFIGURE_FILE( thermal_actuator.sif thermal_actuator.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO actuator.msh DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO actuator.msh DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(ThermalActuator) + ADD_ELMER_TEST(ThermalActuator) +ENDIF() diff --git a/fem/tests/ThermalBiMetal/CMakeLists.txt b/fem/tests/ThermalBiMetal/CMakeLists.txt index 0e6338292d..459a7bdf93 100644 --- a/fem/tests/ThermalBiMetal/CMakeLists.txt +++ b/fem/tests/ThermalBiMetal/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO beams.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO beams.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(ThermalBiMetal) -ADD_ELMER_LABEL(ThermalBiMetal quick) + ADD_ELMER_TEST(ThermalBiMetal) + ADD_ELMER_LABEL(ThermalBiMetal quick) +ENDIF() diff --git a/fem/tests/ThermalBiMetal2/CMakeLists.txt b/fem/tests/ThermalBiMetal2/CMakeLists.txt index 47984b4228..a334f9e18e 100644 --- a/fem/tests/ThermalBiMetal2/CMakeLists.txt +++ b/fem/tests/ThermalBiMetal2/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO beams.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO beams.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(ThermalBiMetal2) -ADD_ELMER_LABEL(ThermalBiMetal2 quick) + ADD_ELMER_TEST(ThermalBiMetal2) + ADD_ELMER_LABEL(ThermalBiMetal2 quick) +ENDIF() diff --git a/fem/tests/ThermalCompress/CMakeLists.txt b/fem/tests/ThermalCompress/CMakeLists.txt index 7b0d2c0ba2..c8b863c6e9 100644 --- a/fem/tests/ThermalCompress/CMakeLists.txt +++ b/fem/tests/ThermalCompress/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( ThermalCompress.sif ThermalCompress.sif COPYONLY) + CONFIGURE_FILE( ThermalCompress.sif ThermalCompress.sif COPYONLY) -file(COPY ThermalCompress.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ThermalCompress.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(ThermalCompress LABELS matc quick) + ADD_ELMER_TEST(ThermalCompress LABELS matc quick) +ENDIF() diff --git a/fem/tests/TimeProfileBC/CMakeLists.txt b/fem/tests/TimeProfileBC/CMakeLists.txt index f115861a0d..d86efccdbd 100644 --- a/fem/tests/TimeProfileBC/CMakeLists.txt +++ b/fem/tests/TimeProfileBC/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) -ADD_ELMERTEST_MODULE(TimeProfileBC TimeProfile TimeProfile.F90) + CONFIGURE_FILE(case.sif case.sif COPYONLY) + ADD_ELMERTEST_MODULE(TimeProfileBC TimeProfile TimeProfile.F90) -file(COPY ELMERSOLVER_STARTINFO TimeProfile.F90 slab.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO TimeProfile.F90 slab.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(TimeProfileBC) + ADD_ELMER_TEST(TimeProfileBC) +ENDIF() diff --git a/fem/tests/TopoOptElast2DCompliance/CMakeLists.txt b/fem/tests/TopoOptElast2DCompliance/CMakeLists.txt index f899093b54..7d84c18c93 100644 --- a/fem/tests/TopoOptElast2DCompliance/CMakeLists.txt +++ b/fem/tests/TopoOptElast2DCompliance/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY rect.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY rect.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(TopoOptElast2DCompliance LABELS quick) + ADD_ELMER_TEST(TopoOptElast2DCompliance LABELS quick) +ENDIF() diff --git a/fem/tests/TopoOptElast2DCompliance2/CMakeLists.txt b/fem/tests/TopoOptElast2DCompliance2/CMakeLists.txt index 51313c70a1..16019c3f8b 100644 --- a/fem/tests/TopoOptElast2DCompliance2/CMakeLists.txt +++ b/fem/tests/TopoOptElast2DCompliance2/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY rect.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY rect.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(TopoOptElast2DCompliance2 LABELS quick) + ADD_ELMER_TEST(TopoOptElast2DCompliance2 LABELS quick) +ENDIF() diff --git a/fem/tests/TopoOptHeat2DCompliance/CMakeLists.txt b/fem/tests/TopoOptHeat2DCompliance/CMakeLists.txt index c42b9fc8d9..1169afa388 100644 --- a/fem/tests/TopoOptHeat2DCompliance/CMakeLists.txt +++ b/fem/tests/TopoOptHeat2DCompliance/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY tree.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY tree.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(TopoOptHeat2DCompliance LABELS quick) + ADD_ELMER_TEST(TopoOptHeat2DCompliance LABELS quick) +ENDIF() diff --git a/fem/tests/TopoOptHeat2DCompliance2/CMakeLists.txt b/fem/tests/TopoOptHeat2DCompliance2/CMakeLists.txt index f2e516a96b..9cfbbf68fa 100644 --- a/fem/tests/TopoOptHeat2DCompliance2/CMakeLists.txt +++ b/fem/tests/TopoOptHeat2DCompliance2/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case2.sif case2.sif COPYONLY) + CONFIGURE_FILE(case2.sif case2.sif COPYONLY) -file(COPY tree2.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY tree2.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(TopoOptHeat2DCompliance2 LABELS quick) + ADD_ELMER_TEST(TopoOptHeat2DCompliance2 LABELS quick) +ENDIF() diff --git a/fem/tests/TravellingHeater/CMakeLists.txt b/fem/tests/TravellingHeater/CMakeLists.txt index 10e81d4592..9093db18ad 100644 --- a/fem/tests/TravellingHeater/CMakeLists.txt +++ b/fem/tests/TravellingHeater/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) -ADD_ELMERTEST_MODULE(TravellingHeater HeatSource HeatSource.F90) + CONFIGURE_FILE(case.sif case.sif COPYONLY) + ADD_ELMERTEST_MODULE(TravellingHeater HeatSource HeatSource.F90) -file(COPY ELMERSOLVER_STARTINFO HeatSource.F90 slab.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO HeatSource.F90 slab.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(TravellingHeater) + ADD_ELMER_TEST(TravellingHeater) +ENDIF() diff --git a/fem/tests/TravellingHeater2/CMakeLists.txt b/fem/tests/TravellingHeater2/CMakeLists.txt index 47246a552f..15e0164a47 100644 --- a/fem/tests/TravellingHeater2/CMakeLists.txt +++ b/fem/tests/TravellingHeater2/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case2.sif case2.sif COPYONLY) -ADD_ELMERTEST_MODULE(TravellingHeater2 HeatSource HeatSource.F90) + CONFIGURE_FILE(case2.sif case2.sif COPYONLY) + ADD_ELMERTEST_MODULE(TravellingHeater2 HeatSource HeatSource.F90) -file(COPY ELMERSOLVER_STARTINFO HeatSource.F90 slab2.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO HeatSource.F90 slab2.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(TravellingHeater2) + ADD_ELMER_TEST(TravellingHeater2) +ENDIF() diff --git a/fem/tests/VectorHelmholtzWaveguideQuadBlock/CMakeLists.txt b/fem/tests/VectorHelmholtzWaveguideQuadBlock/CMakeLists.txt index 564a9bf104..6e80c14445 100644 --- a/fem/tests/VectorHelmholtzWaveguideQuadBlock/CMakeLists.txt +++ b/fem/tests/VectorHelmholtzWaveguideQuadBlock/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(waveguide.sif waveguide.sif COPYONLY) + CONFIGURE_FILE(waveguide.sif waveguide.sif COPYONLY) -file(COPY block.sif ELMERSOLVER_STARTINFO shoebox_tets DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY block.sif ELMERSOLVER_STARTINFO shoebox_tets DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(VectorHelmholtzWaveguideQuadBlock LABELS whitney) + ADD_ELMER_TEST(VectorHelmholtzWaveguideQuadBlock LABELS whitney) +ENDIF() diff --git a/fem/tests/ViscoElasticMaxwell/CMakeLists.txt b/fem/tests/ViscoElasticMaxwell/CMakeLists.txt index 4559322977..90997b9f3b 100644 --- a/fem/tests/ViscoElasticMaxwell/CMakeLists.txt +++ b/fem/tests/ViscoElasticMaxwell/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY square.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY square.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(ViscoElasticMaxwell LABELS elasticity viscoelastic vtu) + ADD_ELMER_TEST(ViscoElasticMaxwell LABELS elasticity viscoelastic vtu) +ENDIF() diff --git a/fem/tests/WaveEqu/CMakeLists.txt b/fem/tests/WaveEqu/CMakeLists.txt index e084bd0675..625b7a528a 100644 --- a/fem/tests/WaveEqu/CMakeLists.txt +++ b/fem/tests/WaveEqu/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( ptest.sif ptest.sif COPYONLY) + CONFIGURE_FILE( ptest.sif ptest.sif COPYONLY) -file(COPY square.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY square.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(WaveEqu) -ADD_ELMER_LABEL(WaveEqu quick) + ADD_ELMER_TEST(WaveEqu LABELS quick) +ENDIF() diff --git a/fem/tests/WaveEquEigenDampedDirect/CMakeLists.txt b/fem/tests/WaveEquEigenDampedDirect/CMakeLists.txt index 19eddf83c9..3c01f3d3e2 100644 --- a/fem/tests/WaveEquEigenDampedDirect/CMakeLists.txt +++ b/fem/tests/WaveEquEigenDampedDirect/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY square.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY square.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(WaveEquEigenDampedDirect LABELS eigen) + ADD_ELMER_TEST(WaveEquEigenDampedDirect LABELS eigen) +ENDIF() diff --git a/fem/tests/adaptivity4/CMakeLists.txt b/fem/tests/adaptivity4/CMakeLists.txt index 18961f2aaa..6490bc4e82 100644 --- a/fem/tests/adaptivity4/CMakeLists.txt +++ b/fem/tests/adaptivity4/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( stress.sif stress.sif COPYONLY) + CONFIGURE_FILE( stress.sif stress.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO mesh.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO mesh.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(adaptivity4) -ADD_ELMER_LABEL(adaptivity4 quick) + ADD_ELMER_TEST(adaptivity4 LABELS quick) +ENDIF() diff --git a/fem/tests/adaptivity5/CMakeLists.txt b/fem/tests/adaptivity5/CMakeLists.txt index 7d22943296..76c8f02829 100644 --- a/fem/tests/adaptivity5/CMakeLists.txt +++ b/fem/tests/adaptivity5/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( stress.sif stress.sif COPYONLY) + CONFIGURE_FILE( stress.sif stress.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO mesh.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO mesh.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(adaptivity5 LABELS quick elasticsolve) + ADD_ELMER_TEST(adaptivity5 LABELS quick elasticsolve) +ENDIF() diff --git a/fem/tests/beam-springs/CMakeLists.txt b/fem/tests/beam-springs/CMakeLists.txt index 2a90fe3f0e..f67bab5bf4 100644 --- a/fem/tests/beam-springs/CMakeLists.txt +++ b/fem/tests/beam-springs/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( beam.sif beam.sif COPYONLY) + CONFIGURE_FILE( beam.sif beam.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO temp.log beam3d.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO temp.log beam3d.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(beam-springs) -ADD_ELMER_LABEL(beam-springs quick) + ADD_ELMER_TEST(beam-springs) + ADD_ELMER_LABEL(beam-springs quick) +ENDIF() diff --git a/fem/tests/bodydir/CMakeLists.txt b/fem/tests/bodydir/CMakeLists.txt index b9b05bbd85..7d7362ff78 100644 --- a/fem/tests/bodydir/CMakeLists.txt +++ b/fem/tests/bodydir/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( test.sif test.sif COPYONLY) + CONFIGURE_FILE( test.sif test.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO test.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO test.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(bodydir) -ADD_ELMER_LABEL(bodydir quick) + ADD_ELMER_TEST(bodydir LABELS quick) +ENDIF() diff --git a/fem/tests/bodydir2/CMakeLists.txt b/fem/tests/bodydir2/CMakeLists.txt index 00d85621d2..2527a21a9d 100644 --- a/fem/tests/bodydir2/CMakeLists.txt +++ b/fem/tests/bodydir2/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) -ADD_ELMERTEST_MODULE(bodydir2 Blowers Blowers.f90) + CONFIGURE_FILE( case.sif case.sif COPYONLY) + ADD_ELMERTEST_MODULE(bodydir2 Blowers Blowers.f90) -file(COPY ELMERSOLVER_STARTINFO Blowers.f90 cross.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO Blowers.f90 cross.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(bodydir2) + ADD_ELMER_TEST(bodydir2) +ENDIF() diff --git a/fem/tests/bodyload/CMakeLists.txt b/fem/tests/bodyload/CMakeLists.txt index 96e0c7f553..8d47c3f226 100644 --- a/fem/tests/bodyload/CMakeLists.txt +++ b/fem/tests/bodyload/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( test.sif test.sif COPYONLY) + CONFIGURE_FILE( test.sif test.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO test.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO test.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(bodyload) -ADD_ELMER_LABEL(bodyload quick) + ADD_ELMER_TEST(bodyload LABELS quick) +ENDIF() diff --git a/fem/tests/channel_v2f/CMakeLists.txt b/fem/tests/channel_v2f/CMakeLists.txt index 8fc7f6595a..a10a8dbcdb 100644 --- a/fem/tests/channel_v2f/CMakeLists.txt +++ b/fem/tests/channel_v2f/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( channel_v2f.sif channel_v2f.sif COPYONLY) + CONFIGURE_FILE( channel_v2f.sif channel_v2f.sif COPYONLY) -file(COPY channel.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY channel.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(channel_v2f) + ADD_ELMER_TEST(channel_v2f) +ENDIF() diff --git a/fem/tests/circuits2D_harmonic_foil/CMakeLists.txt b/fem/tests/circuits2D_harmonic_foil/CMakeLists.txt index b3b92a6d7e..3384ffc76f 100644 --- a/fem/tests/circuits2D_harmonic_foil/CMakeLists.txt +++ b/fem/tests/circuits2D_harmonic_foil/CMakeLists.txt @@ -1,7 +1,12 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(sif/1383-components-foilwinding.sif sif/1383-components-foilwinding.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -file(COPY sif/1383-circuits-components.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") -file(COPY 1383/mesh.boundary 1383/mesh.header 1383/mesh.nodes 1383/mesh.elements 1383/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1383") -ADD_ELMER_TEST(circuits2D_harmonic_foil LABELS 2D circuits harmonic mgdyn) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + + CONFIGURE_FILE(sif/1383-components-foilwinding.sif sif/1383-components-foilwinding.sif COPYONLY) + + file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY sif/1383-circuits-components.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") + file(COPY 1383/mesh.boundary 1383/mesh.header 1383/mesh.nodes 1383/mesh.elements 1383/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1383") + + ADD_ELMER_TEST(circuits2D_harmonic_foil LABELS 2D circuits harmonic mgdyn) +ENDIF() diff --git a/fem/tests/circuits2D_harmonic_massive/CMakeLists.txt b/fem/tests/circuits2D_harmonic_massive/CMakeLists.txt index 5474cf5712..97d6de64e5 100644 --- a/fem/tests/circuits2D_harmonic_massive/CMakeLists.txt +++ b/fem/tests/circuits2D_harmonic_massive/CMakeLists.txt @@ -1,8 +1,13 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(sif/1381-components-massive.sif sif/1381-components-massive.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -file(COPY sif/1381-circuits-components.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") -file(COPY 1381/mesh.boundary 1381/mesh.header 1381/mesh.nodes 1381/mesh.elements 1381/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1381") -file(COPY 1381/dat/1381.dat.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1381/dat") -ADD_ELMER_TEST(circuits2D_harmonic_massive LABELS 2D circuits harmonic mgdyn) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + + CONFIGURE_FILE(sif/1381-components-massive.sif sif/1381-components-massive.sif COPYONLY) + + file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY sif/1381-circuits-components.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") + file(COPY 1381/mesh.boundary 1381/mesh.header 1381/mesh.nodes 1381/mesh.elements 1381/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1381") + file(COPY 1381/dat/1381.dat.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1381/dat") + + ADD_ELMER_TEST(circuits2D_harmonic_massive LABELS 2D circuits harmonic mgdyn) +ENDIF() diff --git a/fem/tests/circuits2D_harmonic_stranded/CMakeLists.txt b/fem/tests/circuits2D_harmonic_stranded/CMakeLists.txt index 87243a2d9a..a699e6ea56 100644 --- a/fem/tests/circuits2D_harmonic_stranded/CMakeLists.txt +++ b/fem/tests/circuits2D_harmonic_stranded/CMakeLists.txt @@ -1,8 +1,13 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(sif/1381-components-stranded.sif sif/1381-components-stranded.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -file(COPY sif/1381-circuits-components.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") -file(COPY 1381/mesh.boundary 1381/mesh.header 1381/mesh.nodes 1381/mesh.elements 1381/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1381") -file(COPY 1381/dat/1381.dat.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1381/dat") -ADD_ELMER_TEST(circuits2D_harmonic_stranded LABELS 2D circuits harmonic mgdyn) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + + CONFIGURE_FILE(sif/1381-components-stranded.sif sif/1381-components-stranded.sif COPYONLY) + + file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY sif/1381-circuits-components.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") + file(COPY 1381/mesh.boundary 1381/mesh.header 1381/mesh.nodes 1381/mesh.elements 1381/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1381") + file(COPY 1381/dat/1381.dat.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1381/dat") + + ADD_ELMER_TEST(circuits2D_harmonic_stranded LABELS 2D circuits harmonic mgdyn) +ENDIF() diff --git a/fem/tests/circuits2D_harmonic_stranded_explicit_coil_resistance/CMakeLists.txt b/fem/tests/circuits2D_harmonic_stranded_explicit_coil_resistance/CMakeLists.txt index 98e9ff47f5..8ae704246f 100644 --- a/fem/tests/circuits2D_harmonic_stranded_explicit_coil_resistance/CMakeLists.txt +++ b/fem/tests/circuits2D_harmonic_stranded_explicit_coil_resistance/CMakeLists.txt @@ -1,8 +1,13 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(sif/1381-components-stranded.sif sif/1381-components-stranded.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -file(COPY sif/1381-circuits-components.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") -file(COPY 1381/mesh.boundary 1381/mesh.header 1381/mesh.nodes 1381/mesh.elements 1381/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1381") -file(COPY 1381/dat/gittrack DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1381/dat") -ADD_ELMER_TEST(circuits2D_harmonic_stranded_explicit_coil_resistance LABELS circuits 2D harmonic mgdyn) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + + CONFIGURE_FILE(sif/1381-components-stranded.sif sif/1381-components-stranded.sif COPYONLY) + + file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY sif/1381-circuits-components.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") + file(COPY 1381/mesh.boundary 1381/mesh.header 1381/mesh.nodes 1381/mesh.elements 1381/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1381") + file(COPY 1381/dat/gittrack DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1381/dat") + + ADD_ELMER_TEST(circuits2D_harmonic_stranded_explicit_coil_resistance LABELS circuits 2D harmonic mgdyn) +ENDIF() diff --git a/fem/tests/circuits2D_harmonic_stranded_homogenization/CMakeLists.txt b/fem/tests/circuits2D_harmonic_stranded_homogenization/CMakeLists.txt index c3a8a01db1..62b74a9718 100644 --- a/fem/tests/circuits2D_harmonic_stranded_homogenization/CMakeLists.txt +++ b/fem/tests/circuits2D_harmonic_stranded_homogenization/CMakeLists.txt @@ -1,7 +1,12 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(sif/2077.sif sif/2077.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -file(COPY sif/2077-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") -file(COPY 2077/mesh.boundary 2077/mesh.header 2077/mesh.nodes 2077/mesh.elements 2077/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/2077") -ADD_ELMER_TEST(circuits2D_harmonic_stranded_homogenization LABELS 2D circuits homogenization harmonic mgdyn) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + + CONFIGURE_FILE(sif/2077.sif sif/2077.sif COPYONLY) + + file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY sif/2077-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") + file(COPY 2077/mesh.boundary 2077/mesh.header 2077/mesh.nodes 2077/mesh.elements 2077/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/2077") + + ADD_ELMER_TEST(circuits2D_harmonic_stranded_homogenization LABELS 2D circuits homogenization harmonic mgdyn) +ENDIF() diff --git a/fem/tests/circuits2D_scan_harmonics/CMakeLists.txt b/fem/tests/circuits2D_scan_harmonics/CMakeLists.txt index f3ba0cbecc..49c01bc607 100644 --- a/fem/tests/circuits2D_scan_harmonics/CMakeLists.txt +++ b/fem/tests/circuits2D_scan_harmonics/CMakeLists.txt @@ -1,7 +1,12 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(sif/6425.sif sif/6425.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -file(COPY sif/6425-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") -file(COPY 6425 DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(circuits2D_scan_harmonics LABELS 2D circuits harmonic scanning mgdyn) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + + CONFIGURE_FILE(sif/6425.sif sif/6425.sif COPYONLY) + + file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY sif/6425-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") + file(COPY 6425 DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + + ADD_ELMER_TEST(circuits2D_scan_harmonics LABELS 2D circuits harmonic scanning mgdyn) +ENDIF() diff --git a/fem/tests/circuits2D_transient_foil/CMakeLists.txt b/fem/tests/circuits2D_transient_foil/CMakeLists.txt index e52ae7f207..cafd54e197 100644 --- a/fem/tests/circuits2D_transient_foil/CMakeLists.txt +++ b/fem/tests/circuits2D_transient_foil/CMakeLists.txt @@ -1,7 +1,12 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(sif/1383-components-foilwinding.sif sif/1383-components-foilwinding.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -file(COPY sif/1383-circuits-components.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") -file(COPY 1383/mesh.boundary 1383/mesh.header 1383/mesh.nodes 1383/mesh.elements 1383/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1383") -ADD_ELMER_TEST(circuits2D_transient_foil LABELS 2D circuits transient mgdyn) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + + CONFIGURE_FILE(sif/1383-components-foilwinding.sif sif/1383-components-foilwinding.sif COPYONLY) + + file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY sif/1383-circuits-components.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") + file(COPY 1383/mesh.boundary 1383/mesh.header 1383/mesh.nodes 1383/mesh.elements 1383/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1383") + + ADD_ELMER_TEST(circuits2D_transient_foil LABELS 2D circuits transient mgdyn) +ENDIF() diff --git a/fem/tests/circuits2D_transient_stranded/CMakeLists.txt b/fem/tests/circuits2D_transient_stranded/CMakeLists.txt index 2967c361c3..079465c83c 100644 --- a/fem/tests/circuits2D_transient_stranded/CMakeLists.txt +++ b/fem/tests/circuits2D_transient_stranded/CMakeLists.txt @@ -1,8 +1,13 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(sif/1381-components-stranded.sif sif/1381-components-stranded.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -file(COPY sif/1381-circuits-components.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") -file(COPY 1381/mesh.boundary 1381/mesh.header 1381/mesh.nodes 1381/mesh.elements 1381/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1381") -file(COPY 1381/dat/1381.dat.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1381/dat") -ADD_ELMER_TEST(circuits2D_transient_stranded LABELS 2D circuits transient mgdyn) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + + CONFIGURE_FILE(sif/1381-components-stranded.sif sif/1381-components-stranded.sif COPYONLY) + + file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY sif/1381-circuits-components.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") + file(COPY 1381/mesh.boundary 1381/mesh.header 1381/mesh.nodes 1381/mesh.elements 1381/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1381") + file(COPY 1381/dat/1381.dat.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1381/dat") + + ADD_ELMER_TEST(circuits2D_transient_stranded LABELS 2D circuits transient mgdyn) +ENDIF() diff --git a/fem/tests/circuits2D_transient_variable_resistor/CMakeLists.txt b/fem/tests/circuits2D_transient_variable_resistor/CMakeLists.txt index 4d343ae942..267bf4ae9a 100644 --- a/fem/tests/circuits2D_transient_variable_resistor/CMakeLists.txt +++ b/fem/tests/circuits2D_transient_variable_resistor/CMakeLists.txt @@ -1,8 +1,13 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(sif/variable_resistor.sif sif/variable_resistor.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -file(COPY sif/variable_resistor_circuit.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") -file(COPY 1381/mesh.boundary 1381/mesh.header 1381/mesh.nodes 1381/mesh.elements 1381/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1381") -file(COPY 1381/dat/gittrack DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1381/dat") -ADD_ELMER_TEST(circuits2D_transient_variable_resistor LABELS 2D circuits transient mgdyn resistor) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + + CONFIGURE_FILE(sif/variable_resistor.sif sif/variable_resistor.sif COPYONLY) + + file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY sif/variable_resistor_circuit.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") + file(COPY 1381/mesh.boundary 1381/mesh.header 1381/mesh.nodes 1381/mesh.elements 1381/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1381") + file(COPY 1381/dat/gittrack DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1381/dat") + + ADD_ELMER_TEST(circuits2D_transient_variable_resistor LABELS 2D circuits transient mgdyn resistor) +ENDIF() diff --git a/fem/tests/circuits2D_with_hysteresis/CMakeLists.txt b/fem/tests/circuits2D_with_hysteresis/CMakeLists.txt index 3176ce4a24..0c62f2e07a 100644 --- a/fem/tests/circuits2D_with_hysteresis/CMakeLists.txt +++ b/fem/tests/circuits2D_with_hysteresis/CMakeLists.txt @@ -1,5 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(sif/37.sif sif/37.sif COPYONLY) -file(COPY sif 37 ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(circuits2D_with_hysteresis LABELS circuits 2D mgdyn) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + + CONFIGURE_FILE(sif/37.sif sif/37.sif COPYONLY) + + file(COPY sif 37 ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + + ADD_ELMER_TEST(circuits2D_with_hysteresis LABELS circuits 2D mgdyn) +ENDIF() diff --git a/fem/tests/circuits2D_with_hysteresis_axi/CMakeLists.txt b/fem/tests/circuits2D_with_hysteresis_axi/CMakeLists.txt index e43d4185c9..f24098a05e 100644 --- a/fem/tests/circuits2D_with_hysteresis_axi/CMakeLists.txt +++ b/fem/tests/circuits2D_with_hysteresis_axi/CMakeLists.txt @@ -1,5 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(sif/37.sif sif/37.sif COPYONLY) -file(COPY sif 37 ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(circuits2D_with_hysteresis_axi LABELS circuits 2D mgdyn) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + + CONFIGURE_FILE(sif/37.sif sif/37.sif COPYONLY) + + file(COPY sif 37 ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + + ADD_ELMER_TEST(circuits2D_with_hysteresis_axi LABELS circuits 2D mgdyn) +ENDIF() diff --git a/fem/tests/circuits_harmonic_foil/CMakeLists.txt b/fem/tests/circuits_harmonic_foil/CMakeLists.txt index d24cd3ee91..cf1e9d3e06 100644 --- a/fem/tests/circuits_harmonic_foil/CMakeLists.txt +++ b/fem/tests/circuits_harmonic_foil/CMakeLists.txt @@ -1,8 +1,13 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(sif/6459.sif sif/6459.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -file(COPY sif/6459-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") -file(COPY 6459/mesh.boundary 6459/mesh.header 6459/mesh.nodes 6459/mesh.elements 6459/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6459") -file(COPY 6459/dat/gittrack DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6459/dat") -ADD_ELMER_TEST(circuits_harmonic_foil LABELS circuits harmonic 3D mgdyn whitney) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + + CONFIGURE_FILE(sif/6459.sif sif/6459.sif COPYONLY) + + file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY sif/6459-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") + file(COPY 6459/mesh.boundary 6459/mesh.header 6459/mesh.nodes 6459/mesh.elements 6459/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6459") + file(COPY 6459/dat/gittrack DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6459/dat") + + ADD_ELMER_TEST(circuits_harmonic_foil LABELS circuits harmonic 3D mgdyn whitney) +ENDIF() diff --git a/fem/tests/circuits_harmonic_foil_anl_rotm/CMakeLists.txt b/fem/tests/circuits_harmonic_foil_anl_rotm/CMakeLists.txt index f8f6baa702..73f82d87f7 100644 --- a/fem/tests/circuits_harmonic_foil_anl_rotm/CMakeLists.txt +++ b/fem/tests/circuits_harmonic_foil_anl_rotm/CMakeLists.txt @@ -1,8 +1,13 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(sif/6459.sif sif/6459.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -file(COPY sif/6459-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") -file(COPY 6459/mesh.boundary 6459/mesh.header 6459/mesh.nodes 6459/mesh.elements 6459/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6459") -file(COPY 6459/dat/gittrack DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6459/dat") -ADD_ELMER_TEST(circuits_harmonic_foil_anl_rotm LABELS circuits harmonic 3D mgdyn whitney rotm) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + + CONFIGURE_FILE(sif/6459.sif sif/6459.sif COPYONLY) + + file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY sif/6459-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") + file(COPY 6459/mesh.boundary 6459/mesh.header 6459/mesh.nodes 6459/mesh.elements 6459/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6459") + file(COPY 6459/dat/gittrack DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6459/dat") + + ADD_ELMER_TEST(circuits_harmonic_foil_anl_rotm LABELS circuits harmonic 3D mgdyn whitney rotm) +ENDIF() diff --git a/fem/tests/circuits_harmonic_foil_wvector/CMakeLists.txt b/fem/tests/circuits_harmonic_foil_wvector/CMakeLists.txt index dd3473bc13..2c7daf9438 100644 --- a/fem/tests/circuits_harmonic_foil_wvector/CMakeLists.txt +++ b/fem/tests/circuits_harmonic_foil_wvector/CMakeLists.txt @@ -1,8 +1,13 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(sif/6459.sif sif/6459.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -file(COPY sif/6459-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") -file(COPY 6459/mesh.boundary 6459/mesh.header 6459/mesh.nodes 6459/mesh.elements 6459/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6459") -file(COPY 6459/dat/gittrack DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6459/dat") -ADD_ELMER_TEST(circuits_harmonic_foil_wvector LABELS circuits harmonic 3D mgdyn whitney wvector) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + + CONFIGURE_FILE(sif/6459.sif sif/6459.sif COPYONLY) + + file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY sif/6459-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") + file(COPY 6459/mesh.boundary 6459/mesh.header 6459/mesh.nodes 6459/mesh.elements 6459/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6459") + file(COPY 6459/dat/gittrack DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6459/dat") + + ADD_ELMER_TEST(circuits_harmonic_foil_wvector LABELS circuits harmonic 3D mgdyn whitney wvector) +ENDIF() diff --git a/fem/tests/circuits_harmonic_homogenization_coil_solver/CMakeLists.txt b/fem/tests/circuits_harmonic_homogenization_coil_solver/CMakeLists.txt index 95254a22db..5912f0b1d1 100644 --- a/fem/tests/circuits_harmonic_homogenization_coil_solver/CMakeLists.txt +++ b/fem/tests/circuits_harmonic_homogenization_coil_solver/CMakeLists.txt @@ -1,7 +1,12 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(sif/2241.sif sif/2241.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -file(COPY sif/2241-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") -file(COPY 2241/mesh.boundary 2241/mesh.header 2241/mesh.nodes 2241/mesh.elements 2241/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/2241") -ADD_ELMER_TEST(circuits_harmonic_homogenization_coil_solver LABELS 3D circuits harmonic homogenization stranded mgdyn whitney) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + + CONFIGURE_FILE(sif/2241.sif sif/2241.sif COPYONLY) + + file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY sif/2241-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") + file(COPY 2241/mesh.boundary 2241/mesh.header 2241/mesh.nodes 2241/mesh.elements 2241/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/2241") + + ADD_ELMER_TEST(circuits_harmonic_homogenization_coil_solver LABELS 3D circuits harmonic homogenization stranded mgdyn whitney) +ENDIF() diff --git a/fem/tests/circuits_harmonic_massive/CMakeLists.txt b/fem/tests/circuits_harmonic_massive/CMakeLists.txt index 644e0b7b5d..8641c958de 100644 --- a/fem/tests/circuits_harmonic_massive/CMakeLists.txt +++ b/fem/tests/circuits_harmonic_massive/CMakeLists.txt @@ -1,8 +1,12 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(sif/1962.sif sif/1962.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -file(COPY sif/1962-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") -file(COPY 1962/mesh.boundary 1962/mesh.header 1962/mesh.nodes 1962/mesh.elements 1962/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1962") -ADD_ELMER_TEST(circuits_harmonic_massive LABELS circuits harmonic 3D mgdyn whitney) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + CONFIGURE_FILE(sif/1962.sif sif/1962.sif COPYONLY) + + file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY sif/1962-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") + file(COPY 1962/mesh.boundary 1962/mesh.header 1962/mesh.nodes 1962/mesh.elements 1962/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/1962") + + ADD_ELMER_TEST(circuits_harmonic_massive LABELS circuits harmonic 3D mgdyn whitney) +ENDIF() diff --git a/fem/tests/circuits_harmonic_stranded/CMakeLists.txt b/fem/tests/circuits_harmonic_stranded/CMakeLists.txt index b8f9dfb907..241278147f 100644 --- a/fem/tests/circuits_harmonic_stranded/CMakeLists.txt +++ b/fem/tests/circuits_harmonic_stranded/CMakeLists.txt @@ -1,8 +1,12 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(sif/2241.sif sif/2241.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -file(COPY sif/2241-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") -file(COPY 2241/mesh.boundary 2241/mesh.header 2241/mesh.nodes 2241/mesh.elements 2241/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/2241") -ADD_ELMER_TEST(circuits_harmonic_stranded LABELS circuits harmonic 3D mgdyn whitney) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + CONFIGURE_FILE(sif/2241.sif sif/2241.sif COPYONLY) + + file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY sif/2241-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") + file(COPY 2241/mesh.boundary 2241/mesh.header 2241/mesh.nodes 2241/mesh.elements 2241/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/2241") + + ADD_ELMER_TEST(circuits_harmonic_stranded LABELS circuits harmonic 3D mgdyn whitney) +ENDIF() diff --git a/fem/tests/circuits_harmonic_stranded_homogenization/CMakeLists.txt b/fem/tests/circuits_harmonic_stranded_homogenization/CMakeLists.txt index ae6bfbfbf7..293b1d906c 100644 --- a/fem/tests/circuits_harmonic_stranded_homogenization/CMakeLists.txt +++ b/fem/tests/circuits_harmonic_stranded_homogenization/CMakeLists.txt @@ -1,8 +1,12 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(sif/2241.sif sif/2241.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -file(COPY sif/2241-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") -file(COPY 2241/mesh.boundary 2241/mesh.header 2241/mesh.nodes 2241/mesh.elements 2241/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/2241") -ADD_ELMER_TEST(circuits_harmonic_stranded_homogenization LABELS 3D circuits harmonic homogenization stranded mgdyn whitney) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + CONFIGURE_FILE(sif/2241.sif sif/2241.sif COPYONLY) + + file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY sif/2241-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") + file(COPY 2241/mesh.boundary 2241/mesh.header 2241/mesh.nodes 2241/mesh.elements 2241/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/2241") + + ADD_ELMER_TEST(circuits_harmonic_stranded_homogenization LABELS 3D circuits harmonic homogenization stranded mgdyn whitney) +ENDIF() diff --git a/fem/tests/circuits_transient_stranded_full_coil/CMakeLists.txt b/fem/tests/circuits_transient_stranded_full_coil/CMakeLists.txt index 1036bdd2ed..1cfeeba1b2 100644 --- a/fem/tests/circuits_transient_stranded_full_coil/CMakeLists.txt +++ b/fem/tests/circuits_transient_stranded_full_coil/CMakeLists.txt @@ -1,8 +1,13 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(sif/coil.sif sif/coil.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -file(COPY sif/coil-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") -file(COPY coil/mesh.boundary coil/mesh.header coil/mesh.nodes coil/mesh.elements coil/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/coil") -file(COPY res/dat/gittrack DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/res/dat") -ADD_ELMER_TEST(circuits_transient_stranded_full_coil LABELS 3D transient circuits stranded mgdyn whitney) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + + CONFIGURE_FILE(sif/coil.sif sif/coil.sif COPYONLY) + + file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY sif/coil-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") + file(COPY coil/mesh.boundary coil/mesh.header coil/mesh.nodes coil/mesh.elements coil/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/coil") + file(COPY res/dat/gittrack DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/res/dat") + + ADD_ELMER_TEST(circuits_transient_stranded_full_coil LABELS 3D transient circuits stranded mgdyn whitney) +ENDIF() diff --git a/fem/tests/current/CMakeLists.txt b/fem/tests/current/CMakeLists.txt index 8cd5c11107..92a5e6a565 100644 --- a/fem/tests/current/CMakeLists.txt +++ b/fem/tests/current/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( stat_curr.sif stat_curr.sif COPYONLY) + CONFIGURE_FILE( stat_curr.sif stat_curr.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO Step Step.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO Step Step.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(current) -ADD_ELMER_LABEL(current quick) + ADD_ELMER_TEST(current LABELS quick) +ENDIF() diff --git a/fem/tests/current_heat_control/CMakeLists.txt b/fem/tests/current_heat_control/CMakeLists.txt index fd58f9bc90..103077e24e 100644 --- a/fem/tests/current_heat_control/CMakeLists.txt +++ b/fem/tests/current_heat_control/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO Step.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO Step.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(current_heat_control) -ADD_ELMER_LABEL(current_heat_control quick) + ADD_ELMER_TEST(current_heat_control LABELS quick) +ENDIF() diff --git a/fem/tests/diffuser_v2f/CMakeLists.txt b/fem/tests/diffuser_v2f/CMakeLists.txt index 3b7da9c7f5..4933af7328 100644 --- a/fem/tests/diffuser_v2f/CMakeLists.txt +++ b/fem/tests/diffuser_v2f/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( diffuser_v2f.sif diffuser_v2f.sif COPYONLY) + CONFIGURE_FILE( diffuser_v2f.sif diffuser_v2f.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO diffuser.grd diffuser DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO diffuser.grd diffuser DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(diffuser_v2f) -ADD_ELMER_LABEL(diffuser_v2f benchmark) + ADD_ELMER_TEST(diffuser_v2f LABELS benchmark) +ENDIF() diff --git a/fem/tests/elstat_source/CMakeLists.txt b/fem/tests/elstat_source/CMakeLists.txt index 1d0d9b2ac5..b2f39b848a 100644 --- a/fem/tests/elstat_source/CMakeLists.txt +++ b/fem/tests/elstat_source/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( elstat_s.sif elstat_s.sif COPYONLY) + CONFIGURE_FILE( elstat_s.sif elstat_s.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO Step.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO Step.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(elstat_source) -ADD_ELMER_LABEL(elstat_source quick) + ADD_ELMER_TEST(elstat_source LABELS quick) +ENDIF() diff --git a/fem/tests/freesurf_axi/CMakeLists.txt b/fem/tests/freesurf_axi/CMakeLists.txt index cd65227bb0..57fed46088 100644 --- a/fem/tests/freesurf_axi/CMakeLists.txt +++ b/fem/tests/freesurf_axi/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( Free.sif Free.sif COPYONLY) + CONFIGURE_FILE( Free.sif Free.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO Free.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO Free.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(freesurf_axi) + ADD_ELMER_TEST(freesurf_axi) +ENDIF() diff --git a/fem/tests/freesurf_int/CMakeLists.txt b/fem/tests/freesurf_int/CMakeLists.txt index 71e8c60b12..36eac1a168 100644 --- a/fem/tests/freesurf_int/CMakeLists.txt +++ b/fem/tests/freesurf_int/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( Free.sif Free.sif COPYONLY) + CONFIGURE_FILE( Free.sif Free.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO MESHDIR DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO MESHDIR DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(freesurf_int) -ADD_ELMER_LABEL(freesurf_int quick) + ADD_ELMER_TEST(freesurf_int LABELS quick) +ENDIF() diff --git a/fem/tests/fsi_beam_optimize/CMakeLists.txt b/fem/tests/fsi_beam_optimize/CMakeLists.txt index 9a49cf8e42..c13c1d8e62 100644 --- a/fem/tests/fsi_beam_optimize/CMakeLists.txt +++ b/fem/tests/fsi_beam_optimize/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) -ADD_ELMERTEST_MODULE(fsi_beam_optimize WallProfiles WallProfiles.f90) + CONFIGURE_FILE( case.sif case.sif COPYONLY) + ADD_ELMERTEST_MODULE(fsi_beam_optimize WallProfiles WallProfiles.f90) -file(COPY beam_channel.in2d ELMERSOLVER_STARTINFO case_b.best0 WallProfiles.f90 mesh DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY beam_channel.in2d ELMERSOLVER_STARTINFO case_b.best0 WallProfiles.f90 mesh DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(fsi_beam_optimize LABELS elasticsolve fsi control) + ADD_ELMER_TEST(fsi_beam_optimize LABELS elasticsolve fsi control) +ENDIF() diff --git a/fem/tests/fsi_box/CMakeLists.txt b/fem/tests/fsi_box/CMakeLists.txt index 30160688ec..0c6af5d223 100644 --- a/fem/tests/fsi_box/CMakeLists.txt +++ b/fem/tests/fsi_box/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( box.sif box.sif COPYONLY) + CONFIGURE_FILE( box.sif box.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO box.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO box.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(fsi_box LABELS elasticsolve transient fsi) + ADD_ELMER_TEST(fsi_box LABELS elasticsolve transient fsi) +ENDIF() diff --git a/fem/tests/fsi_box2/CMakeLists.txt b/fem/tests/fsi_box2/CMakeLists.txt index 7b2bf2495a..659e75325a 100644 --- a/fem/tests/fsi_box2/CMakeLists.txt +++ b/fem/tests/fsi_box2/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( box.sif box.sif COPYONLY) + CONFIGURE_FILE( box.sif box.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO ac.result box.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO ac.result box.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(fsi_box2 LABELS elasticsolve fsi restart) + ADD_ELMER_TEST(fsi_box2 LABELS elasticsolve fsi restart) +ENDIF() diff --git a/fem/tests/heateq_bdf2/CMakeLists.txt b/fem/tests/heateq_bdf2/CMakeLists.txt index 0a13af1abc..5aad35b3da 100644 --- a/fem/tests/heateq_bdf2/CMakeLists.txt +++ b/fem/tests/heateq_bdf2/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( TempDist.sif TempDist.sif COPYONLY) + CONFIGURE_FILE( TempDist.sif TempDist.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(heateq_bdf2 LABELS quick transient) + ADD_ELMER_TEST(heateq_bdf2 LABELS quick transient) +ENDIF() diff --git a/fem/tests/heateq_bdf3/CMakeLists.txt b/fem/tests/heateq_bdf3/CMakeLists.txt index 393059e174..052b06ee2b 100644 --- a/fem/tests/heateq_bdf3/CMakeLists.txt +++ b/fem/tests/heateq_bdf3/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( TempDist.sif TempDist.sif COPYONLY) + CONFIGURE_FILE( TempDist.sif TempDist.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(heateq_bdf3 LABELS quick transient) + ADD_ELMER_TEST(heateq_bdf3 LABELS quick transient) +ENDIF() diff --git a/fem/tests/heateq_newmark/CMakeLists.txt b/fem/tests/heateq_newmark/CMakeLists.txt index c3c085f4d8..e5120a8e0d 100644 --- a/fem/tests/heateq_newmark/CMakeLists.txt +++ b/fem/tests/heateq_newmark/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( TempDist.sif TempDist.sif COPYONLY) + CONFIGURE_FILE( TempDist.sif TempDist.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(heateq_newmark LABELS quick transient) + ADD_ELMER_TEST(heateq_newmark LABELS quick transient) +ENDIF() diff --git a/fem/tests/heateq_newmark_global/CMakeLists.txt b/fem/tests/heateq_newmark_global/CMakeLists.txt index 1f32c73496..6e65ce6e88 100644 --- a/fem/tests/heateq_newmark_global/CMakeLists.txt +++ b/fem/tests/heateq_newmark_global/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( TempDist.sif TempDist.sif COPYONLY) + CONFIGURE_FILE( TempDist.sif TempDist.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(heateq_newmark_global) -ADD_ELMER_LABEL(heateq_newmark_global quick) + ADD_ELMER_TEST(heateq_newmark_global LABELS quick) +ENDIF() diff --git a/fem/tests/heateq_spline_table/CMakeLists.txt b/fem/tests/heateq_spline_table/CMakeLists.txt index ae4fc5a971..68a675ea75 100644 --- a/fem/tests/heateq_spline_table/CMakeLists.txt +++ b/fem/tests/heateq_spline_table/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( TempDist.sif TempDist.sif COPYONLY) + CONFIGURE_FILE( TempDist.sif TempDist.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO cond.dat angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO cond.dat angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(heateq_spline_table) -ADD_ELMER_LABEL(heateq_spline_table quick) + ADD_ELMER_TEST(heateq_spline_table LABELS quick) +ENDIF() diff --git a/fem/tests/heateq_steady_start/CMakeLists.txt b/fem/tests/heateq_steady_start/CMakeLists.txt index 28f787c864..1d2a2f1c8f 100644 --- a/fem/tests/heateq_steady_start/CMakeLists.txt +++ b/fem/tests/heateq_steady_start/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( TempDist.sif TempDist.sif COPYONLY) + CONFIGURE_FILE( TempDist.sif TempDist.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO angle.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(heateq_steady_start) -ADD_ELMER_LABEL(heateq_steady_start quick) + ADD_ELMER_TEST(heateq_steady_start LABELS quick) +ENDIF() diff --git a/fem/tests/levelset1/CMakeLists.txt b/fem/tests/levelset1/CMakeLists.txt index 374731212d..d8ec584429 100644 --- a/fem/tests/levelset1/CMakeLists.txt +++ b/fem/tests/levelset1/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( round.sif round.sif COPYONLY) -ADD_ELMERTEST_MODULE(levelset1 InitSquare InitSquare.f90) + CONFIGURE_FILE( round.sif round.sif COPYONLY) + ADD_ELMERTEST_MODULE(levelset1 InitSquare InitSquare.f90) -file(COPY square.grd ELMERSOLVER_STARTINFO InitSquare.f90 DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY square.grd ELMERSOLVER_STARTINFO InitSquare.f90 DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(levelset1 LABELS transient) + ADD_ELMER_TEST(levelset1 LABELS transient) +ENDIF() diff --git a/fem/tests/levelset2/CMakeLists.txt b/fem/tests/levelset2/CMakeLists.txt index 99b746b054..8377541a74 100644 --- a/fem/tests/levelset2/CMakeLists.txt +++ b/fem/tests/levelset2/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( fill.sif fill.sif COPYONLY) -ADD_ELMERTEST_MODULE(levelset2 MyStuff MyStuff.f90) + CONFIGURE_FILE( fill.sif fill.sif COPYONLY) + ADD_ELMERTEST_MODULE(levelset2 MyStuff MyStuff.f90) -file(COPY ELMERSOLVER_STARTINFO MyStuff.f90 fill.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO MyStuff.f90 fill.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(levelset2) + ADD_ELMER_TEST(levelset2) +ENDIF() diff --git a/fem/tests/levelset3/CMakeLists.txt b/fem/tests/levelset3/CMakeLists.txt index c9d506608c..4ba49d37b2 100644 --- a/fem/tests/levelset3/CMakeLists.txt +++ b/fem/tests/levelset3/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO beam.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO beam.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(levelset3 LABELS matc particle) + ADD_ELMER_TEST(levelset3 LABELS matc particle) +ENDIF() diff --git a/fem/tests/levelset3b/CMakeLists.txt b/fem/tests/levelset3b/CMakeLists.txt index 5e7848ef85..0118aaba7c 100644 --- a/fem/tests/levelset3b/CMakeLists.txt +++ b/fem/tests/levelset3b/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO beam.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO beam.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(levelset3b) -ADD_ELMER_LABEL(levelset3b benchmark) + ADD_ELMER_TEST(levelset3b LABELS benchmark) +ENDIF() diff --git a/fem/tests/linearsolvers/CMakeLists.txt b/fem/tests/linearsolvers/CMakeLists.txt index 206472acb8..7f6ece41d9 100644 --- a/fem/tests/linearsolvers/CMakeLists.txt +++ b/fem/tests/linearsolvers/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( TempDist.sif TempDist.sif COPYONLY) + CONFIGURE_FILE( TempDist.sif TempDist.sif COPYONLY) -file(COPY Mesh ELMERSOLVER_STARTINFO Mesh1.mif DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY Mesh ELMERSOLVER_STARTINFO Mesh1.mif DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(linearsolvers) -ADD_ELMER_LABEL(linearsolvers quick) + ADD_ELMER_TEST(linearsolvers LABELS quick) +ENDIF() diff --git a/fem/tests/linearsolvers_cmplx/CMakeLists.txt b/fem/tests/linearsolvers_cmplx/CMakeLists.txt index 1513e9158a..732a7b9f6a 100644 --- a/fem/tests/linearsolvers_cmplx/CMakeLists.txt +++ b/fem/tests/linearsolvers_cmplx/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( HelmholtzFEM.sif HelmholtzFEM.sif COPYONLY) + CONFIGURE_FILE( HelmholtzFEM.sif HelmholtzFEM.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO CircleInBox.mif MeshFiles DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO CircleInBox.mif MeshFiles DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(linearsolvers_cmplx LABELS quick) + ADD_ELMER_TEST(linearsolvers_cmplx LABELS quick) +ENDIF() diff --git a/fem/tests/mgdyn2D_compute_average_b/CMakeLists.txt b/fem/tests/mgdyn2D_compute_average_b/CMakeLists.txt index ba2de7c1aa..feee2c89b3 100644 --- a/fem/tests/mgdyn2D_compute_average_b/CMakeLists.txt +++ b/fem/tests/mgdyn2D_compute_average_b/CMakeLists.txt @@ -1,12 +1,13 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(sif/6801.sif sif/6801.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -file(COPY sif/6801-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") -file(COPY 6801/mesh.boundary 6801/mesh.header 6801/mesh.nodes 6801/mesh.elements 6801/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6801") -file(COPY 6801/dat/gittrack DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6801/dat") -ADD_ELMER_TEST(mgdyn2D_compute_average_b) -ADD_ELMER_LABEL(mgdyn2D_compute_average_b mgdyn) -ADD_ELMER_LABEL(mgdyn2D_compute_average_b 2D) -ADD_ELMER_LABEL(mgdyn2D_compute_average_b harmonic) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + CONFIGURE_FILE(sif/6801.sif sif/6801.sif COPYONLY) + + file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY sif/6801-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") + file(COPY 6801/mesh.boundary 6801/mesh.header 6801/mesh.nodes 6801/mesh.elements 6801/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6801") + file(COPY 6801/dat/gittrack DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6801/dat") + + ADD_ELMER_TEST(mgdyn2D_compute_average_b LABELS mgdyn 2D harmonic) +ENDIF() diff --git a/fem/tests/mgdyn2D_compute_bodycurrent/CMakeLists.txt b/fem/tests/mgdyn2D_compute_bodycurrent/CMakeLists.txt index 74fe70fbdf..12b42e7e02 100644 --- a/fem/tests/mgdyn2D_compute_bodycurrent/CMakeLists.txt +++ b/fem/tests/mgdyn2D_compute_bodycurrent/CMakeLists.txt @@ -1,12 +1,13 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(sif/6801.sif sif/6801.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -file(COPY sif/6801-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") -file(COPY 6801/mesh.boundary 6801/mesh.header 6801/mesh.nodes 6801/mesh.elements 6801/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6801") -file(COPY 6801/dat/gittrack DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6801/dat") -ADD_ELMER_TEST(mgdyn2D_compute_bodycurrent) -ADD_ELMER_LABEL(mgdyn2D_compute_bodycurrent mgdyn) -ADD_ELMER_LABEL(mgdyn2D_compute_bodycurrent 2D) -ADD_ELMER_LABEL(mgdyn2D_compute_bodycurrent harmonic) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + CONFIGURE_FILE(sif/6801.sif sif/6801.sif COPYONLY) + + file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY sif/6801-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") + file(COPY 6801/mesh.boundary 6801/mesh.header 6801/mesh.nodes 6801/mesh.elements 6801/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6801") + file(COPY 6801/dat/gittrack DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6801/dat") + + ADD_ELMER_TEST(mgdyn2D_compute_bodycurrent LABELS mgdyn 2D harmonic) +ENDIF() diff --git a/fem/tests/mgdyn2D_compute_complex_power/CMakeLists.txt b/fem/tests/mgdyn2D_compute_complex_power/CMakeLists.txt index a6aa974991..64d86fcefe 100644 --- a/fem/tests/mgdyn2D_compute_complex_power/CMakeLists.txt +++ b/fem/tests/mgdyn2D_compute_complex_power/CMakeLists.txt @@ -1,12 +1,13 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(sif/6801.sif sif/6801.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -file(COPY sif/6801-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") -file(COPY 6801/mesh.boundary 6801/mesh.header 6801/mesh.nodes 6801/mesh.elements 6801/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6801") -file(COPY 6801/dat/gittrack DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6801/dat") -ADD_ELMER_TEST(mgdyn2D_compute_complex_power) -ADD_ELMER_LABEL(mgdyn2D_compute_complex_power mgdyn) -ADD_ELMER_LABEL(mgdyn2D_compute_complex_power 2D) -ADD_ELMER_LABEL(mgdyn2D_compute_complex_power harmonic) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + CONFIGURE_FILE(sif/6801.sif sif/6801.sif COPYONLY) + + file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY sif/6801-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") + file(COPY 6801/mesh.boundary 6801/mesh.header 6801/mesh.nodes 6801/mesh.elements 6801/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6801") + file(COPY 6801/dat/gittrack DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6801/dat") + + ADD_ELMER_TEST(mgdyn2D_compute_complex_power LABELS mgdyn 2D harmonic) +ENDIF() diff --git a/fem/tests/mgdyn2D_pm/CMakeLists.txt b/fem/tests/mgdyn2D_pm/CMakeLists.txt index e5799f9751..a2fd616fbe 100644 --- a/fem/tests/mgdyn2D_pm/CMakeLists.txt +++ b/fem/tests/mgdyn2D_pm/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( ptest.sif ptest.sif COPYONLY) + CONFIGURE_FILE( ptest.sif ptest.sif COPYONLY) -file(COPY square.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY square.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(mgdyn2D_pm) -ADD_ELMER_LABEL(mgdyn2D_pm quick) + ADD_ELMER_TEST(mgdyn2D_pm LABELS quick) +ENDIF() diff --git a/fem/tests/mgdyn2D_scan_homogenization_elementary_solutions/CMakeLists.txt b/fem/tests/mgdyn2D_scan_homogenization_elementary_solutions/CMakeLists.txt index b2ec592e41..3e5fa12618 100644 --- a/fem/tests/mgdyn2D_scan_homogenization_elementary_solutions/CMakeLists.txt +++ b/fem/tests/mgdyn2D_scan_homogenization_elementary_solutions/CMakeLists.txt @@ -1,13 +1,13 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(sif/6801.sif sif/6801.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -file(COPY sif/6801-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") -file(COPY 6801/mesh.boundary 6801/mesh.header 6801/mesh.nodes 6801/mesh.elements 6801/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6801") -file(COPY 6801/dat/gittrack DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6801/dat") -ADD_ELMER_TEST(mgdyn2D_scan_homogenization_elementary_solutions) -ADD_ELMER_LABEL(mgdyn2D_scan_homogenization_elementary_solutions mgdyn) -ADD_ELMER_LABEL(mgdyn2D_scan_homogenization_elementary_solutions 2D) -ADD_ELMER_LABEL(mgdyn2D_scan_homogenization_elementary_solutions harmonic) -ADD_ELMER_LABEL(mgdyn2D_scan_homogenization_elementary_solutions scanning) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + CONFIGURE_FILE(sif/6801.sif sif/6801.sif COPYONLY) + + file(COPY ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY sif/6801-circuits.definitions DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/sif") + file(COPY 6801/mesh.boundary 6801/mesh.header 6801/mesh.nodes 6801/mesh.elements 6801/mesh.names DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6801") + file(COPY 6801/dat/gittrack DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/6801/dat") + + ADD_ELMER_TEST(mgdyn2D_scan_homogenization_elementary_solutions LABELS mgdyn 2D harmonic scanning) +ENDIF() diff --git a/fem/tests/mgdyn_harmonic_wire_impedanceBC_circuit/CMakeLists.txt b/fem/tests/mgdyn_harmonic_wire_impedanceBC_circuit/CMakeLists.txt index 4b3c45685a..c0e09c4ef8 100644 --- a/fem/tests/mgdyn_harmonic_wire_impedanceBC_circuit/CMakeLists.txt +++ b/fem/tests/mgdyn_harmonic_wire_impedanceBC_circuit/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(IBC_circuit.sif IBC_circuit.sif COPYONLY) + CONFIGURE_FILE(IBC_circuit.sif IBC_circuit.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO wire.grd circuit.definition DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO wire.grd circuit.definition DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(mgdyn_harmonic_wire_impedanceBC_circuit LABELS whitney) + ADD_ELMER_TEST(mgdyn_harmonic_wire_impedanceBC_circuit LABELS whitney) +ENDIF() diff --git a/fem/tests/mhd/CMakeLists.txt b/fem/tests/mhd/CMakeLists.txt index 00b343fa50..9416a8bd33 100644 --- a/fem/tests/mhd/CMakeLists.txt +++ b/fem/tests/mhd/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( mhd.sif mhd.sif COPYONLY) -ADD_ELMERTEST_MODULE(mhd exmag exmag.f90) + CONFIGURE_FILE( mhd.sif mhd.sif COPYONLY) + ADD_ELMERTEST_MODULE(mhd exmag exmag.f90) -file(COPY ELMERSOLVER_STARTINFO mesh.grd exmag.f90 DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO mesh.grd exmag.f90 DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(mhd LABELS transient) + ADD_ELMER_TEST(mhd LABELS transient) +ENDIF() diff --git a/fem/tests/mhd2/CMakeLists.txt b/fem/tests/mhd2/CMakeLists.txt index 61c824cdad..98d4cbe2e4 100644 --- a/fem/tests/mhd2/CMakeLists.txt +++ b/fem/tests/mhd2/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( mhd2.sif mhd2.sif COPYONLY) + CONFIGURE_FILE( mhd2.sif mhd2.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO mesh.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO mesh.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(mhd2) + ADD_ELMER_TEST(mhd2) +ENDIF() diff --git a/fem/tests/multimesh/CMakeLists.txt b/fem/tests/multimesh/CMakeLists.txt index 52cd1fec1c..a78f36d439 100644 --- a/fem/tests/multimesh/CMakeLists.txt +++ b/fem/tests/multimesh/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( multimesh.sif multimesh.sif COPYONLY) + CONFIGURE_FILE( multimesh.sif multimesh.sif COPYONLY) -file(COPY global.grd ELMERSOLVER_STARTINFO reference.grd local.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY global.grd ELMERSOLVER_STARTINFO reference.grd local.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(multimesh LABELS quick) + ADD_ELMER_TEST(multimesh LABELS quick) +ENDIF() diff --git a/fem/tests/periodic_normal/CMakeLists.txt b/fem/tests/periodic_normal/CMakeLists.txt index 10eb2fe67f..34a1b0a3c1 100644 --- a/fem/tests/periodic_normal/CMakeLists.txt +++ b/fem/tests/periodic_normal/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO sinus.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO sinus.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(periodic_normal LABELS n-t) + ADD_ELMER_TEST(periodic_normal LABELS n-t) +ENDIF() diff --git a/fem/tests/periodic_rot/CMakeLists.txt b/fem/tests/periodic_rot/CMakeLists.txt index cab63d3436..53c0c47a4f 100644 --- a/fem/tests/periodic_rot/CMakeLists.txt +++ b/fem/tests/periodic_rot/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY mesh.elements mesh.nodes ELMERSOLVER_STARTINFO mesh.header egproject.xml angle.grd mesh.boundary DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY mesh.elements mesh.nodes ELMERSOLVER_STARTINFO mesh.header egproject.xml angle.grd mesh.boundary DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(periodic_rot LABELS quick n-t) + ADD_ELMER_TEST(periodic_rot LABELS quick n-t) +ENDIF() diff --git a/fem/tests/piezo/CMakeLists.txt b/fem/tests/piezo/CMakeLists.txt index cb78211e6c..b600494656 100644 --- a/fem/tests/piezo/CMakeLists.txt +++ b/fem/tests/piezo/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( piezo.sif piezo.sif COPYONLY) + CONFIGURE_FILE( piezo.sif piezo.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO beam.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO beam.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(piezo) -ADD_ELMER_LABEL(piezo quick) + ADD_ELMER_TEST(piezo LABELS quick) +ENDIF() diff --git a/fem/tests/pmultg/CMakeLists.txt b/fem/tests/pmultg/CMakeLists.txt index e7fc839507..951e7de0bc 100644 --- a/fem/tests/pmultg/CMakeLists.txt +++ b/fem/tests/pmultg/CMakeLists.txt @@ -1,9 +1,11 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( TempDist.sif TempDist.sif COPYONLY) -ADD_ELMERTEST_MODULE(pmultg Poisson Poisson.f90) + CONFIGURE_FILE( TempDist.sif TempDist.sif COPYONLY) + ADD_ELMERTEST_MODULE(pmultg Poisson Poisson.f90) -file(COPY Poisson.f90 square.grd ELMERSOLVER_STARTINFO square DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY Poisson.f90 square.grd ELMERSOLVER_STARTINFO square DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(pmultg) + ADD_ELMER_TEST(pmultg) +ENDIF() diff --git a/fem/tests/pointdir/CMakeLists.txt b/fem/tests/pointdir/CMakeLists.txt index e590f35efd..4cd672afe9 100644 --- a/fem/tests/pointdir/CMakeLists.txt +++ b/fem/tests/pointdir/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( test.sif test.sif COPYONLY) + CONFIGURE_FILE( test.sif test.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO test.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO test.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(pointdir) -ADD_ELMER_LABEL(pointdir quick) + ADD_ELMER_TEST(pointdir LABELS quick) +ENDIF() diff --git a/fem/tests/pointload2/CMakeLists.txt b/fem/tests/pointload2/CMakeLists.txt index 7a0d04a4c3..172e087980 100644 --- a/fem/tests/pointload2/CMakeLists.txt +++ b/fem/tests/pointload2/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY square.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY square.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(pointload2) + ADD_ELMER_TEST(pointload2) +ENDIF() diff --git a/fem/tests/radiation/CMakeLists.txt b/fem/tests/radiation/CMakeLists.txt index 0f43aba169..a7778008e5 100644 --- a/fem/tests/radiation/CMakeLists.txt +++ b/fem/tests/radiation/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( radiation.sif radiation.sif COPYONLY) + CONFIGURE_FILE( radiation.sif radiation.sif COPYONLY) -file(COPY radiation.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY radiation.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(radiation) -ADD_ELMER_LABEL(radiation quick) + ADD_ELMER_TEST(radiation LABELS quick) +ENDIF() diff --git a/fem/tests/radiation2d/CMakeLists.txt b/fem/tests/radiation2d/CMakeLists.txt index 5e21aff967..ee22d7bdad 100644 --- a/fem/tests/radiation2d/CMakeLists.txt +++ b/fem/tests/radiation2d/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( radiation.sif radiation.sif COPYONLY) + CONFIGURE_FILE( radiation.sif radiation.sif COPYONLY) -file(COPY radiation.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY radiation.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(radiation2d) + ADD_ELMER_TEST(radiation2d) +ENDIF() diff --git a/fem/tests/radiation2dAA/CMakeLists.txt b/fem/tests/radiation2dAA/CMakeLists.txt index 6321245f33..b903fd1d77 100644 --- a/fem/tests/radiation2dAA/CMakeLists.txt +++ b/fem/tests/radiation2dAA/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(radiation.sif radiation.sif COPYONLY) + CONFIGURE_FILE(radiation.sif radiation.sif COPYONLY) -file(COPY radiation.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY radiation.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(radiation2dAA) + ADD_ELMER_TEST(radiation2dAA) +ENDIF() diff --git a/fem/tests/radiation2d_deform/CMakeLists.txt b/fem/tests/radiation2d_deform/CMakeLists.txt index 7e8c24eda0..176c39bf5f 100644 --- a/fem/tests/radiation2d_deform/CMakeLists.txt +++ b/fem/tests/radiation2d_deform/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( radiation.sif radiation.sif COPYONLY) + CONFIGURE_FILE( radiation.sif radiation.sif COPYONLY) -file(COPY radiation.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY radiation.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(radiation2d_deform) + ADD_ELMER_TEST(radiation2d_deform) +ENDIF() diff --git a/fem/tests/radiation2dsymm/CMakeLists.txt b/fem/tests/radiation2dsymm/CMakeLists.txt index a8cd1cab17..6b2dd822a4 100644 --- a/fem/tests/radiation2dsymm/CMakeLists.txt +++ b/fem/tests/radiation2dsymm/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( radiation.sif radiation.sif COPYONLY) + CONFIGURE_FILE( radiation.sif radiation.sif COPYONLY) -file(COPY radiation.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY radiation.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(radiation2dsymm) + ADD_ELMER_TEST(radiation2dsymm) +ENDIF() diff --git a/fem/tests/radiation3d/CMakeLists.txt b/fem/tests/radiation3d/CMakeLists.txt index 2f9ed0bd3c..71fd273049 100644 --- a/fem/tests/radiation3d/CMakeLists.txt +++ b/fem/tests/radiation3d/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( radiation.sif radiation.sif COPYONLY) + CONFIGURE_FILE( radiation.sif radiation.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO radiation DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO radiation DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(radiation3d) + ADD_ELMER_TEST(radiation3d) +ENDIF() diff --git a/fem/tests/radiation_bin/CMakeLists.txt b/fem/tests/radiation_bin/CMakeLists.txt index a75ba941a2..aeccdbb05d 100644 --- a/fem/tests/radiation_bin/CMakeLists.txt +++ b/fem/tests/radiation_bin/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( radiation.sif radiation.sif COPYONLY) + CONFIGURE_FILE( radiation.sif radiation.sif COPYONLY) -file(COPY radiation.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY radiation.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(radiation_bin LABELS quick) + ADD_ELMER_TEST(radiation_bin LABELS quick) +ENDIF() diff --git a/fem/tests/reload/CMakeLists.txt b/fem/tests/reload/CMakeLists.txt index 6b9f6ce7ec..1cd20a1b89 100644 --- a/fem/tests/reload/CMakeLists.txt +++ b/fem/tests/reload/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( ad.sif ad.sif COPYONLY) + CONFIGURE_FILE( ad.sif ad.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO Step.grd flow.dat.pos flow.dat DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO Step.grd flow.dat.pos flow.dat DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(reload) -ADD_ELMER_LABEL(reload quick) + ADD_ELMER_TEST(reload LABELS quick) +ENDIF() diff --git a/fem/tests/stress/CMakeLists.txt b/fem/tests/stress/CMakeLists.txt index 7017bb4891..161ca45a51 100644 --- a/fem/tests/stress/CMakeLists.txt +++ b/fem/tests/stress/CMakeLists.txt @@ -1,9 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( esim1.sif esim1.sif COPYONLY) + CONFIGURE_FILE( esim1.sif esim1.sif COPYONLY) -file(COPY verkko.gid ELMERSOLVER_STARTINFO shape_disp.src true_disp.src DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY verkko.gid ELMERSOLVER_STARTINFO shape_disp.src true_disp.src DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(stress) -ADD_ELMER_LABEL(stress quick) + ADD_ELMER_TEST(stress LABELS quick) +ENDIF() diff --git a/fem/tests/structmap4/CMakeLists.txt b/fem/tests/structmap4/CMakeLists.txt index 5f61aae412..befd7dd930 100644 --- a/fem/tests/structmap4/CMakeLists.txt +++ b/fem/tests/structmap4/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO layers.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO layers.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(structmap4 LABELS quick useextrude) + ADD_ELMER_TEST(structmap4 LABELS quick useextrude) +ENDIF() diff --git a/fem/tests/structmap5/CMakeLists.txt b/fem/tests/structmap5/CMakeLists.txt index 57455f3992..a2eb19e1da 100644 --- a/fem/tests/structmap5/CMakeLists.txt +++ b/fem/tests/structmap5/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO layers.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO layers.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(structmap5 LABELS quick useextrude) + ADD_ELMER_TEST(structmap5 LABELS quick useextrude) +ENDIF() diff --git a/fem/tests/structmap6/CMakeLists.txt b/fem/tests/structmap6/CMakeLists.txt index 1951034066..b08b542d83 100644 --- a/fem/tests/structmap6/CMakeLists.txt +++ b/fem/tests/structmap6/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO layers.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO layers.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(structmap6 LABELS quick useextrude) + ADD_ELMER_TEST(structmap6 LABELS quick useextrude) +ENDIF() diff --git a/fem/tests/structmap7/CMakeLists.txt b/fem/tests/structmap7/CMakeLists.txt index ebe3e54e27..60b3bb8524 100644 --- a/fem/tests/structmap7/CMakeLists.txt +++ b/fem/tests/structmap7/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO layers.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO layers.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(structmap7 LABELS quick useextrude) + ADD_ELMER_TEST(structmap7 LABELS quick useextrude) +ENDIF() diff --git a/fem/tests/structmap8/CMakeLists.txt b/fem/tests/structmap8/CMakeLists.txt index 3998e21d2f..e0d5114e7c 100644 --- a/fem/tests/structmap8/CMakeLists.txt +++ b/fem/tests/structmap8/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( case.sif case.sif COPYONLY) + CONFIGURE_FILE( case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO pilars.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO pilars.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(structmap8 LABELS quick useextrude) + ADD_ELMER_TEST(structmap8 LABELS quick useextrude) +ENDIF() diff --git a/fem/tests/structmap_multilayer/CMakeLists.txt b/fem/tests/structmap_multilayer/CMakeLists.txt index 43cb823c13..07b5afb336 100644 --- a/fem/tests/structmap_multilayer/CMakeLists.txt +++ b/fem/tests/structmap_multilayer/CMakeLists.txt @@ -1,8 +1,10 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE(case.sif case.sif COPYONLY) + CONFIGURE_FILE(case.sif case.sif COPYONLY) -file(COPY ELMERSOLVER_STARTINFO cube.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY ELMERSOLVER_STARTINFO cube.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(structmap_multilayer LABELS useextrude) + ADD_ELMER_TEST(structmap_multilayer LABELS useextrude) +ENDIF() diff --git a/fem/tests/tresca/CMakeLists.txt b/fem/tests/tresca/CMakeLists.txt index 996240bad5..b5951423cb 100644 --- a/fem/tests/tresca/CMakeLists.txt +++ b/fem/tests/tresca/CMakeLists.txt @@ -1,10 +1,12 @@ -INCLUDE(test_macros) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) +IF(HAVE_UMFPACK OR HAVE_MUMPS) + INCLUDE(test_macros) + INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) -CONFIGURE_FILE( Tresca.sif Tresca.sif COPYONLY) -ADD_ELMERTEST_MODULE(tresca Tresca Tresca.f90) + CONFIGURE_FILE( Tresca.sif Tresca.sif COPYONLY) + ADD_ELMERTEST_MODULE(tresca Tresca Tresca.f90) -file(COPY verkko.gid ELMERSOLVER_STARTINFO Tresca.f90 DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY verkko.gid ELMERSOLVER_STARTINFO Tresca.f90 DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(tresca) -ADD_ELMER_LABEL(tresca quick) + ADD_ELMER_TEST(tresca) + ADD_ELMER_LABEL(tresca quick) +ENDIF() From 1a1b1be7c4e8f6fdee5debd4f67d91e74d8eeb4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Thu, 26 Sep 2024 17:24:52 +0200 Subject: [PATCH 05/38] Fall back from UMFPACK to MUMPS in more places. --- fem/src/DirectSolve.F90 | 9 +++++++++ fem/src/VankaCreate.F90 | 22 +++++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/fem/src/DirectSolve.F90 b/fem/src/DirectSolve.F90 index ab13bc22fa..bc156a347f 100644 --- a/fem/src/DirectSolve.F90 +++ b/fem/src/DirectSolve.F90 @@ -44,6 +44,8 @@ !> if they are made available at the compilation time. !------------------------------------------------------------------------------ +#include "../config.h" + MODULE DirectSolve USE CRSMatrix @@ -2465,6 +2467,13 @@ SUBROUTINE DirectSolver( A,x,b,Solver,Free_Fact ) CALL Info('DirectSolver','Using direct method: '//Method,Level=9) +#if !defined (HAVE_UMFPACK) && defined (HAVE_MUMPS) + IF ( Method == 'umfpack' .OR. Method == 'big umfpack' ) THEN + CALL Warn( 'CheckLinearSolverOptions', 'UMFPACK solver not installed, using MUMPS instead!' ) + Method = 'mumps' + END IF +#endif + SELECT CASE(Method) CASE( 'banded', 'symmetric banded' ) IF ( .NOT. A % Complex ) THEN diff --git a/fem/src/VankaCreate.F90 b/fem/src/VankaCreate.F90 index 9ce5c0f03f..60f8807e9e 100644 --- a/fem/src/VankaCreate.F90 +++ b/fem/src/VankaCreate.F90 @@ -35,6 +35,8 @@ !> \ingroup ElmerLib !> \{ +#include "../config.h" + !------------------------------------------------------------------------------- !> Vanka preconditioning for iterative methods. !------------------------------------------------------------------------------- @@ -688,7 +690,12 @@ SUBROUTINE CircuitPrec(u,v,ipar) IF(n>0) THEN IF ( .NOT.ASSOCIATED(sv) ) THEN ALLOCATE(sv) +#if !defined (HAVE_UMFPACK) && defined (HAVE_MUMPS) + CALL Warn( 'CheckLinearSolverOptions', 'UMFPACK solver not installed, using MUMPS instead!' ) + CALL ListAddString( sv % Values, 'Linear System Direct Method', 'Mumps') +#else CALL ListAddString( sv % Values, 'Linear System Direct Method', 'Umfpack') +#endif CALL ListAddLogical( sv % Values, 'Linear System Refactorize', .FALSE.) CALL ListAddLogical( sv % Values, 'Linear System Free Factorization', .FALSE.) END IF @@ -696,7 +703,11 @@ SUBROUTINE CircuitPrec(u,v,ipar) j = ndim - A % ExtraDOFs + n IF(ANY(ABS(A % CircuitMatrix % Values)>0)) THEN +#if !defined (HAVE_UMFPACK) && defined (HAVE_MUMPS) + CALL Mumps_SolveSystem( sv, A % CircuitMatrix, u(i:j), v(i:j) ) +#else CALL Umfpack_SolveSystem( sv, A % CircuitMatrix, u(i:j), v(i:j) ) +#endif END IF END IF @@ -731,7 +742,12 @@ SUBROUTINE CircuitPrecComplex(u,v,ipar) IF(n>0) THEN IF ( .NOT.ASSOCIATED(sv) ) THEN ALLOCATE(sv) +#if !defined (HAVE_UMFPACK) && defined (HAVE_MUMPS) + CALL Warn( 'CheckLinearSolverOptions', 'UMFPACK solver not installed, using MUMPS instead!' ) + CALL ListAddString( sv % Values, 'Linear System Direct Method', 'Mumps') +#else CALL ListAddString( sv % Values, 'Linear System Direct Method', 'Umfpack') +#endif CALL ListAddLogical( sv % Values, 'Linear System Refactorize', .FALSE.) CALL ListAddLogical( sv % Values, 'Linear System Free Factorization', .FALSE.) END IF @@ -749,8 +765,12 @@ SUBROUTINE CircuitPrecComplex(u,v,ipar) j = j + 1 rv(k) = REAL(v(i+j)); rv(k+1) = AIMAG(v(i+j)) END DO - + +#if !defined (HAVE_UMFPACK) && defined (HAVE_MUMPS) + CALL Mumps_SolveSystem( sv, A % CircuitMatrix, ru, rv ) +#else CALL Umfpack_SolveSystem( sv, A % CircuitMatrix, ru, rv ) +#endif j = 0 DO k=1,n,2 From 80a8c8e9c6fb26e8f4a4c930a72d3d18013b1d1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Thu, 26 Sep 2024 17:31:26 +0200 Subject: [PATCH 06/38] Emit warning at end of configuration if building without UMFPACK nor MUMPS --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 75308512c2..f2710b4162 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -835,6 +835,10 @@ IF(HAVE_EXTOPTIM) MESSAGE(STATUS "------------------------------------------------") ENDIF(HAVE_EXTOPTIM) +IF(NOT HAVE_UMFPACK AND NOT HAVE_MUMPS) + MESSAGE(WARNING "Elmer is configured without backend for direct solvers (UMFPACK or MUMPS).\n" + "Are you sure this is intended?") +ENDIF() # Packaging From 31d3b0a609f1dd89fce8173d0f406c8e2d8bf59c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Fri, 13 Sep 2024 16:34:40 +0200 Subject: [PATCH 07/38] Optionally build with external (P)ARPACK in CI on Windows/MinGW. --- .github/workflows/build-windows-mingw.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-windows-mingw.yaml b/.github/workflows/build-windows-mingw.yaml index 6d13a576a8..f2dc306e77 100644 --- a/.github/workflows/build-windows-mingw.yaml +++ b/.github/workflows/build-windows-mingw.yaml @@ -18,7 +18,7 @@ jobs: runs-on: windows-latest - name: MSYS2 (${{ matrix.umfpack }} UMFPACK, ${{ matrix.msystem }}) + name: MSYS2 (${{ matrix.dependencies }} dependencies, ${{ matrix.msystem }}) defaults: run: @@ -31,10 +31,11 @@ jobs: matrix: # msystem: [MINGW64, CLANG64] msystem: [MINGW64] - umfpack: [internal, external] + dependencies: [bundled, external] include: - - umfpack: external - umfpack-cmake-flags: "-DEXTERNAL_UMFPACK=ON" + - dependencies: external + external-packages: parpack:p + external-cmake-flags: -DEXTERNAL_UMFPACK=ON -DEXTERNAL_ARPACK=ON -DEXTERNAL_PARPACK=ON steps: - name: get CPU name @@ -83,6 +84,7 @@ jobs: unixodbc:p utf8cpp:p opencascade:p + ${{ matrix.external-packages }} - name: install MSMPI uses: mpi4py/setup-mpi@v1 @@ -121,7 +123,7 @@ jobs: -DWITH_MATC=ON \ -DWITH_PARAVIEW=ON \ -DCREATE_PKGCONFIG_FILE=ON \ - ${{ matrix.umfpack-cmake-flags }} \ + ${{ matrix.external-cmake-flags }} \ .. - name: build From 044b15d7cc9ed56f379e75c73b5bea5237b06f02 Mon Sep 17 00:00:00 2001 From: tzwinger Date: Fri, 27 Sep 2024 15:53:48 +0300 Subject: [PATCH 08/38] fixed issue with Solver not being passed as a poitner to FinishAssembly (SolverUtils.F90) --- elmerice/Solvers/Adjoint/Adjoint_LinearSolver.F90 | 7 ++++--- .../AdjointSSA/AdjointSSA_AdjointSolver.F90 | 7 ++++--- elmerice/Solvers/AdjointSolver.F90 | 7 ++++--- fem/src/SolverUtils.F90 | 2 +- fem/src/modules/ArteryOutlet.F90 | 15 +++++++++------ fem/src/modules/DCRComplexSolve.F90 | 9 +++++---- fem/src/modules/PhaseChangeSolve.F90 | 4 ++-- fem/src/modules/TransportEquation.F90 | 4 +++- 8 files changed, 32 insertions(+), 23 deletions(-) diff --git a/elmerice/Solvers/Adjoint/Adjoint_LinearSolver.F90 b/elmerice/Solvers/Adjoint/Adjoint_LinearSolver.F90 index db6da18ede..0ae06f8186 100644 --- a/elmerice/Solvers/Adjoint/Adjoint_LinearSolver.F90 +++ b/elmerice/Solvers/Adjoint/Adjoint_LinearSolver.F90 @@ -63,14 +63,14 @@ SUBROUTINE Adjoint_LinearSolver( Model,Solver,dt,TransientSimulation ) USE DefUtils IMPLICIT NONE !------------------------------------------------------------------------------ - TYPE(Solver_t) :: Solver + TYPE(Solver_t), TARGET :: Solver TYPE(Model_t) :: Model REAL(KIND=dp) :: dt LOGICAL :: TransientSimulation !------------------------------------------------------------------------------ ! Local variables !------------------------------------------------------------------------------ - TYPE(Solver_t),Pointer :: DSolver ! Pointer to the Direct Solver + TYPE(Solver_t),POINTER :: DSolver, PSolver ! Pointer to the Direct Solver and to adjoint solver TYPE(Variable_t), POINTER :: Sol ! Solution Variable INTEGER :: DOFs @@ -253,7 +253,8 @@ SUBROUTINE Adjoint_LinearSolver( Model,Solver,dt,TransientSimulation ) End Do EndDo - CALL FinishAssembly( Solver, ForceVector ) + PSolver => Solver + CALL FinishAssembly( PSolver, ForceVector ) Unorm = DefaultSolve() diff --git a/elmerice/Solvers/AdjointSSA/AdjointSSA_AdjointSolver.F90 b/elmerice/Solvers/AdjointSSA/AdjointSSA_AdjointSolver.F90 index a05cf36267..88732616bf 100644 --- a/elmerice/Solvers/AdjointSSA/AdjointSSA_AdjointSolver.F90 +++ b/elmerice/Solvers/AdjointSSA/AdjointSSA_AdjointSolver.F90 @@ -63,14 +63,14 @@ SUBROUTINE AdjointSSA_AdjointSolver( Model,Solver,dt,TransientSimulation ) USE DefUtils IMPLICIT NONE !------------------------------------------------------------------------------ - TYPE(Solver_t) :: Solver + TYPE(Solver_t), TARGET :: Solver TYPE(Model_t) :: Model REAL(KIND=dp) :: dt LOGICAL :: TransientSimulation !------------------------------------------------------------------------------ ! Local variables !------------------------------------------------------------------------------ - TYPE(Solver_t),Pointer :: NSSolver + TYPE(Solver_t),POINTER :: NSSolver, PSolver TYPE(Matrix_t),POINTER :: InitMat,TransMat,StiffMatrix TYPE(ValueList_t),POINTER :: BC,BF,SolverParams TYPE(ValueListEntry_t),POINTER :: NormalTangential,NormalTangentialC @@ -258,7 +258,8 @@ SUBROUTINE AdjointSSA_AdjointSolver( Model,Solver,dt,TransientSimulation ) End Do EndDo - CALL FinishAssembly( Solver, ForceVector ) + PSolver => Solver + CALL FinishAssembly( PSolver, ForceVector ) Unorm = DefaultSolve() diff --git a/elmerice/Solvers/AdjointSolver.F90 b/elmerice/Solvers/AdjointSolver.F90 index 6c60ce57c9..ff746e0818 100644 --- a/elmerice/Solvers/AdjointSolver.F90 +++ b/elmerice/Solvers/AdjointSolver.F90 @@ -56,7 +56,7 @@ SUBROUTINE AdjointSolver( Model,Solver,dt,TransientSimulation ) IMPLICIT NONE !------------------------------------------------------------------------------ - TYPE(Solver_t) :: Solver + TYPE(Solver_t), TARGET :: Solver TYPE(Model_t) :: Model @@ -65,7 +65,7 @@ SUBROUTINE AdjointSolver( Model,Solver,dt,TransientSimulation ) !------------------------------------------------------------------------------ ! Local variables !------------------------------------------------------------------------------ - TYPE(Solver_t),Pointer :: NSSolver + TYPE(Solver_t),POINTER :: NSSolver, PSolver TYPE(Matrix_t),POINTER :: InitMat,TransMat,StiffMatrix TYPE(ValueList_t),POINTER :: BC,SolverParams TYPE(Nodes_t) :: ElementNodes @@ -237,7 +237,8 @@ SUBROUTINE AdjointSolver( Model,Solver,dt,TransientSimulation ) End Do EndDo - CALL FinishAssembly( Solver, ForceVector ) + PSolver => Solver + CALL FinishAssembly( PSolver, ForceVector ) CALL DefaultDirichletBCs() diff --git a/fem/src/SolverUtils.F90 b/fem/src/SolverUtils.F90 index 74af478de8..6afea712f6 100644 --- a/fem/src/SolverUtils.F90 +++ b/fem/src/SolverUtils.F90 @@ -9998,7 +9998,7 @@ END SUBROUTINE InitializeTimestep !------------------------------------------------------------------------------ SUBROUTINE FinishAssembly( Solver, ForceVector ) !------------------------------------------------------------------------------ - TYPE(Solver_t) :: Solver + TYPE(Solver_t),POINTER :: Solver REAL(KIND=dp) :: ForceVector(:) INTEGER :: Order LOGICAL :: Found diff --git a/fem/src/modules/ArteryOutlet.F90 b/fem/src/modules/ArteryOutlet.F90 index b5d0f480e5..7ee9d6ae18 100644 --- a/fem/src/modules/ArteryOutlet.F90 +++ b/fem/src/modules/ArteryOutlet.F90 @@ -51,10 +51,10 @@ SUBROUTINE OutletCompute_Init( Model,Solver,dt,TransientSimulation ) IMPLICIT NONE !------------------------------------------------------------------------------ TYPE(Model_t) :: Model - TYPE(Solver_t) :: Solver + TYPE(Solver_t),TARGET :: Solver REAL(KIND=dp) :: dt LOGICAL :: TransientSimulation -!------------------------------------------------------------------------------ + !------------------------------------------------------------------------------ TYPE(ValueList_t), POINTER :: Params TYPE(Mesh_t), POINTER :: Mesh, PMesh @@ -100,7 +100,7 @@ SUBROUTINE OutletCompute( Model,Solver,dt,TransientSimulation ) IMPLICIT NONE !------------------------------------------------------------------------------ TYPE(Model_t) :: Model - TYPE(Solver_t):: Solver + TYPE(Solver_t), TARGET :: Solver REAL(KIND=dp) :: dt LOGICAL :: TransientSimulation @@ -114,7 +114,7 @@ SUBROUTINE OutletCompute( Model,Solver,dt,TransientSimulation ) TYPE(ValueList_t), POINTER :: Material TYPE(Variable_t), POINTER :: LVar, FlowSol TYPE(Mesh_t), POINTER :: Mesh1D, Mesh3D - TYPE(Solver_t), POINTER :: FlowSolver + TYPE(Solver_t), POINTER :: FlowSolver, PSolver INTEGER :: t, k,n,m,ie,bf_id,mat_id,prev_mat_id,istat,LocalNodes,i,j, nonliniter, l, & bc, joinnode, Connections, SolidConnections, fsstep, fsstepmax, NonlinearIter, & @@ -158,7 +158,10 @@ SUBROUTINE OutletCompute( Model,Solver,dt,TransientSimulation ) CALL Info('OutletCompute','Starting') Mesh1D => Solver % Mesh - + + PSolver => Solver +! IF (.NOT.ASSOCIATED(PSolver)) CALL FATAL('OutletCompute','Solver pointer not associated') + Wnodal => Solver % Variable % Values LocalNodes = SIZE( Wnodal ) @@ -546,7 +549,7 @@ SUBROUTINE OutletCompute( Model,Solver,dt,TransientSimulation ) ! Dirichlet boundary settings. Actually no need to call it except for ! transient simulations. !------------------------------------------------------------------------------ - CALL FinishAssembly( Solver,ForceVector ) + CALL FinishAssembly( PSolver, ForceVector ) FirstTime = .FALSE. diff --git a/fem/src/modules/DCRComplexSolve.F90 b/fem/src/modules/DCRComplexSolve.F90 index a3ff918ca7..cc7f31a3fa 100644 --- a/fem/src/modules/DCRComplexSolve.F90 +++ b/fem/src/modules/DCRComplexSolve.F90 @@ -49,7 +49,7 @@ SUBROUTINE DCRComplexSolver( Model,Solver,dt,TransientSimulation ) IMPLICIT NONE !------------------------------------------------------------------------------ - TYPE(Solver_t) :: Solver + TYPE(Solver_t),TARGET :: Solver TYPE(Model_t) :: Model REAL(KIND=dp) :: dt @@ -60,7 +60,8 @@ SUBROUTINE DCRComplexSolver( Model,Solver,dt,TransientSimulation ) TYPE(Matrix_t),POINTER :: StiffMatrix TYPE(Nodes_t) :: ElementNodes TYPE(Element_t),POINTER :: CurrentElement - + TYPE(Solver_t),POINTER :: PSolver + INTEGER, POINTER :: NodeIndexes(:) LOGICAL :: AllocationsDone = .FALSE., Bubbles, GotIt, notScalar = .TRUE., stat @@ -366,8 +367,8 @@ END FUNCTION DCRInsideResidual !------------------------------------------------------------------------------ END DO !------------------------------------------------------------------------------ - - CALL FinishAssembly( Solver, ForceVector ) + PSolver => Solver + CALL FinishAssembly( PSolver, ForceVector ) ! ! Dirichlet BCs: ! -------------- diff --git a/fem/src/modules/PhaseChangeSolve.F90 b/fem/src/modules/PhaseChangeSolve.F90 index 4abd3c670e..1b31fb4966 100644 --- a/fem/src/modules/PhaseChangeSolve.F90 +++ b/fem/src/modules/PhaseChangeSolve.F90 @@ -394,7 +394,7 @@ SUBROUTINE PhaseChangeSolve( Model,Solver,dt,TransientSimulation ) ForceVector, LocalForceVector, n, 1, SurfPerm(NodeIndexes) ) END DO - CALL FinishAssembly( Solver, ForceVector ) + CALL FinishAssembly( PSolver, ForceVector ) ! No Dirihtlet conditions here since ! One should not really try to force the phase change at some point, @@ -465,7 +465,7 @@ SUBROUTINE PhaseChangeSolve( Model,Solver,dt,TransientSimulation ) ForceVector, LocalForceVector, n, 1, SurfPerm(NodeIndexes) ) END DO - CALL FinishAssembly( Solver, ForceVector ) + CALL FinishAssembly( PSolver, ForceVector ) CALL SolveSystem( StiffMatrix, ParMatrix, ForceVector, Surface, Norm, 1, Solver ) END IF diff --git a/fem/src/modules/TransportEquation.F90 b/fem/src/modules/TransportEquation.F90 index fac7c0236c..606dae7965 100644 --- a/fem/src/modules/TransportEquation.F90 +++ b/fem/src/modules/TransportEquation.F90 @@ -75,6 +75,7 @@ SUBROUTINE TransportEquationSolver( Model, Solver, dt, TransientSimulation ) TYPE(Variable_t), POINTER :: FlowSol, Udot0Var TYPE(VariablePtr_t), POINTER :: U0Var(:) TYPE(ValueList_t), POINTER :: Material + TYPE(Solver_t), POINTER :: PSolver INTEGER :: i,j,k,p,n,t,body_id,bf_id,istat,LocalNodes,& AdvectionVariableComponents, VelocityComponents @@ -417,7 +418,8 @@ SUBROUTINE TransportEquationSolver( Model, Solver, dt, TransientSimulation ) ! Dirichlet boundary settings. Actually no need to call it except for ! transient simulations. !------------------------------------------------------------------------------ - CALL FinishAssembly( Solver, ForceVector ) + PSolver => Solver + CALL FinishAssembly( PSolver, ForceVector ) !------------------------------------------------------------------------------ ! Dirichlet boundary conditions From 18dd9c402a6981ba726d20cc7519dd3efb157500 Mon Sep 17 00:00:00 2001 From: Peter Raback Date: Fri, 27 Sep 2024 16:53:28 +0300 Subject: [PATCH 09/38] Change some parameters to pointers to supress warnings of a picky compiler. --- fem/src/SolverUtils.F90 | 39 ++++++++++++++++++++++++-------- fem/src/modules/ElasticSolve.F90 | 6 ++++- fem/src/modules/ShellSolver.F90 | 8 +++++-- 3 files changed, 40 insertions(+), 13 deletions(-) diff --git a/fem/src/SolverUtils.F90 b/fem/src/SolverUtils.F90 index 6afea712f6..770f1fdc45 100644 --- a/fem/src/SolverUtils.F90 +++ b/fem/src/SolverUtils.F90 @@ -8613,7 +8613,7 @@ END SUBROUTINE CommunicateDirichletBCs SUBROUTINE EnforceDirichletConditions( Solver, A, b, OffDiagonal ) !------------------------------------------------------------------------------ IMPLICIT NONE - TYPE(Solver_t) :: Solver + TYPE(Solver_t), POINTER :: Solver TYPE(Matrix_t), POINTER :: A REAL(KIND=dp) :: b(:) LOGICAL, OPTIONAL :: OffDiagonal @@ -16762,7 +16762,11 @@ SUBROUTINE ConstraintModesDriver( A, x, b, Solver, PreSolve, ThisMode, LinSysMod A % DValues = 0.0_dp END WHERE END IF - CALL EnforceDirichletConditions( Solver, A, b ) + BLOCK + TYPE(Solver_t), POINTER :: pSolver + pSolver => Solver + CALL EnforceDirichletConditions( pSolver, A, b ) + END BLOCK ELSE IF( Nmode > 1 .AND. LinSysMode ) THEN WHERE( Var % ConstraintModesIndeces == Nmode-1 ) @@ -16772,7 +16776,11 @@ SUBROUTINE ConstraintModesDriver( A, x, b, Solver, PreSolve, ThisMode, LinSysMod WHERE( Var % ConstraintModesIndeces == Nmode ) A % DValues = 1.0_dp END WHERE - CALL EnforceDirichletConditions( Solver, A, b ) + BLOCK + TYPE(Solver_t), POINTER :: pSolver + pSolver => Solver + CALL EnforceDirichletConditions( pSolver, A, b ) + END BLOCK END IF END IF CALL ListAddLogical( Params,'Skip Zero Rhs Test',.TRUE. ) @@ -17791,7 +17799,7 @@ END SUBROUTINE DerivateExportedVariables !------------------------------------------------------------------------------ SUBROUTINE SolveHarmonicSystem( G, Solver ) !------------------------------------------------------------------------------ - TYPE(Solver_t) :: Solver + TYPE(Solver_t), TARGET :: Solver TYPE(Matrix_t), TARGET :: G !------------------------------------------------------------------------------ TYPE(Matrix_t), POINTER :: BMatrix, A => NULL() @@ -17918,8 +17926,11 @@ SUBROUTINE SolveHarmonicSystem( G, Solver ) 2*j, DOFs, Solver % Variable % Perm ) END DO - CALL EnforceDirichletConditions( Solver, A, b ) - + BLOCK + TYPE(Solver_t), POINTER :: pSolver + pSolver => Solver + CALL EnforceDirichletConditions( pSolver, A, b ) + END BLOCK CALL SolveLinearSystem( A, b, x, Norm, DOFs, Solver ) @@ -18124,7 +18135,7 @@ END SUBROUTINE MergeSlaveSolvers !------------------------------------------------------------------------------ SUBROUTINE ChangeToHarmonicSystem( Solver, BackToReal ) !------------------------------------------------------------------------------ - TYPE(Solver_t) :: Solver + TYPE(Solver_t), TARGET :: Solver LOGICAL, OPTIONAL :: BackToReal !------------------------------------------------------------------------------ TYPE(Matrix_t), POINTER :: Are => NULL(), Aharm => NULL(), SaveMatrix @@ -18210,7 +18221,11 @@ SUBROUTINE ChangeToHarmonicSystem( Solver, BackToReal ) CALL Fatal('ChangeToHarmonicSystem','Harmonic system requires mass!') END IF ! This is set outside so that it can be called more flexibilly - CALL EnforceDirichletConditions( Solver, Are, Are % rhs ) + BLOCK + TYPE(Solver_t), POINTER :: pSolver + pSolver => Solver + CALL EnforceDirichletConditions( pSolver, Are, Are % rhs ) + END BLOCK RETURN END IF @@ -18448,8 +18463,12 @@ SUBROUTINE ChangeToHarmonicSystem( Solver, BackToReal ) Solver % Matrix => Aharm IF(AnyDirichlet) THEN - IF(ParEnv % PEs>1) CALL ParallelInitMatrix(Solver, Aharm) - CALL EnforceDirichletConditions( Solver, Aharm, b ) + BLOCK + TYPE(Solver_t), POINTER :: pSolver + pSolver => Solver + IF(ParEnv % PEs>1) CALL ParallelInitMatrix(Solver, Aharm) + CALL EnforceDirichletConditions( pSolver, Aharm, b ) + END BLOCK END IF ! Save the original matrix and variable in Ematrix and Evar diff --git a/fem/src/modules/ElasticSolve.F90 b/fem/src/modules/ElasticSolve.F90 index d9ea010707..72c635297f 100644 --- a/fem/src/modules/ElasticSolve.F90 +++ b/fem/src/modules/ElasticSolve.F90 @@ -1228,7 +1228,11 @@ END FUNCTION ElastInsideResidual StiffMatrix % DValues(i) = StiffMatrix % DValues(i) - DisplacementRot(i) END IF END DO - CALL EnforceDirichletConditions(Solver, StiffMatrix, ForceVector) + BLOCK + TYPE(Solver_t), POINTER :: pSolver + pSolver => Solver + CALL EnforceDirichletConditions(pSolver, StiffMatrix, ForceVector) + END BLOCK END IF ! The initial guess for the displacement increment: diff --git a/fem/src/modules/ShellSolver.F90 b/fem/src/modules/ShellSolver.F90 index e63d27b1eb..1053e79422 100644 --- a/fem/src/modules/ShellSolver.F90 +++ b/fem/src/modules/ShellSolver.F90 @@ -160,7 +160,7 @@ SUBROUTINE ShellSolver(Model, Solver, dt, TransientSimulation) IMPLICIT NONE !------------------------------------------------------------------------------ - TYPE(Solver_t) :: Solver + TYPE(Solver_t), TARGET :: Solver TYPE(Model_t) :: Model REAL(KIND=dp) :: dt LOGICAL :: TransientSimulation @@ -736,7 +736,11 @@ SUBROUTINE ShellSolver(Model, Solver, dt, TransientSimulation) Solver % Matrix % DValues(i) = Solver % Matrix % DValues(i) - Solver % Variable % Values(i) END IF END DO - CALL EnforceDirichletConditions(Solver, Solver % Matrix, Solver % Matrix % RHS) + BLOCK + TYPE(Solver_t), POINTER :: pSolver + pSolver => Solver + CALL EnforceDirichletConditions(pSolver, Solver % Matrix, Solver % Matrix % RHS) + END BLOCK END IF ! --------------------------------------------------------------------------------- From 39b8e05ec500f6262ba19db2f3a41102417c918d Mon Sep 17 00:00:00 2001 From: Peter Raback Date: Fri, 27 Sep 2024 17:55:48 +0300 Subject: [PATCH 10/38] Separate UnitSegmentDiviion such that we can use its parts for other purposes to come. --- fem/src/MeshUtils.F90 | 245 +++++++++++++++++++++++------------------- 1 file changed, 136 insertions(+), 109 deletions(-) diff --git a/fem/src/MeshUtils.F90 b/fem/src/MeshUtils.F90 index 4f204efe57..2d910f7442 100644 --- a/fem/src/MeshUtils.F90 +++ b/fem/src/MeshUtils.F90 @@ -17261,50 +17261,24 @@ SUBROUTINE GeneratePeriodicProjectors( Model, Mesh ) END SUBROUTINE GeneratePeriodicProjectors -!------------------------------------------------------------------------------ -!> Create node distribution for a unit segment x \in [0,1] with n elements -!> i.e. n+1 nodes. There are different options for the type of distribution. -!> 1) Even distribution -!> 2) Geometric distribution -!> 3) Arbitrary distribution determined by a functional dependence -!> Note that the 3rd algorithm involves iterative solution of the nodal -!> positions and is therefore not bullet-proof. -!------------------------------------------------------------------------------ - SUBROUTINE UnitSegmentDivision( w, n, ExtList ) + ! This is separated from the general UnitSegmentDivision since it can be used + ! in other places as well. Note that w should range from 0 to n. + !---------------------------------------------------------------------------- + SUBROUTINE GeometricUnitDivision(w, n, q) REAL(KIND=dp), ALLOCATABLE :: w(:) INTEGER :: n - TYPE(ValueList_t), POINTER, OPTIONAL :: ExtList - !--------------------------------------------------------------- - INTEGER :: i,J,iter,maxiter - REAL(KIND=dp) :: q,r,h1,hn,minhn,err_eps,err,xn - REAL(KIND=dp), ALLOCATABLE :: wold(:),h(:) - LOGICAL :: Found, GotRatio, FunExtruded, Fun1D - TYPE(Nodes_t) :: Nodes - TYPE(ValueList_t), POINTER :: ParList - - IF( PRESENT( ExtList ) ) THEN - ParList => ExtList - ELSE - ParList => CurrentModel % Simulation - END IF + REAL(KIND=dp) :: q - FunExtruded = ListCheckPresent( ParList,'Extruded Mesh Density') - Fun1D = ListCheckPresent( ParList,'1D Mesh Density') - - ! Geometric division - !--------------------------------------------------------------- - q = ListGetConstReal( ParList,'Extruded Mesh Ratio',GotRatio) - IF(.NOT. GotRatio) q = ListGetConstReal( ParList,'1D Mesh Ratio',GotRatio) - IF( GotRatio ) THEN - IF( ( ABS(ABS(q)-1.0_dp) < 1.0d-6 ) .OR. (q < 0.0_dp .AND. n <= 2) ) THEN - CALL Info('UnitSegmentDivision','Assuming linear division as mesh ratio is close to one!') - GotRatio = .FALSE. - END IF - END IF + INTEGER :: i,j + REAL(KIND=dp) :: r,h1 - IF( GotRatio ) THEN - CALL Info('UnitSegmentDivision','Creating geometric division',Level=5) - + IF( ( ABS(ABS(q)-1.0_dp) < 1.0d-6 ) .OR. (q < 0.0_dp .AND. n <= 2) ) THEN + CALL Info('GeometricUnitDivision','Creating linear division',Level=8) + DO i=0,n + w(i) = i/(1._dp * n) + END DO + ELSE + CALL Info('GeometricUnitDivision','Creating geometric division',Level=8) IF( q > 0.0_dp ) THEN r = q**(1.0_dp/(n-1)) h1 = (1-r)/(1-r**n) @@ -17322,7 +17296,7 @@ SUBROUTINE UnitSegmentDivision( w, n, ExtList ) r = q**(1.0_dp/((n-1)/2)) h1 = 0.5_dp / ( (1-r**((n+1)/2))/(1-r) - 0.5_dp * r**((n-1)/2)) END IF - + w(0) = 0.0_dp DO i=1,n IF( i <= n/2 ) THEN @@ -17333,91 +17307,144 @@ SUBROUTINE UnitSegmentDivision( w, n, ExtList ) END DO w(n) = 1.0_dp END IF - - ! Generic division given by a function - !----------------------------------------------------------------------- - ELSE IF( FunExtruded .OR. Fun1D ) THEN + END IF + + END SUBROUTINE GeometricUnitDivision - CALL Info('UnitSegmentDivision','Creating functional division',Level=5) - ! Initial guess is an even distribution - DO i=0,n - w(i) = i/(1._dp * n) - END DO + ! This is separated from the general UnitSegmentDivision since it can be used + ! in other places as well. Note that w should range from 0 to n. + !---------------------------------------------------------------------------- + SUBROUTINE FunctionUnitDivision(w, n, FunName, FunList ) + REAL(KIND=dp), ALLOCATABLE :: w(:) + INTEGER :: n + CHARACTER(:), ALLOCATABLE :: FunName + TYPE(ValueList_t), POINTER :: FunList + + INTEGER :: i,j,iter,maxiter + REAL(KIND=dp) :: r,h1,hn,minhn,err_eps,err,xn + REAL(KIND=dp), ALLOCATABLE :: wold(:),h(:) + + CALL Info('FunctionUnitDivision','Creating functional division: '//TRIM(FunName),Level=5) - ALLOCATE( wold(0:n),h(1:n)) - wold = w + ! Initial guess is an even distribution + DO i=0,n + w(i) = i/(1._dp * n) + END DO - ! parameters that determine the accuracy of the iteration - maxiter = 10000 - err_eps = 1.0d-6 + ALLOCATE( wold(0:n),h(1:n)) + wold = w - ! Iterate to have a density distribution - !--------------------------------------- - DO iter=1,maxiter - - minhn = HUGE(minhn) - wold = w + ! parameters that determine the accuracy of the iteration + maxiter = 10000 + err_eps = 1.0d-6 - ! Compute the point in the local mesh xn \in [0,1] - ! and get the mesh parameter for that element from - ! external function. - !--------------------------------------------------- - DO i=1,n - xn = (w(i)+w(i-1))/2.0_dp - minhn = MIN( minhn, w(i)-w(i-1) ) - IF( FunExtruded ) THEN - h(i) = ListGetFun( ParList,'Extruded Mesh Density', xn ) - ELSE - h(i) = ListGetFun( ParList,'1D Mesh Density', xn ) - END IF - IF( h(i) < EPSILON( h(i) ) ) THEN - CALL Fatal('UnitSegmentDivision','Given value for h(i) was negative!') - END IF - END DO + ! Iterate to have a density distribution + !--------------------------------------- + DO iter=1,maxiter - ! Utilize symmetric Gauss-Seidel to compute the new positions, w(i). - ! from a weigted mean of the desired elemental densities, h(i). - ! Note that something more clever could be applied here. - ! This was just a first implementation... - !------------------------------------------------------------- - DO i=1,n-1 - w(i) = (w(i-1)*h(i+1)+w(i+1)*h(i))/(h(i)+h(i+1)) - END DO - DO i=n-1,1,-1 - w(i) = (w(i-1)*h(i+1)+w(i+1)*h(i))/(h(i)+h(i+1)) - END DO - - ! If the maximum error is small compared to the minimum elementsize then exit - !----------------------------------------------------------------------------- - err = MAXVAL( ABS(w-wold))/minhn + minhn = HUGE(minhn) + wold = w - IF( err < err_eps ) THEN - WRITE( Message, '(A,I0,A)') 'Convergence obtained in ',iter,' iterations' - CALL Info('UnitSegmentDivision', Message, Level=9 ) - EXIT + ! Compute the point in the local mesh xn \in [0,1] + ! and get the mesh parameter for that element from + ! external function. + !--------------------------------------------------- + DO i=1,n + xn = (w(i)+w(i-1))/2.0_dp + minhn = MIN( minhn, w(i)-w(i-1) ) + h(i) = ListGetFun( FunList, FunName, xn ) + IF( h(i) < EPSILON( h(i) ) ) THEN + CALL Fatal('FunctionUnitDivision','Given value for h(i) was negative!') END IF END DO - IF( iter > maxiter ) THEN - CALL Warn('UnitSegmentDivision','No convergence obtained for the unit mesh division!') + ! Utilize symmetric Gauss-Seidel to compute the new positions, w(i). + ! from a weigted mean of the desired elemental densities, h(i). + ! Note that something more clever could be applied here. + ! This was just a first implementation... + !------------------------------------------------------------- + DO i=1,n-1 + w(i) = (w(i-1)*h(i+1)+w(i+1)*h(i))/(h(i)+h(i+1)) + END DO + DO i=n-1,1,-1 + w(i) = (w(i-1)*h(i+1)+w(i+1)*h(i))/(h(i)+h(i+1)) + END DO + + ! If the maximum error is small compared to the minimum elementsize then exit + !----------------------------------------------------------------------------- + err = MAXVAL( ABS(w-wold))/minhn + + IF( err < err_eps ) THEN + WRITE( Message, '(A,I0,A)') 'Convergence obtained in ',iter,' iterations' + CALL Info('FunctionUnitDivision', Message, Level=9 ) + EXIT END IF + END DO - ! Uniform division - !-------------------------------------------------------------- - ELSE - CALL Info('UnitSegmentDivision','Creating linear division',Level=5) - DO i=0,n - w(i) = i/(1._dp * n) - END DO + IF( iter > maxiter ) THEN + CALL Warn('UnitSegmentDivision','No convergence obtained for the unit mesh division!') END IF + END SUBROUTINE FunctionUnitDivision + + +!------------------------------------------------------------------------------ +!> Create node distribution for a unit segment x \in [0,1] with n elements +!> i.e. n+1 nodes. There are different options for the type of distribution. +!> 1) Even distribution +!> 2) Geometric distribution +!> 3) Arbitrary distribution determined by a functional dependence +!> Note that the 3rd algorithm involves iterative solution of the nodal +!> positions and is therefore not bullet-proof. +!------------------------------------------------------------------------------ + SUBROUTINE UnitSegmentDivision( w, n, ExtList ) + REAL(KIND=dp), ALLOCATABLE :: w(:) + INTEGER :: n + TYPE(ValueList_t), POINTER, OPTIONAL :: ExtList + !--------------------------------------------------------------- + INTEGER :: i + REAL(KIND=dp) :: q + CHARACTER(:), ALLOCATABLE :: FunName + LOGICAL :: Found, GotRatio, GotFun + TYPE(ValueList_t), POINTER :: ParList - CALL Info('UnitSegmentDivision','Mesh division ready',Level=9) - DO i=0,n - WRITE( Message, '(A,I0,A,ES12.4)') 'w(',i,') : ',w(i) - CALL Info('UnitSegmentDivision', Message, Level=9 ) + IF( PRESENT( ExtList ) ) THEN + ParList => ExtList + ELSE + ParList => CurrentModel % Simulation + END IF + + DO i=1,2 + IF(i==1) THEN + FunName = 'Extruded Mesh Density' + ELSE + FunName = '1D Mesh Density' + END IF + GotFun = ListCheckPresent( ParList, FunName ) + IF(GotFun) EXIT END DO + IF( GotFun ) THEN + ! Generic division given by a function + !----------------------------------------------------------------------- + CALL FunctionUnitDivision(w,n,FunName,ParList) + ELSE + ! Uniform or geometric division + !-------------------------------------------------------------- + q = ListGetConstReal( ParList,'Extruded Mesh Ratio',GotRatio) + IF(.NOT. GotRatio) q = ListGetConstReal( ParList,'1D Mesh Ratio',GotRatio) + IF(.NOT. GotRatio) q = 1.0_dp + CALL GeometricUnitDivision(w,n,q) + END IF + + IF(InfoActive(9)) THEN + CALL Info('UnitSegmentDivision','Mesh division ready' ) + DO i=0,n + WRITE( Message, '(A,I0,A,ES12.4)') 'w(',i,') : ',w(i) + CALL Info('UnitSegmentDivision', Message ) + END DO + END IF + END SUBROUTINE UnitSegmentDivision !------------------------------------------------------------------------------ From 6c43a0546b505aaf353d15cbe73fd0efbf4048dd Mon Sep 17 00:00:00 2001 From: Peter Raback Date: Fri, 27 Sep 2024 19:52:05 +0300 Subject: [PATCH 11/38] Revert some chages in pointer use inspired by an apparently buggy compiler. Argument should be able to be a pointer even though in subroutine it is decleared as normal variable. --- .../Solvers/Adjoint/Adjoint_LinearSolver.F90 | 7 ++-- .../AdjointSSA/AdjointSSA_AdjointSolver.F90 | 7 ++-- elmerice/Solvers/AdjointSolver.F90 | 7 ++-- fem/src/SolverUtils.F90 | 41 +++++-------------- fem/src/modules/ArteryOutlet.F90 | 15 +++---- fem/src/modules/DCRComplexSolve.F90 | 9 ++-- fem/src/modules/ElasticSolve.F90 | 6 +-- fem/src/modules/PhaseChangeSolve.F90 | 4 +- fem/src/modules/ShellSolver.F90 | 8 +--- fem/src/modules/TransportEquation.F90 | 4 +- 10 files changed, 36 insertions(+), 72 deletions(-) diff --git a/elmerice/Solvers/Adjoint/Adjoint_LinearSolver.F90 b/elmerice/Solvers/Adjoint/Adjoint_LinearSolver.F90 index 0ae06f8186..db6da18ede 100644 --- a/elmerice/Solvers/Adjoint/Adjoint_LinearSolver.F90 +++ b/elmerice/Solvers/Adjoint/Adjoint_LinearSolver.F90 @@ -63,14 +63,14 @@ SUBROUTINE Adjoint_LinearSolver( Model,Solver,dt,TransientSimulation ) USE DefUtils IMPLICIT NONE !------------------------------------------------------------------------------ - TYPE(Solver_t), TARGET :: Solver + TYPE(Solver_t) :: Solver TYPE(Model_t) :: Model REAL(KIND=dp) :: dt LOGICAL :: TransientSimulation !------------------------------------------------------------------------------ ! Local variables !------------------------------------------------------------------------------ - TYPE(Solver_t),POINTER :: DSolver, PSolver ! Pointer to the Direct Solver and to adjoint solver + TYPE(Solver_t),Pointer :: DSolver ! Pointer to the Direct Solver TYPE(Variable_t), POINTER :: Sol ! Solution Variable INTEGER :: DOFs @@ -253,8 +253,7 @@ SUBROUTINE Adjoint_LinearSolver( Model,Solver,dt,TransientSimulation ) End Do EndDo - PSolver => Solver - CALL FinishAssembly( PSolver, ForceVector ) + CALL FinishAssembly( Solver, ForceVector ) Unorm = DefaultSolve() diff --git a/elmerice/Solvers/AdjointSSA/AdjointSSA_AdjointSolver.F90 b/elmerice/Solvers/AdjointSSA/AdjointSSA_AdjointSolver.F90 index 88732616bf..a05cf36267 100644 --- a/elmerice/Solvers/AdjointSSA/AdjointSSA_AdjointSolver.F90 +++ b/elmerice/Solvers/AdjointSSA/AdjointSSA_AdjointSolver.F90 @@ -63,14 +63,14 @@ SUBROUTINE AdjointSSA_AdjointSolver( Model,Solver,dt,TransientSimulation ) USE DefUtils IMPLICIT NONE !------------------------------------------------------------------------------ - TYPE(Solver_t), TARGET :: Solver + TYPE(Solver_t) :: Solver TYPE(Model_t) :: Model REAL(KIND=dp) :: dt LOGICAL :: TransientSimulation !------------------------------------------------------------------------------ ! Local variables !------------------------------------------------------------------------------ - TYPE(Solver_t),POINTER :: NSSolver, PSolver + TYPE(Solver_t),Pointer :: NSSolver TYPE(Matrix_t),POINTER :: InitMat,TransMat,StiffMatrix TYPE(ValueList_t),POINTER :: BC,BF,SolverParams TYPE(ValueListEntry_t),POINTER :: NormalTangential,NormalTangentialC @@ -258,8 +258,7 @@ SUBROUTINE AdjointSSA_AdjointSolver( Model,Solver,dt,TransientSimulation ) End Do EndDo - PSolver => Solver - CALL FinishAssembly( PSolver, ForceVector ) + CALL FinishAssembly( Solver, ForceVector ) Unorm = DefaultSolve() diff --git a/elmerice/Solvers/AdjointSolver.F90 b/elmerice/Solvers/AdjointSolver.F90 index ff746e0818..6c60ce57c9 100644 --- a/elmerice/Solvers/AdjointSolver.F90 +++ b/elmerice/Solvers/AdjointSolver.F90 @@ -56,7 +56,7 @@ SUBROUTINE AdjointSolver( Model,Solver,dt,TransientSimulation ) IMPLICIT NONE !------------------------------------------------------------------------------ - TYPE(Solver_t), TARGET :: Solver + TYPE(Solver_t) :: Solver TYPE(Model_t) :: Model @@ -65,7 +65,7 @@ SUBROUTINE AdjointSolver( Model,Solver,dt,TransientSimulation ) !------------------------------------------------------------------------------ ! Local variables !------------------------------------------------------------------------------ - TYPE(Solver_t),POINTER :: NSSolver, PSolver + TYPE(Solver_t),Pointer :: NSSolver TYPE(Matrix_t),POINTER :: InitMat,TransMat,StiffMatrix TYPE(ValueList_t),POINTER :: BC,SolverParams TYPE(Nodes_t) :: ElementNodes @@ -237,8 +237,7 @@ SUBROUTINE AdjointSolver( Model,Solver,dt,TransientSimulation ) End Do EndDo - PSolver => Solver - CALL FinishAssembly( PSolver, ForceVector ) + CALL FinishAssembly( Solver, ForceVector ) CALL DefaultDirichletBCs() diff --git a/fem/src/SolverUtils.F90 b/fem/src/SolverUtils.F90 index 770f1fdc45..74af478de8 100644 --- a/fem/src/SolverUtils.F90 +++ b/fem/src/SolverUtils.F90 @@ -8613,7 +8613,7 @@ END SUBROUTINE CommunicateDirichletBCs SUBROUTINE EnforceDirichletConditions( Solver, A, b, OffDiagonal ) !------------------------------------------------------------------------------ IMPLICIT NONE - TYPE(Solver_t), POINTER :: Solver + TYPE(Solver_t) :: Solver TYPE(Matrix_t), POINTER :: A REAL(KIND=dp) :: b(:) LOGICAL, OPTIONAL :: OffDiagonal @@ -9998,7 +9998,7 @@ END SUBROUTINE InitializeTimestep !------------------------------------------------------------------------------ SUBROUTINE FinishAssembly( Solver, ForceVector ) !------------------------------------------------------------------------------ - TYPE(Solver_t),POINTER :: Solver + TYPE(Solver_t) :: Solver REAL(KIND=dp) :: ForceVector(:) INTEGER :: Order LOGICAL :: Found @@ -16762,11 +16762,7 @@ SUBROUTINE ConstraintModesDriver( A, x, b, Solver, PreSolve, ThisMode, LinSysMod A % DValues = 0.0_dp END WHERE END IF - BLOCK - TYPE(Solver_t), POINTER :: pSolver - pSolver => Solver - CALL EnforceDirichletConditions( pSolver, A, b ) - END BLOCK + CALL EnforceDirichletConditions( Solver, A, b ) ELSE IF( Nmode > 1 .AND. LinSysMode ) THEN WHERE( Var % ConstraintModesIndeces == Nmode-1 ) @@ -16776,11 +16772,7 @@ SUBROUTINE ConstraintModesDriver( A, x, b, Solver, PreSolve, ThisMode, LinSysMod WHERE( Var % ConstraintModesIndeces == Nmode ) A % DValues = 1.0_dp END WHERE - BLOCK - TYPE(Solver_t), POINTER :: pSolver - pSolver => Solver - CALL EnforceDirichletConditions( pSolver, A, b ) - END BLOCK + CALL EnforceDirichletConditions( Solver, A, b ) END IF END IF CALL ListAddLogical( Params,'Skip Zero Rhs Test',.TRUE. ) @@ -17799,7 +17791,7 @@ END SUBROUTINE DerivateExportedVariables !------------------------------------------------------------------------------ SUBROUTINE SolveHarmonicSystem( G, Solver ) !------------------------------------------------------------------------------ - TYPE(Solver_t), TARGET :: Solver + TYPE(Solver_t) :: Solver TYPE(Matrix_t), TARGET :: G !------------------------------------------------------------------------------ TYPE(Matrix_t), POINTER :: BMatrix, A => NULL() @@ -17926,11 +17918,8 @@ SUBROUTINE SolveHarmonicSystem( G, Solver ) 2*j, DOFs, Solver % Variable % Perm ) END DO - BLOCK - TYPE(Solver_t), POINTER :: pSolver - pSolver => Solver - CALL EnforceDirichletConditions( pSolver, A, b ) - END BLOCK + CALL EnforceDirichletConditions( Solver, A, b ) + CALL SolveLinearSystem( A, b, x, Norm, DOFs, Solver ) @@ -18135,7 +18124,7 @@ END SUBROUTINE MergeSlaveSolvers !------------------------------------------------------------------------------ SUBROUTINE ChangeToHarmonicSystem( Solver, BackToReal ) !------------------------------------------------------------------------------ - TYPE(Solver_t), TARGET :: Solver + TYPE(Solver_t) :: Solver LOGICAL, OPTIONAL :: BackToReal !------------------------------------------------------------------------------ TYPE(Matrix_t), POINTER :: Are => NULL(), Aharm => NULL(), SaveMatrix @@ -18221,11 +18210,7 @@ SUBROUTINE ChangeToHarmonicSystem( Solver, BackToReal ) CALL Fatal('ChangeToHarmonicSystem','Harmonic system requires mass!') END IF ! This is set outside so that it can be called more flexibilly - BLOCK - TYPE(Solver_t), POINTER :: pSolver - pSolver => Solver - CALL EnforceDirichletConditions( pSolver, Are, Are % rhs ) - END BLOCK + CALL EnforceDirichletConditions( Solver, Are, Are % rhs ) RETURN END IF @@ -18463,12 +18448,8 @@ SUBROUTINE ChangeToHarmonicSystem( Solver, BackToReal ) Solver % Matrix => Aharm IF(AnyDirichlet) THEN - BLOCK - TYPE(Solver_t), POINTER :: pSolver - pSolver => Solver - IF(ParEnv % PEs>1) CALL ParallelInitMatrix(Solver, Aharm) - CALL EnforceDirichletConditions( pSolver, Aharm, b ) - END BLOCK + IF(ParEnv % PEs>1) CALL ParallelInitMatrix(Solver, Aharm) + CALL EnforceDirichletConditions( Solver, Aharm, b ) END IF ! Save the original matrix and variable in Ematrix and Evar diff --git a/fem/src/modules/ArteryOutlet.F90 b/fem/src/modules/ArteryOutlet.F90 index 7ee9d6ae18..b5d0f480e5 100644 --- a/fem/src/modules/ArteryOutlet.F90 +++ b/fem/src/modules/ArteryOutlet.F90 @@ -51,10 +51,10 @@ SUBROUTINE OutletCompute_Init( Model,Solver,dt,TransientSimulation ) IMPLICIT NONE !------------------------------------------------------------------------------ TYPE(Model_t) :: Model - TYPE(Solver_t),TARGET :: Solver + TYPE(Solver_t) :: Solver REAL(KIND=dp) :: dt LOGICAL :: TransientSimulation - !------------------------------------------------------------------------------ +!------------------------------------------------------------------------------ TYPE(ValueList_t), POINTER :: Params TYPE(Mesh_t), POINTER :: Mesh, PMesh @@ -100,7 +100,7 @@ SUBROUTINE OutletCompute( Model,Solver,dt,TransientSimulation ) IMPLICIT NONE !------------------------------------------------------------------------------ TYPE(Model_t) :: Model - TYPE(Solver_t), TARGET :: Solver + TYPE(Solver_t):: Solver REAL(KIND=dp) :: dt LOGICAL :: TransientSimulation @@ -114,7 +114,7 @@ SUBROUTINE OutletCompute( Model,Solver,dt,TransientSimulation ) TYPE(ValueList_t), POINTER :: Material TYPE(Variable_t), POINTER :: LVar, FlowSol TYPE(Mesh_t), POINTER :: Mesh1D, Mesh3D - TYPE(Solver_t), POINTER :: FlowSolver, PSolver + TYPE(Solver_t), POINTER :: FlowSolver INTEGER :: t, k,n,m,ie,bf_id,mat_id,prev_mat_id,istat,LocalNodes,i,j, nonliniter, l, & bc, joinnode, Connections, SolidConnections, fsstep, fsstepmax, NonlinearIter, & @@ -158,10 +158,7 @@ SUBROUTINE OutletCompute( Model,Solver,dt,TransientSimulation ) CALL Info('OutletCompute','Starting') Mesh1D => Solver % Mesh - - PSolver => Solver -! IF (.NOT.ASSOCIATED(PSolver)) CALL FATAL('OutletCompute','Solver pointer not associated') - + Wnodal => Solver % Variable % Values LocalNodes = SIZE( Wnodal ) @@ -549,7 +546,7 @@ SUBROUTINE OutletCompute( Model,Solver,dt,TransientSimulation ) ! Dirichlet boundary settings. Actually no need to call it except for ! transient simulations. !------------------------------------------------------------------------------ - CALL FinishAssembly( PSolver, ForceVector ) + CALL FinishAssembly( Solver,ForceVector ) FirstTime = .FALSE. diff --git a/fem/src/modules/DCRComplexSolve.F90 b/fem/src/modules/DCRComplexSolve.F90 index cc7f31a3fa..a3ff918ca7 100644 --- a/fem/src/modules/DCRComplexSolve.F90 +++ b/fem/src/modules/DCRComplexSolve.F90 @@ -49,7 +49,7 @@ SUBROUTINE DCRComplexSolver( Model,Solver,dt,TransientSimulation ) IMPLICIT NONE !------------------------------------------------------------------------------ - TYPE(Solver_t),TARGET :: Solver + TYPE(Solver_t) :: Solver TYPE(Model_t) :: Model REAL(KIND=dp) :: dt @@ -60,8 +60,7 @@ SUBROUTINE DCRComplexSolver( Model,Solver,dt,TransientSimulation ) TYPE(Matrix_t),POINTER :: StiffMatrix TYPE(Nodes_t) :: ElementNodes TYPE(Element_t),POINTER :: CurrentElement - TYPE(Solver_t),POINTER :: PSolver - + INTEGER, POINTER :: NodeIndexes(:) LOGICAL :: AllocationsDone = .FALSE., Bubbles, GotIt, notScalar = .TRUE., stat @@ -367,8 +366,8 @@ END FUNCTION DCRInsideResidual !------------------------------------------------------------------------------ END DO !------------------------------------------------------------------------------ - PSolver => Solver - CALL FinishAssembly( PSolver, ForceVector ) + + CALL FinishAssembly( Solver, ForceVector ) ! ! Dirichlet BCs: ! -------------- diff --git a/fem/src/modules/ElasticSolve.F90 b/fem/src/modules/ElasticSolve.F90 index 72c635297f..d9ea010707 100644 --- a/fem/src/modules/ElasticSolve.F90 +++ b/fem/src/modules/ElasticSolve.F90 @@ -1228,11 +1228,7 @@ END FUNCTION ElastInsideResidual StiffMatrix % DValues(i) = StiffMatrix % DValues(i) - DisplacementRot(i) END IF END DO - BLOCK - TYPE(Solver_t), POINTER :: pSolver - pSolver => Solver - CALL EnforceDirichletConditions(pSolver, StiffMatrix, ForceVector) - END BLOCK + CALL EnforceDirichletConditions(Solver, StiffMatrix, ForceVector) END IF ! The initial guess for the displacement increment: diff --git a/fem/src/modules/PhaseChangeSolve.F90 b/fem/src/modules/PhaseChangeSolve.F90 index 1b31fb4966..4abd3c670e 100644 --- a/fem/src/modules/PhaseChangeSolve.F90 +++ b/fem/src/modules/PhaseChangeSolve.F90 @@ -394,7 +394,7 @@ SUBROUTINE PhaseChangeSolve( Model,Solver,dt,TransientSimulation ) ForceVector, LocalForceVector, n, 1, SurfPerm(NodeIndexes) ) END DO - CALL FinishAssembly( PSolver, ForceVector ) + CALL FinishAssembly( Solver, ForceVector ) ! No Dirihtlet conditions here since ! One should not really try to force the phase change at some point, @@ -465,7 +465,7 @@ SUBROUTINE PhaseChangeSolve( Model,Solver,dt,TransientSimulation ) ForceVector, LocalForceVector, n, 1, SurfPerm(NodeIndexes) ) END DO - CALL FinishAssembly( PSolver, ForceVector ) + CALL FinishAssembly( Solver, ForceVector ) CALL SolveSystem( StiffMatrix, ParMatrix, ForceVector, Surface, Norm, 1, Solver ) END IF diff --git a/fem/src/modules/ShellSolver.F90 b/fem/src/modules/ShellSolver.F90 index 1053e79422..e63d27b1eb 100644 --- a/fem/src/modules/ShellSolver.F90 +++ b/fem/src/modules/ShellSolver.F90 @@ -160,7 +160,7 @@ SUBROUTINE ShellSolver(Model, Solver, dt, TransientSimulation) IMPLICIT NONE !------------------------------------------------------------------------------ - TYPE(Solver_t), TARGET :: Solver + TYPE(Solver_t) :: Solver TYPE(Model_t) :: Model REAL(KIND=dp) :: dt LOGICAL :: TransientSimulation @@ -736,11 +736,7 @@ SUBROUTINE ShellSolver(Model, Solver, dt, TransientSimulation) Solver % Matrix % DValues(i) = Solver % Matrix % DValues(i) - Solver % Variable % Values(i) END IF END DO - BLOCK - TYPE(Solver_t), POINTER :: pSolver - pSolver => Solver - CALL EnforceDirichletConditions(pSolver, Solver % Matrix, Solver % Matrix % RHS) - END BLOCK + CALL EnforceDirichletConditions(Solver, Solver % Matrix, Solver % Matrix % RHS) END IF ! --------------------------------------------------------------------------------- diff --git a/fem/src/modules/TransportEquation.F90 b/fem/src/modules/TransportEquation.F90 index 606dae7965..fac7c0236c 100644 --- a/fem/src/modules/TransportEquation.F90 +++ b/fem/src/modules/TransportEquation.F90 @@ -75,7 +75,6 @@ SUBROUTINE TransportEquationSolver( Model, Solver, dt, TransientSimulation ) TYPE(Variable_t), POINTER :: FlowSol, Udot0Var TYPE(VariablePtr_t), POINTER :: U0Var(:) TYPE(ValueList_t), POINTER :: Material - TYPE(Solver_t), POINTER :: PSolver INTEGER :: i,j,k,p,n,t,body_id,bf_id,istat,LocalNodes,& AdvectionVariableComponents, VelocityComponents @@ -418,8 +417,7 @@ SUBROUTINE TransportEquationSolver( Model, Solver, dt, TransientSimulation ) ! Dirichlet boundary settings. Actually no need to call it except for ! transient simulations. !------------------------------------------------------------------------------ - PSolver => Solver - CALL FinishAssembly( PSolver, ForceVector ) + CALL FinishAssembly( Solver, ForceVector ) !------------------------------------------------------------------------------ ! Dirichlet boundary conditions From 546ab2e74daa9cc6dfd5b8ba846bf32d56d7c225 Mon Sep 17 00:00:00 2001 From: Juha Ruokolainen Date: Sat, 28 Sep 2024 10:13:40 +0300 Subject: [PATCH 12/38] As Mumps_SolveSystem() only available in parallel, use MumpsLocal_SolveSystem() for local solution. --- fem/src/VankaCreate.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fem/src/VankaCreate.F90 b/fem/src/VankaCreate.F90 index 60f8807e9e..a317a9b68a 100644 --- a/fem/src/VankaCreate.F90 +++ b/fem/src/VankaCreate.F90 @@ -704,7 +704,7 @@ SUBROUTINE CircuitPrec(u,v,ipar) IF(ANY(ABS(A % CircuitMatrix % Values)>0)) THEN #if !defined (HAVE_UMFPACK) && defined (HAVE_MUMPS) - CALL Mumps_SolveSystem( sv, A % CircuitMatrix, u(i:j), v(i:j) ) + CALL MumpsLocal_SolveSystem( sv, A % CircuitMatrix, u(i:j), v(i:j) ) #else CALL Umfpack_SolveSystem( sv, A % CircuitMatrix, u(i:j), v(i:j) ) #endif @@ -767,7 +767,7 @@ SUBROUTINE CircuitPrecComplex(u,v,ipar) END DO #if !defined (HAVE_UMFPACK) && defined (HAVE_MUMPS) - CALL Mumps_SolveSystem( sv, A % CircuitMatrix, ru, rv ) + CALL MumpsLocal_SolveSystem( sv, A % CircuitMatrix, ru, rv ) #else CALL Umfpack_SolveSystem( sv, A % CircuitMatrix, ru, rv ) #endif From 3fe2779a4ba312bf5e666bb6154579cdb6188e84 Mon Sep 17 00:00:00 2001 From: Thomas Zwinger Date: Sun, 29 Sep 2024 23:57:19 +0300 Subject: [PATCH 13/38] corrected Fortran compiler directive attribute to non existing variable to enable compilation with Intel compiler --- fem/src/SolverUtils.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fem/src/SolverUtils.F90 b/fem/src/SolverUtils.F90 index 74af478de8..93629110d1 100644 --- a/fem/src/SolverUtils.F90 +++ b/fem/src/SolverUtils.F90 @@ -848,7 +848,7 @@ SUBROUTINE UpdateGlobalEquationsVec( Gmtr, Lmtr, Gvec, Lvec, n, & INTEGER :: dim, i,j,k,np INTEGER :: NormalIndexes(n),pIndexes(64) REAL(KIND=dp) :: Vals(n*NDOFs) -!DIR$ ATTRIBUTES ALIGN:64::Ind, Vals +!DIR$ ATTRIBUTES ALIGN:64::Vals TYPE(Element_t), POINTER :: Element LOGICAL :: Rotate From 467f20fbcc188d706a1a0f43bb389f1784f0e8f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Thu, 26 Sep 2024 17:41:54 +0200 Subject: [PATCH 14/38] Rename folder for tests to match the name of the tests. --- .../CMakeLists.txt | 0 .../ELMERSOLVER_STARTINFO | 0 .../{LinearSolverNamespace => LinearSystemNamespace}/angle.grd | 0 .../{LinearSolverNamespace => LinearSystemNamespace}/case.sif | 0 .../runtest.cmake | 0 .../CMakeLists.txt | 0 .../ELMERSOLVER_STARTINFO | 0 .../{LinearSolverNamespace2 => LinearSystemNamespace2}/angle.grd | 0 .../{LinearSolverNamespace2 => LinearSystemNamespace2}/case.sif | 0 .../runtest.cmake | 0 10 files changed, 0 insertions(+), 0 deletions(-) rename fem/tests/{LinearSolverNamespace => LinearSystemNamespace}/CMakeLists.txt (100%) rename fem/tests/{LinearSolverNamespace => LinearSystemNamespace}/ELMERSOLVER_STARTINFO (100%) rename fem/tests/{LinearSolverNamespace => LinearSystemNamespace}/angle.grd (100%) rename fem/tests/{LinearSolverNamespace => LinearSystemNamespace}/case.sif (100%) rename fem/tests/{LinearSolverNamespace => LinearSystemNamespace}/runtest.cmake (100%) rename fem/tests/{LinearSolverNamespace2 => LinearSystemNamespace2}/CMakeLists.txt (100%) rename fem/tests/{LinearSolverNamespace2 => LinearSystemNamespace2}/ELMERSOLVER_STARTINFO (100%) rename fem/tests/{LinearSolverNamespace2 => LinearSystemNamespace2}/angle.grd (100%) rename fem/tests/{LinearSolverNamespace2 => LinearSystemNamespace2}/case.sif (100%) rename fem/tests/{LinearSolverNamespace2 => LinearSystemNamespace2}/runtest.cmake (100%) diff --git a/fem/tests/LinearSolverNamespace/CMakeLists.txt b/fem/tests/LinearSystemNamespace/CMakeLists.txt similarity index 100% rename from fem/tests/LinearSolverNamespace/CMakeLists.txt rename to fem/tests/LinearSystemNamespace/CMakeLists.txt diff --git a/fem/tests/LinearSolverNamespace/ELMERSOLVER_STARTINFO b/fem/tests/LinearSystemNamespace/ELMERSOLVER_STARTINFO similarity index 100% rename from fem/tests/LinearSolverNamespace/ELMERSOLVER_STARTINFO rename to fem/tests/LinearSystemNamespace/ELMERSOLVER_STARTINFO diff --git a/fem/tests/LinearSolverNamespace/angle.grd b/fem/tests/LinearSystemNamespace/angle.grd similarity index 100% rename from fem/tests/LinearSolverNamespace/angle.grd rename to fem/tests/LinearSystemNamespace/angle.grd diff --git a/fem/tests/LinearSolverNamespace/case.sif b/fem/tests/LinearSystemNamespace/case.sif similarity index 100% rename from fem/tests/LinearSolverNamespace/case.sif rename to fem/tests/LinearSystemNamespace/case.sif diff --git a/fem/tests/LinearSolverNamespace/runtest.cmake b/fem/tests/LinearSystemNamespace/runtest.cmake similarity index 100% rename from fem/tests/LinearSolverNamespace/runtest.cmake rename to fem/tests/LinearSystemNamespace/runtest.cmake diff --git a/fem/tests/LinearSolverNamespace2/CMakeLists.txt b/fem/tests/LinearSystemNamespace2/CMakeLists.txt similarity index 100% rename from fem/tests/LinearSolverNamespace2/CMakeLists.txt rename to fem/tests/LinearSystemNamespace2/CMakeLists.txt diff --git a/fem/tests/LinearSolverNamespace2/ELMERSOLVER_STARTINFO b/fem/tests/LinearSystemNamespace2/ELMERSOLVER_STARTINFO similarity index 100% rename from fem/tests/LinearSolverNamespace2/ELMERSOLVER_STARTINFO rename to fem/tests/LinearSystemNamespace2/ELMERSOLVER_STARTINFO diff --git a/fem/tests/LinearSolverNamespace2/angle.grd b/fem/tests/LinearSystemNamespace2/angle.grd similarity index 100% rename from fem/tests/LinearSolverNamespace2/angle.grd rename to fem/tests/LinearSystemNamespace2/angle.grd diff --git a/fem/tests/LinearSolverNamespace2/case.sif b/fem/tests/LinearSystemNamespace2/case.sif similarity index 100% rename from fem/tests/LinearSolverNamespace2/case.sif rename to fem/tests/LinearSystemNamespace2/case.sif diff --git a/fem/tests/LinearSolverNamespace2/runtest.cmake b/fem/tests/LinearSystemNamespace2/runtest.cmake similarity index 100% rename from fem/tests/LinearSolverNamespace2/runtest.cmake rename to fem/tests/LinearSystemNamespace2/runtest.cmake From 6f91129ae7d8b129bf5b764f992e83fa17d958dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Thu, 19 Sep 2024 16:20:01 +0200 Subject: [PATCH 15/38] Build with rocALUTION in CI on Ubuntu. --- .github/workflows/build.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 050431c08e..759dca539e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -86,14 +86,19 @@ jobs: $([ "${{ matrix.mpi }}" == "with" ] && echo "libhypre-dev") \ $([ "${{ matrix.mpi }}" == "with" ] && echo "libopenmpi-dev libmumps-dev libparmetis-dev") \ $([ "${{ matrix.compiler }}" == "gcc" ] && echo "libsuitesparse-dev") \ + $([ "${{ matrix.compiler }}" == "gcc" ] && [ "${{ matrix.mpi }}" == "with" ] && echo "librocalution-dev") \ libqwt-qt5-dev qtscript5-dev libqt5svg5-dev \ libvtk9-qt-dev libglvnd-dev \ occt-misc libocct-data-exchange-dev libocct-draw-dev \ $([ "${{ matrix.mpi }}" == "with" ] && echo "trilinos-all-dev libptscotch-dev") - name: configure - # CHOLMOD requires a working OpenMP package. So, disable it for clang. + # CHOLMOD and rocALUTION require a working OpenMP package. So, disable them for clang. run: | + # work around error in the rocALUTION CMake config file distributed by Ubuntu + if [ "${{ matrix.compiler }}" == "gcc" ] && [ "${{ matrix.mpi }}" == "with" ]; then + sudo sed -i '/find_dependency(HIP)/d' /usr/lib/x86_64-linux-gnu/cmake/rocalution/rocalution-config.cmake + fi mkdir ${GITHUB_WORKSPACE}/build cd ${GITHUB_WORKSPACE}/build cmake \ @@ -106,6 +111,7 @@ jobs: $([ "${{ matrix.mpi }}" == "with" ] && echo "-DWITH_Mumps=ON" || echo "-DWITH_Mumps=OFF") \ $([ "${{ matrix.compiler }}" == "gcc" ] && echo "-DWITH_CHOLMOD=ON" || echo "-DWITH_CHOLMOD=OFF") \ $([ "${{ matrix.mpi }}" == "with" ] && echo "-DWITH_Hypre=ON -DHYPRE_INCLUDE_DIR=/usr/include/hypre" || echo "-DWITH_Hypre=OFF") \ + $([ "${{ matrix.compiler }}" == "gcc" ] && [ "${{ matrix.mpi }}" == "with" ] && echo "-DWITH_ROCALUTION=ON" || echo "-DWITH_ROCALUTION=OFF") \ $([ "${{ matrix.mpi }}" == "with" ] && echo "-DWITH_ElmerIce=ON" || echo "-DWITH_ElmerIce=OFF") \ -DWITH_ELMERGUI=ON \ -DWITH_VTK=ON \ From f9463a7e7729a5d430be94b6298ce42c16d85730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Sun, 22 Sep 2024 17:36:23 +0200 Subject: [PATCH 16/38] rocALUTION solver: Use int type --- fem/src/rocalution.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fem/src/rocalution.cpp b/fem/src/rocalution.cpp index 584e4c5796..2274982301 100644 --- a/fem/src/rocalution.cpp +++ b/fem/src/rocalution.cpp @@ -116,13 +116,13 @@ void elmer_distribute_matrix(const MPI_Comm* comm, int boundary_nnz = 0; int neighbors = 0; - std::vector> boundary(num_procs, std::vector()); + std::vector> boundary(num_procs, std::vector()); std::vector neighbor(num_procs, false); std::vector> checked(num_procs, std::map()); for(int i = 0; i < local_nrow; ++i) { - for(PtrType j = local_row_offset[i]; j < local_row_offset[i + 1]; ++j) + for(int j = local_row_offset[i]; j < local_row_offset[i + 1]; ++j) { // Interior point @@ -275,7 +275,7 @@ void elmer_distribute_matrix(const MPI_Comm* comm, } // Create boundary index array - std::vector boundary_index(nnz_boundary); + std::vector boundary_index(nnz_boundary); k = 0; for(int i = 0; i < neighbors; ++i) From 37f9257400e7b86e8b662e7dd5d7388a9f7a20b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Sun, 22 Sep 2024 17:45:06 +0200 Subject: [PATCH 17/38] Fail early when configuring with rocALUTION without MPI. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f2710b4162..f679b29829 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -228,6 +228,10 @@ ENDIF(WITH_MPI) IF (WITH_ROCALUTION) + IF(NOT WITH_MPI) + MESSAGE(FATAL_ERROR "Building with rocALUTION requires MPI") + ENDIF() + MESSAGE(STATUS "------------------------------------------------") MESSAGE(STATUS "Looking for rocALUTION installation") From cc400793f71944a19fb0689de8ccbab8cbabec64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Sun, 22 Sep 2024 17:46:23 +0200 Subject: [PATCH 18/38] Cleanup status messages for rocALUTION during configure. Remove some duplicate status messages. --- CMakeLists.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f679b29829..a18c7f0b2b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -243,12 +243,6 @@ IF (WITH_ROCALUTION) SET(HAVE_ROCALUTION TRUE CACHE BOOL "") MARK_AS_ADVANCED(HAVE_ROCALUTION) - INCLUDE_DIRECTORIES("${ROCALUTION_INCLUDE_DIR}") - MESSAGE(STATUS " ---------------------------------") - MESSAGE(STATUS " ROCALTUION: " "${HAVE_ROCALUTION}") - MESSAGE(STATUS " ROCALTUON_INCLUDE_DIR: " "${ROCALUTION_INCLUDE_DIR}") - MESSAGE(STATUS " ROCALTUON_LIBRARY: " "${ROCALUTION_LIBRARY}") -# LINK_DIRECTORIES("${ROCALUTION_LINK_DIRECTORIES}") ENDIF() From 83d2f238d361d78633239a90675bc7b8dbb1435f Mon Sep 17 00:00:00 2001 From: Peter Raback Date: Tue, 1 Oct 2024 10:52:39 +0300 Subject: [PATCH 19/38] Generalize extrusion such that we can use more complicated meshing definitions for z-direction akin to features of ElmerGrid. --- fem/src/ElmerSolver.F90 | 15 +- fem/src/MeshUtils.F90 | 247 ++++++++++++++++++++++------ fem/src/modules/RigidMeshMapper.F90 | 17 +- 3 files changed, 211 insertions(+), 68 deletions(-) diff --git a/fem/src/ElmerSolver.F90 b/fem/src/ElmerSolver.F90 index 9dc9e33db6..1cf4cc98dd 100644 --- a/fem/src/ElmerSolver.F90 +++ b/fem/src/ElmerSolver.F90 @@ -845,26 +845,15 @@ END SUBROUTINE InitializeRandomSeed !-------------------------------------------------------------------- SUBROUTINE CreateExtrudedMesh() - INTEGER :: ExtrudeLayers LOGICAL :: SliceVersion IF(.NOT. ListCheckPrefix(CurrentModel % Simulation,'Extruded Mesh') ) RETURN - ExtrudeLayers = GetInteger(CurrentModel % Simulation,'Extruded Mesh Levels',Found)-1 - IF( .NOT. Found ) THEN - ExtrudeLayers = GetInteger(CurrentModel % Simulation,'Extruded Mesh Layers',Found) - END IF - IF(.NOT. Found ) RETURN - - IF(ExtrudeLayers < 2) THEN - CALL Fatal('MAIN','There must be at least two "Extruded Mesh Layers"!') - END IF - SliceVersion = GetLogical(CurrentModel % Simulation,'Extruded Mesh Slices',Found ) IF( SliceVersion ) THEN - ExtrudedMesh => MeshExtrudeSlices(CurrentModel % Meshes, ExtrudeLayers-1) + ExtrudedMesh => MeshExtrudeSlices(CurrentModel % Meshes, CurrentModel % Simulation ) ELSE - ExtrudedMesh => MeshExtrude(CurrentModel % Meshes, ExtrudeLayers-1) + ExtrudedMesh => MeshExtrude(CurrentModel % Meshes, CurrentModel % Simulation) END IF ! Make the solvers point to the extruded mesh, not the original mesh diff --git a/fem/src/MeshUtils.F90 b/fem/src/MeshUtils.F90 index 2d910f7442..bb45980b17 100644 --- a/fem/src/MeshUtils.F90 +++ b/fem/src/MeshUtils.F90 @@ -2491,8 +2491,7 @@ FUNCTION LoadMesh2( Model, MeshDirPar, MeshNamePar,& IF(.NOT. ListGetLogical( VList,'Finalize Meshes Before Extrusion',Found ) ) THEN ! The final preparation for the mesh (including dof definitions) will be ! done only after the mesh has been extruded. - IF( ListCheckPresent( VList,'Extruded Mesh Levels') .OR. & - ListCheckPresent( VList,'Extruded Mesh Layers') ) THEN + IF( ListCheckPrefix( VList,'Extruded Mesh') ) THEN CALL Info(Caller,'This mesh will be extruded, skipping finalization',Level=12) RETURN END IF @@ -17271,8 +17270,10 @@ SUBROUTINE GeometricUnitDivision(w, n, q) INTEGER :: i,j REAL(KIND=dp) :: r,h1 - - IF( ( ABS(ABS(q)-1.0_dp) < 1.0d-6 ) .OR. (q < 0.0_dp .AND. n <= 2) ) THEN + + IF( n < 1 ) THEN + CALL Fatal('GeometricUnitDivision','Cannot create division for '//I2S(n)//' element!') + ELSE IF( ( ABS(ABS(q)-1.0_dp) < 1.0d-6 ) .OR. (q < 0.0_dp .AND. n <= 2) .OR. n==1) THEN CALL Info('GeometricUnitDivision','Creating linear division',Level=8) DO i=0,n w(i) = i/(1._dp * n) @@ -17327,11 +17328,16 @@ SUBROUTINE FunctionUnitDivision(w, n, FunName, FunList ) CALL Info('FunctionUnitDivision','Creating functional division: '//TRIM(FunName),Level=5) + IF( n < 1 ) THEN + CALL Fatal('GeometricUnitDivision','Cannot create division for '//I2S(n)//' element!') + END IF + ! Initial guess is an even distribution DO i=0,n w(i) = i/(1._dp * n) END DO - + IF(n == 1 ) RETURN + ALLOCATE( wold(0:n),h(1:n)) wold = w @@ -17383,7 +17389,7 @@ SUBROUTINE FunctionUnitDivision(w, n, FunName, FunList ) END DO IF( iter > maxiter ) THEN - CALL Warn('UnitSegmentDivision','No convergence obtained for the unit mesh division!') + CALL Warn('FunctionUnitDivision','No convergence obtained for the unit mesh division!') END IF END SUBROUTINE FunctionUnitDivision @@ -17449,6 +17455,66 @@ END SUBROUTINE UnitSegmentDivision !------------------------------------------------------------------------------ + FUNCTION MapExtrudedMaterial(Vlist,mat0,ilayer,EndLayer) RESULT ( mat ) + TYPE(Valuelist_t), POINTER :: Vlist + INTEGER :: mat0, mat + INTEGER, OPTIONAL :: ilayer + LOGICAL, OPTIONAL :: EndLayer + + TYPE(ValueList_t), POINTER, SAVE :: PrevList + LOGICAL, SAVE :: EndMat, ExtMat + INTEGER, POINTER, SAVE :: ExtrudedElements(:) + INTEGER, ALLOCATABLE, SAVE :: InvExtrudedElements(:) + INTEGER, SAVE :: nDiv, nElems + INTEGER :: i,j + LOGICAL :: SetMat + + IF(.NOT. ASSOCIATED(PrevList,Vlist)) THEN + IF(ALLOCATED(InvExtrudedElements)) DEALLOCATE(InvExtrudedElements) + + PrevList => Vlist + EndMat = ListCheckPresent( Vlist,'Extruded Mesh End Map') + IF(EndMat) THEN + CALL Info('MapExtrudedMaterial','Extruded Mesh will be mapped at the ends!') + END IF + + ExtrudedElements => ListGetIntegerArray(Vlist,'Extruded Elements',ExtMat) + IF(ExtMat) THEN + nDiv = SIZE(ExtrudedElements) + nElems = SUM(ExtrudedElements) + ALLOCATE(InvExtrudedElements(nElems)) + InvExtrudedElements = 0 + j = 0 + DO i=1,nDiv + IF( ExtrudedElements(i) == 0) CYCLE + InvExtrudedElements(j+1:j+ExtrudedElements(i)) = i + j = j+ExtrudedElements(i) + END DO + ELSE + nElems = ListGetInteger(Vlist,'Extruded Mesh Layers',UnfoundFatal=.TRUE.) + END IF + END IF + + mat = mat0 + IF( EndMat ) THEN + IF(ilayer < 1 .OR. ilayer > nElems ) THEN + CALL Fatal('MapExtrudedMaterial','Invalid body id: '//I2S(ilayer)) + END IF + + SetMat = .FALSE. + IF( ExtMat ) THEN + j = InvExtrudedElements(ilayer) + SetMat = (j==1 .OR. j==nDiv) + ELSE + SetMat = (ilayer==1 .OR. ilayer==nElems) + END IF + IF(SetMat) mat = NINT(ListGetFun( Vlist,'Extruded Mesh End Map',1.0_dp * mat0 ) ) + END IF + + END FUNCTION MapExtrudedMaterial + + + SUBROUTINE CheckPointElementParents(Mesh) TYPE(Mesh_t), POINTER :: Mesh LOGICAL :: Found @@ -17512,8 +17578,102 @@ SUBROUTINE CheckPointElementParents(Mesh) END DO END SUBROUTINE CheckPointElementParents + + ! Collect here the routines that defines the division in the exruded direction. + !----------------------------------------------------------------------------- + SUBROUTINE ExtrudedDivision(Vlist, nlevels, Wtable) + TYPE(ValueList_t), POINTER :: Vlist + INTEGER :: nlevels + REAL(KIND=dp), ALLOCATABLE :: Wtable(:) + LOGICAL :: Found, GotLimits + REAL(KIND=dp) :: q,zmin,zmax,z + INTEGER :: i,j,k,nDiv + REAL(KIND=dp), POINTER :: ExtrudedLimits(:,:), ExtrudedSizes(:,:), ExtrudedRatios(:,:) + INTEGER, POINTER :: ExtrudedElements(:) + REAL(KIND=dp), ALLOCATABLE :: Wtmp(:) + + nlevels = ListGetInteger(Vlist,'Extruded Mesh Layers',Found) + IF( .NOT. Found ) THEN + nlevels = ListGetInteger(Vlist,'Extruded Mesh Levels',Found)-1 + IF(Found) THEN + CALL ListAddNewInteger(Vlist,'Extruded Mesh Layers',nlevels) + END IF + END IF + IF(Found ) THEN + q = ListGetCReal(Vlist,'Extruded Mesh Ratio',Found ) + IF(.NOT. Found) q = 1.0_dp + ALLOCATE(Wtable(0:nlevels)) + CALL UnitSegmentDivision(Wtable,nlevels,Vlist) + zmin = ListGetCReal(Vlist,'Extruded Min Coordinate',Found ) + zmax = ListGetCReal(Vlist,'Extruded Max Coordinate',Found ) + IF(.NOT. Found) zmax = 1.0_dp + + Wtable = zmin + (zmax-zmin) * Wtable + ELSE + ExtrudedElements => ListGetIntegerArray(Vlist,'Extruded Elements',Found) + IF(.NOT. Found ) CALL Fatal('ExtrudedDivision','We should not even be here!') + nDiv = SIZE(ExtrudedElements) + + ExtrudedLimits => ListGetConstRealArray(Vlist,'Extruded Limits',GotLimits) + IF(GotLimits) THEN + IF(SIZE(ExtrudedLimits,1) /= nDiv+1 .OR. SIZE(ExtrudedLimits,2) /= 1) THEN + CALL Fatal('ExtrudedDivision','Incompatible size for "Extruded Limits"') + END IF + ELSE + ExtrudedSizes => ListGetConstRealArray(Vlist,'Extruded Sizes',Found ) + IF(.NOT. Found) THEN + CALL Fatal('ExtrudedDivision','Give either "Extruded Limits" or "Extruded Sizes"!') + END IF + IF(SIZE(ExtrudedSizes,1) /= nDiv .OR. SIZE(ExtrudedSizes,2) /= 1) THEN + CALL Fatal('ExtrudedDivision','Incompatible size for "Extruded Sizes"') + END IF + END IF + + ExtrudedRatios => ListGetConstRealArray(Vlist,'Extruded Ratios',Found) + IF(Found) THEN + IF(SIZE(ExtrudedRatios,1) /= nDiv .OR. SIZE(ExtrudedRatios,2) /= 1) THEN + CALL Fatal('ExtrudedDivision','Incompatible size for "Extruded Elements"') + END IF + END IF + + i = MAXVAL(ExtrudedElements) + nlevels = SUM(ExtrudedElements) + ALLOCATE(Wtable(0:nlevels),Wtmp(0:i)) + j = 0 + q = 1.0_dp + DO i=1,nDiv + IF(ASSOCIATED(ExtrudedRatios)) q = ExtrudedRatios(i,1) + + k = ExtrudedElements(i) + CALL GeometricUnitDivision(Wtmp,k,q) + + IF(GotLimits) THEN + Wtable(j:j+k) = ExtrudedLimits(i,1) + & + Wtmp(0:k)*(ExtrudedLimits(i+1,1)-ExtrudedLimits(i,1)) + ELSE + Wtable(j:j+k) = z + ExtrudedSizes(i,1)*Wtmp(0:k) + z = z + ExtrudedSizes(i,1) + END IF + j = j + k + END DO + DO i=0,nlevels + WRITE( Message, '(A,I0,A,ES12.4)') 'w(',i,') : ',wTable(i) + CALL Info('ExtrudedDivision', Message ) + END DO + + !CALL ListAddNewConstReal(Vlist,'Extruded Min Coordinate',Wtable(0) ) + !CALL ListAddNewConstReal(Vlist,'Extruded Max Coordinate',Wtable(nlevels) ) + END IF + + IF(nlevels < 2) THEN + CALL Fatal('ExtrudedDivision','There must be at least two "Extruded Mesh Layers"!') + END IF + + END SUBROUTINE ExtrudedDivision + + !------------------------------------------------------------------------------ !> Given a 2D mesh extrude it to be 3D. The 3rd coordinate will always !> be at the interval [0,1]. Therefore the adaptation for different shapes @@ -17523,10 +17683,10 @@ END SUBROUTINE CheckPointElementParents !> NOTE: This function handles NDOFs of the element structure in a way !> which is not consistent with "Element = n:N ...", with N>1 !------------------------------------------------------------------------------ - FUNCTION MeshExtrude(Mesh_in, in_levels) RESULT(Mesh_out) + FUNCTION MeshExtrude(Mesh_in, Vlist) RESULT(Mesh_out) !------------------------------------------------------------------------------ TYPE(Mesh_t), POINTER :: Mesh_in, Mesh_out - INTEGER :: in_levels + TYPE(ValueList_t), POINTER :: Vlist !------------------------------------------------------------------------------ CHARACTER(:), ALLOCATABLE :: ExtrudedMeshName INTEGER :: i,j,k,l,n,cnt,ind(8),max_baseline_bid,max_bid,l_n,max_body,& @@ -17535,24 +17695,27 @@ FUNCTION MeshExtrude(Mesh_in, in_levels) RESULT(Mesh_out) TYPE(ParallelInfo_t), POINTER :: PI_in, PI_out INTEGER :: nnodes,gnodes,gelements,ierr,bcignored,cnt101 LOGICAL :: isParallel, Found, PreserveBaseline, Rotational, Rotate2Pi, CollectExtrudedBCs - REAL(KIND=dp)::w,MinCoord,MaxCoord,CurrCoord + REAL(KIND=dp)::CurrCoord REAL(KIND=dp), POINTER :: ActiveCoord(:) REAL(KIND=dp), ALLOCATABLE :: Wtable(:) INTEGER, POINTER :: BCLayers(:), TmpLayers(:) INTEGER :: NoBCLayers, bcoffset, baseline0, bclevel, BaseLineLayer, bcind, & - m, max_bid0 + m, max_bid0, in_levels, nlev INTEGER :: BcCounter(100) LOGICAL :: GotBCLayers, DoCount CHARACTER(*), PARAMETER :: Caller="MeshExtrude" !------------------------------------------------------------------------------ - CALL Info(Caller,'Creating '//I2S(in_levels+1)//' extruded element layers',Level=10) - Mesh_out => AllocateMesh() - isParallel = ( ParEnv % PEs > 1 ) + ! Create the division for the 1D mesh + !-------------------------------------------- + CALL ExtrudedDivision(Vlist,nlev,Wtable) + CALL Info(Caller,'Creating '//I2S(nlev)//' extruded element layers',Level=10) + in_levels = nlev-1 + ! Generate volume nodal points: ! ----------------------------- n = Mesh_in % NumberOfNodes @@ -17613,12 +17776,6 @@ FUNCTION MeshExtrude(Mesh_in, in_levels) RESULT(Mesh_out) CALL Info(Caller,'Global count of original elements: '//I2S(gelements),Level=12) CALL Info(Caller,'Number of nodes for extruded mesh: '//I2S(nnodes),Level=12) - - ! Create the division for the 1D unit mesh - !-------------------------------------------- - ALLOCATE( Wtable( 0: in_levels + 1 ) ) - CALL UnitSegmentDivision( Wtable, in_levels + 1 ) - ExtrudedCoord = ListGetInteger( CurrentModel % Simulation,'Extruded Coordinate Index', & Found, minv=1,maxv=3 ) IF(.NOT. Found) ExtrudedCoord = Mesh_in % MeshDim + 1 @@ -17635,18 +17792,12 @@ FUNCTION MeshExtrude(Mesh_in, in_levels) RESULT(Mesh_out) PreserveBaseline = ListGetLogical( CurrentModel % Simulation,'Preserve Baseline',Found ) IF(.NOT. Found) PreserveBaseline = .FALSE. - MinCoord = ListGetConstReal( CurrentModel % Simulation,'Extruded Min Coordinate',Found ) - IF(.NOT. Found) MinCoord = 0.0_dp - - MaxCoord = ListGetConstReal( CurrentModel % Simulation,'Extruded Max Coordinate',Found ) - IF(.NOT. Found) MaxCoord = 1.0_dp - CollectExtrudedBCs = ListGetLogical( CurrentModel % Simulation,'Extruded BCs Collect',Found ) Rotate2Pi = .FALSE. Rotational = ListGetLogical( CurrentModel % Simulation,'Extruded Mesh Rotational',Found ) IF( Rotational ) THEN - Rotate2Pi = ( ABS(ABS( MaxCoord-MinCoord ) - 2*PI) < 1.0d-3*PI ) + Rotate2Pi = ( ABS(MAXVAL(Wtable)-MINVAL(Wtable) - 2*PI) < 1.0d-3*PI ) IF( Rotate2Pi ) CALL Info(Caller,'Perfoming full 2Pi rotation',Level=6) END IF @@ -17718,10 +17869,8 @@ FUNCTION MeshExtrude(Mesh_in, in_levels) RESULT(Mesh_out) ! If we rotate full 2Pi then we have natural closure! IF( Rotate2Pi ) THEN IF( i == in_levels+1) EXIT - END IF - - w = Wtable( i ) - CurrCoord = w * MaxCoord + (1-w) * MinCoord + END IF + CurrCoord = Wtable( i ) DO j=1,Mesh_in % NumberOfNodes @@ -17830,9 +17979,11 @@ FUNCTION MeshExtrude(Mesh_in, in_levels) RESULT(Mesh_out) Elem_in => Mesh_in % Elements(j) Elem_out => Mesh_out % Elements(cnt) - Elem_out % BodyId = Elem_in % BodyId + !Elem_out % BodyId = Elem_in % BodyId + Elem_out % BodyId = MapExtrudedMaterial(Vlist,Elem_in % BodyId,i+1) + Elem_out % PartIndex = Elem_in % PartIndex - + ! If we have internal BC layers then find the correct index for the body IF( NoBCLayers > 2 ) THEN DO k=1,NoBCLayers-1 @@ -18227,10 +18378,10 @@ END FUNCTION MeshExtrude !> but also the communication pattern. A separate routine was made in order to avoid !> introducing of bugs as the internal extrusion is a widely used feature. !------------------------------------------------------------------------------ - FUNCTION MeshExtrudeSlices(Mesh_in, in_levels) RESULT(Mesh_out) + FUNCTION MeshExtrudeSlices(Mesh_in, Vlist) RESULT(Mesh_out) !------------------------------------------------------------------------------ TYPE(Mesh_t), POINTER :: Mesh_in, Mesh_out - INTEGER :: in_levels + TYPE(ValueList_t), POINTER :: Vlist !------------------------------------------------------------------------------ CHARACTER(:), ALLOCATABLE :: ExtrudedMeshName INTEGER :: i,j,k,l,n,m,cnt,ind(8),bid,max_bid,l_n,max_body,bcid,& @@ -18242,17 +18393,14 @@ FUNCTION MeshExtrudeSlices(Mesh_in, in_levels) RESULT(Mesh_out) nParMesh,nParExt,OrigPart,ElemCode,bodyid LOGICAL :: isParallel, SingleIn, Found, TopBC, BotBC, CollectExtrudedBCs INTEGER,ALLOCATABLE :: ChildBCs(:) - REAL(KIND=dp)::w,MinCoord,MaxCoord,CurrCoord,zmin,zmax + REAL(KIND=dp)::CurrCoord REAL(KIND=dp), POINTER :: ActiveCoord(:) REAL(KIND=dp), ALLOCATABLE :: Wtable(:) CHARACTER(*), PARAMETER :: Caller="MeshExtrudeSlices" !------------------------------------------------------------------------------ ! The historical choice in_levels in annoying when we want to split the divisions. - nlev = in_levels+1 - CALL Info(Caller,'Creating '//I2S(nlev)//' extruded element layers',Level=10) - IF( ListGetLogical( CurrentModel % Simulation,'Preserve Baseline',Found ) ) & CALL Fatal(Caller,'The slice version cannot handle "Preserve Baseline"!') @@ -18262,10 +18410,10 @@ FUNCTION MeshExtrudeSlices(Mesh_in, in_levels) RESULT(Mesh_out) isParallel = ( ParEnv % PEs > 1 ) SingleIn = Mesh_in % SingleMesh - ! Create the division for the 1D unit mesh + ! Create the division for the 1D mesh !-------------------------------------------- - ALLOCATE( Wtable( 0: nlev ) ) - CALL UnitSegmentDivision( Wtable, nlev ) + CALL ExtrudedDivision(Vlist,nlev,Wtable) + CALL Info(Caller,'Creating '//I2S(nlev)//' extruded element layers',Level=10) ! In parallel let us pick only our own share of the ! division. This logic makes it possible to have nonuniform divisions easily. @@ -18295,6 +18443,7 @@ FUNCTION MeshExtrudeSlices(Mesh_in, in_levels) RESULT(Mesh_out) ELSE nParExt = 1 nParMesh = 1 + ilev = 0 END IF ! Allocate extruded mesh: @@ -18325,11 +18474,6 @@ FUNCTION MeshExtrudeSlices(Mesh_in, in_levels) RESULT(Mesh_out) ActiveCoord => Mesh_out % Nodes % z END IF - MinCoord = ListGetConstReal( CurrentModel % Simulation,'Extruded Min Coordinate',Found ) - IF(.NOT. Found) MinCoord = 0.0_dp - MaxCoord = ListGetConstReal( CurrentModel % Simulation,'Extruded Max Coordinate',Found ) - IF(.NOT. Found) MaxCoord = 1.0_dp - CollectExtrudedBCs = ListGetLogical( CurrentModel % Simulation,'Extruded BCs Collect',Found ) IF (isParallel) THEN @@ -18378,14 +18522,10 @@ FUNCTION MeshExtrudeSlices(Mesh_in, in_levels) RESULT(Mesh_out) CALL Info(Caller,'Number of nodes in layer: '//I2S(gnodes),Level=12) CALL Info(Caller,'Number of elements in layer: '//I2S(gelements),Level=12) - !CALL Info(Caller,'Number of extruded nodes: '//I2S((nlev+1)*gnodes),Level=7) - !CALL Info(Caller,'Number of exruded elements: '//I2S(nlev*gelements),Level=7) - cnt=0 DO i=0,nlev - w = Wtable( i ) - CurrCoord = w * MaxCoord + (1-w) * MinCoord + CurrCoord = Wtable(i) DO j=1,Mesh_in % NumberOfNodes @@ -18472,6 +18612,9 @@ FUNCTION MeshExtrudeSlices(Mesh_in, in_levels) RESULT(Mesh_out) Element => Mesh_out % Elements(cnt) Element = Mesh_in % Elements(j) + bodyid = Element % BodyId + Element % BodyId = MapExtrudedMaterial(Vlist,bodyid,ilev+i+1) + l_n = Mesh_in % Elements(j) % TYPE % NumberOfNodes ind(1:l_n) = Mesh_in % Elements(j) % NodeIndexes(1:l_n)+i*n ind(l_n+1:2*l_n) = Mesh_in % Elements(j) % NodeIndexes(1:l_n)+(i+1)*n @@ -25480,7 +25623,7 @@ END SUBROUTINE CalculateMeshPieces !------------------------------------------------------------------------------ - !------------------------------------------------------------------------------ +!------------------------------------------------------------------------------ !> Compute radius of rotor using only topology information. !> Assumes that axis of rotation is z-axis. !------------------------------------------------------------------------------ diff --git a/fem/src/modules/RigidMeshMapper.F90 b/fem/src/modules/RigidMeshMapper.F90 index f6f72f8cde..aee893e1b1 100644 --- a/fem/src/modules/RigidMeshMapper.F90 +++ b/fem/src/modules/RigidMeshMapper.F90 @@ -178,12 +178,20 @@ SUBROUTINE RigidMeshMapper( Model,Solver,dt,Transient ) StatorSkew = AngleCoeff * ListGetCReal(CurrentModel % Simulation,'Stator Skew',Found ) GotSkew = GotSkew .OR. GotSkewFun .OR. Found IF( GotSkew ) THEN - zmax = ListGetCReal( CurrentModel % Simulation,'Extruded Max Coordinate',Found ) + zmax = ListGetCReal( CurrentModel % Simulation,'Rotor Skew Max Coordinate',Found ) + IF(.NOT. Found) THEN + zmax = ListGetCReal( CurrentModel % Simulation,'Extruded Max Coordinate',Found ) + IF(.NOT. Found) zmax = ParallelReduction(MAXVAL(Zorig)) + END IF IF(.NOT. Found) THEN CALL Fatal(Caller,'"Rotor Skew" currently requires "Extruded Max Coordinate" to be given!') + END IF + zmin = ListGetCReal( CurrentModel % Simulation,'Rotor Skew Min Coordinate',Found ) + IF(.NOT. Found) THEN + zmin = ListGetCReal( CurrentModel % Simulation,'Extruded Min Coordinate',Found ) + IF(.NOT. Found) zmin = ParallelReduction(MINVAL(Zorig)) END IF - zmin = ListGetCReal( CurrentModel % Simulation,'Extruded Min Coordinate',Found ) - IF(InfoActive(5)) THEN + IF(InfoActive(20)) THEN PRINT *,'RotorSkew:',RotorSkew, StatorSkew, zmin, zmax, GotSkew, GotSkewFun END IF END IF @@ -219,6 +227,9 @@ SUBROUTINE RigidMeshMapper( Model,Solver,dt,Transient ) ! Skew is not constant, perform it for each node 1st if requested. zloc = (coord(3)-zmin)/(zmax-zmin) + ! By construction this must be in [0,1] + zloc = MAX(0.0_dp,MIN(1.0_dp,zloc)) + IF( IsRotor ) THEN IF(GotSkewFun) THEN alpha = AngleCoeff * ListGetFun( CurrentModel % Simulation,'Rotor Skew Function',zloc) From 09c25dc58eb54ec045ea4b577370fee77ce8fe8b Mon Sep 17 00:00:00 2001 From: Peter Raback Date: Tue, 1 Oct 2024 11:02:26 +0300 Subject: [PATCH 20/38] Minimal changes in magnetodynamics. --- fem/src/modules/MagnetoDynamics/CalcFields.F90 | 6 ++++-- fem/src/modules/MagnetoDynamics2D.F90 | 5 ----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/fem/src/modules/MagnetoDynamics/CalcFields.F90 b/fem/src/modules/MagnetoDynamics/CalcFields.F90 index f973352b43..53875117f1 100644 --- a/fem/src/modules/MagnetoDynamics/CalcFields.F90 +++ b/fem/src/modules/MagnetoDynamics/CalcFields.F90 @@ -613,7 +613,7 @@ SUBROUTINE MagnetoDynamicsCalcFields(Model,Solver,dt,Transient) COMPLEX(KIND=dp), ALLOCATABLE :: Magnetization(:,:), BodyForceCurrDens(:,:) COMPLEX(KIND=dp), ALLOCATABLE :: R_Z(:), PR(:) !------------------------------------------------------------------------------ - REAL(KIND=dp) :: s,Norm + REAL(KIND=dp) :: s,Norm, Mult REAL(KIND=dp) :: B(2,3), E(2,3), JatIP(2,3), VP_ip(2,3), JXBatIP(2,3), CC_J(2,3), HdotB, LMSol(2) REAL(KIND=dp) :: ldetJ,detJ, C_ip, ST(3,3), Omega, ThinLinePower, Power, Energy(3), w_dens REAL(KIND=dp) :: localThickness @@ -1150,7 +1150,9 @@ SUBROUTINE MagnetoDynamicsCalcFields(Model,Solver,dt,Transient) n, Element % NodeIndexes, Found), 0, KIND=dp) END IF END SELECT - + + Mult = ListGetCReal( BodyForce,'Current Density Multiplier', Found ) + IF(Found) BodyForceCurrDens(1:3,1:n) = Mult * BodyForceCurrDens(1:3,1:n) END IF END IF diff --git a/fem/src/modules/MagnetoDynamics2D.F90 b/fem/src/modules/MagnetoDynamics2D.F90 index a0c6ba012b..e1f7ce50eb 100755 --- a/fem/src/modules/MagnetoDynamics2D.F90 +++ b/fem/src/modules/MagnetoDynamics2D.F90 @@ -443,11 +443,6 @@ SUBROUTINE CalculateLumpedTransient(Torque) HaveRange = .TRUE. ELSE rmean = ListGetConstReal( CurrentModel % Simulation,'Rotor Radius',CalcTorque) - rmean = ParallelReduction( rmean, 2 ) - IF(.NOT. CalcTorque .AND. rmean > EPSILON(rmean) ) THEN - CALL ListAddConstReal( CurrentModel % Simulation,'Rotor Radius',rmean) - CalcTorque = .TRUE. - END IF rdiff = ListGetConstReal( CurrentModel % Simulation,'Rotor Air Gap Width',Found) IF(.NOT. Found ) rdiff = 1.0e-3 * rmean HaveRange = .FALSE. From ad1f48eb2daea802e34cb540ec9aab3ff293abcf Mon Sep 17 00:00:00 2001 From: Peter Raback Date: Tue, 1 Oct 2024 11:24:55 +0300 Subject: [PATCH 21/38] Harmonic the computation of torque between 2D and 3D magnetodynamics. Add torque tolerance also to 3D. --- .../MagnetoDynamics/WhitneyAVSolver.F90 | 784 +++++++++++------- 1 file changed, 472 insertions(+), 312 deletions(-) diff --git a/fem/src/modules/MagnetoDynamics/WhitneyAVSolver.F90 b/fem/src/modules/MagnetoDynamics/WhitneyAVSolver.F90 index 4870f818a4..3011ace05c 100644 --- a/fem/src/modules/MagnetoDynamics/WhitneyAVSolver.F90 +++ b/fem/src/modules/MagnetoDynamics/WhitneyAVSolver.F90 @@ -371,7 +371,11 @@ SUBROUTINE WhitneyAVSolver( Model,Solver,dt,Transient ) TYPE(ValueHandle_t), SAVE :: mu_h TYPE(Solver_t), POINTER :: pSolver - + + REAL(KIND=dp) :: TorqueTol + LOGICAL :: UseTorqueTol + + CHARACTER(*), PARAMETER :: Caller = 'WhitneyAVSolver' SAVE STIFF, LOAD, MASS, DAMP, FORCE, JFixFORCE, JFixVec, Tcoef, GapLength, AirGapMu, & Acoef, Cwrk, LamThick, LamCond, Wbase, RotM, AllocationsDone, & @@ -379,12 +383,12 @@ SUBROUTINE WhitneyAVSolver( Model,Solver,dt,Transient ) !------------------------------------------------------------------------------ IF ( .NOT. ASSOCIATED( Solver % Matrix ) ) RETURN - CALL Info('WhitneyAVSolver','',Level=6 ) - CALL Info('WhitneyAVSolver','-------------------------------------------------',Level=6 ) + CALL Info(Caller,'',Level=6 ) + CALL Info(Caller,'-------------------------------------------------',Level=6 ) IF( Transient ) THEN - CALL Info('WhitneyAVSolver','Solving transient AV equations with edge elements',Level=5 ) + CALL Info(Caller,'Solving transient AV equations with edge elements',Level=5 ) ELSE - CALL Info('WhitneyAVSolver','Solving steady-state AV equations with edge elements',Level=5 ) + CALL Info(Caller,'Solving steady-state AV equations with edge elements',Level=5 ) END IF SolverParams => GetSolverParams() @@ -395,7 +399,7 @@ SUBROUTINE WhitneyAVSolver( Model,Solver,dt,Transient ) CALL EdgeElementStyle(SolverParams, PiolaVersion, SecondOrder ) IF (PiolaVersion) THEN - CALL Info('WhitneyAVSolver', & + CALL Info(Caller, & 'Using Piola Transformed element basis functions',Level=4) END IF @@ -416,14 +420,14 @@ SUBROUTINE WhitneyAVSolver( Model,Solver,dt,Transient ) IF( UseCoilCurrent ) THEN CoilCurrentVar => VariableGet(Solver % Mesh % Variables, CoilCurrentName ) IF( ASSOCIATED( CoilCurrentVar ) ) THEN - CALL Info('WhitneyAVSolver','Using precomputed field for current density: '//TRIM(CoilCurrentName),Level=5) + CALL Info(Caller,'Using precomputed field for current density: '//TRIM(CoilCurrentName),Level=5) IF( CoilCurrentVar % TYPE == Variable_on_nodes_on_elements ) THEN ElemCurrent = .TRUE. ELSE - CALL Warn('WhitneyAVSolver','Precomputed CoilCurrent is not an elemental field!') + CALL Warn(Caller,'Precomputed CoilCurrent is not an elemental field!') END IF ELSE - CALL Fatal('WhitneyAVSolver','Elemental current requested but not found:'//TRIM(CoilCurrentName)) + CALL Fatal(Caller,'Elemental current requested but not found:'//TRIM(CoilCurrentName)) END IF END IF @@ -477,9 +481,9 @@ SUBROUTINE WhitneyAVSolver( Model,Solver,dt,Transient ) IF ( HasStabC ) THEN WRITE (Message, *) 'Lagrange Gauge penalization coefficient', gauge_penalize_c - CALL Info('WhitneyAVSolver', message) + CALL Info(Caller, message) WRITE (Message, *) 'Lagrange Gauge penalization coefficient mass', gauge_penalize_m - CALL Info('WhitneyAVSolver', message) + CALL Info(Caller, message) END IF ! Gauge tree, if requested or using direct solver: @@ -489,9 +493,9 @@ SUBROUTINE WhitneyAVSolver( Model,Solver,dt,Transient ) IF (.NOT. (SteadyGauge .OR. TransientGauge)) THEN IF( GetString(SolverParams,'Linear System Solver',Found)=='direct') THEN IF( PiolaVersion ) THEN - CALL Fatal('WhitneyAVSolver','Direct solver (with tree gauge) is only possible with the lowest order edge basis!') + CALL Fatal(Caller,'Direct solver (with tree gauge) is only possible with the lowest order edge basis!') ELSE - CALL Info('WhitneyAVSolver','Defaulting to tree gauge when using direct solver') + CALL Info(Caller,'Defaulting to tree gauge when using direct solver') TG = .TRUE. END IF END IF @@ -499,10 +503,11 @@ SUBROUTINE WhitneyAVSolver( Model,Solver,dt,Transient ) END IF IF( PiolaVersion .AND. TG ) THEN - CALL Fatal('WhitneyAVSolver', & - 'Tree Gauge cannot be used in conjunction with Piola transformation') + CALL Fatal(Caller,'Tree Gauge cannot be used in conjunction with Piola transformation') END IF + TorqueTol = GetCReal(SolverParams,'Nonlinear System Torque Tolerance',UseTorqueTol) + IF(UseTorqueTol) CALL Info(Caller,'Using additional nonlinear tolerance for torque',Level=10) !Allocate some permanent storage, this is done first time only: !-------------------------------------------------------------- @@ -525,7 +530,7 @@ SUBROUTINE WhitneyAVSolver( Model,Solver,dt,Transient ) LamCond(N), Wbase(N), RotM(3,3,N), & ThinLineCrossect(N), ThinLineCond(N), STAT=istat ) IF ( istat /= 0 ) THEN - CALL Fatal( 'WhitneyAVSolver', 'Memory allocation error.' ) + CALL Fatal( Caller, 'Memory allocation error.' ) END IF IF(GetString(SolverParams,'Linear System Solver',Found)=='block') THEN @@ -580,13 +585,13 @@ SUBROUTINE WhitneyAVSolver( Model,Solver,dt,Transient ) CALL JFixPotentialSolver(Model,Solver,dt,Transient) JFixVar => VariableGet(Mesh % Variables, 'JFix') IF(.NOT. ASSOCIATED( JFixRhs ) ) THEN - CALL Fatal('WhitneyAVSolver','JFixRhs should be associated!') + CALL Fatal(Caller,'JFixRhs should be associated!') END IF IF(.NOT. ASSOCIATED( JFixSurfacePerm ) ) THEN - CALL Fatal('WhitneyAVSolver','JFixSurfacePerm should be associated!') + CALL Fatal(Caller,'JFixSurfacePerm should be associated!') END IF IF(.NOT. ALLOCATED( JFixSurfaceVec ) ) THEN - CALL Fatal('WhitneyAVSolver','JFixSurfaceVec should be associated!') + CALL Fatal(Caller,'JFixSurfaceVec should be associated!') END IF END IF @@ -632,14 +637,14 @@ SUBROUTINE WhitneyAVSolver( Model,Solver,dt,Transient ) Newton = GetLogical( SolverParams,'Newton-Raphson iteration',Found) IF(.NOT. Found ) Newton = ( i > NewtonIter .OR. Solver % Variable % NonlinChange < NewtonTol ) IF( NoIterationsMax > 1 ) THEN - CALL Info('WhitneyAVSolver','Nonlinear iteration: '//I2S(i),Level=8 ) + CALL Info(Caller,'Nonlinear iteration: '//I2S(i),Level=8 ) END IF IF( DoSolve(i) ) THEN IF(i>=NoIterationsMin) EXIT END IF IF( EdgeBasis ) CALL ListAddLogical(SolverParams,'Linear System Refactorize',.FALSE.) - + ! Currently assume that the source terms are constant over the nonlinear iteration JFixSolve = .FALSE. END DO @@ -650,8 +655,8 @@ SUBROUTINE WhitneyAVSolver( Model,Solver,dt,Transient ) END IF PrevDT = dt - CALL CalculateLumped(Model % NumberOfBodyForces) - + IF(.NOT. UseTorqueTol) CALL CalculateLumpedParameters() + CoordVar => VariableGet(Mesh % Variables,'Coordinates') IF(ASSOCIATED(CoordVar)) THEN DO i=1,Mesh % NumberOfNodes @@ -664,8 +669,8 @@ SUBROUTINE WhitneyAVSolver( Model,Solver,dt,Transient ) CALL DefaultFinish() - CALL Info('WhitneyAVSolver','All done',Level=8 ) - CALL Info('WhitneyAVSolver','-------------------------------------------',Level=8 ) + CALL Info(Caller,'All done',Level=8 ) + CALL Info(Caller,'-------------------------------------------',Level=8 ) CONTAINS @@ -686,7 +691,8 @@ LOGICAL FUNCTION DoSolve(IterNo) RESULT(Converged) REAL(KIND=dp), DIMENSION(:), ALLOCATABLE :: TmpRVec, TmpRHSVec CHARACTER(LEN=MAX_NAME_LEN) :: ConvergenceType REAL(KIND=dp), POINTER CONTIG :: SaveValues(:), SaveRHS(:), ConstraintValues(:) - + REAL(KIND=dp) :: PrevTorque, TorqueErr, Torque + SAVE TmpRHSVec, TmpRVec !----------------- @@ -730,7 +736,7 @@ LOGICAL FUNCTION DoSolve(IterNo) RESULT(Converged) DEALLOCATE(Tcoef) ALLOCATE(Tcoef(3,3,n), STAT=istat) IF ( istat /= 0 ) THEN - CALL Fatal( 'WhitneyAVSolver', 'Memory allocation error.' ) + CALL Fatal( Caller, 'Memory allocation error.' ) END IF END IF @@ -796,7 +802,7 @@ LOGICAL FUNCTION DoSolve(IterNo) RESULT(Converged) CoilBody = .TRUE. CALL GetElementRotM(Element, RotM, n) CASE DEFAULT - CALL Fatal ('WhitneyAVSolver', 'Non existent Coil Type Chosen!') + CALL Fatal (Caller, 'Non existent Coil Type Chosen!') END SELECT ConstraintActive = GetLogical(CompParams, 'Activate Constraint', Found ) END IF @@ -820,7 +826,7 @@ LOGICAL FUNCTION DoSolve(IterNo) RESULT(Converged) CALL GetReluctivity(Material,Acoef,n) END IF IF (HasTensorReluctivity) THEN - IF (size(Acoef_t,1)/=3) CALL Fatal('WhitneyAVSolver', & + IF (size(Acoef_t,1)/=3) CALL Fatal(Caller, & 'Reluctivity tensor should be of size 3x3') END IF END IF @@ -838,13 +844,13 @@ LOGICAL FUNCTION DoSolve(IterNo) RESULT(Converged) SELECT CASE(LaminateStackModel) CASE('low-frequency model') LamThick(1:n) = GetReal( Material, 'Laminate Thickness', Found ) - IF (.NOT. Found) CALL Fatal('WhitneyAVSolver', 'Laminate Thickness not found!') + IF (.NOT. Found) CALL Fatal(Caller, 'Laminate Thickness not found!') LamCond(1:n) = GetReal( Material, 'Laminate Stack Conductivity', Found ) - IF (.NOT. Found) CALL Fatal('WhitneyAVSolver', 'Laminate Stack Conductivity not found!') + IF (.NOT. Found) CALL Fatal(Caller, 'Laminate Stack Conductivity not found!') CASE DEFAULT - CALL WARN('WhitneyAVSolver', 'Nonexistent Laminate Stack Model chosen!') + CALL WARN(Caller, 'Nonexistent Laminate Stack Model chosen!') END SELECT END IF @@ -892,11 +898,11 @@ LOGICAL FUNCTION DoSolve(IterNo) RESULT(Converged) ! If we are solving the fixing potential for this nonlinear iteration then ! add its contribution to the AV equation. IF( JFixSolve ) THEN - CALL Info('WhitneyAVSolver','Solving the fixing potential',Level=7) + CALL Info(Caller,'Solving the fixing potential',Level=7) JFixPhase = 2 IF( ListGetLogical( SolverParams,'Precomputed Fixing Term',Found ) ) THEN - CALL Info('WhitneyAVSolver','Adding precomputed source term: g fix') + CALL Info(Caller,'Adding precomputed source term: g fix') Var => VariableGet( Mesh % Variables,'g fix') JFixRhs = JfixRhs + Var % Values END IF @@ -904,7 +910,7 @@ LOGICAL FUNCTION DoSolve(IterNo) RESULT(Converged) CALL JFixPotentialSolver(Model,Solver,dt,Transient) - CALL Info('WhitneyAVSolver','Adding the fixing potential to the r.h.s. of AV equation',Level=10) + CALL Info(Caller,'Adding the fixing potential to the r.h.s. of AV equation',Level=10) DO t=1,active Element => GetActiveElement(t) n = GetElementNOFNodes() @@ -913,14 +919,14 @@ LOGICAL FUNCTION DoSolve(IterNo) RESULT(Converged) CALL LocalFixMatrix( FORCE, Element, n, nd+nb, PiolaVersion, SecondOrder) END DO - CALL Info('WhitneyAVSolver','Finished adding the fixing potential',Level=10) + CALL Info(Caller,'Finished adding the fixing potential',Level=10) END IF ! This adds a precomputed source term to r.h.s. of the equation. ! Note that this is assumed to be already mapped to nodes. IF( ListGetLogical( SolverParams,'Precomputed Source Term',Found ) ) THEN - CALL Info('WhitneyAVSolver','Adding precomputed source term: g') + CALL Info(Caller,'Adding precomputed source term: g') Var => VariableGet( Mesh % Variables,'g') Solver % Matrix % Rhs = Solver % Matrix % Rhs + Var % Values END IF @@ -978,7 +984,7 @@ LOGICAL FUNCTION DoSolve(IterNo) RESULT(Converged) ! The basis function evaluation is not implemented for all basis types ! within LocalMatrixThinLine, check for the consistency: - IF (.NOT. PiolaVersion) CALL Warn('WhitneyAVSolver', & + IF (.NOT. PiolaVersion) CALL Warn(Caller, & 'The implementation of thin line element may need Use Piola Transform = True') CALL LocalMatrixThinLine(MASS,STIFF,FORCE,LOAD,ThinLineCrossect,ThinLineCond,Element,n,nd, & @@ -1155,7 +1161,7 @@ LOGICAL FUNCTION DoSolve(IterNo) RESULT(Converged) IF (TG) THEN IF ( .NOT.ALLOCATED(TreeEdges) ) & CALL GaugeTree(Solver,Mesh,TreeEdges,FluxCount,FluxMap,Transient) - CALL Info('WhitneyAVSolver', 'Volume tree edges: '//i2s(COUNT(TreeEdges))// & + CALL Info(Caller, 'Volume tree edges: '//i2s(COUNT(TreeEdges))// & ' of total: '//I2S(Mesh % NumberOfEdges),Level=5) DO i=1,SIZE(TreeEdges) @@ -1193,8 +1199,33 @@ LOGICAL FUNCTION DoSolve(IterNo) RESULT(Converged) END IF norm = DefaultSolve() - Converged = Solver % Variable % NonlinConverged==1 + Converged = ( Solver % Variable % NonlinConverged == 1 ) + + IF( UseTorqueTol ) THEN + PrevTorque = Torque + CALL CalculateLumpedParameters(Torque) + IF( iterNo >= 2 ) THEN + TorqueErr = 2 * ABS(PrevTorque-Torque) / (ABS(PrevTorque)+ABS(Torque)) + IF( TorqueErr > TorqueTol ) THEN + WRITE(Message,'(A,ES12.3)') 'Torque error at iteration '//I2S(iterNo)//':',TorqueErr + CALL Info(Caller,Message,Level=6) + END IF + END IF + END IF + + CALL Info(Caller,'Convergence status: '//I2S(Solver % Variable % NonlinConverged),Level=12) + IF( Converged ) THEN + CALL Info(Caller,'System has converged to tolerances after '//I2S(iterNo)//' iterations!',Level=12) + IF( UseTorqueTol ) THEN + IF( TorqueErr > TorqueTol ) THEN + CALL Info(Caller,'Nonlinear system tolerance ok after '& + //I2S(iterNo)//' but torque still wobbly!',Level=7) + Converged = .FALSE. + END IF + END IF + END IF + IF( ListGetLogical( SolverParams,'Calculate Magnetic Norm',Found ) .OR. & ListGetLogical( SolverParams,'Use Magnetic Norm', Found ) ) THEN BLOCK @@ -1233,25 +1264,24 @@ LOGICAL FUNCTION DoSolve(IterNo) RESULT(Converged) bnorm = SQRT(binteg/vinteg) WRITE( Message,'(A,ES15.6)') 'Magnetic field norm:',bnorm - CALL Info('WhitneyAVSolver', Message, Level=4) + CALL Info(Caller, Message, Level=4) CALL ListAddConstReal( Model % Simulation,'res: magnetic norm',bnorm ) WRITE( Message,'(A,ES15.6)') 'Magnetic field minimum value:',bmin - CALL Info('WhitneyAVSolver', Message, Level=8 ) + CALL Info(Caller, Message, Level=8 ) WRITE( Message,'(A,ES15.6)') 'Magnetic field maximum value:',bmax - CALL Info('WhitneyAVSolver', Message, Level=8 ) + CALL Info(Caller, Message, Level=8 ) IF( ListGetLogical( SolverParams,'Use Magnetic Norm',Found ) ) THEN - CALL Info('WhitneyAVSolver','Setting solver norm to magnetic norm!') + CALL Info(Caller,'Setting solver norm to magnetic norm!') Solver % Variable % Norm = bnorm END IF END BLOCK END IF - 10 CONTINUE @@ -1305,75 +1335,337 @@ END SUBROUTINE ConstrainUnused !------------------------------------------------------------------------------ - SUBROUTINE CalculateLumped(nbf) + SUBROUTINE CalculateLumpedSurface() !------------------------------------------------------------------------------ IMPLICIT NONE - INTEGER::nbf !------------------------------------------------------------------------------ - REAL(KIND=dp) :: torq,a(nbf),u(nbf),IMoment,IA,zforce,zzforce - INTEGER :: i,bfid,n,nd,EdgeBasisDegree - LOGICAL :: Found, CalcTorque,CalcPotential,CalcInertia - TYPE(ValueList_t),POINTER::Params + REAL(KIND=dp) :: zzforce + INTEGER :: i,n,nd,EdgeBasisDegree + LOGICAL :: Found TYPE(ELement_t), POINTER :: Element, Parent !------------------------------------------------------------------------------ - CalcTorque = ListCheckPresentAnyBody(Model,'r inner') - CalcPotential = ListGetLogicalAnyBodyForce( Model,'Calculate Potential') - CalcInertia = ListGetLogicalAnyBody( Model,'Calculate Inertial Moment') - - IF(.NOT. (CalcTorque .OR. CalcPotential .OR. CalcInertia ) ) RETURN - EdgeBasisDegree = 1 IF (SecondOrder) EdgeBasisDegree = 2 - U=0._dp; a=0._dp; torq=0._dp; IMoment=0._dp;IA=0; zforce=0 - DO i=1,GetNOFActive() - Element => GetActiveElement(i) - nd = GetElementNOFDOFs(Element) - n = GetElementNOFNodes(Element) + zzforce = 0 + DO i=1,Mesh % NumberOFBoundaryElements + Element => GetBoundaryElement(i) + IF (.NOT.GetLogical(GetBC(), 'Calculate Axial Force', Found ) ) CYCLE + + Parent => Element % BoundaryInfo % Left + n = GetELementNofNodes(Parent) + nd = GetELementNofDOFs(Parent) + CALL AxialForceSurf(zzforce,Element,n,nd,EdgeBasisDegree) + END DO - IF( CalcTorque ) THEN - CALL Torque(Torq,Element,n,nd,EdgeBasisDegree) - CALL AxialForce(zforce,Element,n,nd,EdgeBasisDegree) - END IF + zzforce = ParallelReduction(zzforce) + CALL ListAddConstReal(Model % Simulation,'res: Axial force(surf)', zzforce ) - IF( CalcPotential ) THEN - Params=>GetBodyForce(Element) - IF(ASSOCIATED(Params)) THEN - bfid=GetBodyForceId(Element) - IF(GetLogical(Params,'Calculate Potential',Found)) & - CALL Potential(u(bfid),a(bfid),Element,n,nd,EdgeBasisDegree) +!------------------------------------------------------------------------------ + END SUBROUTINE CalculateLumpedSurface +!------------------------------------------------------------------------------ + + +!------------------------------------------------------------------------------ +! This is monolithic lumping routine copied from the 2D solver in the hope that +! we could use exactly same keywords and logic for torque computation etc. +!------------------------------------------------------------------------------ + SUBROUTINE CalculateLumpedParameters(Torque) +!------------------------------------------------------------------------------ + REAL(KIND=dp), OPTIONAL :: Torque + + REAL(KIND=dp) :: torq,TorqArea,IMoment,IA, & + rinner,router,rmean,rdiff,ctorq,detJ,Weight,& + Bp,Br,Bx,By,Bz,x,y,z,r,rho,zmin,zmax,AxialForce + REAL(KIND=dp), ALLOCATABLE :: a(:),u(:),POT(:),dPOT(:), & + pPot(:),Density(:) + REAL(KIND=dp), POINTER :: Basis(:), dBasisdx(:,:), RotWBasis(:,:), WBasis(:,:) + LOGICAL, ALLOCATABLE :: TorqueElem(:) + INTEGER :: i,bfid,n,nd,nbf,PrevComm,NoSlices,NoTimes,np + LOGICAL :: Found, Stat + TYPE(ValueList_t),POINTER::Params + TYPE(GaussIntegrationPoints_t) :: IP + TYPE(Nodes_t) :: Nodes + LOGICAL :: CalcTorque, CalcPot, CalcInert + LOGICAL :: ThisTorque, ThisPot, ThisInert, ThisAxial, Parallel, HaveRange + LOGICAL :: Visited = .FALSE. + INTEGER :: EdgeBasisDegree, dim + LOGICAL :: SliceAverage, WbaseFound + REAL(KIND=dp) :: W(3) + REAL(KIND=dp), POINTER :: Wpot(:) + + SAVE Visited, Nodes, Basis, dBasisdx, a, u, POT, dPOT, pPot, & + Density, Ctorq, TorqueElem, RotWBasis, WBasis, zmin, zmax, & + Wpot + +!------------------------------------------------------------------------------ + + CALL Info(Caller,'Calculating lumped parameters',Level=8) + + ! By construction + dim = 3 + + IF( dim == 3 ) THEN + NoSlices = 1 + SliceAverage = .FALSE. + ELSE + NoSlices = MAX(1,ListGetInteger( Model % Simulation,'Number Of Slices', SliceAverage ) ) + END IF + + NoTimes = ListGetInteger( Model % Simulation,'Number Of Times', Found ) + IF( NoTimes > 1 ) THEN + PrevComm = ParEnv % ActiveComm + ParEnv % ActiveComm = ParallelSlicesComm() + END IF + + ! Define whether we have something to compute + ! Old way is to give radius range. + ! New way uses rotor radius + neighboring element layer. + rinner = ListGetCRealAnyBody( Model,'r inner',CalcTorque ) + IF( CalcTorque ) THEN + router = ListGetCRealAnyBody( Model,'r outer') + rmean = (rinner+router)/2 + rdiff = (router-rinner) + HaveRange = .TRUE. + ELSE + rmean = ListGetConstReal( CurrentModel % Simulation,'Rotor Radius',CalcTorque) + rdiff = ListGetConstReal( CurrentModel % Simulation,'Rotor Air Gap Width',Found) + IF(.NOT. Found ) rdiff = 1.0e-3 * rmean + HaveRange = .FALSE. + END IF + + CalcPot = ListGetLogicalAnyBodyForce( Model,'Calculate Potential' ) + CalcInert = CalcTorque .AND. .NOT. Visited + + + IF( PRESENT(Torque) .AND. .NOT. CalcTorque ) THEN + CALL Fatal(Caller,'Torque tolerance requested, but torque not computed!') + END IF + + IF(.NOT. (CalcTorque .OR. CalcPot .OR. CalcInert) ) RETURN + + Parallel = ( ParEnv % PEs > 1 ) + + nbf = Model % NumberOfBodyForces + IF(.NOT. Visited ) THEN + n = Model % Mesh % MaxElementDofs + ALLOCATE( a(nbf), u(nbf), POT(n), dPOT(n), pPot(n), Density(n), & + Basis(n), dBasisdx(n,3), RotWBasis(n,3),WBasis(n,3),Wpot(n)) + END IF + + IF( CalcTorque ) THEN + torq = 0._dp + TorqArea = 0._dp + AxialForce = 0.0_dp + END IF + IF( CalcInert ) THEN + IMoment = 0._dp + IA = 0.0_dp + END IF + IF( CalcPot ) THEN + U=0._dp + a=0._dp + END IF + + IF (SecondOrder) THEN + EdgeBasisDegree = 2 + ELSE + EdgeBasisDegree = 1 + END IF + + IF(.NOT. Visited .AND. CalcTorque ) THEN + zmin = HUGE(zmin) + zmax = -HUGE(zmax) + ALLOCATE( TorqueElem( GetNOFActive() ) ) + TorqueElem = .FALSE. + + DO i=1,GetNOFActive() + Element => GetActiveElement(i) + + ThisTorque = .FALSE. + + n = GetElementNOFNodes(Element) + CALL GetElementNodes( Nodes, Element ) + + IF( HaveRange ) THEN + ! We are given range in classical Arkkio style. + ! Check how the center lies with respect to the range. + x = SUM(Nodes % x(1:n))/n + y = SUM(Nodes % y(1:n))/n + r = SQRT(x**2+y**2) + IF (r >= rinner .AND. r <= router) THEN + TorqueElem(i) = .TRUE. + END IF + ELSE + ! We are not given a range. Just take any element + ! which has even one node at the given radius. + DO j=1,n + x = Nodes % x(j) + y = Nodes % y(j) + r = SQRT(x**2+y**2) + IF( ABS(r-rmean) < rdiff / 2 ) THEN + TorqueElem(i) = .TRUE. + EXIT + END IF + END DO END IF + + IF(TorqueElem(i)) THEN + zmin = MIN(MINVAL(Nodes % z(1:n)), zmin) + zmax = MAX(MAXVAL(Nodes % z(1:n)), zmin) + END IF + END DO + + i = COUNT( TorqueElem ) + i = ParallelReduction(i) + CALL Info(Caller,'Number of elements to compute torque: '//I2S(i)) + + IF( dim == 3 ) THEN + zmin = ParallelReduction(zmin,1) + zmax = ParallelReduction(zmax,2) + WRITE(Message,'(A,2ES12.3)') 'Torque compute range in z-direction',zmin,zmax + CALL Info(Caller,Message) END IF + END IF - IF( CalcInertia ) THEN + + DO i=1,GetNOFActive() + Element => GetActiveElement(i) + n = GetElementNOFNodes(Element) + + ThisTorque = .FALSE. + ThisPot = .FALSE. + ThisInert = .FALSE. + + IF( CalcPot ) THEN + Params => GetBodyForce(Element) + IF(ASSOCIATED(Params)) THEN + ThisPot = GetLogical(Params,'Calculate Potential',Found) + IF( ThisPot ) THEN + bfid = GetBodyForceId(Element) + CALL GetLocalSolution(POT, UElement=Element) + CALL GetLocalSolution(pPOT,tstep=-1,UElement=Element) + IF(Solver % Order<2.OR.GetTimeStep()<=2) THEN + dPot = (POT - pPOT)/dt + ELSE + dPot = 1.5_dp*POT - 2*pPOT + CALL GetLocalSolution(pPOT,tstep=-2,UElement=Element) + dPot = (dPOT + 0.5_dp*pPOT)/dt + END IF + IF( dim == 3 ) THEN + CALL GetLocalSolution(Wpot,'W',UElement=Element) + W = [0._dp, 0._dp, 1._dp] + WbaseFound = ANY(ABS(Wpot(1:n)) > 1.0e-20 ) + END IF + END IF + END IF + END IF + + IF( CalcInert ) THEN Params=>GetBodyParams(Element) IF(ASSOCIATED(Params)) THEN - IF(GetLogical(Params,'Calculate Inertial Moment',Found)) & - CALL InertialMoment(IMoment,IA,Element,n,nd) + ThisInert = GetLogical(Params,'Calculate Inertial Moment',Found) + END IF + Density(1:n) = GetReal(GetMaterial(),'Density',Found,Element) + END IF + + IF( CalcTorque ) THEN + ThisTorque = TorqueElem(i) + IF(ThisTorque .AND. .NOT. ThisPot ) THEN + CALL GetLocalSolution(POT, UElement=Element) END IF END IF - END DO - zzforce = 0 - IF(ListGetLogicalAnyBC(Model,'Calculate Axial Force')) THEN - DO i=1,Mesh % NumberOFBoundaryElements - Element => GetBoundaryElement(i) - IF (.NOT.GetLogical(GetBC(), 'Calculate Axial Force', Found ) ) CYCLE - - Parent => Element % BoundaryInfo % Left - n = GetELementNofNodes(Parent) - nd = GetELementNofDOFs(Parent) - CALL AxialForceSurf(zzforce,Element,n,nd,EdgeBasisDegree) - END DO - END IF + ! Only treat the element if we have something to compute + IF( .NOT. (ThisPot .OR. ThisInert .OR. ThisTorque ) ) CYCLE + + nd = GetElementNOFDOFs(Element) + IF(dim==3) THEN + np = n*pSolver % Def_Dofs(GetElementFamily(Element),Element % BodyId,1) + END IF + CALL GetElementNodes( Nodes, Element ) - IF( CalcPotential ) THEN - DO i=1,nbf - a(i) = ParallelReduction(a(i)) - u(i) = ParallelReduction(u(i)) + ! Numerical integration: + !----------------------- + IF( dim == 3 ) THEN + IP = GaussPoints(Element, EdgeBasis=.TRUE., PReferenceElement=PiolaVersion, & + EdgeBasisDegree=EdgeBasisDegree) + ELSE + IP = GaussPoints(Element) + END IF + + DO t=1,IP % n + ! Basis function values & derivatives at the integration point: + !-------------------------------------------------------------- + IF( dim == 3 ) THEN + stat = ElementInfo( Element, Nodes, IP % U(t), IP % V(t), & + IP % W(t), detJ, Basis, dBasisdx, EdgeBasis = WBasis, & + RotBasis = RotWBasis, USolver = pSolver ) + ELSE + stat = ElementInfo( Element, Nodes, IP % U(t), IP % V(t), & + IP % W(t), detJ, Basis, dBasisdx ) + END IF + weight = IP % s(t) * detJ + + ! Coordinates of the integration point + x = SUM(Nodes % x(1:n)*Basis(1:n)) + y = SUM(Nodes % y(1:n)*Basis(1:n)) + r = SQRT(x**2+y**2) + + IF(ThisPot ) THEN + A(bfid) = A(bfid) + Weight + IF( dim == 3 ) THEN + IF( WbaseFound ) W = MATMUL(Wpot(1:n),dBasisdx(1:n,:)) + U(bfid) = U(bfid) + Weight * SUM(dPot(np+1:nd)*MATMUL(WBasis(1:nd-np,:),w)) + ELSE + U(bfid) = U(bfid) + Weight * SUM(dPot(1:nd)*Basis(1:nd)) + END IF + END IF + + IF( ThisTorque ) THEN + IF( dim == 3 ) THEN + Bx = SUM(POT(np+1:nd) * RotWBasis(1:nd-np,1)) + By = SUM(POT(np+1:nd) * RotWBasis(1:nd-np,2)) + ELSE + Bx = SUM(POT(1:nd)*dBasisdx(1:nd,2)) + By = -SUM(POT(1:nd)*dBasisdx(1:nd,1)) + END IF + + Br = x/r*Bx + y/r*By + Bp = -y/r*Bx + x/r*By + + Torq = Torq + Weight * r*Br*Bp / (PI*4.0d-7*rdiff) + TorqArea = TorqArea + Weight + + IF( dim == 3 ) THEN + Bz = SUM(POT(np+1:nd) * RotWBasis(1:nd-np,3)) + AxialForce = AxialForce + Weight*1*(Bx*Bz*x/r+By*Bz*y/r)/(PI*4.0d-7*rdiff) + END IF + END IF + + IF( ThisInert ) THEN + IF( r < rmean ) THEN + rho = SUM( density(1:n) * Basis(1:n) ) + IF( rho > EPSILON( rho ) ) THEN + IA = IA + Weight + U = U + Weight * r * rho + END IF + END IF + END IF END DO + END DO + ! Finally perform parallel reduction if needed, and + ! store the results for saving by SaveScalars. + !------------------------------------------------------------------------- + IF( CalcPot ) THEN + IF( ParEnv % PEs > 1 ) THEN + DO i=1,nbf + a(i) = ParallelReduction(a(i)) / NoSlices + u(i) = ParallelReduction(u(i)) / NoSlices + END DO + END IF DO i=1,nbf IF(a(i)>0) THEN CALL ListAddConstReal(Model % Simulation,'res: Potential / bodyforce ' & @@ -1383,180 +1675,100 @@ SUBROUTINE CalculateLumped(nbf) END IF END DO END IF + + IF( CalcTorque ) THEN + ! Arkkios formula assumes that rinner and router are nicely aligned with elements. + ! This may not the case, so the 1st time we make a geomeric correction. + IF(.NOT. Visited ) THEN + WRITE(Message,'(A,ES15.4)') 'Air gap initial torque:', Torq + CALL Info(Caller,Message,Level=6) + + TorqArea = ParallelReduction(TorqArea) / NoSlices + IF (TorqArea > EPSILON(TorqArea) ) THEN + IF( dim == 3 ) THEN + Ctorq = 2 * PI * rmean * rdiff * (zmax-zmin) / TorqArea + ELSE + Ctorq = 2 * PI * rmean * rdiff / TorqArea + END IF + + WRITE(Message,'(A,F8.4)') 'Air gap correction initial:', cTorq + CALL Info(Caller,Message,Level=4) + + ! The correction factor also corrects for the number of periods. + ! We don't want that - so let us take back that and the torque + ! can be compared to inertial moment of the sector still. + i = ListGetInteger( CurrentModel % Simulation,'Rotor Periods',Found ) + IF( Parallel ) i = ParallelReduction( i, 2 ) + IF( i > 1 ) THEN + WRITE(Message,'(A,I0)') 'Air gap correction rotor periods: ',i + CALL Info(Caller,Message,Level=4) + Ctorq = Ctorq / i + END IF + ELSE + Ctorq = 1.0_dp + END IF + + WRITE(Message,'(A,F8.4)') 'Air gap correction:', cTorq + CALL Info(Caller,Message,Level=4) + !CALL ListAddConstReal(Model % Simulation,'res: air gap correction', cTorq) + END IF + + Torq = Ctorq * Torq + + IF( SliceAverage ) THEN + ! Save slice torque even for one slice since then the output for scalars is the same + ! for any number of slices. + WRITE(Message,'(A,ES15.4)') 'Air gap torque for slice'//I2S(ParEnv % MyPe)//':', Torq + CALL Info(Caller,Message,Level=5) + CALL ListAddConstReal(Model % Simulation,'res: air gap torque for slice', Torq) + END IF + + ! But the averaging makes sense only for more than one slice + Torq = ParallelReduction(Torq) / NoSlices + WRITE(Message,'(A,ES15.4)') 'Air gap torque:', Torq + CALL Info(Caller,Message,Level=5) + CALL ListAddConstReal(Model % Simulation,'res: air gap torque', Torq) + + IF( dim == 3) THEN + AxialForce = Ctorq * AxialForce + AxialForce = ParallelReduction(AxialForce) + CALL ListAddConstReal(Model % Simulation,'res: Axial Force(vol)', AxialForce ) + END IF + + IF(PRESENT(Torque)) Torque = Torq - IF( CalcTorque ) THEN - Torq = ParallelReduction(Torq) - CALL ListAddConstReal(Model % Simulation,'res: Air Gap Torque', Torq) - zforce = ParallelReduction(zforce) - CALL ListAddConstReal(Model % Simulation,'res: Axial Force(vol)', zforce) - + ! This is placed here so that the legacy order of "res:" stuff is honored. IF(ListGetLogicalAnyBC(Model,'Calculate Axial Force')) THEN - zzforce = ParallelReduction(zzforce) - CALL ListAddConstReal(Model % Simulation,'res: Axial force(surf)', zzforce ) + CALL CalculateLumpedSurface() END IF END IF - IF( CalcInertia ) THEN - IMoment = ParallelReduction(IMoment) - IA = ParallelReduction(IA) - CALL ListAddConstReal(Model % Simulation,'res: Inertial Volume', IA) - CALL ListAddConstReal(Model % Simulation,'res: Inertial Moment', IMoment) - END IF - -!------------------------------------------------------------------------------ - END SUBROUTINE CalculateLumped -!------------------------------------------------------------------------------ - - -!------------------------------------------------------------------------------ - SUBROUTINE InertialMoment(U,A,Element,n,nd) -!------------------------------------------------------------------------------ - IMPLICIT NONE - INTEGER :: n,nd - REAL(KIND=dp)::U,a - TYPE(Element_t)::Element -!------------------------------------------------------------------------------ - REAL(KIND=dp) :: Basis(n), DetJ,x,y,r,Density(n) - INTEGER :: t - LOGICAL :: stat,Found - TYPE(Nodes_t), SAVE :: Nodes - TYPE(GaussIntegrationPoints_t) :: IP - !$OMP THREADPRIVATE(Nodes) - - Density(1:n) = GetReal(GetMaterial(),'Density',Found,Element) - IF(.NOT.Found) RETURN - - CALL GetElementNodes( Nodes, Element ) - - !Numerical integration: - !---------------------- - IP = GaussPoints(Element) - DO t=1,IP % n - ! Basis function values & derivatives at the integration point: - !-------------------------------------------------------------- - stat = ElementInfo( Element, Nodes, IP % U(t), IP % V(t), & - IP % W(t), detJ, Basis ) - - x = SUM(Nodes % x(1:n)*Basis(1:n)) - y = SUM(Nodes % y(1:n)*Basis(1:n)) - r = SQRT(x**2+y**2) - A = A + IP % s(t)*detJ - U = U + IP % s(t)*detJ*R*SUM(Density(1:n)*Basis(1:n)) - END DO -!------------------------------------------------------------------------------ - END SUBROUTINE InertialMoment -!------------------------------------------------------------------------------ - -!------------------------------------------------------------------------------ - SUBROUTINE Torque(U,Element,n,nd,EdgeBasisDegree) -!------------------------------------------------------------------------------ - IMPLICIT NONE - INTEGER :: n,nd,EdgeBasisDegree - REAL(KIND=dp)::U - TYPE(Element_t)::Element -!------------------------------------------------------------------------------ - REAL(KIND=dp) :: dBasisdx(nd,3),Basis(nd), DetJ, & - POT(nd),x,y,r,r0,r1,Br,Bp,Bx,By,B(3,nd),Wbasis(nd,3),RotWBasis(nd,3) - INTEGER :: t - LOGICAL :: stat, Found - TYPE(Nodes_t), SAVE :: Nodes - TYPE(GaussIntegrationPoints_t) :: IP - !$OMP THREADPRIVATE(Nodes) - - r0 = GetCReal(GetBodyParams(),'r inner',Found) - r1 = GetCReal(GetBodyParams(),'r outer',Found) - IF (.NOT.Found) RETURN - - CALL GetElementNodes( Nodes, Element ) - - x = SUM(Nodes % x(1:n))/n - y = SUM(Nodes % y(1:n))/n - r = SQRT(x**2+y**2) - IF (rr1) RETURN - - CALL GetLocalSolution(POT, UElement=Element) - - !Numerical integration: - !---------------------- - IP = GaussPoints(Element, EdgeBasis=.TRUE., PReferenceElement=PiolaVersion, & - EdgeBasisDegree=EdgeBasisDegree) - - DO t=1,IP % n - ! Basis function values & derivatives at the integration point: - !-------------------------------------------------------------- - - stat = ElementInfo( Element, Nodes, IP % U(t), IP % V(t), & - IP % W(t), detJ, Basis, dBasisdx, EdgeBasis = WBasis, & - RotBasis = RotWBasis, USolver = pSolver ) - - x = SUM(Nodes % x(1:n)*Basis(1:n)) - y = SUM(Nodes % y(1:n)*Basis(1:n)) - r = SQRT(x**2+y**2) + + IF( CalcInert ) THEN + IF( Parallel ) THEN + IMoment = ParallelReduction(IMoment) / NoSlices + IA = ParallelReduction(IA) / NoSlices + END IF - Bx = SUM(POT(n+1:nd) * RotWBasis(1:nd-n,1)) - By = SUM(POT(n+1:nd) * RotWBasis(1:nd-n,2)) - Br = x/r*Bx + y/r*By - Bp = -y/r*Bx + x/r*By - U = U + IP % s(t)*detJ*r*Br*Bp/(PI*4.0d-7*(r1-r0)) - END DO -!------------------------------------------------------------------------------ - END SUBROUTINE Torque -!------------------------------------------------------------------------------ + WRITE(Message,'(A,ES15.4)') 'Inertial volume:', IA + CALL Info(Caller,Message,Level=7) + WRITE(Message,'(A,ES15.4)') 'Inertial moment:', Imoment + CALL Info(Caller,Message,Level=7) + + CALL ListAddConstReal(Model % Simulation,'res: inertial volume', IA) + CALL ListAddConstReal(Model % Simulation,'res: inertial moment', IMoment) + END IF + + Visited = .TRUE. + + ! Revert the communicatior back to original + IF( NoTimes > 1 ) ParEnv % ActiveComm = PrevComm + !------------------------------------------------------------------------------ - SUBROUTINE AxialForce(U,Element,n,nd,EdgeBasisDegree) -!------------------------------------------------------------------------------ - IMPLICIT NONE - INTEGER :: n,nd,EdgeBasisDegree - REAL(KIND=dp)::U - TYPE(Element_t)::Element + END SUBROUTINE CalculateLumpedParameters !------------------------------------------------------------------------------ - REAL(KIND=dp) :: dBasisdx(nd,3),Basis(nd), DetJ, & - POT(nd),x,y,r,r0,r1,Bx,By,Bz,B(3,nd),Wbasis(nd,3),RotWBasis(nd,3) - INTEGER :: t - LOGICAL :: stat, Found - TYPE(Nodes_t), SAVE :: Nodes - TYPE(GaussIntegrationPoints_t) :: IP - !$OMP THREADPRIVATE(Nodes) - - r0 = GetCReal(GetBodyParams(),'r inner',Found) - r1 = GetCReal(GetBodyParams(),'r outer',Found) - IF (.NOT.Found) RETURN - - CALL GetElementNodes( Nodes, Element ) - - x = SUM(Nodes % x(1:n))/n - y = SUM(Nodes % y(1:n))/n - r = SQRT(x**2+y**2) - IF (rr1) RETURN - - CALL GetLocalSolution(POT, UElement=Element) - - !Numerical integration: - !---------------------- - IP = GaussPoints(Element, EdgeBasis=.TRUE., PReferenceElement=PiolaVersion, & - EdgeBasisDegree=EdgeBasisDegree) - - DO t=1,IP % n - ! Basis function values & derivatives at the integration point: - !-------------------------------------------------------------- - stat = ElementInfo( Element, Nodes, IP % U(t), IP % V(t), & - IP % W(t), detJ, Basis, dBasisdx, EdgeBasis = WBasis, & - RotBasis = RotWBasis, USolver = pSolver ) - x = SUM(Nodes % x(1:n)*Basis(1:n)) - y = SUM(Nodes % y(1:n)*Basis(1:n)) - r = SQRT(x**2+y**2) - x = x/r; y = y/r - - Bx = SUM(POT(n+1:nd) * RotWBasis(1:nd-n,1)) - By = SUM(POT(n+1:nd) * RotWBasis(1:nd-n,2)) - Bz = SUM(POT(n+1:nd) * RotWBasis(1:nd-n,3)) - U = U + IP % s(t)*detJ*1*(Bx*Bz*x+By*Bz*y)/(PI*4.0d-7*(r1-r0)) - END DO -!------------------------------------------------------------------------------ - END SUBROUTINE AxialForce -!------------------------------------------------------------------------------ !------------------------------------------------------------------------------ @@ -1619,58 +1831,6 @@ END SUBROUTINE AxialForceSurf !------------------------------------------------------------------------------ -!------------------------------------------------------------------------------ - SUBROUTINE Potential( U, A, Element,n,nd,EdgeBasisDegree) -!------------------------------------------------------------------------------ - IMPLICIT NONE - REAL(KIND=dp) :: U,A - INTEGER :: n, nd, EdgeBasisDegree - TYPE(Element_t) :: Element - - REAL(KIND=dp) :: Basis(nd), dBasisdx(nd,3),DetJ,POT(nd),pPOT(nd), & - dPOT(nd),wBasis(nd,3),rotWBasis(nd,3),Wpot(nd),w(3) - INTEGER :: t - LOGICAL :: stat, WbaseFound - TYPE(Nodes_t), SAVE :: Nodes - TYPE(GaussIntegrationPoints_t) :: IP - !$OMP THREADPRIVATE(Nodes) - - CALL GetElementNodes( Nodes ) - - CALL GetLocalSolution(POT,UElement=Element) - CALL GetLocalSolution(pPOT,tstep=-1,UElement=Element) - IF(Solver % Order<2.OR.GetTimeStep()<=2) THEN - dPot = (POT - pPOT)/dt - ELSE - dPot = 1.5_dp*POT - 2*pPOT - CALL GetLocalSolution(pPOT,tstep=-2,UElement=Element) - dPot = (dPOT + 0.5_dp*pPOT)/dt - END IF - - CALL GetLocalSolution(Wpot,'W',UElement=Element) - W = [0._dp, 0._dp, 1._dp] - WbaseFound = ANY(Wpot(1:n)/=0._dp) - - !Numerical integration: - !---------------------- - IP = GaussPoints(Element, EdgeBasis=.TRUE., PReferenceElement=PiolaVersion, & - EdgeBasisDegree=EdgeBasisDegree) - - DO t=1,IP % n - ! Basis function values & derivatives at the integration point: - !-------------------------------------------------------------- - stat = ElementInfo( Element, Nodes, IP % U(t), IP % V(t), & - IP % W(t), detJ, Basis, dBasisdx, EdgeBasis = WBasis, & - RotBasis = RotWBasis, USolver = pSolver ) - IF(WBaseFound) W = MATMUL(Wpot(1:n),dBasisdx(1:n,:)) - - A = A + IP % s(t) * detJ - U = U + IP % s(t) * detJ * SUM(dPot(n+1:nd)*MATMUL(WBasis(1:nd-n,:),w)) - END DO -!------------------------------------------------------------------------------ - END SUBROUTINE Potential -!------------------------------------------------------------------------------ - !------------------------------------------------------------------------------ SUBROUTINE LocalConstraintMatrix( Element, n, nd, PiolaVersion, SecondOrder ) @@ -1853,14 +2013,14 @@ SUBROUTINE LocalMatrix( MASS, DAMP, STIFF, FORCE, JFixFORCE, JFixVec, LOAD, & IF ( HasHBCurve .OR. HasReluctivityFunction ) THEN CALL GetScalarLocalSolution(Aloc) END IF - + np = n*Solver % Def_Dofs(GetElementFamily(Element),Element % BodyId,1) + !Numerical integration: !---------------------- IP = GaussPointsAdapt(Element, Solver, EdgeBasis=.TRUE. ) ! IP = GaussPoints(Element, EdgeBasis=.TRUE., PReferenceElement=PiolaVersion, & ! EdgeBasisDegree=EdgeBasisDegree ) - np = n*Solver % Def_Dofs(GetElementFamily(Element),Element % BodyId,1) DO t=1,IP % n stat = ElementInfo( Element, Nodes, IP % U(t), IP % V(t), & IP % W(t), detJ, Basis, dBasisdx, EdgeBasis = WBasis, & @@ -1882,7 +2042,7 @@ SUBROUTINE LocalMatrix( MASS, DAMP, STIFF, FORCE, JFixFORCE, JFixVec, LOAD, & babs = MAX( SQRT(SUM(B_ip**2)), 1.d-8 ) mu = ListGetElementReal( mu_h, Basis, Element, & GaussPoint = t, Rdim=mudim, Rtensor=MuTensor, DummyVals = B_ip ) - IF (mudim < 2) CALL Fatal('WhitneyAVSolver', & + IF (mudim < 2) CALL Fatal(Caller, & 'Specify Reluctivity Function as a full (3x3)-tensor') A_t(1:3,1:3) = muTensor(1:3,1:3) @@ -2721,7 +2881,7 @@ SUBROUTINE DirichletAfromB() ! --------------------------------- CALL GaugeTreeFluxBC(Solver,Mesh,TreeEdges,BasicCycles,FluxCount,FluxMap) - CALL Info('WhitneyAVSolver', 'Boundary tree edges: '//i2s(COUNT(TreeEdges(FluxMap))) // & + CALL Info(Caller, 'Boundary tree edges: '//i2s(COUNT(TreeEdges(FluxMap))) // & ' of total: '//I2S(FluxCount),Level=5) ! Get (B,n) for BC faces: From 1f89a7744f485a260cb04048c31ad475bde74589 Mon Sep 17 00:00:00 2001 From: Peter Raback Date: Tue, 1 Oct 2024 13:05:40 +0300 Subject: [PATCH 22/38] Change the way mesh extrusion is called to reflect the change in library. --- elmerice/Solvers/CalvingRemesh.F90 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/elmerice/Solvers/CalvingRemesh.F90 b/elmerice/Solvers/CalvingRemesh.F90 index d19663ef53..c0edcf350c 100644 --- a/elmerice/Solvers/CalvingRemesh.F90 +++ b/elmerice/Solvers/CalvingRemesh.F90 @@ -2040,9 +2040,16 @@ END SUBROUTINE InterpolateMeshToMesh !---------------------------------------------- ExtrudeLevels = ListGetInteger(Model % Simulation, "Remesh Extruded Mesh Levels", Found, UnfoundFatal=.TRUE.) - ExtrudedMesh => NULL() - ExtrudedMesh => MeshExtrude(FootprintMesh, ExtrudeLevels-2) + ! The dirty ListAdd/ListRemove stuff is due to changed API of the ExtrudedMesh routine. + i = ListGetInteger( Model % Simulation,'Extruded Mesh Layers',Found) + CALL ListAddInteger( Model % Simulation,'Extruded Mesh Layers',ExtrudeLevels-1) + ExtrudedMesh => MeshExtrude(FootprintMesh, Model % Simulation) + IF(i>0) THEN + CALL ListAddInteger( Model % Simulation,'Extruded Mesh Layers',i) + ELSE + CALL ListRemove( Model % Simulation,'Extruded Mesh Layers') + END IF !---------------------------------------------------- ! Interp front position from squished front nodes ! onto freshly extruded footprint mesh From 93952bfb526606f9ea2091c2e0ae819924f5cf2d Mon Sep 17 00:00:00 2001 From: Peter Raback Date: Tue, 1 Oct 2024 13:09:44 +0300 Subject: [PATCH 23/38] Reorganize stuff related to biorthogonal projectors. --- fem/src/MeshUtils.F90 | 103 +++++++++++++++++++++--------------------- 1 file changed, 51 insertions(+), 52 deletions(-) diff --git a/fem/src/MeshUtils.F90 b/fem/src/MeshUtils.F90 index bb45980b17..f2f80ef40d 100644 --- a/fem/src/MeshUtils.F90 +++ b/fem/src/MeshUtils.F90 @@ -8771,6 +8771,7 @@ FUNCTION LevelProjector( BMesh1, BMesh2, Repeating, AntiRepeating, & ! It is assumed that that the target mesh is always un-skewed ! Make a test here to be able to skip it later. No test is needed ! if the generic integrator is enforced. +#if 0 IF(.NOT. GenericIntegrator ) THEN MaxSkew1 = CheckMeshSkew( BMesh1, NotAllQuads ) IF( NotAllQuads ) THEN @@ -8794,6 +8795,7 @@ FUNCTION LevelProjector( BMesh1, BMesh2, Repeating, AntiRepeating, & GenericIntegrator = .TRUE. END IF END IF +#endif IF( GenericIntegrator ) THEN CALL Info(Caller,'Edge projection for the BC requires weak projector!',Level=7) @@ -8872,14 +8874,6 @@ FUNCTION LevelProjector( BMesh1, BMesh2, Repeating, AntiRepeating, & Projector % FORMAT = MATRIX_LIST Projector % ProjectorType = PROJECTOR_TYPE_GALERKIN - CreateDual = ListGetLogical( BC,'Create Dual Projector',Found ) - IF( CreateDual ) THEN - DualProjector => AllocateMatrix() - DualProjector % FORMAT = MATRIX_LIST - DualProjector % ProjectorType = PROJECTOR_TYPE_GALERKIN - Projector % EMatrix => DualProjector - END IF - ! Check whether biorthogonal basis for projectors requested: ! If we want to eliminate the constraints we have to have a biortgonal basis ! ---------------------------------------------------------- @@ -8990,40 +8984,6 @@ FUNCTION LevelProjector( BMesh1, BMesh2, Repeating, AntiRepeating, & END IF END IF - IF( CreateDual ) THEN - ALLOCATE( DualNodePerm( Mesh % NumberOfNodes ) ) - DualNodePerm = 0 - - DO i=1,BMesh2 % NumberOfBulkElements - Element => BMesh2 % Elements(i) - IF( Parallel ) THEN - IF( Element % PartIndex /= ParEnv % MyPe ) CYCLE - END IF - DualNodePerm(InvPerm2(Element % NodeIndexes)) = 1 - END DO - - IF( EliminateUnneeded ) THEN - m = 0 - n = SUM( DualNodePerm ) - CALL Info(Caller,& - 'Number of potential dofs in dual projector: '//I2S(n),Level=10) - ! Now eliminate the nodes which also occur in the other mesh - ! These must be redundant edges - DO i=1, SIZE(InvPerm1) - j = InvPerm1(i) - IF( DualNodePerm(j) /= 0 ) THEN - DualNodePerm(j) = 0 - PRINT *,'Removing dual node:',j,Mesh % Nodes % x(j), Mesh % Nodes % y(j) - m = m + 1 - END IF - END DO - IF( m > 0 ) THEN - CALL Info(Caller,& - 'Eliminating redundant dual nodes from projector: '//I2S(m),Level=10) - END IF - END IF - END IF - IF( ListCheckPresent( BC,'Level Projector Condition') ) THEN ALLOCATE( Cond( Mesh % MaxElementNodes ) ) Cond = 1.0_dp @@ -9060,7 +9020,50 @@ FUNCTION LevelProjector( BMesh1, BMesh2, Repeating, AntiRepeating, & CALL Info(Caller,'Number of active nodes in projector: '//I2S(m),Level=8) EdgeRow0 = m + + CreateDual = ListGetLogical( BC,'Create Dual Projector',Found ) IF( CreateDual ) THEN + IF( DoEdges ) THEN + CALL Fatal(Caller,'Dual projector cannot handle edges!') + END IF + + DualProjector => AllocateMatrix() + DualProjector % FORMAT = MATRIX_LIST + DualProjector % ProjectorType = PROJECTOR_TYPE_GALERKIN + Projector % EMatrix => DualProjector + + ALLOCATE( DualNodePerm( Mesh % NumberOfNodes ) ) + DualNodePerm = 0 + + DO i=1,BMesh2 % NumberOfBulkElements + Element => BMesh2 % Elements(i) + IF( Parallel ) THEN + IF( Element % PartIndex /= ParEnv % MyPe ) CYCLE + END IF + DualNodePerm(InvPerm2(Element % NodeIndexes)) = 1 + END DO + + IF( EliminateUnneeded ) THEN + m = 0 + n = SUM( DualNodePerm ) + CALL Info(Caller,& + 'Number of potential dofs in dual projector: '//I2S(n),Level=10) + ! Now eliminate the nodes which also occur in the other mesh + ! These must be redundant edges + DO i=1, SIZE(InvPerm1) + j = InvPerm1(i) + IF( DualNodePerm(j) /= 0 ) THEN + DualNodePerm(j) = 0 + PRINT *,'Removing dual node:',j,Mesh % Nodes % x(j), Mesh % Nodes % y(j) + m = m + 1 + END IF + END DO + IF( m > 0 ) THEN + CALL Info(Caller,& + 'Eliminating redundant dual nodes from projector: '//I2S(m),Level=10) + END IF + END IF + m = 0 DO i=1,Mesh % NumberOfNodes IF( DualNodePerm(i) > 0 ) THEN @@ -9070,12 +9073,9 @@ FUNCTION LevelProjector( BMesh1, BMesh2, Repeating, AntiRepeating, & END DO ALLOCATE( DualProjector % InvPerm(m) ) DualProjector % InvPerm = 0 - - IF( DoEdges ) THEN - CALL Fatal(Caller,'Dual projector cannot handle edges!') - END IF END IF ELSE + CreateDual = .FALSE. EdgeRow0 = 0 END IF ProjectorRows = EdgeRow0 @@ -9213,10 +9213,9 @@ FUNCTION LevelProjector( BMesh1, BMesh2, Repeating, AntiRepeating, & ! Some of the dofs may have been set by the strong projector. m = COUNT( EdgePerm > 0 ) IF( m > 0 ) THEN - CALL Info(Caller,& - 'Number of weak edges in projector: '//I2S(m),Level=10) + CALL Info(Caller,'Number of weak edges in projector: '//I2S(m),Level=10) END IF - IF( m > 0 .OR. PiolaVersion) THEN + IF( m > 0 ) THEN SomethingUndone = .TRUE. EdgeBasis = .TRUE. END IF @@ -9231,8 +9230,8 @@ FUNCTION LevelProjector( BMesh1, BMesh2, Repeating, AntiRepeating, & !------------------------------------------------------------- IF( SomethingUndone ) THEN IF( BiOrthogonalBasis ) THEN - IF(SomethingStrong) THEN - CALL Fatal(Caller,'Cannot combine strong projectors and biorthogonal basis!') + IF( EdgeBasis ) THEN + CALL Fatal(Caller,'Cannot combine edge projectors and biorthogonal basis!') END IF Projector % Child => AllocateMatrix() Projector % Child % FORMAT = MATRIX_LIST @@ -9264,7 +9263,7 @@ FUNCTION LevelProjector( BMesh1, BMesh2, Repeating, AntiRepeating, & END IF IF( DoNodes ) DEALLOCATE( NodePerm ) - IF( CreateDual .AND. DoNodes ) DEALLOCATE( DualNodePerm ) + IF( CreateDual ) DEALLOCATE( DualNodePerm ) IF( DoEdges ) DEALLOCATE( EdgePerm ) m = COUNT( Projector % InvPerm == 0 ) From 58debcbb9bd6fbca3582f4f18db8a19fcd57368e Mon Sep 17 00:00:00 2001 From: Peter Raback Date: Tue, 1 Oct 2024 16:51:47 +0300 Subject: [PATCH 24/38] Add new save utility (+test case) for saving mortar projection stuff without actually enforcing continuity. --- fem/src/modules/SaveData/SaveProjection.F90 | 195 ++++++++++++++++++ fem/tests/MortarSaveProjection/CMakeLists.txt | 8 + .../ELMERSOLVER_STARTINFO | 1 + fem/tests/MortarSaveProjection/case.sif | 137 ++++++++++++ fem/tests/MortarSaveProjection/runtest.cmake | 3 + fem/tests/MortarSaveProjection/squares.grd | 31 +++ 6 files changed, 375 insertions(+) create mode 100644 fem/src/modules/SaveData/SaveProjection.F90 create mode 100644 fem/tests/MortarSaveProjection/CMakeLists.txt create mode 100644 fem/tests/MortarSaveProjection/ELMERSOLVER_STARTINFO create mode 100644 fem/tests/MortarSaveProjection/case.sif create mode 100644 fem/tests/MortarSaveProjection/runtest.cmake create mode 100644 fem/tests/MortarSaveProjection/squares.grd diff --git a/fem/src/modules/SaveData/SaveProjection.F90 b/fem/src/modules/SaveData/SaveProjection.F90 new file mode 100644 index 0000000000..007d57c81c --- /dev/null +++ b/fem/src/modules/SaveData/SaveProjection.F90 @@ -0,0 +1,195 @@ +!/*****************************************************************************/ +! * +! * Elmer, A Finite Element Software for Multiphysical Problems +! * +! * Copyright 1st April 1995 - , CSC - IT Center for Science Ltd., Finland +! * +! * This program is free software; you can redistribute it and/or +! * modify it under the terms of the GNU General Public License +! * as published by the Free Software Foundation; either version 2 +! * of the License, or (at your option) any later version. +! * +! * This program is distributed in the hope that it will be useful, +! * but WITHOUT ANY WARRANTY; without even the implied warranty of +! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! * GNU General Public License for more details. +! * +! * You should have received a copy of the GNU General Public License +! * along with this program (in file fem/GPL-2); if not, write to the +! * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +! * Boston, MA 02110-1301, USA. +! * +! *****************************************************************************/ +! +!/****************************************************************************** +! * +! * Subroutine for saving projections to new fields. +! * +! ****************************************************************************** +! * +! * Authors: Peter RÃ¥back +! * Email: Peter.Raback@csc.fi +! * Web: http://www.csc.fi/elmer +! * Address: CSC - IT Center for Science Ltd. +! * Keilaranta 14 +! * 02101 Espoo, Finland +! * +! * Original Date: 20 Nov 2001 +! * +! *****************************************************************************/ + +!> \ingroup Solvers +!> \{ + + +!------------------------------------------------------------------------------ +SUBROUTINE SaveProjection_init( Model,Solver,dt,Transient ) +!------------------------------------------------------------------------------ + USE DefUtils + IMPLICIT NONE +!------------------------------------------------------------------------------ + TYPE(Solver_t), TARGET :: Solver + TYPE(Model_t) :: Model + REAL(KIND=dp) :: dt + LOGICAL :: Transient +!------------------------------------------------------------------------------ + CALL ListAddNewString( Solver % Values,'Variable',& + '-nooutput -global SaveProjection_var') + +END SUBROUTINE SaveProjection_init +!------------------------------------------------------------------------------ + + +!------------------------------------------------------------------------------ +!> Routine for saving projections from fields as fields. +!------------------------------------------------------------------------------ +SUBROUTINE SaveProjection( Model,Solver,dt,Transient ) + USE DefUtils + USE Types + IMPLICIT NONE +!------------------------------------------------------------------------------ + TYPE(Solver_t), TARGET :: Solver + TYPE(Model_t) :: Model + REAL(KIND=dp) :: dt + LOGICAL :: Transient +!------------------------------------------------------------------------------ +! Local variables +!------------------------------------------------------------------------------ + TYPE(ValueList_t), POINTER :: Params + TYPE(Variable_t), POINTER :: Var, TargetVar + INTEGER :: i,j,n,NoVar + CHARACTER(LEN=MAX_NAME_LEN) :: VarName, TargetName + INTEGER, POINTER :: UnitPerm(:) + REAL(KIND=dp) :: Nrm + LOGICAL :: Found + + CALL Info('SaveProjection','Creating selected projected values as fields') + + Params => GetSolverParams() + + i = 0 + DO WHILE(.TRUE.) + i = i + 1 + VarName = ListGetString( Params,'Variable '//I2S(i), Found ) + IF(.NOT. Found) EXIT + END DO + NoVar = i-1 + CALL Info('SaveProjection','Saving projections from '//I2S(NoVar)//' fields') + + + DO i=1,NoVar + VarName = ListGetString( Params,'Variable '//I2S(i), Found ) + Var => VariableGet( Model % Variables, TRIM(VarName) ) + IF(.NOT. ASSOCIATED(Var)) THEN + CALL Warn('SaveProjection','Requested variable does not exist!') + CYCLE + END IF + + TargetName = ListGetString( Params,'Target Variable '//I2S(i), Found ) + IF(.NOT. Found) VarName = 'Projection '//TRIM(VarName) + + TargetVar => VariableGet( Model % Variables, TRIM(TargetName) ) + IF(.NOT. ASSOCIATED(TargetVar)) THEN + IF(.NOT. ASSOCIATED(Var % Perm) ) THEN + UnitPerm => NULL() + ALLOCATE(UnitPerm(SIZE(Var % Values))) + DO j=1,SIZE(Var % Values) + UnitPerm(j) = j + END DO + CALL VariableAddVector( Model % Mesh % Variables, Solver % Mesh, Solver, & + TRIM(TargetName), Var % Dofs, Perm = UnitPerm ) + ELSE + CALL VariableAddVector( Model % Mesh % Variables, Solver % Mesh, Solver, & + TRIM(TargetName), Var % Dofs, Perm = Var % Perm, Secondary = .TRUE.) + END IF + TargetVar => VariableGet( Model % Variables, TRIM(TargetName) ) + END IF + + ! Do additive projection! + CALL ProjectToVariable() + Nrm = Nrm + SUM(TargetVar % Values**2) + END DO + + Nrm = SQRT(Nrm) + IF(SIZE(Solver % Variable % Values) == 1 ) THEN + Solver % Variable % Values = Nrm + END IF + + WRITE(Message,'(A,ES12.3)') 'Combined L2 norm of all projected fields: ', Nrm + CALL Info('SaveProjection',Message) + +CONTAINS + + + SUBROUTINE ProjectToVariable() + TYPE(Matrix_t), POINTER :: A + INTEGER :: bc, dofs, i, j, k, pi, pj + INTEGER, POINTER :: Rows(:), Cols(:) + REAL(KIND=dp) :: r1 + REAL(KIND=dp), POINTER :: Values(:) + + dofs = Var % Dofs + TargetVar % Values = 0.0_dp + + ! Go through all the projectors. + ! There could be perhaps reason to skip some, but this will do for now. + DO bc=1,Model % NumberOfBCs + A => CurrentModel % BCs(bc) % PMatrix + IF(.NOT. ASSOCIATED(A) ) THEN + A => Solver % MortarBCs(bc) % Projector + END IF + + IF(.NOT. ASSOCIATED(A)) CYCLE + n = A % NumberOfRows + Rows => A % Rows + Cols => A % Cols + Values => A % Values + + DO k=1,dofs + DO i=1,n + IF(ASSOCIATED(A % InvPerm)) THEN + pi = A % InvPerm(i) + ELSE + pi = i + END IF + IF(ASSOCIATED(Var % Perm)) pi = Var % Perm(pi) + IF(pi==0) CYCLE + pi = dofs*(pi-1)+k + r1 = 0.0_dp + DO j=Rows(i),Rows(i+1)-1 + pj = Cols(j) + IF(ASSOCIATED(Var % Perm)) pj = Var % Perm(pj) + IF(pj==0) CYCLE + pj = dofs*(pj-1)+k + r1 = r1 + Values(j) * Var % Values(pj) + END DO + + TargetVar % Values(pi) = TargetVar % Values(pi) + r1 + END DO + END DO + END DO + END SUBROUTINE ProjectToVariable + +END SUBROUTINE SaveProjection + +!> \} diff --git a/fem/tests/MortarSaveProjection/CMakeLists.txt b/fem/tests/MortarSaveProjection/CMakeLists.txt new file mode 100644 index 0000000000..7133fac99c --- /dev/null +++ b/fem/tests/MortarSaveProjection/CMakeLists.txt @@ -0,0 +1,8 @@ +INCLUDE(test_macros) +INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/fem/src) + +CONFIGURE_FILE( case.sif case.sif COPYONLY) + +file(COPY squares.grd ELMERSOLVER_STARTINFO DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + +ADD_ELMER_TEST(MortarSaveProjection LABELS quick mortar) diff --git a/fem/tests/MortarSaveProjection/ELMERSOLVER_STARTINFO b/fem/tests/MortarSaveProjection/ELMERSOLVER_STARTINFO new file mode 100644 index 0000000000..d21bd7ee27 --- /dev/null +++ b/fem/tests/MortarSaveProjection/ELMERSOLVER_STARTINFO @@ -0,0 +1 @@ +case.sif diff --git a/fem/tests/MortarSaveProjection/case.sif b/fem/tests/MortarSaveProjection/case.sif new file mode 100644 index 0000000000..e32d50bf41 --- /dev/null +++ b/fem/tests/MortarSaveProjection/case.sif @@ -0,0 +1,137 @@ +! Test case for just applying projectors to map stuff without enforcing +! any kind of continuity. +! +! P.R. 1.10.2024 + + +Header + CHECK KEYWORDS Warn + Mesh DB "." "squares" + Include Path "" + Results Directory "" +End + +Simulation + Max Output Level = 5 + Coordinate System = "Cartesian 2D" + Coordinate Mapping(3) = 1 2 3 + Simulation Type = Steady State + Steady State Max Iterations = 1 + Output Intervals = 1 + + Output Intervals = 0 + +! Post File = case.vtu +! Ascii Output = True +End + +Constants + Gravity(4) = 0 -1 0 9.82 + Stefan Boltzmann = 5.67e-08 + Permittivity of Vacuum = 8.8542e-12 + Boltzmann Constant = 1.3807e-23 + Unit Charge = 1.602e-19 +End + +Body 1 + Target Bodies(1) = 1 + Name = "Body1" + Equation = 1 + Material = 1 + Body Force = 1 +End + +Body 2 + Target Bodies(1) = 2 + Name = "Body2" + Equation = 1 + Material = 1 +End + +Solver 1 + Equation = Heat Equation + Procedure = "HeatSolve" "HeatSolver" + Variable = Temperature + + Nonlinear System Max Iterations = 1 + + Linear System Solver = Iterative + Linear System Iterative Method = BiCGStabl + Linear System Max Iterations = 5000 + Linear System Convergence Tolerance = 1.0e-8 + Linear System Preconditioning = ILU1 + Linear System Residual Output = 20 + Linear System Precondition Recompute = 1 + +! We do not apply, only do afterwords projection. +! Apply Mortar BCs = Logical True +End + + +Solver 2 +! Settings mainly for timing and verification +! Exec Solver = never + + Equation = SaveProject + Procedure = "SaveData" "SaveProjection" + + Variable 1 = Temperature + Variable 2 = Coordinate 1 + Variable 3 = Coordinate 2 + +! Note that the field values depend on type of projection. +! They may, or may not, be multiplied by nodal weight. + Target Variable 1 = Proj Temperature + Target Variable 2 = Proj X + Target Variable 3 = Proj Y + + Apply Mortar BCs = Logical True +End + + +Equation 1 + Name = "Heat" + Active Solvers(2) = 1 2 +End + +Material 1 + Name = "Ideal" + Heat Conductivity = 1 + Heat Capacity = 1 + Density = 1 +End + +Body Force 1 + Name = "Heating" + Heat Source = 1.0 +End + +Boundary Condition 1 + Target Boundaries(1) = 4 + Name = "Left-left" + Temperature = 1.0 +End + +Boundary Condition 2 + Target Boundaries(1) = 6 + Name = "Right-Right" + Temperature = 2.0 +End + +Boundary Condition 3 + Target Boundaries(1) = 2 + Name = "Left-Right" + Mortar BC = Integer 4 + Galerkin Projector = Logical True + Plane Projector = Logical True +End + +Boundary Condition 4 + Target Boundaries(1) = 8 + Name = "Right-Left" +End + + +Solver 1 :: Reference Norm = 1.81336882E+00 +Solver 2 :: Reference Norm = 1.57162326E-01 + diff --git a/fem/tests/MortarSaveProjection/runtest.cmake b/fem/tests/MortarSaveProjection/runtest.cmake new file mode 100644 index 0000000000..7528340c9d --- /dev/null +++ b/fem/tests/MortarSaveProjection/runtest.cmake @@ -0,0 +1,3 @@ +include(test_macros) +execute_process(COMMAND ${ELMERGRID_BIN} 1 2 squares.grd) +RUN_ELMER_TEST() diff --git a/fem/tests/MortarSaveProjection/squares.grd b/fem/tests/MortarSaveProjection/squares.grd new file mode 100644 index 0000000000..af45bdc22e --- /dev/null +++ b/fem/tests/MortarSaveProjection/squares.grd @@ -0,0 +1,31 @@ +***** ElmerGrid input file for structured grid generation ***** +Version = 210903 +Coordinate System = Cartesian 2D +Subcell Divisions in 2D = 3 2 +Subcell Sizes 1 = 1 0.1 1.5 +Subcell Sizes 2 = 1 0.5 +Material Structure in 2D + 0 0 2 + 1 0 2 +End + +Element Degree = 1 +Element Innernodes = False + +Materials Interval = 1 2 +Boundary Definitions +! type out int + 1 -1 1 1 + 2 -2 1 1 + 3 -3 1 1 + 4 -4 1 1 + 5 -1 2 1 + 6 -2 2 1 + 7 -3 2 1 + 8 -4 2 1 +End +Element Ratios 1 = 1 1 1 +Element Ratios 2 = 1 1 +Element Divisions 1 = 10 0 15 +Element Divisions 2 = 10 5 + From c2da825bad2f03040ac2b688dbf2647686a75490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Tue, 6 Aug 2024 17:03:33 +0200 Subject: [PATCH 25/38] Run more tests regularly in CI. The nix workflow takes approx. 30 minutes anyway. So, there is probably little harm in running more tests without extending the overall duration of a CI run by too much. --- .github/workflows/build-macos-homebrew.yaml | 4 ++-- .github/workflows/build-windows-mingw.yaml | 4 ++-- .github/workflows/build.yaml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-macos-homebrew.yaml b/.github/workflows/build-macos-homebrew.yaml index e154e264e4..469aae8ce1 100644 --- a/.github/workflows/build-macos-homebrew.yaml +++ b/.github/workflows/build-macos-homebrew.yaml @@ -98,9 +98,9 @@ jobs: run: | cd ${GITHUB_WORKSPACE}/build ctest . \ - -L "quick|elmerice-fast" \ + -LE slow \ -j$(sysctl -n hw.logicalcpu) \ - --timeout 180 + --timeout 300 - name: re-run tests if: always() && (steps.run-ctest.outcome == 'failure') diff --git a/.github/workflows/build-windows-mingw.yaml b/.github/workflows/build-windows-mingw.yaml index f2dc306e77..951ba15dab 100644 --- a/.github/workflows/build-windows-mingw.yaml +++ b/.github/workflows/build-windows-mingw.yaml @@ -144,9 +144,9 @@ jobs: run: | cd ${GITHUB_WORKSPACE}/build ctest . \ - -L "quick|elmerice-fast" \ + -LE slow \ -j$(nproc) \ - --timeout 180 + --timeout 300 - name: re-run tests if: always() && (steps.run-ctest.outcome == 'failure') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 759dca539e..92c4861d38 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -141,9 +141,9 @@ jobs: run: | cd ${GITHUB_WORKSPACE}/build ctest . \ - -L "quick|elmerice-fast" \ + -LE slow \ -j$(nproc) \ - --timeout 180 + --timeout 300 - name: Re-run tests if: always() && (steps.run-ctest.outcome == 'failure') From 7892f85679bf5e47d4ab8ad43ec58b039cf45882 Mon Sep 17 00:00:00 2001 From: richb2k <75949649+richb2k@users.noreply.github.com> Date: Wed, 2 Oct 2024 16:59:16 -0400 Subject: [PATCH 26/38] set the value of MaxIndex based on the maximum value in the MeshPiece vector. --- fem/src/MeshUtils.F90 | 1 + 1 file changed, 1 insertion(+) diff --git a/fem/src/MeshUtils.F90 b/fem/src/MeshUtils.F90 index f2f80ef40d..6f28894317 100644 --- a/fem/src/MeshUtils.F90 +++ b/fem/src/MeshUtils.F90 @@ -25552,6 +25552,7 @@ SUBROUTINE CalculateMeshPieces( Mesh, ElementMode, PieceIndex) CALL Info('CalculateMeshPieces','Mesh coloring loops: '//I2S(Loop),Level=6) ! Compute the true number of different pieces + MaxIndex = MAXVAL( MeshPiece ) IF( MaxIndex == 1 ) THEN NoPieces = 1 IF(PRESENT(PieceIndex)) PieceIndex = 1 From 6324ec37fde9bf31df42094b1b7a133c2555229c Mon Sep 17 00:00:00 2001 From: Peter Raback Date: Mon, 7 Oct 2024 11:07:10 +0300 Subject: [PATCH 27/38] supressing the warning "using the result of an assignment as a condition without parentheses" by adding parenthesis --- ElmerGUI/Application/plugins/egconvert.cpp | 6 +- ElmerGUI/Application/plugins/egmesh.cpp | 66 +++++++++++++++++++--- ElmerGUI/Application/plugins/egmesh.h | 1 + ElmerGUI/Application/plugins/egnative.cpp | 2 +- elmergrid/src/egmesh.c | 8 +-- elmergrid/src/egnative.c | 2 +- 6 files changed, 69 insertions(+), 16 deletions(-) diff --git a/ElmerGUI/Application/plugins/egconvert.cpp b/ElmerGUI/Application/plugins/egconvert.cpp index 142624265c..90a93bea5f 100644 --- a/ElmerGUI/Application/plugins/egconvert.cpp +++ b/ElmerGUI/Application/plugins/egconvert.cpp @@ -4969,8 +4969,10 @@ static int LoadGmshInput41(struct FemType *data,struct BoundaryType *bound, printf("Physical tag offset for %dD is %d\n",tagdim,phystagoffset[tagdim]); } - tagoffset[meshdim] = maxphystag[meshdim]; - tagoffset[meshdim-1] = phystagoffset[0]; + if(meshdim>0) { + tagoffset[meshdim] = maxphystag[meshdim]; + tagoffset[meshdim-1] = phystagoffset[0]; + } for(tagdim=meshdim-2;tagdim>=0;tagdim--) { tagoffset[tagdim] = tagoffset[tagdim+1]+MAX(0,maxtag[tagdim+1]); printf("Geometric tag offset for %dD is %d\n",tagdim,tagoffset[tagdim]); diff --git a/ElmerGUI/Application/plugins/egmesh.cpp b/ElmerGUI/Application/plugins/egmesh.cpp index c9bcafc6e5..1962f770e0 100644 --- a/ElmerGUI/Application/plugins/egmesh.cpp +++ b/ElmerGUI/Application/plugins/egmesh.cpp @@ -924,7 +924,8 @@ void InitializeKnots(struct FemType *data) data->nodalexists = FALSE; /* data->invtopoexists = FALSE; */ data->partitiontableexists = FALSE; - + data->maxpartitiontable = 0; + data->invtopo.created = FALSE; data->nodalgraph2.created = FALSE; data->dualgraph.created = FALSE; @@ -2457,19 +2458,19 @@ int FindCorners(struct GridType *grid,struct CellType *cell, continue; /* point (i,j) must now be a corner */ - if(cellno = grid->numbered[j][i]) { + if((cellno = grid->numbered[j][i])) { elem = GetElementIndex(&(cell)[cellno],1,1); ind = BOTLEFT; } - else if(cellno = grid->numbered[j][i-1]) { + else if((cellno = grid->numbered[j][i-1])) { elem = GetElementIndex(&(cell)[cellno],cell[cellno].xelem,1); ind = BOTRIGHT; } - else if(cellno = grid->numbered[j-1][i]) { + else if((cellno = grid->numbered[j-1][i])) { elem = GetElementIndex(&(cell)[cellno],1,cell[cellno].yelem); ind = TOPLEFT; } - else if(cellno = grid->numbered[j-1][i-1]) { + else if((cellno = grid->numbered[j-1][i-1])) { elem = GetElementIndex(&(cell)[cellno],cell[cellno].xelem,cell[cellno].yelem); ind = TOPRIGHT; } @@ -9906,7 +9907,7 @@ int CreateDualGraph(struct FemType *data,int unconnected,int info) int *invrow,*invcol; struct CRSType *dualgraph; - printf("Creating a dual graph of the finite element mesh\n"); + if(info) printf("Creating a dual graph of the finite element mesh\n"); dualgraph = &data->dualgraph; if(dualgraph->created) { @@ -9924,7 +9925,7 @@ int CreateDualGraph(struct FemType *data,int unconnected,int info) /* If a dual graph only for the unconnected nodes is requested do that. Basically the connected nodes are omitted in the graph. */ if( unconnected ) { - printf("Removing connected nodes from the dual graph\n"); + if(info) printf("Removing connected nodes from the dual graph\n"); if( data->nodeconnectexist ) { if(info) printf("Creating connected elements list from the connected nodes\n"); SetConnectedElements(data,info); @@ -10034,6 +10035,7 @@ int CreateDualGraph(struct FemType *data,int unconnected,int info) } else { dualsize = freeelements; + if(info) printf("Allocating for the dual graph for %d with %d connections\n",dualsize,totcon); dualrow = Ivector(0,dualsize); for(i=1;i<=dualsize;i++) dualrow[i] = 0; @@ -10053,7 +10055,7 @@ int CreateDualGraph(struct FemType *data,int unconnected,int info) goto omstart; } - if( orphanelements ) { + if( orphanelements && info ) { printf("There are %d elements in the dual mesh that are not connected!\n",orphanelements); if(unconnected) printf("The orphan elements are likely caused by the hybrid partitioning\n"); } @@ -10160,3 +10162,51 @@ int MeshTypeStatistics(struct FemType *data,int info) return(0); } +int BoundingBox(struct FemType *data,int nomesh,int nomeshes,int info) +{ + int i; + Real xmin, xmax, ymin, ymax, zmin, zmax, sidemax; + + xmin = xmax = data->x[1]; + ymin = ymax = data->y[1]; + zmin = zmax = data->z[1]; + + for(i=1; i<=data->noknots; i++){ + xmax = MAX( xmax, data->x[i] ); + xmin = MIN( xmin, data->x[i] ); + ymax = MAX( ymax, data->y[i] ); + ymin = MIN( ymin, data->y[i] ); + zmax = MAX( zmax, data->z[i] ); + zmin = MIN( zmin, data->z[i] ); + } + sidemax = MAX(xmax-xmin,ymax-ymin); + sidemax = MAX(sidemax,zmax-zmin); + + if(nomeshes > 1) { + printf("Bounding box of all nodes in mesh[%d] of [%d] meshes:\n",nomesh,nomeshes); + } + else { + printf("Bounding box of all nodes in mesh:\n"); + } + + printf("X:[%g,%g] ",xmin,xmax); + printf("Y:[%g,%g] ",ymin,ymax); + printf("Z:[%g,%g]\n",zmin,zmax); + + if(sidemax > 49.9) { + printf("\nNotice: the longest bounding box side length of [%g] is greater than 50.\n",sidemax); + printf("ElmerGUI includes a library of material properties, defined in SI units. If using ElmerGUI, \n"); + printf("then the geometry is expected to have meters as length. Geometry that exceeds 50 meters \n"); + printf("in length or width or height may not be intended. Many Geometry generators assume \n"); + printf("millimeters as the basic unit of length. Scaling the geometry from millimeters to meters \n"); + printf("may be the desired action. For more help, search the Elmer users forum for posts \n"); + printf("about SI units, or for posts about Coordinate Scaling.\n"); + printf("Scaling can be accomplished in at least three ways, as follows:\n"); + printf(" 1. Define the original geometry in meters, not millimeters.\n"); + printf(" 2. Call ElmerGrid with -scale 0.001 0.001 0.001 as an option.\n"); + printf(" 3. Add Coordinate Scaling = 0.001 to the simulation section of the sif file.\n"); + printf("If using Elmer to analyze large geometry, such as a glacier, then ignore this notice.\n\n"); + } + + return(0); +} diff --git a/ElmerGUI/Application/plugins/egmesh.h b/ElmerGUI/Application/plugins/egmesh.h index 14502efe93..e17808a057 100644 --- a/ElmerGUI/Application/plugins/egmesh.h +++ b/ElmerGUI/Application/plugins/egmesh.h @@ -112,3 +112,4 @@ int DestroyDualGraph(struct FemType *data,int info); int CreateInverseTopology(struct FemType *data,int info); int DestroyInverseTopology(struct FemType *data,int info); int MeshTypeStatistics(struct FemType *data,int info); +int BoundingBox(struct FemType *data,int nomesh,int nomeshes,int info); diff --git a/ElmerGUI/Application/plugins/egnative.cpp b/ElmerGUI/Application/plugins/egnative.cpp index 17c14503f4..1046b7b439 100644 --- a/ElmerGUI/Application/plugins/egnative.cpp +++ b/ElmerGUI/Application/plugins/egnative.cpp @@ -1169,7 +1169,7 @@ void SetCellData(struct GridType *grid,struct CellType *cell,int info) for(j=1;j<= grid->ycells ;j++) /* cells direction up */ for(i=1;i<= grid->xcells; i++) /* cells direction right */ - if( cnew = grid->numbered[j][i] ) { /* if cell is occupied */ + if( (cnew = grid->numbered[j][i]) ) { /* if cell is occupied */ /* Initialize the numbering to zero */ cell[cnew].left1st = 0; diff --git a/elmergrid/src/egmesh.c b/elmergrid/src/egmesh.c index 940dc634cf..1962f770e0 100644 --- a/elmergrid/src/egmesh.c +++ b/elmergrid/src/egmesh.c @@ -2458,19 +2458,19 @@ int FindCorners(struct GridType *grid,struct CellType *cell, continue; /* point (i,j) must now be a corner */ - if(cellno = grid->numbered[j][i]) { + if((cellno = grid->numbered[j][i])) { elem = GetElementIndex(&(cell)[cellno],1,1); ind = BOTLEFT; } - else if(cellno = grid->numbered[j][i-1]) { + else if((cellno = grid->numbered[j][i-1])) { elem = GetElementIndex(&(cell)[cellno],cell[cellno].xelem,1); ind = BOTRIGHT; } - else if(cellno = grid->numbered[j-1][i]) { + else if((cellno = grid->numbered[j-1][i])) { elem = GetElementIndex(&(cell)[cellno],1,cell[cellno].yelem); ind = TOPLEFT; } - else if(cellno = grid->numbered[j-1][i-1]) { + else if((cellno = grid->numbered[j-1][i-1])) { elem = GetElementIndex(&(cell)[cellno],cell[cellno].xelem,cell[cellno].yelem); ind = TOPRIGHT; } diff --git a/elmergrid/src/egnative.c b/elmergrid/src/egnative.c index 17c14503f4..1046b7b439 100644 --- a/elmergrid/src/egnative.c +++ b/elmergrid/src/egnative.c @@ -1169,7 +1169,7 @@ void SetCellData(struct GridType *grid,struct CellType *cell,int info) for(j=1;j<= grid->ycells ;j++) /* cells direction up */ for(i=1;i<= grid->xcells; i++) /* cells direction right */ - if( cnew = grid->numbered[j][i] ) { /* if cell is occupied */ + if( (cnew = grid->numbered[j][i]) ) { /* if cell is occupied */ /* Initialize the numbering to zero */ cell[cnew].left1st = 0; From ee6fcb9be4ec66cdfb96e9ae6445f4127270a58c Mon Sep 17 00:00:00 2001 From: Peter Raback Date: Mon, 7 Oct 2024 11:18:34 +0300 Subject: [PATCH 28/38] Supress vtu test for now. --- fem/tests/SD_ViscoElasticMaxwell/case.sif | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/fem/tests/SD_ViscoElasticMaxwell/case.sif b/fem/tests/SD_ViscoElasticMaxwell/case.sif index 13db9682e1..9268f9c83e 100644 --- a/fem/tests/SD_ViscoElasticMaxwell/case.sif +++ b/fem/tests/SD_ViscoElasticMaxwell/case.sif @@ -59,13 +59,17 @@ Solver 1 End Solver 2 + Equation = "SaveVtu" Procedure = "ResultOutputSolve" "ResultOutputSOlver" - Exec Solver = After All Output Format = vtu Discontinuous Galerkin = True - Reference Values(6) = Real 44 8 89100 1388 43973415 512.62222222229627 - Reference Norm = 1.0 +! Supress for now. +! Exec Solver = After All +! Reference Values(6) = Real 44 8 89100 1388 43973415 512.62222222229627 +! Reference Norm = 1.0 + + Exec Solver = never End !---------- @@ -79,7 +83,7 @@ Boundary Condition 2 Target Boundaries(1) = 3 Normal Force = Variable Timestep, Coordinate 1 - Real MATC "if ( tx < 10 ) { -10*(tx(1)<0.5) } else { 0 } + Real MATC "if ( tx(0) < 10 ) { -10*(tx(1)<0.5) } else { 0 } End !------------ @@ -91,5 +95,4 @@ End Solver 1 :: Reference Norm = Real 0.50650144 -RUN From dae64425670750a59cffc520dee59e4a6b3ff2a6 Mon Sep 17 00:00:00 2001 From: Peter Raback Date: Mon, 7 Oct 2024 15:54:45 +0300 Subject: [PATCH 29/38] Enrich the saving of more projected fields + modify test case. --- fem/src/modules/SaveData/SaveProjection.F90 | 98 ++++++++++++++++----- fem/tests/MortarSaveProjection/case.sif | 49 ++++++++--- fem/tests/MortarSaveProjection/squares.grd | 11 ++- 3 files changed, 124 insertions(+), 34 deletions(-) diff --git a/fem/src/modules/SaveData/SaveProjection.F90 b/fem/src/modules/SaveData/SaveProjection.F90 index 007d57c81c..d77962cc13 100644 --- a/fem/src/modules/SaveData/SaveProjection.F90 +++ b/fem/src/modules/SaveData/SaveProjection.F90 @@ -81,7 +81,7 @@ SUBROUTINE SaveProjection( Model,Solver,dt,Transient ) CHARACTER(LEN=MAX_NAME_LEN) :: VarName, TargetName INTEGER, POINTER :: UnitPerm(:) REAL(KIND=dp) :: Nrm - LOGICAL :: Found + LOGICAL :: Found, Normalize, ToSlave, ToMaster CALL Info('SaveProjection','Creating selected projected values as fields') @@ -92,21 +92,28 @@ SUBROUTINE SaveProjection( Model,Solver,dt,Transient ) i = i + 1 VarName = ListGetString( Params,'Variable '//I2S(i), Found ) IF(.NOT. Found) EXIT + Var => VariableGet( Model % Variables, TRIM(VarName) ) + IF(.NOT. ASSOCIATED(Var)) THEN + CALL Warn('SaveProjection','Requested variable does not exist!') + EXIT + END IF END DO NoVar = i-1 CALL Info('SaveProjection','Saving projections from '//I2S(NoVar)//' fields') - + - DO i=1,NoVar + DO i=1,NoVar VarName = ListGetString( Params,'Variable '//I2S(i), Found ) Var => VariableGet( Model % Variables, TRIM(VarName) ) - IF(.NOT. ASSOCIATED(Var)) THEN - CALL Warn('SaveProjection','Requested variable does not exist!') - CYCLE - END IF + CALL info('SaveProjection','Doing variable: '//TRIM(VarName)) TargetName = ListGetString( Params,'Target Variable '//I2S(i), Found ) - IF(.NOT. Found) VarName = 'Projection '//TRIM(VarName) + IF(.NOT. Found) TargetName = 'Projection '//TRIM(VarName) + + Normalize = ListGetLogical( Params,'Normalize '//I2S(i), Found ) + IF(.NOT. Found) Normalize = .TRUE. + ToSlave = ListGetLogical( Params,'Project To Slave '//I2S(i),Found ) + ToMaster = ListGetLogical( Params,'Project To Master '//I2S(i),Found ) TargetVar => VariableGet( Model % Variables, TRIM(TargetName) ) IF(.NOT. ASSOCIATED(TargetVar)) THEN @@ -145,12 +152,20 @@ SUBROUTINE ProjectToVariable() TYPE(Matrix_t), POINTER :: A INTEGER :: bc, dofs, i, j, k, pi, pj INTEGER, POINTER :: Rows(:), Cols(:) + LOGICAL :: acti, actj, AddThis REAL(KIND=dp) :: r1 REAL(KIND=dp), POINTER :: Values(:) - + REAL(KIND=dp), ALLOCATABLE :: Weight(:) + LOGICAL, ALLOCATABLE :: IsInvInvPerm(:) + dofs = Var % Dofs TargetVar % Values = 0.0_dp - + + IF(Normalize) THEN + ALLOCATE(Weight(SIZE(TargetVar % Values))) + Weight = 0.0_dp + END IF + ! Go through all the projectors. ! There could be perhaps reason to skip some, but this will do for now. DO bc=1,Model % NumberOfBCs @@ -161,33 +176,76 @@ SUBROUTINE ProjectToVariable() IF(.NOT. ASSOCIATED(A)) CYCLE n = A % NumberOfRows + IF(n==0) CYCLE + Rows => A % Rows Cols => A % Cols Values => A % Values - + + IF(.NOT. ASSOCIATED(A % InvPerm)) THEN + CALL Fatal('SaveProjection','InvPerm not associated!') + END IF + + ! Create table telling which is slave/master dof. + ALLOCATE(IsInvInvPerm(MAXVAL(Cols))) + IsInvInvPerm = .FALSE. + DO i=1,n + pi = A % InvPerm(i) + IsInvInvPerm(pi) = .TRUE. + END DO + DO k=1,dofs DO i=1,n - IF(ASSOCIATED(A % InvPerm)) THEN - pi = A % InvPerm(i) - ELSE - pi = i - END IF - IF(ASSOCIATED(Var % Perm)) pi = Var % Perm(pi) + pi = A % InvPerm(i) + acti = IsInvInvPerm(pi) + IF(ASSOCIATED(Var % Perm)) pi = Var % Perm(pi) IF(pi==0) CYCLE pi = dofs*(pi-1)+k r1 = 0.0_dp DO j=Rows(i),Rows(i+1)-1 pj = Cols(j) IF(ASSOCIATED(Var % Perm)) pj = Var % Perm(pj) - IF(pj==0) CYCLE + IF(pj==0) CYCLE pj = dofs*(pj-1)+k - r1 = r1 + Values(j) * Var % Values(pj) + actj = IsInvInvPerm(Cols(j)) + + IF( ToSlave ) THEN + IF(.NOT. actj) THEN + ! Project only master dofs to slave. + r1 = -Values(j) * Var % Values(pj) + TargetVar % Values(pi) = TargetVar % Values(pi) + r1 + END IF + ELSE IF(.NOT. ToMaster) THEN + ! Either project fully to slave + r1 = -Values(j) * Var % Values(pj) + TargetVar % Values(pi) = TargetVar % Values(pi) + r1 + END IF + ! Normalize using just the weights from slave dofs. + IF( Normalize .AND. actj) Weight(pi) = Weight(pi) + Values(j) + + IF( ToMaster ) THEN + ! Project slave dofs to master + IF(.NOT. actj) THEN + r1 = Values(j) * Var % Values(pi) + TargetVar % Values(pj) = TargetVar % Values(pj) + r1 + ! Normalize using just the weights from master dofs. + IF(Normalize .AND. .NOT. actj) Weight(pj) = Weight(pj) + Values(j) + END IF + END IF END DO - TargetVar % Values(pi) = TargetVar % Values(pi) + r1 END DO END DO + + IF(ALLOCATED(IsInvInvPerm)) DEALLOCATE(IsInvInvPerm) END DO + + IF(Normalize) THEN + WHERE(ABS(Weight) > EPSILON(r1) ) + TargetVar % Values = TargetVar % Values / Weight + END WHERE + END IF + END SUBROUTINE ProjectToVariable END SUBROUTINE SaveProjection diff --git a/fem/tests/MortarSaveProjection/case.sif b/fem/tests/MortarSaveProjection/case.sif index e32d50bf41..f7fd24f0fd 100644 --- a/fem/tests/MortarSaveProjection/case.sif +++ b/fem/tests/MortarSaveProjection/case.sif @@ -12,7 +12,7 @@ Header End Simulation - Max Output Level = 5 + Max Output Level = 10 Coordinate System = "Cartesian 2D" Coordinate Mapping(3) = 1 2 3 Simulation Type = Steady State @@ -21,8 +21,8 @@ Simulation Output Intervals = 0 -! Post File = case.vtu -! Ascii Output = True + Post File = case.vtu + Ascii Output = True End Constants @@ -75,15 +75,40 @@ Solver 2 Equation = SaveProject Procedure = "SaveData" "SaveProjection" +! Projector is Pu=0 <=> Qu_s=-Ru_m +! This gives Pu +! For weak projector this is the result of Galerkin intergral over u_s-u_m. Variable 1 = Temperature - Variable 2 = Coordinate 1 - Variable 3 = Coordinate 2 - -! Note that the field values depend on type of projection. -! They may, or may not, be multiplied by nodal weight. Target Variable 1 = Proj Temperature - Target Variable 2 = Proj X - Target Variable 3 = Proj Y + Normalize 1 = Logical False + +! This gives normalized projection u_s=-Ru_m/rowsum(Q) + Variable 2 = Temperature + Target Variable 2 = Proj S Temperature + Project To Slave 2 = Logical True + Project To Master 2 = Logical False + +! This gives normalized projection for u_m + Variable 3 = Temperature + Target Variable 3 = Proj M Temperature + Project To Slave 3 = Logical False + Project To Master 3 = Logical True + +! This gives both u_s and u_m + Variable 4 = Temperature + Target Variable 4 = Proj SM Temperature + Project To Slave 4 = Logical True + Project To Master 4 = Logical True + + Variable 5 = Coordinate 1 + Target Variable 5 = Proj X + Project To Slave 5 = Logical True + Project To Master 5 = Logical True + + Variable 6 = Coordinate 2 + Target Variable 6 = Proj Y + Project To Slave 6 = Logical True + Project To Master 6 = Logical True Apply Mortar BCs = Logical True End @@ -132,6 +157,6 @@ Boundary Condition 4 End -Solver 1 :: Reference Norm = 1.81336882E+00 -Solver 2 :: Reference Norm = 1.57162326E-01 +Solver 1 :: Reference Norm = 1.78949575E+00 +Solver 2 :: Reference Norm = 1.33772301E+01 diff --git a/fem/tests/MortarSaveProjection/squares.grd b/fem/tests/MortarSaveProjection/squares.grd index af45bdc22e..b846eeba66 100644 --- a/fem/tests/MortarSaveProjection/squares.grd +++ b/fem/tests/MortarSaveProjection/squares.grd @@ -12,7 +12,7 @@ End Element Degree = 1 Element Innernodes = False -Materials Interval = 1 2 +Materials Interval = 1 1 Boundary Definitions ! type out int 1 -1 1 1 @@ -26,6 +26,13 @@ Boundary Definitions End Element Ratios 1 = 1 1 1 Element Ratios 2 = 1 1 -Element Divisions 1 = 10 0 15 +Element Divisions 1 = 11 0 15 +Element Divisions 2 = 11 5 + +Start New Mesh +Materials Interval = 2 2 +Element Divisions 1 = 10 0 15 Element Divisions 2 = 10 5 +Unite = True + From 073697a6233e79d376859fa824f42402479f1ed3 Mon Sep 17 00:00:00 2001 From: Peter Raback Date: Mon, 7 Oct 2024 18:15:33 +0300 Subject: [PATCH 30/38] Trying to fix some elmerice tests. --- elmerice/Tests/Contact/cavity.sif | 12 ++++----- elmerice/Tests/FrictionHeatMasked/test.sif | 27 +++++++++++--------- fem/src/modules/StressSolve.F90 | 29 +++++++++++++++------- 3 files changed, 41 insertions(+), 27 deletions(-) diff --git a/elmerice/Tests/Contact/cavity.sif b/elmerice/Tests/Contact/cavity.sif index 232e2d170f..90dbd68b3e 100644 --- a/elmerice/Tests/Contact/cavity.sif +++ b/elmerice/Tests/Contact/cavity.sif @@ -51,7 +51,7 @@ Simulation Initialize Dirichlet Conditions = Logical False Output File = "$namerun".result" Post File = "$namerun".vtu" - max output level = 3 + max output level = 5 End !--------------------------------------------------- @@ -308,7 +308,7 @@ Solver 9 Filename = "results.dat" Show Norm = True - Show Norm Index = 1 + Show Norm Index = 3 Variable 1 = "Stress Vector 2" Operator 1 = "boundary min" @@ -414,8 +414,8 @@ Boundary Condition 4 Target Boundaries = 4 End -Solver 6 :: Reference Norm = Real 7.0439455 -Solver 6 :: Reference Norm Tolerance = Real 1E-05 +Solver 6 :: Reference Norm = 7.0439455 +Solver 6 :: Reference Norm Tolerance = 1.0E-05 -Solver 9 :: Reference Norm = Real 0.1 -Solver 9 :: Reference Norm Tolerance = Real 1E-06 +Solver 9 :: Reference Norm = 1.19528960E-01 +Solver 9 :: Reference Norm Tolerance = 1.0E-03 diff --git a/elmerice/Tests/FrictionHeatMasked/test.sif b/elmerice/Tests/FrictionHeatMasked/test.sif index cd7f51f9a4..f5a7e1c8b9 100644 --- a/elmerice/Tests/FrictionHeatMasked/test.sif +++ b/elmerice/Tests/FrictionHeatMasked/test.sif @@ -39,9 +39,10 @@ Simulation Steady State Min Iterations = 1 Steady State Max Iterations = 1 + ascii output = true Post File = "test_$Step$.vtu" - max output level = 4 + max output level = 5 Initialize Dirichlet Conditions = Logical False ! Extruded Mesh Levels = 3 @@ -183,13 +184,12 @@ End !creates output Solver 7 - Equation = "ForceToStress" - Procedure = File "ElmerIceSolvers" "ForceToStress" - Variable = String "Friction Heating" - Variable DOFs = 1 - Force Variable Name = String "Friction Load" - Linear System Solver = Direct - Linear System Direct Method = umfpack + Equation = "ForceToStress" + Procedure = "ElmerIceSolvers" "ForceToStress" + Variable = "Friction Heating" + Force Variable Name = String "Friction Load" + Linear System Solver = "Direct" + Linear System Direct Method = "umfpack" End !creates output @@ -326,8 +326,11 @@ Boundary Condition 6 REAL MATC "tx(0)+H" End -Solver 3 :: Reference Norm = Real 207.29755 -Solver 3 :: Reference Norm Tolerance = Real 1E-06 -Solver 7 :: Reference Norm = Real 31.2285175 -Solver 7 :: Reference Norm Tolerance = Real 1E-06 +Solver 3 :: Reference Norm = 207.29755 +Solver 3 :: Reference Norm Tolerance = 1.0E-06 +Solver 5 :: Reference Norm = 9.36764080E-02 +Solver 5 :: Reference Norm Tolerance = 1.0E-06 +! The norm seems to be zero now! +!Solver 8 :: Reference Norm = 31.2285175 +!Solver 8 :: Reference Norm Tolerance = 1.0E-06 diff --git a/fem/src/modules/StressSolve.F90 b/fem/src/modules/StressSolve.F90 index edb161d905..19020421c7 100644 --- a/fem/src/modules/StressSolve.F90 +++ b/fem/src/modules/StressSolve.F90 @@ -1120,8 +1120,12 @@ SUBROUTINE BulkAssembly() IF( UseLocalMatrixCopy( Solver, activeind = t) ) GOTO 100 n = GetElementNOFNOdes() - ntot = GetElementNOFDOFs() + GetElementNOFBDOFs() - + IF( STDOFs > dim ) THEN + ntot = GetElementNOFDOFs() + GetElementNOFBDOFs() + ELSE + ntot = GetElementNOFDOFs() + END IF + NodeIndexes => Element % NodeIndexes CALL GetElementNodes( ElementNodes ) @@ -1355,9 +1359,11 @@ SUBROUTINE BulkAssembly() ! If time dependent simulation, add mass matrix to global ! matrix and global RHS vector !------------------------------------------------------------------------------ - tForce = 0._dp - IF (Transient) tForce = FORCE - + IF( STDOFs > dim ) THEN + tForce = 0._dp + IF (Transient) tForce = FORCE + END IF + IF ( .NOT. (ConstantBulkMatrix .OR. ConstantBulkSystem .OR. ConstantSystem) ) THEN IF ( Transient .AND. .NOT. EigenOrHarmonicAnalysis() ) THEN IF( GetInteger( GetSolverParams(), 'Time derivative order', Found) == 2 ) THEN @@ -1369,10 +1375,15 @@ SUBROUTINE BulkAssembly() END IF BLOCK - INTEGER :: nb - nb = GetElementNOFBDOFS(Element) - IF(nb>0) CALL NSCondensate(n,nb,dim,STIFF,FORCE,tFORCE) - END BLOCK + INTEGER :: nb + nb = GetElementNOFBDOFS(Element) + ! Stabilization is needed if there are bubbles .AND. some addititional dof! + ! Otherwise the NSCondensate is not a fitting method!!! + IF(nb>0 .AND. STDOFs > dim ) THEN + ! Or should the 1st argument be ntot???? + CALL NSCondensate(n,nb,dim,STIFF,FORCE,tFORCE) + END IF + END BLOCK !------------------------------------------------------------------------------ ! Check if reference of displacement has been changed !------------------------------------------------------------------------------ From 01c43e3b1a7cffafa0f0881cd3dddaab146a10f8 Mon Sep 17 00:00:00 2001 From: Peter Raback Date: Tue, 8 Oct 2024 10:37:00 +0300 Subject: [PATCH 31/38] [skip ci] Toggle some elmerice tests. --- elmerice/Tests/GlaDS/CMakeLists.txt | 1 - elmerice/Tests/GlaDS_2d/CMakeLists.txt | 1 - elmerice/Tests/GlaDS_SSA/CMakeLists.txt | 1 - elmerice/Tests/Hydro_Coupled/CMakeLists.txt | 1 + elmerice/Tests/Hydro_SedOnly/CMakeLists.txt | 1 + elmerice/Tests/Permafrost_Biot/biot.sif | 12 ++++++++---- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/elmerice/Tests/GlaDS/CMakeLists.txt b/elmerice/Tests/GlaDS/CMakeLists.txt index afab741d32..2122374a5f 100644 --- a/elmerice/Tests/GlaDS/CMakeLists.txt +++ b/elmerice/Tests/GlaDS/CMakeLists.txt @@ -6,5 +6,4 @@ IF(HAVE_UMFPACK OR HAVE_MUMPS) FILE(COPY ELMERSOLVER_STARTINFO mesh_B5 DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") ADD_ELMERICE_TEST(GlaDS) - ADD_ELMERICE_LABEL(GlaDS slow) ENDIF() diff --git a/elmerice/Tests/GlaDS_2d/CMakeLists.txt b/elmerice/Tests/GlaDS_2d/CMakeLists.txt index 952784a24e..be04046a3e 100644 --- a/elmerice/Tests/GlaDS_2d/CMakeLists.txt +++ b/elmerice/Tests/GlaDS_2d/CMakeLists.txt @@ -7,5 +7,4 @@ IF(HAVE_UMFPACK OR HAVE_MUMPS) FILE(COPY ELMERSOLVER_STARTINFO mesh_B5 results DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") ADD_ELMERICE_TEST(GlaDS_2d) - ADD_ELMERICE_LABEL(GlaDS_2d slow) ENDIF() diff --git a/elmerice/Tests/GlaDS_SSA/CMakeLists.txt b/elmerice/Tests/GlaDS_SSA/CMakeLists.txt index af0c7c651b..8dbc492e96 100644 --- a/elmerice/Tests/GlaDS_SSA/CMakeLists.txt +++ b/elmerice/Tests/GlaDS_SSA/CMakeLists.txt @@ -6,5 +6,4 @@ IF(HAVE_UMFPACK OR HAVE_MUMPS) FILE(COPY ELMERSOLVER_STARTINFO mesh_B5 DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") ADD_ELMERICE_TEST(GlaDS_SSA) - ADD_ELMERICE_LABEL(GlaDS_SSA slow) ENDIF() diff --git a/elmerice/Tests/Hydro_Coupled/CMakeLists.txt b/elmerice/Tests/Hydro_Coupled/CMakeLists.txt index 4172a094a2..e31f1e7d13 100644 --- a/elmerice/Tests/Hydro_Coupled/CMakeLists.txt +++ b/elmerice/Tests/Hydro_Coupled/CMakeLists.txt @@ -7,4 +7,5 @@ IF(HAVE_UMFPACK OR HAVE_MUMPS) ADD_ELMERICE_TEST(Hydro_Coupled) ADD_ELMERICE_LABEL(Hydro_Coupled obsolete) + ADD_ELMERICE_LABEL(Hydro_Coupled slow) ENDIF() diff --git a/elmerice/Tests/Hydro_SedOnly/CMakeLists.txt b/elmerice/Tests/Hydro_SedOnly/CMakeLists.txt index 54dca3a3cd..ce67e40e7d 100644 --- a/elmerice/Tests/Hydro_SedOnly/CMakeLists.txt +++ b/elmerice/Tests/Hydro_SedOnly/CMakeLists.txt @@ -7,4 +7,5 @@ IF(HAVE_UMFPACK OR HAVE_MUMPS) ADD_ELMERICE_TEST(Hydro_SedOnly) ADD_ELMERICE_LABEL(Hydro_SedOnly obsolete) + ADD_ELMERICE_LABEL(Hydro_SedOnly slow) ENDIF() diff --git a/elmerice/Tests/Permafrost_Biot/biot.sif b/elmerice/Tests/Permafrost_Biot/biot.sif index 06542e4345..025cd6b7df 100644 --- a/elmerice/Tests/Permafrost_Biot/biot.sif +++ b/elmerice/Tests/Permafrost_Biot/biot.sif @@ -254,7 +254,11 @@ Boundary Condition 4 Real MATC "(tx > 2 * 3600 )*(tx < 20* 3600)*(-1.0e05) - p0" End -Solver 3 :: Reference Norm = Real 40.361370 -Solver 3 :: Reference Norm Tolerance = Real 1E-04 -Solver 4 :: Reference Norm = Real 0.16666636E-03 -Solver 4 :: Reference Norm Tolerance = Real 1E-05 +!Solver 3 :: Reference Norm = 40.361370 +!Solver 4 :: Reference Norm = 0.16666636E-03 + +! The norms seems close enough to save the test. +Solver 3 :: Reference Norm = 4.07823523E+01 +Solver 3 :: Reference Norm Tolerance = 1E-04 +Solver 4 :: Reference Norm = 1.71631789E-04 +Solver 4 :: Reference Norm Tolerance = 1E-05 From b2b7676ff611385e2b03db0415f260ee39144e4d Mon Sep 17 00:00:00 2001 From: Peter Raback Date: Tue, 8 Oct 2024 17:09:22 +0300 Subject: [PATCH 32/38] Write less warnings when partitioning is crappy and exit early. --- elmergrid/src/egparallel.c | 27 +++++++++++++++----- fem/tests/EMWaveBoxHexasEigen/CMakeLists.txt | 2 +- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/elmergrid/src/egparallel.c b/elmergrid/src/egparallel.c index 09792cb5fd..63a62143b2 100644 --- a/elmergrid/src/egparallel.c +++ b/elmergrid/src/egparallel.c @@ -2392,7 +2392,7 @@ int PartitionMetisMesh(struct FemType *data,struct ElmergridType *eg, used. If the elements are higher order nodal elements then use only the linear basis. */ { int i,j,k,periodic, noelements, noknots, sides, highorder; - int nodesd2, etype, numflag,mintype,maxtype,elemtype,minnodes; + int nodesd2, etype, numflag,mintype,maxtype,elemtype,minnodes,ninv; int *neededby,*indxper,*inpart; idx_t *metistopo,*eptr,*npart,*epart; idx_t ne,nn,ncommon,edgecut,nparts; @@ -2560,12 +2560,19 @@ int PartitionMetisMesh(struct FemType *data,struct ElmergridType *eg, } /* Set the partition given by Metis for each element. */ + ninv = 0; for(i=1;i<=noelements;i++) { inpart[i] = epart[i-1]+1; - if(inpart[i] < 1 || inpart[i] > partitions) - printf("Invalid partition %d for element %d\n",inpart[i],i); + if(inpart[i] < 1 || inpart[i] > partitions) { + if(ninv < 10 ) printf("Invalid partition %d for element %d\n",inpart[i],i); + ninv++; + } } - + if(ninv) { + printf("Number of invalid element partitions by Metis %d\n",ninv); + bigerror("Cannot continue with invalid partitioning!"); + } + if( highorder ) { PartitionNodesByElements(data,info); } @@ -2580,11 +2587,17 @@ int PartitionMetisMesh(struct FemType *data,struct ElmergridType *eg, j = i; if(!j) printf("Cannot set partitioning for node %d\n",i); data->nodepart[i] = npart[j-1]+1; - if(data->nodepart[i] < 1 || data->nodepart[i] > partitions) - printf("Invalid partition %d for node %d\n",data->nodepart[i],i); + if(data->nodepart[i] < 1 || data->nodepart[i] > partitions) { + if(ninv < 10) printf("Invalid partition %d for node %d\n",data->nodepart[i],i); + ninv++; + } + } + if(ninv) { + printf("Number of invalid node partitions by Metis %d\n",ninv); + bigerror("Cannot continue with invalid partitioning!"); } } - + free_Ivector(neededby,1,noknots); free_Ivector(metistopo,0,k-1); free_Ivector(epart,0,noelements-1); diff --git a/fem/tests/EMWaveBoxHexasEigen/CMakeLists.txt b/fem/tests/EMWaveBoxHexasEigen/CMakeLists.txt index a08ae66ed2..f1e23914b3 100644 --- a/fem/tests/EMWaveBoxHexasEigen/CMakeLists.txt +++ b/fem/tests/EMWaveBoxHexasEigen/CMakeLists.txt @@ -6,5 +6,5 @@ IF(HAVE_UMFPACK OR HAVE_MUMPS) file(COPY ELMERSOLVER_STARTINFO shoebox_hexas.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") - ADD_ELMER_TEST(EMWaveBoxHexasEigen LABELS whitney eigen em-wave) + ADD_ELMER_TEST(EMWaveBoxHexasEigen LABELS whitney eigen em-wave slow) ENDIF() From f5bef2d8985a97e17abac36e86f9f8079c4ea6fc Mon Sep 17 00:00:00 2001 From: Peter Raback Date: Tue, 8 Oct 2024 18:25:49 +0300 Subject: [PATCH 33/38] Modify tests slightly. --- fem/tests/mgdyn_airgap_force/CMakeLists.txt | 2 +- fem/tests/mgdyn_airgap_force/runtest.cmake | 2 +- fem/tests/pointload2/case.sif | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fem/tests/mgdyn_airgap_force/CMakeLists.txt b/fem/tests/mgdyn_airgap_force/CMakeLists.txt index 6aeba31104..1e9a4b8e3f 100644 --- a/fem/tests/mgdyn_airgap_force/CMakeLists.txt +++ b/fem/tests/mgdyn_airgap_force/CMakeLists.txt @@ -6,4 +6,4 @@ CONFIGURE_FILE(modeldata.sif modeldata.sif COPYONLY) file(COPY ELMERSOLVER_STARTINFO umagnet DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") -ADD_ELMER_TEST(mgdyn_airgap_force NPROCS 1 2 LABELS whitney failing) +ADD_ELMER_TEST(mgdyn_airgap_force NPROCS 1 2 LABELS whitney slow) diff --git a/fem/tests/mgdyn_airgap_force/runtest.cmake b/fem/tests/mgdyn_airgap_force/runtest.cmake index dc09dcc0fd..75442ae038 100644 --- a/fem/tests/mgdyn_airgap_force/runtest.cmake +++ b/fem/tests/mgdyn_airgap_force/runtest.cmake @@ -1,3 +1,3 @@ include(test_macros) -execute_process(COMMAND ${ELMERGRID_BIN} 2 2 umagnet -partdual -metis ${MPIEXEC_NTASKS} -nooverwrite) +execute_process(COMMAND ${ELMERGRID_BIN} 2 2 umagnet -partdual -metiskway ${MPIEXEC_NTASKS} -nooverwrite) RUN_ELMER_TEST() diff --git a/fem/tests/pointload2/case.sif b/fem/tests/pointload2/case.sif index c125146411..ca3717c0e2 100644 --- a/fem/tests/pointload2/case.sif +++ b/fem/tests/pointload2/case.sif @@ -6,7 +6,7 @@ Header End Simulation - Max Output Level = 5 + Max Output Level = 15 Coordinate System = Cartesian Coordinate Mapping(3) = 1 2 3 Simulation Type = Steady state From 4b1478aa01e3a3c538ac360ef447cb12fc680a1c Mon Sep 17 00:00:00 2001 From: Mika Malinen Date: Wed, 9 Oct 2024 17:07:30 +0300 Subject: [PATCH 34/38] Clean by removing void commands --- fem/tests/EMWaveBoxHexasEigen/emwave.sif | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fem/tests/EMWaveBoxHexasEigen/emwave.sif b/fem/tests/EMWaveBoxHexasEigen/emwave.sif index f84352fe94..c387914a23 100644 --- a/fem/tests/EMWaveBoxHexasEigen/emwave.sif +++ b/fem/tests/EMWaveBoxHexasEigen/emwave.sif @@ -36,7 +36,9 @@ End Material 1 Relative Permittivity = 1.0 Relative Permeability = 1.0 - Electric Conductivity = 1.0e1 + ! Electric Conductivity could be taken into account only when + ! Eigen System Damped = True would be present: + !Electric Conductivity = 1.0e17 End Equation 1 @@ -74,12 +76,10 @@ Solver 1 Eigen System Values = 10 Eigen System Convergence Tolerance = 0 Eigen System Select = smallest magnitude -! Eigen System Shift = Real 1.0e-3 ! This is a very sensitive parameter. Decreasing it too much ! will reviel tons of zero eigenmodes... Eigen System Shift = Real 4.0e3 - Eigen System Complex = Logical True ! Optionally we could compute energy norm ! Calculate Loads = Logical True From e080d8997511b3bb22573ba3981c0a53cbf42522 Mon Sep 17 00:00:00 2001 From: Mika Malinen Date: Thu, 10 Oct 2024 14:36:31 +0300 Subject: [PATCH 35/38] Edits to replace a keyword --- fem/tests/EMWaveBoxHexas/emwave.sif | 4 ++-- fem/tests/EMWaveBoxHexasEigen/emwave.sif | 2 +- fem/tests/EMWaveBoxHexasPiola/emwave.sif | 4 ++-- fem/tests/EMWaveBoxHexasQuad/emwave.sif | 4 ++-- fem/tests/VectorHelmholtzWaveguide/av_gauged.sif | 2 +- fem/tests/VectorHelmholtzWaveguide/nested.sif | 2 +- fem/tests/VectorHelmholtzWaveguide/vectorhelmholtz_av.sif | 2 +- fem/tests/VectorHelmholtzWaveguide/waveguide.sif | 2 +- fem/tests/VectorHelmholtzWaveguide3/nested.sif | 2 +- fem/tests/VectorHelmholtzWaveguide3/waveguide.sif | 2 +- fem/tests/VectorHelmholtzWaveguide4/waveguide.sif | 2 +- fem/tests/VectorHelmholtzWaveguide5/waveguide.sif | 2 +- fem/tests/VectorHelmholtzWaveguideQuadBlock/ref.sif | 2 +- fem/tests/VectorHelmholtzWaveguideQuadBlock/waveguide.sif | 2 +- fem/tests/VectorHelmholtzWaveguide_TM/waveguideTM.sif | 2 +- 15 files changed, 18 insertions(+), 18 deletions(-) diff --git a/fem/tests/EMWaveBoxHexas/emwave.sif b/fem/tests/EMWaveBoxHexas/emwave.sif index 5685bcd760..ee93b3725c 100644 --- a/fem/tests/EMWaveBoxHexas/emwave.sif +++ b/fem/tests/EMWaveBoxHexas/emwave.sif @@ -76,9 +76,9 @@ Solver 1 Use Global Mass Matrix = True Constant Bulk Matrix = True -! Optionally we could compute energy norm +! Optionally we could compute energy inner product ! Calculate Loads = Logical True -! Calculate Energy Norm = Logical True +! Calculate Energy Inner Product = Logical True End Solver 2 diff --git a/fem/tests/EMWaveBoxHexasEigen/emwave.sif b/fem/tests/EMWaveBoxHexasEigen/emwave.sif index c387914a23..5fda288c25 100644 --- a/fem/tests/EMWaveBoxHexasEigen/emwave.sif +++ b/fem/tests/EMWaveBoxHexasEigen/emwave.sif @@ -83,7 +83,7 @@ Solver 1 ! Optionally we could compute energy norm ! Calculate Loads = Logical True -! Calculate Energy Norm = Logical True +! Calculate Energy Inner Product = Logical True ! Optimize Bandwidth = False End diff --git a/fem/tests/EMWaveBoxHexasPiola/emwave.sif b/fem/tests/EMWaveBoxHexasPiola/emwave.sif index 9c130a2c02..8f7b96f9de 100644 --- a/fem/tests/EMWaveBoxHexasPiola/emwave.sif +++ b/fem/tests/EMWaveBoxHexasPiola/emwave.sif @@ -79,9 +79,9 @@ Solver 1 ! Constant bulk matrix saves ~20% for the test problem. Constant Bulk Matrix = True -! Optionally we could compute energy norm +! Optionally we could compute energy inner product ! Calculate Loads = Logical True -! Calculate Energy Norm = Logical True +! Calculate Energy Inner Product = Logical True End Solver 2 diff --git a/fem/tests/EMWaveBoxHexasQuad/emwave.sif b/fem/tests/EMWaveBoxHexasQuad/emwave.sif index e7582128db..dbd763c4a6 100644 --- a/fem/tests/EMWaveBoxHexasQuad/emwave.sif +++ b/fem/tests/EMWaveBoxHexasQuad/emwave.sif @@ -77,9 +77,9 @@ Solver 1 ! Constant bulk matrix saves ~20% for the test problem. Constant Bulk Matrix = True -! Optionally we could compute energy norm +! Optionally we could compute energy inner product ! Calculate Loads = Logical True -! Calculate Energy Norm = Logical True +! Calculate Energy Inner Product = Logical True End Solver 2 diff --git a/fem/tests/VectorHelmholtzWaveguide/av_gauged.sif b/fem/tests/VectorHelmholtzWaveguide/av_gauged.sif index 9c6bb176aa..917b9f31cb 100644 --- a/fem/tests/VectorHelmholtzWaveguide/av_gauged.sif +++ b/fem/tests/VectorHelmholtzWaveguide/av_gauged.sif @@ -90,7 +90,7 @@ Solver 1 Steady State Convergence Tolerance = 1e-09 Linear System Residual Output = 1 Calculate Loads = Logical True - Calculate Energy Norm = Logical True + Calculate Energy Inner Product = Logical True End Solver 2 diff --git a/fem/tests/VectorHelmholtzWaveguide/nested.sif b/fem/tests/VectorHelmholtzWaveguide/nested.sif index 1851af1e14..77b4d88523 100644 --- a/fem/tests/VectorHelmholtzWaveguide/nested.sif +++ b/fem/tests/VectorHelmholtzWaveguide/nested.sif @@ -109,7 +109,7 @@ Solver 1 block 11: Linear System Convergence Tolerance = $blocktol Nonlinear System Consistent Norm = True -! Calculate Energy Norm = Logical True +! Calculate Energy Inner Product = Logical True End Solver 2 diff --git a/fem/tests/VectorHelmholtzWaveguide/vectorhelmholtz_av.sif b/fem/tests/VectorHelmholtzWaveguide/vectorhelmholtz_av.sif index fcdb56a5f4..74567190cc 100644 --- a/fem/tests/VectorHelmholtzWaveguide/vectorhelmholtz_av.sif +++ b/fem/tests/VectorHelmholtzWaveguide/vectorhelmholtz_av.sif @@ -89,7 +89,7 @@ Solver 1 Steady State Convergence Tolerance = 1e-09 Linear System Residual Output = 10 Calculate Loads = Logical True - Calculate Energy Norm = Logical True + Calculate Energy Inner Product = Logical True End Solver 2 diff --git a/fem/tests/VectorHelmholtzWaveguide/waveguide.sif b/fem/tests/VectorHelmholtzWaveguide/waveguide.sif index 15aa16e1c9..a2ec511c5e 100644 --- a/fem/tests/VectorHelmholtzWaveguide/waveguide.sif +++ b/fem/tests/VectorHelmholtzWaveguide/waveguide.sif @@ -96,7 +96,7 @@ Solver 1 Steady State Convergence Tolerance = 1e-09 Linear System Residual Output = 10 Calculate Loads = Logical True - Calculate Energy Norm = Logical True + Calculate Energy Inner Product = Logical True End Solver 2 diff --git a/fem/tests/VectorHelmholtzWaveguide3/nested.sif b/fem/tests/VectorHelmholtzWaveguide3/nested.sif index 68d118cddf..f74614e22a 100644 --- a/fem/tests/VectorHelmholtzWaveguide3/nested.sif +++ b/fem/tests/VectorHelmholtzWaveguide3/nested.sif @@ -112,7 +112,7 @@ Solver 1 !block 11: Linear System direct method = "mumps" Nonlinear System Consistent Norm = True -! Calculate Energy Norm = Logical True +! Calculate Energy Inner Product = Logical True End Solver 2 diff --git a/fem/tests/VectorHelmholtzWaveguide3/waveguide.sif b/fem/tests/VectorHelmholtzWaveguide3/waveguide.sif index d0980fe8c3..2b0f00c80f 100644 --- a/fem/tests/VectorHelmholtzWaveguide3/waveguide.sif +++ b/fem/tests/VectorHelmholtzWaveguide3/waveguide.sif @@ -68,7 +68,7 @@ Solver 1 linear system abort not converged = false Linear System Residual Output = 1 - Calculate Energy Norm = Logical True + Calculate Energy Inner Product = Logical True ! linear system normwise backward error = logical true diff --git a/fem/tests/VectorHelmholtzWaveguide4/waveguide.sif b/fem/tests/VectorHelmholtzWaveguide4/waveguide.sif index bba7dbdc9f..0acdaf0b21 100644 --- a/fem/tests/VectorHelmholtzWaveguide4/waveguide.sif +++ b/fem/tests/VectorHelmholtzWaveguide4/waveguide.sif @@ -69,7 +69,7 @@ Solver 1 linear system abort not converged = false Linear System Residual Output = 1 - Calculate Energy Norm = Logical True + Calculate Energy Inner Product = Logical True ! linear system normwise backward error = logical true linear system complex = true diff --git a/fem/tests/VectorHelmholtzWaveguide5/waveguide.sif b/fem/tests/VectorHelmholtzWaveguide5/waveguide.sif index 23bbf2c2a3..f015912187 100644 --- a/fem/tests/VectorHelmholtzWaveguide5/waveguide.sif +++ b/fem/tests/VectorHelmholtzWaveguide5/waveguide.sif @@ -68,7 +68,7 @@ Solver 1 linear system abort not converged = false Linear System Residual Output = 1 - Calculate Energy Norm = Logical True + Calculate Energy Inner Product = Logical True ! linear system normwise backward error = logical true linear system complex = false diff --git a/fem/tests/VectorHelmholtzWaveguideQuadBlock/ref.sif b/fem/tests/VectorHelmholtzWaveguideQuadBlock/ref.sif index de5481da11..3817cecc24 100644 --- a/fem/tests/VectorHelmholtzWaveguideQuadBlock/ref.sif +++ b/fem/tests/VectorHelmholtzWaveguideQuadBlock/ref.sif @@ -71,7 +71,7 @@ Solver 1 Linear System Direct Method = "MUMPS" Linear System Timing = Logical True - Calculate Energy Norm = Logical True + Calculate Energy Inner Product = Logical True End Solver 2 diff --git a/fem/tests/VectorHelmholtzWaveguideQuadBlock/waveguide.sif b/fem/tests/VectorHelmholtzWaveguideQuadBlock/waveguide.sif index a51498c08d..0ee62eaf76 100644 --- a/fem/tests/VectorHelmholtzWaveguideQuadBlock/waveguide.sif +++ b/fem/tests/VectorHelmholtzWaveguideQuadBlock/waveguide.sif @@ -91,7 +91,7 @@ include block.sif !include reim.sif Linear System Timing = Logical True - Calculate Energy Norm = Logical True + Calculate Energy Inner Product = Logical True End Solver 2 diff --git a/fem/tests/VectorHelmholtzWaveguide_TM/waveguideTM.sif b/fem/tests/VectorHelmholtzWaveguide_TM/waveguideTM.sif index c86805e458..ac147e6e8d 100644 --- a/fem/tests/VectorHelmholtzWaveguide_TM/waveguideTM.sif +++ b/fem/tests/VectorHelmholtzWaveguide_TM/waveguideTM.sif @@ -102,7 +102,7 @@ Solver 1 Steady State Convergence Tolerance = 1e-09 Linear System Residual Output = 10 Calculate Loads = Logical True - Calculate Energy Norm = Logical True + Calculate Energy Inner Product = Logical True End Solver 2 From 89b896c9baf533e5d1cd994d6134824417298108 Mon Sep 17 00:00:00 2001 From: Peter Raback Date: Fri, 11 Oct 2024 11:28:41 +0300 Subject: [PATCH 36/38] [skip ci] Fix for projection in case Projector % InvPerm has zero values. --- fem/src/modules/SaveData/SaveProjection.F90 | 31 +++++++++++++-------- fem/tests/MortarSaveProjection/case.sif | 12 ++------ 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/fem/src/modules/SaveData/SaveProjection.F90 b/fem/src/modules/SaveData/SaveProjection.F90 index d77962cc13..188d14c68e 100644 --- a/fem/src/modules/SaveData/SaveProjection.F90 +++ b/fem/src/modules/SaveData/SaveProjection.F90 @@ -82,8 +82,9 @@ SUBROUTINE SaveProjection( Model,Solver,dt,Transient ) INTEGER, POINTER :: UnitPerm(:) REAL(KIND=dp) :: Nrm LOGICAL :: Found, Normalize, ToSlave, ToMaster + INTEGER, POINTER :: ActiveProjs(:) - CALL Info('SaveProjection','Creating selected projected values as fields') + CALL Info('SaveProjection','Creating selected projected values as fields',Level=8) Params => GetSolverParams() @@ -105,7 +106,7 @@ SUBROUTINE SaveProjection( Model,Solver,dt,Transient ) DO i=1,NoVar VarName = ListGetString( Params,'Variable '//I2S(i), Found ) Var => VariableGet( Model % Variables, TRIM(VarName) ) - CALL info('SaveProjection','Doing variable: '//TRIM(VarName)) + CALL info('SaveProjection','Doing variable: '//TRIM(VarName),Level=8) TargetName = ListGetString( Params,'Target Variable '//I2S(i), Found ) IF(.NOT. Found) TargetName = 'Projection '//TRIM(VarName) @@ -132,6 +133,8 @@ SUBROUTINE SaveProjection( Model,Solver,dt,Transient ) TargetVar => VariableGet( Model % Variables, TRIM(TargetName) ) END IF + ActiveProjs => ListGetIntegerArray( Params,'Active Projectors '//I2S(i),Found ) + ! Do additive projection! CALL ProjectToVariable() Nrm = Nrm + SUM(TargetVar % Values**2) @@ -156,7 +159,7 @@ SUBROUTINE ProjectToVariable() REAL(KIND=dp) :: r1 REAL(KIND=dp), POINTER :: Values(:) REAL(KIND=dp), ALLOCATABLE :: Weight(:) - LOGICAL, ALLOCATABLE :: IsInvInvPerm(:) + LOGICAL, POINTER :: IsInvInvPerm(:) dofs = Var % Dofs TargetVar % Values = 0.0_dp @@ -165,19 +168,25 @@ SUBROUTINE ProjectToVariable() ALLOCATE(Weight(SIZE(TargetVar % Values))) Weight = 0.0_dp END IF - + ! Go through all the projectors. ! There could be perhaps reason to skip some, but this will do for now. DO bc=1,Model % NumberOfBCs + IF(ASSOCIATED(ActiveProjs)) THEN + IF(.NOT. ANY(ActiveProjs == bc)) CYCLE + END IF + A => CurrentModel % BCs(bc) % PMatrix IF(.NOT. ASSOCIATED(A) ) THEN A => Solver % MortarBCs(bc) % Projector END IF - + IF(.NOT. ASSOCIATED(A)) CYCLE n = A % NumberOfRows IF(n==0) CYCLE + CALL Info('SaveProjection','Doing projection for BC '//I2S(bc)//' of size '//I2S(n),Level=20) + Rows => A % Rows Cols => A % Cols Values => A % Values @@ -191,12 +200,14 @@ SUBROUTINE ProjectToVariable() IsInvInvPerm = .FALSE. DO i=1,n pi = A % InvPerm(i) - IsInvInvPerm(pi) = .TRUE. + IF(pi > 0 ) IsInvInvPerm(pi) = .TRUE. END DO + DO k=1,dofs DO i=1,n pi = A % InvPerm(i) + IF(pi == 0) CYCLE acti = IsInvInvPerm(pi) IF(ASSOCIATED(Var % Perm)) pi = Var % Perm(pi) IF(pi==0) CYCLE @@ -232,18 +243,16 @@ SUBROUTINE ProjectToVariable() IF(Normalize .AND. .NOT. actj) Weight(pj) = Weight(pj) + Values(j) END IF END IF - END DO - + END DO END DO END DO - - IF(ALLOCATED(IsInvInvPerm)) DEALLOCATE(IsInvInvPerm) + DEALLOCATE(IsInvInvPerm) END DO IF(Normalize) THEN WHERE(ABS(Weight) > EPSILON(r1) ) TargetVar % Values = TargetVar % Values / Weight - END WHERE + END WHERE END IF END SUBROUTINE ProjectToVariable diff --git a/fem/tests/MortarSaveProjection/case.sif b/fem/tests/MortarSaveProjection/case.sif index f7fd24f0fd..ca36cc2159 100644 --- a/fem/tests/MortarSaveProjection/case.sif +++ b/fem/tests/MortarSaveProjection/case.sif @@ -21,18 +21,10 @@ Simulation Output Intervals = 0 - Post File = case.vtu - Ascii Output = True +! Post File = case.vtu +! Ascii Output = True End -Constants - Gravity(4) = 0 -1 0 9.82 - Stefan Boltzmann = 5.67e-08 - Permittivity of Vacuum = 8.8542e-12 - Boltzmann Constant = 1.3807e-23 - Unit Charge = 1.602e-19 -End - Body 1 Target Bodies(1) = 1 Name = "Body1" From bb9ff57d4becd17ec5c5f04484d2af8d67d01579 Mon Sep 17 00:00:00 2001 From: Mika Malinen Date: Mon, 14 Oct 2024 16:50:13 +0300 Subject: [PATCH 37/38] Check that an input value is correct --- fem/src/DefUtils.F90 | 6 ++++++ fem/src/SOLVER.KEYWORDS | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/fem/src/DefUtils.F90 b/fem/src/DefUtils.F90 index 37c085969b..70f672d2b8 100644 --- a/fem/src/DefUtils.F90 +++ b/fem/src/DefUtils.F90 @@ -919,6 +919,9 @@ SUBROUTINE GetScalarLocalEigenmode( x,name,UElement,USolver,NoEigen,ComplexPart END IF n = MIN( n, SIZE(x) ) + IF (SIZE(Variable % EigenVectors,1) < NoEigen) THEN + CALL Fatal('GetScalarLocalEigenmode', 'Less eigenfunctions available than requested') + END IF Values => Variable % EigenVectors( NoEigen, :) IF ( ASSOCIATED( Variable % Perm ) ) THEN @@ -985,6 +988,9 @@ SUBROUTINE GetVectorLocalEigenmode( x,name,UElement,USolver,NoEigen,ComplexPart END IF n = MIN( n, SIZE(x) ) + IF (SIZE(Variable % EigenVectors,1) < NoEigen) THEN + CALL Fatal('GetVectorLocalEigenmode', 'Less eigenfunctions available than requested') + END IF Values => Variable % EigenVectors( NoEigen, : ) DO i=1,Variable % DOFs diff --git a/fem/src/SOLVER.KEYWORDS b/fem/src/SOLVER.KEYWORDS index 594476a95b..014929c6b7 100644 --- a/fem/src/SOLVER.KEYWORDS +++ b/fem/src/SOLVER.KEYWORDS @@ -1288,7 +1288,6 @@ Solver:Real: 'Curvature Diffusion' Solver:Real: 'Desired Heating Power' Solver:Real: 'Dot Product Tolerance' Solver:Real: 'Drilling Stabilization Parameter' -Solver:Real: 'Eigen System Convergence Tolerance' Solver:Real: 'Eigen System Convergence Tolerance' Solver:Real: 'Eigen System Shift' Solver:Real: 'Eigen System Shifting Constant' From 4eb95f469f1b716f4827a550eba0267ab6fec5ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Mon, 14 Oct 2024 18:33:37 +0200 Subject: [PATCH 38/38] Fix tests that run ElmerSolver multiple times. Use CMake macro EXECUTE_ELMER_SOLVER that sets up necessary environment variables before executing the ElmerSolver binary. --- fem/tests/InternalPartitioning/runtest.cmake | 2 +- fem/tests/InternalPartitioning2/runtest.cmake | 2 +- fem/tests/InternalPartitioning3/runtest.cmake | 2 +- fem/tests/mgdyn_steady_quad_extruded_restart/runtest.cmake | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fem/tests/InternalPartitioning/runtest.cmake b/fem/tests/InternalPartitioning/runtest.cmake index 6c5c14ca6f..7bfbcd53c4 100644 --- a/fem/tests/InternalPartitioning/runtest.cmake +++ b/fem/tests/InternalPartitioning/runtest.cmake @@ -1,4 +1,4 @@ include(test_macros) execute_process(COMMAND ${ELMERGRID_BIN} 1 2 angle) -execute_process(COMMAND ${ELMERSOLVER_BIN} part.sif) +EXECUTE_ELMER_SOLVER(part.sif) RUN_ELMER_TEST() diff --git a/fem/tests/InternalPartitioning2/runtest.cmake b/fem/tests/InternalPartitioning2/runtest.cmake index 6c5c14ca6f..7bfbcd53c4 100644 --- a/fem/tests/InternalPartitioning2/runtest.cmake +++ b/fem/tests/InternalPartitioning2/runtest.cmake @@ -1,4 +1,4 @@ include(test_macros) execute_process(COMMAND ${ELMERGRID_BIN} 1 2 angle) -execute_process(COMMAND ${ELMERSOLVER_BIN} part.sif) +EXECUTE_ELMER_SOLVER(part.sif) RUN_ELMER_TEST() diff --git a/fem/tests/InternalPartitioning3/runtest.cmake b/fem/tests/InternalPartitioning3/runtest.cmake index 6c5c14ca6f..7bfbcd53c4 100644 --- a/fem/tests/InternalPartitioning3/runtest.cmake +++ b/fem/tests/InternalPartitioning3/runtest.cmake @@ -1,4 +1,4 @@ include(test_macros) execute_process(COMMAND ${ELMERGRID_BIN} 1 2 angle) -execute_process(COMMAND ${ELMERSOLVER_BIN} part.sif) +EXECUTE_ELMER_SOLVER(part.sif) RUN_ELMER_TEST() diff --git a/fem/tests/mgdyn_steady_quad_extruded_restart/runtest.cmake b/fem/tests/mgdyn_steady_quad_extruded_restart/runtest.cmake index 8f14b7c7bf..a638e29d8a 100644 --- a/fem/tests/mgdyn_steady_quad_extruded_restart/runtest.cmake +++ b/fem/tests/mgdyn_steady_quad_extruded_restart/runtest.cmake @@ -1,4 +1,4 @@ include(test_macros) execute_process(COMMAND ${ELMERGRID_BIN} 1 2 quads.grd -nooverwrite) -execute_process(COMMAND ${ELMERSOLVER_BIN} case2d.sif) +EXECUTE_ELMER_SOLVER(case2d.sif) RUN_ELMER_TEST()