From 1e77c79e8a7de0cba1d7103c302882cfaddebc88 Mon Sep 17 00:00:00 2001 From: Benjamin Maier Date: Mon, 8 Jan 2018 10:31:27 +1300 Subject: [PATCH] Adapt examples to cmake build system. --- .../LEVEL_3/100k/CMakeLists.txt | 35 + .../LEVEL_3/100k/Fortran/CMakeLists.txt | 60 + .../100k/{ => Fortran}/src/100kExample.f90 | 0 .../LEVEL_3/100k/OpenCMISS.cmake | 95 ++ .../LEVEL_3/100k/build_debug/build.sh | 2 + .../LEVEL_3/10k/CMakeLists.txt | 35 + .../LEVEL_3/10k/Fortran/CMakeLists.txt | 60 + .../10k/{ => Fortran}/src/10kExample.f90 | 0 .../LEVEL_3/10k/OpenCMISS.cmake | 95 ++ .../LEVEL_3/10k/build_debug/build.sh | 2 + .../LEVEL_3/1k/CMakeLists.txt | 35 + .../LEVEL_3/1k/Fortran/CMakeLists.txt | 60 + .../1k/{ => Fortran}/src/1kExample.f90 | 0 .../LEVEL_3/1k/OpenCMISS.cmake | 95 ++ .../LEVEL_3/1k/build_debug/build.sh | 2 + .../LEVEL_2/CMakeLists.txt | 35 + .../LEVEL_2/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/LEVEL_2Example.f90 | 0 .../LEVEL_2/OpenCMISS.cmake | 95 ++ .../LEVEL_2/build_debug/build.sh | 2 + .../LEVEL_2/CMakeLists.txt | 35 + .../LEVEL_2/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/LEVEL_2Example.f90 | 0 .../LEVEL_2/OpenCMISS.cmake | 95 ++ .../LEVEL_2/build_debug/build.sh | 2 + .../LEVEL_2/CMakeLists.txt | 35 + .../LEVEL_2/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/LEVEL_2Example.f90 | 0 .../LEVEL_2/OpenCMISS.cmake | 95 ++ .../LEVEL_2/build_debug/build.sh | 2 + .../LEVEL_2/CMakeLists.txt | 35 + .../LEVEL_2/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/LEVEL_2Example.f90 | 0 .../LEVEL_2/OpenCMISS.cmake | 95 ++ .../LEVEL_2/build_debug/build.sh | 2 + .../LEVEL_2/CMakeLists.txt | 35 + .../LEVEL_2/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/LEVEL_2Example.f90 | 0 .../LEVEL_2/OpenCMISS.cmake | 95 ++ .../LEVEL_2/build_debug/build.sh | 2 + .../LEVEL_2/CMakeLists.txt | 35 + .../LEVEL_2/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/LEVEL_2Example.f90 | 0 .../LEVEL_2/OpenCMISS.cmake | 95 ++ .../LEVEL_2/build_debug/build.sh | 2 + .../LEVEL_2/CMakeLists.txt | 35 + .../LEVEL_2/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/LEVEL_2Example.f90 | 0 .../LEVEL_2/OpenCMISS.cmake | 95 ++ .../LEVEL_2/build_debug/build.sh | 2 + .../LEVEL_2/CMakeLists.txt | 35 + .../LEVEL_2/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/LEVEL_2Example.f90 | 0 .../LEVEL_2/OpenCMISS.cmake | 95 ++ .../LEVEL_2/build_debug/build.sh | 2 + .../LEVEL_2/CMakeLists.txt | 35 + .../LEVEL_2/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/LEVEL_2Example.f90 | 0 .../LEVEL_2/OpenCMISS.cmake | 95 ++ .../LEVEL_2/build_debug/build.sh | 2 + .../LEVEL_2/CMakeLists.txt | 35 + .../LEVEL_2/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/LEVEL_2Example.f90 | 0 .../LEVEL_2/OpenCMISS.cmake | 95 ++ .../LEVEL_2/build_debug/build.sh | 2 + .../LEVEL_2/CMakeLists.txt | 35 + .../LEVEL_2/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/LEVEL_2Example.f90 | 0 .../LEVEL_2/OpenCMISS.cmake | 95 ++ .../LEVEL_2/build_debug/build.sh | 2 + .../LEVEL_2/CMakeLists.txt | 35 + .../LEVEL_2/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/LEVEL_2Example.f90 | 0 .../LEVEL_2/OpenCMISS.cmake | 95 ++ .../LEVEL_2/build_debug/build.sh | 2 + .../LEVEL_3/100k/CMakeLists.txt | 35 + .../LEVEL_3/100k/Fortran/CMakeLists.txt | 60 + .../100k/{ => Fortran}/src/100kExample.f90 | 0 .../LEVEL_3/100k/OpenCMISS.cmake | 95 ++ .../LEVEL_3/100k/build_debug/build.sh | 2 + .../LEVEL_3/10k/CMakeLists.txt | 35 + .../LEVEL_3/10k/Fortran/CMakeLists.txt | 60 + .../10k/{ => Fortran}/src/10kExample.f90 | 0 .../LEVEL_3/10k/OpenCMISS.cmake | 95 ++ .../LEVEL_3/10k/build_debug/build.sh | 2 + .../LEVEL_3/1k/CMakeLists.txt | 35 + .../LEVEL_3/1k/Fortran/CMakeLists.txt | 60 + .../1k/{ => Fortran}/src/1kExample.f90 | 0 .../LEVEL_3/1k/OpenCMISS.cmake | 95 ++ .../LEVEL_3/1k/build_debug/build.sh | 2 + Bioelectrics/Bidomain/CMakeLists.txt | 35 + Bioelectrics/Bidomain/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/BidomainExample.f90 | 0 Bioelectrics/Bidomain/OpenCMISS.cmake | 95 ++ Bioelectrics/Bidomain/build_debug/build.sh | 2 + Bioelectrics/Monodomain/CMakeLists.txt | 35 + .../Monodomain/Fortran/CMakeLists.txt | 60 + Bioelectrics/Monodomain/OpenCMISS.cmake | 95 ++ Bioelectrics/Monodomain/build_debug/build.sh | 2 + .../MonodomainBuenoOrovio/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/MonodomainBuenoOrovioExample.f90 | 0 .../MonodomainBuenoOrovio/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + Bioelectrics/MonodomainCUDA/CMakeLists.txt | 35 + .../MonodomainCUDA/Fortran/CMakeLists.txt | 60 + .../src/MonodomainCUDAExample.f90 | 0 Bioelectrics/MonodomainCUDA/OpenCMISS.cmake | 95 ++ .../MonodomainCUDA/build_debug/build.sh | 2 + Bioelectrics/MonodomainTP06/CMakeLists.txt | 35 + .../MonodomainTP06/Fortran/CMakeLists.txt | 60 + .../src/MonodomainTP06Example.f90 | 0 Bioelectrics/MonodomainTP06/OpenCMISS.cmake | 95 ++ .../MonodomainTP06/build_debug/build.sh | 2 + .../Monodomain_Shiqiang/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/Monodomain_ShiqiangExample.f90 | 0 .../Monodomain_Shiqiang/OpenCMISS.cmake | 95 ++ .../Monodomain_Shiqiang/build_debug/build.sh | 2 + .../AdvectionDiffusionIO/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/AdvectionDiffusionIOExample.f90 | 0 .../AdvectionDiffusionIO/OpenCMISS.cmake | 95 ++ .../AdvectionDiffusionIO/build_debug/build.sh | 2 + .../AdvectionDiffusionIO_ALE/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/AdvectionDiffusionIO_ALEExample.f90 | 0 .../AdvectionDiffusionIO_ALE/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../AdvectionDiffusionIO_BCs/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/AdvectionDiffusionIO_BCsExample.f90 | 0 .../AdvectionDiffusionIO_BCs/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../StaticAdvectionDiffusion/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/StaticAdvectionDiffusionExample.f90 | 0 .../StaticAdvectionDiffusion/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../StaticAdvectionDiffusionSUPGExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + ...taticAdvectionDiffusion_FieldMLExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../Analytic1DDiffusion/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/Analytic1DDiffusionExample.f90 | 0 .../Analytic1DDiffusion/OpenCMISS.cmake | 95 ++ .../Analytic1DDiffusion/build_debug/build.sh | 2 + .../CubicConvergenceTest/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/CubicConvergenceTestExample.f90 | 0 .../CubicConvergenceTest/OpenCMISS.cmake | 95 ++ .../CubicConvergenceTest/build_debug/build.sh | 2 + .../Diffusion/Diffusion/CMakeLists.txt | 35 + .../Diffusion/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/DiffusionExample.f90 | 0 .../Diffusion/Diffusion/OpenCMISS.cmake | 95 ++ .../Diffusion/Diffusion/build_debug/build.sh | 2 + .../DiffusionConstantSource/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/DiffusionConstantSourceExample.f90 | 0 .../DiffusionConstantSource/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../DiffusionExponentialSource/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/DiffusionExponentialSourceExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../Diffusion/DiffusionIO_ALE/CMakeLists.txt | 35 + .../DiffusionIO_ALE/Fortran/CMakeLists.txt | 60 + .../src/DiffusionIO_ALEExample.f90 | 0 .../Diffusion/DiffusionIO_ALE/OpenCMISS.cmake | 95 ++ .../DiffusionIO_ALE/build_debug/build.sh | 2 + .../DiffusionLinearSource/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/DiffusionLinearSourceExample.f90 | 0 .../DiffusionLinearSource/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../DiffusionQuadraticSource/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/DiffusionQuadraticSourceExample.f90 | 0 .../DiffusionQuadraticSource/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../LinearConvergenceTest/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/LinearConvergenceTestExample.f90 | 0 .../LinearConvergenceTest/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../QuadraticConvergenceTest/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/QuadraticConvergenceTestExample.f90 | 0 .../QuadraticConvergenceTest/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../GeodesicEx1/CMakeLists.txt | 35 + .../GeodesicEx1/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/GeodesicEx1.ele | 0 .../{ => Fortran}/src/GeodesicEx1.node | 0 .../{ => Fortran}/src/GeodesicEx1Example.f90 | 0 .../GeodesicEx1/OpenCMISS.cmake | 95 ++ .../GeodesicEx1/build_debug/build.sh | 2 + .../Hamilton_Jacobi/TwoElmnTet/CMakeLists.txt | 35 + .../TwoElmnTet/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/TwoElmnTet.cond | 0 .../{ => Fortran}/src/TwoElmnTet.ele | 0 .../{ => Fortran}/src/TwoElmnTet.estm | 0 .../{ => Fortran}/src/TwoElmnTet.fiber | 0 .../{ => Fortran}/src/TwoElmnTet.node | 0 .../{ => Fortran}/src/TwoElmnTetExample.f90 | 0 .../TwoElmnTet/OpenCMISS.cmake | 95 ++ .../TwoElmnTet/build_debug/build.sh | 2 + .../AnalyticHelmholtz/CMakeLists.txt | 35 + .../AnalyticHelmholtz/Fortran/CMakeLists.txt | 60 + .../src/AnalyticHelmholtzExample.f90 | 0 .../AnalyticHelmholtz/OpenCMISS.cmake | 95 ++ .../AnalyticHelmholtz/build_debug/build.sh | 2 + .../Helmholtz/Helmholtz/CMakeLists.txt | 35 + .../Helmholtz/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/HelmholtzExample.f90 | 0 .../Helmholtz/Helmholtz/OpenCMISS.cmake | 95 ++ .../Helmholtz/Helmholtz/build_debug/build.sh | 2 + .../Laplace/42Master/CMakeLists.txt | 35 + .../Laplace/42Master/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/42MasterExample.f90 | 0 .../Laplace/42Master/OpenCMISS.cmake | 95 ++ .../Laplace/42Master/build_debug/build.sh | 2 + .../Laplace/AnalyticLaplace/CMakeLists.txt | 35 + .../AnalyticLaplace/Fortran/CMakeLists.txt | 60 + .../src/AnalyticLaplaceExample.f90 | 0 .../Laplace/AnalyticLaplace/OpenCMISS.cmake | 95 ++ .../AnalyticLaplace/build_debug/build.sh | 2 + .../Laplace/Embedded1DLaplace/CMakeLists.txt | 35 + .../Embedded1DLaplace/Fortran/CMakeLists.txt | 60 + .../src/Embedded1DLaplaceExample.f90 | 0 .../Laplace/Embedded1DLaplace/OpenCMISS.cmake | 95 ++ .../Embedded1DLaplace/build_debug/build.sh | 2 + .../Laplace/Embedded2DLaplace/CMakeLists.txt | 35 + .../Embedded2DLaplace/Fortran/CMakeLists.txt | 60 + .../src/Embedded2DLaplaceExample.f90 | 0 .../Laplace/Embedded2DLaplace/OpenCMISS.cmake | 95 ++ .../Embedded2DLaplace/build_debug/build.sh | 2 + .../Laplace/GeneralisedLaplace/CMakeLists.txt | 35 + .../GeneralisedLaplace/Fortran/CMakeLists.txt | 60 + .../GeneralisedLaplace/OpenCMISS.cmake | 95 ++ .../GeneralisedLaplace/build_debug/build.sh | 2 + .../Laplace/Laplace/C/CMakeLists.txt | 35 + .../Laplace/Laplace/C/Fortran/CMakeLists.txt | 60 + .../Laplace/C/{ => Fortran}/src/CExample.c | 0 .../Laplace/Laplace/C/OpenCMISS.cmake | 95 ++ .../Laplace/Laplace/C/build_debug/build.sh | 2 + ClassicalField/Laplace/Laplace/CMakeLists.txt | 35 + .../Laplace/Laplace/Fortran/CMakeLists.txt | 60 + .../Laplace/Laplace/OpenCMISS.cmake | 95 ++ .../Laplace/Laplace/build_debug/build.sh | 2 + .../Laplace/LaplaceEllipsoid/CMakeLists.txt | 35 + .../LaplaceEllipsoid/Fortran/CMakeLists.txt | 60 + .../src/LaplaceEllipsoidExample.f90 | 0 .../Laplace/LaplaceEllipsoid/OpenCMISS.cmake | 95 ++ .../LaplaceEllipsoid/build_debug/build.sh | 2 + .../LaplaceEllipsoid_FieldML/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/LaplaceEllipsoid_FieldMLExample.f90 | 0 .../LaplaceEllipsoid_FieldML/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../Laplace/NumberLaplace/CMakeLists.txt | 35 + .../NumberLaplace/Fortran/CMakeLists.txt | 60 + .../src/NumberLaplaceExample.f90 | 0 .../Laplace/NumberLaplace/OpenCMISS.cmake | 95 ++ .../NumberLaplace/build_debug/build.sh | 2 + .../Laplace/ParallelLaplace/CMakeLists.txt | 35 + .../ParallelLaplace/Fortran/CMakeLists.txt | 60 + .../src/ParallelLaplaceExample.f90 | 0 .../Laplace/ParallelLaplace/OpenCMISS.cmake | 95 ++ .../ParallelLaplace/build_debug/build.sh | 2 + .../SimplexLaplace/Linear/CMakeLists.txt | 35 + .../Linear/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/LinearExample.f90 | 0 .../SimplexLaplace/Linear/OpenCMISS.cmake | 95 ++ .../Linear/build_debug/build.sh | 2 + .../Poisson/42Master/CMakeLists.txt | 35 + .../Poisson/42Master/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/42MasterExample.f90 | 0 .../Poisson/42Master/OpenCMISS.cmake | 95 ++ .../Poisson/42Master/build_debug/build.sh | 2 + .../AnalyticNonlinearPoisson/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/AnalyticNonlinearPoissonExample.f90 | 0 .../AnalyticNonlinearPoisson/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../ExtracellularBidomain/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../ExtracellularBidomain/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../Poisson/NonlinearPoisson/CMakeLists.txt | 35 + .../NonlinearPoisson/Fortran/CMakeLists.txt | 60 + .../src/NonlinearPoissonExample.f90 | 0 .../Poisson/NonlinearPoisson/OpenCMISS.cmake | 95 ++ .../NonlinearPoisson/build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../CellMLSplitReactionDiffusion1DExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + ...actionDiffusionConstantSource1DExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../ReactionDiffusionNoSource1DExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/data_assimilation_test01.cpp | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + ...taAssimilationInflationGuccioneExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/UniAxialExtensionExample.f90 | 0 .../src/data_assimilation_uniextension.cpp | 0 ...similation_uniextension_OpenCMISS_test.cpp | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../1DRectangularCartesian/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/1DRectangularCartesianExample.f90 | 0 .../1DRectangularCartesian/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../2DRectangularCartesian/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/2DRectangularCartesianExample.f90 | 0 .../2DRectangularCartesian/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../3DRectangularCartesian/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/3DRectangularCartesianExample.f90 | 0 .../3DRectangularCartesian/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + EmbeddedMesh/EmbeddedMeshBasic/CMakeLists.txt | 35 + .../EmbeddedMeshBasic/Fortran/CMakeLists.txt | 60 + .../src/EmbeddedMeshBasicExample.f90 | 0 .../EmbeddedMeshBasic/OpenCMISS.cmake | 95 ++ .../EmbeddedMeshBasic/build_debug/build.sh | 2 + .../EmbeddedMeshBasicWithMap/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/EmbeddedMeshBasicWithMapExample.f90 | 0 .../EmbeddedMeshBasicWithMap/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../ActiveContraction/CMakeLists.txt | 35 + .../ActiveContraction/Fortran/CMakeLists.txt | 60 + .../src/ActiveContractionExample.f90 | 0 .../ActiveContraction/OpenCMISS.cmake | 95 ++ .../ActiveContraction/build_debug/build.sh | 2 + FiniteElasticity/Cantilever/CMakeLists.txt | 35 + .../Cantilever/Fortran/CMakeLists.txt | 60 + FiniteElasticity/Cantilever/OpenCMISS.cmake | 95 ++ .../Cantilever/build_debug/build.sh | 2 + FiniteElasticity/CuboidGeneric/CMakeLists.txt | 35 + .../CuboidGeneric/Fortran/CMakeLists.txt | 60 + .../src/CuboidGenericExample.f90 | 0 .../CuboidGeneric/OpenCMISS.cmake | 95 ++ .../CuboidGeneric/build_debug/build.sh | 2 + .../CylinderInflation/CMakeLists.txt | 35 + .../CylinderInflation/Fortran/CMakeLists.txt | 60 + .../src/CylinderInflationExample.f90 | 0 .../CylinderInflation/OpenCMISS.cmake | 95 ++ .../CylinderInflation/build_debug/build.sh | 2 + .../LargeUniAxialExtension/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../LargeUniAxialExtension/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../MembraneExtension2DSpace/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/MembraneExtension2DSpaceExample.f90 | 0 .../MembraneExtension2DSpace/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../MembraneExtension3DSpaceFlatExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../MembraneExtension3DSpaceTiltedExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../MixedBoundaryConditions/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/MixedBoundaryConditionsExample.f90 | 0 .../MixedBoundaryConditions/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../MooneyRivlinInCellML/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/MooneyRivlinInCellMLExample.f90 | 0 .../MooneyRivlinInCellML/OpenCMISS.cmake | 95 ++ .../MooneyRivlinInCellML/build_debug/build.sh | 2 + .../QuadraticEllipsoid/CMakeLists.txt | 35 + .../QuadraticEllipsoid/Fortran/CMakeLists.txt | 60 + .../src/QuadraticEllipsoidExample.f90 | 0 .../QuadraticEllipsoid/OpenCMISS.cmake | 95 ++ .../QuadraticEllipsoid/build_debug/build.sh | 2 + .../QuadraticEllipsoidCosta/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/QuadraticEllipsoidCostaExample.f90 | 0 .../QuadraticEllipsoidCosta/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../QuadraticEllipsoidCostaReadInExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + FiniteElasticity/RightBiceps/CMakeLists.txt | 35 + .../RightBiceps/Fortran/CMakeLists.txt | 60 + FiniteElasticity/RightBiceps/OpenCMISS.cmake | 95 ++ .../RightBiceps/build_debug/CMakeCache.txt | 799 +++++++++++++ .../CMakeFiles/3.5.1/CMakeCCompiler.cmake | 67 ++ .../3.5.1/CMakeDetermineCompilerABI_C.bin | Bin 0 -> 8640 bytes .../CMakeDetermineCompilerABI_Fortran.bin | Bin 0 -> 8992 bytes .../3.5.1/CMakeFortranCompiler.cmake | 59 + .../CMakeFiles/3.5.1/CMakeSystem.cmake | 15 + .../3.5.1/CompilerIdC/CMakeCCompilerId.c | 544 +++++++++ .../CMakeFortranCompilerId.F | 1048 +++++++++++++++++ .../CMakeDirectoryInformation.cmake | 16 + .../build_debug/CMakeFiles/CMakeError.log | 55 + .../build_debug/CMakeFiles/CMakeOutput.log | 532 +++++++++ .../build_debug/CMakeFiles/Makefile.cmake | 222 ++++ .../build_debug/CMakeFiles/Makefile2 | 127 ++ .../CMakeFiles/TargetDirectories.txt | 7 + .../build_debug/CMakeFiles/cmake.check_cache | 1 + .../build_debug/CMakeFiles/feature_tests.bin | Bin 0 -> 8592 bytes .../build_debug/CMakeFiles/feature_tests.c | 34 + .../build_debug/CMakeFiles/progress.marks | 1 + .../build_debug/CTestTestfile.cmake | 7 + .../CMakeDirectoryInformation.cmake | 16 + .../RightBiceps.dir/DependInfo.cmake | 42 + .../CMakeFiles/RightBiceps.dir/build.make | 120 ++ .../RightBiceps.dir/cmake_clean.cmake | 10 + .../RightBiceps.dir/depend.internal | 5 + .../CMakeFiles/RightBiceps.dir/depend.make | 7 + .../CMakeFiles/RightBiceps.dir/flags.make | 10 + .../RightBiceps.dir/fortran.internal | 2 + .../CMakeFiles/RightBiceps.dir/link.txt | 1 + .../CMakeFiles/RightBiceps.dir/progress.make | 3 + .../RightBiceps.dir/src/FortranExample.f90.o | Bin 0 -> 183416 bytes .../Fortran/CMakeFiles/progress.marks | 1 + .../build_debug/Fortran/CTestTestfile.cmake | 8 + .../RightBiceps/build_debug/Fortran/Makefile | 192 +++ .../build_debug/Fortran/RightBiceps | Bin 0 -> 131616 bytes .../build_debug/Fortran/cmake_install.cmake | 34 + .../RightBiceps/build_debug/Fortran/fort.1 | 0 .../RightBiceps/build_debug/Makefile | 160 +++ .../RightBiceps/build_debug/build.sh | 2 + .../build_debug/cmake_install.cmake | 50 + .../mpi_verification/C/CMakeCache.txt | 275 +++++ .../C/CMakeFiles/3.5.1/CMakeCCompiler.cmake | 67 ++ .../3.5.1/CMakeDetermineCompilerABI_C.bin | Bin 0 -> 8640 bytes .../C/CMakeFiles/3.5.1/CMakeSystem.cmake | 15 + .../3.5.1/CompilerIdC/CMakeCCompilerId.c | 544 +++++++++ .../CMakeDirectoryInformation.cmake | 16 + .../C/CMakeFiles/CMakeOutput.log | 207 ++++ .../C/CMakeFiles/Makefile.cmake | 93 ++ .../mpi_verification/C/CMakeFiles/Makefile2 | 71 ++ .../C/CMakeFiles/TargetDirectories.txt | 2 + .../C/CMakeFiles/cmake.check_cache | 1 + .../C/CMakeFiles/feature_tests.bin | Bin 0 -> 8592 bytes .../C/CMakeFiles/feature_tests.c | 34 + .../C/CMakeFiles/progress.marks | 1 + .../mpi_verification/C/CMakeLists.txt | 8 + .../build_debug/mpi_verification/C/Makefile | 134 +++ .../mpi_verification/C/cmake_install.cmake | 44 + .../mpi_verification/C/compiler_info.cmake | 4 + .../mpi_verification/Fortran/CMakeCache.txt | 275 +++++ .../CMakeDetermineCompilerABI_Fortran.bin | Bin 0 -> 8992 bytes .../3.5.1/CMakeFortranCompiler.cmake | 59 + .../CMakeFiles/3.5.1/CMakeSystem.cmake | 15 + .../CMakeFortranCompilerId.F | 1048 +++++++++++++++++ .../CMakeDirectoryInformation.cmake | 16 + .../Fortran/CMakeFiles/CMakeOutput.log | 218 ++++ .../Fortran/CMakeFiles/Makefile.cmake | 59 + .../Fortran/CMakeFiles/Makefile2 | 71 ++ .../Fortran/CMakeFiles/TargetDirectories.txt | 2 + .../Fortran/CMakeFiles/cmake.check_cache | 1 + .../Fortran/CMakeFiles/progress.marks | 1 + .../mpi_verification/Fortran/CMakeLists.txt | 8 + .../mpi_verification/Fortran/Makefile | 134 +++ .../Fortran/cmake_install.cmake | 44 + .../Fortran/compiler_info.cmake | 4 + FiniteElasticity/SimpleShear/CMakeLists.txt | 35 + .../SimpleShear/Fortran/CMakeLists.txt | 60 + FiniteElasticity/SimpleShear/OpenCMISS.cmake | 95 ++ .../SimpleShear/build_debug/build.sh | 2 + .../LargeQuadraticTet/CMakeLists.txt | 35 + .../LargeQuadraticTet/Fortran/CMakeLists.txt | 60 + .../src/LargeQuadraticTetExample.f90 | 0 .../LargeQuadraticTet/OpenCMISS.cmake | 95 ++ .../LargeQuadraticTet/build_debug/build.sh | 2 + .../SimplexElements/LinearTet/CMakeLists.txt | 35 + .../LinearTet/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/LinearTetExample.f90 | 0 .../SimplexElements/LinearTet/OpenCMISS.cmake | 95 ++ .../LinearTet/build_debug/build.sh | 2 + .../QuadraticTet/CMakeLists.txt | 35 + .../QuadraticTet/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/QuadraticTetExample.f90 | 0 .../QuadraticTet/OpenCMISS.cmake | 95 ++ .../QuadraticTet/build_debug/build.sh | 2 + .../TriCubicAxialExtension/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/TriCubicAxialExtensionExample.f90 | 0 .../TriCubicAxialExtension/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../TriQuadraticCube/CMakeLists.txt | 35 + .../TriQuadraticCube/Fortran/CMakeLists.txt | 60 + .../src/TriQuadraticCubeExample.f90 | 0 .../TriQuadraticCube/OpenCMISS.cmake | 95 ++ .../TriQuadraticCube/build_debug/build.sh | 2 + .../UniAxialExtension/CMakeLists.txt | 35 + .../UniAxialExtension/Fortran/CMakeLists.txt | 60 + .../UniAxialExtension/OpenCMISS.cmake | 95 ++ .../UniAxialExtension/build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../UniAxialExtensionCompressibleExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + ...UniAxialExtensionLoadIncrementsExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../UniAxialExtensionOrthotropicExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + FiniteElasticity/testingPoints/CMakeLists.txt | 35 + .../testingPoints/Fortran/CMakeLists.txt | 60 + .../src/testingPointsExample.f90 | 0 .../testingPoints/OpenCMISS.cmake | 95 ++ .../testingPoints/build_debug/build.sh | 2 + FluidMechanics/Burgers/Burgers/CMakeLists.txt | 35 + .../Burgers/Burgers/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/BurgersExample.f90 | 0 .../Burgers/Burgers/OpenCMISS.cmake | 95 ++ .../Burgers/Burgers/build_debug/build.sh | 2 + .../Burgers/GeneralisedBurgers/CMakeLists.txt | 35 + .../GeneralisedBurgers/Fortran/CMakeLists.txt | 60 + .../src/GeneralisedBurgersExample.f90 | 0 .../GeneralisedBurgers/OpenCMISS.cmake | 95 ++ .../GeneralisedBurgers/build_debug/build.sh | 2 + .../Burgers/StaticBurgers/CMakeLists.txt | 35 + .../StaticBurgers/Fortran/CMakeLists.txt | 60 + .../src/StaticBurgersExample.f90 | 0 .../Burgers/StaticBurgers/OpenCMISS.cmake | 95 ++ .../StaticBurgers/build_debug/build.sh | 2 + FluidMechanics/Darcy/Analytic/CMakeLists.txt | 35 + .../Darcy/Analytic/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/AnalyticExample.f90 | 0 FluidMechanics/Darcy/Analytic/OpenCMISS.cmake | 95 ++ .../Darcy/Analytic/build_debug/build.sh | 2 + FluidMechanics/Darcy/Dynamic/CMakeLists.txt | 35 + .../Darcy/Dynamic/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/DynamicExample.f90 | 0 FluidMechanics/Darcy/Dynamic/OpenCMISS.cmake | 95 ++ .../Darcy/Dynamic/build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../MultiCompartmentStaticDarcyExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../Darcy/QuasistaticMaterial/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/QuasistaticMaterialExample.f90 | 0 .../Darcy/QuasistaticMaterial/OpenCMISS.cmake | 95 ++ .../QuasistaticMaterial/build_debug/build.sh | 2 + FluidMechanics/Darcy/Static/CMakeLists.txt | 35 + .../Darcy/Static/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/StaticExample.f90 | 0 FluidMechanics/Darcy/Static/OpenCMISS.cmake | 95 ++ .../Darcy/Static/build_debug/build.sh | 2 + .../Darcy/temp_memory_issue/CMakeLists.txt | 35 + .../temp_memory_issue/Fortran/CMakeLists.txt | 60 + .../src/temp_memory_issueExample.f90 | 0 .../Darcy/temp_memory_issue/OpenCMISS.cmake | 95 ++ .../temp_memory_issue/build_debug/build.sh | 2 + .../NavierStokes/42Master/CMakeLists.txt | 35 + .../42Master/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/42MasterExample.f90 | 0 .../NavierStokes/42Master/OpenCMISS.cmake | 95 ++ .../42Master/build_debug/build.sh | 2 + .../Coupled1DCellML/CMakeLists.txt | 35 + .../Coupled1DCellML/Fortran/CMakeLists.txt | 60 + .../Coupled1DCellML/OpenCMISS.cmake | 95 ++ .../Coupled1DCellML/build_debug/build.sh | 2 + .../2DChannel/Static/CMakeLists.txt | 35 + .../2DChannel/Static/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/StaticExample.f90 | 0 .../2DChannel/Static/OpenCMISS.cmake | 95 ++ .../2DChannel/Static/build_debug/build.sh | 2 + .../RoutineCheck/ALE/CMakeLists.txt | 35 + .../RoutineCheck/ALE/Fortran/CMakeLists.txt | 60 + .../ALE/{ => Fortran}/src/ALEExample.f90 | 0 .../RoutineCheck/ALE/OpenCMISS.cmake | 95 ++ .../RoutineCheck/ALE/build_debug/build.sh | 2 + .../RoutineCheck/Dynamic/CMakeLists.txt | 35 + .../Dynamic/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/DynamicExample.f90 | 0 .../RoutineCheck/Dynamic/OpenCMISS.cmake | 95 ++ .../RoutineCheck/Dynamic/build_debug/build.sh | 2 + .../ParallelDynamic/CMakeLists.txt | 35 + .../ParallelDynamic/Fortran/CMakeLists.txt | 60 + .../src/ParallelDynamicExample.f90 | 0 .../ParallelDynamic/OpenCMISS.cmake | 95 ++ .../ParallelDynamic/build_debug/build.sh | 2 + .../ParallelStatic/CMakeLists.txt | 35 + .../ParallelStatic/Fortran/CMakeLists.txt | 60 + .../src/ParallelStaticExample.f90 | 0 .../ParallelStatic/OpenCMISS.cmake | 95 ++ .../ParallelStatic/build_debug/build.sh | 2 + .../RoutineCheck/Static/CMakeLists.txt | 35 + .../Static/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/StaticExample.f90 | 0 .../RoutineCheck/Static/OpenCMISS.cmake | 95 ++ .../RoutineCheck/Static/build_debug/build.sh | 2 + .../Static_FieldML/CMakeLists.txt | 35 + .../Static_FieldML/Fortran/CMakeLists.txt | 60 + .../src/Static_FieldMLExample.f90 | 0 .../Static_FieldML/OpenCMISS.cmake | 95 ++ .../Static_FieldML/build_debug/build.sh | 2 + .../NavierStokes/SupgChannel/CMakeLists.txt | 35 + .../SupgChannel/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/SupgChannelExample.f90 | 0 .../NavierStokes/SupgChannel/OpenCMISS.cmake | 95 ++ .../SupgChannel/build_debug/build.sh | 2 + .../NavierStokes/TaylorGreen/CMakeLists.txt | 35 + .../TaylorGreen/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/TaylorGreenExample.f90 | 0 .../NavierStokes/TaylorGreen/OpenCMISS.cmake | 95 ++ .../TaylorGreen/build_debug/build.sh | 2 + .../DynamicTest_theta_0.5/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/DynamicTest_theta_0.5Example.f90 | 0 .../DynamicTest_theta_0.5/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../DynamicTest_theta_1.0/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/DynamicTest_theta_1.0Example.f90 | 0 .../DynamicTest_theta_1.0/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../Poiseuille/Static/CMakeLists.txt | 35 + .../Poiseuille/Static/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/StaticExample.f90 | 0 .../Poiseuille/Static/OpenCMISS.cmake | 95 ++ .../Poiseuille/Static/build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../DynamicNavierStokesInParallelExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + FluidMechanics/Stokes/42Master/CMakeLists.txt | 35 + .../Stokes/42Master/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/42MasterExample.f90 | 0 .../Stokes/42Master/OpenCMISS.cmake | 95 ++ .../Stokes/42Master/build_debug/build.sh | 2 + .../Stokes/RoutineCheck/ALE/CMakeLists.txt | 35 + .../RoutineCheck/ALE/Fortran/CMakeLists.txt | 60 + .../ALE/{ => Fortran}/src/ALEExample.f90 | 0 .../Stokes/RoutineCheck/ALE/OpenCMISS.cmake | 95 ++ .../RoutineCheck/ALE/build_debug/build.sh | 2 + .../RoutineCheck/Dynamic/CMakeLists.txt | 35 + .../Dynamic/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/DynamicExample.f90 | 0 .../RoutineCheck/Dynamic/OpenCMISS.cmake | 95 ++ .../RoutineCheck/Dynamic/build_debug/build.sh | 2 + .../Stokes/RoutineCheck/Static/CMakeLists.txt | 35 + .../Static/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/StaticExample.f90 | 0 .../RoutineCheck/Static/OpenCMISS.cmake | 95 ++ .../RoutineCheck/Static/build_debug/build.sh | 2 + .../CoupledFluidSolid/CMakeLists.txt | 35 + .../CoupledFluidSolid/Fortran/CMakeLists.txt | 60 + .../CoupledFluidSolid/Fortran/OpenCMISS.cmake | 95 ++ .../CoupledFluidSolid/OpenCMISS.cmake | 95 ++ .../CoupledFluidSolid/build_debug/build.sh | 2 + .../CoupledLaplace/CMakeLists.txt | 35 + .../CoupledLaplace/Fortran/CMakeLists.txt | 60 + .../src/CoupledLaplaceExample.f90 | 0 .../CoupledLaplace/OpenCMISS.cmake | 95 ++ .../CoupledLaplace/build_debug/build.sh | 2 + .../InputCoupledLaplace/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/InputCoupledLaplaceExample.f90 | 0 .../InputCoupledLaplace/OpenCMISS.cmake | 95 ++ .../InputCoupledLaplace/build_debug/build.sh | 2 + .../InputCoupledStokes/CMakeLists.txt | 35 + .../InputCoupledStokes/Fortran/CMakeLists.txt | 60 + .../src/InputCoupledStokesExample.f90 | 0 .../InputCoupledStokes/OpenCMISS.cmake | 95 ++ .../InputCoupledStokes/build_debug/build.sh | 2 + .../InputUnCoupledLaplace/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/InputUnCoupledLaplaceExample.f90 | 0 .../InputUnCoupledLaplace/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../UnCoupledLaplace/CMakeLists.txt | 35 + .../UnCoupledLaplace/Fortran/CMakeLists.txt | 60 + .../src/UnCoupledLaplaceExample.f90 | 0 .../UnCoupledLaplace/OpenCMISS.cmake | 95 ++ .../UnCoupledLaplace/build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + ...tensionPlaneStressLagrangeBasisExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../3DExtensionHermiteBasis/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/3DExtensionHermiteBasisExample.f90 | 0 .../3DExtensionHermiteBasis/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../3DExtensionLagrangeBasis/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/3DExtensionLagrangeBasisExample.f90 | 0 .../3DExtensionLagrangeBasis/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../Analytic/CantileverBeam/CMakeLists.txt | 35 + .../CantileverBeam/Fortran/CMakeLists.txt | 60 + .../src/CantileverBeamExample.f90 | 0 .../Analytic/CantileverBeam/OpenCMISS.cmake | 95 ++ .../CantileverBeam/build_debug/build.sh | 2 + .../Analytic/Extension/CMakeLists.txt | 35 + .../Analytic/Extension/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/ExtensionExample.f90 | 0 .../Analytic/Extension/OpenCMISS.cmake | 95 ++ .../Analytic/Extension/build_debug/build.sh | 2 + Meshes/1DCubicHermite/CMakeLists.txt | 35 + Meshes/1DCubicHermite/Fortran/CMakeLists.txt | 60 + .../src/1DCubicHermiteExample.f90 | 0 Meshes/1DCubicHermite/OpenCMISS.cmake | 95 ++ Meshes/1DCubicHermite/build_debug/build.sh | 2 + Meshes/LagrangeSimplexMesh/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/LagrangeSimplexMeshExample.f90 | 0 Meshes/LagrangeSimplexMesh/OpenCMISS.cmake | 95 ++ .../LagrangeSimplexMesh/build_debug/build.sh | 2 + Meshes/MoreComplexMesh/CMakeLists.txt | 35 + Meshes/MoreComplexMesh/Fortran/CMakeLists.txt | 60 + .../src/MoreComplexMeshExample.f90 | 0 Meshes/MoreComplexMesh/OpenCMISS.cmake | 95 ++ Meshes/MoreComplexMesh/build_debug/build.sh | 2 + Meshes/MoreComplexMeshC/CMakeLists.txt | 35 + .../MoreComplexMeshC/Fortran/CMakeLists.txt | 60 + .../src/MoreComplexMeshCExample.c | 0 Meshes/MoreComplexMeshC/OpenCMISS.cmake | 95 ++ Meshes/MoreComplexMeshC/build_debug/build.sh | 2 + Meshes/MultipleMeshComponents/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/MultipleMeshComponentsExample.f90 | 0 Meshes/MultipleMeshComponents/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../Simplex/Tetrahedral/Cubic/CMakeLists.txt | 35 + .../Tetrahedral/Cubic/Fortran/CMakeLists.txt | 60 + .../Cubic/{ => Fortran}/src/CubicExample.f90 | 0 .../Simplex/Tetrahedral/Cubic/OpenCMISS.cmake | 95 ++ .../Tetrahedral/Cubic/build_debug/build.sh | 2 + .../Simplex/Tetrahedral/Linear/CMakeLists.txt | 35 + .../Tetrahedral/Linear/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/LinearExample.f90 | 0 .../Tetrahedral/Linear/OpenCMISS.cmake | 95 ++ .../Tetrahedral/Linear/build_debug/build.sh | 2 + .../Tetrahedral/Quadratic/CMakeLists.txt | 35 + .../Quadratic/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/QuadraticExample.f90 | 0 .../Tetrahedral/Quadratic/OpenCMISS.cmake | 95 ++ .../Quadratic/build_debug/build.sh | 2 + .../Simplex/Triangular/Cubic/CMakeLists.txt | 35 + .../Triangular/Cubic/Fortran/CMakeLists.txt | 60 + .../Cubic/{ => Fortran}/src/CubicExample.f90 | 0 .../Simplex/Triangular/Cubic/OpenCMISS.cmake | 95 ++ .../Triangular/Cubic/build_debug/build.sh | 2 + .../Simplex/Triangular/Linear/CMakeLists.txt | 35 + .../Triangular/Linear/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/LinearExample.f90 | 0 .../Simplex/Triangular/Linear/OpenCMISS.cmake | 95 ++ .../Triangular/Linear/build_debug/build.sh | 2 + .../Triangular/Quadratic/CMakeLists.txt | 35 + .../Quadratic/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/QuadraticExample.f90 | 0 .../Triangular/Quadratic/OpenCMISS.cmake | 95 ++ .../Triangular/Quadratic/build_debug/build.sh | 2 + .../QuadraticSimplexManual/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/SimplexMeshExample.f90 | 0 .../QuadraticSimplexManual/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + Meshes/Versions3DLaplace/CMakeLists.txt | 35 + .../Versions3DLaplace/Fortran/CMakeLists.txt | 60 + .../src/Versions3DLaplaceExample.f90 | 0 Meshes/Versions3DLaplace/OpenCMISS.cmake | 95 ++ Meshes/Versions3DLaplace/build_debug/build.sh | 2 + .../simple_geometry/CMakeLists.txt | 35 + .../simple_geometry/Fortran/CMakeLists.txt | 60 + .../src/simple_geometryExample.f90 | 0 .../simple_geometry/OpenCMISS.cmake | 95 ++ .../simple_geometry/build_debug/build.sh | 2 + .../titin_10/CMakeLists.txt | 35 + .../titin_10/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/titin_10Example.f90 | 0 .../titin_10/OpenCMISS.cmake | 95 ++ .../titin_10/build_debug/build.sh | 2 + .../while_loop/CMakeLists.txt | 35 + .../while_loop/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/while_loopExample.f90 | 0 .../while_loop/OpenCMISS.cmake | 95 ++ .../while_loop/build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + ...novMonodomainElasticitySameMeshExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + ...pledDiffusionAdvectionDiffusionExample.f90 | 0 ...DiffusionAdvectionDiffusionExample_old.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CoupledDiffusionDiffusion/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/CoupledDiffusionDiffusionExample.f90 | 0 .../CoupledDiffusionDiffusion/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + ...icAnalyticTestThreeCompThreeDimExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../MonolithicSchemeTest/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/MonolithicSchemeTestExample.f90 | 0 .../MonolithicSchemeTest/OpenCMISS.cmake | 95 ++ .../MonolithicSchemeTest/build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../MonolithicSchemeTestAnalyticExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../MonolithicSchemeTest_FieldMLExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + ...chemeAdvectionDiffusion_FieldMLExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../CylinderInflationDrivenDarcyExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + ...erInflationDrivenMultiCompDarcyExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + ...pElastDrivenDarcy_AnalyticDarcyExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + ...mpressibleElasticityDrivenDarcyExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + ...ressibleElasticityDrivenDarcyIOExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + ...essibleElasticityDrivenDarcyIO2Example.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + ...essibleElasticityDrivenDarcyIO3Example.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + ...leElasticityDrivenDarcyMatSolveExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + ...eElasticityDrivenMultiCompDarcyExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + ...lasticityDrivenMultiCompDarcyIOExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../InriaModel/CMakeLists.txt | 35 + .../InriaModel/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/InriaModelExample.f90 | 0 .../InriaModel/OpenCMISS.cmake | 95 ++ .../InriaModel/build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../QuadraticEllipsoidDrivenDarcyExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + ...icEllipsoidDrivenMultiCompDarcyExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + .../SameRegionSameMesh/CMakeLists.txt | 35 + .../SameRegionSameMesh/Fortran/CMakeLists.txt | 60 + .../src/SameRegionSameMeshExample.f90 | 0 .../SameRegionSameMesh/OpenCMISS.cmake | 95 ++ .../SameRegionSameMesh/build_debug/build.sh | 2 + .../Cantilever/CMakeLists.txt | 35 + .../Cantilever/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/CantileverExample.f90 | 0 .../Cantilever/OpenCMISS.cmake | 95 ++ .../Cantilever/build_debug/build.sh | 2 + .../StaticExtension/CMakeLists.txt | 35 + .../StaticExtension/Fortran/CMakeLists.txt | 60 + .../src/StaticExtensionExample.f90 | 0 .../StaticExtension/OpenCMISS.cmake | 95 ++ .../StaticExtension/build_debug/build.sh | 2 + TwoRegions/CMakeLists.txt | 35 + TwoRegions/Fortran/CMakeLists.txt | 60 + .../{ => Fortran}/src/TwoRegionsExample.f90 | 0 TwoRegions/OpenCMISS.cmake | 95 ++ TwoRegions/build_debug/build.sh | 2 + cellml/CMakeLists.txt | 35 + cellml/Fortran/CMakeLists.txt | 60 + cellml/OpenCMISS.cmake | 95 ++ cellml/build_debug/build.sh | 2 + cellml/model-integration/CMakeLists.txt | 35 + .../model-integration/Fortran/CMakeLists.txt | 60 + cellml/model-integration/OpenCMISS.cmake | 95 ++ cellml/model-integration/build_debug/build.sh | 2 + define-geometry-and-export/CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + .../src/define-geometry-and-exportExample.f90 | 0 define-geometry-and-export/OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + scripts/create_cmakefiles.py | 114 ++ scripts/resources/CMakeLists-1.txt | 35 + scripts/resources/OpenCMISS.cmake | 95 ++ scripts/resources/build.sh | 2 + .../CMakeLists.txt | 35 + .../Fortran/CMakeLists.txt | 60 + ...ield-manipulation-direct-accessExample.f90 | 0 .../OpenCMISS.cmake | 95 ++ .../build_debug/build.sh | 2 + 974 files changed, 42567 insertions(+) create mode 100644 42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/CMakeLists.txt create mode 100644 42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/Fortran/CMakeLists.txt rename 42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/{ => Fortran}/src/100kExample.f90 (100%) create mode 100644 42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/OpenCMISS.cmake create mode 100644 42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/build_debug/build.sh create mode 100644 42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/CMakeLists.txt create mode 100644 42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/Fortran/CMakeLists.txt rename 42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/{ => Fortran}/src/10kExample.f90 (100%) create mode 100644 42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/OpenCMISS.cmake create mode 100644 42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/build_debug/build.sh create mode 100644 42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/CMakeLists.txt create mode 100644 42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/Fortran/CMakeLists.txt rename 42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/{ => Fortran}/src/1kExample.f90 (100%) create mode 100644 42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/OpenCMISS.cmake create mode 100644 42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/build_debug/build.sh create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityLinearPressure/LEVEL_2/CMakeLists.txt create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt rename 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityLinearPressure/LEVEL_2/{ => Fortran}/src/LEVEL_2Example.f90 (100%) create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityLinearPressure/LEVEL_2/build_debug/build.sh create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityQuadraticPressure/LEVEL_2/CMakeLists.txt create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityQuadraticPressure/LEVEL_2/Fortran/CMakeLists.txt rename 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityQuadraticPressure/LEVEL_2/{ => Fortran}/src/LEVEL_2Example.f90 (100%) create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityQuadraticPressure/LEVEL_2/OpenCMISS.cmake create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityQuadraticPressure/LEVEL_2/build_debug/build.sh create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/QuadraticVelocityLinearPressure/LEVEL_2/CMakeLists.txt create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/QuadraticVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt rename 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/QuadraticVelocityLinearPressure/LEVEL_2/{ => Fortran}/src/LEVEL_2Example.f90 (100%) create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/QuadraticVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/QuadraticVelocityLinearPressure/LEVEL_2/build_debug/build.sh create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityLinearPressure/LEVEL_2/CMakeLists.txt create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt rename 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityLinearPressure/LEVEL_2/{ => Fortran}/src/LEVEL_2Example.f90 (100%) create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityLinearPressure/LEVEL_2/build_debug/build.sh create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityQuadraticPressure/LEVEL_2/CMakeLists.txt create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityQuadraticPressure/LEVEL_2/Fortran/CMakeLists.txt rename 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityQuadraticPressure/LEVEL_2/{ => Fortran}/src/LEVEL_2Example.f90 (100%) create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityQuadraticPressure/LEVEL_2/OpenCMISS.cmake create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityQuadraticPressure/LEVEL_2/build_debug/build.sh create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/QuadraticVelocityLinearPressure/LEVEL_2/CMakeLists.txt create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/QuadraticVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt rename 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/QuadraticVelocityLinearPressure/LEVEL_2/{ => Fortran}/src/LEVEL_2Example.f90 (100%) create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/QuadraticVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/QuadraticVelocityLinearPressure/LEVEL_2/build_debug/build.sh create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityLinearPressure/LEVEL_2/CMakeLists.txt create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt rename 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityLinearPressure/LEVEL_2/{ => Fortran}/src/LEVEL_2Example.f90 (100%) create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityLinearPressure/LEVEL_2/build_debug/build.sh create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityQuadraticPressure/LEVEL_2/CMakeLists.txt create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityQuadraticPressure/LEVEL_2/Fortran/CMakeLists.txt rename 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityQuadraticPressure/LEVEL_2/{ => Fortran}/src/LEVEL_2Example.f90 (100%) create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityQuadraticPressure/LEVEL_2/OpenCMISS.cmake create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityQuadraticPressure/LEVEL_2/build_debug/build.sh create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_2/CMakeLists.txt create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt rename 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_2/{ => Fortran}/src/LEVEL_2Example.f90 (100%) create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_2/build_debug/build.sh create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityLinearPressure/LEVEL_2/CMakeLists.txt create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt rename 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityLinearPressure/LEVEL_2/{ => Fortran}/src/LEVEL_2Example.f90 (100%) create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityLinearPressure/LEVEL_2/build_debug/build.sh create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityQuadraticPressure/LEVEL_2/CMakeLists.txt create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityQuadraticPressure/LEVEL_2/Fortran/CMakeLists.txt rename 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityQuadraticPressure/LEVEL_2/{ => Fortran}/src/LEVEL_2Example.f90 (100%) create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityQuadraticPressure/LEVEL_2/OpenCMISS.cmake create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityQuadraticPressure/LEVEL_2/build_debug/build.sh create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/QuadraticVelocityLinearPressure/LEVEL_2/CMakeLists.txt create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/QuadraticVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt rename 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/QuadraticVelocityLinearPressure/LEVEL_2/{ => Fortran}/src/LEVEL_2Example.f90 (100%) create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/QuadraticVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/QuadraticVelocityLinearPressure/LEVEL_2/build_debug/build.sh create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/CMakeLists.txt create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/Fortran/CMakeLists.txt rename 42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/{ => Fortran}/src/100kExample.f90 (100%) create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/OpenCMISS.cmake create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/build_debug/build.sh create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/CMakeLists.txt create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/Fortran/CMakeLists.txt rename 42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/{ => Fortran}/src/10kExample.f90 (100%) create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/OpenCMISS.cmake create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/build_debug/build.sh create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/CMakeLists.txt create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/Fortran/CMakeLists.txt rename 42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/{ => Fortran}/src/1kExample.f90 (100%) create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/OpenCMISS.cmake create mode 100644 42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/build_debug/build.sh create mode 100644 Bioelectrics/Bidomain/CMakeLists.txt create mode 100644 Bioelectrics/Bidomain/Fortran/CMakeLists.txt rename Bioelectrics/Bidomain/{ => Fortran}/src/BidomainExample.f90 (100%) create mode 100644 Bioelectrics/Bidomain/OpenCMISS.cmake create mode 100644 Bioelectrics/Bidomain/build_debug/build.sh create mode 100644 Bioelectrics/Monodomain/CMakeLists.txt create mode 100644 Bioelectrics/Monodomain/Fortran/CMakeLists.txt create mode 100644 Bioelectrics/Monodomain/OpenCMISS.cmake create mode 100644 Bioelectrics/Monodomain/build_debug/build.sh create mode 100644 Bioelectrics/MonodomainBuenoOrovio/CMakeLists.txt create mode 100644 Bioelectrics/MonodomainBuenoOrovio/Fortran/CMakeLists.txt rename Bioelectrics/MonodomainBuenoOrovio/{ => Fortran}/src/MonodomainBuenoOrovioExample.f90 (100%) create mode 100644 Bioelectrics/MonodomainBuenoOrovio/OpenCMISS.cmake create mode 100644 Bioelectrics/MonodomainBuenoOrovio/build_debug/build.sh create mode 100644 Bioelectrics/MonodomainCUDA/CMakeLists.txt create mode 100644 Bioelectrics/MonodomainCUDA/Fortran/CMakeLists.txt rename Bioelectrics/MonodomainCUDA/{ => Fortran}/src/MonodomainCUDAExample.f90 (100%) create mode 100644 Bioelectrics/MonodomainCUDA/OpenCMISS.cmake create mode 100644 Bioelectrics/MonodomainCUDA/build_debug/build.sh create mode 100644 Bioelectrics/MonodomainTP06/CMakeLists.txt create mode 100644 Bioelectrics/MonodomainTP06/Fortran/CMakeLists.txt rename Bioelectrics/MonodomainTP06/{ => Fortran}/src/MonodomainTP06Example.f90 (100%) create mode 100644 Bioelectrics/MonodomainTP06/OpenCMISS.cmake create mode 100644 Bioelectrics/MonodomainTP06/build_debug/build.sh create mode 100644 Bioelectrics/Monodomain_Shiqiang/CMakeLists.txt create mode 100644 Bioelectrics/Monodomain_Shiqiang/Fortran/CMakeLists.txt rename Bioelectrics/Monodomain_Shiqiang/{ => Fortran}/src/Monodomain_ShiqiangExample.f90 (100%) create mode 100644 Bioelectrics/Monodomain_Shiqiang/OpenCMISS.cmake create mode 100644 Bioelectrics/Monodomain_Shiqiang/build_debug/build.sh create mode 100644 ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO/CMakeLists.txt create mode 100644 ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO/Fortran/CMakeLists.txt rename ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO/{ => Fortran}/src/AdvectionDiffusionIOExample.f90 (100%) create mode 100644 ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO/OpenCMISS.cmake create mode 100644 ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO/build_debug/build.sh create mode 100644 ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_ALE/CMakeLists.txt create mode 100644 ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_ALE/Fortran/CMakeLists.txt rename ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_ALE/{ => Fortran}/src/AdvectionDiffusionIO_ALEExample.f90 (100%) create mode 100644 ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_ALE/OpenCMISS.cmake create mode 100644 ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_ALE/build_debug/build.sh create mode 100644 ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_BCs/CMakeLists.txt create mode 100644 ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_BCs/Fortran/CMakeLists.txt rename ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_BCs/{ => Fortran}/src/AdvectionDiffusionIO_BCsExample.f90 (100%) create mode 100644 ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_BCs/OpenCMISS.cmake create mode 100644 ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_BCs/build_debug/build.sh create mode 100644 ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion/CMakeLists.txt create mode 100644 ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion/Fortran/CMakeLists.txt rename ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion/{ => Fortran}/src/StaticAdvectionDiffusionExample.f90 (100%) create mode 100644 ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion/OpenCMISS.cmake create mode 100644 ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion/build_debug/build.sh create mode 100644 ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusionSUPG/CMakeLists.txt create mode 100644 ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusionSUPG/Fortran/CMakeLists.txt rename ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusionSUPG/{ => Fortran}/src/StaticAdvectionDiffusionSUPGExample.f90 (100%) create mode 100644 ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusionSUPG/OpenCMISS.cmake create mode 100644 ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusionSUPG/build_debug/build.sh create mode 100644 ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion_FieldML/CMakeLists.txt create mode 100644 ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion_FieldML/Fortran/CMakeLists.txt rename ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion_FieldML/{ => Fortran}/src/StaticAdvectionDiffusion_FieldMLExample.f90 (100%) create mode 100644 ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion_FieldML/OpenCMISS.cmake create mode 100644 ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion_FieldML/build_debug/build.sh create mode 100644 ClassicalField/Diffusion/Analytic1DDiffusion/CMakeLists.txt create mode 100644 ClassicalField/Diffusion/Analytic1DDiffusion/Fortran/CMakeLists.txt rename ClassicalField/Diffusion/Analytic1DDiffusion/{ => Fortran}/src/Analytic1DDiffusionExample.f90 (100%) create mode 100644 ClassicalField/Diffusion/Analytic1DDiffusion/OpenCMISS.cmake create mode 100644 ClassicalField/Diffusion/Analytic1DDiffusion/build_debug/build.sh create mode 100644 ClassicalField/Diffusion/CubicConvergenceTest/CMakeLists.txt create mode 100644 ClassicalField/Diffusion/CubicConvergenceTest/Fortran/CMakeLists.txt rename ClassicalField/Diffusion/CubicConvergenceTest/{ => Fortran}/src/CubicConvergenceTestExample.f90 (100%) create mode 100644 ClassicalField/Diffusion/CubicConvergenceTest/OpenCMISS.cmake create mode 100644 ClassicalField/Diffusion/CubicConvergenceTest/build_debug/build.sh create mode 100644 ClassicalField/Diffusion/Diffusion/CMakeLists.txt create mode 100644 ClassicalField/Diffusion/Diffusion/Fortran/CMakeLists.txt rename ClassicalField/Diffusion/Diffusion/{ => Fortran}/src/DiffusionExample.f90 (100%) create mode 100644 ClassicalField/Diffusion/Diffusion/OpenCMISS.cmake create mode 100644 ClassicalField/Diffusion/Diffusion/build_debug/build.sh create mode 100644 ClassicalField/Diffusion/DiffusionConstantSource/CMakeLists.txt create mode 100644 ClassicalField/Diffusion/DiffusionConstantSource/Fortran/CMakeLists.txt rename ClassicalField/Diffusion/DiffusionConstantSource/{ => Fortran}/src/DiffusionConstantSourceExample.f90 (100%) create mode 100644 ClassicalField/Diffusion/DiffusionConstantSource/OpenCMISS.cmake create mode 100644 ClassicalField/Diffusion/DiffusionConstantSource/build_debug/build.sh create mode 100644 ClassicalField/Diffusion/DiffusionExponentialSource/CMakeLists.txt create mode 100644 ClassicalField/Diffusion/DiffusionExponentialSource/Fortran/CMakeLists.txt rename ClassicalField/Diffusion/DiffusionExponentialSource/{ => Fortran}/src/DiffusionExponentialSourceExample.f90 (100%) create mode 100644 ClassicalField/Diffusion/DiffusionExponentialSource/OpenCMISS.cmake create mode 100644 ClassicalField/Diffusion/DiffusionExponentialSource/build_debug/build.sh create mode 100644 ClassicalField/Diffusion/DiffusionIO_ALE/CMakeLists.txt create mode 100644 ClassicalField/Diffusion/DiffusionIO_ALE/Fortran/CMakeLists.txt rename ClassicalField/Diffusion/DiffusionIO_ALE/{ => Fortran}/src/DiffusionIO_ALEExample.f90 (100%) create mode 100644 ClassicalField/Diffusion/DiffusionIO_ALE/OpenCMISS.cmake create mode 100644 ClassicalField/Diffusion/DiffusionIO_ALE/build_debug/build.sh create mode 100644 ClassicalField/Diffusion/DiffusionLinearSource/CMakeLists.txt create mode 100644 ClassicalField/Diffusion/DiffusionLinearSource/Fortran/CMakeLists.txt rename ClassicalField/Diffusion/DiffusionLinearSource/{ => Fortran}/src/DiffusionLinearSourceExample.f90 (100%) create mode 100644 ClassicalField/Diffusion/DiffusionLinearSource/OpenCMISS.cmake create mode 100644 ClassicalField/Diffusion/DiffusionLinearSource/build_debug/build.sh create mode 100644 ClassicalField/Diffusion/DiffusionQuadraticSource/CMakeLists.txt create mode 100644 ClassicalField/Diffusion/DiffusionQuadraticSource/Fortran/CMakeLists.txt rename ClassicalField/Diffusion/DiffusionQuadraticSource/{ => Fortran}/src/DiffusionQuadraticSourceExample.f90 (100%) create mode 100644 ClassicalField/Diffusion/DiffusionQuadraticSource/OpenCMISS.cmake create mode 100644 ClassicalField/Diffusion/DiffusionQuadraticSource/build_debug/build.sh create mode 100644 ClassicalField/Diffusion/LinearConvergenceTest/CMakeLists.txt create mode 100644 ClassicalField/Diffusion/LinearConvergenceTest/Fortran/CMakeLists.txt rename ClassicalField/Diffusion/LinearConvergenceTest/{ => Fortran}/src/LinearConvergenceTestExample.f90 (100%) create mode 100644 ClassicalField/Diffusion/LinearConvergenceTest/OpenCMISS.cmake create mode 100644 ClassicalField/Diffusion/LinearConvergenceTest/build_debug/build.sh create mode 100644 ClassicalField/Diffusion/QuadraticConvergenceTest/CMakeLists.txt create mode 100644 ClassicalField/Diffusion/QuadraticConvergenceTest/Fortran/CMakeLists.txt rename ClassicalField/Diffusion/QuadraticConvergenceTest/{ => Fortran}/src/QuadraticConvergenceTestExample.f90 (100%) create mode 100644 ClassicalField/Diffusion/QuadraticConvergenceTest/OpenCMISS.cmake create mode 100644 ClassicalField/Diffusion/QuadraticConvergenceTest/build_debug/build.sh create mode 100644 ClassicalField/Hamilton_Jacobi/GeodesicEx1/CMakeLists.txt create mode 100644 ClassicalField/Hamilton_Jacobi/GeodesicEx1/Fortran/CMakeLists.txt rename ClassicalField/Hamilton_Jacobi/GeodesicEx1/{ => Fortran}/src/GeodesicEx1.ele (100%) rename ClassicalField/Hamilton_Jacobi/GeodesicEx1/{ => Fortran}/src/GeodesicEx1.node (100%) rename ClassicalField/Hamilton_Jacobi/GeodesicEx1/{ => Fortran}/src/GeodesicEx1Example.f90 (100%) create mode 100644 ClassicalField/Hamilton_Jacobi/GeodesicEx1/OpenCMISS.cmake create mode 100644 ClassicalField/Hamilton_Jacobi/GeodesicEx1/build_debug/build.sh create mode 100644 ClassicalField/Hamilton_Jacobi/TwoElmnTet/CMakeLists.txt create mode 100644 ClassicalField/Hamilton_Jacobi/TwoElmnTet/Fortran/CMakeLists.txt rename ClassicalField/Hamilton_Jacobi/TwoElmnTet/{ => Fortran}/src/TwoElmnTet.cond (100%) rename ClassicalField/Hamilton_Jacobi/TwoElmnTet/{ => Fortran}/src/TwoElmnTet.ele (100%) rename ClassicalField/Hamilton_Jacobi/TwoElmnTet/{ => Fortran}/src/TwoElmnTet.estm (100%) rename ClassicalField/Hamilton_Jacobi/TwoElmnTet/{ => Fortran}/src/TwoElmnTet.fiber (100%) rename ClassicalField/Hamilton_Jacobi/TwoElmnTet/{ => Fortran}/src/TwoElmnTet.node (100%) rename ClassicalField/Hamilton_Jacobi/TwoElmnTet/{ => Fortran}/src/TwoElmnTetExample.f90 (100%) create mode 100644 ClassicalField/Hamilton_Jacobi/TwoElmnTet/OpenCMISS.cmake create mode 100644 ClassicalField/Hamilton_Jacobi/TwoElmnTet/build_debug/build.sh create mode 100644 ClassicalField/Helmholtz/AnalyticHelmholtz/CMakeLists.txt create mode 100644 ClassicalField/Helmholtz/AnalyticHelmholtz/Fortran/CMakeLists.txt rename ClassicalField/Helmholtz/AnalyticHelmholtz/{ => Fortran}/src/AnalyticHelmholtzExample.f90 (100%) create mode 100644 ClassicalField/Helmholtz/AnalyticHelmholtz/OpenCMISS.cmake create mode 100644 ClassicalField/Helmholtz/AnalyticHelmholtz/build_debug/build.sh create mode 100644 ClassicalField/Helmholtz/Helmholtz/CMakeLists.txt create mode 100644 ClassicalField/Helmholtz/Helmholtz/Fortran/CMakeLists.txt rename ClassicalField/Helmholtz/Helmholtz/{ => Fortran}/src/HelmholtzExample.f90 (100%) create mode 100644 ClassicalField/Helmholtz/Helmholtz/OpenCMISS.cmake create mode 100644 ClassicalField/Helmholtz/Helmholtz/build_debug/build.sh create mode 100644 ClassicalField/Laplace/42Master/CMakeLists.txt create mode 100644 ClassicalField/Laplace/42Master/Fortran/CMakeLists.txt rename ClassicalField/Laplace/42Master/{ => Fortran}/src/42MasterExample.f90 (100%) create mode 100644 ClassicalField/Laplace/42Master/OpenCMISS.cmake create mode 100644 ClassicalField/Laplace/42Master/build_debug/build.sh create mode 100644 ClassicalField/Laplace/AnalyticLaplace/CMakeLists.txt create mode 100644 ClassicalField/Laplace/AnalyticLaplace/Fortran/CMakeLists.txt rename ClassicalField/Laplace/AnalyticLaplace/{ => Fortran}/src/AnalyticLaplaceExample.f90 (100%) create mode 100644 ClassicalField/Laplace/AnalyticLaplace/OpenCMISS.cmake create mode 100644 ClassicalField/Laplace/AnalyticLaplace/build_debug/build.sh create mode 100644 ClassicalField/Laplace/Embedded1DLaplace/CMakeLists.txt create mode 100644 ClassicalField/Laplace/Embedded1DLaplace/Fortran/CMakeLists.txt rename ClassicalField/Laplace/Embedded1DLaplace/{ => Fortran}/src/Embedded1DLaplaceExample.f90 (100%) create mode 100644 ClassicalField/Laplace/Embedded1DLaplace/OpenCMISS.cmake create mode 100644 ClassicalField/Laplace/Embedded1DLaplace/build_debug/build.sh create mode 100644 ClassicalField/Laplace/Embedded2DLaplace/CMakeLists.txt create mode 100644 ClassicalField/Laplace/Embedded2DLaplace/Fortran/CMakeLists.txt rename ClassicalField/Laplace/Embedded2DLaplace/{ => Fortran}/src/Embedded2DLaplaceExample.f90 (100%) create mode 100644 ClassicalField/Laplace/Embedded2DLaplace/OpenCMISS.cmake create mode 100644 ClassicalField/Laplace/Embedded2DLaplace/build_debug/build.sh create mode 100644 ClassicalField/Laplace/GeneralisedLaplace/CMakeLists.txt create mode 100644 ClassicalField/Laplace/GeneralisedLaplace/Fortran/CMakeLists.txt create mode 100644 ClassicalField/Laplace/GeneralisedLaplace/OpenCMISS.cmake create mode 100644 ClassicalField/Laplace/GeneralisedLaplace/build_debug/build.sh create mode 100644 ClassicalField/Laplace/Laplace/C/CMakeLists.txt create mode 100644 ClassicalField/Laplace/Laplace/C/Fortran/CMakeLists.txt rename ClassicalField/Laplace/Laplace/C/{ => Fortran}/src/CExample.c (100%) create mode 100644 ClassicalField/Laplace/Laplace/C/OpenCMISS.cmake create mode 100644 ClassicalField/Laplace/Laplace/C/build_debug/build.sh create mode 100644 ClassicalField/Laplace/Laplace/CMakeLists.txt create mode 100644 ClassicalField/Laplace/Laplace/Fortran/CMakeLists.txt create mode 100644 ClassicalField/Laplace/Laplace/OpenCMISS.cmake create mode 100644 ClassicalField/Laplace/Laplace/build_debug/build.sh create mode 100644 ClassicalField/Laplace/LaplaceEllipsoid/CMakeLists.txt create mode 100644 ClassicalField/Laplace/LaplaceEllipsoid/Fortran/CMakeLists.txt rename ClassicalField/Laplace/LaplaceEllipsoid/{ => Fortran}/src/LaplaceEllipsoidExample.f90 (100%) create mode 100644 ClassicalField/Laplace/LaplaceEllipsoid/OpenCMISS.cmake create mode 100644 ClassicalField/Laplace/LaplaceEllipsoid/build_debug/build.sh create mode 100644 ClassicalField/Laplace/LaplaceEllipsoid_FieldML/CMakeLists.txt create mode 100644 ClassicalField/Laplace/LaplaceEllipsoid_FieldML/Fortran/CMakeLists.txt rename ClassicalField/Laplace/LaplaceEllipsoid_FieldML/{ => Fortran}/src/LaplaceEllipsoid_FieldMLExample.f90 (100%) create mode 100644 ClassicalField/Laplace/LaplaceEllipsoid_FieldML/OpenCMISS.cmake create mode 100644 ClassicalField/Laplace/LaplaceEllipsoid_FieldML/build_debug/build.sh create mode 100644 ClassicalField/Laplace/NumberLaplace/CMakeLists.txt create mode 100644 ClassicalField/Laplace/NumberLaplace/Fortran/CMakeLists.txt rename ClassicalField/Laplace/NumberLaplace/{ => Fortran}/src/NumberLaplaceExample.f90 (100%) create mode 100644 ClassicalField/Laplace/NumberLaplace/OpenCMISS.cmake create mode 100644 ClassicalField/Laplace/NumberLaplace/build_debug/build.sh create mode 100644 ClassicalField/Laplace/ParallelLaplace/CMakeLists.txt create mode 100644 ClassicalField/Laplace/ParallelLaplace/Fortran/CMakeLists.txt rename ClassicalField/Laplace/ParallelLaplace/{ => Fortran}/src/ParallelLaplaceExample.f90 (100%) create mode 100644 ClassicalField/Laplace/ParallelLaplace/OpenCMISS.cmake create mode 100644 ClassicalField/Laplace/ParallelLaplace/build_debug/build.sh create mode 100644 ClassicalField/Laplace/SimplexLaplace/Linear/CMakeLists.txt create mode 100644 ClassicalField/Laplace/SimplexLaplace/Linear/Fortran/CMakeLists.txt rename ClassicalField/Laplace/SimplexLaplace/Linear/{ => Fortran}/src/LinearExample.f90 (100%) create mode 100644 ClassicalField/Laplace/SimplexLaplace/Linear/OpenCMISS.cmake create mode 100644 ClassicalField/Laplace/SimplexLaplace/Linear/build_debug/build.sh create mode 100644 ClassicalField/Poisson/42Master/CMakeLists.txt create mode 100644 ClassicalField/Poisson/42Master/Fortran/CMakeLists.txt rename ClassicalField/Poisson/42Master/{ => Fortran}/src/42MasterExample.f90 (100%) create mode 100644 ClassicalField/Poisson/42Master/OpenCMISS.cmake create mode 100644 ClassicalField/Poisson/42Master/build_debug/build.sh create mode 100644 ClassicalField/Poisson/AnalyticNonlinearPoisson/CMakeLists.txt create mode 100644 ClassicalField/Poisson/AnalyticNonlinearPoisson/Fortran/CMakeLists.txt rename ClassicalField/Poisson/AnalyticNonlinearPoisson/{ => Fortran}/src/AnalyticNonlinearPoissonExample.f90 (100%) create mode 100644 ClassicalField/Poisson/AnalyticNonlinearPoisson/OpenCMISS.cmake create mode 100644 ClassicalField/Poisson/AnalyticNonlinearPoisson/build_debug/build.sh create mode 100644 ClassicalField/Poisson/ExtracellularBidomain/CMakeLists.txt create mode 100644 ClassicalField/Poisson/ExtracellularBidomain/Fortran/CMakeLists.txt create mode 100644 ClassicalField/Poisson/ExtracellularBidomain/OpenCMISS.cmake create mode 100644 ClassicalField/Poisson/ExtracellularBidomain/build_debug/build.sh create mode 100644 ClassicalField/Poisson/NonlinearPoisson/CMakeLists.txt create mode 100644 ClassicalField/Poisson/NonlinearPoisson/Fortran/CMakeLists.txt rename ClassicalField/Poisson/NonlinearPoisson/{ => Fortran}/src/NonlinearPoissonExample.f90 (100%) create mode 100644 ClassicalField/Poisson/NonlinearPoisson/OpenCMISS.cmake create mode 100644 ClassicalField/Poisson/NonlinearPoisson/build_debug/build.sh create mode 100644 ClassicalField/ReactionDiffusion/CellMLSplitReactionDiffusion1D/CMakeLists.txt create mode 100644 ClassicalField/ReactionDiffusion/CellMLSplitReactionDiffusion1D/Fortran/CMakeLists.txt rename ClassicalField/ReactionDiffusion/CellMLSplitReactionDiffusion1D/{ => Fortran}/src/CellMLSplitReactionDiffusion1DExample.f90 (100%) create mode 100644 ClassicalField/ReactionDiffusion/CellMLSplitReactionDiffusion1D/OpenCMISS.cmake create mode 100644 ClassicalField/ReactionDiffusion/CellMLSplitReactionDiffusion1D/build_debug/build.sh create mode 100644 ClassicalField/ReactionDiffusion/ReactionDiffusionConstantSource1D/CMakeLists.txt create mode 100644 ClassicalField/ReactionDiffusion/ReactionDiffusionConstantSource1D/Fortran/CMakeLists.txt rename ClassicalField/ReactionDiffusion/ReactionDiffusionConstantSource1D/{ => Fortran}/src/ReactionDiffusionConstantSource1DExample.f90 (100%) create mode 100644 ClassicalField/ReactionDiffusion/ReactionDiffusionConstantSource1D/OpenCMISS.cmake create mode 100644 ClassicalField/ReactionDiffusion/ReactionDiffusionConstantSource1D/build_debug/build.sh create mode 100644 ClassicalField/ReactionDiffusion/ReactionDiffusionNoSource1D/CMakeLists.txt create mode 100644 ClassicalField/ReactionDiffusion/ReactionDiffusionNoSource1D/Fortran/CMakeLists.txt rename ClassicalField/ReactionDiffusion/ReactionDiffusionNoSource1D/{ => Fortran}/src/ReactionDiffusionNoSource1DExample.f90 (100%) create mode 100644 ClassicalField/ReactionDiffusion/ReactionDiffusionNoSource1D/OpenCMISS.cmake create mode 100644 ClassicalField/ReactionDiffusion/ReactionDiffusionNoSource1D/build_debug/build.sh create mode 100644 DataAssimilation/DataAssimilationConstantSystem/CMakeLists.txt create mode 100644 DataAssimilation/DataAssimilationConstantSystem/Fortran/CMakeLists.txt rename DataAssimilation/DataAssimilationConstantSystem/{ => Fortran}/src/data_assimilation_test01.cpp (100%) create mode 100644 DataAssimilation/DataAssimilationConstantSystem/OpenCMISS.cmake create mode 100644 DataAssimilation/DataAssimilationConstantSystem/build_debug/build.sh create mode 100644 DataAssimilation/DataAssimilationInflationGuccione/CMakeLists.txt create mode 100644 DataAssimilation/DataAssimilationInflationGuccione/Fortran/CMakeLists.txt rename DataAssimilation/DataAssimilationInflationGuccione/{ => Fortran}/src/DataAssimilationInflationGuccioneExample.f90 (100%) create mode 100644 DataAssimilation/DataAssimilationInflationGuccione/OpenCMISS.cmake create mode 100644 DataAssimilation/DataAssimilationInflationGuccione/build_debug/build.sh create mode 100644 DataAssimilation/DataAssimilationUniExtension/CMakeLists.txt create mode 100644 DataAssimilation/DataAssimilationUniExtension/Fortran/CMakeLists.txt rename DataAssimilation/DataAssimilationUniExtension/{ => Fortran}/src/UniAxialExtensionExample.f90 (100%) rename DataAssimilation/DataAssimilationUniExtension/{ => Fortran}/src/data_assimilation_uniextension.cpp (100%) rename DataAssimilation/DataAssimilationUniExtension/{ => Fortran}/src/data_assimilation_uniextension_OpenCMISS_test.cpp (100%) create mode 100644 DataAssimilation/DataAssimilationUniExtension/OpenCMISS.cmake create mode 100644 DataAssimilation/DataAssimilationUniExtension/build_debug/build.sh create mode 100644 DataProjection/1DRectangularCartesian/CMakeLists.txt create mode 100644 DataProjection/1DRectangularCartesian/Fortran/CMakeLists.txt rename DataProjection/1DRectangularCartesian/{ => Fortran}/src/1DRectangularCartesianExample.f90 (100%) create mode 100644 DataProjection/1DRectangularCartesian/OpenCMISS.cmake create mode 100644 DataProjection/1DRectangularCartesian/build_debug/build.sh create mode 100644 DataProjection/2DRectangularCartesian/CMakeLists.txt create mode 100644 DataProjection/2DRectangularCartesian/Fortran/CMakeLists.txt rename DataProjection/2DRectangularCartesian/{ => Fortran}/src/2DRectangularCartesianExample.f90 (100%) create mode 100644 DataProjection/2DRectangularCartesian/OpenCMISS.cmake create mode 100644 DataProjection/2DRectangularCartesian/build_debug/build.sh create mode 100644 DataProjection/3DRectangularCartesian/CMakeLists.txt create mode 100644 DataProjection/3DRectangularCartesian/Fortran/CMakeLists.txt rename DataProjection/3DRectangularCartesian/{ => Fortran}/src/3DRectangularCartesianExample.f90 (100%) create mode 100644 DataProjection/3DRectangularCartesian/OpenCMISS.cmake create mode 100644 DataProjection/3DRectangularCartesian/build_debug/build.sh create mode 100644 EmbeddedMesh/EmbeddedMeshBasic/CMakeLists.txt create mode 100644 EmbeddedMesh/EmbeddedMeshBasic/Fortran/CMakeLists.txt rename EmbeddedMesh/EmbeddedMeshBasic/{ => Fortran}/src/EmbeddedMeshBasicExample.f90 (100%) create mode 100644 EmbeddedMesh/EmbeddedMeshBasic/OpenCMISS.cmake create mode 100644 EmbeddedMesh/EmbeddedMeshBasic/build_debug/build.sh create mode 100644 EmbeddedMesh/EmbeddedMeshBasicWithMap/CMakeLists.txt create mode 100644 EmbeddedMesh/EmbeddedMeshBasicWithMap/Fortran/CMakeLists.txt rename EmbeddedMesh/EmbeddedMeshBasicWithMap/{ => Fortran}/src/EmbeddedMeshBasicWithMapExample.f90 (100%) create mode 100644 EmbeddedMesh/EmbeddedMeshBasicWithMap/OpenCMISS.cmake create mode 100644 EmbeddedMesh/EmbeddedMeshBasicWithMap/build_debug/build.sh create mode 100644 FiniteElasticity/ActiveContraction/CMakeLists.txt create mode 100644 FiniteElasticity/ActiveContraction/Fortran/CMakeLists.txt rename FiniteElasticity/ActiveContraction/{ => Fortran}/src/ActiveContractionExample.f90 (100%) create mode 100644 FiniteElasticity/ActiveContraction/OpenCMISS.cmake create mode 100644 FiniteElasticity/ActiveContraction/build_debug/build.sh create mode 100644 FiniteElasticity/Cantilever/CMakeLists.txt create mode 100644 FiniteElasticity/Cantilever/Fortran/CMakeLists.txt create mode 100644 FiniteElasticity/Cantilever/OpenCMISS.cmake create mode 100644 FiniteElasticity/Cantilever/build_debug/build.sh create mode 100644 FiniteElasticity/CuboidGeneric/CMakeLists.txt create mode 100644 FiniteElasticity/CuboidGeneric/Fortran/CMakeLists.txt rename FiniteElasticity/CuboidGeneric/{ => Fortran}/src/CuboidGenericExample.f90 (100%) create mode 100644 FiniteElasticity/CuboidGeneric/OpenCMISS.cmake create mode 100644 FiniteElasticity/CuboidGeneric/build_debug/build.sh create mode 100644 FiniteElasticity/CylinderInflation/CMakeLists.txt create mode 100644 FiniteElasticity/CylinderInflation/Fortran/CMakeLists.txt rename FiniteElasticity/CylinderInflation/{ => Fortran}/src/CylinderInflationExample.f90 (100%) create mode 100644 FiniteElasticity/CylinderInflation/OpenCMISS.cmake create mode 100644 FiniteElasticity/CylinderInflation/build_debug/build.sh create mode 100644 FiniteElasticity/LargeUniAxialExtension/CMakeLists.txt create mode 100644 FiniteElasticity/LargeUniAxialExtension/Fortran/CMakeLists.txt create mode 100644 FiniteElasticity/LargeUniAxialExtension/OpenCMISS.cmake create mode 100644 FiniteElasticity/LargeUniAxialExtension/build_debug/build.sh create mode 100644 FiniteElasticity/Membrane/MembraneExtension2DSpace/CMakeLists.txt create mode 100644 FiniteElasticity/Membrane/MembraneExtension2DSpace/Fortran/CMakeLists.txt rename FiniteElasticity/Membrane/MembraneExtension2DSpace/{ => Fortran}/src/MembraneExtension2DSpaceExample.f90 (100%) create mode 100644 FiniteElasticity/Membrane/MembraneExtension2DSpace/OpenCMISS.cmake create mode 100644 FiniteElasticity/Membrane/MembraneExtension2DSpace/build_debug/build.sh create mode 100644 FiniteElasticity/Membrane/MembraneExtension3DSpaceFlat/CMakeLists.txt create mode 100644 FiniteElasticity/Membrane/MembraneExtension3DSpaceFlat/Fortran/CMakeLists.txt rename FiniteElasticity/Membrane/MembraneExtension3DSpaceFlat/{ => Fortran}/src/MembraneExtension3DSpaceFlatExample.f90 (100%) create mode 100644 FiniteElasticity/Membrane/MembraneExtension3DSpaceFlat/OpenCMISS.cmake create mode 100644 FiniteElasticity/Membrane/MembraneExtension3DSpaceFlat/build_debug/build.sh create mode 100644 FiniteElasticity/Membrane/MembraneExtension3DSpaceTilted/CMakeLists.txt create mode 100644 FiniteElasticity/Membrane/MembraneExtension3DSpaceTilted/Fortran/CMakeLists.txt rename FiniteElasticity/Membrane/MembraneExtension3DSpaceTilted/{ => Fortran}/src/MembraneExtension3DSpaceTiltedExample.f90 (100%) create mode 100644 FiniteElasticity/Membrane/MembraneExtension3DSpaceTilted/OpenCMISS.cmake create mode 100644 FiniteElasticity/Membrane/MembraneExtension3DSpaceTilted/build_debug/build.sh create mode 100644 FiniteElasticity/MixedBoundaryConditions/CMakeLists.txt create mode 100644 FiniteElasticity/MixedBoundaryConditions/Fortran/CMakeLists.txt rename FiniteElasticity/MixedBoundaryConditions/{ => Fortran}/src/MixedBoundaryConditionsExample.f90 (100%) create mode 100644 FiniteElasticity/MixedBoundaryConditions/OpenCMISS.cmake create mode 100644 FiniteElasticity/MixedBoundaryConditions/build_debug/build.sh create mode 100644 FiniteElasticity/MooneyRivlinInCellML/CMakeLists.txt create mode 100644 FiniteElasticity/MooneyRivlinInCellML/Fortran/CMakeLists.txt rename FiniteElasticity/MooneyRivlinInCellML/{ => Fortran}/src/MooneyRivlinInCellMLExample.f90 (100%) create mode 100644 FiniteElasticity/MooneyRivlinInCellML/OpenCMISS.cmake create mode 100644 FiniteElasticity/MooneyRivlinInCellML/build_debug/build.sh create mode 100644 FiniteElasticity/QuadraticEllipsoid/CMakeLists.txt create mode 100644 FiniteElasticity/QuadraticEllipsoid/Fortran/CMakeLists.txt rename FiniteElasticity/QuadraticEllipsoid/{ => Fortran}/src/QuadraticEllipsoidExample.f90 (100%) create mode 100644 FiniteElasticity/QuadraticEllipsoid/OpenCMISS.cmake create mode 100644 FiniteElasticity/QuadraticEllipsoid/build_debug/build.sh create mode 100644 FiniteElasticity/QuadraticEllipsoidCosta/CMakeLists.txt create mode 100644 FiniteElasticity/QuadraticEllipsoidCosta/Fortran/CMakeLists.txt rename FiniteElasticity/QuadraticEllipsoidCosta/{ => Fortran}/src/QuadraticEllipsoidCostaExample.f90 (100%) create mode 100644 FiniteElasticity/QuadraticEllipsoidCosta/OpenCMISS.cmake create mode 100644 FiniteElasticity/QuadraticEllipsoidCosta/build_debug/build.sh create mode 100644 FiniteElasticity/QuadraticEllipsoidCostaReadIn/CMakeLists.txt create mode 100644 FiniteElasticity/QuadraticEllipsoidCostaReadIn/Fortran/CMakeLists.txt rename FiniteElasticity/QuadraticEllipsoidCostaReadIn/{ => Fortran}/src/QuadraticEllipsoidCostaReadInExample.f90 (100%) create mode 100644 FiniteElasticity/QuadraticEllipsoidCostaReadIn/OpenCMISS.cmake create mode 100644 FiniteElasticity/QuadraticEllipsoidCostaReadIn/build_debug/build.sh create mode 100644 FiniteElasticity/RightBiceps/CMakeLists.txt create mode 100644 FiniteElasticity/RightBiceps/Fortran/CMakeLists.txt create mode 100644 FiniteElasticity/RightBiceps/OpenCMISS.cmake create mode 100644 FiniteElasticity/RightBiceps/build_debug/CMakeCache.txt create mode 100644 FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CMakeCCompiler.cmake create mode 100755 FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_C.bin create mode 100755 FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_Fortran.bin create mode 100644 FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CMakeFortranCompiler.cmake create mode 100644 FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CMakeSystem.cmake create mode 100644 FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CompilerIdC/CMakeCCompilerId.c create mode 100644 FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CompilerIdFortran/CMakeFortranCompilerId.F create mode 100644 FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeDirectoryInformation.cmake create mode 100644 FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeError.log create mode 100644 FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeOutput.log create mode 100644 FiniteElasticity/RightBiceps/build_debug/CMakeFiles/Makefile.cmake create mode 100644 FiniteElasticity/RightBiceps/build_debug/CMakeFiles/Makefile2 create mode 100644 FiniteElasticity/RightBiceps/build_debug/CMakeFiles/TargetDirectories.txt create mode 100644 FiniteElasticity/RightBiceps/build_debug/CMakeFiles/cmake.check_cache create mode 100755 FiniteElasticity/RightBiceps/build_debug/CMakeFiles/feature_tests.bin create mode 100644 FiniteElasticity/RightBiceps/build_debug/CMakeFiles/feature_tests.c create mode 100644 FiniteElasticity/RightBiceps/build_debug/CMakeFiles/progress.marks create mode 100644 FiniteElasticity/RightBiceps/build_debug/CTestTestfile.cmake create mode 100644 FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/CMakeDirectoryInformation.cmake create mode 100644 FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/DependInfo.cmake create mode 100644 FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/build.make create mode 100644 FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/cmake_clean.cmake create mode 100644 FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/depend.internal create mode 100644 FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/depend.make create mode 100644 FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/flags.make create mode 100644 FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/fortran.internal create mode 100644 FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/link.txt create mode 100644 FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/progress.make create mode 100644 FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o create mode 100644 FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/progress.marks create mode 100644 FiniteElasticity/RightBiceps/build_debug/Fortran/CTestTestfile.cmake create mode 100644 FiniteElasticity/RightBiceps/build_debug/Fortran/Makefile create mode 100755 FiniteElasticity/RightBiceps/build_debug/Fortran/RightBiceps create mode 100644 FiniteElasticity/RightBiceps/build_debug/Fortran/cmake_install.cmake create mode 100644 FiniteElasticity/RightBiceps/build_debug/Fortran/fort.1 create mode 100644 FiniteElasticity/RightBiceps/build_debug/Makefile create mode 100644 FiniteElasticity/RightBiceps/build_debug/build.sh create mode 100644 FiniteElasticity/RightBiceps/build_debug/cmake_install.cmake create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeCache.txt create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/3.5.1/CMakeCCompiler.cmake create mode 100755 FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_C.bin create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/3.5.1/CMakeSystem.cmake create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/3.5.1/CompilerIdC/CMakeCCompilerId.c create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeDirectoryInformation.cmake create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeOutput.log create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/Makefile.cmake create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/Makefile2 create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/TargetDirectories.txt create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/cmake.check_cache create mode 100755 FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/feature_tests.bin create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/feature_tests.c create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/progress.marks create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeLists.txt create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/Makefile create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/cmake_install.cmake create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/compiler_info.cmake create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeCache.txt create mode 100755 FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_Fortran.bin create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/3.5.1/CMakeFortranCompiler.cmake create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/3.5.1/CMakeSystem.cmake create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/3.5.1/CompilerIdFortran/CMakeFortranCompilerId.F create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/CMakeDirectoryInformation.cmake create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/CMakeOutput.log create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/Makefile.cmake create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/Makefile2 create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/TargetDirectories.txt create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/cmake.check_cache create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/progress.marks create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeLists.txt create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/Makefile create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/cmake_install.cmake create mode 100644 FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/compiler_info.cmake create mode 100644 FiniteElasticity/SimpleShear/CMakeLists.txt create mode 100644 FiniteElasticity/SimpleShear/Fortran/CMakeLists.txt create mode 100644 FiniteElasticity/SimpleShear/OpenCMISS.cmake create mode 100644 FiniteElasticity/SimpleShear/build_debug/build.sh create mode 100644 FiniteElasticity/SimplexElements/LargeQuadraticTet/CMakeLists.txt create mode 100644 FiniteElasticity/SimplexElements/LargeQuadraticTet/Fortran/CMakeLists.txt rename FiniteElasticity/SimplexElements/LargeQuadraticTet/{ => Fortran}/src/LargeQuadraticTetExample.f90 (100%) create mode 100644 FiniteElasticity/SimplexElements/LargeQuadraticTet/OpenCMISS.cmake create mode 100644 FiniteElasticity/SimplexElements/LargeQuadraticTet/build_debug/build.sh create mode 100644 FiniteElasticity/SimplexElements/LinearTet/CMakeLists.txt create mode 100644 FiniteElasticity/SimplexElements/LinearTet/Fortran/CMakeLists.txt rename FiniteElasticity/SimplexElements/LinearTet/{ => Fortran}/src/LinearTetExample.f90 (100%) create mode 100644 FiniteElasticity/SimplexElements/LinearTet/OpenCMISS.cmake create mode 100644 FiniteElasticity/SimplexElements/LinearTet/build_debug/build.sh create mode 100644 FiniteElasticity/SimplexElements/QuadraticTet/CMakeLists.txt create mode 100644 FiniteElasticity/SimplexElements/QuadraticTet/Fortran/CMakeLists.txt rename FiniteElasticity/SimplexElements/QuadraticTet/{ => Fortran}/src/QuadraticTetExample.f90 (100%) create mode 100644 FiniteElasticity/SimplexElements/QuadraticTet/OpenCMISS.cmake create mode 100644 FiniteElasticity/SimplexElements/QuadraticTet/build_debug/build.sh create mode 100644 FiniteElasticity/TriCubicAxialExtension/CMakeLists.txt create mode 100644 FiniteElasticity/TriCubicAxialExtension/Fortran/CMakeLists.txt rename FiniteElasticity/TriCubicAxialExtension/{ => Fortran}/src/TriCubicAxialExtensionExample.f90 (100%) create mode 100644 FiniteElasticity/TriCubicAxialExtension/OpenCMISS.cmake create mode 100644 FiniteElasticity/TriCubicAxialExtension/build_debug/build.sh create mode 100644 FiniteElasticity/TriQuadraticCube/CMakeLists.txt create mode 100644 FiniteElasticity/TriQuadraticCube/Fortran/CMakeLists.txt rename FiniteElasticity/TriQuadraticCube/{ => Fortran}/src/TriQuadraticCubeExample.f90 (100%) create mode 100644 FiniteElasticity/TriQuadraticCube/OpenCMISS.cmake create mode 100644 FiniteElasticity/TriQuadraticCube/build_debug/build.sh create mode 100644 FiniteElasticity/UniAxialExtension/CMakeLists.txt create mode 100644 FiniteElasticity/UniAxialExtension/Fortran/CMakeLists.txt create mode 100644 FiniteElasticity/UniAxialExtension/OpenCMISS.cmake create mode 100644 FiniteElasticity/UniAxialExtension/build_debug/build.sh create mode 100644 FiniteElasticity/UniAxialExtensionCompressible/CMakeLists.txt create mode 100644 FiniteElasticity/UniAxialExtensionCompressible/Fortran/CMakeLists.txt rename FiniteElasticity/UniAxialExtensionCompressible/{ => Fortran}/src/UniAxialExtensionCompressibleExample.f90 (100%) create mode 100644 FiniteElasticity/UniAxialExtensionCompressible/OpenCMISS.cmake create mode 100644 FiniteElasticity/UniAxialExtensionCompressible/build_debug/build.sh create mode 100644 FiniteElasticity/UniAxialExtensionLoadIncrements/CMakeLists.txt create mode 100644 FiniteElasticity/UniAxialExtensionLoadIncrements/Fortran/CMakeLists.txt rename FiniteElasticity/UniAxialExtensionLoadIncrements/{ => Fortran}/src/UniAxialExtensionLoadIncrementsExample.f90 (100%) create mode 100644 FiniteElasticity/UniAxialExtensionLoadIncrements/OpenCMISS.cmake create mode 100644 FiniteElasticity/UniAxialExtensionLoadIncrements/build_debug/build.sh create mode 100644 FiniteElasticity/UniAxialExtensionOrthotropic/CMakeLists.txt create mode 100644 FiniteElasticity/UniAxialExtensionOrthotropic/Fortran/CMakeLists.txt rename FiniteElasticity/UniAxialExtensionOrthotropic/{ => Fortran}/src/UniAxialExtensionOrthotropicExample.f90 (100%) create mode 100644 FiniteElasticity/UniAxialExtensionOrthotropic/OpenCMISS.cmake create mode 100644 FiniteElasticity/UniAxialExtensionOrthotropic/build_debug/build.sh create mode 100644 FiniteElasticity/testingPoints/CMakeLists.txt create mode 100644 FiniteElasticity/testingPoints/Fortran/CMakeLists.txt rename FiniteElasticity/testingPoints/{ => Fortran}/src/testingPointsExample.f90 (100%) create mode 100644 FiniteElasticity/testingPoints/OpenCMISS.cmake create mode 100644 FiniteElasticity/testingPoints/build_debug/build.sh create mode 100644 FluidMechanics/Burgers/Burgers/CMakeLists.txt create mode 100644 FluidMechanics/Burgers/Burgers/Fortran/CMakeLists.txt rename FluidMechanics/Burgers/Burgers/{ => Fortran}/src/BurgersExample.f90 (100%) create mode 100644 FluidMechanics/Burgers/Burgers/OpenCMISS.cmake create mode 100644 FluidMechanics/Burgers/Burgers/build_debug/build.sh create mode 100644 FluidMechanics/Burgers/GeneralisedBurgers/CMakeLists.txt create mode 100644 FluidMechanics/Burgers/GeneralisedBurgers/Fortran/CMakeLists.txt rename FluidMechanics/Burgers/GeneralisedBurgers/{ => Fortran}/src/GeneralisedBurgersExample.f90 (100%) create mode 100644 FluidMechanics/Burgers/GeneralisedBurgers/OpenCMISS.cmake create mode 100644 FluidMechanics/Burgers/GeneralisedBurgers/build_debug/build.sh create mode 100644 FluidMechanics/Burgers/StaticBurgers/CMakeLists.txt create mode 100644 FluidMechanics/Burgers/StaticBurgers/Fortran/CMakeLists.txt rename FluidMechanics/Burgers/StaticBurgers/{ => Fortran}/src/StaticBurgersExample.f90 (100%) create mode 100644 FluidMechanics/Burgers/StaticBurgers/OpenCMISS.cmake create mode 100644 FluidMechanics/Burgers/StaticBurgers/build_debug/build.sh create mode 100644 FluidMechanics/Darcy/Analytic/CMakeLists.txt create mode 100644 FluidMechanics/Darcy/Analytic/Fortran/CMakeLists.txt rename FluidMechanics/Darcy/Analytic/{ => Fortran}/src/AnalyticExample.f90 (100%) create mode 100644 FluidMechanics/Darcy/Analytic/OpenCMISS.cmake create mode 100644 FluidMechanics/Darcy/Analytic/build_debug/build.sh create mode 100644 FluidMechanics/Darcy/Dynamic/CMakeLists.txt create mode 100644 FluidMechanics/Darcy/Dynamic/Fortran/CMakeLists.txt rename FluidMechanics/Darcy/Dynamic/{ => Fortran}/src/DynamicExample.f90 (100%) create mode 100644 FluidMechanics/Darcy/Dynamic/OpenCMISS.cmake create mode 100644 FluidMechanics/Darcy/Dynamic/build_debug/build.sh create mode 100644 FluidMechanics/Darcy/MultiCompartmentStaticDarcy/CMakeLists.txt create mode 100644 FluidMechanics/Darcy/MultiCompartmentStaticDarcy/Fortran/CMakeLists.txt rename FluidMechanics/Darcy/MultiCompartmentStaticDarcy/{ => Fortran}/src/MultiCompartmentStaticDarcyExample.f90 (100%) create mode 100644 FluidMechanics/Darcy/MultiCompartmentStaticDarcy/OpenCMISS.cmake create mode 100644 FluidMechanics/Darcy/MultiCompartmentStaticDarcy/build_debug/build.sh create mode 100644 FluidMechanics/Darcy/QuasistaticMaterial/CMakeLists.txt create mode 100644 FluidMechanics/Darcy/QuasistaticMaterial/Fortran/CMakeLists.txt rename FluidMechanics/Darcy/QuasistaticMaterial/{ => Fortran}/src/QuasistaticMaterialExample.f90 (100%) create mode 100644 FluidMechanics/Darcy/QuasistaticMaterial/OpenCMISS.cmake create mode 100644 FluidMechanics/Darcy/QuasistaticMaterial/build_debug/build.sh create mode 100644 FluidMechanics/Darcy/Static/CMakeLists.txt create mode 100644 FluidMechanics/Darcy/Static/Fortran/CMakeLists.txt rename FluidMechanics/Darcy/Static/{ => Fortran}/src/StaticExample.f90 (100%) create mode 100644 FluidMechanics/Darcy/Static/OpenCMISS.cmake create mode 100644 FluidMechanics/Darcy/Static/build_debug/build.sh create mode 100644 FluidMechanics/Darcy/temp_memory_issue/CMakeLists.txt create mode 100644 FluidMechanics/Darcy/temp_memory_issue/Fortran/CMakeLists.txt rename FluidMechanics/Darcy/temp_memory_issue/{ => Fortran}/src/temp_memory_issueExample.f90 (100%) create mode 100644 FluidMechanics/Darcy/temp_memory_issue/OpenCMISS.cmake create mode 100644 FluidMechanics/Darcy/temp_memory_issue/build_debug/build.sh create mode 100644 FluidMechanics/NavierStokes/42Master/CMakeLists.txt create mode 100644 FluidMechanics/NavierStokes/42Master/Fortran/CMakeLists.txt rename FluidMechanics/NavierStokes/42Master/{ => Fortran}/src/42MasterExample.f90 (100%) create mode 100644 FluidMechanics/NavierStokes/42Master/OpenCMISS.cmake create mode 100644 FluidMechanics/NavierStokes/42Master/build_debug/build.sh create mode 100644 FluidMechanics/NavierStokes/Coupled1DCellML/CMakeLists.txt create mode 100644 FluidMechanics/NavierStokes/Coupled1DCellML/Fortran/CMakeLists.txt create mode 100644 FluidMechanics/NavierStokes/Coupled1DCellML/OpenCMISS.cmake create mode 100644 FluidMechanics/NavierStokes/Coupled1DCellML/build_debug/build.sh create mode 100644 FluidMechanics/NavierStokes/Poiseuille/2DChannel/Static/CMakeLists.txt create mode 100644 FluidMechanics/NavierStokes/Poiseuille/2DChannel/Static/Fortran/CMakeLists.txt rename FluidMechanics/NavierStokes/Poiseuille/2DChannel/Static/{ => Fortran}/src/StaticExample.f90 (100%) create mode 100644 FluidMechanics/NavierStokes/Poiseuille/2DChannel/Static/OpenCMISS.cmake create mode 100644 FluidMechanics/NavierStokes/Poiseuille/2DChannel/Static/build_debug/build.sh create mode 100644 FluidMechanics/NavierStokes/RoutineCheck/ALE/CMakeLists.txt create mode 100644 FluidMechanics/NavierStokes/RoutineCheck/ALE/Fortran/CMakeLists.txt rename FluidMechanics/NavierStokes/RoutineCheck/ALE/{ => Fortran}/src/ALEExample.f90 (100%) create mode 100644 FluidMechanics/NavierStokes/RoutineCheck/ALE/OpenCMISS.cmake create mode 100644 FluidMechanics/NavierStokes/RoutineCheck/ALE/build_debug/build.sh create mode 100644 FluidMechanics/NavierStokes/RoutineCheck/Dynamic/CMakeLists.txt create mode 100644 FluidMechanics/NavierStokes/RoutineCheck/Dynamic/Fortran/CMakeLists.txt rename FluidMechanics/NavierStokes/RoutineCheck/Dynamic/{ => Fortran}/src/DynamicExample.f90 (100%) create mode 100644 FluidMechanics/NavierStokes/RoutineCheck/Dynamic/OpenCMISS.cmake create mode 100644 FluidMechanics/NavierStokes/RoutineCheck/Dynamic/build_debug/build.sh create mode 100644 FluidMechanics/NavierStokes/RoutineCheck/ParallelDynamic/CMakeLists.txt create mode 100644 FluidMechanics/NavierStokes/RoutineCheck/ParallelDynamic/Fortran/CMakeLists.txt rename FluidMechanics/NavierStokes/RoutineCheck/ParallelDynamic/{ => Fortran}/src/ParallelDynamicExample.f90 (100%) create mode 100644 FluidMechanics/NavierStokes/RoutineCheck/ParallelDynamic/OpenCMISS.cmake create mode 100644 FluidMechanics/NavierStokes/RoutineCheck/ParallelDynamic/build_debug/build.sh create mode 100644 FluidMechanics/NavierStokes/RoutineCheck/ParallelStatic/CMakeLists.txt create mode 100644 FluidMechanics/NavierStokes/RoutineCheck/ParallelStatic/Fortran/CMakeLists.txt rename FluidMechanics/NavierStokes/RoutineCheck/ParallelStatic/{ => Fortran}/src/ParallelStaticExample.f90 (100%) create mode 100644 FluidMechanics/NavierStokes/RoutineCheck/ParallelStatic/OpenCMISS.cmake create mode 100644 FluidMechanics/NavierStokes/RoutineCheck/ParallelStatic/build_debug/build.sh create mode 100644 FluidMechanics/NavierStokes/RoutineCheck/Static/CMakeLists.txt create mode 100644 FluidMechanics/NavierStokes/RoutineCheck/Static/Fortran/CMakeLists.txt rename FluidMechanics/NavierStokes/RoutineCheck/Static/{ => Fortran}/src/StaticExample.f90 (100%) create mode 100644 FluidMechanics/NavierStokes/RoutineCheck/Static/OpenCMISS.cmake create mode 100644 FluidMechanics/NavierStokes/RoutineCheck/Static/build_debug/build.sh create mode 100644 FluidMechanics/NavierStokes/Static_FieldML/CMakeLists.txt create mode 100644 FluidMechanics/NavierStokes/Static_FieldML/Fortran/CMakeLists.txt rename FluidMechanics/NavierStokes/Static_FieldML/{ => Fortran}/src/Static_FieldMLExample.f90 (100%) create mode 100644 FluidMechanics/NavierStokes/Static_FieldML/OpenCMISS.cmake create mode 100644 FluidMechanics/NavierStokes/Static_FieldML/build_debug/build.sh create mode 100644 FluidMechanics/NavierStokes/SupgChannel/CMakeLists.txt create mode 100644 FluidMechanics/NavierStokes/SupgChannel/Fortran/CMakeLists.txt rename FluidMechanics/NavierStokes/SupgChannel/{ => Fortran}/src/SupgChannelExample.f90 (100%) create mode 100644 FluidMechanics/NavierStokes/SupgChannel/OpenCMISS.cmake create mode 100644 FluidMechanics/NavierStokes/SupgChannel/build_debug/build.sh create mode 100644 FluidMechanics/NavierStokes/TaylorGreen/CMakeLists.txt create mode 100644 FluidMechanics/NavierStokes/TaylorGreen/Fortran/CMakeLists.txt rename FluidMechanics/NavierStokes/TaylorGreen/{ => Fortran}/src/TaylorGreenExample.f90 (100%) create mode 100644 FluidMechanics/NavierStokes/TaylorGreen/OpenCMISS.cmake create mode 100644 FluidMechanics/NavierStokes/TaylorGreen/build_debug/build.sh create mode 100644 FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_0.5/CMakeLists.txt create mode 100644 FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_0.5/Fortran/CMakeLists.txt rename FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_0.5/{ => Fortran}/src/DynamicTest_theta_0.5Example.f90 (100%) create mode 100644 FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_0.5/OpenCMISS.cmake create mode 100644 FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_0.5/build_debug/build.sh create mode 100644 FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_1.0/CMakeLists.txt create mode 100644 FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_1.0/Fortran/CMakeLists.txt rename FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_1.0/{ => Fortran}/src/DynamicTest_theta_1.0Example.f90 (100%) create mode 100644 FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_1.0/OpenCMISS.cmake create mode 100644 FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_1.0/build_debug/build.sh create mode 100644 FluidMechanics/Poiseuille/Static/CMakeLists.txt create mode 100644 FluidMechanics/Poiseuille/Static/Fortran/CMakeLists.txt rename FluidMechanics/Poiseuille/Static/{ => Fortran}/src/StaticExample.f90 (100%) create mode 100644 FluidMechanics/Poiseuille/Static/OpenCMISS.cmake create mode 100644 FluidMechanics/Poiseuille/Static/build_debug/build.sh create mode 100644 FluidMechanics/SCRATCH/DynamicNavierStokesInParallel/CMakeLists.txt create mode 100644 FluidMechanics/SCRATCH/DynamicNavierStokesInParallel/Fortran/CMakeLists.txt rename FluidMechanics/SCRATCH/DynamicNavierStokesInParallel/{ => Fortran}/src/DynamicNavierStokesInParallelExample.f90 (100%) create mode 100644 FluidMechanics/SCRATCH/DynamicNavierStokesInParallel/OpenCMISS.cmake create mode 100644 FluidMechanics/SCRATCH/DynamicNavierStokesInParallel/build_debug/build.sh create mode 100644 FluidMechanics/Stokes/42Master/CMakeLists.txt create mode 100644 FluidMechanics/Stokes/42Master/Fortran/CMakeLists.txt rename FluidMechanics/Stokes/42Master/{ => Fortran}/src/42MasterExample.f90 (100%) create mode 100644 FluidMechanics/Stokes/42Master/OpenCMISS.cmake create mode 100644 FluidMechanics/Stokes/42Master/build_debug/build.sh create mode 100644 FluidMechanics/Stokes/RoutineCheck/ALE/CMakeLists.txt create mode 100644 FluidMechanics/Stokes/RoutineCheck/ALE/Fortran/CMakeLists.txt rename FluidMechanics/Stokes/RoutineCheck/ALE/{ => Fortran}/src/ALEExample.f90 (100%) create mode 100644 FluidMechanics/Stokes/RoutineCheck/ALE/OpenCMISS.cmake create mode 100644 FluidMechanics/Stokes/RoutineCheck/ALE/build_debug/build.sh create mode 100644 FluidMechanics/Stokes/RoutineCheck/Dynamic/CMakeLists.txt create mode 100644 FluidMechanics/Stokes/RoutineCheck/Dynamic/Fortran/CMakeLists.txt rename FluidMechanics/Stokes/RoutineCheck/Dynamic/{ => Fortran}/src/DynamicExample.f90 (100%) create mode 100644 FluidMechanics/Stokes/RoutineCheck/Dynamic/OpenCMISS.cmake create mode 100644 FluidMechanics/Stokes/RoutineCheck/Dynamic/build_debug/build.sh create mode 100644 FluidMechanics/Stokes/RoutineCheck/Static/CMakeLists.txt create mode 100644 FluidMechanics/Stokes/RoutineCheck/Static/Fortran/CMakeLists.txt rename FluidMechanics/Stokes/RoutineCheck/Static/{ => Fortran}/src/StaticExample.f90 (100%) create mode 100644 FluidMechanics/Stokes/RoutineCheck/Static/OpenCMISS.cmake create mode 100644 FluidMechanics/Stokes/RoutineCheck/Static/build_debug/build.sh create mode 100644 InterfaceExamples/CoupledFluidSolid/CMakeLists.txt create mode 100644 InterfaceExamples/CoupledFluidSolid/Fortran/CMakeLists.txt create mode 100644 InterfaceExamples/CoupledFluidSolid/Fortran/OpenCMISS.cmake create mode 100644 InterfaceExamples/CoupledFluidSolid/OpenCMISS.cmake create mode 100644 InterfaceExamples/CoupledFluidSolid/build_debug/build.sh create mode 100644 InterfaceExamples/CoupledLaplace/CMakeLists.txt create mode 100644 InterfaceExamples/CoupledLaplace/Fortran/CMakeLists.txt rename InterfaceExamples/CoupledLaplace/{ => Fortran}/src/CoupledLaplaceExample.f90 (100%) create mode 100644 InterfaceExamples/CoupledLaplace/OpenCMISS.cmake create mode 100644 InterfaceExamples/CoupledLaplace/build_debug/build.sh create mode 100644 InterfaceExamples/InputCoupledLaplace/CMakeLists.txt create mode 100644 InterfaceExamples/InputCoupledLaplace/Fortran/CMakeLists.txt rename InterfaceExamples/InputCoupledLaplace/{ => Fortran}/src/InputCoupledLaplaceExample.f90 (100%) create mode 100644 InterfaceExamples/InputCoupledLaplace/OpenCMISS.cmake create mode 100644 InterfaceExamples/InputCoupledLaplace/build_debug/build.sh create mode 100644 InterfaceExamples/InputCoupledStokes/CMakeLists.txt create mode 100644 InterfaceExamples/InputCoupledStokes/Fortran/CMakeLists.txt rename InterfaceExamples/InputCoupledStokes/{ => Fortran}/src/InputCoupledStokesExample.f90 (100%) create mode 100644 InterfaceExamples/InputCoupledStokes/OpenCMISS.cmake create mode 100644 InterfaceExamples/InputCoupledStokes/build_debug/build.sh create mode 100644 InterfaceExamples/InputUnCoupledLaplace/CMakeLists.txt create mode 100644 InterfaceExamples/InputUnCoupledLaplace/Fortran/CMakeLists.txt rename InterfaceExamples/InputUnCoupledLaplace/{ => Fortran}/src/InputUnCoupledLaplaceExample.f90 (100%) create mode 100644 InterfaceExamples/InputUnCoupledLaplace/OpenCMISS.cmake create mode 100644 InterfaceExamples/InputUnCoupledLaplace/build_debug/build.sh create mode 100644 InterfaceExamples/UnCoupledLaplace/CMakeLists.txt create mode 100644 InterfaceExamples/UnCoupledLaplace/Fortran/CMakeLists.txt rename InterfaceExamples/UnCoupledLaplace/{ => Fortran}/src/UnCoupledLaplaceExample.f90 (100%) create mode 100644 InterfaceExamples/UnCoupledLaplace/OpenCMISS.cmake create mode 100644 InterfaceExamples/UnCoupledLaplace/build_debug/build.sh create mode 100644 LinearElasticity/2DExtensionPlaneStressLagrangeBasis/CMakeLists.txt create mode 100644 LinearElasticity/2DExtensionPlaneStressLagrangeBasis/Fortran/CMakeLists.txt rename LinearElasticity/2DExtensionPlaneStressLagrangeBasis/{ => Fortran}/src/2DExtensionPlaneStressLagrangeBasisExample.f90 (100%) create mode 100644 LinearElasticity/2DExtensionPlaneStressLagrangeBasis/OpenCMISS.cmake create mode 100644 LinearElasticity/2DExtensionPlaneStressLagrangeBasis/build_debug/build.sh create mode 100644 LinearElasticity/3DExtensionHermiteBasis/CMakeLists.txt create mode 100644 LinearElasticity/3DExtensionHermiteBasis/Fortran/CMakeLists.txt rename LinearElasticity/3DExtensionHermiteBasis/{ => Fortran}/src/3DExtensionHermiteBasisExample.f90 (100%) create mode 100644 LinearElasticity/3DExtensionHermiteBasis/OpenCMISS.cmake create mode 100644 LinearElasticity/3DExtensionHermiteBasis/build_debug/build.sh create mode 100644 LinearElasticity/3DExtensionLagrangeBasis/CMakeLists.txt create mode 100644 LinearElasticity/3DExtensionLagrangeBasis/Fortran/CMakeLists.txt rename LinearElasticity/3DExtensionLagrangeBasis/{ => Fortran}/src/3DExtensionLagrangeBasisExample.f90 (100%) create mode 100644 LinearElasticity/3DExtensionLagrangeBasis/OpenCMISS.cmake create mode 100644 LinearElasticity/3DExtensionLagrangeBasis/build_debug/build.sh create mode 100644 LinearElasticity/Analytic/CantileverBeam/CMakeLists.txt create mode 100644 LinearElasticity/Analytic/CantileverBeam/Fortran/CMakeLists.txt rename LinearElasticity/Analytic/CantileverBeam/{ => Fortran}/src/CantileverBeamExample.f90 (100%) create mode 100644 LinearElasticity/Analytic/CantileverBeam/OpenCMISS.cmake create mode 100644 LinearElasticity/Analytic/CantileverBeam/build_debug/build.sh create mode 100644 LinearElasticity/Analytic/Extension/CMakeLists.txt create mode 100644 LinearElasticity/Analytic/Extension/Fortran/CMakeLists.txt rename LinearElasticity/Analytic/Extension/{ => Fortran}/src/ExtensionExample.f90 (100%) create mode 100644 LinearElasticity/Analytic/Extension/OpenCMISS.cmake create mode 100644 LinearElasticity/Analytic/Extension/build_debug/build.sh create mode 100644 Meshes/1DCubicHermite/CMakeLists.txt create mode 100644 Meshes/1DCubicHermite/Fortran/CMakeLists.txt rename Meshes/1DCubicHermite/{ => Fortran}/src/1DCubicHermiteExample.f90 (100%) create mode 100644 Meshes/1DCubicHermite/OpenCMISS.cmake create mode 100644 Meshes/1DCubicHermite/build_debug/build.sh create mode 100644 Meshes/LagrangeSimplexMesh/CMakeLists.txt create mode 100644 Meshes/LagrangeSimplexMesh/Fortran/CMakeLists.txt rename Meshes/LagrangeSimplexMesh/{ => Fortran}/src/LagrangeSimplexMeshExample.f90 (100%) create mode 100644 Meshes/LagrangeSimplexMesh/OpenCMISS.cmake create mode 100644 Meshes/LagrangeSimplexMesh/build_debug/build.sh create mode 100644 Meshes/MoreComplexMesh/CMakeLists.txt create mode 100644 Meshes/MoreComplexMesh/Fortran/CMakeLists.txt rename Meshes/MoreComplexMesh/{ => Fortran}/src/MoreComplexMeshExample.f90 (100%) create mode 100644 Meshes/MoreComplexMesh/OpenCMISS.cmake create mode 100644 Meshes/MoreComplexMesh/build_debug/build.sh create mode 100644 Meshes/MoreComplexMeshC/CMakeLists.txt create mode 100644 Meshes/MoreComplexMeshC/Fortran/CMakeLists.txt rename Meshes/MoreComplexMeshC/{ => Fortran}/src/MoreComplexMeshCExample.c (100%) create mode 100644 Meshes/MoreComplexMeshC/OpenCMISS.cmake create mode 100644 Meshes/MoreComplexMeshC/build_debug/build.sh create mode 100644 Meshes/MultipleMeshComponents/CMakeLists.txt create mode 100644 Meshes/MultipleMeshComponents/Fortran/CMakeLists.txt rename Meshes/MultipleMeshComponents/{ => Fortran}/src/MultipleMeshComponentsExample.f90 (100%) create mode 100644 Meshes/MultipleMeshComponents/OpenCMISS.cmake create mode 100644 Meshes/MultipleMeshComponents/build_debug/build.sh create mode 100644 Meshes/Simplex/Tetrahedral/Cubic/CMakeLists.txt create mode 100644 Meshes/Simplex/Tetrahedral/Cubic/Fortran/CMakeLists.txt rename Meshes/Simplex/Tetrahedral/Cubic/{ => Fortran}/src/CubicExample.f90 (100%) create mode 100644 Meshes/Simplex/Tetrahedral/Cubic/OpenCMISS.cmake create mode 100644 Meshes/Simplex/Tetrahedral/Cubic/build_debug/build.sh create mode 100644 Meshes/Simplex/Tetrahedral/Linear/CMakeLists.txt create mode 100644 Meshes/Simplex/Tetrahedral/Linear/Fortran/CMakeLists.txt rename Meshes/Simplex/Tetrahedral/Linear/{ => Fortran}/src/LinearExample.f90 (100%) create mode 100644 Meshes/Simplex/Tetrahedral/Linear/OpenCMISS.cmake create mode 100644 Meshes/Simplex/Tetrahedral/Linear/build_debug/build.sh create mode 100644 Meshes/Simplex/Tetrahedral/Quadratic/CMakeLists.txt create mode 100644 Meshes/Simplex/Tetrahedral/Quadratic/Fortran/CMakeLists.txt rename Meshes/Simplex/Tetrahedral/Quadratic/{ => Fortran}/src/QuadraticExample.f90 (100%) create mode 100644 Meshes/Simplex/Tetrahedral/Quadratic/OpenCMISS.cmake create mode 100644 Meshes/Simplex/Tetrahedral/Quadratic/build_debug/build.sh create mode 100644 Meshes/Simplex/Triangular/Cubic/CMakeLists.txt create mode 100644 Meshes/Simplex/Triangular/Cubic/Fortran/CMakeLists.txt rename Meshes/Simplex/Triangular/Cubic/{ => Fortran}/src/CubicExample.f90 (100%) create mode 100644 Meshes/Simplex/Triangular/Cubic/OpenCMISS.cmake create mode 100644 Meshes/Simplex/Triangular/Cubic/build_debug/build.sh create mode 100644 Meshes/Simplex/Triangular/Linear/CMakeLists.txt create mode 100644 Meshes/Simplex/Triangular/Linear/Fortran/CMakeLists.txt rename Meshes/Simplex/Triangular/Linear/{ => Fortran}/src/LinearExample.f90 (100%) create mode 100644 Meshes/Simplex/Triangular/Linear/OpenCMISS.cmake create mode 100644 Meshes/Simplex/Triangular/Linear/build_debug/build.sh create mode 100644 Meshes/Simplex/Triangular/Quadratic/CMakeLists.txt create mode 100644 Meshes/Simplex/Triangular/Quadratic/Fortran/CMakeLists.txt rename Meshes/Simplex/Triangular/Quadratic/{ => Fortran}/src/QuadraticExample.f90 (100%) create mode 100644 Meshes/Simplex/Triangular/Quadratic/OpenCMISS.cmake create mode 100644 Meshes/Simplex/Triangular/Quadratic/build_debug/build.sh create mode 100644 Meshes/Simplex/Triangular/QuadraticSimplexManual/CMakeLists.txt create mode 100644 Meshes/Simplex/Triangular/QuadraticSimplexManual/Fortran/CMakeLists.txt rename Meshes/Simplex/Triangular/QuadraticSimplexManual/{ => Fortran}/src/SimplexMeshExample.f90 (100%) create mode 100644 Meshes/Simplex/Triangular/QuadraticSimplexManual/OpenCMISS.cmake create mode 100644 Meshes/Simplex/Triangular/QuadraticSimplexManual/build_debug/build.sh create mode 100644 Meshes/Versions3DLaplace/CMakeLists.txt create mode 100644 Meshes/Versions3DLaplace/Fortran/CMakeLists.txt rename Meshes/Versions3DLaplace/{ => Fortran}/src/Versions3DLaplaceExample.f90 (100%) create mode 100644 Meshes/Versions3DLaplace/OpenCMISS.cmake create mode 100644 Meshes/Versions3DLaplace/build_debug/build.sh create mode 100644 MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/simple_geometry/CMakeLists.txt create mode 100644 MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/simple_geometry/Fortran/CMakeLists.txt rename MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/simple_geometry/{ => Fortran}/src/simple_geometryExample.f90 (100%) create mode 100644 MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/simple_geometry/OpenCMISS.cmake create mode 100644 MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/simple_geometry/build_debug/build.sh create mode 100644 MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/titin_10/CMakeLists.txt create mode 100644 MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/titin_10/Fortran/CMakeLists.txt rename MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/titin_10/{ => Fortran}/src/titin_10Example.f90 (100%) create mode 100644 MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/titin_10/OpenCMISS.cmake create mode 100644 MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/titin_10/build_debug/build.sh create mode 100644 MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/while_loop/CMakeLists.txt create mode 100644 MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/while_loop/Fortran/CMakeLists.txt rename MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/while_loop/{ => Fortran}/src/while_loopExample.f90 (100%) create mode 100644 MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/while_loop/OpenCMISS.cmake create mode 100644 MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/while_loop/build_debug/build.sh create mode 100644 MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticitySameMesh/CMakeLists.txt create mode 100644 MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticitySameMesh/Fortran/CMakeLists.txt rename MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticitySameMesh/{ => Fortran}/src/GudunovMonodomainElasticitySameMeshExample.f90 (100%) create mode 100644 MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticitySameMesh/OpenCMISS.cmake create mode 100644 MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticitySameMesh/build_debug/build.sh create mode 100644 MultiPhysics/CoupledDiffusionAdvectionDiffusion/CMakeLists.txt create mode 100644 MultiPhysics/CoupledDiffusionAdvectionDiffusion/Fortran/CMakeLists.txt rename MultiPhysics/CoupledDiffusionAdvectionDiffusion/{ => Fortran}/src/CoupledDiffusionAdvectionDiffusionExample.f90 (100%) rename MultiPhysics/CoupledDiffusionAdvectionDiffusion/{ => Fortran}/src/CoupledDiffusionAdvectionDiffusionExample_old.f90 (100%) create mode 100644 MultiPhysics/CoupledDiffusionAdvectionDiffusion/OpenCMISS.cmake create mode 100644 MultiPhysics/CoupledDiffusionAdvectionDiffusion/build_debug/build.sh create mode 100644 MultiPhysics/CoupledDiffusionDiffusion/CoupledDiffusionDiffusion/CMakeLists.txt create mode 100644 MultiPhysics/CoupledDiffusionDiffusion/CoupledDiffusionDiffusion/Fortran/CMakeLists.txt rename MultiPhysics/CoupledDiffusionDiffusion/CoupledDiffusionDiffusion/{ => Fortran}/src/CoupledDiffusionDiffusionExample.f90 (100%) create mode 100644 MultiPhysics/CoupledDiffusionDiffusion/CoupledDiffusionDiffusion/OpenCMISS.cmake create mode 100644 MultiPhysics/CoupledDiffusionDiffusion/CoupledDiffusionDiffusion/build_debug/build.sh create mode 100644 MultiPhysics/CoupledDiffusionDiffusion/MonolithicAnalyticTestThreeCompThreeDim/CMakeLists.txt create mode 100644 MultiPhysics/CoupledDiffusionDiffusion/MonolithicAnalyticTestThreeCompThreeDim/Fortran/CMakeLists.txt rename MultiPhysics/CoupledDiffusionDiffusion/MonolithicAnalyticTestThreeCompThreeDim/{ => Fortran}/src/MonolithicAnalyticTestThreeCompThreeDimExample.f90 (100%) create mode 100644 MultiPhysics/CoupledDiffusionDiffusion/MonolithicAnalyticTestThreeCompThreeDim/OpenCMISS.cmake create mode 100644 MultiPhysics/CoupledDiffusionDiffusion/MonolithicAnalyticTestThreeCompThreeDim/build_debug/build.sh create mode 100644 MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest/CMakeLists.txt create mode 100644 MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest/Fortran/CMakeLists.txt rename MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest/{ => Fortran}/src/MonolithicSchemeTestExample.f90 (100%) create mode 100644 MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest/OpenCMISS.cmake create mode 100644 MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest/build_debug/build.sh create mode 100644 MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTestAnalytic/CMakeLists.txt create mode 100644 MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTestAnalytic/Fortran/CMakeLists.txt rename MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTestAnalytic/{ => Fortran}/src/MonolithicSchemeTestAnalyticExample.f90 (100%) create mode 100644 MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTestAnalytic/OpenCMISS.cmake create mode 100644 MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTestAnalytic/build_debug/build.sh create mode 100644 MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest_FieldML/CMakeLists.txt create mode 100644 MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest_FieldML/Fortran/CMakeLists.txt rename MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest_FieldML/{ => Fortran}/src/MonolithicSchemeTest_FieldMLExample.f90 (100%) create mode 100644 MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest_FieldML/OpenCMISS.cmake create mode 100644 MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest_FieldML/build_debug/build.sh create mode 100644 MultiPhysics/MultiCompTransport/MultiCompAdvectionDiffusion/MonolithicSchemeAdvectionDiffusion_FieldML/CMakeLists.txt create mode 100644 MultiPhysics/MultiCompTransport/MultiCompAdvectionDiffusion/MonolithicSchemeAdvectionDiffusion_FieldML/Fortran/CMakeLists.txt rename MultiPhysics/MultiCompTransport/MultiCompAdvectionDiffusion/MonolithicSchemeAdvectionDiffusion_FieldML/{ => Fortran}/src/MonolithicSchemeAdvectionDiffusion_FieldMLExample.f90 (100%) create mode 100644 MultiPhysics/MultiCompTransport/MultiCompAdvectionDiffusion/MonolithicSchemeAdvectionDiffusion_FieldML/OpenCMISS.cmake create mode 100644 MultiPhysics/MultiCompTransport/MultiCompAdvectionDiffusion/MonolithicSchemeAdvectionDiffusion_FieldML/build_debug/build.sh create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenDarcy/CMakeLists.txt create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenDarcy/Fortran/CMakeLists.txt rename MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenDarcy/{ => Fortran}/src/CylinderInflationDrivenDarcyExample.f90 (100%) create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenDarcy/OpenCMISS.cmake create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenDarcy/build_debug/build.sh create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenMultiCompDarcy/CMakeLists.txt create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenMultiCompDarcy/Fortran/CMakeLists.txt rename MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenMultiCompDarcy/{ => Fortran}/src/CylinderInflationDrivenMultiCompDarcyExample.f90 (100%) create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenMultiCompDarcy/OpenCMISS.cmake create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenMultiCompDarcy/build_debug/build.sh create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompElastDrivenDarcy_AnalyticDarcy/CMakeLists.txt create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompElastDrivenDarcy_AnalyticDarcy/Fortran/CMakeLists.txt rename MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompElastDrivenDarcy_AnalyticDarcy/{ => Fortran}/src/IncompElastDrivenDarcy_AnalyticDarcyExample.f90 (100%) create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompElastDrivenDarcy_AnalyticDarcy/OpenCMISS.cmake create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompElastDrivenDarcy_AnalyticDarcy/build_debug/build.sh create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcy/CMakeLists.txt create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcy/Fortran/CMakeLists.txt rename MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcy/{ => Fortran}/src/IncompressibleElasticityDrivenDarcyExample.f90 (100%) create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcy/OpenCMISS.cmake create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcy/build_debug/build.sh create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO/CMakeLists.txt create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO/Fortran/CMakeLists.txt rename MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO/{ => Fortran}/src/IncompressibleElasticityDrivenDarcyIOExample.f90 (100%) create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO/OpenCMISS.cmake create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO/build_debug/build.sh create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO2/CMakeLists.txt create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO2/Fortran/CMakeLists.txt rename MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO2/{ => Fortran}/src/IncompressibleElasticityDrivenDarcyIO2Example.f90 (100%) create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO2/OpenCMISS.cmake create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO2/build_debug/build.sh create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO3/CMakeLists.txt create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO3/Fortran/CMakeLists.txt rename MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO3/{ => Fortran}/src/IncompressibleElasticityDrivenDarcyIO3Example.f90 (100%) create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO3/OpenCMISS.cmake create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO3/build_debug/build.sh create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyMatSolve/CMakeLists.txt create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyMatSolve/Fortran/CMakeLists.txt rename MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyMatSolve/{ => Fortran}/src/IncompressibleElasticityDrivenDarcyMatSolveExample.f90 (100%) create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyMatSolve/OpenCMISS.cmake create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyMatSolve/build_debug/build.sh create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcy/CMakeLists.txt create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcy/Fortran/CMakeLists.txt rename MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcy/{ => Fortran}/src/IncompressibleElasticityDrivenMultiCompDarcyExample.f90 (100%) create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcy/OpenCMISS.cmake create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcy/build_debug/build.sh create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcyIO/CMakeLists.txt create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcyIO/Fortran/CMakeLists.txt rename MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcyIO/{ => Fortran}/src/IncompressibleElasticityDrivenMultiCompDarcyIOExample.f90 (100%) create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcyIO/OpenCMISS.cmake create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcyIO/build_debug/build.sh create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/InriaModel/CMakeLists.txt create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/InriaModel/Fortran/CMakeLists.txt rename MultiPhysics/Poroelasticity/FiniteElasticityDarcy/InriaModel/{ => Fortran}/src/InriaModelExample.f90 (100%) create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/InriaModel/OpenCMISS.cmake create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/InriaModel/build_debug/build.sh create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenDarcy/CMakeLists.txt create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenDarcy/Fortran/CMakeLists.txt rename MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenDarcy/{ => Fortran}/src/QuadraticEllipsoidDrivenDarcyExample.f90 (100%) create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenDarcy/OpenCMISS.cmake create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenDarcy/build_debug/build.sh create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenMultiCompDarcy/CMakeLists.txt create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenMultiCompDarcy/Fortran/CMakeLists.txt rename MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenMultiCompDarcy/{ => Fortran}/src/QuadraticEllipsoidDrivenMultiCompDarcyExample.f90 (100%) create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenMultiCompDarcy/OpenCMISS.cmake create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenMultiCompDarcy/build_debug/build.sh create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/SameRegionSameMesh/CMakeLists.txt create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/SameRegionSameMesh/Fortran/CMakeLists.txt rename MultiPhysics/Poroelasticity/FiniteElasticityDarcy/SameRegionSameMesh/{ => Fortran}/src/SameRegionSameMeshExample.f90 (100%) create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/SameRegionSameMesh/OpenCMISS.cmake create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityDarcy/SameRegionSameMesh/build_debug/build.sh create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/Cantilever/CMakeLists.txt create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/Cantilever/Fortran/CMakeLists.txt rename MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/Cantilever/{ => Fortran}/src/CantileverExample.f90 (100%) create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/Cantilever/OpenCMISS.cmake create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/Cantilever/build_debug/build.sh create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/StaticExtension/CMakeLists.txt create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/StaticExtension/Fortran/CMakeLists.txt rename MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/StaticExtension/{ => Fortran}/src/StaticExtensionExample.f90 (100%) create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/StaticExtension/OpenCMISS.cmake create mode 100644 MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/StaticExtension/build_debug/build.sh create mode 100644 TwoRegions/CMakeLists.txt create mode 100644 TwoRegions/Fortran/CMakeLists.txt rename TwoRegions/{ => Fortran}/src/TwoRegionsExample.f90 (100%) create mode 100644 TwoRegions/OpenCMISS.cmake create mode 100644 TwoRegions/build_debug/build.sh create mode 100644 cellml/CMakeLists.txt create mode 100644 cellml/Fortran/CMakeLists.txt create mode 100644 cellml/OpenCMISS.cmake create mode 100644 cellml/build_debug/build.sh create mode 100644 cellml/model-integration/CMakeLists.txt create mode 100644 cellml/model-integration/Fortran/CMakeLists.txt create mode 100644 cellml/model-integration/OpenCMISS.cmake create mode 100644 cellml/model-integration/build_debug/build.sh create mode 100644 define-geometry-and-export/CMakeLists.txt create mode 100644 define-geometry-and-export/Fortran/CMakeLists.txt rename define-geometry-and-export/{ => Fortran}/src/define-geometry-and-exportExample.f90 (100%) create mode 100644 define-geometry-and-export/OpenCMISS.cmake create mode 100644 define-geometry-and-export/build_debug/build.sh create mode 100755 scripts/create_cmakefiles.py create mode 100644 scripts/resources/CMakeLists-1.txt create mode 100644 scripts/resources/OpenCMISS.cmake create mode 100755 scripts/resources/build.sh create mode 100644 simple-field-manipulation-direct-access/CMakeLists.txt create mode 100644 simple-field-manipulation-direct-access/Fortran/CMakeLists.txt rename simple-field-manipulation-direct-access/{ => Fortran}/src/simple-field-manipulation-direct-accessExample.f90 (100%) create mode 100644 simple-field-manipulation-direct-access/OpenCMISS.cmake create mode 100644 simple-field-manipulation-direct-access/build_debug/build.sh diff --git a/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/CMakeLists.txt b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/Fortran/CMakeLists.txt b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/Fortran/CMakeLists.txt new file mode 100644 index 00000000..807ede3e --- /dev/null +++ b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(100k src/100kExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(100k PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(100k PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_100k COMMAND 100k) +add_opencmiss_environment(test_100k) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/src/100kExample.f90 b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/Fortran/src/100kExample.f90 similarity index 100% rename from 42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/src/100kExample.f90 rename to 42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/Fortran/src/100kExample.f90 diff --git a/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/OpenCMISS.cmake b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/build_debug/build.sh b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/CMakeLists.txt b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/Fortran/CMakeLists.txt b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/Fortran/CMakeLists.txt new file mode 100644 index 00000000..f07a9d89 --- /dev/null +++ b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(10k src/10kExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(10k PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(10k PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_10k COMMAND 10k) +add_opencmiss_environment(test_10k) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/src/10kExample.f90 b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/Fortran/src/10kExample.f90 similarity index 100% rename from 42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/src/10kExample.f90 rename to 42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/Fortran/src/10kExample.f90 diff --git a/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/OpenCMISS.cmake b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/build_debug/build.sh b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/CMakeLists.txt b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/Fortran/CMakeLists.txt b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/Fortran/CMakeLists.txt new file mode 100644 index 00000000..4b3dc8ce --- /dev/null +++ b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(1k src/1kExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(1k PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(1k PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_1k COMMAND 1k) +add_opencmiss_environment(test_1k) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/src/1kExample.f90 b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/Fortran/src/1kExample.f90 similarity index 100% rename from 42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/src/1kExample.f90 rename to 42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/Fortran/src/1kExample.f90 diff --git a/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/OpenCMISS.cmake b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/build_debug/build.sh b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/42TestingPoints/SinglePhysics/LinearProblems/StaticProblems/Stokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityLinearPressure/LEVEL_2/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityLinearPressure/LEVEL_2/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityLinearPressure/LEVEL_2/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt new file mode 100644 index 00000000..1a8325a2 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(LEVEL_2 src/LEVEL_2Example.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(LEVEL_2 PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(LEVEL_2 PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_LEVEL_2 COMMAND LEVEL_2) +add_opencmiss_environment(test_LEVEL_2) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityLinearPressure/LEVEL_2/src/LEVEL_2Example.f90 b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityLinearPressure/LEVEL_2/Fortran/src/LEVEL_2Example.f90 similarity index 100% rename from 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityLinearPressure/LEVEL_2/src/LEVEL_2Example.f90 rename to 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityLinearPressure/LEVEL_2/Fortran/src/LEVEL_2Example.f90 diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityLinearPressure/LEVEL_2/build_debug/build.sh b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityLinearPressure/LEVEL_2/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityLinearPressure/LEVEL_2/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityQuadraticPressure/LEVEL_2/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityQuadraticPressure/LEVEL_2/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityQuadraticPressure/LEVEL_2/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityQuadraticPressure/LEVEL_2/Fortran/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityQuadraticPressure/LEVEL_2/Fortran/CMakeLists.txt new file mode 100644 index 00000000..1a8325a2 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityQuadraticPressure/LEVEL_2/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(LEVEL_2 src/LEVEL_2Example.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(LEVEL_2 PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(LEVEL_2 PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_LEVEL_2 COMMAND LEVEL_2) +add_opencmiss_environment(test_LEVEL_2) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityQuadraticPressure/LEVEL_2/src/LEVEL_2Example.f90 b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityQuadraticPressure/LEVEL_2/Fortran/src/LEVEL_2Example.f90 similarity index 100% rename from 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityQuadraticPressure/LEVEL_2/src/LEVEL_2Example.f90 rename to 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityQuadraticPressure/LEVEL_2/Fortran/src/LEVEL_2Example.f90 diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityQuadraticPressure/LEVEL_2/OpenCMISS.cmake b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityQuadraticPressure/LEVEL_2/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityQuadraticPressure/LEVEL_2/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityQuadraticPressure/LEVEL_2/build_debug/build.sh b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityQuadraticPressure/LEVEL_2/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/CubicVelocityQuadraticPressure/LEVEL_2/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/QuadraticVelocityLinearPressure/LEVEL_2/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/QuadraticVelocityLinearPressure/LEVEL_2/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/QuadraticVelocityLinearPressure/LEVEL_2/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/QuadraticVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/QuadraticVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt new file mode 100644 index 00000000..1a8325a2 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/QuadraticVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(LEVEL_2 src/LEVEL_2Example.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(LEVEL_2 PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(LEVEL_2 PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_LEVEL_2 COMMAND LEVEL_2) +add_opencmiss_environment(test_LEVEL_2) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/QuadraticVelocityLinearPressure/LEVEL_2/src/LEVEL_2Example.f90 b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/QuadraticVelocityLinearPressure/LEVEL_2/Fortran/src/LEVEL_2Example.f90 similarity index 100% rename from 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/QuadraticVelocityLinearPressure/LEVEL_2/src/LEVEL_2Example.f90 rename to 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/QuadraticVelocityLinearPressure/LEVEL_2/Fortran/src/LEVEL_2Example.f90 diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/QuadraticVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/QuadraticVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/QuadraticVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/QuadraticVelocityLinearPressure/LEVEL_2/build_debug/build.sh b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/QuadraticVelocityLinearPressure/LEVEL_2/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/QUAD/QuadraticVelocityLinearPressure/LEVEL_2/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityLinearPressure/LEVEL_2/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityLinearPressure/LEVEL_2/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityLinearPressure/LEVEL_2/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt new file mode 100644 index 00000000..1a8325a2 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(LEVEL_2 src/LEVEL_2Example.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(LEVEL_2 PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(LEVEL_2 PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_LEVEL_2 COMMAND LEVEL_2) +add_opencmiss_environment(test_LEVEL_2) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityLinearPressure/LEVEL_2/src/LEVEL_2Example.f90 b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityLinearPressure/LEVEL_2/Fortran/src/LEVEL_2Example.f90 similarity index 100% rename from 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityLinearPressure/LEVEL_2/src/LEVEL_2Example.f90 rename to 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityLinearPressure/LEVEL_2/Fortran/src/LEVEL_2Example.f90 diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityLinearPressure/LEVEL_2/build_debug/build.sh b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityLinearPressure/LEVEL_2/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityLinearPressure/LEVEL_2/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityQuadraticPressure/LEVEL_2/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityQuadraticPressure/LEVEL_2/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityQuadraticPressure/LEVEL_2/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityQuadraticPressure/LEVEL_2/Fortran/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityQuadraticPressure/LEVEL_2/Fortran/CMakeLists.txt new file mode 100644 index 00000000..1a8325a2 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityQuadraticPressure/LEVEL_2/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(LEVEL_2 src/LEVEL_2Example.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(LEVEL_2 PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(LEVEL_2 PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_LEVEL_2 COMMAND LEVEL_2) +add_opencmiss_environment(test_LEVEL_2) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityQuadraticPressure/LEVEL_2/src/LEVEL_2Example.f90 b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityQuadraticPressure/LEVEL_2/Fortran/src/LEVEL_2Example.f90 similarity index 100% rename from 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityQuadraticPressure/LEVEL_2/src/LEVEL_2Example.f90 rename to 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityQuadraticPressure/LEVEL_2/Fortran/src/LEVEL_2Example.f90 diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityQuadraticPressure/LEVEL_2/OpenCMISS.cmake b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityQuadraticPressure/LEVEL_2/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityQuadraticPressure/LEVEL_2/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityQuadraticPressure/LEVEL_2/build_debug/build.sh b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityQuadraticPressure/LEVEL_2/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/CubicVelocityQuadraticPressure/LEVEL_2/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/QuadraticVelocityLinearPressure/LEVEL_2/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/QuadraticVelocityLinearPressure/LEVEL_2/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/QuadraticVelocityLinearPressure/LEVEL_2/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/QuadraticVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/QuadraticVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt new file mode 100644 index 00000000..1a8325a2 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/QuadraticVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(LEVEL_2 src/LEVEL_2Example.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(LEVEL_2 PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(LEVEL_2 PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_LEVEL_2 COMMAND LEVEL_2) +add_opencmiss_environment(test_LEVEL_2) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/QuadraticVelocityLinearPressure/LEVEL_2/src/LEVEL_2Example.f90 b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/QuadraticVelocityLinearPressure/LEVEL_2/Fortran/src/LEVEL_2Example.f90 similarity index 100% rename from 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/QuadraticVelocityLinearPressure/LEVEL_2/src/LEVEL_2Example.f90 rename to 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/QuadraticVelocityLinearPressure/LEVEL_2/Fortran/src/LEVEL_2Example.f90 diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/QuadraticVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/QuadraticVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/QuadraticVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/QuadraticVelocityLinearPressure/LEVEL_2/build_debug/build.sh b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/QuadraticVelocityLinearPressure/LEVEL_2/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/2D/TRI/QuadraticVelocityLinearPressure/LEVEL_2/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityLinearPressure/LEVEL_2/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityLinearPressure/LEVEL_2/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityLinearPressure/LEVEL_2/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt new file mode 100644 index 00000000..1a8325a2 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(LEVEL_2 src/LEVEL_2Example.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(LEVEL_2 PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(LEVEL_2 PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_LEVEL_2 COMMAND LEVEL_2) +add_opencmiss_environment(test_LEVEL_2) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityLinearPressure/LEVEL_2/src/LEVEL_2Example.f90 b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityLinearPressure/LEVEL_2/Fortran/src/LEVEL_2Example.f90 similarity index 100% rename from 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityLinearPressure/LEVEL_2/src/LEVEL_2Example.f90 rename to 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityLinearPressure/LEVEL_2/Fortran/src/LEVEL_2Example.f90 diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityLinearPressure/LEVEL_2/build_debug/build.sh b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityLinearPressure/LEVEL_2/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityLinearPressure/LEVEL_2/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityQuadraticPressure/LEVEL_2/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityQuadraticPressure/LEVEL_2/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityQuadraticPressure/LEVEL_2/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityQuadraticPressure/LEVEL_2/Fortran/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityQuadraticPressure/LEVEL_2/Fortran/CMakeLists.txt new file mode 100644 index 00000000..1a8325a2 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityQuadraticPressure/LEVEL_2/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(LEVEL_2 src/LEVEL_2Example.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(LEVEL_2 PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(LEVEL_2 PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_LEVEL_2 COMMAND LEVEL_2) +add_opencmiss_environment(test_LEVEL_2) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityQuadraticPressure/LEVEL_2/src/LEVEL_2Example.f90 b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityQuadraticPressure/LEVEL_2/Fortran/src/LEVEL_2Example.f90 similarity index 100% rename from 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityQuadraticPressure/LEVEL_2/src/LEVEL_2Example.f90 rename to 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityQuadraticPressure/LEVEL_2/Fortran/src/LEVEL_2Example.f90 diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityQuadraticPressure/LEVEL_2/OpenCMISS.cmake b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityQuadraticPressure/LEVEL_2/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityQuadraticPressure/LEVEL_2/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityQuadraticPressure/LEVEL_2/build_debug/build.sh b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityQuadraticPressure/LEVEL_2/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/CubicVelocityQuadraticPressure/LEVEL_2/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_2/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_2/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_2/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt new file mode 100644 index 00000000..1a8325a2 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(LEVEL_2 src/LEVEL_2Example.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(LEVEL_2 PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(LEVEL_2 PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_LEVEL_2 COMMAND LEVEL_2) +add_opencmiss_environment(test_LEVEL_2) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_2/src/LEVEL_2Example.f90 b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_2/Fortran/src/LEVEL_2Example.f90 similarity index 100% rename from 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_2/src/LEVEL_2Example.f90 rename to 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_2/Fortran/src/LEVEL_2Example.f90 diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_2/build_debug/build.sh b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_2/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_2/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityLinearPressure/LEVEL_2/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityLinearPressure/LEVEL_2/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityLinearPressure/LEVEL_2/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt new file mode 100644 index 00000000..1a8325a2 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(LEVEL_2 src/LEVEL_2Example.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(LEVEL_2 PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(LEVEL_2 PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_LEVEL_2 COMMAND LEVEL_2) +add_opencmiss_environment(test_LEVEL_2) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityLinearPressure/LEVEL_2/src/LEVEL_2Example.f90 b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityLinearPressure/LEVEL_2/Fortran/src/LEVEL_2Example.f90 similarity index 100% rename from 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityLinearPressure/LEVEL_2/src/LEVEL_2Example.f90 rename to 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityLinearPressure/LEVEL_2/Fortran/src/LEVEL_2Example.f90 diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityLinearPressure/LEVEL_2/build_debug/build.sh b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityLinearPressure/LEVEL_2/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityLinearPressure/LEVEL_2/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityQuadraticPressure/LEVEL_2/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityQuadraticPressure/LEVEL_2/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityQuadraticPressure/LEVEL_2/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityQuadraticPressure/LEVEL_2/Fortran/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityQuadraticPressure/LEVEL_2/Fortran/CMakeLists.txt new file mode 100644 index 00000000..1a8325a2 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityQuadraticPressure/LEVEL_2/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(LEVEL_2 src/LEVEL_2Example.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(LEVEL_2 PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(LEVEL_2 PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_LEVEL_2 COMMAND LEVEL_2) +add_opencmiss_environment(test_LEVEL_2) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityQuadraticPressure/LEVEL_2/src/LEVEL_2Example.f90 b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityQuadraticPressure/LEVEL_2/Fortran/src/LEVEL_2Example.f90 similarity index 100% rename from 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityQuadraticPressure/LEVEL_2/src/LEVEL_2Example.f90 rename to 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityQuadraticPressure/LEVEL_2/Fortran/src/LEVEL_2Example.f90 diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityQuadraticPressure/LEVEL_2/OpenCMISS.cmake b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityQuadraticPressure/LEVEL_2/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityQuadraticPressure/LEVEL_2/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityQuadraticPressure/LEVEL_2/build_debug/build.sh b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityQuadraticPressure/LEVEL_2/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/CubicVelocityQuadraticPressure/LEVEL_2/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/QuadraticVelocityLinearPressure/LEVEL_2/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/QuadraticVelocityLinearPressure/LEVEL_2/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/QuadraticVelocityLinearPressure/LEVEL_2/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/QuadraticVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/QuadraticVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt new file mode 100644 index 00000000..1a8325a2 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/QuadraticVelocityLinearPressure/LEVEL_2/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(LEVEL_2 src/LEVEL_2Example.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(LEVEL_2 PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(LEVEL_2 PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_LEVEL_2 COMMAND LEVEL_2) +add_opencmiss_environment(test_LEVEL_2) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/QuadraticVelocityLinearPressure/LEVEL_2/src/LEVEL_2Example.f90 b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/QuadraticVelocityLinearPressure/LEVEL_2/Fortran/src/LEVEL_2Example.f90 similarity index 100% rename from 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/QuadraticVelocityLinearPressure/LEVEL_2/src/LEVEL_2Example.f90 rename to 42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/QuadraticVelocityLinearPressure/LEVEL_2/Fortran/src/LEVEL_2Example.f90 diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/QuadraticVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/QuadraticVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/QuadraticVelocityLinearPressure/LEVEL_2/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/QuadraticVelocityLinearPressure/LEVEL_2/build_debug/build.sh b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/QuadraticVelocityLinearPressure/LEVEL_2/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/DynamicProblems/NavierStokes/3D/TET/QuadraticVelocityLinearPressure/LEVEL_2/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/Fortran/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/Fortran/CMakeLists.txt new file mode 100644 index 00000000..807ede3e --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(100k src/100kExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(100k PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(100k PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_100k COMMAND 100k) +add_opencmiss_environment(test_100k) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/src/100kExample.f90 b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/Fortran/src/100kExample.f90 similarity index 100% rename from 42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/src/100kExample.f90 rename to 42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/Fortran/src/100kExample.f90 diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/OpenCMISS.cmake b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/build_debug/build.sh b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/100k/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/Fortran/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/Fortran/CMakeLists.txt new file mode 100644 index 00000000..f07a9d89 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(10k src/10kExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(10k PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(10k PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_10k COMMAND 10k) +add_opencmiss_environment(test_10k) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/src/10kExample.f90 b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/Fortran/src/10kExample.f90 similarity index 100% rename from 42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/src/10kExample.f90 rename to 42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/Fortran/src/10kExample.f90 diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/OpenCMISS.cmake b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/build_debug/build.sh b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/10k/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/Fortran/CMakeLists.txt b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/Fortran/CMakeLists.txt new file mode 100644 index 00000000..4b3dc8ce --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(1k src/1kExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(1k PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(1k PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_1k COMMAND 1k) +add_opencmiss_environment(test_1k) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/src/1kExample.f90 b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/Fortran/src/1kExample.f90 similarity index 100% rename from 42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/src/1kExample.f90 rename to 42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/Fortran/src/1kExample.f90 diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/OpenCMISS.cmake b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/build_debug/build.sh b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/42TestingPoints/SinglePhysics/NonlinearProblems/StaticProblems/NavierStokes/3D/HEX/QuadraticVelocityLinearPressure/LEVEL_3/1k/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/Bioelectrics/Bidomain/CMakeLists.txt b/Bioelectrics/Bidomain/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/Bioelectrics/Bidomain/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/Bioelectrics/Bidomain/Fortran/CMakeLists.txt b/Bioelectrics/Bidomain/Fortran/CMakeLists.txt new file mode 100644 index 00000000..c036db49 --- /dev/null +++ b/Bioelectrics/Bidomain/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Bidomain src/BidomainExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Bidomain PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Bidomain PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Bidomain COMMAND Bidomain) +add_opencmiss_environment(test_Bidomain) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/Bioelectrics/Bidomain/src/BidomainExample.f90 b/Bioelectrics/Bidomain/Fortran/src/BidomainExample.f90 similarity index 100% rename from Bioelectrics/Bidomain/src/BidomainExample.f90 rename to Bioelectrics/Bidomain/Fortran/src/BidomainExample.f90 diff --git a/Bioelectrics/Bidomain/OpenCMISS.cmake b/Bioelectrics/Bidomain/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/Bioelectrics/Bidomain/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/Bioelectrics/Bidomain/build_debug/build.sh b/Bioelectrics/Bidomain/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/Bioelectrics/Bidomain/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/Bioelectrics/Monodomain/CMakeLists.txt b/Bioelectrics/Monodomain/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/Bioelectrics/Monodomain/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/Bioelectrics/Monodomain/Fortran/CMakeLists.txt b/Bioelectrics/Monodomain/Fortran/CMakeLists.txt new file mode 100644 index 00000000..cdcf3c22 --- /dev/null +++ b/Bioelectrics/Monodomain/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Monodomain src/FortranExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Monodomain PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Monodomain PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Monodomain COMMAND Monodomain) +add_opencmiss_environment(test_Monodomain) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/Bioelectrics/Monodomain/OpenCMISS.cmake b/Bioelectrics/Monodomain/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/Bioelectrics/Monodomain/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/Bioelectrics/Monodomain/build_debug/build.sh b/Bioelectrics/Monodomain/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/Bioelectrics/Monodomain/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/Bioelectrics/MonodomainBuenoOrovio/CMakeLists.txt b/Bioelectrics/MonodomainBuenoOrovio/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/Bioelectrics/MonodomainBuenoOrovio/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/Bioelectrics/MonodomainBuenoOrovio/Fortran/CMakeLists.txt b/Bioelectrics/MonodomainBuenoOrovio/Fortran/CMakeLists.txt new file mode 100644 index 00000000..eec7de1b --- /dev/null +++ b/Bioelectrics/MonodomainBuenoOrovio/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(MonodomainBuenoOrovio src/MonodomainBuenoOrovioExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(MonodomainBuenoOrovio PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(MonodomainBuenoOrovio PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_MonodomainBuenoOrovio COMMAND MonodomainBuenoOrovio) +add_opencmiss_environment(test_MonodomainBuenoOrovio) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/Bioelectrics/MonodomainBuenoOrovio/src/MonodomainBuenoOrovioExample.f90 b/Bioelectrics/MonodomainBuenoOrovio/Fortran/src/MonodomainBuenoOrovioExample.f90 similarity index 100% rename from Bioelectrics/MonodomainBuenoOrovio/src/MonodomainBuenoOrovioExample.f90 rename to Bioelectrics/MonodomainBuenoOrovio/Fortran/src/MonodomainBuenoOrovioExample.f90 diff --git a/Bioelectrics/MonodomainBuenoOrovio/OpenCMISS.cmake b/Bioelectrics/MonodomainBuenoOrovio/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/Bioelectrics/MonodomainBuenoOrovio/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/Bioelectrics/MonodomainBuenoOrovio/build_debug/build.sh b/Bioelectrics/MonodomainBuenoOrovio/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/Bioelectrics/MonodomainBuenoOrovio/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/Bioelectrics/MonodomainCUDA/CMakeLists.txt b/Bioelectrics/MonodomainCUDA/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/Bioelectrics/MonodomainCUDA/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/Bioelectrics/MonodomainCUDA/Fortran/CMakeLists.txt b/Bioelectrics/MonodomainCUDA/Fortran/CMakeLists.txt new file mode 100644 index 00000000..7e8c3759 --- /dev/null +++ b/Bioelectrics/MonodomainCUDA/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(MonodomainCUDA src/MonodomainCUDAExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(MonodomainCUDA PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(MonodomainCUDA PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_MonodomainCUDA COMMAND MonodomainCUDA) +add_opencmiss_environment(test_MonodomainCUDA) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/Bioelectrics/MonodomainCUDA/src/MonodomainCUDAExample.f90 b/Bioelectrics/MonodomainCUDA/Fortran/src/MonodomainCUDAExample.f90 similarity index 100% rename from Bioelectrics/MonodomainCUDA/src/MonodomainCUDAExample.f90 rename to Bioelectrics/MonodomainCUDA/Fortran/src/MonodomainCUDAExample.f90 diff --git a/Bioelectrics/MonodomainCUDA/OpenCMISS.cmake b/Bioelectrics/MonodomainCUDA/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/Bioelectrics/MonodomainCUDA/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/Bioelectrics/MonodomainCUDA/build_debug/build.sh b/Bioelectrics/MonodomainCUDA/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/Bioelectrics/MonodomainCUDA/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/Bioelectrics/MonodomainTP06/CMakeLists.txt b/Bioelectrics/MonodomainTP06/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/Bioelectrics/MonodomainTP06/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/Bioelectrics/MonodomainTP06/Fortran/CMakeLists.txt b/Bioelectrics/MonodomainTP06/Fortran/CMakeLists.txt new file mode 100644 index 00000000..c0587c94 --- /dev/null +++ b/Bioelectrics/MonodomainTP06/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(MonodomainTP06 src/MonodomainTP06Example.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(MonodomainTP06 PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(MonodomainTP06 PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_MonodomainTP06 COMMAND MonodomainTP06) +add_opencmiss_environment(test_MonodomainTP06) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/Bioelectrics/MonodomainTP06/src/MonodomainTP06Example.f90 b/Bioelectrics/MonodomainTP06/Fortran/src/MonodomainTP06Example.f90 similarity index 100% rename from Bioelectrics/MonodomainTP06/src/MonodomainTP06Example.f90 rename to Bioelectrics/MonodomainTP06/Fortran/src/MonodomainTP06Example.f90 diff --git a/Bioelectrics/MonodomainTP06/OpenCMISS.cmake b/Bioelectrics/MonodomainTP06/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/Bioelectrics/MonodomainTP06/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/Bioelectrics/MonodomainTP06/build_debug/build.sh b/Bioelectrics/MonodomainTP06/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/Bioelectrics/MonodomainTP06/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/Bioelectrics/Monodomain_Shiqiang/CMakeLists.txt b/Bioelectrics/Monodomain_Shiqiang/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/Bioelectrics/Monodomain_Shiqiang/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/Bioelectrics/Monodomain_Shiqiang/Fortran/CMakeLists.txt b/Bioelectrics/Monodomain_Shiqiang/Fortran/CMakeLists.txt new file mode 100644 index 00000000..4ee983a9 --- /dev/null +++ b/Bioelectrics/Monodomain_Shiqiang/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Monodomain_Shiqiang src/Monodomain_ShiqiangExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Monodomain_Shiqiang PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Monodomain_Shiqiang PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Monodomain_Shiqiang COMMAND Monodomain_Shiqiang) +add_opencmiss_environment(test_Monodomain_Shiqiang) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/Bioelectrics/Monodomain_Shiqiang/src/Monodomain_ShiqiangExample.f90 b/Bioelectrics/Monodomain_Shiqiang/Fortran/src/Monodomain_ShiqiangExample.f90 similarity index 100% rename from Bioelectrics/Monodomain_Shiqiang/src/Monodomain_ShiqiangExample.f90 rename to Bioelectrics/Monodomain_Shiqiang/Fortran/src/Monodomain_ShiqiangExample.f90 diff --git a/Bioelectrics/Monodomain_Shiqiang/OpenCMISS.cmake b/Bioelectrics/Monodomain_Shiqiang/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/Bioelectrics/Monodomain_Shiqiang/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/Bioelectrics/Monodomain_Shiqiang/build_debug/build.sh b/Bioelectrics/Monodomain_Shiqiang/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/Bioelectrics/Monodomain_Shiqiang/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO/CMakeLists.txt b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO/Fortran/CMakeLists.txt b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO/Fortran/CMakeLists.txt new file mode 100644 index 00000000..eb11cbf1 --- /dev/null +++ b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(AdvectionDiffusionIO src/AdvectionDiffusionIOExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(AdvectionDiffusionIO PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(AdvectionDiffusionIO PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_AdvectionDiffusionIO COMMAND AdvectionDiffusionIO) +add_opencmiss_environment(test_AdvectionDiffusionIO) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO/src/AdvectionDiffusionIOExample.f90 b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO/Fortran/src/AdvectionDiffusionIOExample.f90 similarity index 100% rename from ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO/src/AdvectionDiffusionIOExample.f90 rename to ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO/Fortran/src/AdvectionDiffusionIOExample.f90 diff --git a/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO/OpenCMISS.cmake b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO/build_debug/build.sh b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_ALE/CMakeLists.txt b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_ALE/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_ALE/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_ALE/Fortran/CMakeLists.txt b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_ALE/Fortran/CMakeLists.txt new file mode 100644 index 00000000..a04371db --- /dev/null +++ b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_ALE/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(AdvectionDiffusionIO_ALE src/AdvectionDiffusionIO_ALEExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(AdvectionDiffusionIO_ALE PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(AdvectionDiffusionIO_ALE PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_AdvectionDiffusionIO_ALE COMMAND AdvectionDiffusionIO_ALE) +add_opencmiss_environment(test_AdvectionDiffusionIO_ALE) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_ALE/src/AdvectionDiffusionIO_ALEExample.f90 b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_ALE/Fortran/src/AdvectionDiffusionIO_ALEExample.f90 similarity index 100% rename from ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_ALE/src/AdvectionDiffusionIO_ALEExample.f90 rename to ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_ALE/Fortran/src/AdvectionDiffusionIO_ALEExample.f90 diff --git a/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_ALE/OpenCMISS.cmake b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_ALE/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_ALE/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_ALE/build_debug/build.sh b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_ALE/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_ALE/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_BCs/CMakeLists.txt b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_BCs/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_BCs/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_BCs/Fortran/CMakeLists.txt b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_BCs/Fortran/CMakeLists.txt new file mode 100644 index 00000000..363a7601 --- /dev/null +++ b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_BCs/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(AdvectionDiffusionIO_BCs src/AdvectionDiffusionIO_BCsExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(AdvectionDiffusionIO_BCs PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(AdvectionDiffusionIO_BCs PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_AdvectionDiffusionIO_BCs COMMAND AdvectionDiffusionIO_BCs) +add_opencmiss_environment(test_AdvectionDiffusionIO_BCs) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_BCs/src/AdvectionDiffusionIO_BCsExample.f90 b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_BCs/Fortran/src/AdvectionDiffusionIO_BCsExample.f90 similarity index 100% rename from ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_BCs/src/AdvectionDiffusionIO_BCsExample.f90 rename to ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_BCs/Fortran/src/AdvectionDiffusionIO_BCsExample.f90 diff --git a/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_BCs/OpenCMISS.cmake b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_BCs/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_BCs/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_BCs/build_debug/build.sh b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_BCs/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/AdvectionDiffusion/AdvectionDiffusionIO_BCs/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion/CMakeLists.txt b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion/Fortran/CMakeLists.txt b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion/Fortran/CMakeLists.txt new file mode 100644 index 00000000..8456f6ce --- /dev/null +++ b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(StaticAdvectionDiffusion src/StaticAdvectionDiffusionExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(StaticAdvectionDiffusion PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(StaticAdvectionDiffusion PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_StaticAdvectionDiffusion COMMAND StaticAdvectionDiffusion) +add_opencmiss_environment(test_StaticAdvectionDiffusion) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion/src/StaticAdvectionDiffusionExample.f90 b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion/Fortran/src/StaticAdvectionDiffusionExample.f90 similarity index 100% rename from ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion/src/StaticAdvectionDiffusionExample.f90 rename to ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion/Fortran/src/StaticAdvectionDiffusionExample.f90 diff --git a/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion/OpenCMISS.cmake b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion/build_debug/build.sh b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusionSUPG/CMakeLists.txt b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusionSUPG/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusionSUPG/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusionSUPG/Fortran/CMakeLists.txt b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusionSUPG/Fortran/CMakeLists.txt new file mode 100644 index 00000000..b7247c3f --- /dev/null +++ b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusionSUPG/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(StaticAdvectionDiffusionSUPG src/StaticAdvectionDiffusionSUPGExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(StaticAdvectionDiffusionSUPG PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(StaticAdvectionDiffusionSUPG PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_StaticAdvectionDiffusionSUPG COMMAND StaticAdvectionDiffusionSUPG) +add_opencmiss_environment(test_StaticAdvectionDiffusionSUPG) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusionSUPG/src/StaticAdvectionDiffusionSUPGExample.f90 b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusionSUPG/Fortran/src/StaticAdvectionDiffusionSUPGExample.f90 similarity index 100% rename from ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusionSUPG/src/StaticAdvectionDiffusionSUPGExample.f90 rename to ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusionSUPG/Fortran/src/StaticAdvectionDiffusionSUPGExample.f90 diff --git a/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusionSUPG/OpenCMISS.cmake b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusionSUPG/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusionSUPG/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusionSUPG/build_debug/build.sh b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusionSUPG/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusionSUPG/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion_FieldML/CMakeLists.txt b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion_FieldML/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion_FieldML/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion_FieldML/Fortran/CMakeLists.txt b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion_FieldML/Fortran/CMakeLists.txt new file mode 100644 index 00000000..1079cd81 --- /dev/null +++ b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion_FieldML/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(StaticAdvectionDiffusion_FieldML src/StaticAdvectionDiffusion_FieldMLExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(StaticAdvectionDiffusion_FieldML PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(StaticAdvectionDiffusion_FieldML PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_StaticAdvectionDiffusion_FieldML COMMAND StaticAdvectionDiffusion_FieldML) +add_opencmiss_environment(test_StaticAdvectionDiffusion_FieldML) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion_FieldML/src/StaticAdvectionDiffusion_FieldMLExample.f90 b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion_FieldML/Fortran/src/StaticAdvectionDiffusion_FieldMLExample.f90 similarity index 100% rename from ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion_FieldML/src/StaticAdvectionDiffusion_FieldMLExample.f90 rename to ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion_FieldML/Fortran/src/StaticAdvectionDiffusion_FieldMLExample.f90 diff --git a/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion_FieldML/OpenCMISS.cmake b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion_FieldML/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion_FieldML/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion_FieldML/build_debug/build.sh b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion_FieldML/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/AdvectionDiffusion/StaticAdvectionDiffusion_FieldML/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Diffusion/Analytic1DDiffusion/CMakeLists.txt b/ClassicalField/Diffusion/Analytic1DDiffusion/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Diffusion/Analytic1DDiffusion/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Diffusion/Analytic1DDiffusion/Fortran/CMakeLists.txt b/ClassicalField/Diffusion/Analytic1DDiffusion/Fortran/CMakeLists.txt new file mode 100644 index 00000000..c25b7b0e --- /dev/null +++ b/ClassicalField/Diffusion/Analytic1DDiffusion/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Analytic1DDiffusion src/Analytic1DDiffusionExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Analytic1DDiffusion PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Analytic1DDiffusion PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Analytic1DDiffusion COMMAND Analytic1DDiffusion) +add_opencmiss_environment(test_Analytic1DDiffusion) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Diffusion/Analytic1DDiffusion/src/Analytic1DDiffusionExample.f90 b/ClassicalField/Diffusion/Analytic1DDiffusion/Fortran/src/Analytic1DDiffusionExample.f90 similarity index 100% rename from ClassicalField/Diffusion/Analytic1DDiffusion/src/Analytic1DDiffusionExample.f90 rename to ClassicalField/Diffusion/Analytic1DDiffusion/Fortran/src/Analytic1DDiffusionExample.f90 diff --git a/ClassicalField/Diffusion/Analytic1DDiffusion/OpenCMISS.cmake b/ClassicalField/Diffusion/Analytic1DDiffusion/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Diffusion/Analytic1DDiffusion/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Diffusion/Analytic1DDiffusion/build_debug/build.sh b/ClassicalField/Diffusion/Analytic1DDiffusion/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Diffusion/Analytic1DDiffusion/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Diffusion/CubicConvergenceTest/CMakeLists.txt b/ClassicalField/Diffusion/CubicConvergenceTest/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Diffusion/CubicConvergenceTest/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Diffusion/CubicConvergenceTest/Fortran/CMakeLists.txt b/ClassicalField/Diffusion/CubicConvergenceTest/Fortran/CMakeLists.txt new file mode 100644 index 00000000..f3ed6db8 --- /dev/null +++ b/ClassicalField/Diffusion/CubicConvergenceTest/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(CubicConvergenceTest src/CubicConvergenceTestExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(CubicConvergenceTest PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(CubicConvergenceTest PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_CubicConvergenceTest COMMAND CubicConvergenceTest) +add_opencmiss_environment(test_CubicConvergenceTest) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Diffusion/CubicConvergenceTest/src/CubicConvergenceTestExample.f90 b/ClassicalField/Diffusion/CubicConvergenceTest/Fortran/src/CubicConvergenceTestExample.f90 similarity index 100% rename from ClassicalField/Diffusion/CubicConvergenceTest/src/CubicConvergenceTestExample.f90 rename to ClassicalField/Diffusion/CubicConvergenceTest/Fortran/src/CubicConvergenceTestExample.f90 diff --git a/ClassicalField/Diffusion/CubicConvergenceTest/OpenCMISS.cmake b/ClassicalField/Diffusion/CubicConvergenceTest/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Diffusion/CubicConvergenceTest/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Diffusion/CubicConvergenceTest/build_debug/build.sh b/ClassicalField/Diffusion/CubicConvergenceTest/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Diffusion/CubicConvergenceTest/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Diffusion/Diffusion/CMakeLists.txt b/ClassicalField/Diffusion/Diffusion/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Diffusion/Diffusion/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Diffusion/Diffusion/Fortran/CMakeLists.txt b/ClassicalField/Diffusion/Diffusion/Fortran/CMakeLists.txt new file mode 100644 index 00000000..df74638a --- /dev/null +++ b/ClassicalField/Diffusion/Diffusion/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Diffusion src/DiffusionExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Diffusion PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Diffusion PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Diffusion COMMAND Diffusion) +add_opencmiss_environment(test_Diffusion) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Diffusion/Diffusion/src/DiffusionExample.f90 b/ClassicalField/Diffusion/Diffusion/Fortran/src/DiffusionExample.f90 similarity index 100% rename from ClassicalField/Diffusion/Diffusion/src/DiffusionExample.f90 rename to ClassicalField/Diffusion/Diffusion/Fortran/src/DiffusionExample.f90 diff --git a/ClassicalField/Diffusion/Diffusion/OpenCMISS.cmake b/ClassicalField/Diffusion/Diffusion/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Diffusion/Diffusion/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Diffusion/Diffusion/build_debug/build.sh b/ClassicalField/Diffusion/Diffusion/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Diffusion/Diffusion/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Diffusion/DiffusionConstantSource/CMakeLists.txt b/ClassicalField/Diffusion/DiffusionConstantSource/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Diffusion/DiffusionConstantSource/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Diffusion/DiffusionConstantSource/Fortran/CMakeLists.txt b/ClassicalField/Diffusion/DiffusionConstantSource/Fortran/CMakeLists.txt new file mode 100644 index 00000000..90d28956 --- /dev/null +++ b/ClassicalField/Diffusion/DiffusionConstantSource/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(DiffusionConstantSource src/DiffusionConstantSourceExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(DiffusionConstantSource PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(DiffusionConstantSource PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_DiffusionConstantSource COMMAND DiffusionConstantSource) +add_opencmiss_environment(test_DiffusionConstantSource) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Diffusion/DiffusionConstantSource/src/DiffusionConstantSourceExample.f90 b/ClassicalField/Diffusion/DiffusionConstantSource/Fortran/src/DiffusionConstantSourceExample.f90 similarity index 100% rename from ClassicalField/Diffusion/DiffusionConstantSource/src/DiffusionConstantSourceExample.f90 rename to ClassicalField/Diffusion/DiffusionConstantSource/Fortran/src/DiffusionConstantSourceExample.f90 diff --git a/ClassicalField/Diffusion/DiffusionConstantSource/OpenCMISS.cmake b/ClassicalField/Diffusion/DiffusionConstantSource/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Diffusion/DiffusionConstantSource/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Diffusion/DiffusionConstantSource/build_debug/build.sh b/ClassicalField/Diffusion/DiffusionConstantSource/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Diffusion/DiffusionConstantSource/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Diffusion/DiffusionExponentialSource/CMakeLists.txt b/ClassicalField/Diffusion/DiffusionExponentialSource/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Diffusion/DiffusionExponentialSource/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Diffusion/DiffusionExponentialSource/Fortran/CMakeLists.txt b/ClassicalField/Diffusion/DiffusionExponentialSource/Fortran/CMakeLists.txt new file mode 100644 index 00000000..4bc39499 --- /dev/null +++ b/ClassicalField/Diffusion/DiffusionExponentialSource/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(DiffusionExponentialSource src/DiffusionExponentialSourceExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(DiffusionExponentialSource PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(DiffusionExponentialSource PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_DiffusionExponentialSource COMMAND DiffusionExponentialSource) +add_opencmiss_environment(test_DiffusionExponentialSource) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Diffusion/DiffusionExponentialSource/src/DiffusionExponentialSourceExample.f90 b/ClassicalField/Diffusion/DiffusionExponentialSource/Fortran/src/DiffusionExponentialSourceExample.f90 similarity index 100% rename from ClassicalField/Diffusion/DiffusionExponentialSource/src/DiffusionExponentialSourceExample.f90 rename to ClassicalField/Diffusion/DiffusionExponentialSource/Fortran/src/DiffusionExponentialSourceExample.f90 diff --git a/ClassicalField/Diffusion/DiffusionExponentialSource/OpenCMISS.cmake b/ClassicalField/Diffusion/DiffusionExponentialSource/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Diffusion/DiffusionExponentialSource/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Diffusion/DiffusionExponentialSource/build_debug/build.sh b/ClassicalField/Diffusion/DiffusionExponentialSource/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Diffusion/DiffusionExponentialSource/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Diffusion/DiffusionIO_ALE/CMakeLists.txt b/ClassicalField/Diffusion/DiffusionIO_ALE/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Diffusion/DiffusionIO_ALE/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Diffusion/DiffusionIO_ALE/Fortran/CMakeLists.txt b/ClassicalField/Diffusion/DiffusionIO_ALE/Fortran/CMakeLists.txt new file mode 100644 index 00000000..0c2691d0 --- /dev/null +++ b/ClassicalField/Diffusion/DiffusionIO_ALE/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(DiffusionIO_ALE src/DiffusionIO_ALEExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(DiffusionIO_ALE PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(DiffusionIO_ALE PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_DiffusionIO_ALE COMMAND DiffusionIO_ALE) +add_opencmiss_environment(test_DiffusionIO_ALE) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Diffusion/DiffusionIO_ALE/src/DiffusionIO_ALEExample.f90 b/ClassicalField/Diffusion/DiffusionIO_ALE/Fortran/src/DiffusionIO_ALEExample.f90 similarity index 100% rename from ClassicalField/Diffusion/DiffusionIO_ALE/src/DiffusionIO_ALEExample.f90 rename to ClassicalField/Diffusion/DiffusionIO_ALE/Fortran/src/DiffusionIO_ALEExample.f90 diff --git a/ClassicalField/Diffusion/DiffusionIO_ALE/OpenCMISS.cmake b/ClassicalField/Diffusion/DiffusionIO_ALE/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Diffusion/DiffusionIO_ALE/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Diffusion/DiffusionIO_ALE/build_debug/build.sh b/ClassicalField/Diffusion/DiffusionIO_ALE/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Diffusion/DiffusionIO_ALE/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Diffusion/DiffusionLinearSource/CMakeLists.txt b/ClassicalField/Diffusion/DiffusionLinearSource/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Diffusion/DiffusionLinearSource/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Diffusion/DiffusionLinearSource/Fortran/CMakeLists.txt b/ClassicalField/Diffusion/DiffusionLinearSource/Fortran/CMakeLists.txt new file mode 100644 index 00000000..4f07318d --- /dev/null +++ b/ClassicalField/Diffusion/DiffusionLinearSource/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(DiffusionLinearSource src/DiffusionLinearSourceExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(DiffusionLinearSource PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(DiffusionLinearSource PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_DiffusionLinearSource COMMAND DiffusionLinearSource) +add_opencmiss_environment(test_DiffusionLinearSource) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Diffusion/DiffusionLinearSource/src/DiffusionLinearSourceExample.f90 b/ClassicalField/Diffusion/DiffusionLinearSource/Fortran/src/DiffusionLinearSourceExample.f90 similarity index 100% rename from ClassicalField/Diffusion/DiffusionLinearSource/src/DiffusionLinearSourceExample.f90 rename to ClassicalField/Diffusion/DiffusionLinearSource/Fortran/src/DiffusionLinearSourceExample.f90 diff --git a/ClassicalField/Diffusion/DiffusionLinearSource/OpenCMISS.cmake b/ClassicalField/Diffusion/DiffusionLinearSource/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Diffusion/DiffusionLinearSource/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Diffusion/DiffusionLinearSource/build_debug/build.sh b/ClassicalField/Diffusion/DiffusionLinearSource/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Diffusion/DiffusionLinearSource/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Diffusion/DiffusionQuadraticSource/CMakeLists.txt b/ClassicalField/Diffusion/DiffusionQuadraticSource/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Diffusion/DiffusionQuadraticSource/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Diffusion/DiffusionQuadraticSource/Fortran/CMakeLists.txt b/ClassicalField/Diffusion/DiffusionQuadraticSource/Fortran/CMakeLists.txt new file mode 100644 index 00000000..47b09a3b --- /dev/null +++ b/ClassicalField/Diffusion/DiffusionQuadraticSource/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(DiffusionQuadraticSource src/DiffusionQuadraticSourceExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(DiffusionQuadraticSource PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(DiffusionQuadraticSource PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_DiffusionQuadraticSource COMMAND DiffusionQuadraticSource) +add_opencmiss_environment(test_DiffusionQuadraticSource) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Diffusion/DiffusionQuadraticSource/src/DiffusionQuadraticSourceExample.f90 b/ClassicalField/Diffusion/DiffusionQuadraticSource/Fortran/src/DiffusionQuadraticSourceExample.f90 similarity index 100% rename from ClassicalField/Diffusion/DiffusionQuadraticSource/src/DiffusionQuadraticSourceExample.f90 rename to ClassicalField/Diffusion/DiffusionQuadraticSource/Fortran/src/DiffusionQuadraticSourceExample.f90 diff --git a/ClassicalField/Diffusion/DiffusionQuadraticSource/OpenCMISS.cmake b/ClassicalField/Diffusion/DiffusionQuadraticSource/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Diffusion/DiffusionQuadraticSource/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Diffusion/DiffusionQuadraticSource/build_debug/build.sh b/ClassicalField/Diffusion/DiffusionQuadraticSource/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Diffusion/DiffusionQuadraticSource/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Diffusion/LinearConvergenceTest/CMakeLists.txt b/ClassicalField/Diffusion/LinearConvergenceTest/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Diffusion/LinearConvergenceTest/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Diffusion/LinearConvergenceTest/Fortran/CMakeLists.txt b/ClassicalField/Diffusion/LinearConvergenceTest/Fortran/CMakeLists.txt new file mode 100644 index 00000000..0c32f271 --- /dev/null +++ b/ClassicalField/Diffusion/LinearConvergenceTest/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(LinearConvergenceTest src/LinearConvergenceTestExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(LinearConvergenceTest PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(LinearConvergenceTest PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_LinearConvergenceTest COMMAND LinearConvergenceTest) +add_opencmiss_environment(test_LinearConvergenceTest) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Diffusion/LinearConvergenceTest/src/LinearConvergenceTestExample.f90 b/ClassicalField/Diffusion/LinearConvergenceTest/Fortran/src/LinearConvergenceTestExample.f90 similarity index 100% rename from ClassicalField/Diffusion/LinearConvergenceTest/src/LinearConvergenceTestExample.f90 rename to ClassicalField/Diffusion/LinearConvergenceTest/Fortran/src/LinearConvergenceTestExample.f90 diff --git a/ClassicalField/Diffusion/LinearConvergenceTest/OpenCMISS.cmake b/ClassicalField/Diffusion/LinearConvergenceTest/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Diffusion/LinearConvergenceTest/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Diffusion/LinearConvergenceTest/build_debug/build.sh b/ClassicalField/Diffusion/LinearConvergenceTest/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Diffusion/LinearConvergenceTest/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Diffusion/QuadraticConvergenceTest/CMakeLists.txt b/ClassicalField/Diffusion/QuadraticConvergenceTest/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Diffusion/QuadraticConvergenceTest/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Diffusion/QuadraticConvergenceTest/Fortran/CMakeLists.txt b/ClassicalField/Diffusion/QuadraticConvergenceTest/Fortran/CMakeLists.txt new file mode 100644 index 00000000..0b008dd7 --- /dev/null +++ b/ClassicalField/Diffusion/QuadraticConvergenceTest/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(QuadraticConvergenceTest src/QuadraticConvergenceTestExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(QuadraticConvergenceTest PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(QuadraticConvergenceTest PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_QuadraticConvergenceTest COMMAND QuadraticConvergenceTest) +add_opencmiss_environment(test_QuadraticConvergenceTest) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Diffusion/QuadraticConvergenceTest/src/QuadraticConvergenceTestExample.f90 b/ClassicalField/Diffusion/QuadraticConvergenceTest/Fortran/src/QuadraticConvergenceTestExample.f90 similarity index 100% rename from ClassicalField/Diffusion/QuadraticConvergenceTest/src/QuadraticConvergenceTestExample.f90 rename to ClassicalField/Diffusion/QuadraticConvergenceTest/Fortran/src/QuadraticConvergenceTestExample.f90 diff --git a/ClassicalField/Diffusion/QuadraticConvergenceTest/OpenCMISS.cmake b/ClassicalField/Diffusion/QuadraticConvergenceTest/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Diffusion/QuadraticConvergenceTest/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Diffusion/QuadraticConvergenceTest/build_debug/build.sh b/ClassicalField/Diffusion/QuadraticConvergenceTest/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Diffusion/QuadraticConvergenceTest/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Hamilton_Jacobi/GeodesicEx1/CMakeLists.txt b/ClassicalField/Hamilton_Jacobi/GeodesicEx1/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Hamilton_Jacobi/GeodesicEx1/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Hamilton_Jacobi/GeodesicEx1/Fortran/CMakeLists.txt b/ClassicalField/Hamilton_Jacobi/GeodesicEx1/Fortran/CMakeLists.txt new file mode 100644 index 00000000..a1d587e4 --- /dev/null +++ b/ClassicalField/Hamilton_Jacobi/GeodesicEx1/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(GeodesicEx1 src/GeodesicEx1.ele src/GeodesicEx1Example.f90 src/GeodesicEx1.node) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(GeodesicEx1 PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(GeodesicEx1 PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_GeodesicEx1 COMMAND GeodesicEx1) +add_opencmiss_environment(test_GeodesicEx1) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Hamilton_Jacobi/GeodesicEx1/src/GeodesicEx1.ele b/ClassicalField/Hamilton_Jacobi/GeodesicEx1/Fortran/src/GeodesicEx1.ele similarity index 100% rename from ClassicalField/Hamilton_Jacobi/GeodesicEx1/src/GeodesicEx1.ele rename to ClassicalField/Hamilton_Jacobi/GeodesicEx1/Fortran/src/GeodesicEx1.ele diff --git a/ClassicalField/Hamilton_Jacobi/GeodesicEx1/src/GeodesicEx1.node b/ClassicalField/Hamilton_Jacobi/GeodesicEx1/Fortran/src/GeodesicEx1.node similarity index 100% rename from ClassicalField/Hamilton_Jacobi/GeodesicEx1/src/GeodesicEx1.node rename to ClassicalField/Hamilton_Jacobi/GeodesicEx1/Fortran/src/GeodesicEx1.node diff --git a/ClassicalField/Hamilton_Jacobi/GeodesicEx1/src/GeodesicEx1Example.f90 b/ClassicalField/Hamilton_Jacobi/GeodesicEx1/Fortran/src/GeodesicEx1Example.f90 similarity index 100% rename from ClassicalField/Hamilton_Jacobi/GeodesicEx1/src/GeodesicEx1Example.f90 rename to ClassicalField/Hamilton_Jacobi/GeodesicEx1/Fortran/src/GeodesicEx1Example.f90 diff --git a/ClassicalField/Hamilton_Jacobi/GeodesicEx1/OpenCMISS.cmake b/ClassicalField/Hamilton_Jacobi/GeodesicEx1/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Hamilton_Jacobi/GeodesicEx1/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Hamilton_Jacobi/GeodesicEx1/build_debug/build.sh b/ClassicalField/Hamilton_Jacobi/GeodesicEx1/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Hamilton_Jacobi/GeodesicEx1/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Hamilton_Jacobi/TwoElmnTet/CMakeLists.txt b/ClassicalField/Hamilton_Jacobi/TwoElmnTet/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Hamilton_Jacobi/TwoElmnTet/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Hamilton_Jacobi/TwoElmnTet/Fortran/CMakeLists.txt b/ClassicalField/Hamilton_Jacobi/TwoElmnTet/Fortran/CMakeLists.txt new file mode 100644 index 00000000..7e15ee00 --- /dev/null +++ b/ClassicalField/Hamilton_Jacobi/TwoElmnTet/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(TwoElmnTet src/TwoElmnTet.estm src/TwoElmnTet.cond src/TwoElmnTet.node src/TwoElmnTet.ele src/TwoElmnTetExample.f90 src/TwoElmnTet.fiber) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(TwoElmnTet PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(TwoElmnTet PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_TwoElmnTet COMMAND TwoElmnTet) +add_opencmiss_environment(test_TwoElmnTet) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Hamilton_Jacobi/TwoElmnTet/src/TwoElmnTet.cond b/ClassicalField/Hamilton_Jacobi/TwoElmnTet/Fortran/src/TwoElmnTet.cond similarity index 100% rename from ClassicalField/Hamilton_Jacobi/TwoElmnTet/src/TwoElmnTet.cond rename to ClassicalField/Hamilton_Jacobi/TwoElmnTet/Fortran/src/TwoElmnTet.cond diff --git a/ClassicalField/Hamilton_Jacobi/TwoElmnTet/src/TwoElmnTet.ele b/ClassicalField/Hamilton_Jacobi/TwoElmnTet/Fortran/src/TwoElmnTet.ele similarity index 100% rename from ClassicalField/Hamilton_Jacobi/TwoElmnTet/src/TwoElmnTet.ele rename to ClassicalField/Hamilton_Jacobi/TwoElmnTet/Fortran/src/TwoElmnTet.ele diff --git a/ClassicalField/Hamilton_Jacobi/TwoElmnTet/src/TwoElmnTet.estm b/ClassicalField/Hamilton_Jacobi/TwoElmnTet/Fortran/src/TwoElmnTet.estm similarity index 100% rename from ClassicalField/Hamilton_Jacobi/TwoElmnTet/src/TwoElmnTet.estm rename to ClassicalField/Hamilton_Jacobi/TwoElmnTet/Fortran/src/TwoElmnTet.estm diff --git a/ClassicalField/Hamilton_Jacobi/TwoElmnTet/src/TwoElmnTet.fiber b/ClassicalField/Hamilton_Jacobi/TwoElmnTet/Fortran/src/TwoElmnTet.fiber similarity index 100% rename from ClassicalField/Hamilton_Jacobi/TwoElmnTet/src/TwoElmnTet.fiber rename to ClassicalField/Hamilton_Jacobi/TwoElmnTet/Fortran/src/TwoElmnTet.fiber diff --git a/ClassicalField/Hamilton_Jacobi/TwoElmnTet/src/TwoElmnTet.node b/ClassicalField/Hamilton_Jacobi/TwoElmnTet/Fortran/src/TwoElmnTet.node similarity index 100% rename from ClassicalField/Hamilton_Jacobi/TwoElmnTet/src/TwoElmnTet.node rename to ClassicalField/Hamilton_Jacobi/TwoElmnTet/Fortran/src/TwoElmnTet.node diff --git a/ClassicalField/Hamilton_Jacobi/TwoElmnTet/src/TwoElmnTetExample.f90 b/ClassicalField/Hamilton_Jacobi/TwoElmnTet/Fortran/src/TwoElmnTetExample.f90 similarity index 100% rename from ClassicalField/Hamilton_Jacobi/TwoElmnTet/src/TwoElmnTetExample.f90 rename to ClassicalField/Hamilton_Jacobi/TwoElmnTet/Fortran/src/TwoElmnTetExample.f90 diff --git a/ClassicalField/Hamilton_Jacobi/TwoElmnTet/OpenCMISS.cmake b/ClassicalField/Hamilton_Jacobi/TwoElmnTet/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Hamilton_Jacobi/TwoElmnTet/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Hamilton_Jacobi/TwoElmnTet/build_debug/build.sh b/ClassicalField/Hamilton_Jacobi/TwoElmnTet/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Hamilton_Jacobi/TwoElmnTet/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Helmholtz/AnalyticHelmholtz/CMakeLists.txt b/ClassicalField/Helmholtz/AnalyticHelmholtz/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Helmholtz/AnalyticHelmholtz/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Helmholtz/AnalyticHelmholtz/Fortran/CMakeLists.txt b/ClassicalField/Helmholtz/AnalyticHelmholtz/Fortran/CMakeLists.txt new file mode 100644 index 00000000..f9a7c650 --- /dev/null +++ b/ClassicalField/Helmholtz/AnalyticHelmholtz/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(AnalyticHelmholtz src/AnalyticHelmholtzExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(AnalyticHelmholtz PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(AnalyticHelmholtz PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_AnalyticHelmholtz COMMAND AnalyticHelmholtz) +add_opencmiss_environment(test_AnalyticHelmholtz) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Helmholtz/AnalyticHelmholtz/src/AnalyticHelmholtzExample.f90 b/ClassicalField/Helmholtz/AnalyticHelmholtz/Fortran/src/AnalyticHelmholtzExample.f90 similarity index 100% rename from ClassicalField/Helmholtz/AnalyticHelmholtz/src/AnalyticHelmholtzExample.f90 rename to ClassicalField/Helmholtz/AnalyticHelmholtz/Fortran/src/AnalyticHelmholtzExample.f90 diff --git a/ClassicalField/Helmholtz/AnalyticHelmholtz/OpenCMISS.cmake b/ClassicalField/Helmholtz/AnalyticHelmholtz/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Helmholtz/AnalyticHelmholtz/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Helmholtz/AnalyticHelmholtz/build_debug/build.sh b/ClassicalField/Helmholtz/AnalyticHelmholtz/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Helmholtz/AnalyticHelmholtz/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Helmholtz/Helmholtz/CMakeLists.txt b/ClassicalField/Helmholtz/Helmholtz/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Helmholtz/Helmholtz/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Helmholtz/Helmholtz/Fortran/CMakeLists.txt b/ClassicalField/Helmholtz/Helmholtz/Fortran/CMakeLists.txt new file mode 100644 index 00000000..bd9cb32a --- /dev/null +++ b/ClassicalField/Helmholtz/Helmholtz/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Helmholtz src/HelmholtzExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Helmholtz PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Helmholtz PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Helmholtz COMMAND Helmholtz) +add_opencmiss_environment(test_Helmholtz) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Helmholtz/Helmholtz/src/HelmholtzExample.f90 b/ClassicalField/Helmholtz/Helmholtz/Fortran/src/HelmholtzExample.f90 similarity index 100% rename from ClassicalField/Helmholtz/Helmholtz/src/HelmholtzExample.f90 rename to ClassicalField/Helmholtz/Helmholtz/Fortran/src/HelmholtzExample.f90 diff --git a/ClassicalField/Helmholtz/Helmholtz/OpenCMISS.cmake b/ClassicalField/Helmholtz/Helmholtz/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Helmholtz/Helmholtz/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Helmholtz/Helmholtz/build_debug/build.sh b/ClassicalField/Helmholtz/Helmholtz/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Helmholtz/Helmholtz/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Laplace/42Master/CMakeLists.txt b/ClassicalField/Laplace/42Master/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Laplace/42Master/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Laplace/42Master/Fortran/CMakeLists.txt b/ClassicalField/Laplace/42Master/Fortran/CMakeLists.txt new file mode 100644 index 00000000..20e09803 --- /dev/null +++ b/ClassicalField/Laplace/42Master/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(42Master src/42MasterExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(42Master PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(42Master PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_42Master COMMAND 42Master) +add_opencmiss_environment(test_42Master) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Laplace/42Master/src/42MasterExample.f90 b/ClassicalField/Laplace/42Master/Fortran/src/42MasterExample.f90 similarity index 100% rename from ClassicalField/Laplace/42Master/src/42MasterExample.f90 rename to ClassicalField/Laplace/42Master/Fortran/src/42MasterExample.f90 diff --git a/ClassicalField/Laplace/42Master/OpenCMISS.cmake b/ClassicalField/Laplace/42Master/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Laplace/42Master/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Laplace/42Master/build_debug/build.sh b/ClassicalField/Laplace/42Master/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Laplace/42Master/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Laplace/AnalyticLaplace/CMakeLists.txt b/ClassicalField/Laplace/AnalyticLaplace/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Laplace/AnalyticLaplace/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Laplace/AnalyticLaplace/Fortran/CMakeLists.txt b/ClassicalField/Laplace/AnalyticLaplace/Fortran/CMakeLists.txt new file mode 100644 index 00000000..637d0827 --- /dev/null +++ b/ClassicalField/Laplace/AnalyticLaplace/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(AnalyticLaplace src/AnalyticLaplaceExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(AnalyticLaplace PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(AnalyticLaplace PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_AnalyticLaplace COMMAND AnalyticLaplace) +add_opencmiss_environment(test_AnalyticLaplace) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Laplace/AnalyticLaplace/src/AnalyticLaplaceExample.f90 b/ClassicalField/Laplace/AnalyticLaplace/Fortran/src/AnalyticLaplaceExample.f90 similarity index 100% rename from ClassicalField/Laplace/AnalyticLaplace/src/AnalyticLaplaceExample.f90 rename to ClassicalField/Laplace/AnalyticLaplace/Fortran/src/AnalyticLaplaceExample.f90 diff --git a/ClassicalField/Laplace/AnalyticLaplace/OpenCMISS.cmake b/ClassicalField/Laplace/AnalyticLaplace/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Laplace/AnalyticLaplace/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Laplace/AnalyticLaplace/build_debug/build.sh b/ClassicalField/Laplace/AnalyticLaplace/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Laplace/AnalyticLaplace/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Laplace/Embedded1DLaplace/CMakeLists.txt b/ClassicalField/Laplace/Embedded1DLaplace/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Laplace/Embedded1DLaplace/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Laplace/Embedded1DLaplace/Fortran/CMakeLists.txt b/ClassicalField/Laplace/Embedded1DLaplace/Fortran/CMakeLists.txt new file mode 100644 index 00000000..3381efd4 --- /dev/null +++ b/ClassicalField/Laplace/Embedded1DLaplace/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Embedded1DLaplace src/Embedded1DLaplaceExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Embedded1DLaplace PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Embedded1DLaplace PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Embedded1DLaplace COMMAND Embedded1DLaplace) +add_opencmiss_environment(test_Embedded1DLaplace) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Laplace/Embedded1DLaplace/src/Embedded1DLaplaceExample.f90 b/ClassicalField/Laplace/Embedded1DLaplace/Fortran/src/Embedded1DLaplaceExample.f90 similarity index 100% rename from ClassicalField/Laplace/Embedded1DLaplace/src/Embedded1DLaplaceExample.f90 rename to ClassicalField/Laplace/Embedded1DLaplace/Fortran/src/Embedded1DLaplaceExample.f90 diff --git a/ClassicalField/Laplace/Embedded1DLaplace/OpenCMISS.cmake b/ClassicalField/Laplace/Embedded1DLaplace/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Laplace/Embedded1DLaplace/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Laplace/Embedded1DLaplace/build_debug/build.sh b/ClassicalField/Laplace/Embedded1DLaplace/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Laplace/Embedded1DLaplace/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Laplace/Embedded2DLaplace/CMakeLists.txt b/ClassicalField/Laplace/Embedded2DLaplace/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Laplace/Embedded2DLaplace/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Laplace/Embedded2DLaplace/Fortran/CMakeLists.txt b/ClassicalField/Laplace/Embedded2DLaplace/Fortran/CMakeLists.txt new file mode 100644 index 00000000..b13fe299 --- /dev/null +++ b/ClassicalField/Laplace/Embedded2DLaplace/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Embedded2DLaplace src/Embedded2DLaplaceExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Embedded2DLaplace PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Embedded2DLaplace PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Embedded2DLaplace COMMAND Embedded2DLaplace) +add_opencmiss_environment(test_Embedded2DLaplace) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Laplace/Embedded2DLaplace/src/Embedded2DLaplaceExample.f90 b/ClassicalField/Laplace/Embedded2DLaplace/Fortran/src/Embedded2DLaplaceExample.f90 similarity index 100% rename from ClassicalField/Laplace/Embedded2DLaplace/src/Embedded2DLaplaceExample.f90 rename to ClassicalField/Laplace/Embedded2DLaplace/Fortran/src/Embedded2DLaplaceExample.f90 diff --git a/ClassicalField/Laplace/Embedded2DLaplace/OpenCMISS.cmake b/ClassicalField/Laplace/Embedded2DLaplace/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Laplace/Embedded2DLaplace/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Laplace/Embedded2DLaplace/build_debug/build.sh b/ClassicalField/Laplace/Embedded2DLaplace/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Laplace/Embedded2DLaplace/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Laplace/GeneralisedLaplace/CMakeLists.txt b/ClassicalField/Laplace/GeneralisedLaplace/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Laplace/GeneralisedLaplace/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Laplace/GeneralisedLaplace/Fortran/CMakeLists.txt b/ClassicalField/Laplace/GeneralisedLaplace/Fortran/CMakeLists.txt new file mode 100644 index 00000000..5ba57d29 --- /dev/null +++ b/ClassicalField/Laplace/GeneralisedLaplace/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(GeneralisedLaplace src/FortranExample.f90 src/FortranExample_2D_testproblem.f90 src/FortranExample_3D_tests.f90 src/FortranExample_3D_testproblem.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(GeneralisedLaplace PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(GeneralisedLaplace PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_GeneralisedLaplace COMMAND GeneralisedLaplace) +add_opencmiss_environment(test_GeneralisedLaplace) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Laplace/GeneralisedLaplace/OpenCMISS.cmake b/ClassicalField/Laplace/GeneralisedLaplace/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Laplace/GeneralisedLaplace/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Laplace/GeneralisedLaplace/build_debug/build.sh b/ClassicalField/Laplace/GeneralisedLaplace/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Laplace/GeneralisedLaplace/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Laplace/Laplace/C/CMakeLists.txt b/ClassicalField/Laplace/Laplace/C/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Laplace/Laplace/C/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Laplace/Laplace/C/Fortran/CMakeLists.txt b/ClassicalField/Laplace/Laplace/C/Fortran/CMakeLists.txt new file mode 100644 index 00000000..e36192d0 --- /dev/null +++ b/ClassicalField/Laplace/Laplace/C/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(C src/CExample.c) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(C PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(C PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_C COMMAND C) +add_opencmiss_environment(test_C) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Laplace/Laplace/C/src/CExample.c b/ClassicalField/Laplace/Laplace/C/Fortran/src/CExample.c similarity index 100% rename from ClassicalField/Laplace/Laplace/C/src/CExample.c rename to ClassicalField/Laplace/Laplace/C/Fortran/src/CExample.c diff --git a/ClassicalField/Laplace/Laplace/C/OpenCMISS.cmake b/ClassicalField/Laplace/Laplace/C/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Laplace/Laplace/C/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Laplace/Laplace/C/build_debug/build.sh b/ClassicalField/Laplace/Laplace/C/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Laplace/Laplace/C/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Laplace/Laplace/CMakeLists.txt b/ClassicalField/Laplace/Laplace/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Laplace/Laplace/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Laplace/Laplace/Fortran/CMakeLists.txt b/ClassicalField/Laplace/Laplace/Fortran/CMakeLists.txt new file mode 100644 index 00000000..cae95104 --- /dev/null +++ b/ClassicalField/Laplace/Laplace/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Laplace src/FortranExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Laplace PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Laplace PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Laplace COMMAND Laplace) +add_opencmiss_environment(test_Laplace) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Laplace/Laplace/OpenCMISS.cmake b/ClassicalField/Laplace/Laplace/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Laplace/Laplace/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Laplace/Laplace/build_debug/build.sh b/ClassicalField/Laplace/Laplace/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Laplace/Laplace/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Laplace/LaplaceEllipsoid/CMakeLists.txt b/ClassicalField/Laplace/LaplaceEllipsoid/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Laplace/LaplaceEllipsoid/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Laplace/LaplaceEllipsoid/Fortran/CMakeLists.txt b/ClassicalField/Laplace/LaplaceEllipsoid/Fortran/CMakeLists.txt new file mode 100644 index 00000000..cc09bf94 --- /dev/null +++ b/ClassicalField/Laplace/LaplaceEllipsoid/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(LaplaceEllipsoid src/LaplaceEllipsoidExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(LaplaceEllipsoid PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(LaplaceEllipsoid PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_LaplaceEllipsoid COMMAND LaplaceEllipsoid) +add_opencmiss_environment(test_LaplaceEllipsoid) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Laplace/LaplaceEllipsoid/src/LaplaceEllipsoidExample.f90 b/ClassicalField/Laplace/LaplaceEllipsoid/Fortran/src/LaplaceEllipsoidExample.f90 similarity index 100% rename from ClassicalField/Laplace/LaplaceEllipsoid/src/LaplaceEllipsoidExample.f90 rename to ClassicalField/Laplace/LaplaceEllipsoid/Fortran/src/LaplaceEllipsoidExample.f90 diff --git a/ClassicalField/Laplace/LaplaceEllipsoid/OpenCMISS.cmake b/ClassicalField/Laplace/LaplaceEllipsoid/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Laplace/LaplaceEllipsoid/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Laplace/LaplaceEllipsoid/build_debug/build.sh b/ClassicalField/Laplace/LaplaceEllipsoid/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Laplace/LaplaceEllipsoid/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Laplace/LaplaceEllipsoid_FieldML/CMakeLists.txt b/ClassicalField/Laplace/LaplaceEllipsoid_FieldML/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Laplace/LaplaceEllipsoid_FieldML/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Laplace/LaplaceEllipsoid_FieldML/Fortran/CMakeLists.txt b/ClassicalField/Laplace/LaplaceEllipsoid_FieldML/Fortran/CMakeLists.txt new file mode 100644 index 00000000..767b1883 --- /dev/null +++ b/ClassicalField/Laplace/LaplaceEllipsoid_FieldML/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(LaplaceEllipsoid_FieldML src/LaplaceEllipsoid_FieldMLExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(LaplaceEllipsoid_FieldML PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(LaplaceEllipsoid_FieldML PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_LaplaceEllipsoid_FieldML COMMAND LaplaceEllipsoid_FieldML) +add_opencmiss_environment(test_LaplaceEllipsoid_FieldML) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Laplace/LaplaceEllipsoid_FieldML/src/LaplaceEllipsoid_FieldMLExample.f90 b/ClassicalField/Laplace/LaplaceEllipsoid_FieldML/Fortran/src/LaplaceEllipsoid_FieldMLExample.f90 similarity index 100% rename from ClassicalField/Laplace/LaplaceEllipsoid_FieldML/src/LaplaceEllipsoid_FieldMLExample.f90 rename to ClassicalField/Laplace/LaplaceEllipsoid_FieldML/Fortran/src/LaplaceEllipsoid_FieldMLExample.f90 diff --git a/ClassicalField/Laplace/LaplaceEllipsoid_FieldML/OpenCMISS.cmake b/ClassicalField/Laplace/LaplaceEllipsoid_FieldML/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Laplace/LaplaceEllipsoid_FieldML/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Laplace/LaplaceEllipsoid_FieldML/build_debug/build.sh b/ClassicalField/Laplace/LaplaceEllipsoid_FieldML/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Laplace/LaplaceEllipsoid_FieldML/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Laplace/NumberLaplace/CMakeLists.txt b/ClassicalField/Laplace/NumberLaplace/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Laplace/NumberLaplace/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Laplace/NumberLaplace/Fortran/CMakeLists.txt b/ClassicalField/Laplace/NumberLaplace/Fortran/CMakeLists.txt new file mode 100644 index 00000000..863f79f4 --- /dev/null +++ b/ClassicalField/Laplace/NumberLaplace/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(NumberLaplace src/NumberLaplaceExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(NumberLaplace PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(NumberLaplace PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_NumberLaplace COMMAND NumberLaplace) +add_opencmiss_environment(test_NumberLaplace) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Laplace/NumberLaplace/src/NumberLaplaceExample.f90 b/ClassicalField/Laplace/NumberLaplace/Fortran/src/NumberLaplaceExample.f90 similarity index 100% rename from ClassicalField/Laplace/NumberLaplace/src/NumberLaplaceExample.f90 rename to ClassicalField/Laplace/NumberLaplace/Fortran/src/NumberLaplaceExample.f90 diff --git a/ClassicalField/Laplace/NumberLaplace/OpenCMISS.cmake b/ClassicalField/Laplace/NumberLaplace/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Laplace/NumberLaplace/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Laplace/NumberLaplace/build_debug/build.sh b/ClassicalField/Laplace/NumberLaplace/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Laplace/NumberLaplace/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Laplace/ParallelLaplace/CMakeLists.txt b/ClassicalField/Laplace/ParallelLaplace/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Laplace/ParallelLaplace/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Laplace/ParallelLaplace/Fortran/CMakeLists.txt b/ClassicalField/Laplace/ParallelLaplace/Fortran/CMakeLists.txt new file mode 100644 index 00000000..5a3faae8 --- /dev/null +++ b/ClassicalField/Laplace/ParallelLaplace/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(ParallelLaplace src/ParallelLaplaceExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(ParallelLaplace PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(ParallelLaplace PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_ParallelLaplace COMMAND ParallelLaplace) +add_opencmiss_environment(test_ParallelLaplace) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Laplace/ParallelLaplace/src/ParallelLaplaceExample.f90 b/ClassicalField/Laplace/ParallelLaplace/Fortran/src/ParallelLaplaceExample.f90 similarity index 100% rename from ClassicalField/Laplace/ParallelLaplace/src/ParallelLaplaceExample.f90 rename to ClassicalField/Laplace/ParallelLaplace/Fortran/src/ParallelLaplaceExample.f90 diff --git a/ClassicalField/Laplace/ParallelLaplace/OpenCMISS.cmake b/ClassicalField/Laplace/ParallelLaplace/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Laplace/ParallelLaplace/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Laplace/ParallelLaplace/build_debug/build.sh b/ClassicalField/Laplace/ParallelLaplace/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Laplace/ParallelLaplace/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Laplace/SimplexLaplace/Linear/CMakeLists.txt b/ClassicalField/Laplace/SimplexLaplace/Linear/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Laplace/SimplexLaplace/Linear/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Laplace/SimplexLaplace/Linear/Fortran/CMakeLists.txt b/ClassicalField/Laplace/SimplexLaplace/Linear/Fortran/CMakeLists.txt new file mode 100644 index 00000000..78e65438 --- /dev/null +++ b/ClassicalField/Laplace/SimplexLaplace/Linear/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Linear src/LinearExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Linear PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Linear PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Linear COMMAND Linear) +add_opencmiss_environment(test_Linear) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Laplace/SimplexLaplace/Linear/src/LinearExample.f90 b/ClassicalField/Laplace/SimplexLaplace/Linear/Fortran/src/LinearExample.f90 similarity index 100% rename from ClassicalField/Laplace/SimplexLaplace/Linear/src/LinearExample.f90 rename to ClassicalField/Laplace/SimplexLaplace/Linear/Fortran/src/LinearExample.f90 diff --git a/ClassicalField/Laplace/SimplexLaplace/Linear/OpenCMISS.cmake b/ClassicalField/Laplace/SimplexLaplace/Linear/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Laplace/SimplexLaplace/Linear/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Laplace/SimplexLaplace/Linear/build_debug/build.sh b/ClassicalField/Laplace/SimplexLaplace/Linear/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Laplace/SimplexLaplace/Linear/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Poisson/42Master/CMakeLists.txt b/ClassicalField/Poisson/42Master/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Poisson/42Master/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Poisson/42Master/Fortran/CMakeLists.txt b/ClassicalField/Poisson/42Master/Fortran/CMakeLists.txt new file mode 100644 index 00000000..20e09803 --- /dev/null +++ b/ClassicalField/Poisson/42Master/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(42Master src/42MasterExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(42Master PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(42Master PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_42Master COMMAND 42Master) +add_opencmiss_environment(test_42Master) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Poisson/42Master/src/42MasterExample.f90 b/ClassicalField/Poisson/42Master/Fortran/src/42MasterExample.f90 similarity index 100% rename from ClassicalField/Poisson/42Master/src/42MasterExample.f90 rename to ClassicalField/Poisson/42Master/Fortran/src/42MasterExample.f90 diff --git a/ClassicalField/Poisson/42Master/OpenCMISS.cmake b/ClassicalField/Poisson/42Master/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Poisson/42Master/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Poisson/42Master/build_debug/build.sh b/ClassicalField/Poisson/42Master/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Poisson/42Master/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Poisson/AnalyticNonlinearPoisson/CMakeLists.txt b/ClassicalField/Poisson/AnalyticNonlinearPoisson/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Poisson/AnalyticNonlinearPoisson/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Poisson/AnalyticNonlinearPoisson/Fortran/CMakeLists.txt b/ClassicalField/Poisson/AnalyticNonlinearPoisson/Fortran/CMakeLists.txt new file mode 100644 index 00000000..276611ec --- /dev/null +++ b/ClassicalField/Poisson/AnalyticNonlinearPoisson/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(AnalyticNonlinearPoisson src/AnalyticNonlinearPoissonExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(AnalyticNonlinearPoisson PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(AnalyticNonlinearPoisson PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_AnalyticNonlinearPoisson COMMAND AnalyticNonlinearPoisson) +add_opencmiss_environment(test_AnalyticNonlinearPoisson) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Poisson/AnalyticNonlinearPoisson/src/AnalyticNonlinearPoissonExample.f90 b/ClassicalField/Poisson/AnalyticNonlinearPoisson/Fortran/src/AnalyticNonlinearPoissonExample.f90 similarity index 100% rename from ClassicalField/Poisson/AnalyticNonlinearPoisson/src/AnalyticNonlinearPoissonExample.f90 rename to ClassicalField/Poisson/AnalyticNonlinearPoisson/Fortran/src/AnalyticNonlinearPoissonExample.f90 diff --git a/ClassicalField/Poisson/AnalyticNonlinearPoisson/OpenCMISS.cmake b/ClassicalField/Poisson/AnalyticNonlinearPoisson/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Poisson/AnalyticNonlinearPoisson/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Poisson/AnalyticNonlinearPoisson/build_debug/build.sh b/ClassicalField/Poisson/AnalyticNonlinearPoisson/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Poisson/AnalyticNonlinearPoisson/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Poisson/ExtracellularBidomain/CMakeLists.txt b/ClassicalField/Poisson/ExtracellularBidomain/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Poisson/ExtracellularBidomain/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Poisson/ExtracellularBidomain/Fortran/CMakeLists.txt b/ClassicalField/Poisson/ExtracellularBidomain/Fortran/CMakeLists.txt new file mode 100644 index 00000000..4838b134 --- /dev/null +++ b/ClassicalField/Poisson/ExtracellularBidomain/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(ExtracellularBidomain src/FortranExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(ExtracellularBidomain PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(ExtracellularBidomain PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_ExtracellularBidomain COMMAND ExtracellularBidomain) +add_opencmiss_environment(test_ExtracellularBidomain) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Poisson/ExtracellularBidomain/OpenCMISS.cmake b/ClassicalField/Poisson/ExtracellularBidomain/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Poisson/ExtracellularBidomain/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Poisson/ExtracellularBidomain/build_debug/build.sh b/ClassicalField/Poisson/ExtracellularBidomain/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Poisson/ExtracellularBidomain/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/Poisson/NonlinearPoisson/CMakeLists.txt b/ClassicalField/Poisson/NonlinearPoisson/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/Poisson/NonlinearPoisson/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/Poisson/NonlinearPoisson/Fortran/CMakeLists.txt b/ClassicalField/Poisson/NonlinearPoisson/Fortran/CMakeLists.txt new file mode 100644 index 00000000..073e8246 --- /dev/null +++ b/ClassicalField/Poisson/NonlinearPoisson/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(NonlinearPoisson src/NonlinearPoissonExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(NonlinearPoisson PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(NonlinearPoisson PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_NonlinearPoisson COMMAND NonlinearPoisson) +add_opencmiss_environment(test_NonlinearPoisson) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/Poisson/NonlinearPoisson/src/NonlinearPoissonExample.f90 b/ClassicalField/Poisson/NonlinearPoisson/Fortran/src/NonlinearPoissonExample.f90 similarity index 100% rename from ClassicalField/Poisson/NonlinearPoisson/src/NonlinearPoissonExample.f90 rename to ClassicalField/Poisson/NonlinearPoisson/Fortran/src/NonlinearPoissonExample.f90 diff --git a/ClassicalField/Poisson/NonlinearPoisson/OpenCMISS.cmake b/ClassicalField/Poisson/NonlinearPoisson/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/Poisson/NonlinearPoisson/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/Poisson/NonlinearPoisson/build_debug/build.sh b/ClassicalField/Poisson/NonlinearPoisson/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/Poisson/NonlinearPoisson/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/ReactionDiffusion/CellMLSplitReactionDiffusion1D/CMakeLists.txt b/ClassicalField/ReactionDiffusion/CellMLSplitReactionDiffusion1D/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/ReactionDiffusion/CellMLSplitReactionDiffusion1D/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/ReactionDiffusion/CellMLSplitReactionDiffusion1D/Fortran/CMakeLists.txt b/ClassicalField/ReactionDiffusion/CellMLSplitReactionDiffusion1D/Fortran/CMakeLists.txt new file mode 100644 index 00000000..6dcc50fc --- /dev/null +++ b/ClassicalField/ReactionDiffusion/CellMLSplitReactionDiffusion1D/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(CellMLSplitReactionDiffusion1D src/CellMLSplitReactionDiffusion1DExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(CellMLSplitReactionDiffusion1D PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(CellMLSplitReactionDiffusion1D PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_CellMLSplitReactionDiffusion1D COMMAND CellMLSplitReactionDiffusion1D) +add_opencmiss_environment(test_CellMLSplitReactionDiffusion1D) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/ReactionDiffusion/CellMLSplitReactionDiffusion1D/src/CellMLSplitReactionDiffusion1DExample.f90 b/ClassicalField/ReactionDiffusion/CellMLSplitReactionDiffusion1D/Fortran/src/CellMLSplitReactionDiffusion1DExample.f90 similarity index 100% rename from ClassicalField/ReactionDiffusion/CellMLSplitReactionDiffusion1D/src/CellMLSplitReactionDiffusion1DExample.f90 rename to ClassicalField/ReactionDiffusion/CellMLSplitReactionDiffusion1D/Fortran/src/CellMLSplitReactionDiffusion1DExample.f90 diff --git a/ClassicalField/ReactionDiffusion/CellMLSplitReactionDiffusion1D/OpenCMISS.cmake b/ClassicalField/ReactionDiffusion/CellMLSplitReactionDiffusion1D/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/ReactionDiffusion/CellMLSplitReactionDiffusion1D/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/ReactionDiffusion/CellMLSplitReactionDiffusion1D/build_debug/build.sh b/ClassicalField/ReactionDiffusion/CellMLSplitReactionDiffusion1D/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/ReactionDiffusion/CellMLSplitReactionDiffusion1D/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/ReactionDiffusion/ReactionDiffusionConstantSource1D/CMakeLists.txt b/ClassicalField/ReactionDiffusion/ReactionDiffusionConstantSource1D/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/ReactionDiffusion/ReactionDiffusionConstantSource1D/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/ReactionDiffusion/ReactionDiffusionConstantSource1D/Fortran/CMakeLists.txt b/ClassicalField/ReactionDiffusion/ReactionDiffusionConstantSource1D/Fortran/CMakeLists.txt new file mode 100644 index 00000000..ec4023e0 --- /dev/null +++ b/ClassicalField/ReactionDiffusion/ReactionDiffusionConstantSource1D/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(ReactionDiffusionConstantSource1D src/ReactionDiffusionConstantSource1DExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(ReactionDiffusionConstantSource1D PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(ReactionDiffusionConstantSource1D PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_ReactionDiffusionConstantSource1D COMMAND ReactionDiffusionConstantSource1D) +add_opencmiss_environment(test_ReactionDiffusionConstantSource1D) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/ReactionDiffusion/ReactionDiffusionConstantSource1D/src/ReactionDiffusionConstantSource1DExample.f90 b/ClassicalField/ReactionDiffusion/ReactionDiffusionConstantSource1D/Fortran/src/ReactionDiffusionConstantSource1DExample.f90 similarity index 100% rename from ClassicalField/ReactionDiffusion/ReactionDiffusionConstantSource1D/src/ReactionDiffusionConstantSource1DExample.f90 rename to ClassicalField/ReactionDiffusion/ReactionDiffusionConstantSource1D/Fortran/src/ReactionDiffusionConstantSource1DExample.f90 diff --git a/ClassicalField/ReactionDiffusion/ReactionDiffusionConstantSource1D/OpenCMISS.cmake b/ClassicalField/ReactionDiffusion/ReactionDiffusionConstantSource1D/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/ReactionDiffusion/ReactionDiffusionConstantSource1D/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/ReactionDiffusion/ReactionDiffusionConstantSource1D/build_debug/build.sh b/ClassicalField/ReactionDiffusion/ReactionDiffusionConstantSource1D/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/ReactionDiffusion/ReactionDiffusionConstantSource1D/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/ClassicalField/ReactionDiffusion/ReactionDiffusionNoSource1D/CMakeLists.txt b/ClassicalField/ReactionDiffusion/ReactionDiffusionNoSource1D/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/ClassicalField/ReactionDiffusion/ReactionDiffusionNoSource1D/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/ClassicalField/ReactionDiffusion/ReactionDiffusionNoSource1D/Fortran/CMakeLists.txt b/ClassicalField/ReactionDiffusion/ReactionDiffusionNoSource1D/Fortran/CMakeLists.txt new file mode 100644 index 00000000..e04a3c1b --- /dev/null +++ b/ClassicalField/ReactionDiffusion/ReactionDiffusionNoSource1D/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(ReactionDiffusionNoSource1D src/ReactionDiffusionNoSource1DExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(ReactionDiffusionNoSource1D PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(ReactionDiffusionNoSource1D PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_ReactionDiffusionNoSource1D COMMAND ReactionDiffusionNoSource1D) +add_opencmiss_environment(test_ReactionDiffusionNoSource1D) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/ClassicalField/ReactionDiffusion/ReactionDiffusionNoSource1D/src/ReactionDiffusionNoSource1DExample.f90 b/ClassicalField/ReactionDiffusion/ReactionDiffusionNoSource1D/Fortran/src/ReactionDiffusionNoSource1DExample.f90 similarity index 100% rename from ClassicalField/ReactionDiffusion/ReactionDiffusionNoSource1D/src/ReactionDiffusionNoSource1DExample.f90 rename to ClassicalField/ReactionDiffusion/ReactionDiffusionNoSource1D/Fortran/src/ReactionDiffusionNoSource1DExample.f90 diff --git a/ClassicalField/ReactionDiffusion/ReactionDiffusionNoSource1D/OpenCMISS.cmake b/ClassicalField/ReactionDiffusion/ReactionDiffusionNoSource1D/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/ClassicalField/ReactionDiffusion/ReactionDiffusionNoSource1D/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/ClassicalField/ReactionDiffusion/ReactionDiffusionNoSource1D/build_debug/build.sh b/ClassicalField/ReactionDiffusion/ReactionDiffusionNoSource1D/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/ClassicalField/ReactionDiffusion/ReactionDiffusionNoSource1D/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/DataAssimilation/DataAssimilationConstantSystem/CMakeLists.txt b/DataAssimilation/DataAssimilationConstantSystem/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/DataAssimilation/DataAssimilationConstantSystem/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/DataAssimilation/DataAssimilationConstantSystem/Fortran/CMakeLists.txt b/DataAssimilation/DataAssimilationConstantSystem/Fortran/CMakeLists.txt new file mode 100644 index 00000000..a9bdfada --- /dev/null +++ b/DataAssimilation/DataAssimilationConstantSystem/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(DataAssimilationConstantSystem src/data_assimilation_test01.cpp) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(DataAssimilationConstantSystem PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(DataAssimilationConstantSystem PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_DataAssimilationConstantSystem COMMAND DataAssimilationConstantSystem) +add_opencmiss_environment(test_DataAssimilationConstantSystem) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/DataAssimilation/DataAssimilationConstantSystem/src/data_assimilation_test01.cpp b/DataAssimilation/DataAssimilationConstantSystem/Fortran/src/data_assimilation_test01.cpp similarity index 100% rename from DataAssimilation/DataAssimilationConstantSystem/src/data_assimilation_test01.cpp rename to DataAssimilation/DataAssimilationConstantSystem/Fortran/src/data_assimilation_test01.cpp diff --git a/DataAssimilation/DataAssimilationConstantSystem/OpenCMISS.cmake b/DataAssimilation/DataAssimilationConstantSystem/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/DataAssimilation/DataAssimilationConstantSystem/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/DataAssimilation/DataAssimilationConstantSystem/build_debug/build.sh b/DataAssimilation/DataAssimilationConstantSystem/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/DataAssimilation/DataAssimilationConstantSystem/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/DataAssimilation/DataAssimilationInflationGuccione/CMakeLists.txt b/DataAssimilation/DataAssimilationInflationGuccione/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/DataAssimilation/DataAssimilationInflationGuccione/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/DataAssimilation/DataAssimilationInflationGuccione/Fortran/CMakeLists.txt b/DataAssimilation/DataAssimilationInflationGuccione/Fortran/CMakeLists.txt new file mode 100644 index 00000000..5d85bb95 --- /dev/null +++ b/DataAssimilation/DataAssimilationInflationGuccione/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(DataAssimilationInflationGuccione src/DataAssimilationInflationGuccioneExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(DataAssimilationInflationGuccione PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(DataAssimilationInflationGuccione PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_DataAssimilationInflationGuccione COMMAND DataAssimilationInflationGuccione) +add_opencmiss_environment(test_DataAssimilationInflationGuccione) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/DataAssimilation/DataAssimilationInflationGuccione/src/DataAssimilationInflationGuccioneExample.f90 b/DataAssimilation/DataAssimilationInflationGuccione/Fortran/src/DataAssimilationInflationGuccioneExample.f90 similarity index 100% rename from DataAssimilation/DataAssimilationInflationGuccione/src/DataAssimilationInflationGuccioneExample.f90 rename to DataAssimilation/DataAssimilationInflationGuccione/Fortran/src/DataAssimilationInflationGuccioneExample.f90 diff --git a/DataAssimilation/DataAssimilationInflationGuccione/OpenCMISS.cmake b/DataAssimilation/DataAssimilationInflationGuccione/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/DataAssimilation/DataAssimilationInflationGuccione/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/DataAssimilation/DataAssimilationInflationGuccione/build_debug/build.sh b/DataAssimilation/DataAssimilationInflationGuccione/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/DataAssimilation/DataAssimilationInflationGuccione/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/DataAssimilation/DataAssimilationUniExtension/CMakeLists.txt b/DataAssimilation/DataAssimilationUniExtension/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/DataAssimilation/DataAssimilationUniExtension/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/DataAssimilation/DataAssimilationUniExtension/Fortran/CMakeLists.txt b/DataAssimilation/DataAssimilationUniExtension/Fortran/CMakeLists.txt new file mode 100644 index 00000000..b093fddf --- /dev/null +++ b/DataAssimilation/DataAssimilationUniExtension/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(DataAssimilationUniExtension src/UniAxialExtensionExample.f90 src/data_assimilation_uniextension.cpp src/data_assimilation_uniextension_OpenCMISS_test.cpp) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(DataAssimilationUniExtension PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(DataAssimilationUniExtension PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_DataAssimilationUniExtension COMMAND DataAssimilationUniExtension) +add_opencmiss_environment(test_DataAssimilationUniExtension) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/DataAssimilation/DataAssimilationUniExtension/src/UniAxialExtensionExample.f90 b/DataAssimilation/DataAssimilationUniExtension/Fortran/src/UniAxialExtensionExample.f90 similarity index 100% rename from DataAssimilation/DataAssimilationUniExtension/src/UniAxialExtensionExample.f90 rename to DataAssimilation/DataAssimilationUniExtension/Fortran/src/UniAxialExtensionExample.f90 diff --git a/DataAssimilation/DataAssimilationUniExtension/src/data_assimilation_uniextension.cpp b/DataAssimilation/DataAssimilationUniExtension/Fortran/src/data_assimilation_uniextension.cpp similarity index 100% rename from DataAssimilation/DataAssimilationUniExtension/src/data_assimilation_uniextension.cpp rename to DataAssimilation/DataAssimilationUniExtension/Fortran/src/data_assimilation_uniextension.cpp diff --git a/DataAssimilation/DataAssimilationUniExtension/src/data_assimilation_uniextension_OpenCMISS_test.cpp b/DataAssimilation/DataAssimilationUniExtension/Fortran/src/data_assimilation_uniextension_OpenCMISS_test.cpp similarity index 100% rename from DataAssimilation/DataAssimilationUniExtension/src/data_assimilation_uniextension_OpenCMISS_test.cpp rename to DataAssimilation/DataAssimilationUniExtension/Fortran/src/data_assimilation_uniextension_OpenCMISS_test.cpp diff --git a/DataAssimilation/DataAssimilationUniExtension/OpenCMISS.cmake b/DataAssimilation/DataAssimilationUniExtension/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/DataAssimilation/DataAssimilationUniExtension/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/DataAssimilation/DataAssimilationUniExtension/build_debug/build.sh b/DataAssimilation/DataAssimilationUniExtension/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/DataAssimilation/DataAssimilationUniExtension/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/DataProjection/1DRectangularCartesian/CMakeLists.txt b/DataProjection/1DRectangularCartesian/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/DataProjection/1DRectangularCartesian/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/DataProjection/1DRectangularCartesian/Fortran/CMakeLists.txt b/DataProjection/1DRectangularCartesian/Fortran/CMakeLists.txt new file mode 100644 index 00000000..3ae6541c --- /dev/null +++ b/DataProjection/1DRectangularCartesian/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(1DRectangularCartesian src/1DRectangularCartesianExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(1DRectangularCartesian PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(1DRectangularCartesian PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_1DRectangularCartesian COMMAND 1DRectangularCartesian) +add_opencmiss_environment(test_1DRectangularCartesian) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/DataProjection/1DRectangularCartesian/src/1DRectangularCartesianExample.f90 b/DataProjection/1DRectangularCartesian/Fortran/src/1DRectangularCartesianExample.f90 similarity index 100% rename from DataProjection/1DRectangularCartesian/src/1DRectangularCartesianExample.f90 rename to DataProjection/1DRectangularCartesian/Fortran/src/1DRectangularCartesianExample.f90 diff --git a/DataProjection/1DRectangularCartesian/OpenCMISS.cmake b/DataProjection/1DRectangularCartesian/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/DataProjection/1DRectangularCartesian/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/DataProjection/1DRectangularCartesian/build_debug/build.sh b/DataProjection/1DRectangularCartesian/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/DataProjection/1DRectangularCartesian/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/DataProjection/2DRectangularCartesian/CMakeLists.txt b/DataProjection/2DRectangularCartesian/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/DataProjection/2DRectangularCartesian/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/DataProjection/2DRectangularCartesian/Fortran/CMakeLists.txt b/DataProjection/2DRectangularCartesian/Fortran/CMakeLists.txt new file mode 100644 index 00000000..82af0215 --- /dev/null +++ b/DataProjection/2DRectangularCartesian/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(2DRectangularCartesian src/2DRectangularCartesianExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(2DRectangularCartesian PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(2DRectangularCartesian PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_2DRectangularCartesian COMMAND 2DRectangularCartesian) +add_opencmiss_environment(test_2DRectangularCartesian) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/DataProjection/2DRectangularCartesian/src/2DRectangularCartesianExample.f90 b/DataProjection/2DRectangularCartesian/Fortran/src/2DRectangularCartesianExample.f90 similarity index 100% rename from DataProjection/2DRectangularCartesian/src/2DRectangularCartesianExample.f90 rename to DataProjection/2DRectangularCartesian/Fortran/src/2DRectangularCartesianExample.f90 diff --git a/DataProjection/2DRectangularCartesian/OpenCMISS.cmake b/DataProjection/2DRectangularCartesian/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/DataProjection/2DRectangularCartesian/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/DataProjection/2DRectangularCartesian/build_debug/build.sh b/DataProjection/2DRectangularCartesian/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/DataProjection/2DRectangularCartesian/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/DataProjection/3DRectangularCartesian/CMakeLists.txt b/DataProjection/3DRectangularCartesian/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/DataProjection/3DRectangularCartesian/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/DataProjection/3DRectangularCartesian/Fortran/CMakeLists.txt b/DataProjection/3DRectangularCartesian/Fortran/CMakeLists.txt new file mode 100644 index 00000000..a49ffa5b --- /dev/null +++ b/DataProjection/3DRectangularCartesian/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(3DRectangularCartesian src/3DRectangularCartesianExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(3DRectangularCartesian PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(3DRectangularCartesian PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_3DRectangularCartesian COMMAND 3DRectangularCartesian) +add_opencmiss_environment(test_3DRectangularCartesian) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/DataProjection/3DRectangularCartesian/src/3DRectangularCartesianExample.f90 b/DataProjection/3DRectangularCartesian/Fortran/src/3DRectangularCartesianExample.f90 similarity index 100% rename from DataProjection/3DRectangularCartesian/src/3DRectangularCartesianExample.f90 rename to DataProjection/3DRectangularCartesian/Fortran/src/3DRectangularCartesianExample.f90 diff --git a/DataProjection/3DRectangularCartesian/OpenCMISS.cmake b/DataProjection/3DRectangularCartesian/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/DataProjection/3DRectangularCartesian/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/DataProjection/3DRectangularCartesian/build_debug/build.sh b/DataProjection/3DRectangularCartesian/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/DataProjection/3DRectangularCartesian/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/EmbeddedMesh/EmbeddedMeshBasic/CMakeLists.txt b/EmbeddedMesh/EmbeddedMeshBasic/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/EmbeddedMesh/EmbeddedMeshBasic/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/EmbeddedMesh/EmbeddedMeshBasic/Fortran/CMakeLists.txt b/EmbeddedMesh/EmbeddedMeshBasic/Fortran/CMakeLists.txt new file mode 100644 index 00000000..5753765d --- /dev/null +++ b/EmbeddedMesh/EmbeddedMeshBasic/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(EmbeddedMeshBasic src/EmbeddedMeshBasicExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(EmbeddedMeshBasic PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(EmbeddedMeshBasic PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_EmbeddedMeshBasic COMMAND EmbeddedMeshBasic) +add_opencmiss_environment(test_EmbeddedMeshBasic) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/EmbeddedMesh/EmbeddedMeshBasic/src/EmbeddedMeshBasicExample.f90 b/EmbeddedMesh/EmbeddedMeshBasic/Fortran/src/EmbeddedMeshBasicExample.f90 similarity index 100% rename from EmbeddedMesh/EmbeddedMeshBasic/src/EmbeddedMeshBasicExample.f90 rename to EmbeddedMesh/EmbeddedMeshBasic/Fortran/src/EmbeddedMeshBasicExample.f90 diff --git a/EmbeddedMesh/EmbeddedMeshBasic/OpenCMISS.cmake b/EmbeddedMesh/EmbeddedMeshBasic/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/EmbeddedMesh/EmbeddedMeshBasic/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/EmbeddedMesh/EmbeddedMeshBasic/build_debug/build.sh b/EmbeddedMesh/EmbeddedMeshBasic/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/EmbeddedMesh/EmbeddedMeshBasic/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/EmbeddedMesh/EmbeddedMeshBasicWithMap/CMakeLists.txt b/EmbeddedMesh/EmbeddedMeshBasicWithMap/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/EmbeddedMesh/EmbeddedMeshBasicWithMap/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/EmbeddedMesh/EmbeddedMeshBasicWithMap/Fortran/CMakeLists.txt b/EmbeddedMesh/EmbeddedMeshBasicWithMap/Fortran/CMakeLists.txt new file mode 100644 index 00000000..42d6f24f --- /dev/null +++ b/EmbeddedMesh/EmbeddedMeshBasicWithMap/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(EmbeddedMeshBasicWithMap src/EmbeddedMeshBasicWithMapExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(EmbeddedMeshBasicWithMap PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(EmbeddedMeshBasicWithMap PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_EmbeddedMeshBasicWithMap COMMAND EmbeddedMeshBasicWithMap) +add_opencmiss_environment(test_EmbeddedMeshBasicWithMap) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/EmbeddedMesh/EmbeddedMeshBasicWithMap/src/EmbeddedMeshBasicWithMapExample.f90 b/EmbeddedMesh/EmbeddedMeshBasicWithMap/Fortran/src/EmbeddedMeshBasicWithMapExample.f90 similarity index 100% rename from EmbeddedMesh/EmbeddedMeshBasicWithMap/src/EmbeddedMeshBasicWithMapExample.f90 rename to EmbeddedMesh/EmbeddedMeshBasicWithMap/Fortran/src/EmbeddedMeshBasicWithMapExample.f90 diff --git a/EmbeddedMesh/EmbeddedMeshBasicWithMap/OpenCMISS.cmake b/EmbeddedMesh/EmbeddedMeshBasicWithMap/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/EmbeddedMesh/EmbeddedMeshBasicWithMap/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/EmbeddedMesh/EmbeddedMeshBasicWithMap/build_debug/build.sh b/EmbeddedMesh/EmbeddedMeshBasicWithMap/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/EmbeddedMesh/EmbeddedMeshBasicWithMap/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/ActiveContraction/CMakeLists.txt b/FiniteElasticity/ActiveContraction/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/ActiveContraction/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/ActiveContraction/Fortran/CMakeLists.txt b/FiniteElasticity/ActiveContraction/Fortran/CMakeLists.txt new file mode 100644 index 00000000..34b2789e --- /dev/null +++ b/FiniteElasticity/ActiveContraction/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(ActiveContraction src/ActiveContractionExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(ActiveContraction PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(ActiveContraction PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_ActiveContraction COMMAND ActiveContraction) +add_opencmiss_environment(test_ActiveContraction) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/ActiveContraction/src/ActiveContractionExample.f90 b/FiniteElasticity/ActiveContraction/Fortran/src/ActiveContractionExample.f90 similarity index 100% rename from FiniteElasticity/ActiveContraction/src/ActiveContractionExample.f90 rename to FiniteElasticity/ActiveContraction/Fortran/src/ActiveContractionExample.f90 diff --git a/FiniteElasticity/ActiveContraction/OpenCMISS.cmake b/FiniteElasticity/ActiveContraction/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/ActiveContraction/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/ActiveContraction/build_debug/build.sh b/FiniteElasticity/ActiveContraction/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/ActiveContraction/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/Cantilever/CMakeLists.txt b/FiniteElasticity/Cantilever/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/Cantilever/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/Cantilever/Fortran/CMakeLists.txt b/FiniteElasticity/Cantilever/Fortran/CMakeLists.txt new file mode 100644 index 00000000..3120cf36 --- /dev/null +++ b/FiniteElasticity/Cantilever/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Cantilever src/FortranExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Cantilever PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Cantilever PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Cantilever COMMAND Cantilever) +add_opencmiss_environment(test_Cantilever) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/Cantilever/OpenCMISS.cmake b/FiniteElasticity/Cantilever/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/Cantilever/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/Cantilever/build_debug/build.sh b/FiniteElasticity/Cantilever/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/Cantilever/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/CuboidGeneric/CMakeLists.txt b/FiniteElasticity/CuboidGeneric/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/CuboidGeneric/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/CuboidGeneric/Fortran/CMakeLists.txt b/FiniteElasticity/CuboidGeneric/Fortran/CMakeLists.txt new file mode 100644 index 00000000..1bac8dba --- /dev/null +++ b/FiniteElasticity/CuboidGeneric/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(CuboidGeneric src/CuboidGenericExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(CuboidGeneric PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(CuboidGeneric PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_CuboidGeneric COMMAND CuboidGeneric) +add_opencmiss_environment(test_CuboidGeneric) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/CuboidGeneric/src/CuboidGenericExample.f90 b/FiniteElasticity/CuboidGeneric/Fortran/src/CuboidGenericExample.f90 similarity index 100% rename from FiniteElasticity/CuboidGeneric/src/CuboidGenericExample.f90 rename to FiniteElasticity/CuboidGeneric/Fortran/src/CuboidGenericExample.f90 diff --git a/FiniteElasticity/CuboidGeneric/OpenCMISS.cmake b/FiniteElasticity/CuboidGeneric/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/CuboidGeneric/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/CuboidGeneric/build_debug/build.sh b/FiniteElasticity/CuboidGeneric/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/CuboidGeneric/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/CylinderInflation/CMakeLists.txt b/FiniteElasticity/CylinderInflation/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/CylinderInflation/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/CylinderInflation/Fortran/CMakeLists.txt b/FiniteElasticity/CylinderInflation/Fortran/CMakeLists.txt new file mode 100644 index 00000000..f5120962 --- /dev/null +++ b/FiniteElasticity/CylinderInflation/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(CylinderInflation src/CylinderInflationExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(CylinderInflation PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(CylinderInflation PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_CylinderInflation COMMAND CylinderInflation) +add_opencmiss_environment(test_CylinderInflation) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/CylinderInflation/src/CylinderInflationExample.f90 b/FiniteElasticity/CylinderInflation/Fortran/src/CylinderInflationExample.f90 similarity index 100% rename from FiniteElasticity/CylinderInflation/src/CylinderInflationExample.f90 rename to FiniteElasticity/CylinderInflation/Fortran/src/CylinderInflationExample.f90 diff --git a/FiniteElasticity/CylinderInflation/OpenCMISS.cmake b/FiniteElasticity/CylinderInflation/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/CylinderInflation/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/CylinderInflation/build_debug/build.sh b/FiniteElasticity/CylinderInflation/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/CylinderInflation/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/LargeUniAxialExtension/CMakeLists.txt b/FiniteElasticity/LargeUniAxialExtension/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/LargeUniAxialExtension/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/LargeUniAxialExtension/Fortran/CMakeLists.txt b/FiniteElasticity/LargeUniAxialExtension/Fortran/CMakeLists.txt new file mode 100644 index 00000000..754f3d3b --- /dev/null +++ b/FiniteElasticity/LargeUniAxialExtension/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(LargeUniAxialExtension src/FortranExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(LargeUniAxialExtension PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(LargeUniAxialExtension PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_LargeUniAxialExtension COMMAND LargeUniAxialExtension) +add_opencmiss_environment(test_LargeUniAxialExtension) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/LargeUniAxialExtension/OpenCMISS.cmake b/FiniteElasticity/LargeUniAxialExtension/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/LargeUniAxialExtension/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/LargeUniAxialExtension/build_debug/build.sh b/FiniteElasticity/LargeUniAxialExtension/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/LargeUniAxialExtension/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/Membrane/MembraneExtension2DSpace/CMakeLists.txt b/FiniteElasticity/Membrane/MembraneExtension2DSpace/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/Membrane/MembraneExtension2DSpace/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/Membrane/MembraneExtension2DSpace/Fortran/CMakeLists.txt b/FiniteElasticity/Membrane/MembraneExtension2DSpace/Fortran/CMakeLists.txt new file mode 100644 index 00000000..946f4313 --- /dev/null +++ b/FiniteElasticity/Membrane/MembraneExtension2DSpace/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(MembraneExtension2DSpace src/MembraneExtension2DSpaceExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(MembraneExtension2DSpace PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(MembraneExtension2DSpace PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_MembraneExtension2DSpace COMMAND MembraneExtension2DSpace) +add_opencmiss_environment(test_MembraneExtension2DSpace) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/Membrane/MembraneExtension2DSpace/src/MembraneExtension2DSpaceExample.f90 b/FiniteElasticity/Membrane/MembraneExtension2DSpace/Fortran/src/MembraneExtension2DSpaceExample.f90 similarity index 100% rename from FiniteElasticity/Membrane/MembraneExtension2DSpace/src/MembraneExtension2DSpaceExample.f90 rename to FiniteElasticity/Membrane/MembraneExtension2DSpace/Fortran/src/MembraneExtension2DSpaceExample.f90 diff --git a/FiniteElasticity/Membrane/MembraneExtension2DSpace/OpenCMISS.cmake b/FiniteElasticity/Membrane/MembraneExtension2DSpace/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/Membrane/MembraneExtension2DSpace/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/Membrane/MembraneExtension2DSpace/build_debug/build.sh b/FiniteElasticity/Membrane/MembraneExtension2DSpace/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/Membrane/MembraneExtension2DSpace/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/Membrane/MembraneExtension3DSpaceFlat/CMakeLists.txt b/FiniteElasticity/Membrane/MembraneExtension3DSpaceFlat/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/Membrane/MembraneExtension3DSpaceFlat/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/Membrane/MembraneExtension3DSpaceFlat/Fortran/CMakeLists.txt b/FiniteElasticity/Membrane/MembraneExtension3DSpaceFlat/Fortran/CMakeLists.txt new file mode 100644 index 00000000..532ac633 --- /dev/null +++ b/FiniteElasticity/Membrane/MembraneExtension3DSpaceFlat/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(MembraneExtension3DSpaceFlat src/MembraneExtension3DSpaceFlatExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(MembraneExtension3DSpaceFlat PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(MembraneExtension3DSpaceFlat PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_MembraneExtension3DSpaceFlat COMMAND MembraneExtension3DSpaceFlat) +add_opencmiss_environment(test_MembraneExtension3DSpaceFlat) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/Membrane/MembraneExtension3DSpaceFlat/src/MembraneExtension3DSpaceFlatExample.f90 b/FiniteElasticity/Membrane/MembraneExtension3DSpaceFlat/Fortran/src/MembraneExtension3DSpaceFlatExample.f90 similarity index 100% rename from FiniteElasticity/Membrane/MembraneExtension3DSpaceFlat/src/MembraneExtension3DSpaceFlatExample.f90 rename to FiniteElasticity/Membrane/MembraneExtension3DSpaceFlat/Fortran/src/MembraneExtension3DSpaceFlatExample.f90 diff --git a/FiniteElasticity/Membrane/MembraneExtension3DSpaceFlat/OpenCMISS.cmake b/FiniteElasticity/Membrane/MembraneExtension3DSpaceFlat/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/Membrane/MembraneExtension3DSpaceFlat/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/Membrane/MembraneExtension3DSpaceFlat/build_debug/build.sh b/FiniteElasticity/Membrane/MembraneExtension3DSpaceFlat/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/Membrane/MembraneExtension3DSpaceFlat/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/Membrane/MembraneExtension3DSpaceTilted/CMakeLists.txt b/FiniteElasticity/Membrane/MembraneExtension3DSpaceTilted/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/Membrane/MembraneExtension3DSpaceTilted/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/Membrane/MembraneExtension3DSpaceTilted/Fortran/CMakeLists.txt b/FiniteElasticity/Membrane/MembraneExtension3DSpaceTilted/Fortran/CMakeLists.txt new file mode 100644 index 00000000..2d71d154 --- /dev/null +++ b/FiniteElasticity/Membrane/MembraneExtension3DSpaceTilted/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(MembraneExtension3DSpaceTilted src/MembraneExtension3DSpaceTiltedExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(MembraneExtension3DSpaceTilted PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(MembraneExtension3DSpaceTilted PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_MembraneExtension3DSpaceTilted COMMAND MembraneExtension3DSpaceTilted) +add_opencmiss_environment(test_MembraneExtension3DSpaceTilted) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/Membrane/MembraneExtension3DSpaceTilted/src/MembraneExtension3DSpaceTiltedExample.f90 b/FiniteElasticity/Membrane/MembraneExtension3DSpaceTilted/Fortran/src/MembraneExtension3DSpaceTiltedExample.f90 similarity index 100% rename from FiniteElasticity/Membrane/MembraneExtension3DSpaceTilted/src/MembraneExtension3DSpaceTiltedExample.f90 rename to FiniteElasticity/Membrane/MembraneExtension3DSpaceTilted/Fortran/src/MembraneExtension3DSpaceTiltedExample.f90 diff --git a/FiniteElasticity/Membrane/MembraneExtension3DSpaceTilted/OpenCMISS.cmake b/FiniteElasticity/Membrane/MembraneExtension3DSpaceTilted/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/Membrane/MembraneExtension3DSpaceTilted/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/Membrane/MembraneExtension3DSpaceTilted/build_debug/build.sh b/FiniteElasticity/Membrane/MembraneExtension3DSpaceTilted/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/Membrane/MembraneExtension3DSpaceTilted/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/MixedBoundaryConditions/CMakeLists.txt b/FiniteElasticity/MixedBoundaryConditions/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/MixedBoundaryConditions/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/MixedBoundaryConditions/Fortran/CMakeLists.txt b/FiniteElasticity/MixedBoundaryConditions/Fortran/CMakeLists.txt new file mode 100644 index 00000000..62187105 --- /dev/null +++ b/FiniteElasticity/MixedBoundaryConditions/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(MixedBoundaryConditions src/MixedBoundaryConditionsExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(MixedBoundaryConditions PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(MixedBoundaryConditions PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_MixedBoundaryConditions COMMAND MixedBoundaryConditions) +add_opencmiss_environment(test_MixedBoundaryConditions) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/MixedBoundaryConditions/src/MixedBoundaryConditionsExample.f90 b/FiniteElasticity/MixedBoundaryConditions/Fortran/src/MixedBoundaryConditionsExample.f90 similarity index 100% rename from FiniteElasticity/MixedBoundaryConditions/src/MixedBoundaryConditionsExample.f90 rename to FiniteElasticity/MixedBoundaryConditions/Fortran/src/MixedBoundaryConditionsExample.f90 diff --git a/FiniteElasticity/MixedBoundaryConditions/OpenCMISS.cmake b/FiniteElasticity/MixedBoundaryConditions/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/MixedBoundaryConditions/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/MixedBoundaryConditions/build_debug/build.sh b/FiniteElasticity/MixedBoundaryConditions/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/MixedBoundaryConditions/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/MooneyRivlinInCellML/CMakeLists.txt b/FiniteElasticity/MooneyRivlinInCellML/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/MooneyRivlinInCellML/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/MooneyRivlinInCellML/Fortran/CMakeLists.txt b/FiniteElasticity/MooneyRivlinInCellML/Fortran/CMakeLists.txt new file mode 100644 index 00000000..8de170d5 --- /dev/null +++ b/FiniteElasticity/MooneyRivlinInCellML/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(MooneyRivlinInCellML src/MooneyRivlinInCellMLExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(MooneyRivlinInCellML PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(MooneyRivlinInCellML PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_MooneyRivlinInCellML COMMAND MooneyRivlinInCellML) +add_opencmiss_environment(test_MooneyRivlinInCellML) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/MooneyRivlinInCellML/src/MooneyRivlinInCellMLExample.f90 b/FiniteElasticity/MooneyRivlinInCellML/Fortran/src/MooneyRivlinInCellMLExample.f90 similarity index 100% rename from FiniteElasticity/MooneyRivlinInCellML/src/MooneyRivlinInCellMLExample.f90 rename to FiniteElasticity/MooneyRivlinInCellML/Fortran/src/MooneyRivlinInCellMLExample.f90 diff --git a/FiniteElasticity/MooneyRivlinInCellML/OpenCMISS.cmake b/FiniteElasticity/MooneyRivlinInCellML/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/MooneyRivlinInCellML/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/MooneyRivlinInCellML/build_debug/build.sh b/FiniteElasticity/MooneyRivlinInCellML/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/MooneyRivlinInCellML/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/QuadraticEllipsoid/CMakeLists.txt b/FiniteElasticity/QuadraticEllipsoid/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/QuadraticEllipsoid/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/QuadraticEllipsoid/Fortran/CMakeLists.txt b/FiniteElasticity/QuadraticEllipsoid/Fortran/CMakeLists.txt new file mode 100644 index 00000000..f346047d --- /dev/null +++ b/FiniteElasticity/QuadraticEllipsoid/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(QuadraticEllipsoid src/QuadraticEllipsoidExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(QuadraticEllipsoid PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(QuadraticEllipsoid PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_QuadraticEllipsoid COMMAND QuadraticEllipsoid) +add_opencmiss_environment(test_QuadraticEllipsoid) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/QuadraticEllipsoid/src/QuadraticEllipsoidExample.f90 b/FiniteElasticity/QuadraticEllipsoid/Fortran/src/QuadraticEllipsoidExample.f90 similarity index 100% rename from FiniteElasticity/QuadraticEllipsoid/src/QuadraticEllipsoidExample.f90 rename to FiniteElasticity/QuadraticEllipsoid/Fortran/src/QuadraticEllipsoidExample.f90 diff --git a/FiniteElasticity/QuadraticEllipsoid/OpenCMISS.cmake b/FiniteElasticity/QuadraticEllipsoid/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/QuadraticEllipsoid/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/QuadraticEllipsoid/build_debug/build.sh b/FiniteElasticity/QuadraticEllipsoid/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/QuadraticEllipsoid/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/QuadraticEllipsoidCosta/CMakeLists.txt b/FiniteElasticity/QuadraticEllipsoidCosta/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/QuadraticEllipsoidCosta/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/QuadraticEllipsoidCosta/Fortran/CMakeLists.txt b/FiniteElasticity/QuadraticEllipsoidCosta/Fortran/CMakeLists.txt new file mode 100644 index 00000000..efca7c57 --- /dev/null +++ b/FiniteElasticity/QuadraticEllipsoidCosta/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(QuadraticEllipsoidCosta src/QuadraticEllipsoidCostaExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(QuadraticEllipsoidCosta PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(QuadraticEllipsoidCosta PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_QuadraticEllipsoidCosta COMMAND QuadraticEllipsoidCosta) +add_opencmiss_environment(test_QuadraticEllipsoidCosta) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/QuadraticEllipsoidCosta/src/QuadraticEllipsoidCostaExample.f90 b/FiniteElasticity/QuadraticEllipsoidCosta/Fortran/src/QuadraticEllipsoidCostaExample.f90 similarity index 100% rename from FiniteElasticity/QuadraticEllipsoidCosta/src/QuadraticEllipsoidCostaExample.f90 rename to FiniteElasticity/QuadraticEllipsoidCosta/Fortran/src/QuadraticEllipsoidCostaExample.f90 diff --git a/FiniteElasticity/QuadraticEllipsoidCosta/OpenCMISS.cmake b/FiniteElasticity/QuadraticEllipsoidCosta/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/QuadraticEllipsoidCosta/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/QuadraticEllipsoidCosta/build_debug/build.sh b/FiniteElasticity/QuadraticEllipsoidCosta/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/QuadraticEllipsoidCosta/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/QuadraticEllipsoidCostaReadIn/CMakeLists.txt b/FiniteElasticity/QuadraticEllipsoidCostaReadIn/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/QuadraticEllipsoidCostaReadIn/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/QuadraticEllipsoidCostaReadIn/Fortran/CMakeLists.txt b/FiniteElasticity/QuadraticEllipsoidCostaReadIn/Fortran/CMakeLists.txt new file mode 100644 index 00000000..0c080f11 --- /dev/null +++ b/FiniteElasticity/QuadraticEllipsoidCostaReadIn/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(QuadraticEllipsoidCostaReadIn src/QuadraticEllipsoidCostaReadInExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(QuadraticEllipsoidCostaReadIn PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(QuadraticEllipsoidCostaReadIn PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_QuadraticEllipsoidCostaReadIn COMMAND QuadraticEllipsoidCostaReadIn) +add_opencmiss_environment(test_QuadraticEllipsoidCostaReadIn) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/QuadraticEllipsoidCostaReadIn/src/QuadraticEllipsoidCostaReadInExample.f90 b/FiniteElasticity/QuadraticEllipsoidCostaReadIn/Fortran/src/QuadraticEllipsoidCostaReadInExample.f90 similarity index 100% rename from FiniteElasticity/QuadraticEllipsoidCostaReadIn/src/QuadraticEllipsoidCostaReadInExample.f90 rename to FiniteElasticity/QuadraticEllipsoidCostaReadIn/Fortran/src/QuadraticEllipsoidCostaReadInExample.f90 diff --git a/FiniteElasticity/QuadraticEllipsoidCostaReadIn/OpenCMISS.cmake b/FiniteElasticity/QuadraticEllipsoidCostaReadIn/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/QuadraticEllipsoidCostaReadIn/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/QuadraticEllipsoidCostaReadIn/build_debug/build.sh b/FiniteElasticity/QuadraticEllipsoidCostaReadIn/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/QuadraticEllipsoidCostaReadIn/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/RightBiceps/CMakeLists.txt b/FiniteElasticity/RightBiceps/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/RightBiceps/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/RightBiceps/Fortran/CMakeLists.txt b/FiniteElasticity/RightBiceps/Fortran/CMakeLists.txt new file mode 100644 index 00000000..912a54e1 --- /dev/null +++ b/FiniteElasticity/RightBiceps/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(RightBiceps src/FortranExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(RightBiceps PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(RightBiceps PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_RightBiceps COMMAND RightBiceps) +add_opencmiss_environment(test_RightBiceps) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/RightBiceps/OpenCMISS.cmake b/FiniteElasticity/RightBiceps/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/RightBiceps/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/RightBiceps/build_debug/CMakeCache.txt b/FiniteElasticity/RightBiceps/build_debug/CMakeCache.txt new file mode 100644 index 00000000..93b90a47 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/CMakeCache.txt @@ -0,0 +1,799 @@ +# This is the CMakeCache file. +# For build in directory: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug +# It was generated by CMake: /usr/bin/cmake +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//The directory containing a CMake configuration file for BLAS. +BLAS_DIR:PATH=/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake + +//The directory containing a CMake configuration file for BZip2. +BZip2_DIR:PATH=/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake + +//The directory containing a CMake configuration file for CELLML. +CELLML_DIR:PATH=/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake + +//Path to a program. +CMAKE_AR:FILEPATH=/usr/bin/ar + +//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or +// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel. +CMAKE_BUILD_TYPE:STRING=DEBUG + +//Enable/Disable color output during build. +CMAKE_COLOR_MAKEFILE:BOOL=ON + +//C compiler +CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc + +//Flags used by the compiler during all build types. +CMAKE_C_FLAGS:STRING= + +//Flags used by the compiler during debug builds. +CMAKE_C_FLAGS_DEBUG:STRING=-g + +//Flags used by the compiler during release builds for minimum +// size. +CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the compiler during release builds. +CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the compiler during release builds with debug info. +CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//Flags used by the linker. +CMAKE_EXE_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Enable/Disable output of compile commands during generation. +CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF + +//Fortran compiler +CMAKE_Fortran_COMPILER:FILEPATH=/usr/bin/gfortran + +//Flags for Fortran compiler. +CMAKE_Fortran_FLAGS:STRING= + +//Flags used by the compiler during debug builds. +CMAKE_Fortran_FLAGS_DEBUG:STRING=-g + +//Flags used by the compiler during release builds for minimum +// size. +CMAKE_Fortran_FLAGS_MINSIZEREL:STRING=-Os + +//Flags used by the compiler during release builds. +CMAKE_Fortran_FLAGS_RELEASE:STRING=-O3 + +//Flags used by the compiler during release builds with debug info. +CMAKE_Fortran_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=/usr/local + +//Path to a program. +CMAKE_LINKER:FILEPATH=/usr/bin/ld + +//Path to a program. +CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make + +//Flags used by the linker during the creation of modules. +CMAKE_MODULE_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_NM:FILEPATH=/usr/bin/nm + +//Path to a program. +CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy + +//Path to a program. +CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=OpenCMISS-Example + +//Path to a program. +CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib + +//Flags used by the linker during the creation of dll's. +CMAKE_SHARED_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//If set, runtime paths are not added when installing shared libraries, +// but are added when building. +CMAKE_SKIP_INSTALL_RPATH:BOOL=NO + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=NO + +//Flags used by the linker during the creation of static libraries. +CMAKE_STATIC_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_STRIP:FILEPATH=/usr/bin/strip + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE + +//The directory containing a CMake configuration file for FIELDML-API. +FIELDML-API_DIR:PATH=/store/software/opencmiss/iron_maierbn/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake + +//The directory containing a CMake configuration file for HYPRE. +HYPRE_DIR:PATH=/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake + +//The directory containing a CMake configuration file for IRON. +IRON_DIR:PATH=/store/software/opencmiss/iron_maierbn/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake + +//The directory containing a CMake configuration file for LAPACK. +LAPACK_DIR:PATH=/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake + +//The directory containing a CMake configuration file for LIBCELLML. +LIBCELLML_DIR:PATH=/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake + +//The directory containing a CMake configuration file for LibXml2. +LibXml2_DIR:PATH=/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake + +//The directory containing a CMake configuration file for METIS. +METIS_DIR:PATH=/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake + +//Executable for running MPI programs. +MPIEXEC:FILEPATH=/usr/bin/mpiexec + +//Maximum number of processors available to run MPI applications. +MPIEXEC_MAX_NUMPROCS:STRING=2 + +//Flag used by MPI to specify the number of processes for MPIEXEC; +// the next option will be the number of processes. +MPIEXEC_NUMPROC_FLAG:STRING=-np + +//These flags will come after all flags given to MPIEXEC. +MPIEXEC_POSTFLAGS:STRING= + +//These flags will be directly before the executable that is being +// run by MPIEXEC. +MPIEXEC_PREFLAGS:STRING= + +//Path to a program. +MPI_C_COMPILER:FILEPATH=/usr/bin/mpicc + +//MPI C compilation flags +MPI_C_COMPILE_FLAGS:STRING= + +//MPI C include path +MPI_C_INCLUDE_PATH:STRING=/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent;/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include;/usr/lib/openmpi/include;/usr/lib/openmpi/include/openmpi + +//MPI C libraries to link against +MPI_C_LIBRARIES:STRING=/usr/lib/openmpi/lib/libmpi.so + +//MPI C linking flags +MPI_C_LINK_FLAGS:STRING= -Wl,-rpath -Wl,/usr/lib/openmpi/lib -Wl,--enable-new-dtags + +//Compatibility of MPI with toolchain is verified +MPI_C_VERIFIED:BOOL=TRUE + +//Extra MPI libraries to link against +MPI_EXTRA_LIBRARY:STRING=/usr/lib/openmpi/lib/libmpi_usempif08.so;/usr/lib/openmpi/lib/libmpi_usempi_ignore_tkr.so;/usr/lib/openmpi/lib/libmpi_mpifh.so;/usr/lib/openmpi/lib/libmpi.so + +//Path to a program. +MPI_Fortran_COMPILER:FILEPATH=/usr/bin/mpif90 + +//MPI Fortran compilation flags +MPI_Fortran_COMPILE_FLAGS:STRING= + +//MPI Fortran include path +MPI_Fortran_INCLUDE_PATH:STRING=/usr/lib/openmpi/include;/usr/lib/openmpi/lib + +//MPI Fortran libraries to link against +MPI_Fortran_LIBRARIES:STRING=/usr/lib/openmpi/lib/libmpi_usempif08.so;/usr/lib/openmpi/lib/libmpi_usempi_ignore_tkr.so;/usr/lib/openmpi/lib/libmpi_mpifh.so;/usr/lib/openmpi/lib/libmpi.so + +//MPI Fortran linking flags +MPI_Fortran_LINK_FLAGS:STRING= -Wl,-rpath -Wl,/usr/lib/openmpi/lib -Wl,--enable-new-dtags + +//Compatibility of MPI with toolchain is verified +MPI_Fortran_VERIFIED:BOOL=TRUE + +//MPI library to link against +MPI_LIBRARY:FILEPATH=/usr/lib/openmpi/lib/libmpi.so + +//The directory containing a CMake configuration file for MUMPS. +MUMPS_DIR:PATH=/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake + +//No help, variable specified on the command line. +OPENCMISS_BUILD_TYPE:UNINITIALIZED=DEBUG + +//Value Computed by CMake +OpenCMISS-Example_BINARY_DIR:STATIC=/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug + +//Value Computed by CMake +OpenCMISS-Example_SOURCE_DIR:STATIC=/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps + +//Path to the found OpenCMISS (SDK) installation +OpenCMISS_DIR:PATH=/store/software/opencmiss/iron_maierbn/install + +//The directory containing a CMake configuration file for PARMETIS. +PARMETIS_DIR:PATH=/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake + +//The directory containing a CMake configuration file for PASTIX. +PASTIX_DIR:PATH=/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake + +//The directory containing a CMake configuration file for PETSC. +PETSC_DIR:PATH=/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake + +//The directory containing a CMake configuration file for PTSCOTCH. +PTSCOTCH_DIR:PATH=/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake + +//The directory containing a CMake configuration file for SCALAPACK. +SCALAPACK_DIR:PATH=/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake + +//The directory containing a CMake configuration file for SUITESPARSE. +SUITESPARSE_DIR:PATH=/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake + +//The directory containing a CMake configuration file for SUNDIALS. +SUNDIALS_DIR:PATH=/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake + +//The directory containing a CMake configuration file for SUPERLU. +SUPERLU_DIR:PATH=/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake + +//The directory containing a CMake configuration file for SUPERLU_DIST. +SUPERLU_DIST_DIR:PATH=/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake + +//Path to a file. +X11_ICE_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_ICE_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libICE.so + +//Path to a file. +X11_SM_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_SM_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libSM.so + +//Path to a file. +X11_X11_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_X11_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libX11.so + +//Path to a file. +X11_XRes_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_XRes_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXRes.so + +//Path to a file. +X11_XShm_INCLUDE_PATH:PATH=/usr/include + +//Path to a file. +X11_XSync_INCLUDE_PATH:PATH=/usr/include + +//Path to a file. +X11_XTest_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_XTest_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXtst.so + +//Path to a file. +X11_Xaccessrules_INCLUDE_PATH:PATH=/usr/include + +//Path to a file. +X11_Xaccessstr_INCLUDE_PATH:PATH=/usr/include + +//Path to a file. +X11_Xau_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xau_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXau.so + +//Path to a file. +X11_Xcomposite_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xcomposite_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXcomposite.so + +//Path to a file. +X11_Xcursor_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xcursor_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXcursor.so + +//Path to a file. +X11_Xdamage_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xdamage_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXdamage.so + +//Path to a file. +X11_Xdmcp_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xdmcp_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXdmcp.so + +//Path to a library. +X11_Xext_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXext.so + +//Path to a file. +X11_Xfixes_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xfixes_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXfixes.so + +//Path to a file. +X11_Xft_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xft_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXft.so + +//Path to a file. +X11_Xi_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xi_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXi.so + +//Path to a file. +X11_Xinerama_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xinerama_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXinerama.so + +//Path to a file. +X11_Xinput_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xinput_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXi.so + +//Path to a file. +X11_Xkb_INCLUDE_PATH:PATH=/usr/include + +//Path to a file. +X11_Xkbfile_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xkbfile_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libxkbfile.so + +//Path to a file. +X11_Xkblib_INCLUDE_PATH:PATH=/usr/include + +//Path to a file. +X11_Xlib_INCLUDE_PATH:PATH=/usr/include + +//Path to a file. +X11_Xmu_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xmu_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXmu.so + +//Path to a file. +X11_Xpm_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xpm_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXpm.so + +//Path to a file. +X11_Xrandr_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xrandr_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXrandr.so + +//Path to a file. +X11_Xrender_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xrender_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXrender.so + +//Path to a file. +X11_Xscreensaver_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xscreensaver_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXss.so + +//Path to a file. +X11_Xshape_INCLUDE_PATH:PATH=/usr/include + +//Path to a file. +X11_Xt_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xt_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXt.so + +//Path to a file. +X11_Xutil_INCLUDE_PATH:PATH=/usr/include + +//Path to a file. +X11_Xv_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xv_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXv.so + +//Path to a library. +X11_Xxf86misc_LIB:FILEPATH=X11_Xxf86misc_LIB-NOTFOUND + +//Path to a library. +X11_Xxf86vm_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libXxf86vm.so + +//Path to a file. +X11_dpms_INCLUDE_PATH:PATH=/usr/include + +//Path to a file. +X11_xf86misc_INCLUDE_PATH:PATH=X11_xf86misc_INCLUDE_PATH-NOTFOUND + +//Path to a file. +X11_xf86vmode_INCLUDE_PATH:PATH=/usr/include + +//The directory containing a CMake configuration file for ZLIB. +ZLIB_DIR:PATH=/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake + + +######################## +# INTERNAL cache entries +######################## + +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=5 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=1 +//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE +CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=/usr/bin/cmake +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest +//ADVANCED property for variable: CMAKE_C_COMPILER +CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS +CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG +CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL +CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE +CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO +CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//Path to cache edit program executable. +CMAKE_EDIT_COMMAND:INTERNAL=/usr/bin/ccmake +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS +CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 +//Name of external makefile project generator. +CMAKE_EXTRA_GENERATOR:INTERNAL= +//ADVANCED property for variable: CMAKE_Fortran_COMPILER +CMAKE_Fortran_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_Fortran_FLAGS +CMAKE_Fortran_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_Fortran_FLAGS_DEBUG +CMAKE_Fortran_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_Fortran_FLAGS_MINSIZEREL +CMAKE_Fortran_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_Fortran_FLAGS_RELEASE +CMAKE_Fortran_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_Fortran_FLAGS_RELWITHDEBINFO +CMAKE_Fortran_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//Name of generator. +CMAKE_GENERATOR:INTERNAL=Unix Makefiles +//Name of generator platform. +CMAKE_GENERATOR_PLATFORM:INTERNAL= +//Name of generator toolset. +CMAKE_GENERATOR_TOOLSET:INTERNAL= +//Have function connect +CMAKE_HAVE_CONNECT:INTERNAL=1 +//Have function gethostbyname +CMAKE_HAVE_GETHOSTBYNAME:INTERNAL=1 +//Have symbol pthread_create +CMAKE_HAVE_LIBC_CREATE:INTERNAL= +//Have library pthreads +CMAKE_HAVE_PTHREADS_CREATE:INTERNAL= +//Have library pthread +CMAKE_HAVE_PTHREAD_CREATE:INTERNAL=1 +//Have include pthread.h +CMAKE_HAVE_PTHREAD_H:INTERNAL=1 +//Have function remove +CMAKE_HAVE_REMOVE:INTERNAL=1 +//Have function shmat +CMAKE_HAVE_SHMAT:INTERNAL=1 +//Source directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps +//Install .so files without execute permission. +CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 +//Have library ICE +CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER:INTERNAL=1 +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MAKE_PROGRAM +CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_NM +CMAKE_NM-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=2 +//ADVANCED property for variable: CMAKE_OBJCOPY +CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJDUMP +CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RANLIB +CMAKE_RANLIB-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.5 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH +CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STRIP +CMAKE_STRIP-ADVANCED:INTERNAL=1 +//uname command +CMAKE_UNAME:INTERNAL=/bin/uname +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 +//Details about finding MPI_C +FIND_PACKAGE_MESSAGE_DETAILS_MPI_C:INTERNAL=[/usr/lib/openmpi/lib/libmpi.so][/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent;/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include;/usr/lib/openmpi/include;/usr/lib/openmpi/include/openmpi][v()] +//Details about finding MPI_Fortran +FIND_PACKAGE_MESSAGE_DETAILS_MPI_Fortran:INTERNAL=[/usr/lib/openmpi/lib/libmpi_usempif08.so;/usr/lib/openmpi/lib/libmpi_usempi_ignore_tkr.so;/usr/lib/openmpi/lib/libmpi_mpifh.so;/usr/lib/openmpi/lib/libmpi.so][/usr/lib/openmpi/include;/usr/lib/openmpi/lib][v()] +//ADVANCED property for variable: MPIEXEC +MPIEXEC-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: MPIEXEC_MAX_NUMPROCS +MPIEXEC_MAX_NUMPROCS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: MPIEXEC_NUMPROC_FLAG +MPIEXEC_NUMPROC_FLAG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: MPIEXEC_POSTFLAGS +MPIEXEC_POSTFLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: MPIEXEC_PREFLAGS +MPIEXEC_PREFLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: MPI_C_COMPILER +MPI_C_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: MPI_C_COMPILE_FLAGS +MPI_C_COMPILE_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: MPI_C_INCLUDE_PATH +MPI_C_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: MPI_C_LIBRARIES +MPI_C_LIBRARIES-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: MPI_C_LINK_FLAGS +MPI_C_LINK_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: MPI_Fortran_COMPILER +MPI_Fortran_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: MPI_Fortran_COMPILE_FLAGS +MPI_Fortran_COMPILE_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: MPI_Fortran_INCLUDE_PATH +MPI_Fortran_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: MPI_Fortran_LIBRARIES +MPI_Fortran_LIBRARIES-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: MPI_Fortran_LINK_FLAGS +MPI_Fortran_LINK_FLAGS-ADVANCED:INTERNAL=1 +//Test MPI_Fortran_MODULE_COMPATIBLE +MPI_Fortran_MODULE_COMPATIBLE:INTERNAL=1 +//Scratch variable for MPI header detection +MPI_HEADER_PATH:INTERNAL=MPI_HEADER_PATH-NOTFOUND +//Scratch variable for MPI lib detection +MPI_LIB:INTERNAL=MPI_LIB-NOTFOUND +//ADVANCED property for variable: X11_ICE_INCLUDE_PATH +X11_ICE_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_ICE_LIB +X11_ICE_LIB-ADVANCED:INTERNAL=1 +//Have library /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so +X11_LIB_X11_SOLO:INTERNAL=1 +//ADVANCED property for variable: X11_SM_INCLUDE_PATH +X11_SM_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_SM_LIB +X11_SM_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_X11_INCLUDE_PATH +X11_X11_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_X11_LIB +X11_X11_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_XRes_INCLUDE_PATH +X11_XRes_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_XRes_LIB +X11_XRes_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_XShm_INCLUDE_PATH +X11_XShm_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_XSync_INCLUDE_PATH +X11_XSync_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_XTest_INCLUDE_PATH +X11_XTest_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_XTest_LIB +X11_XTest_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xaccessrules_INCLUDE_PATH +X11_Xaccessrules_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xaccessstr_INCLUDE_PATH +X11_Xaccessstr_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xau_INCLUDE_PATH +X11_Xau_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xau_LIB +X11_Xau_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xcomposite_INCLUDE_PATH +X11_Xcomposite_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xcomposite_LIB +X11_Xcomposite_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xcursor_INCLUDE_PATH +X11_Xcursor_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xcursor_LIB +X11_Xcursor_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xdamage_INCLUDE_PATH +X11_Xdamage_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xdamage_LIB +X11_Xdamage_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xdmcp_INCLUDE_PATH +X11_Xdmcp_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xdmcp_LIB +X11_Xdmcp_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xext_LIB +X11_Xext_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xfixes_INCLUDE_PATH +X11_Xfixes_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xfixes_LIB +X11_Xfixes_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xft_INCLUDE_PATH +X11_Xft_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xft_LIB +X11_Xft_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xi_INCLUDE_PATH +X11_Xi_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xi_LIB +X11_Xi_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xinerama_INCLUDE_PATH +X11_Xinerama_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xinerama_LIB +X11_Xinerama_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xinput_INCLUDE_PATH +X11_Xinput_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xinput_LIB +X11_Xinput_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xkb_INCLUDE_PATH +X11_Xkb_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xkbfile_INCLUDE_PATH +X11_Xkbfile_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xkbfile_LIB +X11_Xkbfile_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xkblib_INCLUDE_PATH +X11_Xkblib_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xlib_INCLUDE_PATH +X11_Xlib_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xmu_INCLUDE_PATH +X11_Xmu_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xmu_LIB +X11_Xmu_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xpm_INCLUDE_PATH +X11_Xpm_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xpm_LIB +X11_Xpm_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xrandr_INCLUDE_PATH +X11_Xrandr_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xrandr_LIB +X11_Xrandr_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xrender_INCLUDE_PATH +X11_Xrender_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xrender_LIB +X11_Xrender_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xscreensaver_INCLUDE_PATH +X11_Xscreensaver_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xscreensaver_LIB +X11_Xscreensaver_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xshape_INCLUDE_PATH +X11_Xshape_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xt_INCLUDE_PATH +X11_Xt_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xt_LIB +X11_Xt_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xutil_INCLUDE_PATH +X11_Xutil_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xv_INCLUDE_PATH +X11_Xv_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xv_LIB +X11_Xv_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xxf86misc_LIB +X11_Xxf86misc_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xxf86vm_LIB +X11_Xxf86vm_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_dpms_INCLUDE_PATH +X11_dpms_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_xf86misc_INCLUDE_PATH +X11_xf86misc_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_xf86vmode_INCLUDE_PATH +X11_xf86vmode_INCLUDE_PATH-ADVANCED:INTERNAL=1 + diff --git a/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CMakeCCompiler.cmake b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CMakeCCompiler.cmake new file mode 100644 index 00000000..f40522e6 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CMakeCCompiler.cmake @@ -0,0 +1,67 @@ +set(CMAKE_C_COMPILER "/usr/bin/cc") +set(CMAKE_C_COMPILER_ARG1 "") +set(CMAKE_C_COMPILER_ID "GNU") +set(CMAKE_C_COMPILER_VERSION "5.4.0") +set(CMAKE_C_COMPILER_WRAPPER "") +set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11") +set(CMAKE_C_COMPILE_FEATURES "c_function_prototypes;c_restrict;c_variadic_macros;c_static_assert") +set(CMAKE_C90_COMPILE_FEATURES "c_function_prototypes") +set(CMAKE_C99_COMPILE_FEATURES "c_restrict;c_variadic_macros") +set(CMAKE_C11_COMPILE_FEATURES "c_static_assert") + +set(CMAKE_C_PLATFORM_ID "Linux") +set(CMAKE_C_SIMULATE_ID "") +set(CMAKE_C_SIMULATE_VERSION "") + +set(CMAKE_AR "/usr/bin/ar") +set(CMAKE_RANLIB "/usr/bin/ranlib") +set(CMAKE_LINKER "/usr/bin/ld") +set(CMAKE_COMPILER_IS_GNUCC 1) +set(CMAKE_C_COMPILER_LOADED 1) +set(CMAKE_C_COMPILER_WORKS TRUE) +set(CMAKE_C_ABI_COMPILED TRUE) +set(CMAKE_COMPILER_IS_MINGW ) +set(CMAKE_COMPILER_IS_CYGWIN ) +if(CMAKE_COMPILER_IS_CYGWIN) + set(CYGWIN 1) + set(UNIX 1) +endif() + +set(CMAKE_C_COMPILER_ENV_VAR "CC") + +if(CMAKE_COMPILER_IS_MINGW) + set(MINGW 1) +endif() +set(CMAKE_C_COMPILER_ID_RUN 1) +set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) +set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) +set(CMAKE_C_LINKER_PREFERENCE 10) + +# Save compiler ABI information. +set(CMAKE_C_SIZEOF_DATA_PTR "8") +set(CMAKE_C_COMPILER_ABI "ELF") +set(CMAKE_C_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") + +if(CMAKE_C_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_C_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") +endif() + +if(CMAKE_C_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") +endif() + +set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + +set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "c") +set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") +set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_C.bin b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_C.bin new file mode 100755 index 0000000000000000000000000000000000000000..5bf96b27c7a832a20293e13518998cd7e2a06fdf GIT binary patch literal 8640 zcmeHNeQXrR6`#BF#~GXRL4cT#mQ4$-q4MVJ*p35A+4C1`VjF7CG$}Rfv+rylIp5K{ zJz@|kR8CN=gaoBgimEoEsw&ZlR<{va;djux&&}>xRO&7$nEO-#)36M0HP+MEa_-vplBU1C zcIo*&Wov#?di0@7MB!z>aTh#Ses?r?m-2<35yHENAoXZ4oG$N^85{U1Ja_-8#A$Vx4Vz+>WM=Peg(y1bX?@cF@K zj8cV|NBFE!Jy@oXUUTbD7rtGhF#XAKvvBfT96aqlg{6$8>)wE(^vct4Enlud4)q}{ zx^f{6Y31{v4;(}QQ}y+>v3IuVV;A+&e@$%)w4E8p8K9pzi4#yia|Y+nHLo>SP00hRREvAkRV(SNvu zlQS-GppQ-ICnwkGjyLspX3T{dZ>8j|d^z~B>fiTZ3ACT3=5+&cG6oInd9(1QTValm zcugl1cp>Pc>sYGr>W_h!adra<>4}~zyMcrGvB$6JW2p;gT5e%GpKiIPA1eRjKAh*} zua7%gZV~cu4sr{ck?9H_5C3=lTl`~bf44u-eqd#1kpi7NP=#`H+t|&vv2*RKF7tbK z@-x@ux|wuZfAYGiRG+8uXdnBaee7m4ct|gJPai$y&>y&(`amB&?cUns|GvM+zs+x) zI+(5WBe>7pA6VcmcjV0u#@aetH?GNfY_|Fuda!>S5B5d2!u|pQ$5Pi?d}kHH@7>SR z>3tyG(7a6`XFwhSsl!N}1$i8#7bh_!d{1C0|DFY~7NztM6O!HH6UyrXA~qHt{vg@A2+;Hq9;C z2^EX75XccI4})Zl9`AF`Mo-1Ft`?7SprFxH`Anhi@$E0tJq@G99Ud*=Y4Ce|eotki zM*%yqZ}hl%zm5X^F!;%R-q7WpbY}$ajKG}{_LzwQi1alW@JV*Fcp`}y1iH~O!Or*my z&-*hW?BNy1bsEeVYG6R^hmgyLrY@tsZF9gdST@{an8QXt27DmsVua$x zU^Lzrj2a;`o=6(O)ClX35ATSE&2UJ)zpkOq-iQa1j9?-W+y&tsGqH;eB!a_XBa|8* z-UXB#&A=c~o@rA@@X>Hn6I2t4h7=qkYM!nG}oDwA^skmkFxn#M7)G-xmt1F*Uhs*bMf8G!vE_qFf{fLBSnN zjm6Ed3U{Z<3=RryFqTsLQV|GuM?y?RZ77%=Vrpnt4E$LVVurkAXE>3J#AA7i0cDAB zG>8O|+YvRH%HxD8WYxhqsAhNst~^$$CgME)sD_8cq#6o=6VfcIHM=YZ<+t~P8B`M- zj`Twt;wHKW1cR9>#3Gpr^L!ZQuFdN3#UXs(!6TVjA88*)-*sqTPoB{>H+>xx+)LB? z8gOc$Wxty!T+3bxvRR(1hHEaL_JyW!xI(g*`S||5343p<|BzGTj6(wG{-`w?s^@o67CCHT}&s$cH^6N29; z9Mbv9jTJ)5&m}&+Pj?9Z@1+|~^^(6|N_;whuMic{Ih5?>{{LF=>Hg98 zA)nya6H!RH{@+P_`c6sTFKZ>fT>lA)Pv?!pqW+I1zC3<^fpXlt;xmMa;tljYQ?{4& zbHFKwAMxq@QXw|Pvc0VT6S#Pbh)?GP<#Y1?4P3m{#HaHReQ%x+_g_qh%>1GIa7e13 zzVA$9ry$AgC7tAlV3XVa%=t=GprDhSL_CtyP?pQ5eW)V%)J}3iJkn<%gBbN6Kht3H z38HK-hJ)MS1WAosPLkUpQ+@1IcLtyotd3;{I&M34!_SQxcJ4rg1FfVT|&-Vi2Yk7tFUIVR_J1z zxJgt1DaWJB7NSm#>5?+dv{K0hK+Etn`yHU!ugeP4n;aNDIE6hVO8pgzuBr~*xZYuz z3K5n7>5;D@C|S_`PDRlNl^^>RWj$g^ZwO>@zL1mi7Ip zlPAAaefv%O9$J3psVM34gX$+PQ;@v2g!Ch;;2Q973Hf_g!7l?ZWuLGx9&foHK-dd{ z|1q9Yc3xTq|K%#Uz;_rONu}*{EJ?G!OPHO}ZZmGBt~uS_hXPQ?dZA1Lpa zBi6sLlmlWNK*Ekn-Y;$>A(W-6{gTpN}%b2=cX*^#3{@SoGj-9c~7ii-cQ_okyYo=?GYymHe~B(-0SD zBtHaxWCpw}^>24hzr4?wzGzHcy3!ZzoIex7iD=B9ovkD?9|u|ZIu!poQnjs3h*Ks8 zJYdv32x3ev1&!%94s1O|rf8VegQuw>cLBmjrTxJ<8r6u#{BzVkU_ADYG;nq~00YMK z731u}Zo~J2@$#~Lecsx7wpO)G49+?IAGyZ||3$WX0E!DqI5zk~`8$=onjfh&)BBQUe3$8xtYl4 zBM(HTbCH2awCltzJ>_A1oD(%f_jXQS?VNtK>()2qT0Z+>VBvGr{js<0aQ$oiJ-epg z?3%vX1`D~3uNzZyKI4wJvTxEte`qlBaAYvDFJjKk6u$p^SpU+V+6uJ)KdRJbGwIq4 zjytP%cp~h<=Bu_zw3A-@%Y?>xMOzGrlz;!s+gH1a@vC0aZ%N3$Y#T zB!B+jx!fel216aeP4`u;f3)(5*uCYh+jedL48bHrW4alB{g!}8Fm&ACdQFA@9C~)z z zD7sXx%NqR*P}zv1oXTeT#tT1pR5*OZ7MEpP9z`moe4NR zopn@B`E??K?>5_&!|NrAdzYfuE6OB)q~hnE3ZDUd@!)fg?rT(TbO>%Lx~wtYr+D_8 z`{O$p^EhVYc!ZM2@hf@m_ln{#l{xlRcmH$3ajdtarV7W84n-eObVShuiXK265Y0|J*%wZGks z0sQ*%zAwhF7j!-LmVmec`Il1ojrn-XtrMVKul98@zF8P0@hyU```!}BpIU_$I$p}e zySW15)aX3)iIx7-Ip{}n<-F&+(0NFB$aC&eK7w%XdE6%L7yRUNd9TD*&gWrehtGGg zvK+_TSK_<;2zaS+od!<+d{_A??`*(ckaj|XuI^N}%Qx9BZRb_sK4d&X>vbjRkiSZN z<-AdADS!SU)mE-UKRWi6`0ktJL|wOHz1^yC@A|x3+F7~Y8gWpE@vG)tKkbk&mB%?C zaeQAjKYY&Lfy%X*&snt|_-=iC6+2G@56dwZzkaa_eni??xvyW6c(D!Q-dV-YI`~*q^ccpxM75o_RYX9aH`|(=}@AK@_?@K$FPvilpSn@5z z&sMSj67Y~H>?0*E=-xp1evkdvr2I;ME~_IV%5ON$5VqCkuvAMCd zkU5e_CXhHw#}1iR(oP=|Bk9-#GIiOBi9=9vaV8`w$5s$sJznjOboRhmmAON{ZP%{m z+hMMwKhoW9w)eDAHc<|X>qzXH?S>LC+WLjLr>nOm(q;B`bnI=9n$bv0S34;cc@ZxL zWTH}-ZC~h#ba%G8vV*H-8g<>325f*anK2yBWaYfL3~Y(-USyFE*5++=^ z$dAmycJ?BL8BZk5Y{tTPDP3DS-)hEVcFak4x;-ysP`!Q^@~J9$>J>1N4bFe9cqV0z z#gcKE7tYTUeGYeTD%HEf(oiPDu36-#kO^6#We!c)u^~`9?a(o!Dy&zqbabqbr5gbArMMQuQh8-?TN8Cj4Z6NzE?kg~}< z5SjuFlOi;1(+O-nc`W?bFS;k-Xu@x>Q~3VN|2N~fNi|DZt`q$%9*R|1KkC=P75*<3 zmR#Y*=R70zsJQj{K5Z+5{JYQcUi~&STt#fd{h##fQuL$(*#B~g7UDm}iXK!bmSg=> zejOaeeUgYunj9302dV0f!yW)eu^#K63FzPi?(>q!bKj{sZ)GkI?L&=XHP+|*{v|cg z8DJ$$yez{}n9g9!FiVKF1GzN*^~}S-5}JXZ$EyNx#Jr z%f}fq;|`4DUD78Vul^IjXimsKDjbh2sSY`gcUqmkxK4B$k6S-np%aYwMG_%%g-%tz zL#od7JK){=9N)|+efF14c=_*n^!eU3tMt=6v7Ua}-VZ$boZr}}0(_41S)S(FU49CN z{O4}?J{4AqKXePD9`^7*2k+MB{{!>?hwt{td;6#RyIVgWr>TU=Mrw2w@BE!ZTM&=h zE`@lGKoqaMm#2Gw6&}{-xUcdP>i-40HzK`hSBieQMU{IFkRLe?g63ErSI9^w0m_TcSasc*n~;Q;JvI{^#RT)qx?c6ke>ybjhR7@rR-G*-y5>dd$=RF$v@G zbDaC2QuNBJ>0osc069&swH-{8SnpJ_GPxo@{Br{{!?yi`@VK literal 0 HcmV?d00001 diff --git a/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CMakeFortranCompiler.cmake b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CMakeFortranCompiler.cmake new file mode 100644 index 00000000..fff89a77 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CMakeFortranCompiler.cmake @@ -0,0 +1,59 @@ +set(CMAKE_Fortran_COMPILER "/usr/bin/gfortran") +set(CMAKE_Fortran_COMPILER_ARG1 "") +set(CMAKE_Fortran_COMPILER_ID "GNU") +set(CMAKE_Fortran_COMPILER_VERSION "5.4.0") +set(CMAKE_Fortran_COMPILER_WRAPPER "") +set(CMAKE_Fortran_PLATFORM_ID "") +set(CMAKE_Fortran_SIMULATE_ID "") +set(CMAKE_Fortran_SIMULATE_VERSION "") + +set(CMAKE_AR "/usr/bin/ar") +set(CMAKE_RANLIB "/usr/bin/ranlib") +set(CMAKE_COMPILER_IS_GNUG77 1) +set(CMAKE_Fortran_COMPILER_LOADED 1) +set(CMAKE_Fortran_COMPILER_WORKS TRUE) +set(CMAKE_Fortran_ABI_COMPILED TRUE) +set(CMAKE_COMPILER_IS_MINGW ) +set(CMAKE_COMPILER_IS_CYGWIN ) +if(CMAKE_COMPILER_IS_CYGWIN) + set(CYGWIN 1) + set(UNIX 1) +endif() + +set(CMAKE_Fortran_COMPILER_ENV_VAR "FC") + +set(CMAKE_Fortran_COMPILER_SUPPORTS_F90 1) + +if(CMAKE_COMPILER_IS_MINGW) + set(MINGW 1) +endif() +set(CMAKE_Fortran_COMPILER_ID_RUN 1) +set(CMAKE_Fortran_SOURCE_FILE_EXTENSIONS f;F;f77;F77;f90;F90;for;For;FOR;f95;F95) +set(CMAKE_Fortran_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) +set(CMAKE_Fortran_LINKER_PREFERENCE 20) +if(UNIX) + set(CMAKE_Fortran_OUTPUT_EXTENSION .o) +else() + set(CMAKE_Fortran_OUTPUT_EXTENSION .obj) +endif() + +# Save compiler ABI information. +set(CMAKE_Fortran_SIZEOF_DATA_PTR "8") +set(CMAKE_Fortran_COMPILER_ABI "") +set(CMAKE_Fortran_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") + +if(CMAKE_Fortran_SIZEOF_DATA_PTR AND NOT CMAKE_SIZEOF_VOID_P) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_Fortran_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_Fortran_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_Fortran_COMPILER_ABI}") +endif() + +if(CMAKE_Fortran_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") +endif() + +set(CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "gfortran;m;quadmath;m;c") +set(CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") +set(CMAKE_Fortran_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CMakeSystem.cmake b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CMakeSystem.cmake new file mode 100644 index 00000000..84375768 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CMakeSystem.cmake @@ -0,0 +1,15 @@ +set(CMAKE_HOST_SYSTEM "Linux-4.4.0-104-generic") +set(CMAKE_HOST_SYSTEM_NAME "Linux") +set(CMAKE_HOST_SYSTEM_VERSION "4.4.0-104-generic") +set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") + + + +set(CMAKE_SYSTEM "Linux-4.4.0-104-generic") +set(CMAKE_SYSTEM_NAME "Linux") +set(CMAKE_SYSTEM_VERSION "4.4.0-104-generic") +set(CMAKE_SYSTEM_PROCESSOR "x86_64") + +set(CMAKE_CROSSCOMPILING "FALSE") + +set(CMAKE_SYSTEM_LOADED 1) diff --git a/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CompilerIdC/CMakeCCompilerId.c b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CompilerIdC/CMakeCCompilerId.c new file mode 100644 index 00000000..570a15e9 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CompilerIdC/CMakeCCompilerId.c @@ -0,0 +1,544 @@ +#ifdef __cplusplus +# error "A C++ compiler has been selected for C." +#endif + +#if defined(__18CXX) +# define ID_VOID_MAIN +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif + /* __INTEL_COMPILER = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_C) +# define COMPILER_ID "SunPro" +# if __SUNPRO_C >= 0x5100 + /* __SUNPRO_C = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# endif + +#elif defined(__HP_cc) +# define COMPILER_ID "HP" + /* __HP_cc = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100) + +#elif defined(__DECC) +# define COMPILER_ID "Compaq" + /* __DECC_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000) + +#elif defined(__IBMC__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800 +# define COMPILER_ID "XL" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version) +# define COMPILER_ID "Fujitsu" + +#elif defined(__TINYC__) +# define COMPILER_ID "TinyCC" + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__GNUC__) +# define COMPILER_ID "GNU" +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +# define COMPILER_ID "ADSP" +#if defined(__VISUALDSPVERSION__) + /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ +# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) +# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" + +#elif defined(__ARMCC_VERSION) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(SDCC) +# define COMPILER_ID "SDCC" + /* SDCC = VRP */ +# define COMPILER_VERSION_MAJOR DEC(SDCC/100) +# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10) +# define COMPILER_VERSION_PATCH DEC(SDCC % 10) + +#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) +# define COMPILER_ID "MIPSpro" +# if defined(_SGI_COMPILER_VERSION) + /* _SGI_COMPILER_VERSION = VRP */ +# define COMPILER_VERSION_MAJOR DEC(_SGI_COMPILER_VERSION/100) +# define COMPILER_VERSION_MINOR DEC(_SGI_COMPILER_VERSION/10 % 10) +# define COMPILER_VERSION_PATCH DEC(_SGI_COMPILER_VERSION % 10) +# else + /* _COMPILER_VERSION = VRP */ +# define COMPILER_VERSION_MAJOR DEC(_COMPILER_VERSION/100) +# define COMPILER_VERSION_MINOR DEC(_COMPILER_VERSION/10 % 10) +# define COMPILER_VERSION_PATCH DEC(_COMPILER_VERSION % 10) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__sgi) +# define COMPILER_ID "MIPSpro" + +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXE) || defined(__CRAYXC) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__sgi) || defined(__sgi__) || defined(_SGI) +# define PLATFORM_ID "IRIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# else /* unknown platform */ +# define PLATFORM_ID "" +# endif + +#else /* unknown platform */ +# define PLATFORM_ID "" + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID "" +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number components. */ +#ifdef COMPILER_VERSION_MAJOR +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + + +const char* info_language_dialect_default = "INFO" ":" "dialect_default[" +#if !defined(__STDC_VERSION__) + "90" +#elif __STDC_VERSION__ >= 201000L + "11" +#elif __STDC_VERSION__ >= 199901L + "99" +#else +#endif +"]"; + +/*--------------------------------------------------------------------------*/ + +#ifdef ID_VOID_MAIN +void main() {} +#else +int main(int argc, char* argv[]) +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; + require += info_arch[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXE) || defined(__CRAYXC) + require += info_cray[argc]; +#endif + require += info_language_dialect_default[argc]; + (void)argv; + return require; +} +#endif diff --git a/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CompilerIdFortran/CMakeFortranCompilerId.F b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CompilerIdFortran/CMakeFortranCompilerId.F new file mode 100644 index 00000000..0e149618 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CompilerIdFortran/CMakeFortranCompilerId.F @@ -0,0 +1,1048 @@ + PROGRAM CMakeFortranCompilerId +#if 0 +! Identify the compiler +#endif +#if defined(__INTEL_COMPILER) || defined(__ICC) + PRINT *, 'INFO:compiler[Intel]' +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif + +# if defined(_MSC_VER) + PRINT *, 'INFO:simulate[MSVC]' +# if _MSC_VER >= 1900 + PRINT *, 'INFO:simulate_version[019.00]' +# elif _MSC_VER >= 1800 + PRINT *, 'INFO:simulate_version[018.00]' +# elif _MSC_VER >= 1700 + PRINT *, 'INFO:simulate_version[017.00]' +# elif _MSC_VER >= 1600 + PRINT *, 'INFO:simulate_version[016.00]' +# elif _MSC_VER >= 1500 + PRINT *, 'INFO:simulate_version[015.00]' +# elif _MSC_VER >= 1400 + PRINT *, 'INFO:simulate_version[014.00]' +# elif _MSC_VER >= 1310 + PRINT *, 'INFO:simulate_version[013.01]' +# else + PRINT *, 'INFO:simulate_version[013.00]' +# endif +# endif +#elif defined(__SUNPRO_F95) + PRINT *, 'INFO:compiler[SunPro]' +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_F95>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_F95>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_F95 & 0xF) +#elif defined(__SUNPRO_F90) + PRINT *, 'INFO:compiler[SunPro]' +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_F90>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_F90>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_F90 & 0xF) +#elif defined(_CRAYFTN) + PRINT *, 'INFO:compiler[Cray]' +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) +#elif defined(__G95__) + PRINT *, 'INFO:compiler[G95]' +# define COMPILER_VERSION_MAJOR DEC(__G95__) +# define COMPILER_VERSION_MINOR DEC(__G95_MINOR__) +#elif defined(__PATHSCALE__) + PRINT *, 'INFO:compiler[PathScale]' +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif +#elif defined(__ABSOFT__) + PRINT *, 'INFO:compiler[Absoft]' +#elif defined(__GNUC__) + PRINT *, 'INFO:compiler[GNU]' +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif +#elif defined(__IBMC__) +# if defined(__COMPILER_VER__) + PRINT *, 'INFO:compiler[zOS]' +# elif __IBMC__ >= 800 + PRINT *, 'INFO:compiler[XL]' +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) +# else + PRINT *, 'INFO:compiler[VisualAge]' +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) +# endif +#elif defined(__PGI) + PRINT *, 'INFO:compiler[PGI]' +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif +#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) + PRINT *, 'INFO:compiler[MIPSpro]' +# if 0 +! This compiler is either not known or is too old to define an +! identification macro. Try to identify the platform and guess that +! it is the native compiler. +# endif +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) + PRINT *, 'INFO:compiler[VisualAge]' +#elif defined(__sgi) || defined(__sgi__) || defined(_SGI) + PRINT *, 'INFO:compiler[MIPSpro]' +#elif defined(__hpux) || defined(__hpux__) + PRINT *, 'INFO:compiler[HP]' +#elif 1 +# if 0 +! The above 'elif 1' instead of 'else' is to work around a bug in the +! SGI preprocessor which produces both the __sgi and else blocks. +# endif + PRINT *, 'INFO:compiler[]' +#endif +#if defined(__CRAYXE) || defined(__CRAYXC) + PRINT *, 'INFO:compiler_wrapper[CrayPrgEnv]' +#endif + +#if 0 +! Identify the platform +#endif +#if defined(__linux) || defined(__linux__) || defined(linux) + PRINT *, 'INFO:platform[Linux]' +#elif defined(__CYGWIN__) + PRINT *, 'INFO:platform[Cygwin]' +#elif defined(__MINGW32__) + PRINT *, 'INFO:platform[MinGW]' +#elif defined(__APPLE__) + PRINT *, 'INFO:platform[Darwin]' +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) + PRINT *, 'INFO:platform[Windows]' +#elif defined(__FreeBSD__) || defined(__FreeBSD) + PRINT *, 'INFO:platform[FreeBSD]' +#elif defined(__NetBSD__) || defined(__NetBSD) + PRINT *, 'INFO:platform[NetBSD]' +#elif defined(__OpenBSD__) || defined(__OPENBSD) + PRINT *, 'INFO:platform[OpenBSD]' +#elif defined(__sun) || defined(sun) + PRINT *, 'INFO:platform[SunOS]' +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) + PRINT *, 'INFO:platform[AIX]' +#elif defined(__sgi) || defined(__sgi__) || defined(_SGI) + PRINT *, 'INFO:platform[IRIX]' +#elif defined(__hpux) || defined(__hpux__) + PRINT *, 'INFO:platform[HP-UX]' +#elif defined(__HAIKU__) + PRINT *, 'INFO:platform[Haiku]' +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) + PRINT *, 'INFO:platform[BeOS]' +#elif defined(__QNX__) || defined(__QNXNTO__) + PRINT *, 'INFO:platform[QNX]' +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) + PRINT *, 'INFO:platform[Tru64]' +#elif defined(__riscos) || defined(__riscos__) + PRINT *, 'INFO:platform[RISCos]' +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) + PRINT *, 'INFO:platform[SINIX]' +#elif defined(__UNIX_SV__) + PRINT *, 'INFO:platform[UNIX_SV]' +#elif defined(__bsdos__) + PRINT *, 'INFO:platform[BSDOS]' +#elif defined(_MPRAS) || defined(MPRAS) + PRINT *, 'INFO:platform[MP-RAS]' +#elif defined(__osf) || defined(__osf__) + PRINT *, 'INFO:platform[OSF1]' +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) + PRINT *, 'INFO:platform[SCO_SV]' +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) + PRINT *, 'INFO:platform[ULTRIX]' +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) + PRINT *, 'INFO:platform[Xenix]' +#elif 1 +# if 0 +! The above 'elif 1' instead of 'else' is to work around a bug in the +! SGI preprocessor which produces both the __sgi and else blocks. +# endif + PRINT *, 'INFO:platform[]' +#endif +#if defined(_WIN32) && (defined(__INTEL_COMPILER) || defined(__ICC)) +# if defined(_M_IA64) + PRINT *, 'INFO:arch[IA64]' +# elif defined(_M_X64) || defined(_M_AMD64) + PRINT *, 'INFO:arch[x64]' +# elif defined(_M_IX86) + PRINT *, 'INFO:arch[X86]' +# endif +#endif + +#if 0 +! Encode compiler version digits +#endif +#define DEC_8(n) (((n) / 10000000) % 10) +#define DEC_7(n) (((n) / 1000000) % 10) +#define DEC_6(n) (((n) / 100000) % 10) +#define DEC_5(n) (((n) / 10000) % 10) +#define DEC_4(n) (((n) / 1000) % 10) +#define DEC_3(n) (((n) / 100) % 10) +#define DEC_2(n) (((n) / 10) % 10) +#define DEC_1(n) (((n) ) % 10) +#define HEX_8(n) ((n)>>28 & 0xF) +#define HEX_7(n) ((n)>>24 & 0xF) +#define HEX_6(n) ((n)>>20 & 0xF) +#define HEX_5(n) ((n)>>16 & 0xF) +#define HEX_4(n) ((n)>>12 & 0xF) +#define HEX_3(n) ((n)>>8 & 0xF) +#define HEX_2(n) ((n)>>4 & 0xF) +#define HEX_1(n) ((n) & 0xF) + +#if defined(COMPILER_VERSION_MAJOR) +# undef DEC +# undef HEX +# define DEC(n) DEC_1(n) +# define HEX(n) HEX_1(n) +# if COMPILER_VERSION_MAJOR == 0 + PRINT *, 'INFO:compiler_version_MAJOR_digit_1[0]' +# elif COMPILER_VERSION_MAJOR == 1 + PRINT *, 'INFO:compiler_version_MAJOR_digit_1[1]' +# elif COMPILER_VERSION_MAJOR == 2 + PRINT *, 'INFO:compiler_version_MAJOR_digit_1[2]' +# elif COMPILER_VERSION_MAJOR == 3 + PRINT *, 'INFO:compiler_version_MAJOR_digit_1[3]' +# elif COMPILER_VERSION_MAJOR == 4 + PRINT *, 'INFO:compiler_version_MAJOR_digit_1[4]' +# elif COMPILER_VERSION_MAJOR == 5 + PRINT *, 'INFO:compiler_version_MAJOR_digit_1[5]' +# elif COMPILER_VERSION_MAJOR == 6 + PRINT *, 'INFO:compiler_version_MAJOR_digit_1[6]' +# elif COMPILER_VERSION_MAJOR == 7 + PRINT *, 'INFO:compiler_version_MAJOR_digit_1[7]' +# elif COMPILER_VERSION_MAJOR == 8 + PRINT *, 'INFO:compiler_version_MAJOR_digit_1[8]' +# elif COMPILER_VERSION_MAJOR == 9 + PRINT *, 'INFO:compiler_version_MAJOR_digit_1[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_2(n) +# define HEX(n) HEX_2(n) +# if COMPILER_VERSION_MAJOR == 0 + PRINT *, 'INFO:compiler_version_MAJOR_digit_2[0]' +# elif COMPILER_VERSION_MAJOR == 1 + PRINT *, 'INFO:compiler_version_MAJOR_digit_2[1]' +# elif COMPILER_VERSION_MAJOR == 2 + PRINT *, 'INFO:compiler_version_MAJOR_digit_2[2]' +# elif COMPILER_VERSION_MAJOR == 3 + PRINT *, 'INFO:compiler_version_MAJOR_digit_2[3]' +# elif COMPILER_VERSION_MAJOR == 4 + PRINT *, 'INFO:compiler_version_MAJOR_digit_2[4]' +# elif COMPILER_VERSION_MAJOR == 5 + PRINT *, 'INFO:compiler_version_MAJOR_digit_2[5]' +# elif COMPILER_VERSION_MAJOR == 6 + PRINT *, 'INFO:compiler_version_MAJOR_digit_2[6]' +# elif COMPILER_VERSION_MAJOR == 7 + PRINT *, 'INFO:compiler_version_MAJOR_digit_2[7]' +# elif COMPILER_VERSION_MAJOR == 8 + PRINT *, 'INFO:compiler_version_MAJOR_digit_2[8]' +# elif COMPILER_VERSION_MAJOR == 9 + PRINT *, 'INFO:compiler_version_MAJOR_digit_2[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_3(n) +# define HEX(n) HEX_3(n) +# if COMPILER_VERSION_MAJOR == 0 + PRINT *, 'INFO:compiler_version_MAJOR_digit_3[0]' +# elif COMPILER_VERSION_MAJOR == 1 + PRINT *, 'INFO:compiler_version_MAJOR_digit_3[1]' +# elif COMPILER_VERSION_MAJOR == 2 + PRINT *, 'INFO:compiler_version_MAJOR_digit_3[2]' +# elif COMPILER_VERSION_MAJOR == 3 + PRINT *, 'INFO:compiler_version_MAJOR_digit_3[3]' +# elif COMPILER_VERSION_MAJOR == 4 + PRINT *, 'INFO:compiler_version_MAJOR_digit_3[4]' +# elif COMPILER_VERSION_MAJOR == 5 + PRINT *, 'INFO:compiler_version_MAJOR_digit_3[5]' +# elif COMPILER_VERSION_MAJOR == 6 + PRINT *, 'INFO:compiler_version_MAJOR_digit_3[6]' +# elif COMPILER_VERSION_MAJOR == 7 + PRINT *, 'INFO:compiler_version_MAJOR_digit_3[7]' +# elif COMPILER_VERSION_MAJOR == 8 + PRINT *, 'INFO:compiler_version_MAJOR_digit_3[8]' +# elif COMPILER_VERSION_MAJOR == 9 + PRINT *, 'INFO:compiler_version_MAJOR_digit_3[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_4(n) +# define HEX(n) HEX_4(n) +# if COMPILER_VERSION_MAJOR == 0 + PRINT *, 'INFO:compiler_version_MAJOR_digit_4[0]' +# elif COMPILER_VERSION_MAJOR == 1 + PRINT *, 'INFO:compiler_version_MAJOR_digit_4[1]' +# elif COMPILER_VERSION_MAJOR == 2 + PRINT *, 'INFO:compiler_version_MAJOR_digit_4[2]' +# elif COMPILER_VERSION_MAJOR == 3 + PRINT *, 'INFO:compiler_version_MAJOR_digit_4[3]' +# elif COMPILER_VERSION_MAJOR == 4 + PRINT *, 'INFO:compiler_version_MAJOR_digit_4[4]' +# elif COMPILER_VERSION_MAJOR == 5 + PRINT *, 'INFO:compiler_version_MAJOR_digit_4[5]' +# elif COMPILER_VERSION_MAJOR == 6 + PRINT *, 'INFO:compiler_version_MAJOR_digit_4[6]' +# elif COMPILER_VERSION_MAJOR == 7 + PRINT *, 'INFO:compiler_version_MAJOR_digit_4[7]' +# elif COMPILER_VERSION_MAJOR == 8 + PRINT *, 'INFO:compiler_version_MAJOR_digit_4[8]' +# elif COMPILER_VERSION_MAJOR == 9 + PRINT *, 'INFO:compiler_version_MAJOR_digit_4[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_5(n) +# define HEX(n) HEX_5(n) +# if COMPILER_VERSION_MAJOR == 0 + PRINT *, 'INFO:compiler_version_MAJOR_digit_5[0]' +# elif COMPILER_VERSION_MAJOR == 1 + PRINT *, 'INFO:compiler_version_MAJOR_digit_5[1]' +# elif COMPILER_VERSION_MAJOR == 2 + PRINT *, 'INFO:compiler_version_MAJOR_digit_5[2]' +# elif COMPILER_VERSION_MAJOR == 3 + PRINT *, 'INFO:compiler_version_MAJOR_digit_5[3]' +# elif COMPILER_VERSION_MAJOR == 4 + PRINT *, 'INFO:compiler_version_MAJOR_digit_5[4]' +# elif COMPILER_VERSION_MAJOR == 5 + PRINT *, 'INFO:compiler_version_MAJOR_digit_5[5]' +# elif COMPILER_VERSION_MAJOR == 6 + PRINT *, 'INFO:compiler_version_MAJOR_digit_5[6]' +# elif COMPILER_VERSION_MAJOR == 7 + PRINT *, 'INFO:compiler_version_MAJOR_digit_5[7]' +# elif COMPILER_VERSION_MAJOR == 8 + PRINT *, 'INFO:compiler_version_MAJOR_digit_5[8]' +# elif COMPILER_VERSION_MAJOR == 9 + PRINT *, 'INFO:compiler_version_MAJOR_digit_5[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_6(n) +# define HEX(n) HEX_6(n) +# if COMPILER_VERSION_MAJOR == 0 + PRINT *, 'INFO:compiler_version_MAJOR_digit_6[0]' +# elif COMPILER_VERSION_MAJOR == 1 + PRINT *, 'INFO:compiler_version_MAJOR_digit_6[1]' +# elif COMPILER_VERSION_MAJOR == 2 + PRINT *, 'INFO:compiler_version_MAJOR_digit_6[2]' +# elif COMPILER_VERSION_MAJOR == 3 + PRINT *, 'INFO:compiler_version_MAJOR_digit_6[3]' +# elif COMPILER_VERSION_MAJOR == 4 + PRINT *, 'INFO:compiler_version_MAJOR_digit_6[4]' +# elif COMPILER_VERSION_MAJOR == 5 + PRINT *, 'INFO:compiler_version_MAJOR_digit_6[5]' +# elif COMPILER_VERSION_MAJOR == 6 + PRINT *, 'INFO:compiler_version_MAJOR_digit_6[6]' +# elif COMPILER_VERSION_MAJOR == 7 + PRINT *, 'INFO:compiler_version_MAJOR_digit_6[7]' +# elif COMPILER_VERSION_MAJOR == 8 + PRINT *, 'INFO:compiler_version_MAJOR_digit_6[8]' +# elif COMPILER_VERSION_MAJOR == 9 + PRINT *, 'INFO:compiler_version_MAJOR_digit_6[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_7(n) +# define HEX(n) HEX_7(n) +# if COMPILER_VERSION_MAJOR == 0 + PRINT *, 'INFO:compiler_version_MAJOR_digit_7[0]' +# elif COMPILER_VERSION_MAJOR == 1 + PRINT *, 'INFO:compiler_version_MAJOR_digit_7[1]' +# elif COMPILER_VERSION_MAJOR == 2 + PRINT *, 'INFO:compiler_version_MAJOR_digit_7[2]' +# elif COMPILER_VERSION_MAJOR == 3 + PRINT *, 'INFO:compiler_version_MAJOR_digit_7[3]' +# elif COMPILER_VERSION_MAJOR == 4 + PRINT *, 'INFO:compiler_version_MAJOR_digit_7[4]' +# elif COMPILER_VERSION_MAJOR == 5 + PRINT *, 'INFO:compiler_version_MAJOR_digit_7[5]' +# elif COMPILER_VERSION_MAJOR == 6 + PRINT *, 'INFO:compiler_version_MAJOR_digit_7[6]' +# elif COMPILER_VERSION_MAJOR == 7 + PRINT *, 'INFO:compiler_version_MAJOR_digit_7[7]' +# elif COMPILER_VERSION_MAJOR == 8 + PRINT *, 'INFO:compiler_version_MAJOR_digit_7[8]' +# elif COMPILER_VERSION_MAJOR == 9 + PRINT *, 'INFO:compiler_version_MAJOR_digit_7[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_8(n) +# define HEX(n) HEX_8(n) +# if COMPILER_VERSION_MAJOR == 0 + PRINT *, 'INFO:compiler_version_MAJOR_digit_8[0]' +# elif COMPILER_VERSION_MAJOR == 1 + PRINT *, 'INFO:compiler_version_MAJOR_digit_8[1]' +# elif COMPILER_VERSION_MAJOR == 2 + PRINT *, 'INFO:compiler_version_MAJOR_digit_8[2]' +# elif COMPILER_VERSION_MAJOR == 3 + PRINT *, 'INFO:compiler_version_MAJOR_digit_8[3]' +# elif COMPILER_VERSION_MAJOR == 4 + PRINT *, 'INFO:compiler_version_MAJOR_digit_8[4]' +# elif COMPILER_VERSION_MAJOR == 5 + PRINT *, 'INFO:compiler_version_MAJOR_digit_8[5]' +# elif COMPILER_VERSION_MAJOR == 6 + PRINT *, 'INFO:compiler_version_MAJOR_digit_8[6]' +# elif COMPILER_VERSION_MAJOR == 7 + PRINT *, 'INFO:compiler_version_MAJOR_digit_8[7]' +# elif COMPILER_VERSION_MAJOR == 8 + PRINT *, 'INFO:compiler_version_MAJOR_digit_8[8]' +# elif COMPILER_VERSION_MAJOR == 9 + PRINT *, 'INFO:compiler_version_MAJOR_digit_8[9]' +# endif + +#endif +#if defined(COMPILER_VERSION_MINOR) +# undef DEC +# undef HEX +# define DEC(n) DEC_1(n) +# define HEX(n) HEX_1(n) +# if COMPILER_VERSION_MINOR == 0 + PRINT *, 'INFO:compiler_version_MINOR_digit_1[0]' +# elif COMPILER_VERSION_MINOR == 1 + PRINT *, 'INFO:compiler_version_MINOR_digit_1[1]' +# elif COMPILER_VERSION_MINOR == 2 + PRINT *, 'INFO:compiler_version_MINOR_digit_1[2]' +# elif COMPILER_VERSION_MINOR == 3 + PRINT *, 'INFO:compiler_version_MINOR_digit_1[3]' +# elif COMPILER_VERSION_MINOR == 4 + PRINT *, 'INFO:compiler_version_MINOR_digit_1[4]' +# elif COMPILER_VERSION_MINOR == 5 + PRINT *, 'INFO:compiler_version_MINOR_digit_1[5]' +# elif COMPILER_VERSION_MINOR == 6 + PRINT *, 'INFO:compiler_version_MINOR_digit_1[6]' +# elif COMPILER_VERSION_MINOR == 7 + PRINT *, 'INFO:compiler_version_MINOR_digit_1[7]' +# elif COMPILER_VERSION_MINOR == 8 + PRINT *, 'INFO:compiler_version_MINOR_digit_1[8]' +# elif COMPILER_VERSION_MINOR == 9 + PRINT *, 'INFO:compiler_version_MINOR_digit_1[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_2(n) +# define HEX(n) HEX_2(n) +# if COMPILER_VERSION_MINOR == 0 + PRINT *, 'INFO:compiler_version_MINOR_digit_2[0]' +# elif COMPILER_VERSION_MINOR == 1 + PRINT *, 'INFO:compiler_version_MINOR_digit_2[1]' +# elif COMPILER_VERSION_MINOR == 2 + PRINT *, 'INFO:compiler_version_MINOR_digit_2[2]' +# elif COMPILER_VERSION_MINOR == 3 + PRINT *, 'INFO:compiler_version_MINOR_digit_2[3]' +# elif COMPILER_VERSION_MINOR == 4 + PRINT *, 'INFO:compiler_version_MINOR_digit_2[4]' +# elif COMPILER_VERSION_MINOR == 5 + PRINT *, 'INFO:compiler_version_MINOR_digit_2[5]' +# elif COMPILER_VERSION_MINOR == 6 + PRINT *, 'INFO:compiler_version_MINOR_digit_2[6]' +# elif COMPILER_VERSION_MINOR == 7 + PRINT *, 'INFO:compiler_version_MINOR_digit_2[7]' +# elif COMPILER_VERSION_MINOR == 8 + PRINT *, 'INFO:compiler_version_MINOR_digit_2[8]' +# elif COMPILER_VERSION_MINOR == 9 + PRINT *, 'INFO:compiler_version_MINOR_digit_2[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_3(n) +# define HEX(n) HEX_3(n) +# if COMPILER_VERSION_MINOR == 0 + PRINT *, 'INFO:compiler_version_MINOR_digit_3[0]' +# elif COMPILER_VERSION_MINOR == 1 + PRINT *, 'INFO:compiler_version_MINOR_digit_3[1]' +# elif COMPILER_VERSION_MINOR == 2 + PRINT *, 'INFO:compiler_version_MINOR_digit_3[2]' +# elif COMPILER_VERSION_MINOR == 3 + PRINT *, 'INFO:compiler_version_MINOR_digit_3[3]' +# elif COMPILER_VERSION_MINOR == 4 + PRINT *, 'INFO:compiler_version_MINOR_digit_3[4]' +# elif COMPILER_VERSION_MINOR == 5 + PRINT *, 'INFO:compiler_version_MINOR_digit_3[5]' +# elif COMPILER_VERSION_MINOR == 6 + PRINT *, 'INFO:compiler_version_MINOR_digit_3[6]' +# elif COMPILER_VERSION_MINOR == 7 + PRINT *, 'INFO:compiler_version_MINOR_digit_3[7]' +# elif COMPILER_VERSION_MINOR == 8 + PRINT *, 'INFO:compiler_version_MINOR_digit_3[8]' +# elif COMPILER_VERSION_MINOR == 9 + PRINT *, 'INFO:compiler_version_MINOR_digit_3[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_4(n) +# define HEX(n) HEX_4(n) +# if COMPILER_VERSION_MINOR == 0 + PRINT *, 'INFO:compiler_version_MINOR_digit_4[0]' +# elif COMPILER_VERSION_MINOR == 1 + PRINT *, 'INFO:compiler_version_MINOR_digit_4[1]' +# elif COMPILER_VERSION_MINOR == 2 + PRINT *, 'INFO:compiler_version_MINOR_digit_4[2]' +# elif COMPILER_VERSION_MINOR == 3 + PRINT *, 'INFO:compiler_version_MINOR_digit_4[3]' +# elif COMPILER_VERSION_MINOR == 4 + PRINT *, 'INFO:compiler_version_MINOR_digit_4[4]' +# elif COMPILER_VERSION_MINOR == 5 + PRINT *, 'INFO:compiler_version_MINOR_digit_4[5]' +# elif COMPILER_VERSION_MINOR == 6 + PRINT *, 'INFO:compiler_version_MINOR_digit_4[6]' +# elif COMPILER_VERSION_MINOR == 7 + PRINT *, 'INFO:compiler_version_MINOR_digit_4[7]' +# elif COMPILER_VERSION_MINOR == 8 + PRINT *, 'INFO:compiler_version_MINOR_digit_4[8]' +# elif COMPILER_VERSION_MINOR == 9 + PRINT *, 'INFO:compiler_version_MINOR_digit_4[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_5(n) +# define HEX(n) HEX_5(n) +# if COMPILER_VERSION_MINOR == 0 + PRINT *, 'INFO:compiler_version_MINOR_digit_5[0]' +# elif COMPILER_VERSION_MINOR == 1 + PRINT *, 'INFO:compiler_version_MINOR_digit_5[1]' +# elif COMPILER_VERSION_MINOR == 2 + PRINT *, 'INFO:compiler_version_MINOR_digit_5[2]' +# elif COMPILER_VERSION_MINOR == 3 + PRINT *, 'INFO:compiler_version_MINOR_digit_5[3]' +# elif COMPILER_VERSION_MINOR == 4 + PRINT *, 'INFO:compiler_version_MINOR_digit_5[4]' +# elif COMPILER_VERSION_MINOR == 5 + PRINT *, 'INFO:compiler_version_MINOR_digit_5[5]' +# elif COMPILER_VERSION_MINOR == 6 + PRINT *, 'INFO:compiler_version_MINOR_digit_5[6]' +# elif COMPILER_VERSION_MINOR == 7 + PRINT *, 'INFO:compiler_version_MINOR_digit_5[7]' +# elif COMPILER_VERSION_MINOR == 8 + PRINT *, 'INFO:compiler_version_MINOR_digit_5[8]' +# elif COMPILER_VERSION_MINOR == 9 + PRINT *, 'INFO:compiler_version_MINOR_digit_5[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_6(n) +# define HEX(n) HEX_6(n) +# if COMPILER_VERSION_MINOR == 0 + PRINT *, 'INFO:compiler_version_MINOR_digit_6[0]' +# elif COMPILER_VERSION_MINOR == 1 + PRINT *, 'INFO:compiler_version_MINOR_digit_6[1]' +# elif COMPILER_VERSION_MINOR == 2 + PRINT *, 'INFO:compiler_version_MINOR_digit_6[2]' +# elif COMPILER_VERSION_MINOR == 3 + PRINT *, 'INFO:compiler_version_MINOR_digit_6[3]' +# elif COMPILER_VERSION_MINOR == 4 + PRINT *, 'INFO:compiler_version_MINOR_digit_6[4]' +# elif COMPILER_VERSION_MINOR == 5 + PRINT *, 'INFO:compiler_version_MINOR_digit_6[5]' +# elif COMPILER_VERSION_MINOR == 6 + PRINT *, 'INFO:compiler_version_MINOR_digit_6[6]' +# elif COMPILER_VERSION_MINOR == 7 + PRINT *, 'INFO:compiler_version_MINOR_digit_6[7]' +# elif COMPILER_VERSION_MINOR == 8 + PRINT *, 'INFO:compiler_version_MINOR_digit_6[8]' +# elif COMPILER_VERSION_MINOR == 9 + PRINT *, 'INFO:compiler_version_MINOR_digit_6[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_7(n) +# define HEX(n) HEX_7(n) +# if COMPILER_VERSION_MINOR == 0 + PRINT *, 'INFO:compiler_version_MINOR_digit_7[0]' +# elif COMPILER_VERSION_MINOR == 1 + PRINT *, 'INFO:compiler_version_MINOR_digit_7[1]' +# elif COMPILER_VERSION_MINOR == 2 + PRINT *, 'INFO:compiler_version_MINOR_digit_7[2]' +# elif COMPILER_VERSION_MINOR == 3 + PRINT *, 'INFO:compiler_version_MINOR_digit_7[3]' +# elif COMPILER_VERSION_MINOR == 4 + PRINT *, 'INFO:compiler_version_MINOR_digit_7[4]' +# elif COMPILER_VERSION_MINOR == 5 + PRINT *, 'INFO:compiler_version_MINOR_digit_7[5]' +# elif COMPILER_VERSION_MINOR == 6 + PRINT *, 'INFO:compiler_version_MINOR_digit_7[6]' +# elif COMPILER_VERSION_MINOR == 7 + PRINT *, 'INFO:compiler_version_MINOR_digit_7[7]' +# elif COMPILER_VERSION_MINOR == 8 + PRINT *, 'INFO:compiler_version_MINOR_digit_7[8]' +# elif COMPILER_VERSION_MINOR == 9 + PRINT *, 'INFO:compiler_version_MINOR_digit_7[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_8(n) +# define HEX(n) HEX_8(n) +# if COMPILER_VERSION_MINOR == 0 + PRINT *, 'INFO:compiler_version_MINOR_digit_8[0]' +# elif COMPILER_VERSION_MINOR == 1 + PRINT *, 'INFO:compiler_version_MINOR_digit_8[1]' +# elif COMPILER_VERSION_MINOR == 2 + PRINT *, 'INFO:compiler_version_MINOR_digit_8[2]' +# elif COMPILER_VERSION_MINOR == 3 + PRINT *, 'INFO:compiler_version_MINOR_digit_8[3]' +# elif COMPILER_VERSION_MINOR == 4 + PRINT *, 'INFO:compiler_version_MINOR_digit_8[4]' +# elif COMPILER_VERSION_MINOR == 5 + PRINT *, 'INFO:compiler_version_MINOR_digit_8[5]' +# elif COMPILER_VERSION_MINOR == 6 + PRINT *, 'INFO:compiler_version_MINOR_digit_8[6]' +# elif COMPILER_VERSION_MINOR == 7 + PRINT *, 'INFO:compiler_version_MINOR_digit_8[7]' +# elif COMPILER_VERSION_MINOR == 8 + PRINT *, 'INFO:compiler_version_MINOR_digit_8[8]' +# elif COMPILER_VERSION_MINOR == 9 + PRINT *, 'INFO:compiler_version_MINOR_digit_8[9]' +# endif + +#endif +#if defined(COMPILER_VERSION_PATCH) +# undef DEC +# undef HEX +# define DEC(n) DEC_1(n) +# define HEX(n) HEX_1(n) +# if COMPILER_VERSION_PATCH == 0 + PRINT *, 'INFO:compiler_version_PATCH_digit_1[0]' +# elif COMPILER_VERSION_PATCH == 1 + PRINT *, 'INFO:compiler_version_PATCH_digit_1[1]' +# elif COMPILER_VERSION_PATCH == 2 + PRINT *, 'INFO:compiler_version_PATCH_digit_1[2]' +# elif COMPILER_VERSION_PATCH == 3 + PRINT *, 'INFO:compiler_version_PATCH_digit_1[3]' +# elif COMPILER_VERSION_PATCH == 4 + PRINT *, 'INFO:compiler_version_PATCH_digit_1[4]' +# elif COMPILER_VERSION_PATCH == 5 + PRINT *, 'INFO:compiler_version_PATCH_digit_1[5]' +# elif COMPILER_VERSION_PATCH == 6 + PRINT *, 'INFO:compiler_version_PATCH_digit_1[6]' +# elif COMPILER_VERSION_PATCH == 7 + PRINT *, 'INFO:compiler_version_PATCH_digit_1[7]' +# elif COMPILER_VERSION_PATCH == 8 + PRINT *, 'INFO:compiler_version_PATCH_digit_1[8]' +# elif COMPILER_VERSION_PATCH == 9 + PRINT *, 'INFO:compiler_version_PATCH_digit_1[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_2(n) +# define HEX(n) HEX_2(n) +# if COMPILER_VERSION_PATCH == 0 + PRINT *, 'INFO:compiler_version_PATCH_digit_2[0]' +# elif COMPILER_VERSION_PATCH == 1 + PRINT *, 'INFO:compiler_version_PATCH_digit_2[1]' +# elif COMPILER_VERSION_PATCH == 2 + PRINT *, 'INFO:compiler_version_PATCH_digit_2[2]' +# elif COMPILER_VERSION_PATCH == 3 + PRINT *, 'INFO:compiler_version_PATCH_digit_2[3]' +# elif COMPILER_VERSION_PATCH == 4 + PRINT *, 'INFO:compiler_version_PATCH_digit_2[4]' +# elif COMPILER_VERSION_PATCH == 5 + PRINT *, 'INFO:compiler_version_PATCH_digit_2[5]' +# elif COMPILER_VERSION_PATCH == 6 + PRINT *, 'INFO:compiler_version_PATCH_digit_2[6]' +# elif COMPILER_VERSION_PATCH == 7 + PRINT *, 'INFO:compiler_version_PATCH_digit_2[7]' +# elif COMPILER_VERSION_PATCH == 8 + PRINT *, 'INFO:compiler_version_PATCH_digit_2[8]' +# elif COMPILER_VERSION_PATCH == 9 + PRINT *, 'INFO:compiler_version_PATCH_digit_2[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_3(n) +# define HEX(n) HEX_3(n) +# if COMPILER_VERSION_PATCH == 0 + PRINT *, 'INFO:compiler_version_PATCH_digit_3[0]' +# elif COMPILER_VERSION_PATCH == 1 + PRINT *, 'INFO:compiler_version_PATCH_digit_3[1]' +# elif COMPILER_VERSION_PATCH == 2 + PRINT *, 'INFO:compiler_version_PATCH_digit_3[2]' +# elif COMPILER_VERSION_PATCH == 3 + PRINT *, 'INFO:compiler_version_PATCH_digit_3[3]' +# elif COMPILER_VERSION_PATCH == 4 + PRINT *, 'INFO:compiler_version_PATCH_digit_3[4]' +# elif COMPILER_VERSION_PATCH == 5 + PRINT *, 'INFO:compiler_version_PATCH_digit_3[5]' +# elif COMPILER_VERSION_PATCH == 6 + PRINT *, 'INFO:compiler_version_PATCH_digit_3[6]' +# elif COMPILER_VERSION_PATCH == 7 + PRINT *, 'INFO:compiler_version_PATCH_digit_3[7]' +# elif COMPILER_VERSION_PATCH == 8 + PRINT *, 'INFO:compiler_version_PATCH_digit_3[8]' +# elif COMPILER_VERSION_PATCH == 9 + PRINT *, 'INFO:compiler_version_PATCH_digit_3[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_4(n) +# define HEX(n) HEX_4(n) +# if COMPILER_VERSION_PATCH == 0 + PRINT *, 'INFO:compiler_version_PATCH_digit_4[0]' +# elif COMPILER_VERSION_PATCH == 1 + PRINT *, 'INFO:compiler_version_PATCH_digit_4[1]' +# elif COMPILER_VERSION_PATCH == 2 + PRINT *, 'INFO:compiler_version_PATCH_digit_4[2]' +# elif COMPILER_VERSION_PATCH == 3 + PRINT *, 'INFO:compiler_version_PATCH_digit_4[3]' +# elif COMPILER_VERSION_PATCH == 4 + PRINT *, 'INFO:compiler_version_PATCH_digit_4[4]' +# elif COMPILER_VERSION_PATCH == 5 + PRINT *, 'INFO:compiler_version_PATCH_digit_4[5]' +# elif COMPILER_VERSION_PATCH == 6 + PRINT *, 'INFO:compiler_version_PATCH_digit_4[6]' +# elif COMPILER_VERSION_PATCH == 7 + PRINT *, 'INFO:compiler_version_PATCH_digit_4[7]' +# elif COMPILER_VERSION_PATCH == 8 + PRINT *, 'INFO:compiler_version_PATCH_digit_4[8]' +# elif COMPILER_VERSION_PATCH == 9 + PRINT *, 'INFO:compiler_version_PATCH_digit_4[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_5(n) +# define HEX(n) HEX_5(n) +# if COMPILER_VERSION_PATCH == 0 + PRINT *, 'INFO:compiler_version_PATCH_digit_5[0]' +# elif COMPILER_VERSION_PATCH == 1 + PRINT *, 'INFO:compiler_version_PATCH_digit_5[1]' +# elif COMPILER_VERSION_PATCH == 2 + PRINT *, 'INFO:compiler_version_PATCH_digit_5[2]' +# elif COMPILER_VERSION_PATCH == 3 + PRINT *, 'INFO:compiler_version_PATCH_digit_5[3]' +# elif COMPILER_VERSION_PATCH == 4 + PRINT *, 'INFO:compiler_version_PATCH_digit_5[4]' +# elif COMPILER_VERSION_PATCH == 5 + PRINT *, 'INFO:compiler_version_PATCH_digit_5[5]' +# elif COMPILER_VERSION_PATCH == 6 + PRINT *, 'INFO:compiler_version_PATCH_digit_5[6]' +# elif COMPILER_VERSION_PATCH == 7 + PRINT *, 'INFO:compiler_version_PATCH_digit_5[7]' +# elif COMPILER_VERSION_PATCH == 8 + PRINT *, 'INFO:compiler_version_PATCH_digit_5[8]' +# elif COMPILER_VERSION_PATCH == 9 + PRINT *, 'INFO:compiler_version_PATCH_digit_5[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_6(n) +# define HEX(n) HEX_6(n) +# if COMPILER_VERSION_PATCH == 0 + PRINT *, 'INFO:compiler_version_PATCH_digit_6[0]' +# elif COMPILER_VERSION_PATCH == 1 + PRINT *, 'INFO:compiler_version_PATCH_digit_6[1]' +# elif COMPILER_VERSION_PATCH == 2 + PRINT *, 'INFO:compiler_version_PATCH_digit_6[2]' +# elif COMPILER_VERSION_PATCH == 3 + PRINT *, 'INFO:compiler_version_PATCH_digit_6[3]' +# elif COMPILER_VERSION_PATCH == 4 + PRINT *, 'INFO:compiler_version_PATCH_digit_6[4]' +# elif COMPILER_VERSION_PATCH == 5 + PRINT *, 'INFO:compiler_version_PATCH_digit_6[5]' +# elif COMPILER_VERSION_PATCH == 6 + PRINT *, 'INFO:compiler_version_PATCH_digit_6[6]' +# elif COMPILER_VERSION_PATCH == 7 + PRINT *, 'INFO:compiler_version_PATCH_digit_6[7]' +# elif COMPILER_VERSION_PATCH == 8 + PRINT *, 'INFO:compiler_version_PATCH_digit_6[8]' +# elif COMPILER_VERSION_PATCH == 9 + PRINT *, 'INFO:compiler_version_PATCH_digit_6[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_7(n) +# define HEX(n) HEX_7(n) +# if COMPILER_VERSION_PATCH == 0 + PRINT *, 'INFO:compiler_version_PATCH_digit_7[0]' +# elif COMPILER_VERSION_PATCH == 1 + PRINT *, 'INFO:compiler_version_PATCH_digit_7[1]' +# elif COMPILER_VERSION_PATCH == 2 + PRINT *, 'INFO:compiler_version_PATCH_digit_7[2]' +# elif COMPILER_VERSION_PATCH == 3 + PRINT *, 'INFO:compiler_version_PATCH_digit_7[3]' +# elif COMPILER_VERSION_PATCH == 4 + PRINT *, 'INFO:compiler_version_PATCH_digit_7[4]' +# elif COMPILER_VERSION_PATCH == 5 + PRINT *, 'INFO:compiler_version_PATCH_digit_7[5]' +# elif COMPILER_VERSION_PATCH == 6 + PRINT *, 'INFO:compiler_version_PATCH_digit_7[6]' +# elif COMPILER_VERSION_PATCH == 7 + PRINT *, 'INFO:compiler_version_PATCH_digit_7[7]' +# elif COMPILER_VERSION_PATCH == 8 + PRINT *, 'INFO:compiler_version_PATCH_digit_7[8]' +# elif COMPILER_VERSION_PATCH == 9 + PRINT *, 'INFO:compiler_version_PATCH_digit_7[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_8(n) +# define HEX(n) HEX_8(n) +# if COMPILER_VERSION_PATCH == 0 + PRINT *, 'INFO:compiler_version_PATCH_digit_8[0]' +# elif COMPILER_VERSION_PATCH == 1 + PRINT *, 'INFO:compiler_version_PATCH_digit_8[1]' +# elif COMPILER_VERSION_PATCH == 2 + PRINT *, 'INFO:compiler_version_PATCH_digit_8[2]' +# elif COMPILER_VERSION_PATCH == 3 + PRINT *, 'INFO:compiler_version_PATCH_digit_8[3]' +# elif COMPILER_VERSION_PATCH == 4 + PRINT *, 'INFO:compiler_version_PATCH_digit_8[4]' +# elif COMPILER_VERSION_PATCH == 5 + PRINT *, 'INFO:compiler_version_PATCH_digit_8[5]' +# elif COMPILER_VERSION_PATCH == 6 + PRINT *, 'INFO:compiler_version_PATCH_digit_8[6]' +# elif COMPILER_VERSION_PATCH == 7 + PRINT *, 'INFO:compiler_version_PATCH_digit_8[7]' +# elif COMPILER_VERSION_PATCH == 8 + PRINT *, 'INFO:compiler_version_PATCH_digit_8[8]' +# elif COMPILER_VERSION_PATCH == 9 + PRINT *, 'INFO:compiler_version_PATCH_digit_8[9]' +# endif + +#endif +#if defined(COMPILER_VERSION_TWEAK) +# undef DEC +# undef HEX +# define DEC(n) DEC_1(n) +# define HEX(n) HEX_1(n) +# if COMPILER_VERSION_TWEAK == 0 + PRINT *, 'INFO:compiler_version_TWEAK_digit_1[0]' +# elif COMPILER_VERSION_TWEAK == 1 + PRINT *, 'INFO:compiler_version_TWEAK_digit_1[1]' +# elif COMPILER_VERSION_TWEAK == 2 + PRINT *, 'INFO:compiler_version_TWEAK_digit_1[2]' +# elif COMPILER_VERSION_TWEAK == 3 + PRINT *, 'INFO:compiler_version_TWEAK_digit_1[3]' +# elif COMPILER_VERSION_TWEAK == 4 + PRINT *, 'INFO:compiler_version_TWEAK_digit_1[4]' +# elif COMPILER_VERSION_TWEAK == 5 + PRINT *, 'INFO:compiler_version_TWEAK_digit_1[5]' +# elif COMPILER_VERSION_TWEAK == 6 + PRINT *, 'INFO:compiler_version_TWEAK_digit_1[6]' +# elif COMPILER_VERSION_TWEAK == 7 + PRINT *, 'INFO:compiler_version_TWEAK_digit_1[7]' +# elif COMPILER_VERSION_TWEAK == 8 + PRINT *, 'INFO:compiler_version_TWEAK_digit_1[8]' +# elif COMPILER_VERSION_TWEAK == 9 + PRINT *, 'INFO:compiler_version_TWEAK_digit_1[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_2(n) +# define HEX(n) HEX_2(n) +# if COMPILER_VERSION_TWEAK == 0 + PRINT *, 'INFO:compiler_version_TWEAK_digit_2[0]' +# elif COMPILER_VERSION_TWEAK == 1 + PRINT *, 'INFO:compiler_version_TWEAK_digit_2[1]' +# elif COMPILER_VERSION_TWEAK == 2 + PRINT *, 'INFO:compiler_version_TWEAK_digit_2[2]' +# elif COMPILER_VERSION_TWEAK == 3 + PRINT *, 'INFO:compiler_version_TWEAK_digit_2[3]' +# elif COMPILER_VERSION_TWEAK == 4 + PRINT *, 'INFO:compiler_version_TWEAK_digit_2[4]' +# elif COMPILER_VERSION_TWEAK == 5 + PRINT *, 'INFO:compiler_version_TWEAK_digit_2[5]' +# elif COMPILER_VERSION_TWEAK == 6 + PRINT *, 'INFO:compiler_version_TWEAK_digit_2[6]' +# elif COMPILER_VERSION_TWEAK == 7 + PRINT *, 'INFO:compiler_version_TWEAK_digit_2[7]' +# elif COMPILER_VERSION_TWEAK == 8 + PRINT *, 'INFO:compiler_version_TWEAK_digit_2[8]' +# elif COMPILER_VERSION_TWEAK == 9 + PRINT *, 'INFO:compiler_version_TWEAK_digit_2[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_3(n) +# define HEX(n) HEX_3(n) +# if COMPILER_VERSION_TWEAK == 0 + PRINT *, 'INFO:compiler_version_TWEAK_digit_3[0]' +# elif COMPILER_VERSION_TWEAK == 1 + PRINT *, 'INFO:compiler_version_TWEAK_digit_3[1]' +# elif COMPILER_VERSION_TWEAK == 2 + PRINT *, 'INFO:compiler_version_TWEAK_digit_3[2]' +# elif COMPILER_VERSION_TWEAK == 3 + PRINT *, 'INFO:compiler_version_TWEAK_digit_3[3]' +# elif COMPILER_VERSION_TWEAK == 4 + PRINT *, 'INFO:compiler_version_TWEAK_digit_3[4]' +# elif COMPILER_VERSION_TWEAK == 5 + PRINT *, 'INFO:compiler_version_TWEAK_digit_3[5]' +# elif COMPILER_VERSION_TWEAK == 6 + PRINT *, 'INFO:compiler_version_TWEAK_digit_3[6]' +# elif COMPILER_VERSION_TWEAK == 7 + PRINT *, 'INFO:compiler_version_TWEAK_digit_3[7]' +# elif COMPILER_VERSION_TWEAK == 8 + PRINT *, 'INFO:compiler_version_TWEAK_digit_3[8]' +# elif COMPILER_VERSION_TWEAK == 9 + PRINT *, 'INFO:compiler_version_TWEAK_digit_3[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_4(n) +# define HEX(n) HEX_4(n) +# if COMPILER_VERSION_TWEAK == 0 + PRINT *, 'INFO:compiler_version_TWEAK_digit_4[0]' +# elif COMPILER_VERSION_TWEAK == 1 + PRINT *, 'INFO:compiler_version_TWEAK_digit_4[1]' +# elif COMPILER_VERSION_TWEAK == 2 + PRINT *, 'INFO:compiler_version_TWEAK_digit_4[2]' +# elif COMPILER_VERSION_TWEAK == 3 + PRINT *, 'INFO:compiler_version_TWEAK_digit_4[3]' +# elif COMPILER_VERSION_TWEAK == 4 + PRINT *, 'INFO:compiler_version_TWEAK_digit_4[4]' +# elif COMPILER_VERSION_TWEAK == 5 + PRINT *, 'INFO:compiler_version_TWEAK_digit_4[5]' +# elif COMPILER_VERSION_TWEAK == 6 + PRINT *, 'INFO:compiler_version_TWEAK_digit_4[6]' +# elif COMPILER_VERSION_TWEAK == 7 + PRINT *, 'INFO:compiler_version_TWEAK_digit_4[7]' +# elif COMPILER_VERSION_TWEAK == 8 + PRINT *, 'INFO:compiler_version_TWEAK_digit_4[8]' +# elif COMPILER_VERSION_TWEAK == 9 + PRINT *, 'INFO:compiler_version_TWEAK_digit_4[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_5(n) +# define HEX(n) HEX_5(n) +# if COMPILER_VERSION_TWEAK == 0 + PRINT *, 'INFO:compiler_version_TWEAK_digit_5[0]' +# elif COMPILER_VERSION_TWEAK == 1 + PRINT *, 'INFO:compiler_version_TWEAK_digit_5[1]' +# elif COMPILER_VERSION_TWEAK == 2 + PRINT *, 'INFO:compiler_version_TWEAK_digit_5[2]' +# elif COMPILER_VERSION_TWEAK == 3 + PRINT *, 'INFO:compiler_version_TWEAK_digit_5[3]' +# elif COMPILER_VERSION_TWEAK == 4 + PRINT *, 'INFO:compiler_version_TWEAK_digit_5[4]' +# elif COMPILER_VERSION_TWEAK == 5 + PRINT *, 'INFO:compiler_version_TWEAK_digit_5[5]' +# elif COMPILER_VERSION_TWEAK == 6 + PRINT *, 'INFO:compiler_version_TWEAK_digit_5[6]' +# elif COMPILER_VERSION_TWEAK == 7 + PRINT *, 'INFO:compiler_version_TWEAK_digit_5[7]' +# elif COMPILER_VERSION_TWEAK == 8 + PRINT *, 'INFO:compiler_version_TWEAK_digit_5[8]' +# elif COMPILER_VERSION_TWEAK == 9 + PRINT *, 'INFO:compiler_version_TWEAK_digit_5[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_6(n) +# define HEX(n) HEX_6(n) +# if COMPILER_VERSION_TWEAK == 0 + PRINT *, 'INFO:compiler_version_TWEAK_digit_6[0]' +# elif COMPILER_VERSION_TWEAK == 1 + PRINT *, 'INFO:compiler_version_TWEAK_digit_6[1]' +# elif COMPILER_VERSION_TWEAK == 2 + PRINT *, 'INFO:compiler_version_TWEAK_digit_6[2]' +# elif COMPILER_VERSION_TWEAK == 3 + PRINT *, 'INFO:compiler_version_TWEAK_digit_6[3]' +# elif COMPILER_VERSION_TWEAK == 4 + PRINT *, 'INFO:compiler_version_TWEAK_digit_6[4]' +# elif COMPILER_VERSION_TWEAK == 5 + PRINT *, 'INFO:compiler_version_TWEAK_digit_6[5]' +# elif COMPILER_VERSION_TWEAK == 6 + PRINT *, 'INFO:compiler_version_TWEAK_digit_6[6]' +# elif COMPILER_VERSION_TWEAK == 7 + PRINT *, 'INFO:compiler_version_TWEAK_digit_6[7]' +# elif COMPILER_VERSION_TWEAK == 8 + PRINT *, 'INFO:compiler_version_TWEAK_digit_6[8]' +# elif COMPILER_VERSION_TWEAK == 9 + PRINT *, 'INFO:compiler_version_TWEAK_digit_6[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_7(n) +# define HEX(n) HEX_7(n) +# if COMPILER_VERSION_TWEAK == 0 + PRINT *, 'INFO:compiler_version_TWEAK_digit_7[0]' +# elif COMPILER_VERSION_TWEAK == 1 + PRINT *, 'INFO:compiler_version_TWEAK_digit_7[1]' +# elif COMPILER_VERSION_TWEAK == 2 + PRINT *, 'INFO:compiler_version_TWEAK_digit_7[2]' +# elif COMPILER_VERSION_TWEAK == 3 + PRINT *, 'INFO:compiler_version_TWEAK_digit_7[3]' +# elif COMPILER_VERSION_TWEAK == 4 + PRINT *, 'INFO:compiler_version_TWEAK_digit_7[4]' +# elif COMPILER_VERSION_TWEAK == 5 + PRINT *, 'INFO:compiler_version_TWEAK_digit_7[5]' +# elif COMPILER_VERSION_TWEAK == 6 + PRINT *, 'INFO:compiler_version_TWEAK_digit_7[6]' +# elif COMPILER_VERSION_TWEAK == 7 + PRINT *, 'INFO:compiler_version_TWEAK_digit_7[7]' +# elif COMPILER_VERSION_TWEAK == 8 + PRINT *, 'INFO:compiler_version_TWEAK_digit_7[8]' +# elif COMPILER_VERSION_TWEAK == 9 + PRINT *, 'INFO:compiler_version_TWEAK_digit_7[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_8(n) +# define HEX(n) HEX_8(n) +# if COMPILER_VERSION_TWEAK == 0 + PRINT *, 'INFO:compiler_version_TWEAK_digit_8[0]' +# elif COMPILER_VERSION_TWEAK == 1 + PRINT *, 'INFO:compiler_version_TWEAK_digit_8[1]' +# elif COMPILER_VERSION_TWEAK == 2 + PRINT *, 'INFO:compiler_version_TWEAK_digit_8[2]' +# elif COMPILER_VERSION_TWEAK == 3 + PRINT *, 'INFO:compiler_version_TWEAK_digit_8[3]' +# elif COMPILER_VERSION_TWEAK == 4 + PRINT *, 'INFO:compiler_version_TWEAK_digit_8[4]' +# elif COMPILER_VERSION_TWEAK == 5 + PRINT *, 'INFO:compiler_version_TWEAK_digit_8[5]' +# elif COMPILER_VERSION_TWEAK == 6 + PRINT *, 'INFO:compiler_version_TWEAK_digit_8[6]' +# elif COMPILER_VERSION_TWEAK == 7 + PRINT *, 'INFO:compiler_version_TWEAK_digit_8[7]' +# elif COMPILER_VERSION_TWEAK == 8 + PRINT *, 'INFO:compiler_version_TWEAK_digit_8[8]' +# elif COMPILER_VERSION_TWEAK == 9 + PRINT *, 'INFO:compiler_version_TWEAK_digit_8[9]' +# endif + +#endif + + END diff --git a/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeDirectoryInformation.cmake b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 00000000..0eaed40a --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug") + +# Force unix paths in dependencies. +set(CMAKE_FORCE_UNIX_PATHS 1) + + +# The C and CXX include file regular expressions for this directory. +set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeError.log b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeError.log new file mode 100644 index 00000000..2e7ca015 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeError.log @@ -0,0 +1,55 @@ +Determining if the pthread_create exist failed with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_697e4/fast" +/usr/bin/make -f CMakeFiles/cmTC_697e4.dir/build.make CMakeFiles/cmTC_697e4.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_697e4.dir/CheckSymbolExists.c.o +/usr/bin/cc -o CMakeFiles/cmTC_697e4.dir/CheckSymbolExists.c.o -c /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp/CheckSymbolExists.c +Linking C executable cmTC_697e4 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_697e4.dir/link.txt --verbose=1 +/usr/bin/cc CMakeFiles/cmTC_697e4.dir/CheckSymbolExists.c.o -o cmTC_697e4 -rdynamic +CMakeFiles/cmTC_697e4.dir/CheckSymbolExists.c.o: In function `main': +CheckSymbolExists.c:(.text+0x16): undefined reference to `pthread_create' +collect2: error: ld returned 1 exit status +CMakeFiles/cmTC_697e4.dir/build.make:97: recipe for target 'cmTC_697e4' failed +make[1]: *** [cmTC_697e4] Error 1 +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' +Makefile:126: recipe for target 'cmTC_697e4/fast' failed +make: *** [cmTC_697e4/fast] Error 2 + +File /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp/CheckSymbolExists.c: +/* */ +#include + +int main(int argc, char** argv) +{ + (void)argv; +#ifndef pthread_create + return ((int*)(&pthread_create))[argc]; +#else + (void)argc; + return 0; +#endif +} + +Determining if the function pthread_create exists in the pthreads failed with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_edcbc/fast" +/usr/bin/make -f CMakeFiles/cmTC_edcbc.dir/build.make CMakeFiles/cmTC_edcbc.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_edcbc.dir/CheckFunctionExists.c.o +/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_edcbc.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.5/Modules/CheckFunctionExists.c +Linking C executable cmTC_edcbc +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_edcbc.dir/link.txt --verbose=1 +/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_edcbc.dir/CheckFunctionExists.c.o -o cmTC_edcbc -rdynamic -lpthreads +/usr/bin/ld: cannot find -lpthreads +collect2: error: ld returned 1 exit status +CMakeFiles/cmTC_edcbc.dir/build.make:97: recipe for target 'cmTC_edcbc' failed +make[1]: *** [cmTC_edcbc] Error 1 +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' +Makefile:126: recipe for target 'cmTC_edcbc/fast' failed +make: *** [cmTC_edcbc/fast] Error 2 + + diff --git a/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeOutput.log b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeOutput.log new file mode 100644 index 00000000..8a051eb2 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeOutput.log @@ -0,0 +1,532 @@ +The system is: Linux - 4.4.0-104-generic - x86_64 +Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. +Compiler: /usr/bin/cc +Build flags: +Id flags: + +The output was: +0 + + +Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out" + +The C compiler identification is GNU, found in "/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CompilerIdC/a.out" + +Determining if the C compiler works passed with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_2dde0/fast" +/usr/bin/make -f CMakeFiles/cmTC_2dde0.dir/build.make CMakeFiles/cmTC_2dde0.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_2dde0.dir/testCCompiler.c.o +/usr/bin/cc -o CMakeFiles/cmTC_2dde0.dir/testCCompiler.c.o -c /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp/testCCompiler.c +Linking C executable cmTC_2dde0 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_2dde0.dir/link.txt --verbose=1 +/usr/bin/cc CMakeFiles/cmTC_2dde0.dir/testCCompiler.c.o -o cmTC_2dde0 -rdynamic +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' + + +Detecting C compiler ABI info compiled with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_e2f27/fast" +/usr/bin/make -f CMakeFiles/cmTC_e2f27.dir/build.make CMakeFiles/cmTC_e2f27.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_e2f27.dir/CMakeCCompilerABI.c.o +/usr/bin/cc -o CMakeFiles/cmTC_e2f27.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-3.5/Modules/CMakeCCompilerABI.c +Linking C executable cmTC_e2f27 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e2f27.dir/link.txt --verbose=1 +/usr/bin/cc -v CMakeFiles/cmTC_e2f27.dir/CMakeCCompilerABI.c.o -o cmTC_e2f27 -rdynamic +Using built-in specs. +COLLECT_GCC=/usr/bin/cc +COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper +Target: x86_64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.5' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu +Thread model: posix +gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.5) +COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/ +LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_e2f27' '-rdynamic' '-mtune=generic' '-march=x86-64' + /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/ccPN6ZYw.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o cmTC_e2f27 /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. CMakeFiles/cmTC_e2f27.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' + + +Parsed C implicit link information from above output: + link line regex: [^( *|.*[/\])(ld|([^/\]+-)?ld|collect2)[^/\]*( |$)] + ignore line: [Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp] + ignore line: [] + ignore line: [Run Build Command:"/usr/bin/make" "cmTC_e2f27/fast"] + ignore line: [/usr/bin/make -f CMakeFiles/cmTC_e2f27.dir/build.make CMakeFiles/cmTC_e2f27.dir/build] + ignore line: [make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp'] + ignore line: [Building C object CMakeFiles/cmTC_e2f27.dir/CMakeCCompilerABI.c.o] + ignore line: [/usr/bin/cc -o CMakeFiles/cmTC_e2f27.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-3.5/Modules/CMakeCCompilerABI.c] + ignore line: [Linking C executable cmTC_e2f27] + ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e2f27.dir/link.txt --verbose=1] + ignore line: [/usr/bin/cc -v CMakeFiles/cmTC_e2f27.dir/CMakeCCompilerABI.c.o -o cmTC_e2f27 -rdynamic ] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/cc] + ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper] + ignore line: [Target: x86_64-linux-gnu] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.5' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu] + ignore line: [Thread model: posix] + ignore line: [gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.5) ] + ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_e2f27' '-rdynamic' '-mtune=generic' '-march=x86-64'] + link line: [ /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/ccPN6ZYw.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o cmTC_e2f27 /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. CMakeFiles/cmTC_e2f27.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o] + arg [/usr/lib/gcc/x86_64-linux-gnu/5/collect2] ==> ignore + arg [-plugin] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so] ==> ignore + arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper] ==> ignore + arg [-plugin-opt=-fresolution=/tmp/ccPN6ZYw.res] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [--sysroot=/] ==> ignore + arg [--build-id] ==> ignore + arg [--eh-frame-hdr] ==> ignore + arg [-m] ==> ignore + arg [elf_x86_64] ==> ignore + arg [--hash-style=gnu] ==> ignore + arg [--as-needed] ==> ignore + arg [-export-dynamic] ==> ignore + arg [-dynamic-linker] ==> ignore + arg [/lib64/ld-linux-x86-64.so.2] ==> ignore + arg [-zrelro] ==> ignore + arg [-o] ==> ignore + arg [cmTC_e2f27] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o] ==> ignore + arg [-L/usr/lib/gcc/x86_64-linux-gnu/5] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] + arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu] + arg [-L/lib/../lib] ==> dir [/lib/../lib] + arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu] + arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../..] + arg [CMakeFiles/cmTC_e2f27.dir/CMakeCCompilerABI.c.o] ==> ignore + arg [-lgcc] ==> lib [gcc] + arg [--as-needed] ==> ignore + arg [-lgcc_s] ==> lib [gcc_s] + arg [--no-as-needed] ==> ignore + arg [-lc] ==> lib [c] + arg [-lgcc] ==> lib [gcc] + arg [--as-needed] ==> ignore + arg [-lgcc_s] ==> lib [gcc_s] + arg [--no-as-needed] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/crtend.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o] ==> ignore + remove lib [gcc] + remove lib [gcc_s] + remove lib [gcc] + remove lib [gcc_s] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5] ==> [/usr/lib/gcc/x86_64-linux-gnu/5] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] ==> [/usr/lib] + collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu] + collapse library dir [/lib/../lib] ==> [/lib] + collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse library dir [/usr/lib/../lib] ==> [/usr/lib] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../..] ==> [/usr/lib] + implicit libs: [c] + implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib] + implicit fwks: [] + + + + +Detecting C [-std=c11] compiler features compiled with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_78d3e/fast" +/usr/bin/make -f CMakeFiles/cmTC_78d3e.dir/build.make CMakeFiles/cmTC_78d3e.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_78d3e.dir/feature_tests.c.o +/usr/bin/cc -std=c11 -o CMakeFiles/cmTC_78d3e.dir/feature_tests.c.o -c /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/feature_tests.c +Linking C executable cmTC_78d3e +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_78d3e.dir/link.txt --verbose=1 +/usr/bin/cc CMakeFiles/cmTC_78d3e.dir/feature_tests.c.o -o cmTC_78d3e -rdynamic +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' + + + Feature record: C_FEATURE:1c_function_prototypes + Feature record: C_FEATURE:1c_restrict + Feature record: C_FEATURE:1c_static_assert + Feature record: C_FEATURE:1c_variadic_macros + + +Detecting C [-std=c99] compiler features compiled with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_f9547/fast" +/usr/bin/make -f CMakeFiles/cmTC_f9547.dir/build.make CMakeFiles/cmTC_f9547.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_f9547.dir/feature_tests.c.o +/usr/bin/cc -std=c99 -o CMakeFiles/cmTC_f9547.dir/feature_tests.c.o -c /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/feature_tests.c +Linking C executable cmTC_f9547 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f9547.dir/link.txt --verbose=1 +/usr/bin/cc CMakeFiles/cmTC_f9547.dir/feature_tests.c.o -o cmTC_f9547 -rdynamic +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' + + + Feature record: C_FEATURE:1c_function_prototypes + Feature record: C_FEATURE:1c_restrict + Feature record: C_FEATURE:0c_static_assert + Feature record: C_FEATURE:1c_variadic_macros + + +Detecting C [-std=c90] compiler features compiled with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_d0459/fast" +/usr/bin/make -f CMakeFiles/cmTC_d0459.dir/build.make CMakeFiles/cmTC_d0459.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_d0459.dir/feature_tests.c.o +/usr/bin/cc -std=c90 -o CMakeFiles/cmTC_d0459.dir/feature_tests.c.o -c /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/feature_tests.c +Linking C executable cmTC_d0459 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d0459.dir/link.txt --verbose=1 +/usr/bin/cc CMakeFiles/cmTC_d0459.dir/feature_tests.c.o -o cmTC_d0459 -rdynamic +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' + + + Feature record: C_FEATURE:1c_function_prototypes + Feature record: C_FEATURE:0c_restrict + Feature record: C_FEATURE:0c_static_assert + Feature record: C_FEATURE:0c_variadic_macros +Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" succeeded. +Compiler: /usr/bin/gfortran +Build flags: +Id flags: -v + +The output was: +0 +Driving: /usr/bin/gfortran -v CMakeFortranCompilerId.F -l gfortran -l m -shared-libgcc +Using built-in specs. +COLLECT_GCC=/usr/bin/gfortran +COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper +Target: x86_64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.5' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu +Thread model: posix +gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.5) +COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' + /usr/lib/gcc/x86_64-linux-gnu/5/f951 CMakeFortranCompilerId.F -ffixed-form -cpp=/tmp/ccjAv1IJ.f90 -quiet -v -imultiarch x86_64-linux-gnu CMakeFortranCompilerId.F -quiet -dumpbase CMakeFortranCompilerId.F -mtune=generic -march=x86-64 -auxbase CMakeFortranCompilerId -version -fintrinsic-modules-path /usr/lib/gcc/x86_64-linux-gnu/5/finclude -o /tmp/cc1lYzWQ.s +GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.5) version 5.4.0 20160609 (x86_64-linux-gnu) + compiled by GNU C version 5.4.0 20160609, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3 +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu" +ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/5/../../../../x86_64-linux-gnu/include" +#include "..." search starts here: +#include <...> search starts here: + /usr/lib/gcc/x86_64-linux-gnu/5/finclude + /usr/lib/gcc/x86_64-linux-gnu/5/include + /usr/local/include + /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed + /usr/include/x86_64-linux-gnu + /usr/include +End of search list. +GNU Fortran2008 (Ubuntu 5.4.0-6ubuntu1~16.04.5) version 5.4.0 20160609 (x86_64-linux-gnu) + compiled by GNU C version 5.4.0 20160609, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3 +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' + as -v --64 -o /tmp/ccNycOcY.o /tmp/cc1lYzWQ.s +GNU assembler version 2.26.1 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.26.1 +Reading specs from /usr/lib/gcc/x86_64-linux-gnu/5/libgfortran.spec +rename spec lib to liborig +COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' +COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/ +LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' + /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/ccDrhNt5.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lquadmath -plugin-opt=-pass-through=-lm -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. /tmp/ccNycOcY.o -lgfortran -lm -lgcc_s -lgcc -lquadmath -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o + + +Compilation of the Fortran compiler identification source "CMakeFortranCompilerId.F" produced "a.out" + +The Fortran compiler identification is GNU, found in "/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/3.5.1/CompilerIdFortran/a.out" + +Determining if the Fortran compiler works passed with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_eba0c/fast" +/usr/bin/make -f CMakeFiles/cmTC_eba0c.dir/build.make CMakeFiles/cmTC_eba0c.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' +Building Fortran object CMakeFiles/cmTC_eba0c.dir/testFortranCompiler.f.o +/usr/bin/gfortran -c /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp/testFortranCompiler.f -o CMakeFiles/cmTC_eba0c.dir/testFortranCompiler.f.o +Linking Fortran executable cmTC_eba0c +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_eba0c.dir/link.txt --verbose=1 +/usr/bin/gfortran CMakeFiles/cmTC_eba0c.dir/testFortranCompiler.f.o -o cmTC_eba0c +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' + + +Detecting Fortran compiler ABI info compiled with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_1f98c/fast" +/usr/bin/make -f CMakeFiles/cmTC_1f98c.dir/build.make CMakeFiles/cmTC_1f98c.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' +Building Fortran object CMakeFiles/cmTC_1f98c.dir/CMakeFortranCompilerABI.F.o +/usr/bin/gfortran -c /usr/share/cmake-3.5/Modules/CMakeFortranCompilerABI.F -o CMakeFiles/cmTC_1f98c.dir/CMakeFortranCompilerABI.F.o +Linking Fortran executable cmTC_1f98c +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_1f98c.dir/link.txt --verbose=1 +/usr/bin/gfortran -v CMakeFiles/cmTC_1f98c.dir/CMakeFortranCompilerABI.F.o -o cmTC_1f98c +Driving: /usr/bin/gfortran -v CMakeFiles/cmTC_1f98c.dir/CMakeFortranCompilerABI.F.o -o cmTC_1f98c -l gfortran -l m -shared-libgcc +Using built-in specs. +COLLECT_GCC=/usr/bin/gfortran +COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper +Target: x86_64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.5' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu +Thread model: posix +gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.5) +Reading specs from /usr/lib/gcc/x86_64-linux-gnu/5/libgfortran.spec +rename spec lib to liborig +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_1f98c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' +COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/ +LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_1f98c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' + /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/ccpTnwk0.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lquadmath -plugin-opt=-pass-through=-lm -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o cmTC_1f98c /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. CMakeFiles/cmTC_1f98c.dir/CMakeFortranCompilerABI.F.o -lgfortran -lm -lgcc_s -lgcc -lquadmath -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' + + +Parsed Fortran implicit link information from above output: + link line regex: [^( *|.*[/\])(ld|([^/\]+-)?ld|collect2)[^/\]*( |$)] + ignore line: [Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp] + ignore line: [] + ignore line: [Run Build Command:"/usr/bin/make" "cmTC_1f98c/fast"] + ignore line: [/usr/bin/make -f CMakeFiles/cmTC_1f98c.dir/build.make CMakeFiles/cmTC_1f98c.dir/build] + ignore line: [make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp'] + ignore line: [Building Fortran object CMakeFiles/cmTC_1f98c.dir/CMakeFortranCompilerABI.F.o] + ignore line: [/usr/bin/gfortran -c /usr/share/cmake-3.5/Modules/CMakeFortranCompilerABI.F -o CMakeFiles/cmTC_1f98c.dir/CMakeFortranCompilerABI.F.o] + ignore line: [Linking Fortran executable cmTC_1f98c] + ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_1f98c.dir/link.txt --verbose=1] + ignore line: [/usr/bin/gfortran -v CMakeFiles/cmTC_1f98c.dir/CMakeFortranCompilerABI.F.o -o cmTC_1f98c ] + ignore line: [Driving: /usr/bin/gfortran -v CMakeFiles/cmTC_1f98c.dir/CMakeFortranCompilerABI.F.o -o cmTC_1f98c -l gfortran -l m -shared-libgcc] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/gfortran] + ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper] + ignore line: [Target: x86_64-linux-gnu] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.5' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu] + ignore line: [Thread model: posix] + ignore line: [gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.5) ] + ignore line: [Reading specs from /usr/lib/gcc/x86_64-linux-gnu/5/libgfortran.spec] + ignore line: [rename spec lib to liborig] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_1f98c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'] + ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_1f98c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'] + link line: [ /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/ccpTnwk0.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lquadmath -plugin-opt=-pass-through=-lm -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o cmTC_1f98c /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. CMakeFiles/cmTC_1f98c.dir/CMakeFortranCompilerABI.F.o -lgfortran -lm -lgcc_s -lgcc -lquadmath -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o] + arg [/usr/lib/gcc/x86_64-linux-gnu/5/collect2] ==> ignore + arg [-plugin] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so] ==> ignore + arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper] ==> ignore + arg [-plugin-opt=-fresolution=/tmp/ccpTnwk0.res] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lquadmath] ==> ignore + arg [-plugin-opt=-pass-through=-lm] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [--sysroot=/] ==> ignore + arg [--build-id] ==> ignore + arg [--eh-frame-hdr] ==> ignore + arg [-m] ==> ignore + arg [elf_x86_64] ==> ignore + arg [--hash-style=gnu] ==> ignore + arg [--as-needed] ==> ignore + arg [-dynamic-linker] ==> ignore + arg [/lib64/ld-linux-x86-64.so.2] ==> ignore + arg [-zrelro] ==> ignore + arg [-o] ==> ignore + arg [cmTC_1f98c] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o] ==> ignore + arg [-L/usr/lib/gcc/x86_64-linux-gnu/5] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] + arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu] + arg [-L/lib/../lib] ==> dir [/lib/../lib] + arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu] + arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../..] + arg [CMakeFiles/cmTC_1f98c.dir/CMakeFortranCompilerABI.F.o] ==> ignore + arg [-lgfortran] ==> lib [gfortran] + arg [-lm] ==> lib [m] + arg [-lgcc_s] ==> lib [gcc_s] + arg [-lgcc] ==> lib [gcc] + arg [-lquadmath] ==> lib [quadmath] + arg [-lm] ==> lib [m] + arg [-lgcc_s] ==> lib [gcc_s] + arg [-lgcc] ==> lib [gcc] + arg [-lc] ==> lib [c] + arg [-lgcc_s] ==> lib [gcc_s] + arg [-lgcc] ==> lib [gcc] + arg [/usr/lib/gcc/x86_64-linux-gnu/5/crtend.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o] ==> ignore + remove lib [gcc_s] + remove lib [gcc] + remove lib [gcc_s] + remove lib [gcc] + remove lib [gcc_s] + remove lib [gcc] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5] ==> [/usr/lib/gcc/x86_64-linux-gnu/5] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] ==> [/usr/lib] + collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu] + collapse library dir [/lib/../lib] ==> [/lib] + collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse library dir [/usr/lib/../lib] ==> [/usr/lib] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../..] ==> [/usr/lib] + implicit libs: [gfortran;m;quadmath;m;c] + implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib] + implicit fwks: [] + + +Determining if the Fortran compiler supports Fortran 90 passed with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_67b00/fast" +/usr/bin/make -f CMakeFiles/cmTC_67b00.dir/build.make CMakeFiles/cmTC_67b00.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' +Building Fortran object CMakeFiles/cmTC_67b00.dir/testFortranCompilerF90.f90.o +/usr/bin/gfortran -c /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp/testFortranCompilerF90.f90 -o CMakeFiles/cmTC_67b00.dir/testFortranCompilerF90.f90.o +Linking Fortran executable cmTC_67b00 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_67b00.dir/link.txt --verbose=1 +/usr/bin/gfortran CMakeFiles/cmTC_67b00.dir/testFortranCompilerF90.f90.o -o cmTC_67b00 +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' + + +Determining if the include file pthread.h exists passed with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_f576d/fast" +/usr/bin/make -f CMakeFiles/cmTC_f576d.dir/build.make CMakeFiles/cmTC_f576d.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_f576d.dir/CheckIncludeFile.c.o +/usr/bin/cc -o CMakeFiles/cmTC_f576d.dir/CheckIncludeFile.c.o -c /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp/CheckIncludeFile.c +Linking C executable cmTC_f576d +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f576d.dir/link.txt --verbose=1 +/usr/bin/cc CMakeFiles/cmTC_f576d.dir/CheckIncludeFile.c.o -o cmTC_f576d -rdynamic +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' + + +Determining if the function pthread_create exists in the pthread passed with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_b9eed/fast" +/usr/bin/make -f CMakeFiles/cmTC_b9eed.dir/build.make CMakeFiles/cmTC_b9eed.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_b9eed.dir/CheckFunctionExists.c.o +/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_b9eed.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.5/Modules/CheckFunctionExists.c +Linking C executable cmTC_b9eed +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b9eed.dir/link.txt --verbose=1 +/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_b9eed.dir/CheckFunctionExists.c.o -o cmTC_b9eed -rdynamic -lpthread +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' + + +Determining if the function XOpenDisplay exists in the /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so passed with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_6ed73/fast" +/usr/bin/make -f CMakeFiles/cmTC_6ed73.dir/build.make CMakeFiles/cmTC_6ed73.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_6ed73.dir/CheckFunctionExists.c.o +/usr/bin/cc -DCHECK_FUNCTION_EXISTS=XOpenDisplay -o CMakeFiles/cmTC_6ed73.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.5/Modules/CheckFunctionExists.c +Linking C executable cmTC_6ed73 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_6ed73.dir/link.txt --verbose=1 +/usr/bin/cc -DCHECK_FUNCTION_EXISTS=XOpenDisplay CMakeFiles/cmTC_6ed73.dir/CheckFunctionExists.c.o -o cmTC_6ed73 -rdynamic /usr/lib/x86_64-linux-gnu/libX11.so /usr/lib/x86_64-linux-gnu/libXext.so +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' + + +Determining if the function gethostbyname exists passed with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_6b6f5/fast" +/usr/bin/make -f CMakeFiles/cmTC_6b6f5.dir/build.make CMakeFiles/cmTC_6b6f5.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_6b6f5.dir/CheckFunctionExists.c.o +/usr/bin/cc -DCHECK_FUNCTION_EXISTS=gethostbyname -o CMakeFiles/cmTC_6b6f5.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.5/Modules/CheckFunctionExists.c +Linking C executable cmTC_6b6f5 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_6b6f5.dir/link.txt --verbose=1 +/usr/bin/cc -DCHECK_FUNCTION_EXISTS=gethostbyname CMakeFiles/cmTC_6b6f5.dir/CheckFunctionExists.c.o -o cmTC_6b6f5 -rdynamic +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' + + +Determining if the function connect exists passed with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_14103/fast" +/usr/bin/make -f CMakeFiles/cmTC_14103.dir/build.make CMakeFiles/cmTC_14103.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_14103.dir/CheckFunctionExists.c.o +/usr/bin/cc -DCHECK_FUNCTION_EXISTS=connect -o CMakeFiles/cmTC_14103.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.5/Modules/CheckFunctionExists.c +Linking C executable cmTC_14103 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_14103.dir/link.txt --verbose=1 +/usr/bin/cc -DCHECK_FUNCTION_EXISTS=connect CMakeFiles/cmTC_14103.dir/CheckFunctionExists.c.o -o cmTC_14103 -rdynamic +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' + + +Determining if the function remove exists passed with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_f5504/fast" +/usr/bin/make -f CMakeFiles/cmTC_f5504.dir/build.make CMakeFiles/cmTC_f5504.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_f5504.dir/CheckFunctionExists.c.o +/usr/bin/cc -DCHECK_FUNCTION_EXISTS=remove -o CMakeFiles/cmTC_f5504.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.5/Modules/CheckFunctionExists.c +Linking C executable cmTC_f5504 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f5504.dir/link.txt --verbose=1 +/usr/bin/cc -DCHECK_FUNCTION_EXISTS=remove CMakeFiles/cmTC_f5504.dir/CheckFunctionExists.c.o -o cmTC_f5504 -rdynamic +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' + + +Determining if the function shmat exists passed with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_0b941/fast" +/usr/bin/make -f CMakeFiles/cmTC_0b941.dir/build.make CMakeFiles/cmTC_0b941.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_0b941.dir/CheckFunctionExists.c.o +/usr/bin/cc -DCHECK_FUNCTION_EXISTS=shmat -o CMakeFiles/cmTC_0b941.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.5/Modules/CheckFunctionExists.c +Linking C executable cmTC_0b941 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0b941.dir/link.txt --verbose=1 +/usr/bin/cc -DCHECK_FUNCTION_EXISTS=shmat CMakeFiles/cmTC_0b941.dir/CheckFunctionExists.c.o -o cmTC_0b941 -rdynamic +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' + + +Determining if the function IceConnectionNumber exists in the ICE passed with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_aa6c2/fast" +/usr/bin/make -f CMakeFiles/cmTC_aa6c2.dir/build.make CMakeFiles/cmTC_aa6c2.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_aa6c2.dir/CheckFunctionExists.c.o +/usr/bin/cc -DCHECK_FUNCTION_EXISTS=IceConnectionNumber -o CMakeFiles/cmTC_aa6c2.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.5/Modules/CheckFunctionExists.c +Linking C executable cmTC_aa6c2 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_aa6c2.dir/link.txt --verbose=1 +/usr/bin/cc -DCHECK_FUNCTION_EXISTS=IceConnectionNumber CMakeFiles/cmTC_aa6c2.dir/CheckFunctionExists.c.o -o cmTC_aa6c2 -rdynamic -lICE +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' + + +Performing Fortran SOURCE FILE Test MPI_Fortran_MODULE_COMPATIBLE succeeded with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_a81d6/fast" +/usr/bin/make -f CMakeFiles/cmTC_a81d6.dir/build.make CMakeFiles/cmTC_a81d6.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' +Building Fortran object CMakeFiles/cmTC_a81d6.dir/src.F.o +/usr/bin/gfortran -I/usr/lib/openmpi/include -I/usr/lib/openmpi/lib -DMPI_Fortran_MODULE_COMPATIBLE -c /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp/src.F -o CMakeFiles/cmTC_a81d6.dir/src.F.o +Linking Fortran executable cmTC_a81d6 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a81d6.dir/link.txt --verbose=1 +/usr/bin/gfortran -DMPI_Fortran_MODULE_COMPATIBLE CMakeFiles/cmTC_a81d6.dir/src.F.o -o cmTC_a81d6 /usr/lib/openmpi/lib/libmpi_usempif08.so /usr/lib/openmpi/lib/libmpi_usempi_ignore_tkr.so /usr/lib/openmpi/lib/libmpi_mpifh.so /usr/lib/openmpi/lib/libmpi.so -Wl,-rpath,/usr/lib/openmpi/lib +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/CMakeTmp' + +Source file was: + program test_mpi_module + use mpi + end program test_mpi_module diff --git a/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/Makefile.cmake b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/Makefile.cmake new file mode 100644 index 00000000..43573bd0 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/Makefile.cmake @@ -0,0 +1,222 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# The generator used is: +set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") + +# The top level Makefile was generated from the following files: +set(CMAKE_MAKEFILE_DEPENDS + "CMakeCache.txt" + "../CMakeLists.txt" + "../Fortran/CMakeLists.txt" + "../OpenCMISS.cmake" + "CMakeFiles/3.5.1/CMakeCCompiler.cmake" + "CMakeFiles/3.5.1/CMakeFortranCompiler.cmake" + "CMakeFiles/3.5.1/CMakeSystem.cmake" + "CMakeFiles/feature_tests.c" + "mpi_verification/C/compiler_info.cmake" + "mpi_verification/Fortran/compiler_info.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/blas-config-debug.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/blas-config-version.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/blas-config.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/bzip2-config-debug.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/bzip2-config-version.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/bzip2-config.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/cellml-config-debug.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/cellml-config-dependencies.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/cellml-config-version.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/cellml-config.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/lapack-config-debug.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/lapack-config-version.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/lapack-config.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/libcellml-config-debug.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/libcellml-config-version.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/libcellml-config.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/libxml2-config-debug.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/libxml2-config-dependencies.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/libxml2-config-version.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/libxml2-config.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/superlu-config-debug.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/superlu-config-dependencies.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/superlu-config-version.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/superlu-config.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/zlib-config-debug.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/zlib-config-version.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/zlib-config.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/hypre-config-debug.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/hypre-config-dependencies.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/hypre-config-version.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/hypre-config.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/metis-config-debug.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/metis-config-dependencies.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/metis-config-version.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/metis-config.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/mumps-config-debug.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/mumps-config-dependencies.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/mumps-config-version.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/mumps-config.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/parmetis-config-debug.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/parmetis-config-dependencies.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/parmetis-config-version.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/parmetis-config.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/pastix-config-debug.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/pastix-config-dependencies.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/pastix-config-version.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/pastix-config.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/petsc-config-debug.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/petsc-config-dependencies.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/petsc-config-version.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/petsc-config.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/ptscotch-config-debug.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/ptscotch-config-dependencies.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/ptscotch-config-version.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/ptscotch-config.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/scalapack-config-debug.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/scalapack-config-dependencies.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/scalapack-config-version.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/scalapack-config.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/suitesparse-config-debug.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/suitesparse-config-dependencies.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/suitesparse-config-version.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/suitesparse-config.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/sundials-config-debug.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/sundials-config-dependencies.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/sundials-config-version.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/sundials-config.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/superlu_dist-config-debug.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/superlu_dist-config-dependencies.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/superlu_dist-config-version.cmake" + "/store/software/opencmiss/dependencies/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/superlu_dist-config.cmake" + "/store/software/opencmiss/iron_maierbn/install/cmake/OCArchitecturePath.cmake" + "/store/software/opencmiss/iron_maierbn/install/cmake/OpenCMISSExtraFindModules/FindMPI.cmake" + "/store/software/opencmiss/iron_maierbn/install/cmake/OpenCMISSFindModuleWrappers/FindBLAS.cmake" + "/store/software/opencmiss/iron_maierbn/install/cmake/OpenCMISSFindModuleWrappers/FindBZip2.cmake" + "/store/software/opencmiss/iron_maierbn/install/cmake/OpenCMISSFindModuleWrappers/FindHYPRE.cmake" + "/store/software/opencmiss/iron_maierbn/install/cmake/OpenCMISSFindModuleWrappers/FindLAPACK.cmake" + "/store/software/opencmiss/iron_maierbn/install/cmake/OpenCMISSFindModuleWrappers/FindLibXml2.cmake" + "/store/software/opencmiss/iron_maierbn/install/cmake/OpenCMISSFindModuleWrappers/FindMUMPS.cmake" + "/store/software/opencmiss/iron_maierbn/install/cmake/OpenCMISSFindModuleWrappers/FindPARMETIS.cmake" + "/store/software/opencmiss/iron_maierbn/install/cmake/OpenCMISSFindModuleWrappers/FindPASTIX.cmake" + "/store/software/opencmiss/iron_maierbn/install/cmake/OpenCMISSFindModuleWrappers/FindPETSC.cmake" + "/store/software/opencmiss/iron_maierbn/install/cmake/OpenCMISSFindModuleWrappers/FindPTSCOTCH.cmake" + "/store/software/opencmiss/iron_maierbn/install/cmake/OpenCMISSFindModuleWrappers/FindSCALAPACK.cmake" + "/store/software/opencmiss/iron_maierbn/install/cmake/OpenCMISSFindModuleWrappers/FindSUITESPARSE.cmake" + "/store/software/opencmiss/iron_maierbn/install/cmake/OpenCMISSFindModuleWrappers/FindSUNDIALS.cmake" + "/store/software/opencmiss/iron_maierbn/install/cmake/OpenCMISSFindModuleWrappers/FindSUPERLU.cmake" + "/store/software/opencmiss/iron_maierbn/install/cmake/OpenCMISSFindModuleWrappers/FindSUPERLU_DIST.cmake" + "/store/software/opencmiss/iron_maierbn/install/cmake/OpenCMISSFindModuleWrappers/FindZLIB.cmake" + "/store/software/opencmiss/iron_maierbn/install/opencmiss-config-version.cmake" + "/store/software/opencmiss/iron_maierbn/install/opencmiss-config.cmake" + "/store/software/opencmiss/iron_maierbn/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/fieldml-api-config-debug.cmake" + "/store/software/opencmiss/iron_maierbn/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/fieldml-api-config-dependencies.cmake" + "/store/software/opencmiss/iron_maierbn/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/fieldml-api-config-version.cmake" + "/store/software/opencmiss/iron_maierbn/install/x86_64_linux/gnu-5.4-F5.4/no_mpi/debug/cmake/fieldml-api-config.cmake" + "/store/software/opencmiss/iron_maierbn/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/iron-config-debug.cmake" + "/store/software/opencmiss/iron_maierbn/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/iron-config-dependencies.cmake" + "/store/software/opencmiss/iron_maierbn/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/iron-config-version.cmake" + "/store/software/opencmiss/iron_maierbn/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/cmake/iron-config.cmake" + "/store/software/opencmiss/iron_maierbn/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/context.cmake" + "/usr/share/cmake-3.5/Modules/CMakeCCompiler.cmake.in" + "/usr/share/cmake-3.5/Modules/CMakeCCompilerABI.c" + "/usr/share/cmake-3.5/Modules/CMakeCInformation.cmake" + "/usr/share/cmake-3.5/Modules/CMakeCommonLanguageInclude.cmake" + "/usr/share/cmake-3.5/Modules/CMakeCompilerIdDetection.cmake" + "/usr/share/cmake-3.5/Modules/CMakeConfigurableFile.in" + "/usr/share/cmake-3.5/Modules/CMakeDetermineCCompiler.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineCompileFeatures.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineCompilerABI.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineCompilerId.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineFortranCompiler.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineSystem.cmake" + "/usr/share/cmake-3.5/Modules/CMakeFindBinUtils.cmake" + "/usr/share/cmake-3.5/Modules/CMakeFindDependencyMacro.cmake" + "/usr/share/cmake-3.5/Modules/CMakeFortranCompiler.cmake.in" + "/usr/share/cmake-3.5/Modules/CMakeFortranCompilerABI.F" + "/usr/share/cmake-3.5/Modules/CMakeFortranInformation.cmake" + "/usr/share/cmake-3.5/Modules/CMakeGenericSystem.cmake" + "/usr/share/cmake-3.5/Modules/CMakeLanguageInformation.cmake" + "/usr/share/cmake-3.5/Modules/CMakeParseArguments.cmake" + "/usr/share/cmake-3.5/Modules/CMakeParseImplicitLinkInfo.cmake" + "/usr/share/cmake-3.5/Modules/CMakeSystem.cmake.in" + "/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInformation.cmake" + "/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInitialize.cmake" + "/usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake" + "/usr/share/cmake-3.5/Modules/CMakeTestCompilerCommon.cmake" + "/usr/share/cmake-3.5/Modules/CMakeTestFortranCompiler.cmake" + "/usr/share/cmake-3.5/Modules/CMakeUnixFindMake.cmake" + "/usr/share/cmake-3.5/Modules/CheckFortranSourceCompiles.cmake" + "/usr/share/cmake-3.5/Modules/CheckFunctionExists.c" + "/usr/share/cmake-3.5/Modules/CheckFunctionExists.cmake" + "/usr/share/cmake-3.5/Modules/CheckIncludeFile.c.in" + "/usr/share/cmake-3.5/Modules/CheckIncludeFile.cmake" + "/usr/share/cmake-3.5/Modules/CheckLibraryExists.cmake" + "/usr/share/cmake-3.5/Modules/CheckSymbolExists.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/ADSP-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/ARMCC-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/AppleClang-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Borland-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Clang-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Clang-DetermineCompilerInternal.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Compaq-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Cray-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Embarcadero-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Fujitsu-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/GHS-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/GNU-C-FeatureTests.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/GNU-C.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/GNU-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/GNU-Fortran.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/GNU.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/HP-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/IAR-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Intel-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/MIPSpro-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/MSVC-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/PGI-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/PathScale-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/SCO-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/SDCC-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/SunPro-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/TI-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Watcom-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/XL-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/zOS-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake" + "/usr/share/cmake-3.5/Modules/FindPackageMessage.cmake" + "/usr/share/cmake-3.5/Modules/FindThreads.cmake" + "/usr/share/cmake-3.5/Modules/FindX11.cmake" + "/usr/share/cmake-3.5/Modules/Internal/FeatureTesting.cmake" + "/usr/share/cmake-3.5/Modules/MultiArchCross.cmake" + "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU-C.cmake" + "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU-Fortran.cmake" + "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU.cmake" + "/usr/share/cmake-3.5/Modules/Platform/Linux.cmake" + "/usr/share/cmake-3.5/Modules/Platform/UnixPaths.cmake" + ) + +# The corresponding makefile is: +set(CMAKE_MAKEFILE_OUTPUTS + "Makefile" + "CMakeFiles/cmake.check_cache" + ) + +# Byproducts of CMake generate step: +set(CMAKE_MAKEFILE_PRODUCTS + "CMakeFiles/3.5.1/CMakeSystem.cmake" + "CMakeFiles/3.5.1/CMakeCCompiler.cmake" + "CMakeFiles/3.5.1/CMakeCCompiler.cmake" + "CMakeFiles/3.5.1/CMakeFortranCompiler.cmake" + "CMakeFiles/3.5.1/CMakeFortranCompiler.cmake" + "CMakeFiles/CMakeDirectoryInformation.cmake" + "Fortran/CMakeFiles/CMakeDirectoryInformation.cmake" + ) + +# Dependency information for all targets: +set(CMAKE_DEPEND_INFO_FILES + "Fortran/CMakeFiles/RightBiceps.dir/DependInfo.cmake" + ) diff --git a/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/Makefile2 b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/Makefile2 new file mode 100644 index 00000000..45a7e234 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/Makefile2 @@ -0,0 +1,127 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# Default target executed when no arguments are given to make. +default_target: all + +.PHONY : default_target + +# The main recursive all target +all: + +.PHONY : all + +# The main recursive preinstall target +preinstall: + +.PHONY : preinstall + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug + +#============================================================================= +# Directory level rules for directory Fortran + +# Convenience name for "all" pass in the directory. +Fortran/all: Fortran/CMakeFiles/RightBiceps.dir/all + +.PHONY : Fortran/all + +# Convenience name for "clean" pass in the directory. +Fortran/clean: Fortran/CMakeFiles/RightBiceps.dir/clean + +.PHONY : Fortran/clean + +# Convenience name for "preinstall" pass in the directory. +Fortran/preinstall: + +.PHONY : Fortran/preinstall + +#============================================================================= +# Target rules for target Fortran/CMakeFiles/RightBiceps.dir + +# All Build rule for target. +Fortran/CMakeFiles/RightBiceps.dir/all: + $(MAKE) -f Fortran/CMakeFiles/RightBiceps.dir/build.make Fortran/CMakeFiles/RightBiceps.dir/depend + $(MAKE) -f Fortran/CMakeFiles/RightBiceps.dir/build.make Fortran/CMakeFiles/RightBiceps.dir/requires + $(MAKE) -f Fortran/CMakeFiles/RightBiceps.dir/build.make Fortran/CMakeFiles/RightBiceps.dir/build + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles --progress-num=1,2 "Built target RightBiceps" +.PHONY : Fortran/CMakeFiles/RightBiceps.dir/all + +# Include target in all. +all: Fortran/CMakeFiles/RightBiceps.dir/all + +.PHONY : all + +# Build rule for subdir invocation for target. +Fortran/CMakeFiles/RightBiceps.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles 2 + $(MAKE) -f CMakeFiles/Makefile2 Fortran/CMakeFiles/RightBiceps.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles 0 +.PHONY : Fortran/CMakeFiles/RightBiceps.dir/rule + +# Convenience name for target. +RightBiceps: Fortran/CMakeFiles/RightBiceps.dir/rule + +.PHONY : RightBiceps + +# clean rule for target. +Fortran/CMakeFiles/RightBiceps.dir/clean: + $(MAKE) -f Fortran/CMakeFiles/RightBiceps.dir/build.make Fortran/CMakeFiles/RightBiceps.dir/clean +.PHONY : Fortran/CMakeFiles/RightBiceps.dir/clean + +# clean rule for target. +clean: Fortran/CMakeFiles/RightBiceps.dir/clean + +.PHONY : clean + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/TargetDirectories.txt b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/TargetDirectories.txt new file mode 100644 index 00000000..1d48f52e --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/TargetDirectories.txt @@ -0,0 +1,7 @@ +/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/test.dir +/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/rebuild_cache.dir +/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/edit_cache.dir +/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/test.dir +/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/edit_cache.dir +/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/rebuild_cache.dir +/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir diff --git a/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/cmake.check_cache b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/cmake.check_cache new file mode 100644 index 00000000..3dccd731 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/cmake.check_cache @@ -0,0 +1 @@ +# This file is generated by cmake for dependency checking of the CMakeCache.txt file diff --git a/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/feature_tests.bin b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/feature_tests.bin new file mode 100755 index 0000000000000000000000000000000000000000..8d335c5fd69b73d19e9eaef76c5ef1ea398f53d0 GIT binary patch literal 8592 zcmeHMeQZ!TyjtOqab@hxU0fAdJF8_1 zTgg_iYCx*sukaG&hD3Z;geLA0b}ry<__sR^pxvo(f%pmoh8hf_79z*`N~8$U;OA=% zl{jM(2hb1O>hp3H_#hXEOQIc(f|DPr=+`Lx8igP6GooR{sejlv{D(!nuu}mIbp;vg z=X6fY+SC2{t*`{yC<0# zYHPVC8EZ-=Qn@`%d)nKY+FImnT3*Zhjq%ZT!=`>-6OE$;8n$@}{BaIo`DW=__ahJ8 z=zZ&@dGCJv(c?o8hmM}cGVBlf)xdwsx4(gXZb_}j?OyPtn<-d^w;JmScAfoTXKlxy ze{=EBzPfcknE&EK7pMR7hl|gz9XfaA?OhMA*!kFx_8mQV&0DwRo#!vV`JuP!rN}?P z&6b(~m267p1GdNp9|laa!C$xue)J}I58ys_7xViDK`PM}5D}Lw__G{e#@a1-AK;RW zeGc%25J?jAh~~}XfG=WRHdUj5#8{kP8QTUNae5A{5%>>*``EIIb~Xt6VG)Pc?K2#o z&l;)~kV^C!5HUUz?Gej_eTn1s%q?*87ytp=uLyh>6~H`<;)!=JGp&?~nr0n5Y5-ZVn6+4?~);kv=KMbseX53Vt)2g}sS z4?OBqRcC7@ram#PSIykZ!IPd7SX!b&>+is%u=*ri>sKlup+1TR?_DSWtv&?$@DzD8 zU+Kxeu|v(jqfY+)>XvZNscD=6>Z#*60o7BdaQ@8v8vH&Uu3y>7*sJ$J1N+q`To>x( ztXIun+P(Z$jE2oxIB*OL3Kzf_XEI|0C$JU6GU=~jdB6ItfARpw=Ufm#&0kfI&#YG+ zud8p&=}U{z=2Nu#l@Q0MfB%63Bt*K|yR7lJyup5?0E z{~q`igIz<1!kK~h_JR+}`ET4%^SP@}b=^=8*Z*oiPUQO6rlFo)DKGwJL+tlY8O^?)CE75tz6q)^xg{I|eEz<&ut@)O|afu95(g3+&og@NxIB*)%9 z=GfzNEU&BaOgUhlPrO(*=Tp&cl*fY*1x*|DH{J5(&nV!(Y+9>?;a*Y_P~(A)5gtII1LbO*hSPgkj4 z|AA`N+df&->s2z|_JG$P@HPg$64-%#(Cgv-dJ){)A&zC;( zc%Um>B7COG(5c>p;u|_T z)=7>1L%EcmlUn5#+27Qb<684Ko7-f6i`;s*flF)s&29cR|NYhw6}k&%Rl8HM!JWnP zvboR&J6PS;-d&t8<@Qy@c~Xv7Gn!B3cn!0=4=$LUbpOijYZ=XhavWx*%{aPXc3RIv z=;vZ}aIjU(A-L>f3)rA7UOJzdom{N){DkE$)A_I5eqk}cP>wHRGakhZaoNQd7xO3P zLKo~tXg!zXOBrsHt>j{NKwiZTzq5E=G5ff1HHr0Fj#r+KvD{^IPBn0P8kM5pI&`yZ zg%V;&_?&aV)5F?+e7-s1{CdQ4UobM_7c96eaO-omlgBTer|EgHmE)D;xmU!Y=QOCC z4#3r6b6;Kn+^%0Y>+dT(&LZ}9tpZYs@N8f=4rpN)|4-a?am9SN0JsD46OESpc!lGY z^WnOPL+=r;!ljlEROP%~0XW9T}Uk)#&W)0wOm$?aj$^w@YZuE%5YeXZ@S_C`Emq(w5B$ONQw^vnbs z&P2xIS}ZpLuuWkzT_H+PhGUEv@fFO0Mb*Y*WTJ7uu2r^n!$%fG8U?8Mz?(W{&71qLmV5keL z<|(pUONd#rYKme`Q2kHxWu{b_k+-|0d>NCo6JvU02)Ldx_$Wz<6y*8FnVd@NaXAp| zY0@JjLK{itW zTq|AZxkN}a2xfoU=jkHgDl!z@>fZ_Yb=XT&{fC_jw>&I>L9Ug~6SQv^FxvzIo*l@4 z)~SGo=M2u+Y0+Ukf1pVI@MhtJd2>8lkU#A&r$s~Qd}3G|F-S(f1O9k6Ab;A29;q^{ zzG$%Gd5G+Ye;vy4tU)^MS5FInN%&jaFJOlI3v4R+)4p~__)|ZHTG9Wj8TB;wD4Z1x`% z{)57w+RL5bV%49s_|toHT=?Vu!Aw*yVLt}JTtA(s-J&8oSCYN8|34G{bpPo6FA4we zlB3{~MgIlpSU>sGcSrgj*Sw{H-sDf`kp>J3WVN^Ie*+urKdxaU+V@MJ(*IrX!COuKbiSeQ$7e7&keCj|_Ru^y z3}xo}>ATG=b_&SaUebww2sUQ_;(19_AYl*_kst9{C^P%hK2#F^)J_UPex%QVfEe|k z_ThfvXtfu^LGH{20Al_kVhH4Koqyy{d?A=q-R2M{#DfRF1(?aA^15m6o9#wL`&Dt{ dJ`08TuA=^k@cf&!UHw15!-%%n65Lw= 404 +"1" +#else +"0" +#endif +"c_function_prototypes\n" +"C_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +"1" +#else +"0" +#endif +"c_restrict\n" +"C_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L +"1" +#else +"0" +#endif +"c_static_assert\n" +"C_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +"1" +#else +"0" +#endif +"c_variadic_macros\n" + +}; + +int main(int argc, char** argv) { (void)argv; return features[argc]; } diff --git a/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/progress.marks b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/progress.marks new file mode 100644 index 00000000..0cfbf088 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/progress.marks @@ -0,0 +1 @@ +2 diff --git a/FiniteElasticity/RightBiceps/build_debug/CTestTestfile.cmake b/FiniteElasticity/RightBiceps/build_debug/CTestTestfile.cmake new file mode 100644 index 00000000..4e2c722f --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/CTestTestfile.cmake @@ -0,0 +1,7 @@ +# CMake generated Testfile for +# Source directory: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps +# Build directory: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug +# +# This file includes the relevant testing commands required for +# testing this directory and lists subdirectories to be tested as well. +subdirs(Fortran) diff --git a/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/CMakeDirectoryInformation.cmake b/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 00000000..0eaed40a --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug") + +# Force unix paths in dependencies. +set(CMAKE_FORCE_UNIX_PATHS 1) + + +# The C and CXX include file regular expressions for this directory. +set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/DependInfo.cmake b/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/DependInfo.cmake new file mode 100644 index 00000000..8b40b7ce --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/DependInfo.cmake @@ -0,0 +1,42 @@ +# The set of languages for which implicit dependencies are needed: +set(CMAKE_DEPENDS_LANGUAGES + "Fortran" + ) +# The set of files for implicit dependencies of each language: +set(CMAKE_DEPENDS_CHECK_Fortran + "/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/Fortran/src/FortranExample.f90" "/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o" + ) +set(CMAKE_Fortran_COMPILER_ID "GNU") + +# Preprocessor definitions for this target. +set(CMAKE_TARGET_DEFINITIONS_Fortran + "DEBUG" + "DOUBLE_REAL_PRECISION" + "USE_CUSTOM_PROFILING" + "WITH_CELLML" + "WITH_DIAGNOSTICS" + "WITH_FIELDML" + "WITH_HYPRE" + "WITH_MUMPS" + "WITH_PETSC" + "WITH_SCALAPACK" + "WITH_SUNDIALS" + ) + +# The include file search paths: +set(CMAKE_Fortran_TARGET_INCLUDE_PATH + "/store/software/opencmiss/iron_maierbn/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/include/opencmiss" + "/store/software/opencmiss/iron_maierbn/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/include" + "/usr/lib/openmpi/include" + "/usr/lib/openmpi/lib" + "/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent" + "/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include" + "/usr/lib/openmpi/include/openmpi" + ) + +# Targets to which this target links. +set(CMAKE_TARGET_LINKED_INFO_FILES + ) + +# Fortran module output directory. +set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/build.make b/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/build.make new file mode 100644 index 00000000..bae14654 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/build.make @@ -0,0 +1,120 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# Delete rule output on recipe failure. +.DELETE_ON_ERROR: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug + +# Include any dependencies generated for this target. +include Fortran/CMakeFiles/RightBiceps.dir/depend.make + +# Include the progress variables for this target. +include Fortran/CMakeFiles/RightBiceps.dir/progress.make + +# Include the compile flags for this target's objects. +include Fortran/CMakeFiles/RightBiceps.dir/flags.make + +Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o: Fortran/CMakeFiles/RightBiceps.dir/flags.make +Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o: ../Fortran/src/FortranExample.f90 + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building Fortran object Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o" + cd /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/Fortran && /usr/bin/gfortran $(Fortran_DEFINES) $(Fortran_INCLUDES) $(Fortran_FLAGS) -c /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/Fortran/src/FortranExample.f90 -o CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o + +Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing Fortran source to CMakeFiles/RightBiceps.dir/src/FortranExample.f90.i" + cd /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/Fortran && /usr/bin/gfortran $(Fortran_DEFINES) $(Fortran_INCLUDES) $(Fortran_FLAGS) -E /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/Fortran/src/FortranExample.f90 > CMakeFiles/RightBiceps.dir/src/FortranExample.f90.i + +Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling Fortran source to assembly CMakeFiles/RightBiceps.dir/src/FortranExample.f90.s" + cd /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/Fortran && /usr/bin/gfortran $(Fortran_DEFINES) $(Fortran_INCLUDES) $(Fortran_FLAGS) -S /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/Fortran/src/FortranExample.f90 -o CMakeFiles/RightBiceps.dir/src/FortranExample.f90.s + +Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o.requires: + +.PHONY : Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o.requires + +Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o.provides: Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o.requires + $(MAKE) -f Fortran/CMakeFiles/RightBiceps.dir/build.make Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o.provides.build +.PHONY : Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o.provides + +Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o.provides.build: Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o + + +# Object files for target RightBiceps +RightBiceps_OBJECTS = \ +"CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o" + +# External object files for target RightBiceps +RightBiceps_EXTERNAL_OBJECTS = + +Fortran/RightBiceps: Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o +Fortran/RightBiceps: Fortran/CMakeFiles/RightBiceps.dir/build.make +Fortran/RightBiceps: /store/software/opencmiss/iron_maierbn/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/lib/libiron_cd.so +Fortran/RightBiceps: /store/software/opencmiss/iron_maierbn/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/lib/libirond.so +Fortran/RightBiceps: /usr/lib/openmpi/lib/libmpi_usempif08.so +Fortran/RightBiceps: /usr/lib/openmpi/lib/libmpi_usempi_ignore_tkr.so +Fortran/RightBiceps: /usr/lib/openmpi/lib/libmpi_mpifh.so +Fortran/RightBiceps: /usr/lib/openmpi/lib/libmpi.so +Fortran/RightBiceps: /usr/lib/openmpi/lib/libmpi.so +Fortran/RightBiceps: Fortran/CMakeFiles/RightBiceps.dir/link.txt + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking Fortran executable RightBiceps" + cd /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/Fortran && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/RightBiceps.dir/link.txt --verbose=$(VERBOSE) + +# Rule to build all files generated by this target. +Fortran/CMakeFiles/RightBiceps.dir/build: Fortran/RightBiceps + +.PHONY : Fortran/CMakeFiles/RightBiceps.dir/build + +Fortran/CMakeFiles/RightBiceps.dir/requires: Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o.requires + +.PHONY : Fortran/CMakeFiles/RightBiceps.dir/requires + +Fortran/CMakeFiles/RightBiceps.dir/clean: + cd /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/Fortran && $(CMAKE_COMMAND) -P CMakeFiles/RightBiceps.dir/cmake_clean.cmake +.PHONY : Fortran/CMakeFiles/RightBiceps.dir/clean + +Fortran/CMakeFiles/RightBiceps.dir/depend: + cd /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/Fortran /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/Fortran /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : Fortran/CMakeFiles/RightBiceps.dir/depend + diff --git a/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/cmake_clean.cmake b/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/cmake_clean.cmake new file mode 100644 index 00000000..792383f9 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/cmake_clean.cmake @@ -0,0 +1,10 @@ +file(REMOVE_RECURSE + "CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o" + "RightBiceps.pdb" + "RightBiceps" +) + +# Per-language clean rules from dependency scanning. +foreach(lang Fortran) + include(CMakeFiles/RightBiceps.dir/cmake_clean_${lang}.cmake OPTIONAL) +endforeach() diff --git a/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/depend.internal b/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/depend.internal new file mode 100644 index 00000000..392ee84b --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/depend.internal @@ -0,0 +1,5 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o + /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/Fortran/src/FortranExample.f90 diff --git a/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/depend.make b/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/depend.make new file mode 100644 index 00000000..0c008f1e --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/depend.make @@ -0,0 +1,7 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + + +Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o: /usr/lib/openmpi/lib/mpi.mod +Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o: /store/software/opencmiss/iron_maierbn/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/include/opencmiss/opencmiss.mod +Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o: /store/software/opencmiss/iron_maierbn/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/include/opencmiss/opencmiss_iron.mod diff --git a/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/flags.make b/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/flags.make new file mode 100644 index 00000000..83a03eef --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/flags.make @@ -0,0 +1,10 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# compile Fortran with /usr/bin/gfortran +Fortran_FLAGS = -g -cpp -fbacktrace + +Fortran_DEFINES = -DDEBUG -DDOUBLE_REAL_PRECISION -DUSE_CUSTOM_PROFILING -DWITH_CELLML -DWITH_DIAGNOSTICS -DWITH_FIELDML -DWITH_HYPRE -DWITH_MUMPS -DWITH_PETSC -DWITH_SCALAPACK -DWITH_SUNDIALS + +Fortran_INCLUDES = -I/store/software/opencmiss/iron_maierbn/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/include/opencmiss -I/store/software/opencmiss/iron_maierbn/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/include -I/usr/lib/openmpi/include -I/usr/lib/openmpi/lib -I/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent -I/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include -I/usr/lib/openmpi/include/openmpi + diff --git a/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/fortran.internal b/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/fortran.internal new file mode 100644 index 00000000..1b732d31 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/fortran.internal @@ -0,0 +1,2 @@ +# The fortran modules provided by this target. +provides diff --git a/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/link.txt b/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/link.txt new file mode 100644 index 00000000..23ecbf05 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/link.txt @@ -0,0 +1 @@ +/usr/bin/gfortran -g CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o -o RightBiceps /store/software/opencmiss/iron_maierbn/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/lib/libiron_cd.so /store/software/opencmiss/iron_maierbn/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/lib/libirond.so /usr/lib/openmpi/lib/libmpi_usempif08.so /usr/lib/openmpi/lib/libmpi_usempi_ignore_tkr.so /usr/lib/openmpi/lib/libmpi_mpifh.so /usr/lib/openmpi/lib/libmpi.so /usr/lib/openmpi/lib/libmpi.so -Wl,-rpath,/store/software/opencmiss/iron_maierbn/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/lib:/usr/lib/openmpi/lib diff --git a/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/progress.make b/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/progress.make new file mode 100644 index 00000000..abadeb0c --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/progress.make @@ -0,0 +1,3 @@ +CMAKE_PROGRESS_1 = 1 +CMAKE_PROGRESS_2 = 2 + diff --git a/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o b/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o new file mode 100644 index 0000000000000000000000000000000000000000..0aa2ebdb7c626c00ad4e37bfa8e0f03d5c46204c GIT binary patch literal 183416 zcmeFa3w-5Obw7GeW*AO{VIng?c!=R)84#Fo93Uc(AP>VsjDR{Snq-obNhHaMImwXm z0g)j%af}RBbhJ>W>a|m~I<2DPd&bhvv{gHbQfj?*YzxJL6<>AQYPsL<+H38-f4}oP zC&^U$zxQ(uoXpyLuf6tq?X}n5zkPnW?TTx!Y{=(x_LI+DoC_tZ&E?wmH26ZhK<&As za!2M~(J}Mrr8nNt@wO*-U7O2wY(9i-9W&EYpMCo2P}-CzZAp~2CQ929rR|B*jzno^ zqO>bf+M6itV`%01)2ghCD0v!mH_IQon~dn%$~Kwh9kW;GJ7)HF?B2hqBfqy}W_QQ#A1vuOeK+f74{r^W z7ViU@JHFojc`&r`tNAB(z3r_}o)2c1O~1!6pPaW}L#6ZSDS_sgx6cAnmiEL?G8>Mp z(Zf9IiN=kXhCe(P;?|mv-xkiEvHAF&XO{fK&n)@x{!huze(!T(LRU}sckZm$+FiHx z!n&<(bz4{0ZEdaFdS>0$m33QBt=qb(ZtER&Tc_%_zNK#KWZl;Bx~-#iTZihl4%BV! ztJ`{0-PSdATW_q}+F7^t+PbYBbz3j5+uB~QwZ`)GvPE3JILEkrm7+z$B~Je!^LO6M z*NH&SinA6@fB1d3aCKurYQ)Nk@dm;gHVO~~SUU;uID(d-O?RRO4QmW%v(#+9hgP0x z!U{u#&G&E$%ycgHWd?|uPOfFHou-@VJlvP**fX7>Kd1dn=L+9WgUoa``!d~irt<_} z=477fZ1H8f)lBE9zRXEC)49@@8Ioo?&-7(F%S1^|5y1-25 zg}%%QGSk`a%PXaPxi8a^XF5B4nbUlx^IBiNP|BUYO!u7WywR6Ad1pG;_;Rb1Z}Me2 z-Are{>}HB^8M;;TFwMgJr+A= z@7XSE>Ff?>g|pMU_)nZXPfPpEUwj3Wa=IbXKGPR6>z;YoCbB0seF9Ut(6CuBXQtaE zOSj&+BvR<@8Zt+$-6ze;tdr}WoQydw;$=%gjL%VrDMguPWX#!VArx!I%aI=18d_@! z=o&HwWK%XD)74Eb9Ba(nhES(_Lnix(;i=sK12&Bq`IOiBEE{2d$644rJ@X@&1M1Kj z&eU2{ztWJcMl{t@V^z~LAf#~ijH)p;LQtbLWT>$_-C#3B8k~P$g{|4lH(fZ+o-9PJ zq1ZZ2?X||11~+yMs#RTWb~UAGKA@3I8fNbiSDu|FS69tEm7u<7`d6ssWZ5jx#sjA< zyX!-~h|O$0mpI zHQkV0gU%>G4LZ!uDr_-n(8fea$=k~Qf5Gi<=A_(*|||9-k`%`U)8=|26-UbP$W?3C2s1o+w0IZEvlC0A10{N;SiGYVQsb?O#S z8tTqPV$`3Dj(F|4SgU=yHfd>^*8=E>*PRYTnXi(5i&uSO@qbc(nNG`@fwkN5H81~n zJvxw-Xs>V9i4#8fX)h!<2hpqfpn4%f9mH5G52_aq6c1vowu9=`eo(zS4ysq@{CbJ( z@lxUzkh#)S^M>E{#9Eb^$p2PDzx5&Ju^S)!ttb4}6aIha3ATgYk=p;(+f2^$iNu$L z=Bz%ExMv$j(B$16WWEvyn!8Z@%ByDn!?|AaJWQsfF-XMB{7Sb-Y|qa8r)zeVbR3V$ z7SPq$*_UQV8)l`!(ahXBv%LnNb(*R~Fg{vRd!^ri-Rwk1NZS+otb@Vn^x!@ht=Z6& zev)Q`NyDsAtf3uZ{6?E9mGeCXf3BQM z&uXXiSrktD_TrAf_47XQ=J5}E*wN2Vm$~B}*5SCv4fDW$(de{Ofhgqq#7MP<^E-KW z@bw#HdRCd1`|LQok~6B`GR>4%pJLDxYo7nVp0{IDPip=@=(@l40>+ha+WgGTxBsOe z;iBf8uInFaXmrn5gQ}Jqi~L(^C3(_d2hl#jhoRVh>F4;|`_i2!;P)I)rRIgcXZmoQ ztGlPAgf<>{*0Q?}$PG^x`dwmFW;Tez14>w_DSip_C!y!T{g^=ll zHI7e;K3@MrB=}ev5Dg8;}`Ijy6l}#$AVXZ2de9+cCYXW7*|jwdSj49>fI>_TPLDyL)s# zShweRhoRrKGmj-GPVc&vmvd$0>0RRmBj^ast~sou_s=>m;&aRO$3mPfkV^Oh9YcNM zf{xyYv@NPeM<>DQUnPy%S@y-n)GxP?eP!a>nf;I?3=3Td+Ux_}P8UO2x|o&P&59Gp z4h;eET`aqP!agdk(2j@QEHj<+TNh=S?sRMd@=(6;E7~(2E3r4$yPj(Pw7YGmyQMvd zn|k%2CcDR4=RWFlfu0Hp2{)3quK>wiHRX2;F}s^)-ukPKnTe-5HoxMj%~t??ST*m^ z`9S$`=`*_L>8Ire#$Wy!%ks0TGF~1lt*Vs!$8YHYP#!If^bQYJDyv=w=(3kyb;Av3 zl_q+QiUDH2TCo&rOH4Rh0;)I zxHK~EFnMRKMQak>Q~;`=GEnOCA6mgM)f!q5Io_`LWCe3sz@7t1{xAAUn? z1wQ=w!29|0!%Mi@@aGdR`N5l3eB#HKoCuii_B>YN=lO3x`tQE+%O78|9Plwx<9;>c zpJVYk4j*3av!B@?J+SSUf3f4@Ga=xWFT4K6>o2`7a)wKL#|PJ!E-R0~BLJ31_+zN6lKM(@R6{~CU-y`ufiD=2Y8`>*ahzw5kfK6UZG zue|B5um0k>?M^SP?MZ@9UGf6?dFT?_&OXGU?d-!c?P?#Et&RW2Kg3}jZAkl3zq}bw zol>7{H$UOOTvhpF^{!O=_bF&P6(8F1cknqKpEK}zK0dtOehWU6_-w%EP55la=biX` z3ZGBo^8h}d!DkOXd-3@?KJgEIGxkC9el$K;;d3=Uug2#!_`DXMoA9{}pDBFq!RNjB zybqtP_nGI6@4`0XUgiF9apuBy}!0X|GlK$wV$g0s$D;I zPWws-$~lJ_#i4RXQ0e~XeQh4hH54d&Zc$(ux2a>Tf1lZUiPP^i4L48NmcT(X`qkc-^M*#20H5TX^&&oHvZ^`2KEonV_41@A> z*y8t{(t@f}RxVlczEhf)w4KPBHrBMWrWG~Nqv-qaxHF}%?wlHdYNNY z(P8Q6_!#_(ARGBf2R}{XH&Qj|L#*0_ey60Rt^x6!Z5ROQQ-dv5unmBML0wlZLInQn+6i4ILvL?g>aE{~kg^C6w$h%^5nx-l%wtDB!b6rb^uND#9>&;z)89Y!%a03YwEfP z1JgltW7L{gw}h|^Z`Hk$!ZPY*;3S1*G^|EqO7LBdjoHr*YzNN*qS-xp1z@#(}pGsYSIad{18n)lso4B>V6EXeLb@$q{B<^IRu_VH$TF#BNZwd@1dRz- zyCwq@K}?3+n=g_Ll}5x=nAIi$r7;Q4K)p#o={q7#TpPii5qzVkGbF3+apNINQ3f~EMr^4?9ybBto#3Ej6zIa&>k6@&mbtv+a*5WxQ z=9cB9J67V`Lw9OK={Dz!f1PSj7RaWljj$!0giVEnS2zaS^Tke_e`seJVWET+pBoyp z3*nZieq{u=M)cbp6D|4T`xnLp2QX>q9L1YUWTds-C1fP8dXf4VenPGqYl~>pS-s#Ox{f&1KT`@{`mPXE zsQaCeo3i@!ou2SMbWX<$tVyDqj(qXkLDX0`^avA=dTP=kiQb%BZXWe-D5^)@#zRm? z77Gqb5yvrX9z`wK5Y(&bD<+Fu5^UF-i1Fc&NGXwrT) zur(iPiQXL4`5jPt3{@HG1ph$I=ZiPuyipktjVR1&6PEfkh6!J&IFrCJ=I;eOs`a}7 zZ&Ub}fFBQwB@+sE%izc_s0;}tHx~|v$-oJ@8wqjzY9!Xgxf}e;4^Ih?$KiOom#ycI z{a&)EPfE$J3EQv zriHB#NXu?PyGmQjohZ3YPNJIzooo3VkhZ!nIa+~}@L4T+%>tY9#jn;G&UxwK`Qpz4 zQtTgu&8mb8u0tVTY=&>D5LF!<61?uJI!M}?D3J$}k6~1$b!_TG;QeSIT1$OIF_nD- zaCWBcnmHr*aW1zZ3{Z03`C8X@bV`n z8fipG#%TiQMcFtaO()_%nw8Tl_;@-}k%bUSW|M)iNplVGEmU%1bU0ma%NI#0A{4{s z%@o-N;8Jfy8KaFT2WyGwoEpI^Blt{(e+@dV3ZH~jqFdq901qh4akobBz3?CEz|Uz~ ze-!*jdUeX*u2ULI{Ws^9kGz|FL^t_<0k~bqKei?50@3o$?nI5a$h0m=WZ*Qh{~2go z!NZGO-dUzSUwkdOlPW%f_l`hy zH~6#>2q(mM`a)d(!Q35)62&F5aLCEk@*`}DZ2R-YThTm+Y~(0wCbO$ex(@>GP&$7B zcv9hi1-xBh&h|%=#$mU)j6-sB;c%FGIMnqr+!Km$d~6g=tjrhJpgltqtTq>XJz$%X zeSl5+HvpDA79pXrz!}t7pieaxsC^k=Yrgo$z|sMzQiEA-1AG&3o8tTe@IX>sY>q_8 z^ksIN3+LEVGjW7btkrALoWUrWPI#u`5Z$zLC*Ww^W*1h?#n4ByaWJ!Uxm`$KAAH`N z91+FT_&8uwBUu=Tq#26fMA(Sx&3oDREm8ec1m6+Cn=oY&*xZG%IWS>;5;1^0 z2PN$gFMLcltTSb?&hZHd>sz$%TajX{RQL}7uTl690e2%xkjKUXCxK1DN5jA*WK6Ky z25wwg$H|j%gQ)fN$RW#}hQ7=llF_o7)j zjUA92m?>*%i}fqCFUgqZT;A-3q3M2zIYx|x`X6`U7J%+?1xcTtrym$ z_Ti$1efi>N!uXWRc!>`kh+;G8yMWu3-)BD`J`n87?rg3eKE)&ZRU>8am^@@$4&gsQ= zrmgv67uqwZvf4sa39#1-VDp_f0&da1w*cm8Cj(+*ff1>(z}bXnzhI)VK=~7=3|tE% zzAOUc>BR34pKOam6!OKt0IVl85=C7DJcY*qI)1H_+CJ>$n?R2=6615bpE*AF3O>C4 zF}huofoZ2(;Ep3GcakTB&g{sCBVfSByq~wIKl(A@9#l#G_Jv{j<)Pn#Lf&t_VDGAd~s>f6RM?Vs@7&J(M`=) z0`68OZUekMQZ3cW_DD>p+JS1-4#XGyDL08#bxeGDz}W=el9+)XO7^n|U^@FYnlp4p zCD{Te*FM}lz#jYD7x)gft`o$%At6h!*wys(8o(VoFq5qmSNi3C( z{o)yAhHXNQgbq6B&8tB`;n$u^4>4C}%N#19gyzeB; z_y*8vSNPR{O*>tHJGK6V-mtal+32=5lnLx`Z;Nw8NTRqLKZXEc`U*i@zVljqMqmhp_FFIF#Oa!oKxi4x)1;qwZm`KsKM}6&+6r zDyyI!h|;8Yh`{&Np~orb15L3+6%nkwA|eqh8asx~uCdU(Rb@UIZ~g?0PKt zF}waJa7Gm;2OpbM_(Nb}O5r7_->UH8fVU}pB;f4|f9tAnbB(^bQ|o^h^moCI)PdQt zKZqCWBNnNK9idDzrnDE{dH?^U^K;q`cI3S{7tZb+drd4eVKXWHq*+Dg+S#HoNv?D^ zB;N&4u0rY+*3NwKpRxz6t7IiirffixX$jGqO^3cP5v|i}%$aD82pP=k)VkbRpU^}$ zAy%gdy}v%8FJ}{Cbwr5V{8N&UTdyr6Ys(i47i7xD>WC8AISW-;OPb69P`W;w600Lh zRQLKMrG&a+=ikdF#Ogw70sU4crCJLpnEYinZC0n4JpM%qag9lMF_s*xRJWo%!zn1A zMKrpV1yI_dUGb^ONrkD49lDZGnq1y3hFdYj;tMl}cmmZ%mbs11Dh_Q!5WYNOuR~$( zj4WspXHA4-iy}omCcKccRogD$Fi)V& zX`Fb!_z>FpN#kG#)v$PR4nKZKW(`zT2CB!Q%v51L9I{2trg742QQ>Kv_!1iVc~>@$ zEU>Nk-U^yki^Mi~H$V%-gv|ltXI88?E78;~O6LXyL7vBPEXWj%H&HcgzyNsCR> zr*YC^(2YK|(+kfyOf4uvV~!wDq0VO5%K7}Fm;5{FA^299?erbIU;ah##H z!cg>BeCZr#7{E|fGFLD-&T6O!CWHe|qk~$QAT3N?O7j{#BSf8QO_~*^7-nI@ z=Ey{EN=foG>gFYhvDAE}XNe$L+6)@f+<~(i)F~U%9KkV5W=Ntp2P09px1p+JLZR!x7D`%X&Jt+6THiVpU|8?+V7?F1K(VWqV z+O2k|Bo4Jc7Y?m47Y?m77Y?mA7Y>bD4~HR+ww?=zE-)7kJ!38$I?P-+^rN|O=w9`3 z7%1s=^>8@T>5OyX&`0OOq3h0tb73})#gSK_S%bH@yPF5i`Qn{u(0M?=Hkjw%iDknt z1NR3?lH9n4E&1ZUK#8DH`Z-_=C(SSAS%%M0I3SzTvc)MWLp!^rapKgLI2UH)c=^$+ z^5-xGb=l%oMHVv@aN#S10$vO_p8S>ok$>AHGAC_`=$xuB>n*YpK2z(@ygsPq+8aZZ zz5Ep+f->pEsX}An72sYZ!8(6g;FrN9=G_eT80w8*(r9;`k+-miG7v8pWXw7^(G*dX11o%Z0Wf1rf~9U#0gVXdvdooBzfRvO~WWfyW{cKHn8ZdKlQ0dG?1#z5`k$18JQ0)Z=F|md1(4dZ-=y|2c3NEhtBtP8?Baq<3ZD zU@Y+g1kSIZS=Gh4Y%ry@sZ>P0K6FFIK`iY+@&>bm?K0!e@qvL{a@D@XX;HWxfy3tB zm4KO9kgvu9JybYF;{I|BymT1vqP5Mqc<2^*=;b$fHbjR11-Imo#_|AQOZ?vnc$12? z1Mp6TzYW+n0S5s41GEz$uRlPeLMJV6Y=gX0abZ)+V>xcx`mq;L#pGu$9P&9A4*Ac( zNq9cxO5>zGpW>!*z_X`AuckYsap2WBP!gY@ABa!v$`}6}sF6d(aF#PtBXgy~Bxx(- z4*_>5{iRsZCPR29DK@7WO&fsSGH{Z+H?Edxq|D<0llx2P@Eew!Bu(xg05-V~!2+0) zo6Tu<({i(022N6LF0^T+Ot~8iOR%=$YF-o%deB*Op|1i|r)b4@SW(JQ&bN^T6ttcb z&9VbpGHZ2W%F&|u3@bd+iL7JR zQpkM9B#tR++bv_UQu!Y<;fPKh)D+)g3a!v9f_k(De zVy5~CFG$Iz~mkRazMc@@Uc ze8_8j^HzZBEIZ*WEM~CG6x(z~C=h7JEdn=j&;Dv4q|J`Ff!Pgc!k&r@Dojbru%6WwUeP)^JQQH+T@0H>H>)m%($ z&%gl_GM`t%M6Ixea#3r0LKHI*Ro<@ngfCZ^0jopd--m8G6{Ze$9tyqc9>Qnm6!X+5 z*Le~SMZZYPBRK(uFxzbo43ma2&uUZECjqBa#i}&v^!$4$1IO&ukuNsA&JPw3Odq#_ zInPW}L~joB>@^^ME~+9Xs^-~sXxDj0kn@Z@iLH2Q{WvOBuQ3ON&25Qd+#LRTs6p{t z0S`odw<`P!)NhOG_bI#q^^Zh$D_D+t9~zn>yK!(16v<^5UVLojxeXae<3PC{hetJJ zCc<(0!B^ou5(5=Ei;!fnm=JNuWIY@jVs|!oj&}j?C5EM&==lIWMhh3kJKkDA#8J zwyAvs;3=)21iVAxdjancHsfg?yQL-Qi0pbJ>_Ku7j(hyqj>muA`m`7aim?2pG>=5n zl7k4T%0+0U-ASCPx%geQ>s*xkwJ!c_!TR6hHA&Fyxe9QrYTyRI-C?`KBXc%qu;jNy zJbq@kdN@3$y(Jq*9BgmC_$xFk6KAgt%*BsbcB9(Nyc#%WX5w^cU*edVUk#i!T2Gu! z5zZEcZw1a)=WIDR8;8~wUfVX9yqmL~jQV|uZ)DipjymUXkrJw70FgM}oJb$4fn+nB ztSOhZZctMXb7jxOF&$Fy7Nz+orI4I70OolIS@P0S9WMb7Rf6o*oUec!0qyFAXZK;C zFriu0kx1QOa$`DPDEGv-G>foF!gc;s9VB5@cKiLe=jq|K3;a)fVIQz1HL?0+#KTE{xa`=3~D!X`K2l}eMa$^BW-Y1R6_ z2iy&rD2K?jJzwNFbFe~kCKI1h7+b72$0D3%8g6Wit?q%q3h}#j+&fS|pzt37-m35? z0dE7l1+eIyk`75ZBB!+Q*;rU@f^Etd-`np6<6tHv-O`N3hc_k+?GOvoqD)X=6M%F~ zm)sAT57BPzicg%&Be)}iuT_{z=`^?>(JP3@?w?0hT0AVL1vKGFZ}IqbUKkqB1Y=JV zEVfd7+)1WQFp@FBE&-fkf>jwzcsp>o-fSFU^btJ6LbFOq>=?ETg($}K&jFi8n_>C^ z?Rz0$a|zPftMwFSU(g(jB#~x1PQ7R-l1}5q$qI+ykaOYCo9DuzXV=5|0qjSQk8s?2 zvWW+c^n=C%m0Y0unz7FXZiYtb$EHQHugByaxFI%}*?~xAf_Os2+XHruwg=pX--xOz zR`G2(VXuJqh@xE=1A^q997E}t$jtHHFef+kToZ*Ew@puSyiG+Xne7Un1=zL$F9+?M!8TB#9)xUy;w9WubdeM)68Zm!nQgS-E^^h7(O3lBO0qB zj;g$zIOk{Mhy}6hya~-27G!m_)1*{yOA>P8kE$JxHz| z4#_@|fnx%|iB^}r0JZKZaA7njBDy)zs{uz&M4PfIV#wKbYqSfdI&aNF+8&Jm1++&x zGMLq-)9(W|oh}-!GCrFlHZpyg-Rj{`cc*3GnC{^3*P>Y&jdjQB$lodM8{wrs2A{FW$EpJ4@?AoGm4`5pa zh%=@2gzt#pO$y%${4EMIiQW~2=Y%700@=8 z07ArI3|kgQ6!W5EE5VB{0-Oq)Y>s%!oH^`P4~JIk$-seV;_n4~-|U)k&o#q~aZT8` zrs|Dr!WM!ETL>bY^~{C!SvyYFpQ_p-3o8{a174%>M*weA_^$xl_ucaoOtTLK1w0LS z9t!>e-AyQLv6d+mcBL{%lF!gsc+yP1IBqo(YvOCw@f3QfJ(nYg)xDyt*F+-g)kyV7 z(}t8W-3vAhToZ}1S0klK$6ifYsibr-NES#F>9d(gY0~H>u>f0)edwTD41(NZ&=1Aw z_9Do3toM#a(41}vaH|@83*c^r{|@jjwRaPq;QH;uY83qTVGRlcX8gCHur(hJPbmV) zr)5p+gTtnAs`NpAs*$So!J7CzG*yHs%zOxim_~C@>grxe94aFN#~&0^AJkDA2l`0h z@S%DJjt`%_gUg5Q^>Fx5fe+pz92Y&C;$(bxH?D_ICa@&v#TMeugpcYYN-m=BkJdcq z#(aifg%nfbV#a6tRY-dyN(}iQ%tG4AjsL??p*Z~G_?%s9N@`LK=vWsHJ<8NC_Ko&ZAk` zn2*RrH;+2$tzkA?33ycL+zfbI;FL@dHR9Bm@X}CZl8A7eN2Nt3?J6XQoLuTZn8ecI z*e{j)$h^X~^$B!P?#XTpXU!|3n--Scn%K6oJF6lltE45)3$k&9Aq2Q>XkGwAymw&? zk-AM2PK_3&Lz3owoEmGACVH?ALyzQ(&%4btRLf6@VoY2GxLpSx0c^fOhPG+_@1lNt zV1heAc1vq6UhrsGl8bPvH$zk{X;&e2r>4edlSpPKvB4&MFLG*5kvY3fWa>0a?<8Y- zzYuUr@2rYAH75MjpgFs`6iA!YtM zv@55(Sr@@J&sblG>a&6^$(X8%-=X-wMt!HkCt)3)is(nx(O@yhF2)X6$W1NQJHSEy_66<6Va)koXt;>zSrtd`nm+L#Ln5 zA^YVwU#`_y;9IhAqaDA+Z#(d|jE$a&`COmfxjjraj@=G&%^)G6u*aw=xsXWe*%sUxHxH9 zm7zdCM~HLcotZeo&=g)`fo2^bW{5pav8*?l2%BOF$8qok_li|gY*CV*0NfeoEUB_; zE}p-YjdKVF#Mi-b+y3pDOp~E3Ez&bgi}9a{t#!|eY??QaX17YickvD=%=*y?9*^Kj zg~{fW!lbz)f_EzX@4(rm@Nw`$yDUwf{SDoV(XcWV_}Q_Z9?2jHrg7rHPaM*&heQAA zP2#wuXDXak@wJ$GRz;ALmnQUnI14}J6pO}jG`2>o5C{3|B$A{fh#&>hdWyNUv&y^Flo!MgA7hErq4=kuZ)eokY}A4JO;NqsXc+aod?@0`iWG;UmfZ+w7rHo1+1;P6F8X)Cgy#!hZxhtqOk~aJRw_0Ul8J?*NY~{C&XYh>rp`A;|;7 z8+GXoM6FT!Dg(uPY9dh;b0WRF29lVufO7=2tBDBGU1)e|#_r>c&0fJ&hAEq~wV=YW z-jqr>DGc)Q5E|Whlx#|Qj1M*VR>4?bD;0+% zTZ0_rZwyr#atISG`QjJmW`Yda42c<{G4=K!^27rNLCC2BozI2Ss|dAJQN@MtJa*8X zkyUZZ>&Uet#A4(I%&It!H$UeMr*?*F@t%F?9r(~lV}S~8EKoa*1&V3TL8|H;B61-8 z1h7`3HG{Nu<{vfJ&cb!b?bxwYzcX_k?M!n==ur23=&4K0Q z*U8+5?}FSlXJ?`mf-cC-YE-3l(V+{?Bl+SV%uO`ri0BrM{v2?-O7la&7LSR)P3xC# zNt`_}H(<9kLs=@Q(;Vky<6uf+LyETpZM@s7lrzL^L)h#=*z6I{ zBEqH#!WNhb+sa4SRz42ZqFQ0S1?fLT{Ti+R8sJR|KLvQF!Yke#zHrzE*gwy_2?hT= za|(q?+d+RAh3!_@i^3yTcoKzzy#c7{cabn!;VKlStT2VbUMqYSg{DP^Qf>Kj{|$vT zR(RffVC+S~dNe*oN?RsQ#<*Tl)Ck8VN%0y?9Z?4nQs$WrbyE+Abf~j>IAofttcOE7 z)Nnl<(xKw(;gAmPQ4fc7Xr_8Nq(kdv;Dke3YMNG!kWAC8(o4v-#1 zdt>2t`Tf`OyYmRvydS^4AP=K(6~>L26dT#@1IzlI3uEg~-V3%c45>C2{uBzZmG)z( z(Zy1}ES`hvfs2hTi^@GmGni7DU<^sxGNfz8%k(!tXab5 zQ-qt`0OX`uX>!;WXGi3@B&0OOjta*#sePmQ@~y#guL8`oA+lv|&-R6~7!7GlEr&O! zAZ$x5Gl&+&C%iI(TO&GcLG1QOY|bQV7pJ|(b5p)}d*GQgjeo-7y{EqykRqeNTA!}f z@by{^kJV~;IE$vYOraj8prhO?|yTX*F zLtzTgsW6>Gcb^0KBDvEB&O3wW!zgj)GCy%zls;iQW2of{tT$nv3w}(P=K(fho)6fB z;S5-#^a*#vQ>c6KZcM=M1@Y!%2M(WQ2kNrL&p;|F8q;9PXU64VM(A(vb+eAVG!|Y5 zQjG;VPGjNis1Z)r;BUAGqU?}GlmjfpW9TI-l~H<0tHSgWQ!*tpCDThx$@G#=$J}JT zNRG7g|E8BvU=x7wnaTrU6Nd0=t&hEjun9)k1fy4VDt__4;5}`CyS1L4G!Vg~uodlN zUd4XeJRe)t_bOx|Al+E_zoBCpU{k($%Shf^c9Hu?p}S ztv?rVHxxqo8Vj@_-c2FDsTNbw@!PyGRhIBb?ejq@&54BQ{)swBbLeY#&PQ~Z_Mtk2 zJl_ZAL@MNq)VB^T8i1PqT~tQZG!`g3UZ^C$$vu=Pze(GaI21_K^$6eLz6Eta3i;i+ zJMbjWCJcQ`k4JaleU=~e62|N?UL>ZcYJuoRs0*+;9rsDw6lZs?>ST(j88ISkZ^_j5 zOeA)T?>xD8jm6h_qwUqBAfa5$M;f9xg=oeDPHurRI8E#;xHXy!hg+QtoW{b%SZy%n zU^B!c`Avg27HCCeJK#t>2U+I_KthEfXz-T-M`!7~(ZZ_qVDYgKasDwIM+SqZ{}-Bd zKS_|hOyFN>-jy#FKkUaRXuP}E6A+{mkZlogE1qqkPK_P& z$ZF$j9bnVoX28*919o9^Jsyd}ZuM{|$0svzB02V=S)G|6;PrNB*lXmEeqxgf3i;;Tc0d$eT@W1&I52H?lo92(?$n{W7V zXy9F|U}iod`cxANz^f6jf4lva1)pJRxTzp4*l-oY=4;A>6;X@pLC*j2ozK(E%gI^lqzl`uASAR`Z{|dsVx%yWLPP6dyO2X$Wp;t#8t|qMY zH$?Rv0^?>F#CY={2fKU!>s|3pQz$OJd&kdjb>+8R1MM!pdz+PSrw=c_dyAFdz)7_D z?sr=GU3B8bcTZV)BYk)A-B0~Y=}psR7vH_#%A4q^i|^iN;a5tkJ{MLHDlR*xCYvo&iPyFPme^bgj?tUxZ z!Pp0UE1REN`DSOAy{Ynpsq!u>-^Gv#zqhi^!;h!R+pTQ#*vjuo=9qXr?69(qx9y2rkDELvmw%%(%vKhQ zzPN?O7x>~P>-^d;K>3Y}7|;0QEcUv68I@h%NmL&1I^=TKY3!Hfik02k;wwt&imo{; z{x*%#trgGFe{)hH;I;PpT>4s<8ZA`02>`muRK& zo4Z~~`Y|rDF(UUg5ncsSHFPpo-DJIHtD8>OLAF;ny+b)%`#{9ND#d@K8s8@6p}-g3 zvVH}Hnd6;T7u~DJ(6fj-O$5>=?^}&@Xfk?RtD8&}pQ>&$g5RiaGJ-#>-L&{KHI4OL z-{j41f_i5+zOM1OzUdUT#?98`G*Q*Qxkmd+?Y|?@o+4sM- z<>`iMq?GNe`@H=i`g~yleTvH4{^~w~8FQBZGNjOC&T{n5njUdZb(1;3wbf1L07KSP z!*+Kk+G`+vWC89Uz`up59WikL?N)zcO*Mo&{HrzPKCO1si)%N%j!j&rf{snN$=Xf7TTRd; z_>?uJB)G4^Y5G6^EE>wTg8yWl0vFe)VU7g8kjnZM(63YUOXr7f)JNxsZq)CeAG%Th zMqPB%Gha_6KUoqwEe1JFjhFs;h8oX!u*y4(l~-F+)*ykrv9f7?=tljs^Fuf4kIfI= zs2>Gcv)FdJIVd&$Y>`v>i{bevsQPoaD)1buu;b3(2LpbX%d|DcQDhG5_MLfk^TXel z9{%vWt2r@da)n~~ZcSPdIJ_l|Vtpc6C#+ZQxx=G_xfT}X*GY&#xg+!Z&8J|`J_EpM z^80vH^F*2tgQViKi{+n1xs!AGCboRcS`N!KkpNGm1*MQXiEUEJ6KSbDDtFQ@!0s2j zpMoyA{A%{JpBE{RzxTvFxZuoEel?ejhP#Kf#D+z8cQ3)S=2HPSwyRsdJa^%-xP{85lb5pbsI$R6DZb&@ z^A4k|?al9f@v-FL=nHbJZw7eGXJ z6l>zw``Qdj{(Jah;@^hKeEz?VSc>0y_)-p^{Hn@$d91XmQtltWr3XNHv^3H?JXoo$ zdKsY0UV7CHH=I?P>=_;%DpgipIXE&nUb6ZWvmx37ITFwT+g%nU)ajg@bE>KIJnn2`9*KfKiu$v{80_v%Nt5ZO*C{ZZ|GXl z@VEKpfBVM`-ACmb7B5=TaCiPl01f?18ZKD=mksaEFK=Bmel=?Hi<;K(p9%g#PyMH% z>*$8griPC_4QH-sC>|Zr zL9f$Su!|vA0ZMAovcl~R#pMm>)%pL}h6`5I`2RSmKiXP7;PI<#T+`8o>4r^t2uo4r z7mf8O<%Rn0Xy|j+5>vA7elgxgh$sf5a$I$y;n9XuUBAacY$KI@Ny9bE3!iAX?x@7S zi*9bXF2CrwhSQ+?x$%xA-n20AC}=jUItmP)yu9JoqYBqHT-MZZ>e2ddGwSa{;DBc@ zX?UA+lF!pgZpW|1g$wcfkOJXD8!n*N6mDNaKLc{FI1zCdEm<^lyLjEA=dLN-@mRye zibd~u^FRM{!!rJ>SrX=J=>q}*4k zgyWq8S5D?jgv@eJXd<-L=T6obd8slY8U?4_SoPg{u!-wRffC9H;k5Y6Qf|U z)HOCx=~@pa%NU#NbPbMl_4o9aa_f7>27A^Hl~B=Fnv57r3IYCYK#VR7M>dW<&hkKwEl^aSN#h8xM!4asP>ViN*E9iWzd`m?%9u!3Tbge6uVJxUX zB)|gDGc>*-YuI2`uc5)d+}H%Uym?}LyvKaT+{t$kBf{n2YGO(UP7cE1#)f-_Odypc z7YkuliR>*JsdPO1q*N*OjP(vcw#mwPX*5@Fc%tV9dfj96BVxOnW$8{faDy5{@61F(+&1b^bA3m-iaZx$J(CWo3W7gb-9_-*Hbb-7nP2W zl}a+ToQ8W#Lqo$u4qi9ZmB#KX!32F^!nrPtI0}=OC&ou7FhOND<{)X;aIR9G7=xij zTccspf%)=S9d_Krc2lqy^J{2u?HFc2q=$6_<;r-@{K8FYaUF2d)jw7qb`}~fLwrnZ zbsU@YmB@a<`{EhzCul+;esZQYvaU2z8l$2m^mO%ZfD!u;T%5lmfx&c?ndIgoz7s1g z-bqzyDt8#%59lYgI8&G&j%VLpv~5&#V?BL?@Mov}geF|{3c<#Q7U8%ODSE8bTN+$n z>Jo)la(x>{dWHvkyDFGC@VO0)bjY(Rury;ar?kY-aj3nwD+q#lW01LBxX|btTVTDkSy}_q+L9aZHvZPPm|8>wwe0^Fp1ME^xb89Tu;l zp0yV~>HJNYz9z#pS%FM4tYDEGUhLi=hM@WwQA ziT=1cndgYS!zIiy}a_~0-iHI|Hu z1y(g(Z@JXpkKGO;i=dvD@E*6^GEWhXf@PQ)Nz$T5_Xfz$e1!B1bL_?R!%qcSd@7bx z6?5a|@tz^mrlxSEKDtm&T(h@a9_t$%fubrKAkA>3eVOzw$3sLwgh3EsA|bhfg!G(X z+mgxYV7dqs2ninNQ0|rzw|-b(pwnWmFEJ0eV5&lV79&}TE$Upze41jpq$Zq}u+ixv zU0KEwEV&w^jt#Cy{6o}q45o7nsxwS4kxsJHUdFH@Q$bCEomYXNuD4wYUqsMFpy?e) zmga`!aqeqo{><5asj{xFi>AK(+q6!F}&P$!_D_fL$-)~2hp zzGq0c96@nN$@}^(knu=^i?^hUbQU*C6c|ILi)%&B9LSrKC`TW)3bi~<$T{HLf>OWG z?O#lG^ta7MkY76oUlUisj-V^Owp!YWxf^0rY#=VlSkc3*_3@Zle#N#|YkOfm$z;@e zxslQ>SO~xZ?!F}T~Y?&WfKR8w%;T}>qL~z0WJ_LgD7(C1QzuUC9J)P9x zK&ihU**o1(wu7p>K5Qn(2G>q7k$QZ!gqD<&gH!^W8L&Dkr1Z*Igx zR2Owgf{p2pNS8yBjHJ^-fuCneE`-a7a(2o!s0SDE4miDciKk5vj*4;KjFlUQEV>-} zMa1p)`p3`%$?yiGi|P%|F%vVp%jZ%$8GS3m8P5(x1E`gd7Z`H3s0yQQN%jklN29F#LSITP#duZDbKCq_ZY}z&%@pyVT z;3Q;1rYr_cbJ=6q4pTt<(Q%OQ1V@BB>ycdV05-F|;BO_;-@c2^Ih`}R*ebuziD+>$ zxSdD^dvf4oQ6c1#>M&+7iI9-xv3Oo?0D-QIop)f@uj%Rva$FK8|6%!$eR4EsJIS>Z z{rx<58}*w>=hyMF5eIN8B2J70D?A$V?1Z4v<#J4?t!RN35&bHu39yb$BRCiGLCivG z(2<*XNKq4MrFZUe9Ey}j)|SV|%ftPHlg>+(dkr46S}dDQCnh#w9Jol>X$yl~HpTA# zsME9`+0E8&ZvYU9)+v=#4g;NTq7ijlA9U-7HGhvLjZ%Ws#=aEy6&Eb# zBN?NBME~Fzj%Ir*mD2Fqp$&GZGuSKkkZ5iWoFo^fSZq3c)dRvt zBATS;yXGb4?AUnt6U6Z{PRGjY+_6T`Wn$9Wc8NQNgx3ovP=JdkI&~5!z{aK<+GRCK z7l!yaN=D8s8NCjrI-?uGcXN!GW)$Jk_S<2a_POn;4+Kdk@w#K|ce{yDWlo-+4)75? zdeHS3>7tz*x-``!-T`Y8_jj}Z#qC;x5ZW!9cQtdK8od(>| zakGs{!V^L_&v@uIJ_fVXR`}J^7t#~;s6m`iS~zk(ms+$$Vl|9A?Dv~`orpN_sNm^` z?7Va)C~H-f294~Xdhyy~x$5mg< zlX~!&NzBhAPdrbGegl}yFz8f~A@!71`isD#hcMAq9?tb}u&!A{x!;y2=Ws$KVZr!F zTBDF4MSdIxrEV-7g<55RVJ~5Gc^qm_K0W)o1(LEp22`7xg+LDj$@V)+enLRt<5|&B zyx$jkVRqQFz~CV~bC+G6XIu>=DS9*qLp0QAlB6L6i8f^-Lz#Wt3m_87J^*`JpXMNY z>vD-Y2Dj&6(qH42v%6T%kxe`~%}wB}$3p8^iBGI>beOd__D=6TiVB<<6X);Z9CFb@ z*JHmV27M(xH`0d3b-a!aY^dNAYe>(wd`bh?nUDu+c)&7H##3q^47g;#S^bj0DFBHj zf0IDvLTNTdpFv1#Eic+6&?GNbOB$S7mUap?8wSzc)9NRG3 zGd>Uru3qi9)0v@%Z-clxASYyw9%CjpA{kpU?`l}M?5I`@EoXFnCa5GT(S*~{RC7Vt z;3$ExB54;3S9-MTYEvQJ9Mv%|(@NJlSy6N?agmL=78bkVs;xE#k{m5C=Qdr~wCChe zl7@6D%ID06?2be&#TZ70508kC(Og_eugdQ54;K{%Fw;b5sl5*)kR1^^cTHrTt|~d3 zeKLiI<(5QLZ-N6S@JVPXI&HnVv;me^kBwyY7K$!)$lBu65ho6r{nMwoF6d>3HL}z* zK1CQSlCSejFw-nMVG#$*%M&hrt6OPrVr~KRYFOEN5VuA&gM(|2= zVSrxI0olf%ybcqh6yRJ8+@ELq&ezWAVm6I`G=5jFcvZdqzftHfoXlx#uNCH#`NYKDhQC4K?Fh7l()+EQEcpJg?!k zCQZJaB8e|2gU$nRq!M`btR`+bB_D4IvpR2_<7(zvear%@h*a)5xOCK%!Uj?wO*|}$ zgqLL5FYcBKAnkF>qa+~m)Xp7*sEtDQ6kJ84L(&1%gL&nu)`l>9eGQ&2Lx#CzItViW zho71PV)q!1IRgbQV3H4njZ9cO>SXCZG=X- zHyBR9nSsaIWmT|>t_=7chF?oG#AxWDfKEex5AQ7)1cD0W88at7k_pkPwUS=+gp6M0 zR$r{l2r70R%#N7{dXOe^UpUz7d4sD&e&s`N)??R{NhLuLPc!3&`Kx&uTd`J1$7nW% zncp)sWFB9AXCPQRguZ0voL;zXv*)yAa}`?Bvv{*+_>{8o4J>2Y$R zQgJ$oIcIHZ+g{rvM@vCa0_Ln9lloH_^2BptUg%ZNj}@E|GpO+ce*$q;qIwP`nMVu6c{E}~mnP@Of%p;gY`hLq*l`;LVTt|8uu z9WS!8h&D>$(phN|Pg%xor7pz}^);`nb>Yi zKya~q%_ycHuYbZ6Db#0-@gTC{ z!dTdfxRX9V5y+3bVP?*Z$yeoORgd@Wt^oXm(uDE7FEMt+xmr+~4KyC53!&BGj6dF> z$E58bx(R(`pBCR~l6Jr5Ths|1pkb3ViItDQ9q&<9%fs>3v8Ph>`Nmmw!^l2-W7k_b0?_bKTHazGJ>8LY~ zyJsU0cml;tpY3|Xu(Pd1F}>Z&+fbmIxO5n%X?(WBeN}aMacj8?HKsRr>kGL4WIgfl z)Xw&qgYoIL$T2t)U3jOW{bm)GB12u3!8hSrZ~Q>VKYxy*y%0-19v8o}{1&^TA$;ip zry*iaF}P;>&Ng=b>#oJ?*Hjckx97|iC8@CIZ8*Th;{zGHI&x>;R11FK6Wfqw$#J>g z`^6iB%*0K`eMY|JXW#gXzvR~k)3_V@kp}%z8RW84^p{-siWdE@V6nBet>xUaSD)S5 zQfxivyw>wtU)XZi@c6_?=^~*y*oz`l$%`i2&O7V8)h%bOYdNc*-?u>0-CF_-o8gKX zj#JOVnF}@`m9uyR*|KV)GPVjwEvwe`_O3$TuJcx(h1F+b@~m|u6RXZ$g?_z56Mcxt z$YdOgxL%0+1OAIM7D&Xd&XSp1*hRf2UtXCIW4csWXxkllA z^i}aC>V!BP4m-88gltL6{Gx;B2Kp>k;33`jI z$d050PI)3Jj_u5sz9=3!GglLF40otb5&a`zq=MM9h|297ih8zcdl>q;L*T_oeyz}E zK;I7-PJly<(7kThlKo0Vv+}&@;)JO>@3qBUPyJY`K+)+atyrOdoC}Z=BI=CWz+GA8fvNq@3$jQaFH>m&eQ zMnv8s3a^AfCmtHH*oxY@fH`(OTcLBU@ZjUOt{Tdy%O=Adlh|mfkbkJr<))NaNWSdlF6z4B zYjDP=V}WiIw>1!k7$Tc9H8K__?x(!dQu1hlOB%;5SRPkNBpyUNJ^3Y1oI7$HZwtf{ zzyC(E!LPgW$tM%0bsMUd21FVchx99U7T~aD5Xbj3(GpsljE)@%DdL4yClLM}54i6y z&kL$o38xP}RO7)Y7hyRs^#(@#)$b$=8?yGhGdC9)tV8;wkL$Jx#&0?>8E`5s_xqf~ zDMW57(mR9~L>9Y;q6XK^qsR&WjZS0Z=mO$rfG#ZII5Pwc<}_$_ z&WsKln8c_f$UOofs00|s-8aQF(CX|9ZWstF271Ox23tJ=qj4hWu{z)f<=H-E&sW}=SVSrqeiYk_X~-t7$z`?doTLU?I`5vRRK48@alw5MYjTxD(Q*65I2{#uLSV4 zBn&8vnZF|xCYK*3+J5<96t-~HFQt&LsEQ z5?537POiW96^;cRm6V#IRZTduS6%pH*T|{F7dX+G5t^#hwVB`{R(igC2u`1UTii-~ zb23hj#H_6F5g~2p@bKNM4}rW4&tYIqJ|Q)pBQYGB#J_Mjn;N6$9FDwN*ISptAlB#$ zJmB7P?V1ab^COobB=c?W=C*3fohzAO)T5snSj#kf_Zkh(8D^4U;gVkUJq~=uPhTIB z&QbcR1Z(O@C4r-#YWpjs@ZnRZf(@3u!xvC zEKkgXe`0>=#Tk1LV^JmAD z)}w~>nnWZIFJHk|C&qhPBmb2IJMvG>_@hPAJqSvs5sqJeLj*I5U!c^vrJ*V8lx#;7 zj+;^!RV~)oiKtg-(kf9vv}hLY3G|nHCt|1aQ9NX58QFx5=nj8f9wDd1 z87m7sfm?5HdwIka&sLf8a-qv2Ip3AT93|m+@pcHlqx*R4Vy8UGO{@Dd3N5bh(^Bsg z>S2c3#VBA`o@hI9P?m(or;yxHwC8!7%eBGSC6X0(Hhb6+I8)cZ_Ei>Li zamNJ7;F;JvrCv0q^BvFM_)-mb{Z161+W^vYx|H_{Xg&}!Ut_}G`J&qdCvkBic_1ZA zqxwhB(C9!GGJD+=?e)5AE3Rh?zY-8@|+?Uj2%u=+lNx}vNJ zZd!^`gt?e*P*rI6Pm@z?j^o{YS4wfjkQrnFK{u~uyNl-fVhp=$F7|SUVCogVC8%y- z8%Zt!GL600Tb>x7ZfhQef4chJ7jdyCNI#=a@{i;J$(C?rd5di$E#r1RmAJ(rReFH$ z^y-7JD~6!&j>ThTOJ|+ln9Xu!vt|M!n*v;Nu7t=W{X;;gm1X&_Oz3oQ&+mOd*_Ot~ zvqDzClOHBYe6Wan5l*_A+{$HA)r%h~+B(P>8ZmtqALU~qTXd%6Qh)`KU&YBx+=J)H zehndq-zJtTUNV$<5icjC?VddrUL;oa1D283CD&$%Ib2hu_m27VFh5Q z(mNu)Q;;IsvBkH8(_uPFI#f>(1|Ar#oJ?P$O^R2xZe*M?f{BC-Hqy?(Q5^G|E?f4) z0S#6V6mXEqSG0+`gJvWb;<_wPhHNG=xI`y5(nnHHT-^-3`1`FrW9#DGiS2_R0ym(@ zeiG9{x7qw&ADw|?g|t?N;@fD{gKfG-OH%Uo?HKlG_YxCWB-!8D7re_Ifm+dxwrcU`nOrw)12v7IQ6G zg{EJqXEUlIroF;sL#9*Mt?XWqxHj?jl`8$E?=YA9#q+WEbOFYb40ocvhlbf=SC8Yg zGm+FKl0t@L33~3?T+&z5&x7%OgYgaGU{&|}-PBRH6?QqM3yFzGb2#JRNq<3V$RFI z>91Rd`!Vj`mid*16HZ+^1jxIS76PqT@*)WX1^r-uqWP}O} zP&)f?Pqm#9B){f9l=^gj!5mKCZpIT|J4*=GhIjk5*PkFD0Z81v*PIrPg&5!;*G6G6 zY<|NcWsivl8YFj#_ zS0KPV?t$WRS1**QZWi4SN}Q|sG3gmOEF|l5_%b-|1IS(jX}n&)E&4zy{QJwnvV8JJ zPEd-EfWgj8y&z%Oyt@e;C4a)E%T1hu5<6m76^8IfM7b2^QKl~MssQG;}Bod-wT`eF-}hjUZ++HzFj9xUs9!0e~1BCWSWq_hw>RF?RwD`5*9u4vcx zk{rAbE{MGnMR2_4hOzs_X4yHUKT|NZ+ncxJs~6|w;!+X5UFzYp26@}4tSe4s1EsNH zM6M`iNwTKjj;tgXg;WUgLb%1=Uqf(j?@dK&zgCM9^(pO!NQbtj*munA`^8Afaa8T| zNxS(hvquBiW;FCMomp{)8WK--kGHHA+a$n1h4?0s2#$Nv>&6G- zyD>~_!?-Lt9vwq=wLSQSV}tYGwyWugX9=0^;;PpxFH9IWds^8&(6Ds!m7i%|BuL2D zr9+sY-m2F`dQBSo)z%zB^uTwI$KI3Vuz=8t~2hu`0sKu%f!&` zG=eLIGNHN%0#nfvXTu!;mw2R3XF?A#2qu~(*1W&MTb6F?KDE(TXNs z?rc(gB#h%Yvt&j_WrXlog-lr0WOx+jgO>tMJ1#ch_yUZ{_oUnoQXJN{pCY+@gF@ct z=ub#waN*nrbxQD|GjJ_4lA8sZh!Q!*jqal2v)8n?80N9t4|Kdi z!`d6n;Cg$PggH3t;9+{!9!+ZtKc1e-qJ6@E3_+Z+!Ge|;`salfVaxrx3)Yu*yKmED zk;XGx=Yhe#SQ+&UM{*{89ge7lEWj!FD4YBE^W7yI7Z%Va{(|k6jVh;!?u)Kon82)0 z>FFMJvSibSuir_$_ev57Z&kii)J31flV0&)3?=)T$R$CQ>JF+ib{y+W2J~2{G>JD6 z;BQRX!#POhW(02x#>brQtN^d6M=I=$t24_97$2p$!--S^rhV)i5>88^WX3L21NoD0 zF8ClIoa;R?xEC*pQ#I1lQWj{&1$2LW9JC&EU?hFwV$U!fYgP(d2ib}7MP+*z=wuAeA4c*ymAfvSTw!={kp5E=Tt+d7eihmi%J>GY$elRD=Zw-V3eTnl!Bdd? zG}XZbvBZUv)J8WuEf$ihdn^ciM_Xw<{-Q$i6&LnS!T33tJxI)8N?bR2-#T`LkSH+J z^GR{3FGVGeV}4WZW(l)#q`vVRvU#yhkEyC20I3VxPB!uCui!~;cNyFx3U=W^rSRxd zR$H48LF`6r)t?y&M}d-%$jfpxy-VzbWyZ=mu2>9TuCBuOPNz2`^+Y^jH`$s9i$N^6 z3P$;{x~rfu>YbD8S&KTn8yqpk{z8a_J_zT(iJ+FZlbQH1IgTW5Mt4Q;7njY6?4bBH zBKzAW2+H!umk=Dn8@i)7qjcn=6aT7^%u#>c&p)H(LP%Ngw^K&&#z&k`xmOUT7gKQ| z5juRe9DQ)sg%=J$i{kQ}M?|`PVG*lYi6ox%^~P{`kWW zEo{M`xa8lQwZA)i6aO6NrAIW~*>Ks?C0D<5(MJ3kPPSc$4}at@w_5vp5OCF*zxmfQ z7w3NRbXMac_qR2xnil2sPxz)<7J*XM&!Qau3Tf(xayCTtMJCkoZ~f+hzf1q1=Nj$D zzc|bKW*z!)tv_4qSElNzBI38D>R+t&9jW?jwZ2>HTTtfDtMMV7DXlkM_Gf)ez_TP_-k+n5XG#+0{b}2HrX*qM;!*EU zu7<_^A>@$XCkgZZ+^0Z`%N$65!hd{91tL_WrhXeDiG);L`$pM}S`s z@Vwqo72kYY1^B!GKN{da2Y69$D2#8uJpz1DfFBOiLW`5z1LaRI(Dz`qFaOxfa}Z|MMU5a7)Mymx>P2=JHyA06Op0{n1*f9`ok z?@WT{QL*QMUa$E&ApYk756>PJmLcq?`|NYxZZvj!NZdPoik*szGrmfIHx_4}_TtRb zH^841_YRw5r#a%xvr?S%-2{)o>mSAAy8-bh#F_uI0KXC7e*}1Vj)3+TXZ;ldyqUN+ zyVz-fIO`uH&iLoWIp2)|ek8y@7w7s4!?$#~U-s3sR-A|vK;_7aWxcDrdIEbj(-RbebXZL{dN4E=RW`8b>3|3>fFD*$h!yG`SZrkLj7Zj@+!N2 zANvN{Kexr-A9cc?y0cf>wab5gDei0kyVd`pK*T1vEX3Qz{b=v&$^UVMGQ0d?C2zGR z>~*nkb|hqx?as^uEwP0rc!4e4zo7fCRa>ZarXjsYdS9^fFN?{ly*D)Y4pD+%_4n6j zaE7sO{U-SJ3GYs^_YWngX=5W3+_JIJEI#h0GVf0W{!6QcypH$p{Ohai4gLfzhJ_}0 zIo$As^i{upmYuLsB;*wdt}EnKu|@uCBZa)=KlYG>hljpvlb}@+`jP}ULFmg8v=N8C zgx%9_?D+S-8T#skH;KJ-mY}AvP^SrOkp1TY74OXXx0$&gp!?SjVXxzRx(OWh-3k-3 zL4=gl)$gg++};j3Axri5+y35t)TJsYTys3HO33CF z^0K%N`Tv`%y!=1UKJMm?|KIH8<^O5+3ES0%G*;Y`|6Xm}ZA}T<@Z)CG)xPuezrD!s zL~$9c)P%GQZr@E< z9oj;13!L!Hl6TE|;{m<~HerpWRsV0E1h<ED0tzw)0OEupn1 zq^E_ffPbEC>~i{damIdj*}H=C4;wmStqtuY?BApPC6DnwVc=aE?)fhl&yb&&3PN5K zcWF7~vTZ!qX8o@@_P*`H`|1wwE1$i451lK!UU%y0eZ&dhfZN;uMvOtxg9Z&55&QVh zyBXBxwSMduN&n+=GbFC&*blN{wy}S^%(=Gh9m;s05{_}o^a}AVEXQ72x6g~=s(P7H zT|=LTJ}q5Yo>vNeUNQ7(h0v$vyN3DSG|vn8{s)(1yxVC94h#(|T~3}$O{GJBEhR}s zrKKdzEhU!mlDjoN>3zRZ-{Ich4Ikuv5+w9jPYkwSdLQWud5QnI3-2Q`UVrc7eJ6Ny zXtAZG4Jpn_n%H*0)3DE+c>kW*d-rYn9`4-+6dOMj&ws|FUxt4# zFyoWrjW*wNIi3!#^Q|U6-+PTe^>gy%_MS8U7>SP!_Ws-J#QW=%@uwV*aQxGNJbBQr z{)3w*(s4IWWwN zus@uW_>0K@r4#Sw|G{y0xx)QH#G7=v9)tcsI`s$KC$CF2D~5_>}-p;@!{bPyX_{`SS*N z%>eHl;9~-ONr3zJo%)m3b2h+l2Y3eD2%&jO26)o|9}wWr2Kd?lKNR4X0z8p-KWcpK zkSD;a2YAN-9~I#K{ju@QcUyoTbUea)A^Z6?xc2ib{=nl+{(5o8r9yCyOFzX%g@r{r z@$R@$-Enu^nB(1d>Q6e~U2vW62{`A=@$jq@@6PudiBF%%=J$gW?~aG}B|bCaQ+W5U z`jcOen?I}L?s64}>vFYs;tP1W*#5l&;-7Qk-S&S8&UPq;I@de#Zk=yA?$&wU@q$i0 z*CfCHc?^I0-ia^dJ!k#Nz58ta$#0*By?^vPju&>kuH!`qnm zbNo5Si#z^$K>n>xd zw>&t}@|V|bpEhvD^Yd^|JMnJ&EOp#%pRJBpa@y@QobAKL{#xEY&ey-s+@E}}?fs*#aNM2mJ~-Ql?RmtBk8<+l z^X?n>C-xJ5KJpq|>nZHr2kuW=Pc6smc)w?z9UQOg_>*wf$@UrR#Mg7;=SV!4YmpOQ z--+Mhcmu~jaJ-@8-#XsN@#Nn9=l-O1hQs}KXzcyt@)mQviQ^3<&rpnqkBGA!S~+ndUEa(Ao+H3>2Y4a4-)_yle{8qDaMr{1 z`*=W}5dl6Xz$XOwG`QAt6wZ1$zMT%p^GSgF_wDrlWO26J%z!*ENj$gHwc^abQJi(Y>Ev(Y)Ol3mng5hH^PdrC{htNo|0y8; zS8?XQC(inl`X_JRpAXjr@i3ppRBWAfDeJQ zPR2hO;9~>)=>UHg?zc}nr+qfUStplwi#Y4q5s-h6IP)A7XPzSg{vllJyaQ*Q?1y*7 zng4!3{uKU6yEn0&nJ0}n^JEC{9B{3(wB!CI(v7&D+fVXL!1yy*ob!zd@G(yQ_FjJW z^97E(`^PPkhs(R&iEr%WIU@0_^Ft@z-7nm7yor-1gMSgkoBZ~1_X`E!Y=16qaVOp# z=Nn4=b7;4w;>^?9$>WaO10;Sq@(dMco{>%-cif&W@$BdG#hGVufUk1$yW{P4iD&+I z0(`GH=lgy@{x2k+`7epHpIj4X{+j{$llyO;c@x(!^M{L1K>Mc`Xa4MPzyG-H6Dje` zUsjyQGnK@dKPn)98;NKBj^e9Oe>ZXF?;DVRoWwK#B=I%KKTVwZ=LY0|MdF!%gSh{_ zE&jAwocVVKRe@X5{A^>g;dKpVEKR$eXnPjHdBK>o85&+*|? zapwOrz^?}6508jlU2)^a1hjv8apunw;JM)bdUxBWmc(;>s4vd^O#-|nT=PFE@vBh( zSaIfmI>4WWYyQ_Hp5wzC;>^Dz!1n~?za;S-AFhcr|Mvm@b3pzadBb8SZg(6Xa*H#6 z{s1oq*Y;^H@f;soi8Fuu0Ph}<{~3wr_%L0Z`R4@qqJaFHC4OfjYp?C%T&{P-xjpU` zXFZ1k`~=)@&ko){9#3AEc-C`Mob~)HJ|U6S|GPNrxgX#u^4aUOo&s?8AJ$V;ob{9x z--~+6iL;){0bUE9SlXwH#Iv4W;;g5i_(9Y&Se*651o#+uVyS1b#Iv3k#97a3@%K^B ztKzKZwE*7+Pb~F(B=M~06LHq_x%hF^^R+nZxf3} z&j8nYA|?JN@|P25J(b0OLwpT!)>9|Io4~c6z7o%R28*+v81Z|kXQVjmc`Cr4fonZ4 zNj&R$Rh;#_CLVj@;H{@O#97ad0N(@GdOnl*lzxCWeJ##q+Y0wB$|f zSF9(McxKd-R-E-@3h;;ET2Cd3&yM^x#Ce=tM?3=Y4aHec(*SP`*LsFYJnI=L&hxmZ z#97Zoan>_6z~{iVo{bXEdfpIc`|J=efcDuX&U*F*_z}3)^Nqx_o*Uw9pIhRr=NEC- z^GARu@o%29QiisCS`;-!AJ>>(uI$Z1NAn~lHn>gDiTAcOt7iT>~ z0{lt1*0Vt3SEC>be&xRZQWMVit@wTFcUq&DAALm=$@xG3?alD`7 zLmcn#__OfTo+b1Cae1F};s-eKYb2iiZKD%E(23t8@jPER?8Fap;y;ymuCK41_`y#6 zAC3=kJaaMci8uM}Hq`sab}JF!^&NlQiSG?h?U~;`tY?5Y+bzb)Gt9{|MdF!fwi6%Y z#J?!w0xQ;d4Pupc=`a(4)@zx7$IqTegzceynpZ+AXIz z>n{k`b}Jg-B?G)7T-&V&ob~W{U_d~gp#lCxfR7IFiEwSV=NbT$jXVCt+N{22l+drQ;>n{e^cJRLGICfGmAK=yD+Wvjv><`>t9uLSfBEZK4 z_=EtT2G@35?zrD>pP}78g0oJx+c|O8e-W;A`R9Zr?dR*{hS=Z_={Xo__o@ zj^}cGisRKCpXzv5IP0(LC-kOX;!WTKojlXLIMy>;;+bc@IP)xX@;vM0IqJAO4txdY zdhu)Yr?lnl(J#-xRg?APfpfX~p#F!Qc>k6|#@BOvy5p@J_it5W{Cvs35&P3+;vAP& z1^BB@e)oOzbmhI7c@yhr{%qpRpEJM@rxXv?f8Dj=Qw^o!2fc5 zt`ncOqW8p`{4(79WgT~yt1F!Kb9?FI#Jk(qGmg9Y4>|svH*dDv8OP^2{v}-3?;Y{U zXwSTrycc_u|I}T-W#FuT8se)s@$UB3$Z>bQw{v{HHxJf7((#3kKLzJ}`FH=OI`Pjt z@yWfP{mGBd9Q%{~mj*xkp3VC=9ou0>@mm;ovcmn%9E%z&xI7%2pE3R~a5@$1e*WDU z$1BIa%IfjGmVfcao9f#`T>N>zk-X_Kdx-N-sv7v$*8GX}pDbX{``bgDzlOjO;*aGp zm?*x(A0)iV?_>VN{Po~VjpO{WCI)N8BXJ)3rg#@z_dF<`9`zp){~qmjRy@03m^Xc8 z4{`PMN@4K5c)jihcf~n=CByj5<-L#d`3&MmD_DYD;%^K#FCzX{ZSyC@v*I}E8+0bl zH#Oq^(9h)ZZ{DAA_%`E1(B+oC{5B(*67~2KEe~Ebppq}jh!LB#a zXTl4LpTPKEM*MIUdwosuj~bdkBHjS~p}jbl|AP1%6)n$2@f#QqA3=Mw{;Mr5zMVM7 z=VMIH0>GUZS_f-w|Kl!kmAqne|V=xRmAr z`#rr6+9A96{7e>COnh3Dc}4NBaj@B6oS$Zd};#Irbd@G6n{;)Z}?}+nFihk8X;%}k;&f;u`e&TG0C&c;r?We`xM?23F zZ;0hxDqh$>IrFAh#97Z9;;iRgan^HGoa^PB_;<~0zBk3IqyOI%=eV5`$AfI=8pxAb zoX43F;{3kC;^LR_xu8no4>z?s>xv&3VE(9h;!ft1#iMbYxkCJ%>K4CFoXfjSocpPL z;=@q?32~0w=f#KCv-w^T{{`dVE%C4(7XPO>cJE=Sa9qIk(mB%NvxqNAWu8~Ocro)5 z;;m6H^zRpwRjdBA9fdK`!5zBi|u!f_>flC&YQ(~U&Su*k6T*&`{Hc3 zkHwpGwfG;!8)N^%@8e?ovp=N3{+7=1A(J@QOCIqT+uMALiF0`?igS7Eh@UTQd76t4 zMt=YAMEeu#JXgY=_Yq%%g>&1V^`N?*1w%b+lHFd52 zJK|jinuno3a(NTscsPytSu9s}@faL$6cFcrr<8cID4TCJ@v_)YH5BLfi{-@rmUX_3 z^UuQKT&{BBtS3tR{dQK*BjQ}HcH*q3mpI#PsCXpC?FVo^&H9fwu=(Z?XZ;1mS$}Eq z92|edS$`vO*56v3^>-I%{aGYo+HG095qoq2aeBYi}Uj#OT`-$vie>TUxW4XhImC>uXtBHvbE(oD*jp@ z^N+m<2gKXq{M7y4Ha{e$e(cM`3QGK~yypJj zRre?6@9>~KpCVos*K_8HCv9T!FNnX5`1Rt$@jk+K@o#!sp8et@u-`f<-UjROQ}Jhd zSe|dh5955Z8u~AncQpD>EAc;@Tb^#>WpO+_P`qYQiytYTp_2Jz@t<(rY?1h)D2rb$ z-aNwG|GVe@#QOQU#COD>N@H<{#gF6pMe$TME#CjT=l;a}KQy-IzllGd(mW}yTQHu- zb?L<$_qX_5;@z>HiimT+Twc6nMaxr5obzoeej3|Fd-3cKTONM@8|$By!hE&Fmya^v zBwj6%Ils@1c@AK^xFPY+)w1}z;v8?2Vf$kqj?WpydEJuV3&;4y(U!l6#A7!RR$e@P z1&gmGJ`&?kQ*ka=d-0h#Zz_rNe%4b8<4;v__NxZs99LV4pTlucS8=Z20pi2U*mAuf zo)zQFdU4jXU3@au*8%ZbSgupz9N#X8b3D8%z69eHzXy!%ma&x8AN!@@-j8(VcfZ%m z--MW--`~af>DaFo^xypUCi-ynlhWd>r@A;lzv_Okmp|WYenM{=E%9v6DdKPAJbj)x zx4Rd_r*(@>AC?CD4c33MnR!9+KG^O`i*q}zF3$cuSiBL&fzjfp(eI~-bNihq&h7UF zan5(W_~Xd$eqWZ~&adM*d%whUyQ_xl2W+1x?B5%T|K7&ht(7>pJNJ8^{Q16%{xeYG zKd>}mBgMHrP8R3(_?&puW0q)zINNQVINN!fc(cKlXP-EayH1F6|8idZE{-d%h_lXH z;v>u1eE$^xt&w>u94~OaJmxp5H)Rp$absTbK{!7tAwILS<*6+GG|n3z7hh7v;-3=F zRMq@h@!HkR7mB}%>s>F3Z!BW*uZgoiza{<<&WjI;|Jc#;6pOG&wp(Y6n-#^`pX-Qs zZDFr(EXZyS?&i2_N&i2_Y&h7e$_!zXqS@GfJ!(ykR*uL35 zE&Lz6se(A$r?z;%;uhabd;`Yk3F5zFzd2K!`=iC;+#jtGABgtfBK|CvcegnAQ%A)2 z;(Ye3IQLV@as7ks^K)BU-i+dGpWNbq;JB!$cu5>rR1hy%+w#{IKY{JNnRvOf7T-af z-=p1IocqCH;w3O%rO$8qxV#Ys?792BE`BLo-og^kal4#2x0fh!_LE1%xgURA{8%EZ z=P7ZHpU;YOKkI(KieLX1y)Dm+5?>el#Rsw6Y=@%QpB55lo-*QRidug6`$PQsPRDrF zSmImMu=qCOWonsk5TAqXZl`!jT(>+Z{&QN(^MQC>^iTKuH~czpVSjo};t%$-Ja@#| z{$Uu`*>3A_{Fz346pr(=i}Svp0^&z|*nCTgpT~G!O?-PFi*G1?5$)DW{Ll0j?|wgq z-wv--Gao4N*Kj>~q<9~UKa<4=G_ySJ_hZENhpgr+Bt9#y8>| z+y5fg`)zR^58M~$_8X4#TIS(-aW-+D{}vFxQpf6XKkx4^FUO5)63^qPhT=SqY9-F= zf$r!1{rtSXH&Ehdbg_CyioY0TK3SZ{Q7gnV<9NyaJib3)UQgR5@w}e4Py8*MUz`xH zhV9DzJiecw_oqb`wtBf-zAuO$ZezY)oa?($vC!o`hViboINPVY zIL~JXiSvARl=ufWyRc`(Ij%k@{#|W*!2$8f80Sxkv)wL;@5cCcRs0zIwm93FpMOv7 zmEn&wTTy>F`VoCN_IKIDd47>!oaYxS#4mIF6leQy6X*HGK5-s5-WG3J*%pBJxwC$@ zTR4u7=xm2<;s+aA9)6yk@n;5_^Eivn^UbP~hwb2gZryL^FR@`Vmeiz%@J#l`I!(%uu=6Y#R z#_H=L9{2vHczcY)BgEOCCyJlI{$RFvVQkk+#VcAlVXue}scyfxA)d0O`ETOIaDI^# z^WpNgd%)r!5`U(y`B3q8I1V2xei!SVpCe}eU-3TETM|Dxx#d43&UXG#JQDly&&9c) z_*R_viTy0TJcG?Q5!N&7T=1y*8u5h@=Da_Y@jOo3CGk8?dtaRQS)COh-^}uVB|Ze_ z5&V1-=gaoFEAg{%9U&R6LolAlMH$37&hYcRjGyKI;7vs&p2s=!#Pg-F_!q<{;kwp( z@%%V{+#&vcM$2e0R9zxhl^4^lpo@J@1Pb#JCY&&hoK+t~apf*~E|J zGS4qwI;nX{@jk80tBQY(_G}>j0S1DW;<>P$b`_tQ#_|snUyk#d@#1XH8RBgJMdIww ztHuAob&^fuysz&aarX1W;#@DM#d*K(m*PL9x8?m#oaec}ivNi5F$wx9*YEQwEsy*8 zXn#L`6UVm?NqjV}gFP(HeqK&|8jdq-iAN2v`8E?DhWYjo|Fy5h4;JTkH(Gq>BNjhJ z{Ncpr^TcQ4{Ai_kNz0J@6A6Y&hhPncuySXTorGE z^>|x+3EK0%ctvb4;TT7`-Z@TY6JLhw8%4#NV*gb^oc*D;`0V!94$Z_jXEX00z69eE zKc~++Gqkh#7>Vb6$BPf>W$`n_OXM?OBwn$x`5N&jas6PasHC5lD&@k6XE!Z_ifQXMOsCzSUV@d!pMEdbD$I@s^D(ewaAhXPh|OXS(=bXy@m}dENdcabCB7 zU3__BtLJTT9{0W{zOA&yeai?dt&PvX@wn%@`aa)o0(bG=8mxA<)0cX1sx zzj(%O7GF}F-;Z2Xd|eugZy??u`^}c(8PK1*ieJI|vIE4c;`-Z@;>U4bGfDg+-lv!= zz6||sh4}D6R(}rcSJ`fJFkTfBe+TVfMx6b&hWMEdmcOz1EgYw{5&se6d=K#kI35@* z9))pywD?gh=M?cfcs@`3CdQKEM5`qztpiT2+v{wLaPzj&6WmgkiC7dY?uOnhTU zi@z?uKCSt$;#1HLNuuocT#vob-*SkbK%E7}-^6xTTD(<%%UfOiVdQBfJ__yGTKp2m z$&ba)VtMD(3X7ds{~uVcW#avlS=?Ijt>{-<#rNa*dyhEBv18)w&*#Lu;C%m*_-Z`g zSUa@-c8ToyA@RMv%|8_9db}#WyOYJ=7Uz1rFJ7#H#fPIk*q$4(f6OM{@-d6gub$kz zgLr<7C%wg!7qIwY;!R7Kj}z~f)O?2cp$z8h#jiIp-!9JMmi^*avAie6S zZ?;>7o)-VJc+yAAGoxO{cfj+!;=JxuLY&tLD~t0wVLfqPCut$h>lmHIc^#>rIIr_O zAwH?FE!WfHU-mVhCEggvpG(9`q2InNUVEVB;d*AfeU!xfU5TGi)clzEJ*>x1#P{I1 z;)-}uJpW1jMXbmB;`0jGeA8fiVx7ydzsMn8F1f`Q5-)^trmXmT-7P*!yiPjvX5v>6 z-$9($qk4-k!|~5B@nRTf#)|{&`zG0^`7Y z;%BgbsgCu-_8-;P^0yIx{9*GR;)`)zZm>Atrx-211l##k@l+UZSBdwHviWWlPlx>} z-)~|47y4WLL5Xiu$-H_~du066m~R{Lnm9l2DW0vEy?%%|KleUH{LhpYKUI7;_6zgH zONU$hO7R`oem97>Dq!(D#2c11KOp{V7V}f$E3kcD5Wj?WxGElz-}2lR?~U;x1+E9P zoxA0*_)OyLhk3+vMq7L_@rzhr6~#H8O%Q*g zn${q+QceJ(nzAxSZ%;$Z*H&S`Z`|Eo@W#1 z`pPe!2G?gwigSH+6Ca+}@(&bWHPC#d_#pTU@gm(Uevvpouf1CQwZRs@S-d8;>-WW< zLi{!HZiWkN4 zXDjiY*iUp5=lS(Oah^wy6z6&OGvYkIp3}nWV*8{XV9%F{pU3mH;=DevRh;A4Uh&d{ zEdOzFuHR3@c|Lwwoaf^=#q;;H{P)EB`wQqzDRG|44e ze+=V%S8=xIc=0!J+%-d-=kJTuvHw~v&VIW|oag)Rh_l}wRxe@gc3S*B)cK`2`}ud` z?B~CVv!5ry{)+2mM`4?9dU5vWT;esbUn?rkeppdFTL#PD6xRzm-#j>fY%e~rmc>Vl z^Elygaqf4X66bNkv*Hip{Cc7ISJ`a7FN)7-V*Z+VEgY}DCC+xJhwEot-kI1=T8I}- zX8AjduXw<`pZHqr-=7dqRm9?-7Jsd=`7H5vea(4a1M58Yp!v%Ze-`bqMV!mq2*)YR zGaln}5Aih^_XdmeICHf4*mPFU6mcH!%@gPTl z#$oNndEC`od^wJvhl!uTb(3-8iLhNv7w7rr^Wr?;d`X<=m9LAl{ofX6e|t}y_w$?= zZ;ST%Mx6cOC-GNsUiO#x^=NC*)a~%-J!JF#u|H%LXMe~i&il|J#d*J074dVCHoyAf zvvBic#;&Nqyab92T zBhK^v81d>jej6{I8^=jA#5bb7|Z{=Jnr=etfk4EwL`;yf?jFTSy|wa-cM>KOk&73Y5E8*#43 zpTxO8`b#{D&vCrWcAJ6oyR71Ma6X$~d|eK!zoU4soaTMRIiAFbb37R@&hg}ocn9=@ zi{cy~ZirXyWA*$d&ha5>XZtTU&6W7}xL&+MybjuJ zoj8w|wu$q);y!U6Kb#P6)z9iYFP;+nqbuSWA}s!v_#NyA{}kWf&EomUcDVSU`33ww z&ZEq)it~Nd+v0qm>Av_|I4>HBe!={`a$Ek%;(Y&Nt~lSnTQ1J;6Mt3wV~neBit~NF zz2d8jTRq3c->6{zi8w#6aap_wmg}Z?YSikga6`M%69@ypoW-xufmQ)k3^9&u5e=OZ`7c|P)+IM;j9o@fv6!9UKgj{SRj z@hs?94aHy1YOn7u{z-cC!Q#v_TAb(IQ^a}vHcy<#Z!d`R_-DO1um5ise;eng`^8(~ z`oKwXp6`Du&f^4rFD(02coJ)epCq2=^?!+v;W&cvk9qh$OIGn5MJ#_lalU_4Ui?L@ z$6DfCFHOZq^tb%&#ksuE;ymwuT)c86%QH@#_eD(?=l1x#`1ds|&r9O$x37zHfAO|B zkMrLXpOn|~emK{ zz5~~(DvR^)bJr7RJG2mIJ9HLjJMZ` ze-%H1_vw=0_gr7^KWz1+6CYd5yq9>I#^yuC*+0jMbNiYmJ{;?JfjHOKD)Hf&ZN3}D z^J4qmDc&FZ?}OrOhwXhWAKPI-QhUB%oX6EC#o5n46(0~`d9I3&@dqt$x-HK8Ozw;G zd@UU7nRRlz%O=kA$Nb_MF+R5z&xZZWaPi%Ztj?#!Scjk5fC#RuR#d4zboj21spoXa&^oXfRT zoXfRVd~E^Czg3*~W$h8?amX=o?nlmv^ZNNE@zfYUe-z)7!s_`$d^yfXQs8)j?fgw5 zi(f1LNE$4cIQL(B#JRsaCVsJ|G2d6j_vEuYZ;12yMloF1Vg0+3S$sutUKgq(&iOVM=X^VgbH07V zU#MvFjS){*$oz)*f+ps_iSxQj(joSHF4wU~?Rk3fl10pOihq>Fys&r*>?g*H=f!#D z3~`Qoi^NCZ_<6PXcx*45#My3zhlVcKt0nDuIdN{MQR1&-+#4qTT|LV)Ui@9`zh;Q% z#CgIZ@hI$PSBrCd+$3Hb{q`O4Id!d`!{W^mzwz$F~o}xgY;b zoaY_a#9!`i^SvX!rI~ryu+TdBIleUF{Cr||aeh9rfOtwA$CeW3dChC$HzTZ$x5O8h zHb10}>slX*&#!OspNl7IVE(N*`)!XH`#rbEZdkuV#24ZCWQ_Pq_*C(vIM13d{!xU@ zZ>9KkTp!yY&imzdi1Yrd1LDguuAUMvgX>Wj#EW6vxGFxUl+}4#JS~o+?u+w#xWb2r zw&x|pXA{TaMpyyyEvfAFrNvXCKi3fd!(VaUwDSpjK zXz};No8>f5IU;nvKjgRPnZMqI_x1LP z^Lo??abAx)FV6Q9uZZ({)GhHlSYLmMH$eNO9u-&z<7I`fIM&PZ|ASw)<6))!}; zEyagavHH4-b3Z;nJbQ7Ae^Q*wHA$S;8Rm%dI>Rz?UT0V<&g%?Y#YbngdiID9t6+Xi zJOkcuJtxlVMVG`=r?oskit{>B+R^rVZjTGlZyyw2lgQ$lh*!b5-Bx^`g@^SN=kfCp zaqi#8h~LF^fT`jf&6kM&ewq z*5W)K=q}FdV1vX9VB8xe&i(az@g;DGr{e3QEdMv+S1{k7 z#5q3yCH`e{%aeL69=!+u5O5UE)3b`d@{q;l6K~$ee1-U@IL}%q&UV-)&hwOg;yoH$ z{uAQGvApNSS^pJr)_+T!^{;-)=EMG(7Ux}?#Cc!PJL2qzhsD_sPm3q>XXH&^igSA@ zH_m>~dOpJYHBsWM=Miz%(@vcA^b+U&MMK58y^IxaQN`+;CY~0@0}I5ty&MvMIlbli zP@MhbbMdy(7XPhyF^nfai}U+95{(aS&(i3h4~Xx1z~XX(bZ6d0qOBIIqWsO|bd1pL~_ko~IG7*u}iN_@9-{2Z^)(QQ|xvdqzAendNy- z{Lv`$72*ZaZtKJ=V*PFtzgyMvq<$KY-h)40&BT5un>feS{Ngvu+v`h;hoOC{ihrEf z;v0x_Tx}_SGn2)473cUiK%C>)lj7@|Tb@bc?EiDbd0f3roc(#NIQ!vNarUb{;#}{? z#kn3AOtgC0536;v=c~kd{ePo)j%pUaQ#@@y^Mm4B5uam{{hssP+Si^J6zBcPrN!^z ze73sys)sF4Bk{qB%v+0huVda<{H+M{;o`hcV}dxZ=g$=9{mhHib6Wm2;{3aexhC81 z**;f$+4Cae{GQnI;=He^mN@T=eouT%FU$XtIKOY|3vtf(x_AzZ!@r2Hu5I}fKNGrK z{GPP5;{1H_gW|gz+v^L7zl8o%MtlVJFHOY1!*$HI;#}UI;#}S#;>-G5J!8a|K4Lyw zd|)T@rQ-Zv(^tg#J*aPp^ZSS26)zrT`Hza%@jH??<(XoS>{oBKx97#gIp2!nE3p06 z5$E3*XfA#q$DbX=bD^F-;tyau9VfmQ*Ue6gS8ZYSUleD1-Vo<<{U*-#Ogc5ReJbO+ zcY1O5+nnMl!tM2i#p~g?rJVR=v}cs~_y;Y|BjWtK1MS4OG_d$y;{1M?q2hlOwfM2( zIdENfn)v(uEq;M`(mdv?#G}v-8^zC}zwH#ii}U(J;+Jr|+H0E4hyAurMSFf+d_p1f zPsA^woiB^CpWGDRg88O=Hgvu>liTym;(bw1g!ro^EWWsSp6uq8#QFU^b;WBZw)hs} z&n7YNEY5MPpE#HI32|;0Pm7Q1XZdG|FHLH`L_8eZ`^(~c&<m|`F!zaZOz{he-Yco zyW*ds{~Q(P_d$Iu&hx~t#rZv)KZr+LIbpwxpRZ%TNIt_JQ+p5DynpSR+4GFz9dVs4 zw|FBarTIRXMKYql#sCfSr<`u+i^)|09{t;GWjCe2fxAEeve};G+ zjN6OETcDq>7Uy=fNqo)#t81D7VYzOI$8Epjucov-$!6Ij z*B9rTK|Eapi_0ax65~k`agGla#J|p9d1{MuzRkot^|$yA;>F>;#X0`Oh_CNudB%%# z{GTCS4BO)(agOsh#2>_QNRin#AGYUA99Q=ie--O%wfN-5_WDiY{9fO8#B(*Y_`~A4 zvzVV2pN{R~qIe|6w;SSLceFgeiT7=1o^*~qa(Vf8F3O9yK!2+x&cBn@RQ$a`mbbn5 zQM6mMc)4yC|G4;hT=#fNynQi?e^z`ijvp3^Z>wkVW#-x=m$w1-Yc<7d@O(;qbSZm% zTXEB{u%6=K>FhT{#D6VmK1RF&_WM)CKY7&R=Zn8R*nFipKj*bUJVz&s-yyyP?Rh}_ zD~x-m#Q8nU7sQ*Cviw)YCnL`t@tr*^KGAdb$n`S0sXb3CeiZx1hs62)$%VzUVf-&I zUL1L9i@%@N=G$DH-`Cwq{5aaJpE$So5#pO_SpKaGLYMaotj9g#6U$iKG4Y4dZ_kOp zgzJZw#2+kcd43fC4aWn2i1T=?@xstLf6Zpk+laHy9^xP2IAO5(^O-HrXz@O%bH4an zI3L+49**{ZOPqNQiSxYRL-BGL-#!-~kMoyr#h0T0{473fpe` zbBObEPX)y*mA5>l#m}HUtBdDtWATl|)8qWKwRkIxx821X;W&1X`1PWef0X!p=+DoH ze;RJ_&x!N;=L_OD9- zc&1F2zoYm!=%0PW`8^vk;=f?K9xvXmyXBuDo+^X+BJnoZj@FCcZej7;#n}$~#n}!g z#n}#@if`<1`M(jL+130f@oLyF|0T}rLa7(q>$o0y9VV+duiNAkUxRTYQv6RG?{yK+ zf$_h;_)3i1Bg7|HxB4cDr^SA4j(7k7pNWzbYWkepO1mKiZ+1c!Ni6 zz756C;W)6B_}3UWx`|)SWqAgQCn;?{Qv7ASk2zVK?KxMR?Y3O}AzXi3Cq50wY1_m( zp6?UyUBK!*AjCk5Xy-EGosg%7 zIO7|Ovwhl#vweDqb9@*q&T(M0ILCo0;v5I&iE|uyL7d~jdU3Y@c5#ja`^7m9oD!e) zkhS{-agGC5#V2DNxGkOm```QG-#%pd!a>>*Cywei7$(lz2tx`sH?%R-EI^gW?=#3W>9y*A&m#$L7~Woa0Pean{*Wd}4&< z86wW_c^D)9JdTH_ihtVN^2`@co6mfu_zs+>Y!F}F+v0bKb9=cU9){zztKv&4S)SYC zzvKAuzBv0y_zU(rj>8-Ws)>J>#Nrx?_rU(Kl{nkKn|P*FmS>Q76^!$v#CiVsjQCe* z|L4T#rnmen#1A5Vo%nA9EPk6f>)$6{7|VM`yd&D@qBz^+fi-tUFiSK#OpS;`Z|ao!gktQyksYfA10pW0rPR<*u95M z7vE9S;-439hvV~?#7~y8_}9e~VZLvRUu zrxWLT%qiXh?O#}&dCG}1Pc88iwZmekrsB-gUYvP)i{I%M7CQ|SXP$B5%rjk_`^V?S zxj%hLoZH%E%z7@lv6 zb9-zh&iQr|=l*w)c#Do!$0%{;e@2}7pA%>P7sQ9Ou>9-AnSZ-D^Y0hu`+Xd40R2_|+a3zfOEG#`$gH ztbd>QHCzWiA>IVX1Lwty;{0*M>d@snk}O1K*0zK>a_9C&Knp=;hGmI)LjE zWyEtAwYZ+*wQyZ)h=Ig{4)G^;Co~nlVKJjcd z%}ZeWY0erzm0L`Tk)D%EdCeqCVk8kuM5pT5y$`O z#LuR(xQE0)&tYCzd`UL*a^k@uZrX0qvG7}oD;u|>wA~Pc|Yw<@hT~7zW2oW z_sUbPx8Jj0%|ZSw;>R&ws&B+hYczWAbkmVdQ4$FZ&A9Ipt zvs!$Af2(J!c$akM2gG~9Pm4d0%Hl7Hk3jrw@k)qK@|wMl?R*^La3=Az11&DU_?65buKV{~dAeXOD@0QNZ$F5dY;N^Y6s_qQCtio(<=B;hXGraqWrrc}RSA zbBik`UM`n;RqSI)Qg&D-)xU;&q>%{7l8Y_IscTP8^-w(5?`RCy}q)jlJfC<{euw>-VYzruF+q z_X)QWe-81}#LvTbi8sw@dA|~048JG-Hay$T(0a1qIH!zwDR@)y_V7XCW8w3}*T8p( zABTS?eg~fDtP?bonfQ;a&Ea$b0aQa~i?hicf-15#J5pCjKk@vUutIHor`}L+3jHUR(TS_~YVV z!dHpsC}4R{iMNFRB|ZyY;@!}C4#PW%Cn{)hGsLUH-xhxY{;l{Xc=kP^^ZgdyKs-Or zgGPvVhQBPn2!2NVLwJ(Cq4N#Lbxf^2cM(rg-13eR&kbK7z5@QH_^1+==ZN?`_+|04@Jt6nm#bQ&J+Cc39saoZ zE%++&nk6mIDe+g}e~6bWW%20`hSt**UQB#0yo30!@Mpz&-D#)z#?m&wtKz@IvmOeq zr+XQDUR!);S@X8ypThf!4=QKzPX+i&@oy3TW`KVz-mkpnzbc-*g84o1sqhEhv)?E3 z9uoWiD%$fr;u+zk#GioI5&s0<5uVyho6Y-IWT55mCVs!V`9<+o*p9AC{!W!FKG9)& zWd1i>+w*kde|9u~SiCsSkCNN3!~8s;SV<3O``~HV%m9yo$F?Pdy~ikV)*lubGiuQA z?mfK6;lu2)FMk>qJ+OP^@aU1l!y3um1G!S&Q=Z{`&VX&1wCQd!{)(3cG^&r5*Q@h&^jEweeAE7039t9pk2`VsX)k&|#Mgf9;#q(G*vr?mT{C#5 z+n%3$8eYHIf8tD9e|)w3;d4>{Vt=OIl-c{|k2N}fzfZ+C|H3nDPIq#60nViJ|37D$ BQ{Mmp literal 0 HcmV?d00001 diff --git a/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/progress.marks b/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/progress.marks new file mode 100644 index 00000000..0cfbf088 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/progress.marks @@ -0,0 +1 @@ +2 diff --git a/FiniteElasticity/RightBiceps/build_debug/Fortran/CTestTestfile.cmake b/FiniteElasticity/RightBiceps/build_debug/Fortran/CTestTestfile.cmake new file mode 100644 index 00000000..c3a41e82 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/Fortran/CTestTestfile.cmake @@ -0,0 +1,8 @@ +# CMake generated Testfile for +# Source directory: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/Fortran +# Build directory: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/Fortran +# +# This file includes the relevant testing commands required for +# testing this directory and lists subdirectories to be tested as well. +add_test(test_RightBiceps "/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/Fortran/RightBiceps") +set_tests_properties(test_RightBiceps PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=/store/software/opencmiss/iron_maierbn/install/x86_64_linux/gnu-5.4-F5.4/openmpi_release/debug/bin::/home/maierbn/perl5/perlbrew/build/perl-5.10.0:/store/software/opendihu/dependencies/petsc/install/lib:/store/software/simbody/install:/store/software/opensim/opensim-core/install") diff --git a/FiniteElasticity/RightBiceps/build_debug/Fortran/Makefile b/FiniteElasticity/RightBiceps/build_debug/Fortran/Makefile new file mode 100644 index 00000000..d5bd6c07 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/Fortran/Makefile @@ -0,0 +1,192 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# Default target executed when no arguments are given to make. +default_target: all + +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target test +test: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..." + /usr/bin/ctest --force-new-ctest-process $(ARGS) +.PHONY : test + +# Special rule for the target test +test/fast: test + +.PHONY : test/fast + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." + /usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache + +.PHONY : edit_cache/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache + +.PHONY : rebuild_cache/fast + +# The main all target +all: cmake_check_build_system + cd /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug && $(CMAKE_COMMAND) -E cmake_progress_start /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/Fortran/CMakeFiles/progress.marks + cd /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug && $(MAKE) -f CMakeFiles/Makefile2 Fortran/all + $(CMAKE_COMMAND) -E cmake_progress_start /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug && $(MAKE) -f CMakeFiles/Makefile2 Fortran/clean +.PHONY : clean + +# The main clean target +clean/fast: clean + +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug && $(MAKE) -f CMakeFiles/Makefile2 Fortran/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug && $(MAKE) -f CMakeFiles/Makefile2 Fortran/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Convenience name for target. +Fortran/CMakeFiles/RightBiceps.dir/rule: + cd /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug && $(MAKE) -f CMakeFiles/Makefile2 Fortran/CMakeFiles/RightBiceps.dir/rule +.PHONY : Fortran/CMakeFiles/RightBiceps.dir/rule + +# Convenience name for target. +RightBiceps: Fortran/CMakeFiles/RightBiceps.dir/rule + +.PHONY : RightBiceps + +# fast build rule for target. +RightBiceps/fast: + cd /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug && $(MAKE) -f Fortran/CMakeFiles/RightBiceps.dir/build.make Fortran/CMakeFiles/RightBiceps.dir/build +.PHONY : RightBiceps/fast + +src/FortranExample.o: src/FortranExample.f90.o + +.PHONY : src/FortranExample.o + +# target to build an object file +src/FortranExample.f90.o: + cd /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug && $(MAKE) -f Fortran/CMakeFiles/RightBiceps.dir/build.make Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.o +.PHONY : src/FortranExample.f90.o + +src/FortranExample.i: src/FortranExample.f90.i + +.PHONY : src/FortranExample.i + +# target to preprocess a source file +src/FortranExample.f90.i: + cd /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug && $(MAKE) -f Fortran/CMakeFiles/RightBiceps.dir/build.make Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.i +.PHONY : src/FortranExample.f90.i + +src/FortranExample.s: src/FortranExample.f90.s + +.PHONY : src/FortranExample.s + +# target to generate assembly for a file +src/FortranExample.f90.s: + cd /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug && $(MAKE) -f Fortran/CMakeFiles/RightBiceps.dir/build.make Fortran/CMakeFiles/RightBiceps.dir/src/FortranExample.f90.s +.PHONY : src/FortranExample.f90.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... test" + @echo "... edit_cache" + @echo "... rebuild_cache" + @echo "... RightBiceps" + @echo "... src/FortranExample.o" + @echo "... src/FortranExample.i" + @echo "... src/FortranExample.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/FiniteElasticity/RightBiceps/build_debug/Fortran/RightBiceps b/FiniteElasticity/RightBiceps/build_debug/Fortran/RightBiceps new file mode 100755 index 0000000000000000000000000000000000000000..bc5cb2869985344ec75603674dfd749e41a35089 GIT binary patch literal 131616 zcmeFaeSB2K^*_EFlGz&!uqx`RsH=ho6$p`F#0Qo~7X@7rH9jUG1cC;LNx)!zNQEd7 zqg0F1R@;2^Q;XJGY^z4vVo(dzszt39wN`4CCRHo-k^02<{XTc@y>svGCXw&&_xtD9 z<+a>%&YU@O=FFKhXXf6$xo*nzsX5_r$ob@iP7M*On3xcf{eLJF|BuI$2$hENLy6GP z(BUBkt~`7lzJ!LH>n>f*xmw`mryst#_?G4n<2AvHdmSQJDCAt7)_G-n-Y20!`}+3v zHtJlVxe!>7x^8b16xRv?oNFNq@hNi@)b*$yi+1UHyL3J08q)eZSEoAr#_ud$J}V~y zjCg{V&}8}FyONim)H{uH2(S9KptvRkaIPoYYa^xx(k}4=Sx%<&(!T@vrAm- z?_6m|en!>KpFMWWsMawI8{79C(Q*ErCw%^!oA*W;O+a4SG`zRfFO(AglCd}>H(SQKiEGr{iMAz(;v&yua)~{=6@j@e-=G| zvTtTN??*DzAI_p@SwUw0i?itYU>5uQ8WSs%J-^PP{~s_RGw~mg#Sib#VxPZf>DSII zat=qZ&(!XIgEG^L;aHjYV_EDrEQ=k=v)Ey1miaO~i$A}bMW2ZXewp;#kwu?81k_CY z43wGZS7ottah7qZLXgcQ=gBPo`9>E0>$BMB;4J>x9nReDce2P|m&I-uW$D-VvgmVG z7JqBaB8Q7vCi@f&%uK&3i+^62MW26Uu}^6hznYpQzWpwXpZ`5e95^`3_#T7KX6kQU zmN<5EmbiUYmUZXYEc|oP-%RcPCJX<>EcTqAW!@c`WgH*OGQZx>;%|v8>++H;{|3;Q^IXO$ehGvNyzsh2t{4D-+W)?p$$ufU8WwF~6S^9NJmT`YP zOS^x`G9OoG$wSW15^t-s$eEsHKJK4oyxz-V|Hrb#pQbGSR+D91Ibl6@Y}sZ2ZgqNw*n()?}d166*~_K&AB>3)cwpBKiMl(F)rcK2)wH0 ztXo|nbX1qmlbEL>U(=z6eBQu(jG|pjx2wsaXSAH{nx4`HDcGNK>NMSv->v18-cjL* zkZTg-PX6XVy9>0O&VZi(LHs0tyQV{J`Rt4MAaZoO=)Qbjk#-ME)4yBGiEDivIj?GZ zT|j;uc@*XE4CwQF&EKipb>uv*>4|`x`I?>z@E?!)PWeSzAIEM(HGN%xzY+c;`~iIq z)#F&9>5d)t({d`b97q0C#0|o-n_D(ZV@6LI{;ln>C|+PIZ0ty!j1{)%CMxOsZY9uzFVI?Aq#3dHK8rix!qQ zG*;F(mY0XhPhV0#Q}a!#t!!whZm_Fosl2GJdSTUq`3()_Y^{98S(D4F7R;?KpF6+0 zb`IJ^@to>~jg3p|svD{s7tOv54Q8t|f8qSb`IWWv8>)Net6H?Mv3^l)?V?3>Bls0-$r22}*uCQ_!sj9E8Y^)YTiGEbK2O+iv>MH9i z7gR&LhQ>ug@d#Cm7Sv%F7B*Hbs$1G~kELcqd39~|0`NCfH`OhwZ>*~7xsqun&$K;g z+_0#2Np*es!s;s<7cIQ365{7qF087oty)|w=IGNPE~sv(ar7(?nk?(k+s2w#y$H6d zpI>G7*B;5b>c)nux#(|w<-*bBArme3qhtJNi60&7M^EshrGE58%!I7U&aP~j4}V{X zQLS5Ko2Cg)+l$}Lsg?n6fRAIM*p`7W&Tpvcc^K_calO#WuXHL(RZM$+ze9iZ& ztZx**iSyv}vKo=ZnC|Rj5609^*QYiXE}BzK!#iQ32eDO)7S+$eOvi*>ikP?H8yK9C zjw2M1plxRQ-{>O0*Nlb-_U1MSEprg67S~rVT)bd*b^W5b^C}lNG`J4rlOJ&5(E%SG z9dP2&0WTiiqZ{j>B1Y|7L~)%Ewm{^C|07&C^m&r|s=G@=-)BNy{UWSb3(5mCA}GML zU~yoCiV;DwkC3Zi`J%;*b&JhaYeC)oavg-qtLy8lY)_oGa8Z4AdB`kWyzt8E`SWTT ztLOC8l07fo6~GrudYznh{4wWPFQLluG}p;Yg)8glEh%5PxVE+@eHjnFVKi^h{PuL} z!RpSi2K>m>5sPl)V$6JP@9ZNOoU~@JFa@&H4ZZeS$EGxA$lkskp#nY0&hCVoKxUD3 zI2}{jis_lRCyU7JMT-~CsjOd$9ASFr2e!LFN2DWO2?K+=r#W@LkVTrZdopELf_;I?+d5?pa6TstqzHYep6(VHrM~z?AQ;h$BoOsF$kJjTbJBF}Y^T-RrQZBD zIKk5APTwPhzrTSo&pus!!{Z`-Z&v%a1g5^sJii+S8tj8Vq?@Q5bAk@hbBM54m%jH) zmKbLV^JZ+X^H1BuIS5!%S-ZHp!HX2Vd4x3UvG*m%@+P|N+C@E7vb9@Mi7X#^cWveD z>RR-ums1BFUHhb!zX3^Tdo`JF4X&IGba5jhaV^e&7FP9s#^iVWKIPE97VBY$#`#OW zL5r@}mN#I%!uEe@pIY^~lyji+&8%bZ#clO_4P^A%#YnTU^{uRRTv=8TRPDh@^mzBt zJJRy=K8GILR~*H@!5s6&ke;W#-G(td=IS?pVR>C`Wfiu2J;cZQ`bG6Ml?&&<^f*?< zX+@8=b5!foWbyo{PwZw0>qDfJk^TlrshFw($Gp8BrrJjBlg@4zVYY9$+jKV&PPpp* zAlUEm7%bbldUkhb$c$Z3-*F?ipiI=P#Wp$&uNir4xY zMf6}CGT`QkYh>Flu=V@}9E&Or!r0J)>IDoE3o3Cxql(yqMN4>Bh8+5?40pt#x%Jf` zS7Vb?iPG7);Ucpdq=j=rqi}bjzIs%{qPdM%RswMEu#A$sG7wN*KYQUQY^)p6&L})w zT0V9Rn!uB$qvkDKJfdXem=RO)pHyVf!!lQ0*-$-dPW9}?^Z0D)xKWE6>Ipb3ghQuI zpEhw)dGW~NktLzirk*u(*31cKmX97e#zczr9YkJo30 z#f>rfI9IzB`w3YVcyyc3{NF5d;Pe*LDW(h?c4|A?IXFvm@vzhX%|FUu{U6Ca*ia}A zeDOi^ai_LlXzoEQWqD3$U)*fQ?Q{7oul^5I$PLw_oU~@ab3)f?{$00L2p?`Ah6)9; z|BJ1v5CFF=A=CTB4Z7L4LW6GFsmP!^HlegqgN|FE?k8c;sgv_b8g%O9d{PG8xmV1x zGJ_5Sxt|Jyj$6>~r^cY;5fArMXVCG;gZpVR=(y$XewqzB9;IN4ogZxdL&)1V(>@b5C{hZ^+IcPa#QE=qDKTPJ>=*(6<=$6Ak)SgFeonZ!_p88T9Q2-TAEvi@OZ^DF**egMO+( z-(}Fp8}!g^6@tHRu-^ z^lb+HVuQZjpkHFpyA1lJ27RYNFE{AB40?q@58ZBK^#4kOZW;9120d!fs|-z8jxmR}p7w-@R4vdg3|6 zI|aXtct7In1fNZuDSUUk;1?2S>fXId@R`J!vUfKNemZeZ!|po4ClY6h-d!R1IO0sr zyHkP}6US4Sq3(p>#}H?V-d!a45yY9AcgF=kh&WU7?x^7V5N9gh9TL1hai-wiJHG~D zSPt{59hH5nmK|bXKLIX7ySFg4ja-ooT+Vh zyWkfRXG+_>O7NM)naXxI3w}EBqlwoEK9P7K@e0Am5g$%GC3rD$rm)=!!H*%%)U~@v z@FR#bW$lg&eh_h{s@+k+_aV*{wL2tuf8tC{yLWym<4?SZ_;$fRKL_||;#&p(ka#ii zPQm|4oT+E`I>Fx}K8AR^;I9!cA-+oR7l|{)>~0qP8RASWyXyphk~mY!?h3)z6K5*f zof7;P#F;{NCj@_hI8(>&BEjz=&Xln`F8KF}pF%t;_-(|QB6f!azlk_g!|t75$oLaa z5Z^BNRm3L{-zs=Lai)gdoq}IRd=l|>g3l(-RIs~U@C%7E1?*lW_)OwV{koe4Kb`n# z#Onl~NIXfrLhy0Krx8yHUQGOS;t9czAk@Q?Kr3!Ji?{l&iZ=@F$5g)#|Pgd_8fdSlubXe?gq7Rd+)02Z%GJ>Mj!e9^y=; zy5oX>pZF!jqk`W?oT*cHNbsA8GiB=D`5zg7;uXZV3w{-Grbyje1+OR0)Tp~t@XLr- z5nm_xY~oCXy4wZ6kT_GI?p1=%B+k^QyIJtliO(ZmC-_9-T!6YO1RqCyKJk>`#l$Zo zo)G*P;+GRI68s3_OmVv7f*(YjsZDoO@O_9grRfd{-k&&AneLstWc-QO5#KKO=Vt?F z>e9Vc@DGXC6YmuKpTrx8uM_+&;*G@H1%HkBV&ba=e~~y-lI~`~pCQgvq`OY=Cy6r! z>8=obJ#nTU-6_F;L7XW^cS7(7h%?pbE)x8n8S&8ERlwyl`u%CGFI<{zeJi=_?VYJv z(>8ZjT%8CdH*eheEnYVN0++7M2!tQc9dsCGZO5SRR)o$?j^OW3lFN1tOt!wWOCv0qsjXiE-TZwIMS@Fx=yW24&n_E@^ z`VEY_xuqFUvp~xMF;_~q2{GBax$A*XQO`!#bJ^Vxy(WRaZSFc7qiFEu5Dm)ztw{aL zqq}zlpj3h|Ogq{E^EzCPhq%ox4+1(+n5j%0`QPRiDg(e&W(20t<|*$9HQ3fhsh+tl zyN~U{kwNTOh&8%0500JIl_&RH{GTb$v#6Cx{L_0bzDdNlUCaU21Cn_Jd6p0imz4RuLf3o6RRpV%YJ zPf)aG!n0B+9}bGP&|Du5+8cA(CDBG8C9uD7X|xP!(Unu)ORh<_t=ocGuwG;>`#k5m zamlvR!^zey$&K6lCBs{its9dY|E7||Hte zVnE-`UxsPeU4rgrn~#4I9rtKH-uH>C2^;(~9U(Z~U*2=^r}@PwH+N(#eZwxT$Xxn_U3zln(*LnbOEZ@)vrETh zF0Hmpi!zs3}5bb02|hwakl%%!*6rB`Pz zU2K;&WiCD6E^W+QdZJxgm$~#{yRR=dUtZ91IB{PE%U@Zjz@?S-r2m%Df8W93A9H2`&< zQwIN*GGeESaxR%-F9JV7HtD(wd67INh~1HN?d^nOjqF7pGgbriQvWCtYi*(8U>&T2sfl zIGv?6#TC-lk5j2NHO9pmXj)UHE>0I{O`YuGoFJ{Kgo_snKH0_T$gQcQi*uT{rl!02 z$%3a`obK70n&sl0ysfD+7cUb0Vi%{=wWcauyhiXjE_Lydq-!<6aE2L=_OBi=AWLM`tpP;WNyj)u=9j< z+JAQ$1^c0a4ZqR_GnEx9GEt2)hgcQpY$^XUAY>$IHA zth@CU_IJClUYEv4jdb83e?rnlZrFWB@%=vuV+kFNA0Y4KEl9Z!{a zM3pwXU#mmXW{Y$Wy%3pCz2}n&j>l=k4Y_ELoq5R=-6ndrwTK|wGRONmYZr)42hlIx z4iA78?mDyxA*21Ce`0>zLV&P^V)ilYPYSz;1v6 zyW=`YwtWiah@{T&vk=2?YbJZA=jle@yoD`&Z{f?do@<|(kI2`>uCS{G)>9|h64KMyS@RWoDEK#OzdD2j?EKZ+c!#q)3y}YZM$1B ze}9as{{BQgnSU3VkLXAy1#PRvmD^gV)wI@~t}}f0Hg;_-UxLcXvQnUByN(`o>%A_D z&1_G8e=sMGz0W>c=1__=N0y|GZ(-Hi>fc;%!x@=pYbcwF=PExj3);5)tJX)iA&j@0ix!N#S<%{k;@8mXQKj#%|oPj5C^V{5^|h zM!-_GcFC%(=y?TVg$_D(0Cmt|b|!}_zVwZ2cBol`4zo0V{Kj45NoXgpZCpmMh#0q} z2%z7h!qaw@n>IwQo1{~V$nke`aOwisZ^i#N1VIYNirqMiJh%a=DCIYwjJA zNj#QqjBIOe?s^E0(}yv72{-yY$2W%JTA0@>pz-w>eeyT6U?(S~J$P69riv8U{+x6c zveTiHCzBlR+#F>#*JiK0Ew*rpONaS_qS5Lm2@bB4Ayw1rERdDhnYmFGIIE%#6<@q% zsMDqu7DjvBeBI}!ESS(?pU1thK8l6SouoNwj9Q0j&;j{AjAzeYLZ`@C(XF?F;*H@f z@$pAk4lSvQj&07`dL49KxteS%TbQn#_~f9LBgN6B4$iY=TFar-#<%(<+r~s8UCWa` z@ov8z;bxv!L$T9Ze?Osvz~lUHJ^yoi6yiuNdpf>Sl;?5TsYT;yG3%1#HtfE~cRuPa`b%k#pw0mBCl+UZBz;h!>GJmz*aHAG- zxL*CLIaeGHvxSRSFZFr7_EDp})i+^SFrkCbOK{bTnd8-Ly0Yk?J#e$nHMe{HI#UXq z=^+JPzv7VH^_MrzevxCtP|&%OhBNic7B2nzA5)z+-7lm3VYA;YBH9V-%B<=y`T>i2 zTI%4T&QhnNJOgUnj_2Ia*r8Yli#Cb2ZPJF`Lk$0Gu*(xV^0mDSO?yX8184~^tf$%B zDRf9$A318m;`H_Nw7yPj-TFBF+Ar!CX`=jmj=Y;P^0Cw}uf7*PN8agaeA=t7kb*WD zQKSWotwwl}=pz43kkEoqmLbF(!pnmg$Hjey&lg?=&My<0-EqBs-C#>5j4lQ=vaX@5|?=nd1m z>L5#-^GWe0N0bzJbCH^MrT!AEx`FaJ7Z;mSofu;am$|r~IgOpUXp|50g)bJkE_{qx zwS`6A0yrAYyNqGqys?G9u>NF|Wnfw}G*bF-ZpzL_X1B>7X6K{DT)rjQ`Dj6x@67Cc zjCwBLQQ7$tCg0a-wsZSC+2ngAJ73b|dnh~Kbd&Ff?0hMc@6zmizHu9y#;2WjffP7S z%b9_-n?tYtKZMo-{{Nck#CDA&k`i6(1;&YVhZvTr7LpsYR{CuI;MELm#r(B6{(cP~ z&r}N$%500?;IFkTQ>{XOE&7JP){IQGaG+?mMNje9Iv`W6QhzP_jlb64wq>wJ!e5JC z(cs}*T*OY!f zo7QGY?=_{(^qOD1==9S$9$NP}DE4X9nVd*HZ6-6{kthsqCVwk3+w^8~bvs+o$$Og| zWS*C7d!!T8^QN`_XF|tN^v^vHyX=oa1<9xtJmm#Sa`LO~wp^CGng8YVbobEOsCo}O z?pBp_9Jk6?l{V(4q2l>0RZrMz7Hsv@xt8wcG}a~swoJWszD3$}49#+PmHtS2;w##! z_2}>w8C`hOCocXN8n?%7E;aw=<5n6RH^;Cd+POoo4+batj9@f=qR(tbL9?$$6bE!# z-G6Y1-Jy_zwiZ_0;FuuKG;9kw++&u5(u=qXaR3K#Ryf09*J8+L(HNgi4JF@w)~vJh zQCGKkcF)$z?3Q?f zu5pRaQ>3HWO#?WnJNwxh)l#kgY8#`kFgE^eMPa%ybIA6yp#) z1wRb3AwpLQo<(7fYw4IcfxhTndDILJQkA(k?ms9 z7TW~k*)!diD&REPnxkWX%(1f%ta?+LbD<}tFVLcRHl>x$8zD-U$r;r*R60v@RC;{h zmF61LlhXf7zq2jvD&0Jgmfj!x1HzT91v>PPe*lUl2M3&~L^dEIgeRN$f6)={XWBqa5Th{m4gl@RW!zwSyyZ`q_ zL7Nmf2hkGXf1g%y!sEQ}J)vWWzDx2poM*$k_>Y|!=UX-@u1EI0(E8?}*@Ce+8gD&*~UGU+v6<8U1d7`fADR$U?a1PEF+7RJ` zEKvP0v7N*xr`-4{#)RLw)yVt{QG6Tv$J-Nb-;D=u;|($cr{57RL4P(TP3nK zpFOSh-xE5fi@9F#ABdewQ{#ZjmFC1Q5zgl<2;kmj&b!~+EG=>f9PXq4uiAc+-80%g zx`(zsKQc0ihiTT}aNH>ib<0*Rq^&L6f62k_!vB0Z6qq{+;$#1qh!BWdK-?EYvbkj| zAU^eG4`?WbVkc|g-1YEA$ZTt)hd85U{H*39gkFO=SJ2g>N82NHvaYvWEm~m=s0@bm z)~9)=oz!KWdnMPb=fL7;ZplHDpJZ_yqcg4bX*|He`YTtH(Pd}w#J!CJq4#v=#}UNIb@v$)_2Dx zt6tJ&ntTdvQ1z7EgW*q7Mq3-};=$AnajK8HyTCNPbvu8sC(RbJQrl`_YkQ=EMrdoP zPpSyB=g3cwx7k~{AWYsH?u#iqkAi|on{~IWT`X1^`a~&9h-pM zl(+CJWY52hICZu?ZS7}0H+OybB=~~vwwCT@d(cqVgSe^J9u#$4E$}>Q^%G(Q-W*X1+%!OwjN{kIs;4JZ#i!T-7rMK%7m5VJeldd-)~*2O!ME6?4zatgp#V33EP z@`m`g6QL(~L%C}a4Bu4;BgwB6e~%w9h9;ap;k*g0yCrWxV*Fvw)*FJsNne?|o~h8_Af z7iX?p^f^8;?tQk8M}`Jus2la~{ z4QH58#dji4;>)G+mQB7wm;`y5@VI#4G`t{kxJM~3oG?6;s$Vn@e;F&@u(%3uZEl#0 zzdy1Rqe{QSpH3O+G@EvP){FC?9*qFHiln@Zwva{N%8NZI_~iU*OL1$IIuX@fU@bi zWxSdn@{q0gVcS0e5c`iI=&a+dm+9T z;d?Q@*WufY?`nMS!1qpk*WmkWe1C)QR(#FRWFYd~xF(u5C5b+o;nVEU>~S2Gknw(Y zu)dB@*yTg@Rgdd0M<>Du_dDri6tYh{u|%!Fbt@LKGF&$yoUg<6h|hQLrk)kJ?qoTx zrBn~>ezddH;uYe9)=^O*2QwPRQAGFt% zR&!|lK_?w^{LmvPgFLj+KtnlpE%Hxem{%qt00Gd`rprgE%09p{MQ2iwZMNZ@Lvo3*8=~wz<(|9|3?cH zO-e|&qx$ODKyMdhA4i&l^PT)A&Ug6p!~Huy|I&DYjkivK9-!5(cV0(9rv-P-7Umw-iP5SzZzV6W1PxV!uWY^nYUyst) zvHChyU(eImx%#?9UvJRYJM{HFeSK74H|gsu`np43Kh;-tvTk2rkJ8t%`Z`r#&(qhr z`np74Z_w8}^z}Y{eNFX={xnr-YLtj7DS9PjxUtf>X*RlFKRbS83*SY$-L|<>v*E{s}K7D;uUpMLN zEBd-aUq97XrH?lD*Vm);b*#Ql)z|a%b*{cH(bpUF^$vZ#PhTI^*G>BRioWj9*H86T zC3OGw^(cKEtFKe_^*nu@tFKG+^#*;tLtpRH*GKhrlfJ&9uRHYhQ+-tvbo=^xl)jGD z*Qxq?p1#i2*CqOTgTCIOulMQeqx!l@UtiJJ9s2sIzN(43eSJMjU&rd}RDBHvKBrBZ zgp<#6XD?pZxHyi#tTVD`#Ms4xjlOpD*pWqJMwSe>>G9&C(PN9o7M&>PcR3=*j(+Fq zHRjIJfN+f#;t(&_<_}lk$aG-N<`JP#rdl~x-b2UXVA9GR4gS2bm*9^CB6xFn2qLp>08=u!1&s1+_b3G|rCJ(BQJz!mDliG=S4yh<%j5$0>@c1GS8 zdVkc4ha)dald^EhHo)sb`PLT5?jO#% zQ{~>NibmF>QGWNzz4OR8NJkbbb?1>WReC5XrKBWCDFP*wW95!KHWVr_E3^0Ml>;r% zEa^$u`}_Hd1dGE+}Wrp@GI|>L635?xZ(HN)4N@WAhbk-ft-m+@6UJ z2zsZFflUX)-tq8-ILhfI>ZwA<0ZhNnRp;Ue+jc5T zy?uz|3aE9B;6C9~02#kEsI(I`9zne1h;UG!<7DUqpBa4wh5u1CgHq+zgi@ zU7SswB>Kz&y+e(5b?Z`lm62x!=sP3!oZEuFV6O07*=~4SII?Y!gZw2NSuagLh$`E| zk?X{v=@8MJ$d3+n*aqiBej>d4x+o0)JpoB}d11VCGGelZ0#8jxrw?IQo0B+`-~!bZ18BDV^1G)lT6k#TO^iCOTo+#_W^X)n(%yLJ zus!jxKlIR^c&HEEvo{`kZ3Z4M98nOxIh~0VGjRI?B&*Ty`%;ZOW;7lnYl0ad(?oL? z?U`sJKvGA}z&#VhT0QE>`P>)L0gX8G_n;cXLZ7O+(}&$>{7A3mO)>H?tYqNvy9mQg zIuj{9x(EZ)9#mu0>QgmeXBpnoYxz6NsF#7q-&sb(bS6@I>@4GEU#gMEKOX`v!kF6^ zLH@2WIH%Y0LgkwXD~#De9y6Shhtaz?o-;D@SQ}24SUU&B%1b*z+l>VXLHHUJ=pg(e zK+v|Gi1j60Oe|~O@fH~ET)fu;G*{ltrE0n5BLobt9|s z*BaFdByr)A0e~yiZ_XjSFW?$=BU%ZU90<5hopcf5!vHs_hm(XUr&;}4;9;PzP>=0L z`VD|P)Hpm86E3+Ka3?Iv9$S}Vu!_RPli0n=eOOG;u+2Q6{06N!`q0pzur=pE$Oso- z&+6WIfz}L@#KOgY2o$K?*^Zi)s+NrrRW4AQ4|C{Ibw<>I2ZyY4%dt#{i&IF_%ocot zzLK%91HocwG2wzjYZYn(lDJP7P4Ld6U_2TUj-Sx30eEW<6-O%P+8A7 zdL?KtU|gHS#TO$j_RYA4DO7_^=NehOrS6q9Zlf4}s_TnUb=PD^ZOpz3!W0=-yUr$D z3%E2CrFjVMeGKaN3+)poVVO(NWb34nqU>EL(8?~xu!2?$BX12C6Z0wSZMSpPpJY-{ zafAnVLPgc1r%;jB<;>jPmW2LRz)5w-`J^v^8B&UB*#lRmkktZS4W0^BfrT?%@;KmC zYTi+Vp8&i@op=)AQ(Hozb~O#_O}Jz-;I-<@Lc%LXAthGlLz8gHSC~p2YKe^Pjo|52 zrQ*#qAZH6E6#HsDdXV_*gY2HCR!F_(Zbq=v61V~CMnl#GaMI3jF_rh(W5j7}(;hs} z29{xiQbYHIp?lKMJ!R-#X6Rm_UKSf{y`Dkk7YGI6l6%`2R6M1d)W6XSC#ZZO@Pu0! zR6N^vpx^APo4(T%?nGaL@d9g-b?+G%tZ?z4*wwq;Aq%OpOW6!P!csrOdgIJrdkDxL z3+-#|#GVxH|1Y50qpm~10`1)+WWgckv!Llw-UwRig|pZMEsNRdsu45Ph^uFgb<`+S zKNS9c*vb~EM)8V#z@_RZ;+ca0C)B`7^8X7k7c1&$eb4UglT^!V#^2i+;#i!CQ9V#( zk9p>N8IpE@l);>Nd6*5caJYCDR$`Sa3W!D2?FlMFvZeCez*?$e(pk24vYy{f;7O=| z%UW|6;5zkpaqmvR?P?wx4wrlexXW8CnNYA=294YWl_7!RdgEa;8F;+hje^*IIuj{o z?gsyIn`aLX#(_bw7T5Dba4SJonaTnlr z_1Glx)1kI{N>Fu*2r6MJN*;>qiHDtGGeI77#_cf2qyW(=$iqpuX}olJ0g5wpm}E=c zCtm#>z?nMy2oqYS~Bxk zD~^|}QMI?&jP!&$P~Zb%wAnvW ztjk%~R05!=>ndxOfPXZ`CT6y#ioJ@vlodmF-mKO30ZxRh zJ1`@V@w0}pYK7GIi-MIuf{r-;m6h;6fMcqkbapr3xEdkJbsi3l3(-O9;?8n<1Y1iR zgl109J7|m8iSWU2@n&jqMA&ILr1%(pxP)ZOlSfOx>zC(@S6&KxtT-0IxyZYGw`{y4 z?_6W!YNN02?Ls>KUz*K%_}j@8}%)+|oK{_!xHyQ&No!^KYqo0~L_MyCy| zkX4RIRS+)zh)iCP@CT2lWW;oZsmS}09me3B*(!vrKO)S+>!y*Z*>al0a^OnJRpoKg z$zpgQ^;iH>(8e_1UDz}r@IFAH=4||y+kmAf3t6IS#CdGsdB6#8fM^Ypf(@K(tn%y| z=cK{o4r0E=u##_akn=4XKi{Il)~+dHm!X)aI%}3#5wdcSw9pnP$S?y*Hu_H^F96AC z+HrB~5~RUv!^O{2(AAjv_86LzF;{t$(b5x&>``@)@P7n2p(Y~L#Vrv;{yODNw06%% z>;qX1CEWh|CK_cJOpc~Lo|7{3Sj}i4h4_zRm5|kG3c_>9Sd}f+&t0Jl)T1c0d+dbD zGr%7+CPp%3O`e9VDO^lRhAI3e`d~H%afVsOQXe&9bWHu~2&b{QqD;Htq3TQ|1vXr$ zZlB=5$Eh0;>#=V|X^~DP4u_{#s216|91XZeRY`upcGswrum!VqxC{P68@O|tqhAO8 z4ZGULUyCX5FMFwff&F^~e(1Qs!SF*H&Q(>1JFuk|2uyaz1wH|sPz#Zq<8TWzuui>m zHeu>zEbsI~vKm@s99@dYz!PQtV^B7jrv#xeObu-l;o^%x^9^@n($jXcScNQ6&lzcp zW{`|lYRN$9%PT|X^;mCCDgU94eHds7dRRCsMOmik|D5V9EEZ-%bd`GwluZ$kG|P!+*@9i?Uq-j5*^+pd9V ze>3`tSoAkmFynG%rNiXJWwID?i7Mn_QUv>tuxXuyUEKC?@wF)S^=+6eSsP(FOT}Hd zK)vj)KT(wJgshEDJoZdmW29;vL-xvG%IM1*d*PuU@9^{3jbS@$4TFos z!^KBpl=Oe*l;1bmJ$0D-b29W4^^nV7)t2rrH12jT<H+W$28DDKIi*q6T^exB1XHjoE7uw^801PpJ+`CCJ~bo)q}7;XK<}Eo&_49qLB{PXfJDT@T&tBxt7>DDQ%e zD9-4x>lALjMp=|?FlF>Ww$mHWyv#h-8`usbSKfkRp96Z&XIbh+H*OTDs#3>_QDr=w zrJa;wV(LCwCb*I&z2uWa_r6~VyT`jQ4GLk7ig58*1U;V?qo+EpS?X99E>P<%hmMS0 z9F0|DfjjmKKufm^DS>^sRWwa*Xg$jI&1BEJTW+a8UC1`c5>-dfAp9EOgt`bbB3!aJ zChQ7td^vP1PH#S-BkQFzWzf-o#E|T3HR}c}?ik>^QNd?g^JJjs%@C``)RiYWCN~C^ z7JkyNian@XF{rO$VOSR~9) zvgx%(HvORA@MKN5X~6JzWn@Y>JSlO+6Sw!PND zUTceG6Mou=fW1s7yfQ&skR_@XR}#J)aKhMWwHtQ%U%y?*+N)iDm654$c3F_VIL$2wzZXWNB4)BBLl6ore+QSOs!ACHoZ?L4xJa7i^_XA6Hh;FwN> zuK*m^>G73-dD_WesMLpl5+E&dN{1-0X z1X!QY$TA+1GgVlGC;rAMKuG=C-Bmj$1#^%fMj?+feC>0)pRs-J72LJrXQ*~Y22P%C zmEblCv||feJ2?;WDzhT*k_VeX<$Q~Gg7czR4QQGVkW@>34P)Bm8nqa!feqIhla}|L&IWI~lBAds-F_b2oV2t; zDTWtH{DMk&cdL;($y!29{UPW?aVZ{N#8g5;5S1QcJe&|$w~wW!6j^9!N&~#>*VOjr zI`g@Ekc#A~{pPF#-(W9YR2kL6`sJHiW;9T2O*75T! z%FJV}!F~YS_wS-uJt!HA43YXOpN)}hY}r}VkwFk|zO048wuOraAei~g+%<@TY%?#D z!KP`W`Z*4=<7`YCo(i}^-7oNUfY%zPrCC{SbkjC%O}c4o%m@70ZwgDR==<@2JtpuL z-weFhU(bmE){*_hW`9DlkzJa{gSgM6*lj*bhBK143uKR7ay%+zdz|36*q+uHGK+ zz(dt&H;FG)FT?!d5_X_S9e4)eb08<7UKNvH063{yWrCIiPO0z6yctr(t<6wLV=I^0 zTO0N%@0Sstu;3gKJ?YDEs{KVTdU2`oR1WS!oljl(Fi_IyQ_6UJt4#Gn7`6L%v9Wc- zlmBj@sZniE2#;@l7hy|Xh-5lk(hRs=oq?$yE_w47q^uFc_~FQ4Nzv{DQ#2geSx&A8 zfyD4LrRhYjUct>KLi!bBFj%i&!lL3Ivb*MZj+;zgcFR&9NK=Fh)Ky|KS_e-&mEuq( z9xnbzu<~{!gihrvjml@pdMA~Q8|&D^UXHMU1u}+lG7J||e~=JC54H4TPGpJV8KRdU z7J8q~8iNrz!zD*T8J{1j;(?@VU0;H4AR>_~t52@SXgPX&PgVK1%=Uw=uUyYuBG2{D zl=i~|p--8Lh@8*CQ>So%37H}ISd;d{d!a(Jx)Ge=5(WAib(M6p0C2ndkNEIDfY+)Y zh_Akg?yWO?wL@(czquXqJ28&5f%Ve)Vvo7(o@tK_XL((EXRreosNc#EY1^ECrc|b4 zzRDf4O509wi5rm$)Qb}+NLTI$B{34)gO#s>dpX8DZ;AsKsL_Z@ZsiA#l*)&|t9> z8I@-ll}DMC`yu{p!MSj-@@|Psw%5Em(`)(1Vor7^ss@XHvkNiRA&qhEjH`PErpQA3 z3CUXk%A=5Ygf)(1x>UIM?`-h01O?kpcRL79SDRr=8!k}Sihqcm)X^9qd#=aS{pS*< zn79|Msc+;&U$l1DnE2tc#vF%Y<^3|sIUpiAur8;v2)c8B5ww_smLSJbtD^-sLlwG zGA(IV|3Z;8laj7D)$8263c@5Cl4$NFeo3ymBj?CC|A2x{lle&QkouPhCD{rrpf6^W zlxYDyAF~v3bKIzF2Z?nPuw4qaFBS^^&N; zo>zqO8sH$Ye&J#^r#^7!c1Z1WxKkrn-7L$!WLRn?)VCu{sj-?Q)B)~tn^b4X6r`rp z)xRbKb0~i#Y}TYs6ifUYU0EBM zgG4Y~a{na2If&!5a^9zdpb~z#{J<&btk)=h8F3bwNw(Av#pF~zr5 zN{9)`bFumZB->`LP;(`Ml0HYZA5Qw;AhSmOM(XCl!`G;%5zE6RCj;Id`GE|317IBa zlNCw;sS8K;n=Q40bc6%bfqdycn_)WmGHf=UUMnD)TBS2(5bZxIV+Z!28oRm&)&90; z)ndpc`_x)qGv@VL%*<}oP<-AR4+ADJriNcz>f;pY9O?p9?YclzwYni~uo{h8Hcw2g zc4y-d^(H2rO^>VXvb@a$XQAS;ez;^M;4*d8>4bj{c!m12xXf#SJJi1<=zI;hD{_-W ziX$d)nUB;<)R_t-8IJt?Y}URENE1TM2bc>MI>cV6*F}*JP=v7K`l~fyp;oCtZIC85 zf+4D&*pGrf0e4IdlYIBUiOjlV!gC5>#5hsA67X6zX*&5^0B^&rqXm6l$iAfyg2%%= zfqf40nES<-P|k0V2Ro>o+}v&Gx!WYu5t=FktINZF(u6(nP%T_pzzZ zEtz?&6q2JN{B8xs>bJSHBDq6qyz5-K>hRH|Zv@#g0%Fu~%$SOavv8>6YPJOHa}Wf1 z9>8ucyH+sgQ8A`QV}jWB#sjl5Kd4Gdl?a`1 zncs3WX@=h9Th!26jtGr?{7qEq`xiJv7E*sidSDMUR2P> zhXi@{c>%6g1OBTE7w^DDdD%foT`20YYj|K&WRoST?6t2yqC>(vfuuGh1=Yr2x<`-X z;ZmA`$8{X0M6>)n_CT${K;^xP(<6qON5Ns_3Z~wc@qUD;{)GV9@veluX_MCgC$)XP z2Hd1JUPyY$6mH2}J@_;~S$oozrlE)+51i9m!RY0b9c1zyTOl))S9tiV)%LZTb>*Ql z!Y!zvN0=Z-n6|WPhrz{gj}SEVpoCc|Rfw}8R3dxK8zkEHI*`&e z!UMGjOZ#h3tW83Y?H`J3-s4y#6Y!+iX;7fSZ8W3~cN?|TQa3mj44B7fzsVgPFmExy zvjCQ<-^&tr1K@V`*EqZJTfkkBBP29ZKRjU3-<_DHX12vrN=etA6!Y{BlgRHGY;X^% zQMWy)_HkdUS#6l%h%^JRUC~A-NTdIdM&E#uufcX;1~yX02}#zYALGCwro8imxN!th zXq;#islh`z1lu6KR6TVG;V%K#sF!9Fjw9(=qh1hrGT<$$tAg|zz`G(#`VqbvFtX+M zh7nl@q%0hH>~JD~0$+8T^Sq>2~TN1yln&RVe85B zB;R4nM;DWeOSz@4aA$LYT0flhjWB)G_;vGObxN5-kEt>F4m?EhdCqW2+x1-5&zAi0 zi>1sNpWlb{?T}oALFBl((VWqV)=hUPKM$?m8xKdLHy(~sZ#*2m-gr2uJ@GKaajbje zp$qiJL(k}qhYr&l5B;b&9=cagJPefdx}JDA)9H-8@z6(m7$ zrKATYQW8P@Ubvj_$AF8}PbDFa&EQ#vn;B3ri-UbLQ&NU@Rtxf&sV#X<&dg)|4f5H4 z6zl$nFa;4o+mOcdQAMKaZnvXY!X$|~`8?E94@jaj5pYx$9q1S-rrt3o{6!M&7&zi; z!yyjOP*pU7FzJPA(!LISoa&YnsN)dGiqw%Mq)*35MyX0k;Fye)j9rmgm=Si;iBpAq zi`rX5_m_2k67}_hNl48XeQ8TeeM{gSV8OkAS4JXa-Gc2Q@)m|4-*WK+tl&gFFIq*_ zMG4X$K#Ys23x^YC193IWg@>xJbcFOm!)Qf@(Mr`<&>YWABDN;fE#M57gs)=On0Gee z2;da@$3D4U!IA8boF>DFTVEihz%7!KQ0%ioyNr`*1F{%TRZwVo7NPfJ(69?wPNCni zoW6$CzLkVYwxAui!ih9lPtlMz%Fkt>1$e>~&b*M1W zA#w*S&{T6fUnh=4-l%#m>gX}pw`ug8aEQ8J)Ds=EcQ0bHhC^k%>-w2Q6-+@W3cPk_53Ny$cc0mcEE z?UzH)-z46ohp1==u%>Xt4y~mS-i%woQbJ@!z+>5NaP&jL1CP)1 z*{>i^(DT{dAP;nQ<>Q8mM*4_1u_kcT2; z>Qb@6-vB%P&O_D^=r@al>IVDGY8iO^{bqI&WXjm@d`n?%#iMzQ2TQOpARbhrvd)E` z1PI!!3d9clh837E6*?A&cG#{V9$7{@W2Qob4F`#-akBF8tSoM%IXu#2o7U54rYT%p z4Hr>wDT;m(U`Tx=Fk`M|Bp!HumYZzEjAUboanc%B_sCX}V>VQ0KkJ}wp;}W+`IK3v zek3r}s!%tA)27$xgoO0Eko7RqFW7(@spE3U^wT@2+$?bxTe)oeLT@iP*yun^dG?DN zk1o(2v_angUclId+g#AtXOJ&OJ4#yWa2W%3u)r`#)G)|k;|YDOk(zMvUND6Ex`bk>U`SbG36pH; zZNw77?bHxThSS_I}Rau=8XdCLy|sNw@>$dJ+=k9Hp+-SIF8?oQFhS7q0;b zX9=CibCPf|QB~!t7BW(7Owt3Lu0)N9?w_OwOVp=B4^j5v8Z(o)u}3LXJ7Sc>eMylz zVj5va+MSUZt`n`}Xj4n8;s6=L*Qu8`V?)Mjk*ik-vRL}uemCI2c#_oHcpiz_5ai)_ zet~Ts9H|1uMi>tnp*vTHYqB^>EC(D=f}~&rL8n@qfd@+D4MrR*#1Iu>yW`uQgpYTI z#Zr3-OqQq-q!NbtCmR7PsU~6V4ww88wn?c|ClIC$IwJp&7)9?yc3!o=)4)(8*Le>P z#jRJcKavx$6V_)KXP9jz6;7XjBs=r(=YRvIA}J_3XsVYo@Nm3tLb9I>7e}$08uJX# zyMP}r9~MXP=2=u7Dm^EA%$sKyg1H1FLkVx5jl^yX6X{Hp>xo2=^Nc#>A&Hk$>n;#| z8hDQ#=Bk1?wIPe8A3H3-;d!ZIQW-8O0*prn_Hj(VMjee_g-gx_yK2<+facZ4~*;b@Ti8$7(BLpRvAnT zRMgC1lEzFyV=mAto*>P0cl^DEHuDro2|9v3AD zb2Yb&Lzbwq^x}Q<=pcRzh^le*9AbUAWCY-px@ZXDa{xE1cVvNS0=!PmgX!>7Y{1*S zf#qo)s|9G*3V9qqr<%_VM+UT8bRka(kQ@qo*A8mWdK)r+Z`U6vp9oF?v{wh z&#cxH507cD%*p{Q4!$_z*A;CMZ7|N2W{CrtJFA=b1it*gz|ocPK4lWY}$Bi8*Yw_K3qcGEj2ko z_y|P2t%z?_*d06CoXr_VNRI(zVtc(Z-J6BUs(>qFhVzMX-xJi`67B5l*?Tu^fpPZ) zf93&MmEHHj#@&{fVe`1UTb$tGYNqy;&OgPG+p{4vs#Bn5E;S#23rRI^Y`uxM(+H8O;|M zd!eYhMYbPIIq+2aJ>w+I(%e4(d*=jCkT*L1lVk5VJgzzpA^%3$d#HN(R0l3p=gVl4 zew^OGJ;ssM3cU`v0)1jXtgTog)`pAe1wK`#V$_{JeT)r=-AsXcMz%k^OA+;LQ$1CN z7^=k8dZa}5#->o6iQb1xDr%^Tr(%Wr>Oj($gI=SO`w_k$@ET?BgMJRU9qL+8(RE5X zB>Q1Fr4v5$tugG_sc^s*;o>{yqGRT*h`mOz0lKAS+^dWlosSvMf5z2bvXN$o@r)Wm zt8IuP^^*i)?uSYZKT8A0VPPvpoBXP zRJ1BHkM)xY$jxvM3&qB8hm_||c)C`0%4D&$6+Z@Cs=|`Q#l$7%4xn-;+b-d{;uhs~ zW~*m8_KhNfN}H({0|G?{dCX*m9b=Qd@z9%lIwTZm?_#M$JbB@5ZBZQX8b3))LyQ5K16D}TcdB79Q?LwP`H?ml2BF@iYOTb2!Pqj(vNo}gUI0Fw3 z->rS3qV;_!?wi)j;>gj%#rxKxf_X#zq6D?GcLm<>?xMa!yK7`sVb!>LRFVG#z$tap z>4Yx<+^imgal$3n177EakVoLGWDWMx+zB+m5)@(Z*gJuCb0@&zp>TuC9YS}UX{`JF zOyUbPSZFVK`0)c28w-*70|iSxTgpCg$nh|Ck}%ovF!oTw`!0abdwnAtNrpygUQV79 zGV@q>odk!#d*o4U{Fo4jRAOwBjh!ZY^=-c(yZd$M+Ns!ttqB)zpd@d?pb!aEM}6)`_zaE>MRer^lWP>`|q#O~u{{u;D};Q<4mY>~URV?1E{|Ycnyeg-VrZ z0)zi+l>1VH`;d)>OGw6XqPWzXfE}Cmt4kYv78`10^kr7-iHEj3Is*@F_m|<~@6%DN zGekb*hJ)BqRFq`H-`U+O{DNG& z`@vVxkDkZ0Lw*JrS+PuzD!^OR>q5T~@GiekQAAIDrcY6HPdq#hW0OH1*u@QAltWd5 zJZ36I`%=Xqk12;dKh4Zzz1m;S3{I|x;mow*q6Cd%F9K%b;_Z-P>U7B$Sv9U+pF;jh zz$xPgP|e1#u9h3Wx>}*moI(B@z`x4a#&mj}=Y*p;qhoG-b1g*AqKq^qv-|X#2mMU; za#F}202IMnFk3zWgZl2VRElOdSHxWPux$UxVyQ0#KCr=?Ii~;)giRJ3I%S+Wtkx3` zN3Ajg54x7O5pHVX_hx4_LerU&$uYcOsc_+3b)xL{*c(gj&>28(%jnyDAtO=lv-e5~4>LN6sk zA!?Xj%XsvfOjJFcsVC7KL-sLP3uEYMO(ym|ohc~V^lJ8%MhezK&pgp&dMqPTP&BGp z*CSYBi?J0I^cI64w;1%pylWAhw;;$Sm%!1kmibFCr1~Gu5vv7Uq;@0-uL4}5`o#&q z3b-?3Z=j=BvW3VEm$G0C5Nsc|%py_-q$V7hC}HGkAZxGlKBPfSdeEusDMfuA&1_&T0ma?Z8Eb+p#yX zZ~2(q-qf7IAXnUiV&Ac;_pk<5YPV-mqh~SWJUDI~j~1%SBoI?%k&#GM_P-+-qY0Pp3zb*l8v)l1?u^8JoE1BrU--e3Lsrq{oLV*s~ayOKgAcSvtoqL z0bHhjE-6J5;1!;t^Z^#9nHQTHcMND+)=OimF_@^xU4ABa3@*oJjB_5vzAk&Wzb*9@ z%wl_5fqFARnCwyAox`u;Y_PjC6>y#I&gFpHJx!?uSq)7cCEVVy%M@Yo*d7(^GG(VR zq09cI{vJP#?nzVhxQV$7C7Cd4&mh@?W6Y51d{a*;UPEC=0KOf>CKNHMA=P>DO6uc z#5fsn!0sd&nmS6jQ-jV@k(tMui9v><8&T|=!**WDn)oSDE|swF(j0#xVGe#w6^JKu zJmPA(J(dtts7@>)&pUtvijvfuqWRy>$dk7b%MNeUzKU|+LEJTNP|a1F+@Okwtq!FY z8_|OTBdA8z^1Vr?n3!=+mUN;M=qdHmRPr2-b+}o1Ub;@F;Zs2GFubwLxTm$#xZSf$ zXXn%*6pnc2vW(pr&G!`=4cf)@Sqh*sK_2AM?jTbR6$|nN`4*iUx0IXtKZhmX+BXS*;FHWT>}?>(xHB127s#;N3Dk#|(17+i-P=O9UzU|` z{R5b*G&{z(gk@A{_z7%suKdrJYvo&fOBSAJ$N$!yXdsE_nU_Hc^LgS+PH`H>Yb+&p zu#EzBhQJ+b8DHK%i9DnyAT9Asts&EEaX=T5UKQCsc^jp}z9UV94~hM?0?&6Rc#i8=^@)hx1(gOaW>(8-E6Qotk?v=`=%!`dD=M6g-_OPYweQf*0Wn9JOUDp76$OQXz|V?3*^wQhz#xwq_{l@rJ@L?gs{A~5($kDE@(?Df6)xs$ zG4)v$K~7!{q3efj@Ka7Pqa9nu8eP3waAffzfdkaTu6sWwAj91);yN=-l9p*O2p`w>opzCypHg!~<FKOLoDAhpNf0 za)oMx@ZS$PMQW3D@;Sg2>aIg5^CiGF>UYBPD&RWxI{J;bn*wf9rC9KgPXTULOHX%n zV0fb~-2vje-`M-K0W$a0WTGj0Wx6d3ll9#h;x0c$xgH{dbQcc1b#8yzeH^nA1|B7y zpfSw%%=kCv-dptsD}-)zl>9MODWgesK`8>rX2WllXj-6=51_`#d2Z>icM@B^SH3=;z-$*`W|-rg{v{Q1m0 z*0&B5+x-K@T1SG^aT>1H7(|u|Jhy%`bTntkm9wcY9nVr%jU#NoQu7R151E+9RFfi| z?^}Dmz^zTfnOPRE2W5MsO?sxs z?w*i{Vn9@U6JLu6f~%{zx+}hMRmA7wb5R#%U3Kw=+;zct^{!lB-2Zu1)%W%HHRHX% z+mN2BQ>UszxauTJLYrc4X;nIVgVa& zsr(r0kyI9a(aIk`h$}afmDlj{E|vfMLf^9}m{$Hh)=PL*r1CKf@jSK!B%Fo3ScQ4; z4alpae%$nv-jHgiuomyx2j77Yjw~n;gBKKtI|~Xl%)%EDM1%lSt1299AAQrm0@m>; zO=-HY={a1Pe$-qm)0>wAUyUkOGb%rRK367RM=KLAg346!Z!;<%v6Y!kFJcZ}c^Tzb zjF>FU%fEDqr3?C^D31I_g@1Y`9b63ey%Cji>& z$I{o1{HLEz>GuJCd4At0rN4pnP5J`T{Yc-FZ*X7B-UM>zuVk->T9 zuh_)xMP_%;{Acs7>pjTa)ieLIJPY?D^H9(HJ#3u*3zSa)-aG$&o2Y?f--111uNOHI92!z`WY^qe_AJzA{~RNit@{yEh^+sTT5^nF$)Aww+4Dg5Zm$E^;3h77l7nccMMtXn# z4Ns$V4e2N52eG!E`6V{a4HO`vxu8HSadYt|WF7=3(&pkrm_V@bF%%y-6TB$&?0F2& zgZcw^wr0>N)(CtG|FN3(&cn|~K`=tRW(xkajJ%Nlhh9rB%0B{pf%i!VM9E5Rle!&< z3K#8QKbKe)d+2`&bAh;t)2mCV9pe6?{NjTs{oGqfPET7y>C2F&*btFb`2BVkdn%t3 ziGKmUl9*rjJWDUj-_8L{>V9Pqy;vPY9R`AE#PRw2L7YS*hVt)SVeM@8!yXBSO`1g9 zMYNY_e%&IH*x?(9=D*ow?L_&zHd-1tvfpzVFnfmIK}eS!N(DM8pFfQYK1KycpBNN; z1qHvFDMvA&=v)cP{Fkq1O@LshYOyhg7qx5+Q+w!z{Qh7kcfT8?hJO&!)=6sRKrlE}}r8JuD zN*oPfM}FpHYKMdayU%B>x?hJU~aDg;xzC_lN-;C=a1!AK!`Suo`*^B1y| z(O_2R{nPgY`Ij=$1V1Jw3O+D3l>gLbYLf=MIe!c0qi4erumdCcdztOWBE3ET0cPll zNbgXQCDV1e>OQ4MAt}WB!u{~PpnyN5;mu_p9&=LJm;aY-MhfPEyC+@_;C(crfn=a! z8hB8kfxff8{7Fpj_iq!eBU%;|u0m4_3M4oS3aFuB=tH5aLZ7lNi26n+FA7Y456)6Es{Oh{O` zZhT`k@ltHOe;lQ!z3@&m{5JcjgjWxmDyBb?Fv=y?&LYD$hjsX{+oT zu^_^_*J<#*yySlq$vAia!0reQY*AEr5oj5L-KGlON5B&uZuIyGbvB+qhwp$L;#oxL ze2{^C`3b8-j_f2B1^B#-@=AjR*DbvpokyG=ij}Va1MSKtrP>i znyf&2bN+u~rRv$xkMv0X^<4L8q_^j5Z1qk+dPn|0ON6r)>C5vso=E8pNRNUcG`56AEQnf46+b?D7{*PUd0yEGTn1_|Y z1P?@oQ$*yx+ohqXuymM7dZH^*0VKgyAby9k2sZsUvy51?pg?2C3zhhrs0S1Io7yhi z46y}&>eNK|R;Pf8q0@+0VLg{C+&tLBecqZ;fRnaBDU`CfQg}pb1}4pjm{s1Bwb?f>j*t8NL-wpd<+akzKe4T)PElTYv?0Mfv-fQv}A3-LR87 zf%Imj@wG??mknqrRNRe5!l7#2aA+JKO2MIV6prO_+>c@vW=hgH^7vaQ9mTv}_&$td z`|-x#a7^>^xASJ0Q1Idd_Nmq)9q^iXNT4K*VYrIuyEq-^fY!wz2yvRK z-<*Hq`GoTvq;JW8?+8jakiI{EE06fiNIwymDC#CT%A{GL?o)6U6ndbaxXH!eq&Q9v ziAd@=rIy1XgG~gb;J|mMsr(aKfy90UNIKJ$q%Mi?uA#RB_`{TjNLV)G_!dq4FBIpG zWuDP>F2JsUZ-#=!??=H$c*n>g#HjGL0v8-d1)H`K2kE*JVBcEC1tU~2ay}KD2?hhU z{}e8`f(rc4q5-yDYBZ@Jc-k~7eC{}|@mealdW4$Nx26|P;)3^3!7erebe9OQpJHA? z?q{jsjEz)-u9E>)gl~v~?@>YEfxrcV-lE{wRIs>2HS{NWOAKqM!MmKSJOJe<39+X!W& zDACHBU%?xiyx^z$fv z+=?Glo0l=p%E|diUrOmsxfL%X5C00Oa0wB5E~RrTo5Ay$o{O^MLk0Sr+p#0~^A5rl2A4a~HWJBBkA@cW*`us!4 zKR>|#SLB~ba-#G;fc!7|kZ%aR-$4FXLH>T^pQQR){w3s#wS>K7!IFE#Z*PUtf3V)volvklU%b+`cPU zEh4)2k+p-|qGpTq@^xh7Ah*cx-;Vrs?_fFE|M+#QE+PHbeji4j?b?lG`+$%9YtKfx z$vN_OtVDjN%**}AUr6(y`7a@VE$Nx&??ax=;Ty?hLhg~j=PZ<~9)1w{_aT^M`MZ!` z1H)y5WZ-=YJgl-!s$8J9 zfAwD!FiH*Kv-*W+jBujL-vE3~0nm2-tUlq)5l%S3O$zwFAVjNopCuTh3g~}G0pC`@ z@9sv!SDh_bFf;P$|Aa!`q<|wojF$k+-#)@w%rbutCu5H4&sVr3<5Nk%%5z4zhQqi< z0q=t)rqAk4=Z|n=l)s~>|273|&I#mpP_X)~7mjf5bj6DLf2wTX%YNE{(Q(6 z9d+plgWf46(f3fa+JG-nVATJ6MY9%u<6C&vWzxd&J%atLk3pskm{;Io-%zZJw8_=~ zu7GD-ACTgYT`o=85H3Sg%9HPDk@2MIi?&@6ul0Ig^a?G4o#D@2zUZe~^ctmb?BgK7 zfNK^1A&-CT^G6tHN;x0+Ok3Jl)PJL*o1AUzihkH53G}o^g%eT#YhECf7?)mZO-KD7 z)FR{3Exu^}l~T)C@ljtirbX7^w|vo!T4W9W4`1{jiK2O*aFg|iM9~qhX!Y`|gbd?L z|1}CQx}M{3`|s4EqnYthw9|@&6a8OIl)pAn{)m zNJDyI0_liPc1TFne}^J%SDG&FL`uwk)c?ywomb7F&f203%li5B9O}GV>kKPx4|mpy z`X5&$6P7<3QqBnhEV+o|*e@bD&yA{dg==e0G2Nh{!B%kxskQSClxYUrEX-HcVNPm-t zbWH;3GigZwkU;uL8q&`aNcm5vuwYdsPWXvwNEarMcBCP_B7roUhV7ZWq=ESND!O)-Rj$TcmANQHAt>2MAzqC90za`LL(H(v1c%1f+bw@ux zf&R1Z=&wqkFZpcOp?*GrzNI_*9~0;^-O)Ep#D{uEcl1UA{afA9-=9GLb9eNgCD2d0 zw<~A*C*!ogpga0y3G~-=N8gt~|5SJMuP4wS?T&sxEl&H2&vhN@=?V0+x})z&pwD(k z|7ZgJJ>AhCOQ3(ZJNj`~$A_A`uj^1t3G{W{(ch6kAMK9*U;_P(-O&%)ITF#wtk}Kx zb)|hw(Qo2PQS@U%ryZ>t#oqb|mmH<#|J%x={?igg%RcXFeME~6(^_kN(Ki!C=lY^U zr$!jRqP42N=&M>}WbE}tztSS>>m9x*KP?Sf(I>K>87Ohc6e$!0k7o|}!g{z!N99g1$PFUMFtv58c4*e4UMClGuV99w*i zQ1aW}h(B8)`KyN%c%8ta{x2$^s(^QbfWr*9O@Y2$PNDJBcaLzHReO-C88EZj>d$Gl z+qL2TEB8n{i+TidI1%|H1uj#p)tA3mu=*4b9X6?uYYgS<3a~n8X7F06HEXq^Bc^6* z(ZIir;_}k6O?a~iEKszhhra0)?BHi0aU6di1~5gW=`e@^pPa{kdZVMFo<1u1fR!wa z`ltblNHaPNpSkLdJzs`(Km^O;D~r{}iA{}~sYmz_rl zv}EM=)sOk@b16p!z57P7gL{r$ymaB#g}sXp?pZRwZv~2ui54zA z4FFU)2uZ~5H$~?x#j)hlp5Da^4>)zT}+vCmTm^p{2+S(PEi?op&>7z zmZ*`Z_4F)QxMSr7E6-Um0O%slsC; z(#F9@g1of{(tMz8fh}DcJ!=)7!lR<24y3~6gP@*Tyn5Bfg*4WYm2ca+ifB0G)QI3K zkz8?{8`ElxX=RYbm{zTKr8y9MD6&c;We-~jW-gfz=~);_qF*4?$Kl5@3y(M)Rfw^i{^y7?H;u5bHZyG!HWsy^N-?=Z}jI#CH#5Bf`I)wXJre zSzX&|jJK~TA<>wrPM4=@t=8HLk=l0tITv5NrnmivCs((nI6ZghE+o7bDq?ZXd1Fv9m{>;)BYU-a{@sQk(zT5|MOZnfEJV%FHQ-rcz|2y5%R%5#OLNyPFPxX#)|Wfx z5dFIn@Y`VsAldoc^&%wyL_%@{zUCF4h3^9jl%AhEm87O{L!RUe$YmBH!tKrX)^A{` z>pkM~!i|sQW|#H8=GveCJa-bbzfx+KW}1zwtL1jBFQr^Q zU7T)Is;y{xc51BJEH=iA<;E;*K&3cUZB3$}UTd|Bm6>R~R;^cxGo@x}s@eu-tJ;pL zFPbe;!>wYwQEWBpy8y>eWH)QO@n@!0Y)uv0duFQ9>C zFO{p&u2QpB8mm_Us8n|cw8Tkm`3})L6BJ=|s5n&|hs6TDm8iPA)-JY76VX^>cDhn( z?!kbjD>Wh0bu`m%3Tb}arOMTy1q@Nfw4#}6yHzHFX$-A$sa~6&0JK?cwPu^uu~Mtn znr&5^(nM5l)Muxriy&cENmHqgX{l9aOLY)ho~<*l$4cd$ zSnMjr>TDgNSt(UbN|{~lX0^)VFWf6v>-DL+q$lbf*p({STLBRwc$lCWOlM=ZJu?d> zV)cnI(&ALqYRon_?y;$CZIjDe5B1-TPpbISIq6m15R1`t<+&AtTbQ;8S?4!u&@MJuZFE*H`hh?hrRPemSu0Q0pAj#B+HCqidp9NL9N5Q7$26qj9FJ-JESf zq$ikx4$GL~81B2~c_B%g#@Yb=E9u-jY7*w9JT)%*(h{Pote2vMW;KO@I>}=G#Nv4) zUoVYS>ro3lGp0cCYBQ}yO(gLt<+?THEUYoX4axv+Y)(3%o3*LgDYLCA6U7-wJgh6( ztDR(tMMkU{U9Myxs(6r@z&J81L^K-XvX+L5yu0Y;$7X<8M8@2Nf%!dEg&ts$l&-kd z@pf_DQ0h9Clx*QT@P{`=RBL_Iu1&$%!Rlgm#Wv}jlpEFYaX9tRZbsec^^|Dh)rb~q zroc-Ac>}y^>ugdlr$hv$_0>tMxeLQlyU{MyjW6nhR4e3=L@Y<;Mx$A&O=HNdJ)mop zu)8JMoFSQ5CuJltfzM;Bv!90b=(Snf1p@=KB!nf`QQ{r@XRPu(eD<}^MVYcE?!?tCP5_C4U38BMmVwCq;?8^ zW1U1sx@}KZF|}S`ytQ^3==6uzcr1ocQt}?zDx1bBXB|z%YMFCPX|qi;L(?0xloumIyTVPM*3pC*=%bqJRWimEKBm(gmq%;Olty|K2t5%phr9c5q6zt zlHT#zY4*5_)m^2!`pD5(W!$U_ZLew7W4DNeK$>p(#m)o8*bI{rU>p&f9+Eu+=#0|T zkZj9z(~wRH$Tw%$TNAD3rH3aU{%jEoSrenJny+q-6%^2$4zFy^7Lr5SGGBkJ4Cb>N zq|A?|tJkz`vLPI{ph5rJ0io)oRHt{pS&6D%l$*HRD#`ms- zQ>?}yrqOJUQ+yO`vdDf2ae?VEYRTzkmk@de(-Fa~gI8rbs3rvFC8(P2NY`{98*Z19 zn+Z=bjaDR1HV5NPl)-n~6Hy%&R9WO>n&bThRRLE@R)MyWTr(+`vM{-s;$>RURUX7% zK)9v8!_?(8a}{&jDC|QZL=obF!fs3&WRNs7!iKpqRx8mAc-_Rxf~cYykFY=8h6^F& zV$a(Q(sSyfjb2S~6ClP`ugP7ytu2r7B?gY}E;UWHB7gTJ`jupijZed#n zeArt`i4*8M@NDKLctsfA7)`>IG_d(nGs#K${y zRVo7`8g5}|h^$&<6~J!K6WZpxCDf~GQQRhBX0ST(c-(5Cof2O~DmqM)=Y%K(+^v|u zRF`7Qv(02!~G0wa zlB$~L$CIFirarXPvXto_R#&A!u-z_O)~!$|jfocAvf!ATLr(*yfjtoK?P22C5%GSf z^V-E(bYo%yrK!fa&MVcG&1)dKw*1-L>)wHklnd#!8#7qcCuE=N85kO3bLn{B5R*=( z1fv%1RuPYd+l)-Fpl6#eUI(BtUK=|`uJOHuGoYMiDHV_v@?}77Fr9y;-VKw!L`-UWLmwogcb-c zPYuM0-GU}eb>uzb`*nrm$x7=Z;l-Q{TF<%?JI-ABXVpk+_QfV=D z;c!|xF$Lyfu@W!E)4)3{+TTIIMYci9bh`;-L$M@$l`4KU*4eKiOk{em&QyFFc*HT@ zx}BT~Kg6_!@Gkr7DvR29T!44eys1Oj^6?!G3YhBilprdtOBmKi9;LL$5>Tt`cC*3J zU1gaFiJwyF1sfRfK%>Fx$Gh6L82D8|?XoxYEXC4!j4L{FTJuYYi1S2}M6wKV)@>K! z>nMpwFeMt*;`&TFk0>-|{&d8tvl{otxLI@&9d0Bx7h!}?$CT)a1}ywbSr?$m7-ukL zd>~_IFRmqZt2wV>7@ZPhFboAc;+*K-f?g2lN!wpJX>|fbteb7J)D}tjMa^~ba-N>&R9sL4Q{r%i)|tsYEd(U$8m4gO z1(Gt$QFUxNCmT2+b6QNM9rEBzx7y%{d}p>WVk-ku5LKLRQOqW2B}2NWBm`EiFm-lN zr`+VD7e{}oIaWhVsJUmR)Se6mC@Yk#U$(qz=%m)d;R~5EIL)zroy?XO86P&|*<~N6 zV#DA7W?;`%sgy6CQC6Rxz0p^z9(JJrI%Pre2go~e#_5<~`Piy_lx zSAcC{#78u0UcnPTSw=pu-oZ8mn=@ss;Oc>Ja)p%e4bD9$p*#s^o-B#QcSQJNPM3h< zy6M~z9NgJj-nkp|M8J8cgK0mooz*>K>~(cAsY_o!PzrW6EbOJ$((Nv?RDbsfXrACRP*9Gd{M^f z6jEle?f?QpaVellcMd2-ZL03#t#0tG>FVrMX?mL51{CfPqJf}ySh^=-JHv&cOM~kf z)I|_T;GLW7zBp`6cNNr$5oQrShlWJs;huV09jUR44e=ow3%nR}BCSNH~Ia#ixRYm-GiP zWRBSC>KvOcYLDYvSmmJkcGttAg_9+CQN*rV**Zw5hBI?%XGq+YpE7nxF)OVUG1Y@T zDurF`pwUy5lf)Q9>ecbK-$SV^nFPg* zE1N>OS)(fnlkYf#CgFeM;t6Z$HH~JyB8r3M%g*@&1MMZxtz+)|*YmQ4=%3xMXv{!( z;ea8$DMxo=dY~Bo9Jqu%-yWLA&NAor#We*2Z82d|8q+P?kHvPm3it*7! zHzf#+CWQ{x36oGqiS8yy8f3a)^rb_RA>pTn6`X2>(M4)s!!`AwTbe1m@MV1_WYp_< ztQXk`vC(tG#b~**vqVCE#8ad3W?a;RtkAB9&V$8wV;dyWnT!+LQVHT@+@8x=OY7MD zfO!bz3OHujQ$p!%=OTBHh!-3`$EsUoKb@FJr~dj!bvL5SZ3&%7pAmWIwg^y*+Ki7k zCKzhof!$wB9+)^4cYNiGbm3}%iy3s&#rW(EK6jODkbPkZj>Btmk?~;Q&OZq|aZ8S^ zv`(;y9=X3^!U5rR+fUOA+Ygbai*|i?ZZ1iiLMOq`t+m?@Rxn>`J-7{P8rzu_%qFn` zoOjEPX`pWuOcYPY4KsPrpi0YkATXK<2v{tx8?41VSQr@36{pFiN@)uFo5pM%hs|c6 zJQ;3mZXvDVwv~o5a6_{$r%HIA9?40vOZE$#0O8zez0HC;A;INq@ zOk4t4j{L0;y?Mm!z$ubI- zk;mPsvUbgkd?aItT$uo_i%{akwc|iu)@|rCkE1pn+@7Rf-IfGXz&o>6?ZvK(#8rsE z(s5&nvo{u^aooJaZNO?rRKeLavHfzjQZFj&Z0e4SToPI5I=2F;7d`w8JMYM^=Ny4_ z4oT=urn(3`u>UX5ZrF1i;iDTB@Lw*42K;jSRzEHaRGxjo^9J+@kl~@B%>x?-*AEU2 z3=gf_IJ9x-lz}x) zSZlCphS%C!L*bx-wX?0}TI`kAPL#`QQMb5p{TeK+v%A+!OwX>}uom^o_1OyUL&CJ+ z`igD>&9Cy>L5{V#B_@4PO;&1W<29VZY$w?%$~7g^^A2n4n}^+PMY7qDlLtFRK}=_S z97pKMunVtjsyuQH*@=sKr-9)W-UkLrT^9C6Z3!{!X6vOJtrJsKx{hI!8;YCveqmq> zU|ve^MRlYcK+DVvBe=tq6ZLl09891t`R52D8dcsof{^5Aj36fPdNQ+zK7 zr^`kfrruw$!)}yngb@pyOKzoeX-$OiJToN*39XTBys84*J>s(onmfzyya|9HA{;8f zQ`U2G0n`{d^^XgZJ(=VDU|C;frk#yqbI6=-MGnZKEXq#06k|VD3kteAG2khSX+-?V z8)k?M*n1A#J*pw-3A#QJH{=rNKIZq@f0jP@Mm4SiJC> zSn*voXRCQcfjBsR!_2vDAOaKgC=s3Mkoz&Qr^CL(aEMvaYm*{7q)F!VnKH>-ut{KH zqVedgNhSB-D{iE6B(~Ga2e#bpyLcdC^z=?4sW3*y;jCovg@Oe}v-33F@-Bnqn?*Fq z7HzU)ZJjsW5b;njf*?d1?)d8gv8-1youJ8MGs5JjdYCqRT6pw1x!{CBWIKLF89VFo zLS|>hY_;tCgr@`3Nv5A4fZ;6?9SW*dC?f{Avp8KN&%p24Ah2>~nRcY=^eYznfKJh# zQSSF?Ai-gJkroxBU5&d!V(T&&sX2E7tVY+zqr6U&Ux8u~D^%D+js$IZ@c0`aa7tgY z0*B}Ez6rI2XeBK7WXF~v2~?21wF@48Fr;F;gMA*CgyL#?ViK!Mu&H`rMwBMiXZb^S z6R@6>IN8~T44W_P#n{gk>26QRsaUOD92OrFhkOhGAZ=!nTQ3QsZCb-@{t(ftC%r+ z=+udrJSK~|h&ud5GiNe=_JmL{ue4Hm|Bkur3G|P=1!h1`D5ZBVlraIp*@r%TXIEZn z!|ogA7`eMO;1)iAmBTOgGUk|d;qXU-RM}$%UM7w|XUkRc4{fSro|J8A^*Kj`F7SA$ z#vcMY{o$}X+z8}UH<#oMmi^)XUQn1*@@T_Eo2Uy{v~J0pYOS`!+~tT@ROyA zAK#en2hu8NY+ihbF4>1X$qqZrw<7{(Kq?#81p7XgySQ)YRv=rq_^LABV8ds>p&0e=SJejE)- zOfJ~d5DRTPCku(53Bf*TxAd@*mnpBy!Pd*khBTqaAl`ozH_)+*g4gVE@FtNCK>Wz) zUXeK9B=SXbM<~)u?+ggHKfaPQwi`!DF#_mVLIql@J3@&qy3GR-aIiRzVeXjUk2{$r zLGf!cauTCJ&;GIUKs3!{TY!hBfji%u*D zxkR?bBL1So7GS_u);&EbBVu!a+1%A}OWoY7FF=NyX72S&Q5J#}fwVo1^KjrX(&j>^&G8LJ(?8*jhcDZu zp+G8Wc@ITT{nEgbkpR8hTZ;@qM)mf*P^Kor`|s+fhl1zU3ky6tR>k=p*rJ4!Kra+& zlxIV6VP)ZCRQL3K$_i^eN=Q&x%K8@<{uDE=66WSHR5~_4d?UjwCOv6Sp0>xroby&M zw5rm7%wzGoW0x_UfW~f?a_hSEVA{l02XR4VT zPmQP7?jXxUtZ-XxM?=P!6)_A(N)zNr6vyRZD%41x-^Izrk}R%Dscw#d#W8KSCejjn z9F9T4KW|y(=pp1Hqp6Bwwm1Zzxu&y|i+h1BW*Fb>;rd>wRm;83tApa6uG0XloMO6q zyhjQHZQQIr+UNy63@71GSVosgE#KVIBMjG5;4X6?s@iVr6x(9>{Gao|)t#^^N_5lvg~{1zPAjtpW-bel541zzxJjpE3;$t-Ct zxjpcoa0SXwkh{}WYEFc%v~!E?f%Lc_>PC&8=b%}k*1d1W1kr=)Dl^Ul_neF0IBR0t zfUC}OKI&;x4GGvtE}8JqMLc+t<)*89L@}tLj1PK-Wf3ur^9^ic2@jkTY3R5ir_=1|}dN&9Q~!Pq9_cksCrO?11>a$V3O1_?8?G$rdOUN^FOu zmTS`A_G8|VYvl!b7tsqy=tsr;n3&^CrjCtCQWHrAlLuh96x-etkrJ= zO5(L*^6E;uHvA!dO> zozcLC+;eshNkz%quK|-u{ngJxgWmTeKE!Q_N>W0v5}TyDJ()v$Q+5)-A12%1RKpzx zTQzvU7{R>nituP2PBGbUhD(ZA5?DMj?8Bqfh`ZiLTTMP^^}emMSbnz11z}5PQYmT} zI6+LAZ^OkbnaB3l$tg?Vp}X;Myz*+IL3iWSFoFHW7gw7Na{54ZYi8J+(P}%e*uf@N z_owOskq874EtwqA(T=q{u-1Y{9q1vQiJ+HFU6RxXBR`t>5xK}79}oDe=D~5A+b&Bl zI##SAOe_fp1x9&K!Wlv1?Wi1?>AL`MwUHgkn3jkEa%>NH8I2kE*OCbw@9{lVHSfrffU^KsT(r+0MoCH;JAZoW2S=gB%ktj!u+iS}J zJ?EY02}J_7cL-ySoqu?m6*FLrtvEpEjgUSh7~xXmM0+wkkEfN`_e(jUk;$cHknf-- zcjaUVEdrgiN#^h9=A(0wfcPiJo311-vgQPa-i4K&DykZ%b44}?kAO+X zcwQSM&~+!TRHEh*9j2El=yU9BKh2NeVY}PPTDdW9^GWK+KA!B3NzIiA9o0J~SW)Ozjn1&6Y5#63i^-}xBhDoYL9%Oe5qO?S!&5YyoDEiDY>&|m z-|LsH56hcvn3!odfb z2Wd;1(?DF(=C=~NCIfpZqTs1vO5J6-b_2e-f1|OTs+iELcVQ>$fo+fmaq#Uz(d5sv zrpqfYllsC#^{k+*u4B#)`BG9)nOrB{5+&ePT(H#^H+Qd2O{i}uR1jzeSJ%x%7@kWq ziF`rWBj1jjId5w{_ocRzEX)EaCPaz$Jft3;`(`FwdpZ`a<2xi%5wF_us4DCRmRCM_ z#{pO3`T+^F#t2B*bT;&UI|#(A(*7;*m(?p}HFncjArvwx1+oe1Ytrscr3X}0-iGkU@8D0q)C0Ys1OAxK2*f;NL*twUN5kh7Y(R!J7@RsjRI-%k&yhzB7$!}uKHdv!RF>cDpbq<5u)d)w|EJnW?>1|$m*Tb^}M zX$<0rH&Vg?*o&LZ{J=!H`@TA%79Q=Apj+<&Z%LP;?iD zM&Gc`o|C&0WG7zE$!$dl-t8$OLW1Y1=v}Xg^@_!ThwdLML>meg)MU>LqDY(|J?9)hu3(T0y6KvVByaZQXp%laBR!#&LVw945kDzl!HC7 zKD6li;l?bSyceA(w8I}sH9VLKx6{=HIGpO3d*=HDi<4nO?o;{aCev{{>>G}}y{?3Q z4#&opJkGKgM#?OS1(397j-2tzexH6Lr|YK|zoWA`H`0OAiy!#8Bo*EpwNv5qqFYko z2ShjZjzq~%ZYky@F-JAwr6+Q9hH29&>z+2Mb_UnsL?9&^qj^!=W8}(Z<_O~}WJeIdi zZ*+tuV}E<2fmoh0^b1n+qTf83ELg;4oqWSDWlUBLCSwxc&;HHd!% z@7orKp8q(i%7Xwc13?!`}g(Hm-ZLolCWyD>nmx&*$*3 zC+dqvUp7M7=yLv!qWkfe;P)t;_(GrW;2**7Pr!eu@P`ucM-={O0={42(cTfHqG*7> zqv+50OYILRyrA&;U=+cRSGdu0u);Sd;D;%ERN z@s~so-!P(>^5<%Xcghcyrp?PP>L6O$p}((Ecv9bQ<@P)E@ot89>h-6%olZOR4ZxRB z*NM*`GvFI?>G-=CzPRHT0j~x8V95E1+5wx#*JiZywG8;<8SsO8)9D$?fRAUuKLGf_ zxm8giVXs!>_w<%P??$(dFo)=O7U}az;16&r{`K9A_7BI;<)!iYstow88Sn=(;Dh+_ zz9muTx^oc2<1|tZKj$ao()9@J<vWW2K+}E@WuE|$u$0qWWZ-L;P1(R z|2yC$hdUB-_^S;3Lon}sQRljLG{X<=kdw85Q~RUZKBkF3r?LEKCiwHB4EQ@T;NQ)F z|1tx<8j42r%p~YJ1@JUJS2EzYWxyZIfG=7g{qEI%+3aB4#{iz%ZwCAZRO|!&o8LAX za4m}7mVy6;4EW=K55!uK%%3yxhn^<%-<*(>(*aMTe>MYtcLw~I8Stm$*FMwQzbXTM zeFpqP8So!u!27U(ruDl4aFU-p6Y_Ir2L4P2{9W44-3fl)oq_+84EW*n^QtNHcsAff z=Y5IxFU!EcCIkL=8St+HPIe%g+I(%!fbRyJ=JA2VJiaOe|5F+8#~8ji+JEf`OG{N{=Fb`U z8xNL#AJ%?%DE^s%r_sMN1OCno_>VH+{b-!VJM`93?$OqZb%3Y!`+KIpbKhFaz`s2M zes2c+FMtz0BT5gwhZ`BGvJ3EBJIy4=Icbj)A%#0_CE#z*Xy@A*@PojDw0_UdfWI;W{=p3RLmBV| zho<+tJp;Zc1O6Vs55@{RbE*&|o<#7SG*wQSrQUF21B#qyq+A`oK?d;XD|>L|Mn#N(&ejcWtmj=iGR02~JpX zn1){ga9f?ES#Zt3b+Eb*(@mcFG>V>^Cktye_UvA(|Y_66J58&S<>JJG_V1` z=2$GAb;?LH7@a z=`S})Ri>+ZO?%seoa?w#=497&zea8o;hkl4$Tz%>7?ef6YljZ2-2qyXs0nQg$M86k zmX}+MjGTSeg%@3N(UuE}>jsCSVt`Y;2A999-4OWc<|INUk>Sk_{R!vvpf>cyM@- z3>w}pQ7)ESvuwq>2&xTBudL%OK`?XGj^?tsBBzjc@XS;Hl$>PMmV-P0R;;J2g`@bI z{oHP2d^ZSH5z8XYMmG0ZN(x)RlP*(>_tG~f@w2cvWSyX+d=S=!-zhrh?Hk{CQJb)C zeK-3ex0+%E^2xIr;^G)yh$!i>%}w2!jGynuv^a~!Jd-gZvM}SfSNIl{{-E;&*aaB| z*ODTf)t1Oypha@mlMD{Mv&w8LerL5z(^0HV;0;*SZbLUwVFBpATu5KIT!K3c!4E7y zr8LI5OVcM;$}s%y9je(%$fi~c$4k#9kb>0f-G&;oM2UsT3u3mo$K-cTQ?DEgaow86 zw`J(39O;>hl;v$bGzm(DcMbDnFx>_gBaGEU=Ok2s4c%H03nO=2^yc9l%uG@ebRnG! zFXJ*12y}OeQ2Dpp`Eno0v$rzSy?RUnI*g;68gLIwDZ7Vrb|~~_hBPYk-o+FOzvpCV zI+*N-8~2bPNA%|Z>7Vj`Y_ngK=j)9$KA!9d7LRg#0q^fyJk zlhmBMt9X&Rz}s-;iCz$zJv!B=Iq)HCEWFS>g+VYLigd}!f{jP!z?=ao$_rTMq$@(8 zIf`*vnL|%@5p_;|sX!)K|J2=(&2v}aq`J4`p~7_a&2+{7tC{0^jt$Z|@?`S5%u0L~ zTivLqovRaT>}Se&awUE9naQ&F(iK|c%qmW7h|4ZB=Shl>FROm&5J|wJn*kP~B+nr> z9uU}l2@UpuxLaDP$W)_Rz*ib2T(Z_*X)pZsc-tZA1L#UrD23~~x-))Kx(`N}V7-}! zy6q)imE0&}5V755mTRt}FHeQZt<%t|bP-=Sp~N?rNlJ0HQ3|cC*V$}*9yOkI(;u(I zqag_ElzHt6We8V{XX^B3$}XhG_crkCg_pFkdCLC%Bz3{%ZPuI>#oSna1fBd54F-q{ zO>wOFY=*<7J;YOPA!P44XL>{c+>~a9aOON~!KLJC8(j8lTueE-ZgxfJ-P=k<8Z@91 z>>88tGOasjfs}C1rL5A6B`RzMA3j5cwHfTPZL*Y7;75~ew&1S>wy5q@H&r8gR z+t2TI1WKI)f$ajvrPH=u*~Dolb7Dixp9|$WOO)L#(qiJ=s-(qoBXB#V@+2MsE7Ji| zXQZ7%5n26-M22HI=R$Z?2oM!vJt{GY5tA~9pp-P~<}DVNcuL($R3=eyEm`Hx@lzBg z;je_NgZ|7T9uUVPiQVMgEL$MIPra>Rk`ch7m|eIWhuVjIYM33K!%lwgE<`{rKU|`G z3Oiiabw3|BXr_4*=QFhnTO&)5pb^VSRXH)08kWAg3^aXm7Bn>4 z)I1>E7^2$IAmkWtye3$6Y<2?mO4E4Nt7U7`;|)uf#_&R;U6!Mj+0x*d9M1ngeB-!0 zqB|~jk9c!#1i1*$74e^rCp+vujFd*v(MaIRiK~A}ZUngq&mZxhj=LpxE-s}}v<``| zemgh9MQyEr4Cnk;vi=z;`tK*7Y#9BwgM$wCrAf8%#_B_^ITHnTL{aby5->CJs zYJ>LN)_q$4PGT-TRG;c3>%Rdo8Y0n0AA7!Q^i;_w*vGU=iG05rf5Q6q9N1p1{{RVB z@WFLF{@CBQAQ#r(v2}#Ycj$nOUIyYTnZF&du>R=Q5kN2wt)Ejm7>FstS$fA%m+CF>uT(f=(k z5KMV~%eRrNzagXkbFUK2zJ$Uh>u=He$#IrSf_ZD%_Z`x2?ckcTo4XM6Uw{%pZNlRH~K$iA8E2&Q~L^aH8?C)}S4Kgs_84=uPFTmS$7 literal 0 HcmV?d00001 diff --git a/FiniteElasticity/RightBiceps/build_debug/Fortran/cmake_install.cmake b/FiniteElasticity/RightBiceps/build_debug/Fortran/cmake_install.cmake new file mode 100644 index 00000000..3889dd84 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/Fortran/cmake_install.cmake @@ -0,0 +1,34 @@ +# Install script for directory: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/Fortran + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "DEBUG") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "1") +endif() + diff --git a/FiniteElasticity/RightBiceps/build_debug/Fortran/fort.1 b/FiniteElasticity/RightBiceps/build_debug/Fortran/fort.1 new file mode 100644 index 00000000..e69de29b diff --git a/FiniteElasticity/RightBiceps/build_debug/Makefile b/FiniteElasticity/RightBiceps/build_debug/Makefile new file mode 100644 index 00000000..5648c17a --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/Makefile @@ -0,0 +1,160 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# Default target executed when no arguments are given to make. +default_target: all + +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target test +test: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..." + /usr/bin/ctest --force-new-ctest-process $(ARGS) +.PHONY : test + +# Special rule for the target test +test/fast: test + +.PHONY : test/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache + +.PHONY : rebuild_cache/fast + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." + /usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache + +.PHONY : edit_cache/fast + +# The main all target +all: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles/progress.marks + $(MAKE) -f CMakeFiles/Makefile2 all + $(CMAKE_COMMAND) -E cmake_progress_start /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + $(MAKE) -f CMakeFiles/Makefile2 clean +.PHONY : clean + +# The main clean target +clean/fast: clean + +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + $(MAKE) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + $(MAKE) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +#============================================================================= +# Target rules for targets named RightBiceps + +# Build rule for target. +RightBiceps: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 RightBiceps +.PHONY : RightBiceps + +# fast build rule for target. +RightBiceps/fast: + $(MAKE) -f Fortran/CMakeFiles/RightBiceps.dir/build.make Fortran/CMakeFiles/RightBiceps.dir/build +.PHONY : RightBiceps/fast + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... test" + @echo "... rebuild_cache" + @echo "... edit_cache" + @echo "... RightBiceps" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/FiniteElasticity/RightBiceps/build_debug/build.sh b/FiniteElasticity/RightBiceps/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/RightBiceps/build_debug/cmake_install.cmake b/FiniteElasticity/RightBiceps/build_debug/cmake_install.cmake new file mode 100644 index 00000000..ac02b501 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/cmake_install.cmake @@ -0,0 +1,50 @@ +# Install script for directory: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "DEBUG") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "1") +endif() + +if(NOT CMAKE_INSTALL_LOCAL_ONLY) + # Include the install script for each subdirectory. + include("/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/Fortran/cmake_install.cmake") + +endif() + +if(CMAKE_INSTALL_COMPONENT) + set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") +else() + set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") +endif() + +string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT + "${CMAKE_INSTALL_MANIFEST_FILES}") +file(WRITE "/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/${CMAKE_INSTALL_MANIFEST}" + "${CMAKE_INSTALL_MANIFEST_CONTENT}") diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeCache.txt b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeCache.txt new file mode 100644 index 00000000..23c0e24d --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeCache.txt @@ -0,0 +1,275 @@ +# This is the CMakeCache file. +# For build in directory: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C +# It was generated by CMake: /usr/bin/cmake +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//Path to a program. +CMAKE_AR:FILEPATH=/usr/bin/ar + +//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or +// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel. +CMAKE_BUILD_TYPE:STRING= + +//Enable/Disable color output during build. +CMAKE_COLOR_MAKEFILE:BOOL=ON + +//No help, variable specified on the command line. +CMAKE_C_COMPILER:UNINITIALIZED=/usr/bin/mpicc + +//Flags used by the compiler during all build types. +CMAKE_C_FLAGS:STRING= + +//Flags used by the compiler during debug builds. +CMAKE_C_FLAGS_DEBUG:STRING=-g + +//Flags used by the compiler during release builds for minimum +// size. +CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the compiler during release builds. +CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the compiler during release builds with debug info. +CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//Flags used by the linker. +CMAKE_EXE_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Enable/Disable output of compile commands during generation. +CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF + +//Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=/usr/local + +//Path to a program. +CMAKE_LINKER:FILEPATH=/usr/bin/ld + +//Path to a program. +CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make + +//Flags used by the linker during the creation of modules. +CMAKE_MODULE_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_NM:FILEPATH=/usr/bin/nm + +//Path to a program. +CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy + +//Path to a program. +CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=verify_mpi_compat + +//Path to a program. +CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib + +//Flags used by the linker during the creation of dll's. +CMAKE_SHARED_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//If set, runtime paths are not added when installing shared libraries, +// but are added when building. +CMAKE_SKIP_INSTALL_RPATH:BOOL=NO + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=NO + +//Flags used by the linker during the creation of static libraries. +CMAKE_STATIC_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_STRIP:FILEPATH=/usr/bin/strip + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE + +//Value Computed by CMake +verify_mpi_compat_BINARY_DIR:STATIC=/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C + +//Value Computed by CMake +verify_mpi_compat_SOURCE_DIR:STATIC=/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C + + +######################## +# INTERNAL cache entries +######################## + +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=5 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=1 +//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE +CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=/usr/bin/cmake +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest +//ADVANCED property for variable: CMAKE_C_COMPILER +CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS +CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG +CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL +CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE +CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO +CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//Path to cache edit program executable. +CMAKE_EDIT_COMMAND:INTERNAL=/usr/bin/ccmake +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS +CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 +//Name of external makefile project generator. +CMAKE_EXTRA_GENERATOR:INTERNAL= +//Name of generator. +CMAKE_GENERATOR:INTERNAL=Unix Makefiles +//Name of generator platform. +CMAKE_GENERATOR_PLATFORM:INTERNAL= +//Name of generator toolset. +CMAKE_GENERATOR_TOOLSET:INTERNAL= +//Source directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C +//Install .so files without execute permission. +CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MAKE_PROGRAM +CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_NM +CMAKE_NM-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJCOPY +CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJDUMP +CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RANLIB +CMAKE_RANLIB-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.5 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH +CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STRIP +CMAKE_STRIP-ADVANCED:INTERNAL=1 +//uname command +CMAKE_UNAME:INTERNAL=/bin/uname +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 + diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/3.5.1/CMakeCCompiler.cmake b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/3.5.1/CMakeCCompiler.cmake new file mode 100644 index 00000000..6d451c8a --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/3.5.1/CMakeCCompiler.cmake @@ -0,0 +1,67 @@ +set(CMAKE_C_COMPILER "/usr/bin/mpicc") +set(CMAKE_C_COMPILER_ARG1 "") +set(CMAKE_C_COMPILER_ID "GNU") +set(CMAKE_C_COMPILER_VERSION "5.4.0") +set(CMAKE_C_COMPILER_WRAPPER "") +set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11") +set(CMAKE_C_COMPILE_FEATURES "c_function_prototypes;c_restrict;c_variadic_macros;c_static_assert") +set(CMAKE_C90_COMPILE_FEATURES "c_function_prototypes") +set(CMAKE_C99_COMPILE_FEATURES "c_restrict;c_variadic_macros") +set(CMAKE_C11_COMPILE_FEATURES "c_static_assert") + +set(CMAKE_C_PLATFORM_ID "Linux") +set(CMAKE_C_SIMULATE_ID "") +set(CMAKE_C_SIMULATE_VERSION "") + +set(CMAKE_AR "/usr/bin/ar") +set(CMAKE_RANLIB "/usr/bin/ranlib") +set(CMAKE_LINKER "/usr/bin/ld") +set(CMAKE_COMPILER_IS_GNUCC 1) +set(CMAKE_C_COMPILER_LOADED 1) +set(CMAKE_C_COMPILER_WORKS TRUE) +set(CMAKE_C_ABI_COMPILED TRUE) +set(CMAKE_COMPILER_IS_MINGW ) +set(CMAKE_COMPILER_IS_CYGWIN ) +if(CMAKE_COMPILER_IS_CYGWIN) + set(CYGWIN 1) + set(UNIX 1) +endif() + +set(CMAKE_C_COMPILER_ENV_VAR "CC") + +if(CMAKE_COMPILER_IS_MINGW) + set(MINGW 1) +endif() +set(CMAKE_C_COMPILER_ID_RUN 1) +set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) +set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) +set(CMAKE_C_LINKER_PREFERENCE 10) + +# Save compiler ABI information. +set(CMAKE_C_SIZEOF_DATA_PTR "8") +set(CMAKE_C_COMPILER_ABI "ELF") +set(CMAKE_C_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") + +if(CMAKE_C_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_C_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") +endif() + +if(CMAKE_C_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") +endif() + +set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + +set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "mpi;pthread;c") +set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/openmpi/lib;/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") +set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_C.bin b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_C.bin new file mode 100755 index 0000000000000000000000000000000000000000..76e2de798fc93fd92fe304ca26665decc788beab GIT binary patch literal 8640 zcmeHMeQZZYottyIEbz@|>3nwZ+P(-@2@6c|CJD643^bMCvx zAJ31i)wKV()_dok-#zEt@B8jKek{<@X0=!tB`fRv9?tWhAVX zzw;DjF?C$6e zxp7@ATpx?Z)8qByEzR}KjZ!Kht>^tl`zX7)tC!bAq zJoISw#vfI^@X*ESzx?sybL$7*z4rEZzqw-PV?TcM)q^*j)r&7YceK`i^va*Ei`fKa zLs|&D+khb(foG8kejG5j30{8(+z2Qs!~>LoT0Qf-K^01Ad+3%UFv6e;IJM ziTqi>7lNgJv5sin{0;C$%*oDI$dJ?fiS#vi5I<5bBg@wEH)A(}y5KM{wlfJh%0DaY zY!dR9IbOvSVMoC1DIwo2+9Q@3`w8IK&M|@CClsFL@--|dZ~-$0>u^jPNk&3pTznp; zwg)@aa3mQSj;6FoGT7;lCE}4_Xdo70>Xuz9 zB{g+46pgcW=~NQ8z`Dd(BtAM8#XN}(rqb$AG#+Kq_)tPkMfXM$LuzNU2t=H{6p{7nUg#R~^ce_U9|zOnG8j zv(Mbm!IO>?Sej4Srb8f-U40ndH7jMvAwPlwm(OP*tsVe=Xp%Gsf z?GCn|p2iiUoIZ{VRylnd*W1i1pm%eqW@Rg5M>jwNdzE@zpUT9XQ^{P~wfrbr!)7h) zJB9_>^C0{^c5gNo&p^47d|U(Q+;S*uye z`cCNe@B8XI4mV@zg}tCS6NiTNowA<-$nqht=@^3#h%)gYOWUvf5cG1!ZlFT;Y~SU* zpo96$_pU0L^!d|)+t|=216P%)nwR(CzNmR)+7h@;$bkanHZ&vG6+Rx`Z+IW}X0qO1 zZ?NOw>Up~xI(M)h>9+RFt@g~hjy0F~+#UbKHnU+qn^m5;rnwv5rSa&I%oCrNV_c-X&fHTWe83By)MjRzW$+cZ0keWu2}zXYH1ns@;x#?7?N5 z*51GBO9-P(D?DA$CVu95ov!^>|AO*eP_ZZr109F*2vFv8x}LH6oV8Ee0#5hAGM}^V zDZAqI>@QcGEfW=;PC4mp@j5+TXPwXK204)TIUW3a`2wgP0Xv2J4o%)ocSqpv2;3ck zPcs5z@V&&;EhuN;C63P$igyG|pVtZ7Eoil%bgx?=c)Fi06+HP@%LR{TA|`St=Y$`I z=O`vB|7bp&Kz_<9BjMixq|;?G67CxyowLeF*ggEsSheU#mEdayrF*1c^LHBf++(6M zmE`HWfcG3spVJBRl*>Fvc&*^6-J}nfDV~UjW1IJ9&MtEtK3SZnai10Zo1$FT{{O$p zk2Th`U-Zj}Z}$5)y6bue(s3>AZju@$PknQma}D2bXqG&UQqvk8cdz#}G<%vo4;W39 z@HSX=EmqkCx90ri!a^I&o@OdvmRm2y^7h<1DaOll>!}#8U}p1RgVjm%S1e!2XdM*e z_vF?~F<$BqVY!V}voVu#x3L9m(iG48XT|nS{3LEa@BbCcFU-Xkit$D4EZi=Q$;R%@ z#ZL;$Y;a4V{alR0?t^QuG1=IXTs)<)%m%xS{EuQBc9Ynz#dxWIjO8{HKUK%+G|F4S zeOShBWb=rg!*kBUO52a;n-%=svxa#=%ZR%S=c^=e7<$1u(`t>T8cQN!HFi}9{PUG-fkg*N}@vy{~t=J#Wcm#z~VAE?rGxP;@S>v;{}7L)i&6UR%})kA<|JOjN=O!R%&4!D~m z#jh7RUb+r<18x@2H~_d=yr&oNMXYrHKEv_iI+6R8uw#r5y$-m$RGj?*aI-kjJAj+T zfo8x4#(Ru$rk8}gF+Ow|aI^T(M?&5hANm+@vvxXRz|HWB+>XilIhfQ^T6$qkBN5fKxGIQzYu|3_TL@`=Od>ERyv4+M%&L zNCb{A=(hEEI|FK)5i?mXj8y$E z5wL>b7Z1gKwxAx9QhP?V&;U>^snZe4MdJ`K9Ai>Ep+zK^oq8=aEV$u#S{g`4A>17e zGYPqoP-=up;XQG%r&9><@seGUWGb477cnZ7B_pvADu~=zOk)xc>Pe85h7-VQk#TtQ z;GvXE@L-`784-(WBn(D~(^d7=rE5@r=OBndHKEbyAhaQ&p?N?s@+d*zkV&x4M`7)n zoDQEI!tWhy$=vx!_c;1rhwk-c8D$I8mw~~%G@Y+Os|;NJe-k(7@~^UdmggGaU8qm@ zLQNQ4Wso=OxxD{D_k01fF36y-LHcu6894MyIALc*hcS+d zS<;6u4o?rm+XfHmlYcWU8cP0*F0I?3JklNTpf5rCbZ>pru1kGICprI#;Fb zPxsq7q3;&@#`X)C;e7;~O8RsUu0;h%)K6iqr2mhD4C?z(7!vtc9us}EWgNe!0mE?> z;<^7B6akQ*2_ig+VI`JjAXlhQ_wO;G@6Ji;8H$$^J#5gYd-|l%r}mN=BmYx_K7CJ* z2>suP^+WnpFY!M!=#&2)6cv#lO7h13|3c`~{L%kI{X)N)6a_Wb|7(Lj{ZC2%Up5-_ zjrAWh=##&3R@8sfpl=+%-$OaxU2zX#qId)SpJ|jg^5;OO1|HHU|7A`DG>q~_{_miR zQ$+eXKSx}sjq*nRebB|JCVle9>HlW>Us)`N-1?_^m@?E)e$yOw3X-ut;)z}dnWFa7 z{aaMvMk57@^oY(uS)o4NL)}83+DRrzkNA1WAV&Sizg;kSgrZR%>ncp>2O#Dt1d$i| z#`Q<~MDhP#s=Ls{tT?#-+xd%jXzvv2kBIvF#l(F93fIF!{SoH*f7oXApIM??t1}p< Ic2iyd2Jw%(*8l(j literal 0 HcmV?d00001 diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/3.5.1/CMakeSystem.cmake b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/3.5.1/CMakeSystem.cmake new file mode 100644 index 00000000..84375768 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/3.5.1/CMakeSystem.cmake @@ -0,0 +1,15 @@ +set(CMAKE_HOST_SYSTEM "Linux-4.4.0-104-generic") +set(CMAKE_HOST_SYSTEM_NAME "Linux") +set(CMAKE_HOST_SYSTEM_VERSION "4.4.0-104-generic") +set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") + + + +set(CMAKE_SYSTEM "Linux-4.4.0-104-generic") +set(CMAKE_SYSTEM_NAME "Linux") +set(CMAKE_SYSTEM_VERSION "4.4.0-104-generic") +set(CMAKE_SYSTEM_PROCESSOR "x86_64") + +set(CMAKE_CROSSCOMPILING "FALSE") + +set(CMAKE_SYSTEM_LOADED 1) diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/3.5.1/CompilerIdC/CMakeCCompilerId.c b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/3.5.1/CompilerIdC/CMakeCCompilerId.c new file mode 100644 index 00000000..570a15e9 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/3.5.1/CompilerIdC/CMakeCCompilerId.c @@ -0,0 +1,544 @@ +#ifdef __cplusplus +# error "A C++ compiler has been selected for C." +#endif + +#if defined(__18CXX) +# define ID_VOID_MAIN +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif + /* __INTEL_COMPILER = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_C) +# define COMPILER_ID "SunPro" +# if __SUNPRO_C >= 0x5100 + /* __SUNPRO_C = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# endif + +#elif defined(__HP_cc) +# define COMPILER_ID "HP" + /* __HP_cc = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100) + +#elif defined(__DECC) +# define COMPILER_ID "Compaq" + /* __DECC_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000) + +#elif defined(__IBMC__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800 +# define COMPILER_ID "XL" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version) +# define COMPILER_ID "Fujitsu" + +#elif defined(__TINYC__) +# define COMPILER_ID "TinyCC" + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__GNUC__) +# define COMPILER_ID "GNU" +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +# define COMPILER_ID "ADSP" +#if defined(__VISUALDSPVERSION__) + /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ +# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) +# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" + +#elif defined(__ARMCC_VERSION) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(SDCC) +# define COMPILER_ID "SDCC" + /* SDCC = VRP */ +# define COMPILER_VERSION_MAJOR DEC(SDCC/100) +# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10) +# define COMPILER_VERSION_PATCH DEC(SDCC % 10) + +#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) +# define COMPILER_ID "MIPSpro" +# if defined(_SGI_COMPILER_VERSION) + /* _SGI_COMPILER_VERSION = VRP */ +# define COMPILER_VERSION_MAJOR DEC(_SGI_COMPILER_VERSION/100) +# define COMPILER_VERSION_MINOR DEC(_SGI_COMPILER_VERSION/10 % 10) +# define COMPILER_VERSION_PATCH DEC(_SGI_COMPILER_VERSION % 10) +# else + /* _COMPILER_VERSION = VRP */ +# define COMPILER_VERSION_MAJOR DEC(_COMPILER_VERSION/100) +# define COMPILER_VERSION_MINOR DEC(_COMPILER_VERSION/10 % 10) +# define COMPILER_VERSION_PATCH DEC(_COMPILER_VERSION % 10) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__sgi) +# define COMPILER_ID "MIPSpro" + +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXE) || defined(__CRAYXC) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__sgi) || defined(__sgi__) || defined(_SGI) +# define PLATFORM_ID "IRIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# else /* unknown platform */ +# define PLATFORM_ID "" +# endif + +#else /* unknown platform */ +# define PLATFORM_ID "" + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID "" +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number components. */ +#ifdef COMPILER_VERSION_MAJOR +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + + +const char* info_language_dialect_default = "INFO" ":" "dialect_default[" +#if !defined(__STDC_VERSION__) + "90" +#elif __STDC_VERSION__ >= 201000L + "11" +#elif __STDC_VERSION__ >= 199901L + "99" +#else +#endif +"]"; + +/*--------------------------------------------------------------------------*/ + +#ifdef ID_VOID_MAIN +void main() {} +#else +int main(int argc, char* argv[]) +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; + require += info_arch[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXE) || defined(__CRAYXC) + require += info_cray[argc]; +#endif + require += info_language_dialect_default[argc]; + (void)argv; + return require; +} +#endif diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeDirectoryInformation.cmake b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 00000000..10e72aa9 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C") + +# Force unix paths in dependencies. +set(CMAKE_FORCE_UNIX_PATHS 1) + + +# The C and CXX include file regular expressions for this directory. +set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeOutput.log b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeOutput.log new file mode 100644 index 00000000..2bf78d29 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeOutput.log @@ -0,0 +1,207 @@ +The system is: Linux - 4.4.0-104-generic - x86_64 +Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. +Compiler: /usr/bin/mpicc +Build flags: +Id flags: + +The output was: +0 + + +Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out" + +The C compiler identification is GNU, found in "/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/3.5.1/CompilerIdC/a.out" + +Determining if the C compiler works passed with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_2070b/fast" +/usr/bin/make -f CMakeFiles/cmTC_2070b.dir/build.make CMakeFiles/cmTC_2070b.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_2070b.dir/testCCompiler.c.o +/usr/bin/mpicc -o CMakeFiles/cmTC_2070b.dir/testCCompiler.c.o -c /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeTmp/testCCompiler.c +Linking C executable cmTC_2070b +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_2070b.dir/link.txt --verbose=1 +/usr/bin/mpicc CMakeFiles/cmTC_2070b.dir/testCCompiler.c.o -o cmTC_2070b -rdynamic +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeTmp' + + +Detecting C compiler ABI info compiled with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_3e244/fast" +/usr/bin/make -f CMakeFiles/cmTC_3e244.dir/build.make CMakeFiles/cmTC_3e244.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_3e244.dir/CMakeCCompilerABI.c.o +/usr/bin/mpicc -o CMakeFiles/cmTC_3e244.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-3.5/Modules/CMakeCCompilerABI.c +Linking C executable cmTC_3e244 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_3e244.dir/link.txt --verbose=1 +/usr/bin/mpicc -v CMakeFiles/cmTC_3e244.dir/CMakeCCompilerABI.c.o -o cmTC_3e244 -rdynamic +Using built-in specs. +COLLECT_GCC=/usr/bin/gcc +COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper +Target: x86_64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.5' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu +Thread model: posix +gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.5) +COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/ +LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_3e244' '-rdynamic' '-I' '/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent' '-I' '/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include' '-I' '/usr/lib/openmpi/include' '-I' '/usr/lib/openmpi/include/openmpi' '-pthread' '-L/usr/lib/openmpi/lib' '-mtune=generic' '-march=x86-64' + /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/ccZTgx00.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o cmTC_3e244 /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib/openmpi/lib -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. CMakeFiles/cmTC_3e244.dir/CMakeCCompilerABI.c.o -rpath /usr/lib/openmpi/lib --enable-new-dtags -lmpi -lgcc --as-needed -lgcc_s --no-as-needed -lpthread -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeTmp' + + +Parsed C implicit link information from above output: + link line regex: [^( *|.*[/\])(ld|([^/\]+-)?ld|collect2)[^/\]*( |$)] + ignore line: [Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeTmp] + ignore line: [] + ignore line: [Run Build Command:"/usr/bin/make" "cmTC_3e244/fast"] + ignore line: [/usr/bin/make -f CMakeFiles/cmTC_3e244.dir/build.make CMakeFiles/cmTC_3e244.dir/build] + ignore line: [make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeTmp'] + ignore line: [Building C object CMakeFiles/cmTC_3e244.dir/CMakeCCompilerABI.c.o] + ignore line: [/usr/bin/mpicc -o CMakeFiles/cmTC_3e244.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-3.5/Modules/CMakeCCompilerABI.c] + ignore line: [Linking C executable cmTC_3e244] + ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_3e244.dir/link.txt --verbose=1] + ignore line: [/usr/bin/mpicc -v CMakeFiles/cmTC_3e244.dir/CMakeCCompilerABI.c.o -o cmTC_3e244 -rdynamic ] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/gcc] + ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper] + ignore line: [Target: x86_64-linux-gnu] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.5' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu] + ignore line: [Thread model: posix] + ignore line: [gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.5) ] + ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_3e244' '-rdynamic' '-I' '/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent' '-I' '/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include' '-I' '/usr/lib/openmpi/include' '-I' '/usr/lib/openmpi/include/openmpi' '-pthread' '-L/usr/lib/openmpi/lib' '-mtune=generic' '-march=x86-64'] + link line: [ /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/ccZTgx00.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o cmTC_3e244 /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib/openmpi/lib -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. CMakeFiles/cmTC_3e244.dir/CMakeCCompilerABI.c.o -rpath /usr/lib/openmpi/lib --enable-new-dtags -lmpi -lgcc --as-needed -lgcc_s --no-as-needed -lpthread -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o] + arg [/usr/lib/gcc/x86_64-linux-gnu/5/collect2] ==> ignore + arg [-plugin] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so] ==> ignore + arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper] ==> ignore + arg [-plugin-opt=-fresolution=/tmp/ccZTgx00.res] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lpthread] ==> ignore + arg [-plugin-opt=-pass-through=-lc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [--sysroot=/] ==> ignore + arg [--build-id] ==> ignore + arg [--eh-frame-hdr] ==> ignore + arg [-m] ==> ignore + arg [elf_x86_64] ==> ignore + arg [--hash-style=gnu] ==> ignore + arg [--as-needed] ==> ignore + arg [-export-dynamic] ==> ignore + arg [-dynamic-linker] ==> ignore + arg [/lib64/ld-linux-x86-64.so.2] ==> ignore + arg [-zrelro] ==> ignore + arg [-o] ==> ignore + arg [cmTC_3e244] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o] ==> ignore + arg [-L/usr/lib/openmpi/lib] ==> dir [/usr/lib/openmpi/lib] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/5] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] + arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu] + arg [-L/lib/../lib] ==> dir [/lib/../lib] + arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu] + arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../..] + arg [CMakeFiles/cmTC_3e244.dir/CMakeCCompilerABI.c.o] ==> ignore + arg [-rpath] ==> ignore + arg [/usr/lib/openmpi/lib] ==> ignore + arg [--enable-new-dtags] ==> ignore + arg [-lmpi] ==> lib [mpi] + arg [-lgcc] ==> lib [gcc] + arg [--as-needed] ==> ignore + arg [-lgcc_s] ==> lib [gcc_s] + arg [--no-as-needed] ==> ignore + arg [-lpthread] ==> lib [pthread] + arg [-lc] ==> lib [c] + arg [-lgcc] ==> lib [gcc] + arg [--as-needed] ==> ignore + arg [-lgcc_s] ==> lib [gcc_s] + arg [--no-as-needed] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/crtend.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o] ==> ignore + remove lib [gcc] + remove lib [gcc_s] + remove lib [gcc] + remove lib [gcc_s] + collapse library dir [/usr/lib/openmpi/lib] ==> [/usr/lib/openmpi/lib] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5] ==> [/usr/lib/gcc/x86_64-linux-gnu/5] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] ==> [/usr/lib] + collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu] + collapse library dir [/lib/../lib] ==> [/lib] + collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse library dir [/usr/lib/../lib] ==> [/usr/lib] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../..] ==> [/usr/lib] + implicit libs: [mpi;pthread;c] + implicit dirs: [/usr/lib/openmpi/lib;/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib] + implicit fwks: [] + + + + +Detecting C [-std=c11] compiler features compiled with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_1d43c/fast" +/usr/bin/make -f CMakeFiles/cmTC_1d43c.dir/build.make CMakeFiles/cmTC_1d43c.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_1d43c.dir/feature_tests.c.o +/usr/bin/mpicc -std=c11 -o CMakeFiles/cmTC_1d43c.dir/feature_tests.c.o -c /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/feature_tests.c +Linking C executable cmTC_1d43c +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_1d43c.dir/link.txt --verbose=1 +/usr/bin/mpicc CMakeFiles/cmTC_1d43c.dir/feature_tests.c.o -o cmTC_1d43c -rdynamic +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeTmp' + + + Feature record: C_FEATURE:1c_function_prototypes + Feature record: C_FEATURE:1c_restrict + Feature record: C_FEATURE:1c_static_assert + Feature record: C_FEATURE:1c_variadic_macros + + +Detecting C [-std=c99] compiler features compiled with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_53a66/fast" +/usr/bin/make -f CMakeFiles/cmTC_53a66.dir/build.make CMakeFiles/cmTC_53a66.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_53a66.dir/feature_tests.c.o +/usr/bin/mpicc -std=c99 -o CMakeFiles/cmTC_53a66.dir/feature_tests.c.o -c /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/feature_tests.c +Linking C executable cmTC_53a66 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_53a66.dir/link.txt --verbose=1 +/usr/bin/mpicc CMakeFiles/cmTC_53a66.dir/feature_tests.c.o -o cmTC_53a66 -rdynamic +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeTmp' + + + Feature record: C_FEATURE:1c_function_prototypes + Feature record: C_FEATURE:1c_restrict + Feature record: C_FEATURE:0c_static_assert + Feature record: C_FEATURE:1c_variadic_macros + + +Detecting C [-std=c90] compiler features compiled with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_3dde1/fast" +/usr/bin/make -f CMakeFiles/cmTC_3dde1.dir/build.make CMakeFiles/cmTC_3dde1.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_3dde1.dir/feature_tests.c.o +/usr/bin/mpicc -std=c90 -o CMakeFiles/cmTC_3dde1.dir/feature_tests.c.o -c /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/feature_tests.c +Linking C executable cmTC_3dde1 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_3dde1.dir/link.txt --verbose=1 +/usr/bin/mpicc CMakeFiles/cmTC_3dde1.dir/feature_tests.c.o -o cmTC_3dde1 -rdynamic +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/CMakeTmp' + + + Feature record: C_FEATURE:1c_function_prototypes + Feature record: C_FEATURE:0c_restrict + Feature record: C_FEATURE:0c_static_assert + Feature record: C_FEATURE:0c_variadic_macros diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/Makefile.cmake b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/Makefile.cmake new file mode 100644 index 00000000..eda41f1d --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/Makefile.cmake @@ -0,0 +1,93 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# The generator used is: +set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") + +# The top level Makefile was generated from the following files: +set(CMAKE_MAKEFILE_DEPENDS + "CMakeCache.txt" + "CMakeFiles/3.5.1/CMakeCCompiler.cmake" + "CMakeFiles/3.5.1/CMakeSystem.cmake" + "CMakeFiles/feature_tests.c" + "CMakeLists.txt" + "/usr/share/cmake-3.5/Modules/CMakeCCompiler.cmake.in" + "/usr/share/cmake-3.5/Modules/CMakeCCompilerABI.c" + "/usr/share/cmake-3.5/Modules/CMakeCInformation.cmake" + "/usr/share/cmake-3.5/Modules/CMakeCommonLanguageInclude.cmake" + "/usr/share/cmake-3.5/Modules/CMakeCompilerIdDetection.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineCCompiler.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineCompileFeatures.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineCompilerABI.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineCompilerId.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineSystem.cmake" + "/usr/share/cmake-3.5/Modules/CMakeFindBinUtils.cmake" + "/usr/share/cmake-3.5/Modules/CMakeGenericSystem.cmake" + "/usr/share/cmake-3.5/Modules/CMakeLanguageInformation.cmake" + "/usr/share/cmake-3.5/Modules/CMakeParseArguments.cmake" + "/usr/share/cmake-3.5/Modules/CMakeParseImplicitLinkInfo.cmake" + "/usr/share/cmake-3.5/Modules/CMakeSystem.cmake.in" + "/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInformation.cmake" + "/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInitialize.cmake" + "/usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake" + "/usr/share/cmake-3.5/Modules/CMakeTestCompilerCommon.cmake" + "/usr/share/cmake-3.5/Modules/CMakeUnixFindMake.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/ADSP-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/ARMCC-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/AppleClang-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Borland-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Clang-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Clang-DetermineCompilerInternal.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Compaq-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Cray-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Embarcadero-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Fujitsu-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/GHS-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/GNU-C-FeatureTests.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/GNU-C.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/GNU-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/GNU.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/HP-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/IAR-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Intel-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/MIPSpro-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/MSVC-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/PGI-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/PathScale-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/SCO-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/SDCC-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/SunPro-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/TI-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Watcom-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/XL-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/zOS-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Internal/FeatureTesting.cmake" + "/usr/share/cmake-3.5/Modules/MultiArchCross.cmake" + "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU-C.cmake" + "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU.cmake" + "/usr/share/cmake-3.5/Modules/Platform/Linux.cmake" + "/usr/share/cmake-3.5/Modules/Platform/UnixPaths.cmake" + ) + +# The corresponding makefile is: +set(CMAKE_MAKEFILE_OUTPUTS + "Makefile" + "CMakeFiles/cmake.check_cache" + ) + +# Byproducts of CMake generate step: +set(CMAKE_MAKEFILE_PRODUCTS + "CMakeFiles/3.5.1/CMakeSystem.cmake" + "CMakeFiles/3.5.1/CMakeCCompiler.cmake" + "CMakeFiles/3.5.1/CMakeCCompiler.cmake" + "CMakeFiles/CMakeDirectoryInformation.cmake" + ) + +# Dependency information for all targets: +set(CMAKE_DEPEND_INFO_FILES + ) diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/Makefile2 b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/Makefile2 new file mode 100644 index 00000000..65656619 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/Makefile2 @@ -0,0 +1,71 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# Default target executed when no arguments are given to make. +default_target: all + +.PHONY : default_target + +# The main recursive all target +all: + +.PHONY : all + +# The main recursive preinstall target +preinstall: + +.PHONY : preinstall + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/TargetDirectories.txt b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/TargetDirectories.txt new file mode 100644 index 00000000..1028108c --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/TargetDirectories.txt @@ -0,0 +1,2 @@ +/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/edit_cache.dir +/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/rebuild_cache.dir diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/cmake.check_cache b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/cmake.check_cache new file mode 100644 index 00000000..3dccd731 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/cmake.check_cache @@ -0,0 +1 @@ +# This file is generated by cmake for dependency checking of the CMakeCache.txt file diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/feature_tests.bin b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/feature_tests.bin new file mode 100755 index 0000000000000000000000000000000000000000..ed76894199e5e56086defa2ddc8fbfe2dfdfcc56 GIT binary patch literal 8592 zcmeHMeQX?85r22*k8|Rj&uQAGNgxX(l^f*EIoPh7ie}GWS%*tf9J>V-XT82V+ZTLy z&fZ=cM}-=>jW{(arl1lb+COMhsZv0pqRcdOVEC%kE>SO;;%#vaXE1c?VYo*2Zd> z!d9{stO}4y_$#~wxg`;w7omy!g`E$01^nB*7SQHZxIlb`1w#!MQ45h{eMM4)Xz^<` zmP(v4i38||ZJk@hRp5hMAg+jZsDhIps_5qraC6{;Tp&It8b+M@hke6;pNQAzRX{^s zLB=}ywaC#H>Hf234CNCd&c^&UJ#z)(YTl#rTG>#Hz*ybhh$2oxIFKj>f zl78sjj%^p;{&{C}?}B9~V|QX1_6Pl{;XfUmT*^MPq{d%SvFO_sOu;g|)mTq^*U3ve zYC7Ke)tRRrsa^krg@?X$X6BE-J@f3kp;MRtu=6V`c0BsSM_%23B~ZKMgJ&%l`2^N8lnyMQld0d}}r0f{l}C(?`XN1UDmYdFf-CE!@Evz>;p-z(zK zx_zJH3*m+-AQfpJh!|fI?Ge+AJoJ^sA*S{8 zZPsFOBR-PIm~o?TbH`XZ74OrB#^Oxdv`gz11s!90CKJzC_O8|tIf^k`nWmwvWlY^L zwWOX%v9;NZflFX*dOV&=jwetivuGx(4JT3wrp05rsRNA6@@B(v-OL(TuQrlQr$kH* znz0q+SR$omGx3-`6hty1R0_eNOh&}n80l&6(ALT8G=3gfb?!fFz_9Eg5NZ8q zmnC2sdD*-e&-uDRF5&vZHAu8n%rjhzR2P=1QRZXNY?I zC{9rI_;H+H=Y9!(9}m~9>}2efyP;wIY9r1^b!tAK=FaX~{t8CI=F|@y!Gip0Fn$a{ zHgF7EF)Wk*8kYB~-});LaP+zl0;st;_2{_`s^@j}t?TBkg=h;YTHQ*BW7R+T#q)lN zv21-mIG#&E!vrslG9 zPjp>V57hl)5+{1yYco(!p{>~R@Ppw8!nu67Kin7Dzgn)6pz-?~k#FnCUG2%8jNEmW z-;<-C_|9q9^Lh30%cj(HiuxPLU5Mnac0z>wlK0f9V;=RMi`fh6)U5xZf$-PD1L5sq z?bvj&&X3?e@_1k&ZYdu}x_C-v1EEE}phN5K3itK*cCBxUYQx!7)J(v%A2-rw+MF1V zXKV(cs0J&;G!jv>6orLnCZZZHSi@1YOE(gF3<{Ha)JSI*V9lQ8zI#K!E8)NIlYIUW z;J*eQ0sayU$@9S913n8p0;6B+vEE0ZGS8k~=Gh(eEU&HhPkX9^_@2UN*(mt0K?6aE zBbC}SwhAz`_k+CzoCSj2fu)=37C!8sWE+;di6*tgMfkF`((M*w4OI%42oDOK+D-nj zsp3RBJbrn9<|-AA!)u4@G~RPUpB3en_y7J%=U8V=yF|a7_{NTo^-@FsP&Q>|r53qa z4mGxBxz_Z}rdB!BEVtZc;nKQLQ){R-bdNJcneKzx*XC7RaBtzfY%lb|&eU|ZuPDry zQv1rnJSoMi7|o|ryqdY)2OrE%x__niHH_v#DZZdEUrO=v^AMK%SS=fL8FwFB#3o(w z;`yvJe);*yieEhcmD<-A@(ZQ-V&<<=>=2iI?3P0Q#9ruw-3G1aQXE#F$eWbnw-xd! zrTFcP&LO2ZtR}HuOY!paF_!yW&Z!noPorWKT!$6xO1_9#5=ighB31A!W3zy}<$F#+xm!NzX<_fo1DyceEe~{B*gNw;X91T)8|>`wH^6_# z4cVA%_h0T8FM_bOj;Y&Q!&g}b$)eAcymt&pf)p}h5`sur&^b) zS)tX=UVtFmMU`xfY;6xmw5{FU+q(L+zHob_3#;adtYU`hpC!vEd&OOfxi3Yr=brv6 z$t_!6i)YvVy*wS0GZRTu9|CR~79S-kk%AoHIFnOpGcJeQdm2rBL}(+atUQ!WKn6Pz zV=`)^dS;Z#v56GKv$$zkCA;EA2GSNKiUwsyd`w3NA&rljOy>DI8AN#`4XPR64OgBI zl#Mh`2+HwMF@Hv55QH?#)tX3_2gy64UFlJIx7U%(9a7uZztr+sY@9e}8xB3xPj9|IfoZ%1PwIxjW2_+u>R_&o_2j;k;) zd^b=8K<7p<;UtEYRF(tD?mt+i@UlVSFLAASp*%S8??aK@e^U5Q3V&)ZMR4lRIQ;3o zIW7Eg|6nJom$2tRu-8xDK~{;1=v+zm&i=nB{OSJD`(F|M-z7)EC5Qeq(6N5btJ6oULnzYYRo)PLHChlHck9_zA`4*= 404 +"1" +#else +"0" +#endif +"c_function_prototypes\n" +"C_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +"1" +#else +"0" +#endif +"c_restrict\n" +"C_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L +"1" +#else +"0" +#endif +"c_static_assert\n" +"C_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +"1" +#else +"0" +#endif +"c_variadic_macros\n" + +}; + +int main(int argc, char** argv) { (void)argv; return features[argc]; } diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/progress.marks b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/progress.marks new file mode 100644 index 00000000..573541ac --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/progress.marks @@ -0,0 +1 @@ +0 diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeLists.txt b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeLists.txt new file mode 100644 index 00000000..f156ff6a --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeLists.txt @@ -0,0 +1,8 @@ + + cmake_minimum_required(VERSION 3.0) + project(verify_mpi_compat VERSION 1.0 LANGUAGES C) + file(WRITE compiler_info.cmake " + set(MPI_C_COMPILER_VERSION ${CMAKE_C_COMPILER_VERSION}) + set(MPI_C_COMPILER_ID ${CMAKE_C_COMPILER_ID}) + ") + \ No newline at end of file diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/Makefile b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/Makefile new file mode 100644 index 00000000..e16f9c22 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/Makefile @@ -0,0 +1,134 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# Default target executed when no arguments are given to make. +default_target: all + +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." + /usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache + +.PHONY : edit_cache/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache + +.PHONY : rebuild_cache/fast + +# The main all target +all: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles/progress.marks + $(MAKE) -f CMakeFiles/Makefile2 all + $(CMAKE_COMMAND) -E cmake_progress_start /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + $(MAKE) -f CMakeFiles/Makefile2 clean +.PHONY : clean + +# The main clean target +clean/fast: clean + +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + $(MAKE) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + $(MAKE) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... edit_cache" + @echo "... rebuild_cache" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/cmake_install.cmake b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/cmake_install.cmake new file mode 100644 index 00000000..4e329f1e --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/cmake_install.cmake @@ -0,0 +1,44 @@ +# Install script for directory: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "1") +endif() + +if(CMAKE_INSTALL_COMPONENT) + set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") +else() + set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") +endif() + +string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT + "${CMAKE_INSTALL_MANIFEST_FILES}") +file(WRITE "/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/${CMAKE_INSTALL_MANIFEST}" + "${CMAKE_INSTALL_MANIFEST_CONTENT}") diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/compiler_info.cmake b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/compiler_info.cmake new file mode 100644 index 00000000..d0e32634 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/C/compiler_info.cmake @@ -0,0 +1,4 @@ + + set(MPI_C_COMPILER_VERSION 5.4.0) + set(MPI_C_COMPILER_ID GNU) + \ No newline at end of file diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeCache.txt b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeCache.txt new file mode 100644 index 00000000..1d284339 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeCache.txt @@ -0,0 +1,275 @@ +# This is the CMakeCache file. +# For build in directory: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran +# It was generated by CMake: /usr/bin/cmake +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//Path to a program. +CMAKE_AR:FILEPATH=/usr/bin/ar + +//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or +// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel. +CMAKE_BUILD_TYPE:STRING= + +//Enable/Disable color output during build. +CMAKE_COLOR_MAKEFILE:BOOL=ON + +//Flags used by the linker. +CMAKE_EXE_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Enable/Disable output of compile commands during generation. +CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF + +//No help, variable specified on the command line. +CMAKE_Fortran_COMPILER:UNINITIALIZED=/usr/bin/mpif90 + +//Flags for Fortran compiler. +CMAKE_Fortran_FLAGS:STRING= + +//Flags used by the compiler during debug builds. +CMAKE_Fortran_FLAGS_DEBUG:STRING=-g + +//Flags used by the compiler during release builds for minimum +// size. +CMAKE_Fortran_FLAGS_MINSIZEREL:STRING=-Os + +//Flags used by the compiler during release builds. +CMAKE_Fortran_FLAGS_RELEASE:STRING=-O3 + +//Flags used by the compiler during release builds with debug info. +CMAKE_Fortran_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=/usr/local + +//Path to a program. +CMAKE_LINKER:FILEPATH=/usr/bin/ld + +//Path to a program. +CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make + +//Flags used by the linker during the creation of modules. +CMAKE_MODULE_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_NM:FILEPATH=/usr/bin/nm + +//Path to a program. +CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy + +//Path to a program. +CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=verify_mpi_compat + +//Path to a program. +CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib + +//Flags used by the linker during the creation of dll's. +CMAKE_SHARED_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//If set, runtime paths are not added when installing shared libraries, +// but are added when building. +CMAKE_SKIP_INSTALL_RPATH:BOOL=NO + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=NO + +//Flags used by the linker during the creation of static libraries. +CMAKE_STATIC_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_STRIP:FILEPATH=/usr/bin/strip + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE + +//Value Computed by CMake +verify_mpi_compat_BINARY_DIR:STATIC=/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran + +//Value Computed by CMake +verify_mpi_compat_SOURCE_DIR:STATIC=/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran + + +######################## +# INTERNAL cache entries +######################## + +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=5 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=1 +//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE +CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=/usr/bin/cmake +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest +//Path to cache edit program executable. +CMAKE_EDIT_COMMAND:INTERNAL=/usr/bin/ccmake +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS +CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 +//Name of external makefile project generator. +CMAKE_EXTRA_GENERATOR:INTERNAL= +//ADVANCED property for variable: CMAKE_Fortran_COMPILER +CMAKE_Fortran_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_Fortran_FLAGS +CMAKE_Fortran_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_Fortran_FLAGS_DEBUG +CMAKE_Fortran_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_Fortran_FLAGS_MINSIZEREL +CMAKE_Fortran_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_Fortran_FLAGS_RELEASE +CMAKE_Fortran_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_Fortran_FLAGS_RELWITHDEBINFO +CMAKE_Fortran_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//Name of generator. +CMAKE_GENERATOR:INTERNAL=Unix Makefiles +//Name of generator platform. +CMAKE_GENERATOR_PLATFORM:INTERNAL= +//Name of generator toolset. +CMAKE_GENERATOR_TOOLSET:INTERNAL= +//Source directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran +//Install .so files without execute permission. +CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MAKE_PROGRAM +CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_NM +CMAKE_NM-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJCOPY +CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJDUMP +CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RANLIB +CMAKE_RANLIB-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.5 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH +CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STRIP +CMAKE_STRIP-ADVANCED:INTERNAL=1 +//uname command +CMAKE_UNAME:INTERNAL=/bin/uname +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 + diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_Fortran.bin b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_Fortran.bin new file mode 100755 index 0000000000000000000000000000000000000000..72c256a111c52fed2a283d1058a7e5cd376bd497 GIT binary patch literal 8992 zcmeHMeQX@X6`#9{6X%2Tg-<7;|?>RjGe4*6y44oA=(lnVp%N_xzQXj#j_VC%E{<&4Rd@)w+b7w-EhXB&)Cnu~z6} ztGHaO22zGcmn}q{8q+0ZnrXR`3xKY|)8Kc22EQ&VOfPp}^xzcskSO(6D7vaTw06D2 zG8G~$0n#I1&t4!|(0*BAdO-Oxp(yJSOL|L6Z%OGf6)dkPkB`PiPmjWT{5m+|bt0l! zz6+FOsqB5tj#K^BwUPzZWrgXD4lJ0m-Yw80KR<2>DZy^l-%9fmR{k^P?@&FO7^ttU z9*tLxCX(3$RRe@2B>}agTJZ#=Hu_Z z_tK^>OfJ|Dd~s{_QXA>=gX+gFlaRcyg!El2;2Q973Hh5=z~2X6%06LXJl=8(fUp+? z|1h3XcAi}U|J4e(z;_rPN~P^|EJ?G!Q<&{Noo3uhTf>QrZKZoUn?_Sft0y)vY6;UE z9!n+7j2%ncrYX$b`^|18*EAZ-WUP#%URs&^fxdZnI$>L89F~Qd$H|Gzkd-zEM`G#N zAbNM?Tp}6EHdEtvB9%l}c||tph9DSA4`*nA?Tt<54sC~4C)!%~boX>eyUZF`axt}-UTkGrk-YF?B)b^<|=We4-ASAT2$rzG-3S}%a}Y@ZroS)!rHJf zj?CC)^R%&y$tTNaT|%hl>V6H8+*MEFU9nY1jrb7~S~#0Sx#|hxX-EstN&a!-X($Ub zl7EDFnu>+TB>#Ql>4;c(Nb=tyo`$$EE%`?9L(|}8sd=+~>iIj3saK52R~Ps8w9m~% zaAF#Br)SEE%pC@q|0)#!F;ua&S%?!R2Ha~@-3DSzE(MLL*Y)fvoxw9jro(*-fP_RmNansd;kWFsYT=T{4T@yl=1v|`;xr1^=z$TtLU3``k%Pz zkhoD1sKFWdBcKr_apF(M+BTO?~NoV=B97+}FE!Ukj?g zhsZgIoScFBDO$DjzXdyg9_Hn|oSB`Del~h*bSf9^jrMdLyDC@~#>Y8UMRZ^L)Vu9d zFLYe}nq14LKM2f!hPprUrX8+%k-ulh)axBn?>56i?&6n>$yuLq-5c50X`$cV7ri6e z7rirT&Q2G;|2tU!(w^E1wEsV>$P+1pKxup zDV$fMRyx|)uCC=RRo&)W`DyxMd`kkiYJJc|8?vs+5)&VjJ2?{<(kWa^oZ$47CO;cUP>xyL>|I+I+(`JGXtB zV3MIRT>-zIAs`wI9rZU|u-bnHJv;4jz)z$726y{@*(`NweDi3xsJ$^5`nta{Sb2Y- zB^W-osxi3zYh^|-a&)y3Y?xfr8PwCkhG;Mn4Q_7?h9L*}#$dS|H_b-~^YP(dm^%5S zd@=+7pEEGMMwgC_E6QH-8R4a`C;`Ul?nC8M4iQ1sutD*at94mZ;gP7tQB7r&d{eyD zFKZk=VhhW%Sd#~c^t2j=YAIz zzfQHQ?*8W_AIExnx>bGGAw~BqdQ{N|6@6GykGg1UYPvqWy>}p+w6ozltyYUv)n_GF z^W~a)EmEu1UG3oE9g&*)NPXlwuZd+m-NqaIdI{X0kE`8{bbq%?%CE|=t77@G{CXU#ySiupSi%dZu@UW)N``E^x{uNS<(it!CXFEQ@{ae;WOBp%G?bBgU$ z265Y1LC6m{&zP9@axL^z8Jqm(Dm0_0^(BSUrOPZ z367`SIsw}CYF`)Qn}ksk-z?}l?=1nrr&ghbj+a&9?OXwIYIGj@#B%@X9Q2EzSoC}s zvP^iyb1rKN_nz0y(tg2Dbxcf ziV#mpJ0U?=b1K{9n{1c1^8#=mG9Hojx{`FrpC!J0-l(;dKYx>I%h#bF9s5dr_ewcY z7cEK1` z<#?CN$5+6Q0N?1}v}`|qL*aWp`}BL#4(1baJ{3#8h4|SD_MZhF5`}%F#Kktu1L6H1 z`!7oQ<^H^)`lb8=6&Z_w{zT#>&h5dpow2h+L)swnR=b5Jb)|*Op+qu)#92Ca(6o|v`k)v} z$HtJU%Z`m5go=wZAxSy5g6PWeXlJy&3(l&{9a3pKcQ#xLbFJOc&K9$!tC_Nia#&nP zV%Kajlz`FPEzGu#J&n;0b5CpQzLp-dC)(K2LP|wm#ESu$s1#=N=enYu?M<%i;7XZB zT`x-NsSM#@CM)N~Wq>n|GKE>B6@d#Moh9|A9$~_jX8h0`Z2KOhEaQo!nax-jFQscs z=UdHq%#JzfO}FQT464`fLOxX`PrU*rvcdVU70;y1kytV=^TINdO7ldY!`+)o^)9nC zkjb!X7WpY;0#<05gJX7V0Mt%9bcAb(Boe~oLQAG>OG7rJ%8m^yZaA6M2C@nKHz5%h z8gV1B%!tt92a~YpP&@6k?6=Yx%792Q#h7SITca^jP_^+S9tL`&qxg_ZhgK_+sYvS z?z6mCzZnhhBDUfFkNb5gdRzhQf0;xJ@t~l@xy2({YFPDA7|XF6gb``mUO)O_XDGO zCI6^!JW{Cuj^mwHr!TG(ox$@Be%am+Jo=p9s8sHhB4=Qu5_5+)Z@qpNu5?+n_4c+_^u$8-GuVz0cHr+a^eOP}Mu zd6h8o%6s{jp-V1u{~RAKeoXzpK$ku>>vJ5*|Ig= 1900 + PRINT *, 'INFO:simulate_version[019.00]' +# elif _MSC_VER >= 1800 + PRINT *, 'INFO:simulate_version[018.00]' +# elif _MSC_VER >= 1700 + PRINT *, 'INFO:simulate_version[017.00]' +# elif _MSC_VER >= 1600 + PRINT *, 'INFO:simulate_version[016.00]' +# elif _MSC_VER >= 1500 + PRINT *, 'INFO:simulate_version[015.00]' +# elif _MSC_VER >= 1400 + PRINT *, 'INFO:simulate_version[014.00]' +# elif _MSC_VER >= 1310 + PRINT *, 'INFO:simulate_version[013.01]' +# else + PRINT *, 'INFO:simulate_version[013.00]' +# endif +# endif +#elif defined(__SUNPRO_F95) + PRINT *, 'INFO:compiler[SunPro]' +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_F95>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_F95>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_F95 & 0xF) +#elif defined(__SUNPRO_F90) + PRINT *, 'INFO:compiler[SunPro]' +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_F90>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_F90>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_F90 & 0xF) +#elif defined(_CRAYFTN) + PRINT *, 'INFO:compiler[Cray]' +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) +#elif defined(__G95__) + PRINT *, 'INFO:compiler[G95]' +# define COMPILER_VERSION_MAJOR DEC(__G95__) +# define COMPILER_VERSION_MINOR DEC(__G95_MINOR__) +#elif defined(__PATHSCALE__) + PRINT *, 'INFO:compiler[PathScale]' +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif +#elif defined(__ABSOFT__) + PRINT *, 'INFO:compiler[Absoft]' +#elif defined(__GNUC__) + PRINT *, 'INFO:compiler[GNU]' +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif +#elif defined(__IBMC__) +# if defined(__COMPILER_VER__) + PRINT *, 'INFO:compiler[zOS]' +# elif __IBMC__ >= 800 + PRINT *, 'INFO:compiler[XL]' +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) +# else + PRINT *, 'INFO:compiler[VisualAge]' +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) +# endif +#elif defined(__PGI) + PRINT *, 'INFO:compiler[PGI]' +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif +#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) + PRINT *, 'INFO:compiler[MIPSpro]' +# if 0 +! This compiler is either not known or is too old to define an +! identification macro. Try to identify the platform and guess that +! it is the native compiler. +# endif +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) + PRINT *, 'INFO:compiler[VisualAge]' +#elif defined(__sgi) || defined(__sgi__) || defined(_SGI) + PRINT *, 'INFO:compiler[MIPSpro]' +#elif defined(__hpux) || defined(__hpux__) + PRINT *, 'INFO:compiler[HP]' +#elif 1 +# if 0 +! The above 'elif 1' instead of 'else' is to work around a bug in the +! SGI preprocessor which produces both the __sgi and else blocks. +# endif + PRINT *, 'INFO:compiler[]' +#endif +#if defined(__CRAYXE) || defined(__CRAYXC) + PRINT *, 'INFO:compiler_wrapper[CrayPrgEnv]' +#endif + +#if 0 +! Identify the platform +#endif +#if defined(__linux) || defined(__linux__) || defined(linux) + PRINT *, 'INFO:platform[Linux]' +#elif defined(__CYGWIN__) + PRINT *, 'INFO:platform[Cygwin]' +#elif defined(__MINGW32__) + PRINT *, 'INFO:platform[MinGW]' +#elif defined(__APPLE__) + PRINT *, 'INFO:platform[Darwin]' +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) + PRINT *, 'INFO:platform[Windows]' +#elif defined(__FreeBSD__) || defined(__FreeBSD) + PRINT *, 'INFO:platform[FreeBSD]' +#elif defined(__NetBSD__) || defined(__NetBSD) + PRINT *, 'INFO:platform[NetBSD]' +#elif defined(__OpenBSD__) || defined(__OPENBSD) + PRINT *, 'INFO:platform[OpenBSD]' +#elif defined(__sun) || defined(sun) + PRINT *, 'INFO:platform[SunOS]' +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) + PRINT *, 'INFO:platform[AIX]' +#elif defined(__sgi) || defined(__sgi__) || defined(_SGI) + PRINT *, 'INFO:platform[IRIX]' +#elif defined(__hpux) || defined(__hpux__) + PRINT *, 'INFO:platform[HP-UX]' +#elif defined(__HAIKU__) + PRINT *, 'INFO:platform[Haiku]' +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) + PRINT *, 'INFO:platform[BeOS]' +#elif defined(__QNX__) || defined(__QNXNTO__) + PRINT *, 'INFO:platform[QNX]' +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) + PRINT *, 'INFO:platform[Tru64]' +#elif defined(__riscos) || defined(__riscos__) + PRINT *, 'INFO:platform[RISCos]' +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) + PRINT *, 'INFO:platform[SINIX]' +#elif defined(__UNIX_SV__) + PRINT *, 'INFO:platform[UNIX_SV]' +#elif defined(__bsdos__) + PRINT *, 'INFO:platform[BSDOS]' +#elif defined(_MPRAS) || defined(MPRAS) + PRINT *, 'INFO:platform[MP-RAS]' +#elif defined(__osf) || defined(__osf__) + PRINT *, 'INFO:platform[OSF1]' +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) + PRINT *, 'INFO:platform[SCO_SV]' +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) + PRINT *, 'INFO:platform[ULTRIX]' +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) + PRINT *, 'INFO:platform[Xenix]' +#elif 1 +# if 0 +! The above 'elif 1' instead of 'else' is to work around a bug in the +! SGI preprocessor which produces both the __sgi and else blocks. +# endif + PRINT *, 'INFO:platform[]' +#endif +#if defined(_WIN32) && (defined(__INTEL_COMPILER) || defined(__ICC)) +# if defined(_M_IA64) + PRINT *, 'INFO:arch[IA64]' +# elif defined(_M_X64) || defined(_M_AMD64) + PRINT *, 'INFO:arch[x64]' +# elif defined(_M_IX86) + PRINT *, 'INFO:arch[X86]' +# endif +#endif + +#if 0 +! Encode compiler version digits +#endif +#define DEC_8(n) (((n) / 10000000) % 10) +#define DEC_7(n) (((n) / 1000000) % 10) +#define DEC_6(n) (((n) / 100000) % 10) +#define DEC_5(n) (((n) / 10000) % 10) +#define DEC_4(n) (((n) / 1000) % 10) +#define DEC_3(n) (((n) / 100) % 10) +#define DEC_2(n) (((n) / 10) % 10) +#define DEC_1(n) (((n) ) % 10) +#define HEX_8(n) ((n)>>28 & 0xF) +#define HEX_7(n) ((n)>>24 & 0xF) +#define HEX_6(n) ((n)>>20 & 0xF) +#define HEX_5(n) ((n)>>16 & 0xF) +#define HEX_4(n) ((n)>>12 & 0xF) +#define HEX_3(n) ((n)>>8 & 0xF) +#define HEX_2(n) ((n)>>4 & 0xF) +#define HEX_1(n) ((n) & 0xF) + +#if defined(COMPILER_VERSION_MAJOR) +# undef DEC +# undef HEX +# define DEC(n) DEC_1(n) +# define HEX(n) HEX_1(n) +# if COMPILER_VERSION_MAJOR == 0 + PRINT *, 'INFO:compiler_version_MAJOR_digit_1[0]' +# elif COMPILER_VERSION_MAJOR == 1 + PRINT *, 'INFO:compiler_version_MAJOR_digit_1[1]' +# elif COMPILER_VERSION_MAJOR == 2 + PRINT *, 'INFO:compiler_version_MAJOR_digit_1[2]' +# elif COMPILER_VERSION_MAJOR == 3 + PRINT *, 'INFO:compiler_version_MAJOR_digit_1[3]' +# elif COMPILER_VERSION_MAJOR == 4 + PRINT *, 'INFO:compiler_version_MAJOR_digit_1[4]' +# elif COMPILER_VERSION_MAJOR == 5 + PRINT *, 'INFO:compiler_version_MAJOR_digit_1[5]' +# elif COMPILER_VERSION_MAJOR == 6 + PRINT *, 'INFO:compiler_version_MAJOR_digit_1[6]' +# elif COMPILER_VERSION_MAJOR == 7 + PRINT *, 'INFO:compiler_version_MAJOR_digit_1[7]' +# elif COMPILER_VERSION_MAJOR == 8 + PRINT *, 'INFO:compiler_version_MAJOR_digit_1[8]' +# elif COMPILER_VERSION_MAJOR == 9 + PRINT *, 'INFO:compiler_version_MAJOR_digit_1[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_2(n) +# define HEX(n) HEX_2(n) +# if COMPILER_VERSION_MAJOR == 0 + PRINT *, 'INFO:compiler_version_MAJOR_digit_2[0]' +# elif COMPILER_VERSION_MAJOR == 1 + PRINT *, 'INFO:compiler_version_MAJOR_digit_2[1]' +# elif COMPILER_VERSION_MAJOR == 2 + PRINT *, 'INFO:compiler_version_MAJOR_digit_2[2]' +# elif COMPILER_VERSION_MAJOR == 3 + PRINT *, 'INFO:compiler_version_MAJOR_digit_2[3]' +# elif COMPILER_VERSION_MAJOR == 4 + PRINT *, 'INFO:compiler_version_MAJOR_digit_2[4]' +# elif COMPILER_VERSION_MAJOR == 5 + PRINT *, 'INFO:compiler_version_MAJOR_digit_2[5]' +# elif COMPILER_VERSION_MAJOR == 6 + PRINT *, 'INFO:compiler_version_MAJOR_digit_2[6]' +# elif COMPILER_VERSION_MAJOR == 7 + PRINT *, 'INFO:compiler_version_MAJOR_digit_2[7]' +# elif COMPILER_VERSION_MAJOR == 8 + PRINT *, 'INFO:compiler_version_MAJOR_digit_2[8]' +# elif COMPILER_VERSION_MAJOR == 9 + PRINT *, 'INFO:compiler_version_MAJOR_digit_2[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_3(n) +# define HEX(n) HEX_3(n) +# if COMPILER_VERSION_MAJOR == 0 + PRINT *, 'INFO:compiler_version_MAJOR_digit_3[0]' +# elif COMPILER_VERSION_MAJOR == 1 + PRINT *, 'INFO:compiler_version_MAJOR_digit_3[1]' +# elif COMPILER_VERSION_MAJOR == 2 + PRINT *, 'INFO:compiler_version_MAJOR_digit_3[2]' +# elif COMPILER_VERSION_MAJOR == 3 + PRINT *, 'INFO:compiler_version_MAJOR_digit_3[3]' +# elif COMPILER_VERSION_MAJOR == 4 + PRINT *, 'INFO:compiler_version_MAJOR_digit_3[4]' +# elif COMPILER_VERSION_MAJOR == 5 + PRINT *, 'INFO:compiler_version_MAJOR_digit_3[5]' +# elif COMPILER_VERSION_MAJOR == 6 + PRINT *, 'INFO:compiler_version_MAJOR_digit_3[6]' +# elif COMPILER_VERSION_MAJOR == 7 + PRINT *, 'INFO:compiler_version_MAJOR_digit_3[7]' +# elif COMPILER_VERSION_MAJOR == 8 + PRINT *, 'INFO:compiler_version_MAJOR_digit_3[8]' +# elif COMPILER_VERSION_MAJOR == 9 + PRINT *, 'INFO:compiler_version_MAJOR_digit_3[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_4(n) +# define HEX(n) HEX_4(n) +# if COMPILER_VERSION_MAJOR == 0 + PRINT *, 'INFO:compiler_version_MAJOR_digit_4[0]' +# elif COMPILER_VERSION_MAJOR == 1 + PRINT *, 'INFO:compiler_version_MAJOR_digit_4[1]' +# elif COMPILER_VERSION_MAJOR == 2 + PRINT *, 'INFO:compiler_version_MAJOR_digit_4[2]' +# elif COMPILER_VERSION_MAJOR == 3 + PRINT *, 'INFO:compiler_version_MAJOR_digit_4[3]' +# elif COMPILER_VERSION_MAJOR == 4 + PRINT *, 'INFO:compiler_version_MAJOR_digit_4[4]' +# elif COMPILER_VERSION_MAJOR == 5 + PRINT *, 'INFO:compiler_version_MAJOR_digit_4[5]' +# elif COMPILER_VERSION_MAJOR == 6 + PRINT *, 'INFO:compiler_version_MAJOR_digit_4[6]' +# elif COMPILER_VERSION_MAJOR == 7 + PRINT *, 'INFO:compiler_version_MAJOR_digit_4[7]' +# elif COMPILER_VERSION_MAJOR == 8 + PRINT *, 'INFO:compiler_version_MAJOR_digit_4[8]' +# elif COMPILER_VERSION_MAJOR == 9 + PRINT *, 'INFO:compiler_version_MAJOR_digit_4[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_5(n) +# define HEX(n) HEX_5(n) +# if COMPILER_VERSION_MAJOR == 0 + PRINT *, 'INFO:compiler_version_MAJOR_digit_5[0]' +# elif COMPILER_VERSION_MAJOR == 1 + PRINT *, 'INFO:compiler_version_MAJOR_digit_5[1]' +# elif COMPILER_VERSION_MAJOR == 2 + PRINT *, 'INFO:compiler_version_MAJOR_digit_5[2]' +# elif COMPILER_VERSION_MAJOR == 3 + PRINT *, 'INFO:compiler_version_MAJOR_digit_5[3]' +# elif COMPILER_VERSION_MAJOR == 4 + PRINT *, 'INFO:compiler_version_MAJOR_digit_5[4]' +# elif COMPILER_VERSION_MAJOR == 5 + PRINT *, 'INFO:compiler_version_MAJOR_digit_5[5]' +# elif COMPILER_VERSION_MAJOR == 6 + PRINT *, 'INFO:compiler_version_MAJOR_digit_5[6]' +# elif COMPILER_VERSION_MAJOR == 7 + PRINT *, 'INFO:compiler_version_MAJOR_digit_5[7]' +# elif COMPILER_VERSION_MAJOR == 8 + PRINT *, 'INFO:compiler_version_MAJOR_digit_5[8]' +# elif COMPILER_VERSION_MAJOR == 9 + PRINT *, 'INFO:compiler_version_MAJOR_digit_5[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_6(n) +# define HEX(n) HEX_6(n) +# if COMPILER_VERSION_MAJOR == 0 + PRINT *, 'INFO:compiler_version_MAJOR_digit_6[0]' +# elif COMPILER_VERSION_MAJOR == 1 + PRINT *, 'INFO:compiler_version_MAJOR_digit_6[1]' +# elif COMPILER_VERSION_MAJOR == 2 + PRINT *, 'INFO:compiler_version_MAJOR_digit_6[2]' +# elif COMPILER_VERSION_MAJOR == 3 + PRINT *, 'INFO:compiler_version_MAJOR_digit_6[3]' +# elif COMPILER_VERSION_MAJOR == 4 + PRINT *, 'INFO:compiler_version_MAJOR_digit_6[4]' +# elif COMPILER_VERSION_MAJOR == 5 + PRINT *, 'INFO:compiler_version_MAJOR_digit_6[5]' +# elif COMPILER_VERSION_MAJOR == 6 + PRINT *, 'INFO:compiler_version_MAJOR_digit_6[6]' +# elif COMPILER_VERSION_MAJOR == 7 + PRINT *, 'INFO:compiler_version_MAJOR_digit_6[7]' +# elif COMPILER_VERSION_MAJOR == 8 + PRINT *, 'INFO:compiler_version_MAJOR_digit_6[8]' +# elif COMPILER_VERSION_MAJOR == 9 + PRINT *, 'INFO:compiler_version_MAJOR_digit_6[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_7(n) +# define HEX(n) HEX_7(n) +# if COMPILER_VERSION_MAJOR == 0 + PRINT *, 'INFO:compiler_version_MAJOR_digit_7[0]' +# elif COMPILER_VERSION_MAJOR == 1 + PRINT *, 'INFO:compiler_version_MAJOR_digit_7[1]' +# elif COMPILER_VERSION_MAJOR == 2 + PRINT *, 'INFO:compiler_version_MAJOR_digit_7[2]' +# elif COMPILER_VERSION_MAJOR == 3 + PRINT *, 'INFO:compiler_version_MAJOR_digit_7[3]' +# elif COMPILER_VERSION_MAJOR == 4 + PRINT *, 'INFO:compiler_version_MAJOR_digit_7[4]' +# elif COMPILER_VERSION_MAJOR == 5 + PRINT *, 'INFO:compiler_version_MAJOR_digit_7[5]' +# elif COMPILER_VERSION_MAJOR == 6 + PRINT *, 'INFO:compiler_version_MAJOR_digit_7[6]' +# elif COMPILER_VERSION_MAJOR == 7 + PRINT *, 'INFO:compiler_version_MAJOR_digit_7[7]' +# elif COMPILER_VERSION_MAJOR == 8 + PRINT *, 'INFO:compiler_version_MAJOR_digit_7[8]' +# elif COMPILER_VERSION_MAJOR == 9 + PRINT *, 'INFO:compiler_version_MAJOR_digit_7[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_8(n) +# define HEX(n) HEX_8(n) +# if COMPILER_VERSION_MAJOR == 0 + PRINT *, 'INFO:compiler_version_MAJOR_digit_8[0]' +# elif COMPILER_VERSION_MAJOR == 1 + PRINT *, 'INFO:compiler_version_MAJOR_digit_8[1]' +# elif COMPILER_VERSION_MAJOR == 2 + PRINT *, 'INFO:compiler_version_MAJOR_digit_8[2]' +# elif COMPILER_VERSION_MAJOR == 3 + PRINT *, 'INFO:compiler_version_MAJOR_digit_8[3]' +# elif COMPILER_VERSION_MAJOR == 4 + PRINT *, 'INFO:compiler_version_MAJOR_digit_8[4]' +# elif COMPILER_VERSION_MAJOR == 5 + PRINT *, 'INFO:compiler_version_MAJOR_digit_8[5]' +# elif COMPILER_VERSION_MAJOR == 6 + PRINT *, 'INFO:compiler_version_MAJOR_digit_8[6]' +# elif COMPILER_VERSION_MAJOR == 7 + PRINT *, 'INFO:compiler_version_MAJOR_digit_8[7]' +# elif COMPILER_VERSION_MAJOR == 8 + PRINT *, 'INFO:compiler_version_MAJOR_digit_8[8]' +# elif COMPILER_VERSION_MAJOR == 9 + PRINT *, 'INFO:compiler_version_MAJOR_digit_8[9]' +# endif + +#endif +#if defined(COMPILER_VERSION_MINOR) +# undef DEC +# undef HEX +# define DEC(n) DEC_1(n) +# define HEX(n) HEX_1(n) +# if COMPILER_VERSION_MINOR == 0 + PRINT *, 'INFO:compiler_version_MINOR_digit_1[0]' +# elif COMPILER_VERSION_MINOR == 1 + PRINT *, 'INFO:compiler_version_MINOR_digit_1[1]' +# elif COMPILER_VERSION_MINOR == 2 + PRINT *, 'INFO:compiler_version_MINOR_digit_1[2]' +# elif COMPILER_VERSION_MINOR == 3 + PRINT *, 'INFO:compiler_version_MINOR_digit_1[3]' +# elif COMPILER_VERSION_MINOR == 4 + PRINT *, 'INFO:compiler_version_MINOR_digit_1[4]' +# elif COMPILER_VERSION_MINOR == 5 + PRINT *, 'INFO:compiler_version_MINOR_digit_1[5]' +# elif COMPILER_VERSION_MINOR == 6 + PRINT *, 'INFO:compiler_version_MINOR_digit_1[6]' +# elif COMPILER_VERSION_MINOR == 7 + PRINT *, 'INFO:compiler_version_MINOR_digit_1[7]' +# elif COMPILER_VERSION_MINOR == 8 + PRINT *, 'INFO:compiler_version_MINOR_digit_1[8]' +# elif COMPILER_VERSION_MINOR == 9 + PRINT *, 'INFO:compiler_version_MINOR_digit_1[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_2(n) +# define HEX(n) HEX_2(n) +# if COMPILER_VERSION_MINOR == 0 + PRINT *, 'INFO:compiler_version_MINOR_digit_2[0]' +# elif COMPILER_VERSION_MINOR == 1 + PRINT *, 'INFO:compiler_version_MINOR_digit_2[1]' +# elif COMPILER_VERSION_MINOR == 2 + PRINT *, 'INFO:compiler_version_MINOR_digit_2[2]' +# elif COMPILER_VERSION_MINOR == 3 + PRINT *, 'INFO:compiler_version_MINOR_digit_2[3]' +# elif COMPILER_VERSION_MINOR == 4 + PRINT *, 'INFO:compiler_version_MINOR_digit_2[4]' +# elif COMPILER_VERSION_MINOR == 5 + PRINT *, 'INFO:compiler_version_MINOR_digit_2[5]' +# elif COMPILER_VERSION_MINOR == 6 + PRINT *, 'INFO:compiler_version_MINOR_digit_2[6]' +# elif COMPILER_VERSION_MINOR == 7 + PRINT *, 'INFO:compiler_version_MINOR_digit_2[7]' +# elif COMPILER_VERSION_MINOR == 8 + PRINT *, 'INFO:compiler_version_MINOR_digit_2[8]' +# elif COMPILER_VERSION_MINOR == 9 + PRINT *, 'INFO:compiler_version_MINOR_digit_2[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_3(n) +# define HEX(n) HEX_3(n) +# if COMPILER_VERSION_MINOR == 0 + PRINT *, 'INFO:compiler_version_MINOR_digit_3[0]' +# elif COMPILER_VERSION_MINOR == 1 + PRINT *, 'INFO:compiler_version_MINOR_digit_3[1]' +# elif COMPILER_VERSION_MINOR == 2 + PRINT *, 'INFO:compiler_version_MINOR_digit_3[2]' +# elif COMPILER_VERSION_MINOR == 3 + PRINT *, 'INFO:compiler_version_MINOR_digit_3[3]' +# elif COMPILER_VERSION_MINOR == 4 + PRINT *, 'INFO:compiler_version_MINOR_digit_3[4]' +# elif COMPILER_VERSION_MINOR == 5 + PRINT *, 'INFO:compiler_version_MINOR_digit_3[5]' +# elif COMPILER_VERSION_MINOR == 6 + PRINT *, 'INFO:compiler_version_MINOR_digit_3[6]' +# elif COMPILER_VERSION_MINOR == 7 + PRINT *, 'INFO:compiler_version_MINOR_digit_3[7]' +# elif COMPILER_VERSION_MINOR == 8 + PRINT *, 'INFO:compiler_version_MINOR_digit_3[8]' +# elif COMPILER_VERSION_MINOR == 9 + PRINT *, 'INFO:compiler_version_MINOR_digit_3[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_4(n) +# define HEX(n) HEX_4(n) +# if COMPILER_VERSION_MINOR == 0 + PRINT *, 'INFO:compiler_version_MINOR_digit_4[0]' +# elif COMPILER_VERSION_MINOR == 1 + PRINT *, 'INFO:compiler_version_MINOR_digit_4[1]' +# elif COMPILER_VERSION_MINOR == 2 + PRINT *, 'INFO:compiler_version_MINOR_digit_4[2]' +# elif COMPILER_VERSION_MINOR == 3 + PRINT *, 'INFO:compiler_version_MINOR_digit_4[3]' +# elif COMPILER_VERSION_MINOR == 4 + PRINT *, 'INFO:compiler_version_MINOR_digit_4[4]' +# elif COMPILER_VERSION_MINOR == 5 + PRINT *, 'INFO:compiler_version_MINOR_digit_4[5]' +# elif COMPILER_VERSION_MINOR == 6 + PRINT *, 'INFO:compiler_version_MINOR_digit_4[6]' +# elif COMPILER_VERSION_MINOR == 7 + PRINT *, 'INFO:compiler_version_MINOR_digit_4[7]' +# elif COMPILER_VERSION_MINOR == 8 + PRINT *, 'INFO:compiler_version_MINOR_digit_4[8]' +# elif COMPILER_VERSION_MINOR == 9 + PRINT *, 'INFO:compiler_version_MINOR_digit_4[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_5(n) +# define HEX(n) HEX_5(n) +# if COMPILER_VERSION_MINOR == 0 + PRINT *, 'INFO:compiler_version_MINOR_digit_5[0]' +# elif COMPILER_VERSION_MINOR == 1 + PRINT *, 'INFO:compiler_version_MINOR_digit_5[1]' +# elif COMPILER_VERSION_MINOR == 2 + PRINT *, 'INFO:compiler_version_MINOR_digit_5[2]' +# elif COMPILER_VERSION_MINOR == 3 + PRINT *, 'INFO:compiler_version_MINOR_digit_5[3]' +# elif COMPILER_VERSION_MINOR == 4 + PRINT *, 'INFO:compiler_version_MINOR_digit_5[4]' +# elif COMPILER_VERSION_MINOR == 5 + PRINT *, 'INFO:compiler_version_MINOR_digit_5[5]' +# elif COMPILER_VERSION_MINOR == 6 + PRINT *, 'INFO:compiler_version_MINOR_digit_5[6]' +# elif COMPILER_VERSION_MINOR == 7 + PRINT *, 'INFO:compiler_version_MINOR_digit_5[7]' +# elif COMPILER_VERSION_MINOR == 8 + PRINT *, 'INFO:compiler_version_MINOR_digit_5[8]' +# elif COMPILER_VERSION_MINOR == 9 + PRINT *, 'INFO:compiler_version_MINOR_digit_5[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_6(n) +# define HEX(n) HEX_6(n) +# if COMPILER_VERSION_MINOR == 0 + PRINT *, 'INFO:compiler_version_MINOR_digit_6[0]' +# elif COMPILER_VERSION_MINOR == 1 + PRINT *, 'INFO:compiler_version_MINOR_digit_6[1]' +# elif COMPILER_VERSION_MINOR == 2 + PRINT *, 'INFO:compiler_version_MINOR_digit_6[2]' +# elif COMPILER_VERSION_MINOR == 3 + PRINT *, 'INFO:compiler_version_MINOR_digit_6[3]' +# elif COMPILER_VERSION_MINOR == 4 + PRINT *, 'INFO:compiler_version_MINOR_digit_6[4]' +# elif COMPILER_VERSION_MINOR == 5 + PRINT *, 'INFO:compiler_version_MINOR_digit_6[5]' +# elif COMPILER_VERSION_MINOR == 6 + PRINT *, 'INFO:compiler_version_MINOR_digit_6[6]' +# elif COMPILER_VERSION_MINOR == 7 + PRINT *, 'INFO:compiler_version_MINOR_digit_6[7]' +# elif COMPILER_VERSION_MINOR == 8 + PRINT *, 'INFO:compiler_version_MINOR_digit_6[8]' +# elif COMPILER_VERSION_MINOR == 9 + PRINT *, 'INFO:compiler_version_MINOR_digit_6[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_7(n) +# define HEX(n) HEX_7(n) +# if COMPILER_VERSION_MINOR == 0 + PRINT *, 'INFO:compiler_version_MINOR_digit_7[0]' +# elif COMPILER_VERSION_MINOR == 1 + PRINT *, 'INFO:compiler_version_MINOR_digit_7[1]' +# elif COMPILER_VERSION_MINOR == 2 + PRINT *, 'INFO:compiler_version_MINOR_digit_7[2]' +# elif COMPILER_VERSION_MINOR == 3 + PRINT *, 'INFO:compiler_version_MINOR_digit_7[3]' +# elif COMPILER_VERSION_MINOR == 4 + PRINT *, 'INFO:compiler_version_MINOR_digit_7[4]' +# elif COMPILER_VERSION_MINOR == 5 + PRINT *, 'INFO:compiler_version_MINOR_digit_7[5]' +# elif COMPILER_VERSION_MINOR == 6 + PRINT *, 'INFO:compiler_version_MINOR_digit_7[6]' +# elif COMPILER_VERSION_MINOR == 7 + PRINT *, 'INFO:compiler_version_MINOR_digit_7[7]' +# elif COMPILER_VERSION_MINOR == 8 + PRINT *, 'INFO:compiler_version_MINOR_digit_7[8]' +# elif COMPILER_VERSION_MINOR == 9 + PRINT *, 'INFO:compiler_version_MINOR_digit_7[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_8(n) +# define HEX(n) HEX_8(n) +# if COMPILER_VERSION_MINOR == 0 + PRINT *, 'INFO:compiler_version_MINOR_digit_8[0]' +# elif COMPILER_VERSION_MINOR == 1 + PRINT *, 'INFO:compiler_version_MINOR_digit_8[1]' +# elif COMPILER_VERSION_MINOR == 2 + PRINT *, 'INFO:compiler_version_MINOR_digit_8[2]' +# elif COMPILER_VERSION_MINOR == 3 + PRINT *, 'INFO:compiler_version_MINOR_digit_8[3]' +# elif COMPILER_VERSION_MINOR == 4 + PRINT *, 'INFO:compiler_version_MINOR_digit_8[4]' +# elif COMPILER_VERSION_MINOR == 5 + PRINT *, 'INFO:compiler_version_MINOR_digit_8[5]' +# elif COMPILER_VERSION_MINOR == 6 + PRINT *, 'INFO:compiler_version_MINOR_digit_8[6]' +# elif COMPILER_VERSION_MINOR == 7 + PRINT *, 'INFO:compiler_version_MINOR_digit_8[7]' +# elif COMPILER_VERSION_MINOR == 8 + PRINT *, 'INFO:compiler_version_MINOR_digit_8[8]' +# elif COMPILER_VERSION_MINOR == 9 + PRINT *, 'INFO:compiler_version_MINOR_digit_8[9]' +# endif + +#endif +#if defined(COMPILER_VERSION_PATCH) +# undef DEC +# undef HEX +# define DEC(n) DEC_1(n) +# define HEX(n) HEX_1(n) +# if COMPILER_VERSION_PATCH == 0 + PRINT *, 'INFO:compiler_version_PATCH_digit_1[0]' +# elif COMPILER_VERSION_PATCH == 1 + PRINT *, 'INFO:compiler_version_PATCH_digit_1[1]' +# elif COMPILER_VERSION_PATCH == 2 + PRINT *, 'INFO:compiler_version_PATCH_digit_1[2]' +# elif COMPILER_VERSION_PATCH == 3 + PRINT *, 'INFO:compiler_version_PATCH_digit_1[3]' +# elif COMPILER_VERSION_PATCH == 4 + PRINT *, 'INFO:compiler_version_PATCH_digit_1[4]' +# elif COMPILER_VERSION_PATCH == 5 + PRINT *, 'INFO:compiler_version_PATCH_digit_1[5]' +# elif COMPILER_VERSION_PATCH == 6 + PRINT *, 'INFO:compiler_version_PATCH_digit_1[6]' +# elif COMPILER_VERSION_PATCH == 7 + PRINT *, 'INFO:compiler_version_PATCH_digit_1[7]' +# elif COMPILER_VERSION_PATCH == 8 + PRINT *, 'INFO:compiler_version_PATCH_digit_1[8]' +# elif COMPILER_VERSION_PATCH == 9 + PRINT *, 'INFO:compiler_version_PATCH_digit_1[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_2(n) +# define HEX(n) HEX_2(n) +# if COMPILER_VERSION_PATCH == 0 + PRINT *, 'INFO:compiler_version_PATCH_digit_2[0]' +# elif COMPILER_VERSION_PATCH == 1 + PRINT *, 'INFO:compiler_version_PATCH_digit_2[1]' +# elif COMPILER_VERSION_PATCH == 2 + PRINT *, 'INFO:compiler_version_PATCH_digit_2[2]' +# elif COMPILER_VERSION_PATCH == 3 + PRINT *, 'INFO:compiler_version_PATCH_digit_2[3]' +# elif COMPILER_VERSION_PATCH == 4 + PRINT *, 'INFO:compiler_version_PATCH_digit_2[4]' +# elif COMPILER_VERSION_PATCH == 5 + PRINT *, 'INFO:compiler_version_PATCH_digit_2[5]' +# elif COMPILER_VERSION_PATCH == 6 + PRINT *, 'INFO:compiler_version_PATCH_digit_2[6]' +# elif COMPILER_VERSION_PATCH == 7 + PRINT *, 'INFO:compiler_version_PATCH_digit_2[7]' +# elif COMPILER_VERSION_PATCH == 8 + PRINT *, 'INFO:compiler_version_PATCH_digit_2[8]' +# elif COMPILER_VERSION_PATCH == 9 + PRINT *, 'INFO:compiler_version_PATCH_digit_2[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_3(n) +# define HEX(n) HEX_3(n) +# if COMPILER_VERSION_PATCH == 0 + PRINT *, 'INFO:compiler_version_PATCH_digit_3[0]' +# elif COMPILER_VERSION_PATCH == 1 + PRINT *, 'INFO:compiler_version_PATCH_digit_3[1]' +# elif COMPILER_VERSION_PATCH == 2 + PRINT *, 'INFO:compiler_version_PATCH_digit_3[2]' +# elif COMPILER_VERSION_PATCH == 3 + PRINT *, 'INFO:compiler_version_PATCH_digit_3[3]' +# elif COMPILER_VERSION_PATCH == 4 + PRINT *, 'INFO:compiler_version_PATCH_digit_3[4]' +# elif COMPILER_VERSION_PATCH == 5 + PRINT *, 'INFO:compiler_version_PATCH_digit_3[5]' +# elif COMPILER_VERSION_PATCH == 6 + PRINT *, 'INFO:compiler_version_PATCH_digit_3[6]' +# elif COMPILER_VERSION_PATCH == 7 + PRINT *, 'INFO:compiler_version_PATCH_digit_3[7]' +# elif COMPILER_VERSION_PATCH == 8 + PRINT *, 'INFO:compiler_version_PATCH_digit_3[8]' +# elif COMPILER_VERSION_PATCH == 9 + PRINT *, 'INFO:compiler_version_PATCH_digit_3[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_4(n) +# define HEX(n) HEX_4(n) +# if COMPILER_VERSION_PATCH == 0 + PRINT *, 'INFO:compiler_version_PATCH_digit_4[0]' +# elif COMPILER_VERSION_PATCH == 1 + PRINT *, 'INFO:compiler_version_PATCH_digit_4[1]' +# elif COMPILER_VERSION_PATCH == 2 + PRINT *, 'INFO:compiler_version_PATCH_digit_4[2]' +# elif COMPILER_VERSION_PATCH == 3 + PRINT *, 'INFO:compiler_version_PATCH_digit_4[3]' +# elif COMPILER_VERSION_PATCH == 4 + PRINT *, 'INFO:compiler_version_PATCH_digit_4[4]' +# elif COMPILER_VERSION_PATCH == 5 + PRINT *, 'INFO:compiler_version_PATCH_digit_4[5]' +# elif COMPILER_VERSION_PATCH == 6 + PRINT *, 'INFO:compiler_version_PATCH_digit_4[6]' +# elif COMPILER_VERSION_PATCH == 7 + PRINT *, 'INFO:compiler_version_PATCH_digit_4[7]' +# elif COMPILER_VERSION_PATCH == 8 + PRINT *, 'INFO:compiler_version_PATCH_digit_4[8]' +# elif COMPILER_VERSION_PATCH == 9 + PRINT *, 'INFO:compiler_version_PATCH_digit_4[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_5(n) +# define HEX(n) HEX_5(n) +# if COMPILER_VERSION_PATCH == 0 + PRINT *, 'INFO:compiler_version_PATCH_digit_5[0]' +# elif COMPILER_VERSION_PATCH == 1 + PRINT *, 'INFO:compiler_version_PATCH_digit_5[1]' +# elif COMPILER_VERSION_PATCH == 2 + PRINT *, 'INFO:compiler_version_PATCH_digit_5[2]' +# elif COMPILER_VERSION_PATCH == 3 + PRINT *, 'INFO:compiler_version_PATCH_digit_5[3]' +# elif COMPILER_VERSION_PATCH == 4 + PRINT *, 'INFO:compiler_version_PATCH_digit_5[4]' +# elif COMPILER_VERSION_PATCH == 5 + PRINT *, 'INFO:compiler_version_PATCH_digit_5[5]' +# elif COMPILER_VERSION_PATCH == 6 + PRINT *, 'INFO:compiler_version_PATCH_digit_5[6]' +# elif COMPILER_VERSION_PATCH == 7 + PRINT *, 'INFO:compiler_version_PATCH_digit_5[7]' +# elif COMPILER_VERSION_PATCH == 8 + PRINT *, 'INFO:compiler_version_PATCH_digit_5[8]' +# elif COMPILER_VERSION_PATCH == 9 + PRINT *, 'INFO:compiler_version_PATCH_digit_5[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_6(n) +# define HEX(n) HEX_6(n) +# if COMPILER_VERSION_PATCH == 0 + PRINT *, 'INFO:compiler_version_PATCH_digit_6[0]' +# elif COMPILER_VERSION_PATCH == 1 + PRINT *, 'INFO:compiler_version_PATCH_digit_6[1]' +# elif COMPILER_VERSION_PATCH == 2 + PRINT *, 'INFO:compiler_version_PATCH_digit_6[2]' +# elif COMPILER_VERSION_PATCH == 3 + PRINT *, 'INFO:compiler_version_PATCH_digit_6[3]' +# elif COMPILER_VERSION_PATCH == 4 + PRINT *, 'INFO:compiler_version_PATCH_digit_6[4]' +# elif COMPILER_VERSION_PATCH == 5 + PRINT *, 'INFO:compiler_version_PATCH_digit_6[5]' +# elif COMPILER_VERSION_PATCH == 6 + PRINT *, 'INFO:compiler_version_PATCH_digit_6[6]' +# elif COMPILER_VERSION_PATCH == 7 + PRINT *, 'INFO:compiler_version_PATCH_digit_6[7]' +# elif COMPILER_VERSION_PATCH == 8 + PRINT *, 'INFO:compiler_version_PATCH_digit_6[8]' +# elif COMPILER_VERSION_PATCH == 9 + PRINT *, 'INFO:compiler_version_PATCH_digit_6[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_7(n) +# define HEX(n) HEX_7(n) +# if COMPILER_VERSION_PATCH == 0 + PRINT *, 'INFO:compiler_version_PATCH_digit_7[0]' +# elif COMPILER_VERSION_PATCH == 1 + PRINT *, 'INFO:compiler_version_PATCH_digit_7[1]' +# elif COMPILER_VERSION_PATCH == 2 + PRINT *, 'INFO:compiler_version_PATCH_digit_7[2]' +# elif COMPILER_VERSION_PATCH == 3 + PRINT *, 'INFO:compiler_version_PATCH_digit_7[3]' +# elif COMPILER_VERSION_PATCH == 4 + PRINT *, 'INFO:compiler_version_PATCH_digit_7[4]' +# elif COMPILER_VERSION_PATCH == 5 + PRINT *, 'INFO:compiler_version_PATCH_digit_7[5]' +# elif COMPILER_VERSION_PATCH == 6 + PRINT *, 'INFO:compiler_version_PATCH_digit_7[6]' +# elif COMPILER_VERSION_PATCH == 7 + PRINT *, 'INFO:compiler_version_PATCH_digit_7[7]' +# elif COMPILER_VERSION_PATCH == 8 + PRINT *, 'INFO:compiler_version_PATCH_digit_7[8]' +# elif COMPILER_VERSION_PATCH == 9 + PRINT *, 'INFO:compiler_version_PATCH_digit_7[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_8(n) +# define HEX(n) HEX_8(n) +# if COMPILER_VERSION_PATCH == 0 + PRINT *, 'INFO:compiler_version_PATCH_digit_8[0]' +# elif COMPILER_VERSION_PATCH == 1 + PRINT *, 'INFO:compiler_version_PATCH_digit_8[1]' +# elif COMPILER_VERSION_PATCH == 2 + PRINT *, 'INFO:compiler_version_PATCH_digit_8[2]' +# elif COMPILER_VERSION_PATCH == 3 + PRINT *, 'INFO:compiler_version_PATCH_digit_8[3]' +# elif COMPILER_VERSION_PATCH == 4 + PRINT *, 'INFO:compiler_version_PATCH_digit_8[4]' +# elif COMPILER_VERSION_PATCH == 5 + PRINT *, 'INFO:compiler_version_PATCH_digit_8[5]' +# elif COMPILER_VERSION_PATCH == 6 + PRINT *, 'INFO:compiler_version_PATCH_digit_8[6]' +# elif COMPILER_VERSION_PATCH == 7 + PRINT *, 'INFO:compiler_version_PATCH_digit_8[7]' +# elif COMPILER_VERSION_PATCH == 8 + PRINT *, 'INFO:compiler_version_PATCH_digit_8[8]' +# elif COMPILER_VERSION_PATCH == 9 + PRINT *, 'INFO:compiler_version_PATCH_digit_8[9]' +# endif + +#endif +#if defined(COMPILER_VERSION_TWEAK) +# undef DEC +# undef HEX +# define DEC(n) DEC_1(n) +# define HEX(n) HEX_1(n) +# if COMPILER_VERSION_TWEAK == 0 + PRINT *, 'INFO:compiler_version_TWEAK_digit_1[0]' +# elif COMPILER_VERSION_TWEAK == 1 + PRINT *, 'INFO:compiler_version_TWEAK_digit_1[1]' +# elif COMPILER_VERSION_TWEAK == 2 + PRINT *, 'INFO:compiler_version_TWEAK_digit_1[2]' +# elif COMPILER_VERSION_TWEAK == 3 + PRINT *, 'INFO:compiler_version_TWEAK_digit_1[3]' +# elif COMPILER_VERSION_TWEAK == 4 + PRINT *, 'INFO:compiler_version_TWEAK_digit_1[4]' +# elif COMPILER_VERSION_TWEAK == 5 + PRINT *, 'INFO:compiler_version_TWEAK_digit_1[5]' +# elif COMPILER_VERSION_TWEAK == 6 + PRINT *, 'INFO:compiler_version_TWEAK_digit_1[6]' +# elif COMPILER_VERSION_TWEAK == 7 + PRINT *, 'INFO:compiler_version_TWEAK_digit_1[7]' +# elif COMPILER_VERSION_TWEAK == 8 + PRINT *, 'INFO:compiler_version_TWEAK_digit_1[8]' +# elif COMPILER_VERSION_TWEAK == 9 + PRINT *, 'INFO:compiler_version_TWEAK_digit_1[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_2(n) +# define HEX(n) HEX_2(n) +# if COMPILER_VERSION_TWEAK == 0 + PRINT *, 'INFO:compiler_version_TWEAK_digit_2[0]' +# elif COMPILER_VERSION_TWEAK == 1 + PRINT *, 'INFO:compiler_version_TWEAK_digit_2[1]' +# elif COMPILER_VERSION_TWEAK == 2 + PRINT *, 'INFO:compiler_version_TWEAK_digit_2[2]' +# elif COMPILER_VERSION_TWEAK == 3 + PRINT *, 'INFO:compiler_version_TWEAK_digit_2[3]' +# elif COMPILER_VERSION_TWEAK == 4 + PRINT *, 'INFO:compiler_version_TWEAK_digit_2[4]' +# elif COMPILER_VERSION_TWEAK == 5 + PRINT *, 'INFO:compiler_version_TWEAK_digit_2[5]' +# elif COMPILER_VERSION_TWEAK == 6 + PRINT *, 'INFO:compiler_version_TWEAK_digit_2[6]' +# elif COMPILER_VERSION_TWEAK == 7 + PRINT *, 'INFO:compiler_version_TWEAK_digit_2[7]' +# elif COMPILER_VERSION_TWEAK == 8 + PRINT *, 'INFO:compiler_version_TWEAK_digit_2[8]' +# elif COMPILER_VERSION_TWEAK == 9 + PRINT *, 'INFO:compiler_version_TWEAK_digit_2[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_3(n) +# define HEX(n) HEX_3(n) +# if COMPILER_VERSION_TWEAK == 0 + PRINT *, 'INFO:compiler_version_TWEAK_digit_3[0]' +# elif COMPILER_VERSION_TWEAK == 1 + PRINT *, 'INFO:compiler_version_TWEAK_digit_3[1]' +# elif COMPILER_VERSION_TWEAK == 2 + PRINT *, 'INFO:compiler_version_TWEAK_digit_3[2]' +# elif COMPILER_VERSION_TWEAK == 3 + PRINT *, 'INFO:compiler_version_TWEAK_digit_3[3]' +# elif COMPILER_VERSION_TWEAK == 4 + PRINT *, 'INFO:compiler_version_TWEAK_digit_3[4]' +# elif COMPILER_VERSION_TWEAK == 5 + PRINT *, 'INFO:compiler_version_TWEAK_digit_3[5]' +# elif COMPILER_VERSION_TWEAK == 6 + PRINT *, 'INFO:compiler_version_TWEAK_digit_3[6]' +# elif COMPILER_VERSION_TWEAK == 7 + PRINT *, 'INFO:compiler_version_TWEAK_digit_3[7]' +# elif COMPILER_VERSION_TWEAK == 8 + PRINT *, 'INFO:compiler_version_TWEAK_digit_3[8]' +# elif COMPILER_VERSION_TWEAK == 9 + PRINT *, 'INFO:compiler_version_TWEAK_digit_3[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_4(n) +# define HEX(n) HEX_4(n) +# if COMPILER_VERSION_TWEAK == 0 + PRINT *, 'INFO:compiler_version_TWEAK_digit_4[0]' +# elif COMPILER_VERSION_TWEAK == 1 + PRINT *, 'INFO:compiler_version_TWEAK_digit_4[1]' +# elif COMPILER_VERSION_TWEAK == 2 + PRINT *, 'INFO:compiler_version_TWEAK_digit_4[2]' +# elif COMPILER_VERSION_TWEAK == 3 + PRINT *, 'INFO:compiler_version_TWEAK_digit_4[3]' +# elif COMPILER_VERSION_TWEAK == 4 + PRINT *, 'INFO:compiler_version_TWEAK_digit_4[4]' +# elif COMPILER_VERSION_TWEAK == 5 + PRINT *, 'INFO:compiler_version_TWEAK_digit_4[5]' +# elif COMPILER_VERSION_TWEAK == 6 + PRINT *, 'INFO:compiler_version_TWEAK_digit_4[6]' +# elif COMPILER_VERSION_TWEAK == 7 + PRINT *, 'INFO:compiler_version_TWEAK_digit_4[7]' +# elif COMPILER_VERSION_TWEAK == 8 + PRINT *, 'INFO:compiler_version_TWEAK_digit_4[8]' +# elif COMPILER_VERSION_TWEAK == 9 + PRINT *, 'INFO:compiler_version_TWEAK_digit_4[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_5(n) +# define HEX(n) HEX_5(n) +# if COMPILER_VERSION_TWEAK == 0 + PRINT *, 'INFO:compiler_version_TWEAK_digit_5[0]' +# elif COMPILER_VERSION_TWEAK == 1 + PRINT *, 'INFO:compiler_version_TWEAK_digit_5[1]' +# elif COMPILER_VERSION_TWEAK == 2 + PRINT *, 'INFO:compiler_version_TWEAK_digit_5[2]' +# elif COMPILER_VERSION_TWEAK == 3 + PRINT *, 'INFO:compiler_version_TWEAK_digit_5[3]' +# elif COMPILER_VERSION_TWEAK == 4 + PRINT *, 'INFO:compiler_version_TWEAK_digit_5[4]' +# elif COMPILER_VERSION_TWEAK == 5 + PRINT *, 'INFO:compiler_version_TWEAK_digit_5[5]' +# elif COMPILER_VERSION_TWEAK == 6 + PRINT *, 'INFO:compiler_version_TWEAK_digit_5[6]' +# elif COMPILER_VERSION_TWEAK == 7 + PRINT *, 'INFO:compiler_version_TWEAK_digit_5[7]' +# elif COMPILER_VERSION_TWEAK == 8 + PRINT *, 'INFO:compiler_version_TWEAK_digit_5[8]' +# elif COMPILER_VERSION_TWEAK == 9 + PRINT *, 'INFO:compiler_version_TWEAK_digit_5[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_6(n) +# define HEX(n) HEX_6(n) +# if COMPILER_VERSION_TWEAK == 0 + PRINT *, 'INFO:compiler_version_TWEAK_digit_6[0]' +# elif COMPILER_VERSION_TWEAK == 1 + PRINT *, 'INFO:compiler_version_TWEAK_digit_6[1]' +# elif COMPILER_VERSION_TWEAK == 2 + PRINT *, 'INFO:compiler_version_TWEAK_digit_6[2]' +# elif COMPILER_VERSION_TWEAK == 3 + PRINT *, 'INFO:compiler_version_TWEAK_digit_6[3]' +# elif COMPILER_VERSION_TWEAK == 4 + PRINT *, 'INFO:compiler_version_TWEAK_digit_6[4]' +# elif COMPILER_VERSION_TWEAK == 5 + PRINT *, 'INFO:compiler_version_TWEAK_digit_6[5]' +# elif COMPILER_VERSION_TWEAK == 6 + PRINT *, 'INFO:compiler_version_TWEAK_digit_6[6]' +# elif COMPILER_VERSION_TWEAK == 7 + PRINT *, 'INFO:compiler_version_TWEAK_digit_6[7]' +# elif COMPILER_VERSION_TWEAK == 8 + PRINT *, 'INFO:compiler_version_TWEAK_digit_6[8]' +# elif COMPILER_VERSION_TWEAK == 9 + PRINT *, 'INFO:compiler_version_TWEAK_digit_6[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_7(n) +# define HEX(n) HEX_7(n) +# if COMPILER_VERSION_TWEAK == 0 + PRINT *, 'INFO:compiler_version_TWEAK_digit_7[0]' +# elif COMPILER_VERSION_TWEAK == 1 + PRINT *, 'INFO:compiler_version_TWEAK_digit_7[1]' +# elif COMPILER_VERSION_TWEAK == 2 + PRINT *, 'INFO:compiler_version_TWEAK_digit_7[2]' +# elif COMPILER_VERSION_TWEAK == 3 + PRINT *, 'INFO:compiler_version_TWEAK_digit_7[3]' +# elif COMPILER_VERSION_TWEAK == 4 + PRINT *, 'INFO:compiler_version_TWEAK_digit_7[4]' +# elif COMPILER_VERSION_TWEAK == 5 + PRINT *, 'INFO:compiler_version_TWEAK_digit_7[5]' +# elif COMPILER_VERSION_TWEAK == 6 + PRINT *, 'INFO:compiler_version_TWEAK_digit_7[6]' +# elif COMPILER_VERSION_TWEAK == 7 + PRINT *, 'INFO:compiler_version_TWEAK_digit_7[7]' +# elif COMPILER_VERSION_TWEAK == 8 + PRINT *, 'INFO:compiler_version_TWEAK_digit_7[8]' +# elif COMPILER_VERSION_TWEAK == 9 + PRINT *, 'INFO:compiler_version_TWEAK_digit_7[9]' +# endif + +# undef DEC +# undef HEX +# define DEC(n) DEC_8(n) +# define HEX(n) HEX_8(n) +# if COMPILER_VERSION_TWEAK == 0 + PRINT *, 'INFO:compiler_version_TWEAK_digit_8[0]' +# elif COMPILER_VERSION_TWEAK == 1 + PRINT *, 'INFO:compiler_version_TWEAK_digit_8[1]' +# elif COMPILER_VERSION_TWEAK == 2 + PRINT *, 'INFO:compiler_version_TWEAK_digit_8[2]' +# elif COMPILER_VERSION_TWEAK == 3 + PRINT *, 'INFO:compiler_version_TWEAK_digit_8[3]' +# elif COMPILER_VERSION_TWEAK == 4 + PRINT *, 'INFO:compiler_version_TWEAK_digit_8[4]' +# elif COMPILER_VERSION_TWEAK == 5 + PRINT *, 'INFO:compiler_version_TWEAK_digit_8[5]' +# elif COMPILER_VERSION_TWEAK == 6 + PRINT *, 'INFO:compiler_version_TWEAK_digit_8[6]' +# elif COMPILER_VERSION_TWEAK == 7 + PRINT *, 'INFO:compiler_version_TWEAK_digit_8[7]' +# elif COMPILER_VERSION_TWEAK == 8 + PRINT *, 'INFO:compiler_version_TWEAK_digit_8[8]' +# elif COMPILER_VERSION_TWEAK == 9 + PRINT *, 'INFO:compiler_version_TWEAK_digit_8[9]' +# endif + +#endif + + END diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/CMakeDirectoryInformation.cmake b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 00000000..7ba6a1e4 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran") + +# Force unix paths in dependencies. +set(CMAKE_FORCE_UNIX_PATHS 1) + + +# The C and CXX include file regular expressions for this directory. +set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/CMakeOutput.log b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/CMakeOutput.log new file mode 100644 index 00000000..021c3a35 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/CMakeOutput.log @@ -0,0 +1,218 @@ +The system is: Linux - 4.4.0-104-generic - x86_64 +Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" succeeded. +Compiler: /usr/bin/mpif90 +Build flags: +Id flags: -v + +The output was: +0 +Driving: /usr/bin/gfortran -v CMakeFortranCompilerId.F -I/usr/lib/openmpi/include -pthread -I/usr/lib/openmpi/lib -Wl,-rpath -Wl,/usr/lib/openmpi/lib -Wl,--enable-new-dtags -L/usr/lib/openmpi/lib -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -l gfortran -l m -shared-libgcc +Using built-in specs. +COLLECT_GCC=/usr/bin/gfortran +COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper +Target: x86_64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.5' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu +Thread model: posix +gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.5) +COLLECT_GCC_OPTIONS='-v' '-I' '/usr/lib/openmpi/include' '-pthread' '-I' '/usr/lib/openmpi/lib' '-L/usr/lib/openmpi/lib' '-shared-libgcc' '-mtune=generic' '-march=x86-64' + /usr/lib/gcc/x86_64-linux-gnu/5/f951 CMakeFortranCompilerId.F -ffixed-form -cpp=/tmp/ccFQI2fl.f90 -quiet -v -I /usr/lib/openmpi/include -I /usr/lib/openmpi/lib -imultiarch x86_64-linux-gnu -D_REENTRANT CMakeFortranCompilerId.F -quiet -dumpbase CMakeFortranCompilerId.F -mtune=generic -march=x86-64 -auxbase CMakeFortranCompilerId -version -fintrinsic-modules-path /usr/lib/gcc/x86_64-linux-gnu/5/finclude -o /tmp/cc8Q20sw.s +GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.5) version 5.4.0 20160609 (x86_64-linux-gnu) + compiled by GNU C version 5.4.0 20160609, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3 +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu" +ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/5/../../../../x86_64-linux-gnu/include" +#include "..." search starts here: +#include <...> search starts here: + /usr/lib/openmpi/include + /usr/lib/openmpi/lib + /usr/lib/gcc/x86_64-linux-gnu/5/finclude + /usr/lib/gcc/x86_64-linux-gnu/5/include + /usr/local/include + /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed + /usr/include/x86_64-linux-gnu + /usr/include +End of search list. +GNU Fortran2008 (Ubuntu 5.4.0-6ubuntu1~16.04.5) version 5.4.0 20160609 (x86_64-linux-gnu) + compiled by GNU C version 5.4.0 20160609, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3 +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +COLLECT_GCC_OPTIONS='-v' '-I' '/usr/lib/openmpi/include' '-pthread' '-I' '/usr/lib/openmpi/lib' '-L/usr/lib/openmpi/lib' '-shared-libgcc' '-mtune=generic' '-march=x86-64' + as -v -I /usr/lib/openmpi/include -I /usr/lib/openmpi/lib --64 -o /tmp/cc5CEDIH.o /tmp/cc8Q20sw.s +GNU assembler version 2.26.1 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.26.1 +Reading specs from /usr/lib/gcc/x86_64-linux-gnu/5/libgfortran.spec +rename spec lib to liborig +COLLECT_GCC_OPTIONS='-v' '-I' '/usr/lib/openmpi/include' '-pthread' '-I' '/usr/lib/openmpi/lib' '-L/usr/lib/openmpi/lib' '-shared-libgcc' '-mtune=generic' '-march=x86-64' +COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/ +LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-I' '/usr/lib/openmpi/include' '-pthread' '-I' '/usr/lib/openmpi/lib' '-L/usr/lib/openmpi/lib' '-shared-libgcc' '-mtune=generic' '-march=x86-64' + /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/ccgWe2YS.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lquadmath -plugin-opt=-pass-through=-lm -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib/openmpi/lib -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. /tmp/cc5CEDIH.o -rpath /usr/lib/openmpi/lib --enable-new-dtags -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lm -lgcc_s -lgcc -lquadmath -lm -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o + + +Compilation of the Fortran compiler identification source "CMakeFortranCompilerId.F" produced "a.out" + +The Fortran compiler identification is GNU, found in "/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/3.5.1/CompilerIdFortran/a.out" + +Determining if the Fortran compiler works passed with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_2685a/fast" +/usr/bin/make -f CMakeFiles/cmTC_2685a.dir/build.make CMakeFiles/cmTC_2685a.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/CMakeTmp' +Building Fortran object CMakeFiles/cmTC_2685a.dir/testFortranCompiler.f.o +/usr/bin/mpif90 -c /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/CMakeTmp/testFortranCompiler.f -o CMakeFiles/cmTC_2685a.dir/testFortranCompiler.f.o +Linking Fortran executable cmTC_2685a +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_2685a.dir/link.txt --verbose=1 +/usr/bin/mpif90 CMakeFiles/cmTC_2685a.dir/testFortranCompiler.f.o -o cmTC_2685a +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/CMakeTmp' + + +Detecting Fortran compiler ABI info compiled with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_7dc99/fast" +/usr/bin/make -f CMakeFiles/cmTC_7dc99.dir/build.make CMakeFiles/cmTC_7dc99.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/CMakeTmp' +Building Fortran object CMakeFiles/cmTC_7dc99.dir/CMakeFortranCompilerABI.F.o +/usr/bin/mpif90 -c /usr/share/cmake-3.5/Modules/CMakeFortranCompilerABI.F -o CMakeFiles/cmTC_7dc99.dir/CMakeFortranCompilerABI.F.o +Linking Fortran executable cmTC_7dc99 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_7dc99.dir/link.txt --verbose=1 +/usr/bin/mpif90 -v CMakeFiles/cmTC_7dc99.dir/CMakeFortranCompilerABI.F.o -o cmTC_7dc99 +Driving: /usr/bin/gfortran -v CMakeFiles/cmTC_7dc99.dir/CMakeFortranCompilerABI.F.o -o cmTC_7dc99 -I/usr/lib/openmpi/include -pthread -I/usr/lib/openmpi/lib -Wl,-rpath -Wl,/usr/lib/openmpi/lib -Wl,--enable-new-dtags -L/usr/lib/openmpi/lib -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -l gfortran -l m -shared-libgcc +Using built-in specs. +COLLECT_GCC=/usr/bin/gfortran +COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper +Target: x86_64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.5' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu +Thread model: posix +gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.5) +Reading specs from /usr/lib/gcc/x86_64-linux-gnu/5/libgfortran.spec +rename spec lib to liborig +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_7dc99' '-I' '/usr/lib/openmpi/include' '-pthread' '-I' '/usr/lib/openmpi/lib' '-L/usr/lib/openmpi/lib' '-shared-libgcc' '-mtune=generic' '-march=x86-64' +COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/ +LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_7dc99' '-I' '/usr/lib/openmpi/include' '-pthread' '-I' '/usr/lib/openmpi/lib' '-L/usr/lib/openmpi/lib' '-shared-libgcc' '-mtune=generic' '-march=x86-64' + /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/cczxqjMq.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lquadmath -plugin-opt=-pass-through=-lm -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o cmTC_7dc99 /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib/openmpi/lib -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. CMakeFiles/cmTC_7dc99.dir/CMakeFortranCompilerABI.F.o -rpath /usr/lib/openmpi/lib --enable-new-dtags -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lm -lgcc_s -lgcc -lquadmath -lm -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/CMakeTmp' + + +Parsed Fortran implicit link information from above output: + link line regex: [^( *|.*[/\])(ld|([^/\]+-)?ld|collect2)[^/\]*( |$)] + ignore line: [Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/CMakeTmp] + ignore line: [] + ignore line: [Run Build Command:"/usr/bin/make" "cmTC_7dc99/fast"] + ignore line: [/usr/bin/make -f CMakeFiles/cmTC_7dc99.dir/build.make CMakeFiles/cmTC_7dc99.dir/build] + ignore line: [make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/CMakeTmp'] + ignore line: [Building Fortran object CMakeFiles/cmTC_7dc99.dir/CMakeFortranCompilerABI.F.o] + ignore line: [/usr/bin/mpif90 -c /usr/share/cmake-3.5/Modules/CMakeFortranCompilerABI.F -o CMakeFiles/cmTC_7dc99.dir/CMakeFortranCompilerABI.F.o] + ignore line: [Linking Fortran executable cmTC_7dc99] + ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_7dc99.dir/link.txt --verbose=1] + ignore line: [/usr/bin/mpif90 -v CMakeFiles/cmTC_7dc99.dir/CMakeFortranCompilerABI.F.o -o cmTC_7dc99 ] + ignore line: [Driving: /usr/bin/gfortran -v CMakeFiles/cmTC_7dc99.dir/CMakeFortranCompilerABI.F.o -o cmTC_7dc99 -I/usr/lib/openmpi/include -pthread -I/usr/lib/openmpi/lib -Wl,-rpath -Wl,/usr/lib/openmpi/lib -Wl,--enable-new-dtags -L/usr/lib/openmpi/lib -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -l gfortran -l m -shared-libgcc] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/gfortran] + ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper] + ignore line: [Target: x86_64-linux-gnu] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.5' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu] + ignore line: [Thread model: posix] + ignore line: [gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.5) ] + ignore line: [Reading specs from /usr/lib/gcc/x86_64-linux-gnu/5/libgfortran.spec] + ignore line: [rename spec lib to liborig] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_7dc99' '-I' '/usr/lib/openmpi/include' '-pthread' '-I' '/usr/lib/openmpi/lib' '-L/usr/lib/openmpi/lib' '-shared-libgcc' '-mtune=generic' '-march=x86-64'] + ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_7dc99' '-I' '/usr/lib/openmpi/include' '-pthread' '-I' '/usr/lib/openmpi/lib' '-L/usr/lib/openmpi/lib' '-shared-libgcc' '-mtune=generic' '-march=x86-64'] + link line: [ /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/cczxqjMq.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lquadmath -plugin-opt=-pass-through=-lm -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o cmTC_7dc99 /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib/openmpi/lib -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. CMakeFiles/cmTC_7dc99.dir/CMakeFortranCompilerABI.F.o -rpath /usr/lib/openmpi/lib --enable-new-dtags -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lm -lgcc_s -lgcc -lquadmath -lm -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o] + arg [/usr/lib/gcc/x86_64-linux-gnu/5/collect2] ==> ignore + arg [-plugin] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so] ==> ignore + arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper] ==> ignore + arg [-plugin-opt=-fresolution=/tmp/cczxqjMq.res] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lquadmath] ==> ignore + arg [-plugin-opt=-pass-through=-lm] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lpthread] ==> ignore + arg [-plugin-opt=-pass-through=-lc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [--sysroot=/] ==> ignore + arg [--build-id] ==> ignore + arg [--eh-frame-hdr] ==> ignore + arg [-m] ==> ignore + arg [elf_x86_64] ==> ignore + arg [--hash-style=gnu] ==> ignore + arg [--as-needed] ==> ignore + arg [-dynamic-linker] ==> ignore + arg [/lib64/ld-linux-x86-64.so.2] ==> ignore + arg [-zrelro] ==> ignore + arg [-o] ==> ignore + arg [cmTC_7dc99] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o] ==> ignore + arg [-L/usr/lib/openmpi/lib] ==> dir [/usr/lib/openmpi/lib] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/5] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] + arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu] + arg [-L/lib/../lib] ==> dir [/lib/../lib] + arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu] + arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../..] + arg [CMakeFiles/cmTC_7dc99.dir/CMakeFortranCompilerABI.F.o] ==> ignore + arg [-rpath] ==> ignore + arg [/usr/lib/openmpi/lib] ==> ignore + arg [--enable-new-dtags] ==> ignore + arg [-lmpi_usempif08] ==> lib [mpi_usempif08] + arg [-lmpi_usempi_ignore_tkr] ==> lib [mpi_usempi_ignore_tkr] + arg [-lmpi_mpifh] ==> lib [mpi_mpifh] + arg [-lmpi] ==> lib [mpi] + arg [-lgfortran] ==> lib [gfortran] + arg [-lm] ==> lib [m] + arg [-lgcc_s] ==> lib [gcc_s] + arg [-lgcc] ==> lib [gcc] + arg [-lquadmath] ==> lib [quadmath] + arg [-lm] ==> lib [m] + arg [-lgcc_s] ==> lib [gcc_s] + arg [-lgcc] ==> lib [gcc] + arg [-lpthread] ==> lib [pthread] + arg [-lc] ==> lib [c] + arg [-lgcc_s] ==> lib [gcc_s] + arg [-lgcc] ==> lib [gcc] + arg [/usr/lib/gcc/x86_64-linux-gnu/5/crtend.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o] ==> ignore + remove lib [gcc_s] + remove lib [gcc] + remove lib [gcc_s] + remove lib [gcc] + remove lib [gcc_s] + remove lib [gcc] + collapse library dir [/usr/lib/openmpi/lib] ==> [/usr/lib/openmpi/lib] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5] ==> [/usr/lib/gcc/x86_64-linux-gnu/5] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] ==> [/usr/lib] + collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu] + collapse library dir [/lib/../lib] ==> [/lib] + collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse library dir [/usr/lib/../lib] ==> [/usr/lib] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../..] ==> [/usr/lib] + implicit libs: [mpi_usempif08;mpi_usempi_ignore_tkr;mpi_mpifh;mpi;gfortran;m;quadmath;m;pthread;c] + implicit dirs: [/usr/lib/openmpi/lib;/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib] + implicit fwks: [] + + +Determining if the Fortran compiler supports Fortran 90 passed with the following output: +Change Dir: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_99e48/fast" +/usr/bin/make -f CMakeFiles/cmTC_99e48.dir/build.make CMakeFiles/cmTC_99e48.dir/build +make[1]: Entering directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/CMakeTmp' +Building Fortran object CMakeFiles/cmTC_99e48.dir/testFortranCompilerF90.f90.o +/usr/bin/mpif90 -c /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/CMakeTmp/testFortranCompilerF90.f90 -o CMakeFiles/cmTC_99e48.dir/testFortranCompilerF90.f90.o +Linking Fortran executable cmTC_99e48 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_99e48.dir/link.txt --verbose=1 +/usr/bin/mpif90 CMakeFiles/cmTC_99e48.dir/testFortranCompilerF90.f90.o -o cmTC_99e48 +make[1]: Leaving directory '/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/CMakeTmp' + + diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/Makefile.cmake b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/Makefile.cmake new file mode 100644 index 00000000..39f9bfcb --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/Makefile.cmake @@ -0,0 +1,59 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# The generator used is: +set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") + +# The top level Makefile was generated from the following files: +set(CMAKE_MAKEFILE_DEPENDS + "CMakeCache.txt" + "CMakeFiles/3.5.1/CMakeFortranCompiler.cmake" + "CMakeFiles/3.5.1/CMakeSystem.cmake" + "CMakeLists.txt" + "/usr/share/cmake-3.5/Modules/CMakeCommonLanguageInclude.cmake" + "/usr/share/cmake-3.5/Modules/CMakeCompilerIdDetection.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineCompilerABI.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineCompilerId.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineFortranCompiler.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineSystem.cmake" + "/usr/share/cmake-3.5/Modules/CMakeFindBinUtils.cmake" + "/usr/share/cmake-3.5/Modules/CMakeFortranCompiler.cmake.in" + "/usr/share/cmake-3.5/Modules/CMakeFortranCompilerABI.F" + "/usr/share/cmake-3.5/Modules/CMakeFortranInformation.cmake" + "/usr/share/cmake-3.5/Modules/CMakeGenericSystem.cmake" + "/usr/share/cmake-3.5/Modules/CMakeLanguageInformation.cmake" + "/usr/share/cmake-3.5/Modules/CMakeParseArguments.cmake" + "/usr/share/cmake-3.5/Modules/CMakeParseImplicitLinkInfo.cmake" + "/usr/share/cmake-3.5/Modules/CMakeSystem.cmake.in" + "/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInformation.cmake" + "/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInitialize.cmake" + "/usr/share/cmake-3.5/Modules/CMakeTestCompilerCommon.cmake" + "/usr/share/cmake-3.5/Modules/CMakeTestFortranCompiler.cmake" + "/usr/share/cmake-3.5/Modules/CMakeUnixFindMake.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/GNU-Fortran.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/GNU.cmake" + "/usr/share/cmake-3.5/Modules/MultiArchCross.cmake" + "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU-Fortran.cmake" + "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU.cmake" + "/usr/share/cmake-3.5/Modules/Platform/Linux.cmake" + "/usr/share/cmake-3.5/Modules/Platform/UnixPaths.cmake" + ) + +# The corresponding makefile is: +set(CMAKE_MAKEFILE_OUTPUTS + "Makefile" + "CMakeFiles/cmake.check_cache" + ) + +# Byproducts of CMake generate step: +set(CMAKE_MAKEFILE_PRODUCTS + "CMakeFiles/3.5.1/CMakeSystem.cmake" + "CMakeFiles/3.5.1/CMakeFortranCompiler.cmake" + "CMakeFiles/3.5.1/CMakeFortranCompiler.cmake" + "CMakeFiles/CMakeDirectoryInformation.cmake" + ) + +# Dependency information for all targets: +set(CMAKE_DEPEND_INFO_FILES + ) diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/Makefile2 b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/Makefile2 new file mode 100644 index 00000000..74e34535 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/Makefile2 @@ -0,0 +1,71 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# Default target executed when no arguments are given to make. +default_target: all + +.PHONY : default_target + +# The main recursive all target +all: + +.PHONY : all + +# The main recursive preinstall target +preinstall: + +.PHONY : preinstall + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/TargetDirectories.txt b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/TargetDirectories.txt new file mode 100644 index 00000000..b3a21616 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/TargetDirectories.txt @@ -0,0 +1,2 @@ +/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/edit_cache.dir +/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/rebuild_cache.dir diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/cmake.check_cache b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/cmake.check_cache new file mode 100644 index 00000000..3dccd731 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/cmake.check_cache @@ -0,0 +1 @@ +# This file is generated by cmake for dependency checking of the CMakeCache.txt file diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/progress.marks b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/progress.marks new file mode 100644 index 00000000..573541ac --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/progress.marks @@ -0,0 +1 @@ +0 diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeLists.txt b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeLists.txt new file mode 100644 index 00000000..fbb3b4a2 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeLists.txt @@ -0,0 +1,8 @@ + + cmake_minimum_required(VERSION 3.0) + project(verify_mpi_compat VERSION 1.0 LANGUAGES Fortran) + file(WRITE compiler_info.cmake " + set(MPI_Fortran_COMPILER_VERSION ${CMAKE_Fortran_COMPILER_VERSION}) + set(MPI_Fortran_COMPILER_ID ${CMAKE_Fortran_COMPILER_ID}) + ") + \ No newline at end of file diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/Makefile b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/Makefile new file mode 100644 index 00000000..0ebed540 --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/Makefile @@ -0,0 +1,134 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# Default target executed when no arguments are given to make. +default_target: all + +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." + /usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache + +.PHONY : edit_cache/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache + +.PHONY : rebuild_cache/fast + +# The main all target +all: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles/progress.marks + $(MAKE) -f CMakeFiles/Makefile2 all + $(CMAKE_COMMAND) -E cmake_progress_start /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + $(MAKE) -f CMakeFiles/Makefile2 clean +.PHONY : clean + +# The main clean target +clean/fast: clean + +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + $(MAKE) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + $(MAKE) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... edit_cache" + @echo "... rebuild_cache" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/cmake_install.cmake b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/cmake_install.cmake new file mode 100644 index 00000000..a605f26b --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/cmake_install.cmake @@ -0,0 +1,44 @@ +# Install script for directory: /store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "1") +endif() + +if(CMAKE_INSTALL_COMPONENT) + set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") +else() + set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") +endif() + +string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT + "${CMAKE_INSTALL_MANIFEST_FILES}") +file(WRITE "/store/software/opencmiss/OpenCMISS-examples/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/${CMAKE_INSTALL_MANIFEST}" + "${CMAKE_INSTALL_MANIFEST_CONTENT}") diff --git a/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/compiler_info.cmake b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/compiler_info.cmake new file mode 100644 index 00000000..b319d33e --- /dev/null +++ b/FiniteElasticity/RightBiceps/build_debug/mpi_verification/Fortran/compiler_info.cmake @@ -0,0 +1,4 @@ + + set(MPI_Fortran_COMPILER_VERSION 5.4.0) + set(MPI_Fortran_COMPILER_ID GNU) + \ No newline at end of file diff --git a/FiniteElasticity/SimpleShear/CMakeLists.txt b/FiniteElasticity/SimpleShear/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/SimpleShear/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/SimpleShear/Fortran/CMakeLists.txt b/FiniteElasticity/SimpleShear/Fortran/CMakeLists.txt new file mode 100644 index 00000000..7a542bb0 --- /dev/null +++ b/FiniteElasticity/SimpleShear/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(SimpleShear src/FortranExample.f90 src/FortranExample_nearly.f90 src/FortranExample_incomp.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(SimpleShear PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(SimpleShear PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_SimpleShear COMMAND SimpleShear) +add_opencmiss_environment(test_SimpleShear) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/SimpleShear/OpenCMISS.cmake b/FiniteElasticity/SimpleShear/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/SimpleShear/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/SimpleShear/build_debug/build.sh b/FiniteElasticity/SimpleShear/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/SimpleShear/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/SimplexElements/LargeQuadraticTet/CMakeLists.txt b/FiniteElasticity/SimplexElements/LargeQuadraticTet/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/SimplexElements/LargeQuadraticTet/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/SimplexElements/LargeQuadraticTet/Fortran/CMakeLists.txt b/FiniteElasticity/SimplexElements/LargeQuadraticTet/Fortran/CMakeLists.txt new file mode 100644 index 00000000..80abbcf7 --- /dev/null +++ b/FiniteElasticity/SimplexElements/LargeQuadraticTet/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(LargeQuadraticTet src/LargeQuadraticTetExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(LargeQuadraticTet PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(LargeQuadraticTet PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_LargeQuadraticTet COMMAND LargeQuadraticTet) +add_opencmiss_environment(test_LargeQuadraticTet) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/SimplexElements/LargeQuadraticTet/src/LargeQuadraticTetExample.f90 b/FiniteElasticity/SimplexElements/LargeQuadraticTet/Fortran/src/LargeQuadraticTetExample.f90 similarity index 100% rename from FiniteElasticity/SimplexElements/LargeQuadraticTet/src/LargeQuadraticTetExample.f90 rename to FiniteElasticity/SimplexElements/LargeQuadraticTet/Fortran/src/LargeQuadraticTetExample.f90 diff --git a/FiniteElasticity/SimplexElements/LargeQuadraticTet/OpenCMISS.cmake b/FiniteElasticity/SimplexElements/LargeQuadraticTet/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/SimplexElements/LargeQuadraticTet/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/SimplexElements/LargeQuadraticTet/build_debug/build.sh b/FiniteElasticity/SimplexElements/LargeQuadraticTet/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/SimplexElements/LargeQuadraticTet/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/SimplexElements/LinearTet/CMakeLists.txt b/FiniteElasticity/SimplexElements/LinearTet/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/SimplexElements/LinearTet/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/SimplexElements/LinearTet/Fortran/CMakeLists.txt b/FiniteElasticity/SimplexElements/LinearTet/Fortran/CMakeLists.txt new file mode 100644 index 00000000..5dcf3560 --- /dev/null +++ b/FiniteElasticity/SimplexElements/LinearTet/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(LinearTet src/LinearTetExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(LinearTet PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(LinearTet PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_LinearTet COMMAND LinearTet) +add_opencmiss_environment(test_LinearTet) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/SimplexElements/LinearTet/src/LinearTetExample.f90 b/FiniteElasticity/SimplexElements/LinearTet/Fortran/src/LinearTetExample.f90 similarity index 100% rename from FiniteElasticity/SimplexElements/LinearTet/src/LinearTetExample.f90 rename to FiniteElasticity/SimplexElements/LinearTet/Fortran/src/LinearTetExample.f90 diff --git a/FiniteElasticity/SimplexElements/LinearTet/OpenCMISS.cmake b/FiniteElasticity/SimplexElements/LinearTet/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/SimplexElements/LinearTet/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/SimplexElements/LinearTet/build_debug/build.sh b/FiniteElasticity/SimplexElements/LinearTet/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/SimplexElements/LinearTet/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/SimplexElements/QuadraticTet/CMakeLists.txt b/FiniteElasticity/SimplexElements/QuadraticTet/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/SimplexElements/QuadraticTet/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/SimplexElements/QuadraticTet/Fortran/CMakeLists.txt b/FiniteElasticity/SimplexElements/QuadraticTet/Fortran/CMakeLists.txt new file mode 100644 index 00000000..2692ef0f --- /dev/null +++ b/FiniteElasticity/SimplexElements/QuadraticTet/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(QuadraticTet src/QuadraticTetExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(QuadraticTet PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(QuadraticTet PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_QuadraticTet COMMAND QuadraticTet) +add_opencmiss_environment(test_QuadraticTet) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/SimplexElements/QuadraticTet/src/QuadraticTetExample.f90 b/FiniteElasticity/SimplexElements/QuadraticTet/Fortran/src/QuadraticTetExample.f90 similarity index 100% rename from FiniteElasticity/SimplexElements/QuadraticTet/src/QuadraticTetExample.f90 rename to FiniteElasticity/SimplexElements/QuadraticTet/Fortran/src/QuadraticTetExample.f90 diff --git a/FiniteElasticity/SimplexElements/QuadraticTet/OpenCMISS.cmake b/FiniteElasticity/SimplexElements/QuadraticTet/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/SimplexElements/QuadraticTet/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/SimplexElements/QuadraticTet/build_debug/build.sh b/FiniteElasticity/SimplexElements/QuadraticTet/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/SimplexElements/QuadraticTet/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/TriCubicAxialExtension/CMakeLists.txt b/FiniteElasticity/TriCubicAxialExtension/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/TriCubicAxialExtension/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/TriCubicAxialExtension/Fortran/CMakeLists.txt b/FiniteElasticity/TriCubicAxialExtension/Fortran/CMakeLists.txt new file mode 100644 index 00000000..e1ff9219 --- /dev/null +++ b/FiniteElasticity/TriCubicAxialExtension/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(TriCubicAxialExtension src/TriCubicAxialExtensionExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(TriCubicAxialExtension PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(TriCubicAxialExtension PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_TriCubicAxialExtension COMMAND TriCubicAxialExtension) +add_opencmiss_environment(test_TriCubicAxialExtension) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/TriCubicAxialExtension/src/TriCubicAxialExtensionExample.f90 b/FiniteElasticity/TriCubicAxialExtension/Fortran/src/TriCubicAxialExtensionExample.f90 similarity index 100% rename from FiniteElasticity/TriCubicAxialExtension/src/TriCubicAxialExtensionExample.f90 rename to FiniteElasticity/TriCubicAxialExtension/Fortran/src/TriCubicAxialExtensionExample.f90 diff --git a/FiniteElasticity/TriCubicAxialExtension/OpenCMISS.cmake b/FiniteElasticity/TriCubicAxialExtension/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/TriCubicAxialExtension/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/TriCubicAxialExtension/build_debug/build.sh b/FiniteElasticity/TriCubicAxialExtension/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/TriCubicAxialExtension/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/TriQuadraticCube/CMakeLists.txt b/FiniteElasticity/TriQuadraticCube/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/TriQuadraticCube/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/TriQuadraticCube/Fortran/CMakeLists.txt b/FiniteElasticity/TriQuadraticCube/Fortran/CMakeLists.txt new file mode 100644 index 00000000..17c695e0 --- /dev/null +++ b/FiniteElasticity/TriQuadraticCube/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(TriQuadraticCube src/TriQuadraticCubeExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(TriQuadraticCube PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(TriQuadraticCube PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_TriQuadraticCube COMMAND TriQuadraticCube) +add_opencmiss_environment(test_TriQuadraticCube) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/TriQuadraticCube/src/TriQuadraticCubeExample.f90 b/FiniteElasticity/TriQuadraticCube/Fortran/src/TriQuadraticCubeExample.f90 similarity index 100% rename from FiniteElasticity/TriQuadraticCube/src/TriQuadraticCubeExample.f90 rename to FiniteElasticity/TriQuadraticCube/Fortran/src/TriQuadraticCubeExample.f90 diff --git a/FiniteElasticity/TriQuadraticCube/OpenCMISS.cmake b/FiniteElasticity/TriQuadraticCube/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/TriQuadraticCube/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/TriQuadraticCube/build_debug/build.sh b/FiniteElasticity/TriQuadraticCube/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/TriQuadraticCube/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/UniAxialExtension/CMakeLists.txt b/FiniteElasticity/UniAxialExtension/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/UniAxialExtension/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/UniAxialExtension/Fortran/CMakeLists.txt b/FiniteElasticity/UniAxialExtension/Fortran/CMakeLists.txt new file mode 100644 index 00000000..175c27eb --- /dev/null +++ b/FiniteElasticity/UniAxialExtension/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(UniAxialExtension src/FortranExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(UniAxialExtension PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(UniAxialExtension PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_UniAxialExtension COMMAND UniAxialExtension) +add_opencmiss_environment(test_UniAxialExtension) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/UniAxialExtension/OpenCMISS.cmake b/FiniteElasticity/UniAxialExtension/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/UniAxialExtension/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/UniAxialExtension/build_debug/build.sh b/FiniteElasticity/UniAxialExtension/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/UniAxialExtension/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/UniAxialExtensionCompressible/CMakeLists.txt b/FiniteElasticity/UniAxialExtensionCompressible/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/UniAxialExtensionCompressible/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/UniAxialExtensionCompressible/Fortran/CMakeLists.txt b/FiniteElasticity/UniAxialExtensionCompressible/Fortran/CMakeLists.txt new file mode 100644 index 00000000..cce5a3bf --- /dev/null +++ b/FiniteElasticity/UniAxialExtensionCompressible/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(UniAxialExtensionCompressible src/UniAxialExtensionCompressibleExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(UniAxialExtensionCompressible PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(UniAxialExtensionCompressible PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_UniAxialExtensionCompressible COMMAND UniAxialExtensionCompressible) +add_opencmiss_environment(test_UniAxialExtensionCompressible) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/UniAxialExtensionCompressible/src/UniAxialExtensionCompressibleExample.f90 b/FiniteElasticity/UniAxialExtensionCompressible/Fortran/src/UniAxialExtensionCompressibleExample.f90 similarity index 100% rename from FiniteElasticity/UniAxialExtensionCompressible/src/UniAxialExtensionCompressibleExample.f90 rename to FiniteElasticity/UniAxialExtensionCompressible/Fortran/src/UniAxialExtensionCompressibleExample.f90 diff --git a/FiniteElasticity/UniAxialExtensionCompressible/OpenCMISS.cmake b/FiniteElasticity/UniAxialExtensionCompressible/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/UniAxialExtensionCompressible/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/UniAxialExtensionCompressible/build_debug/build.sh b/FiniteElasticity/UniAxialExtensionCompressible/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/UniAxialExtensionCompressible/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/UniAxialExtensionLoadIncrements/CMakeLists.txt b/FiniteElasticity/UniAxialExtensionLoadIncrements/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/UniAxialExtensionLoadIncrements/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/UniAxialExtensionLoadIncrements/Fortran/CMakeLists.txt b/FiniteElasticity/UniAxialExtensionLoadIncrements/Fortran/CMakeLists.txt new file mode 100644 index 00000000..7085b43f --- /dev/null +++ b/FiniteElasticity/UniAxialExtensionLoadIncrements/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(UniAxialExtensionLoadIncrements src/UniAxialExtensionLoadIncrementsExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(UniAxialExtensionLoadIncrements PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(UniAxialExtensionLoadIncrements PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_UniAxialExtensionLoadIncrements COMMAND UniAxialExtensionLoadIncrements) +add_opencmiss_environment(test_UniAxialExtensionLoadIncrements) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/UniAxialExtensionLoadIncrements/src/UniAxialExtensionLoadIncrementsExample.f90 b/FiniteElasticity/UniAxialExtensionLoadIncrements/Fortran/src/UniAxialExtensionLoadIncrementsExample.f90 similarity index 100% rename from FiniteElasticity/UniAxialExtensionLoadIncrements/src/UniAxialExtensionLoadIncrementsExample.f90 rename to FiniteElasticity/UniAxialExtensionLoadIncrements/Fortran/src/UniAxialExtensionLoadIncrementsExample.f90 diff --git a/FiniteElasticity/UniAxialExtensionLoadIncrements/OpenCMISS.cmake b/FiniteElasticity/UniAxialExtensionLoadIncrements/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/UniAxialExtensionLoadIncrements/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/UniAxialExtensionLoadIncrements/build_debug/build.sh b/FiniteElasticity/UniAxialExtensionLoadIncrements/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/UniAxialExtensionLoadIncrements/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/UniAxialExtensionOrthotropic/CMakeLists.txt b/FiniteElasticity/UniAxialExtensionOrthotropic/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/UniAxialExtensionOrthotropic/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/UniAxialExtensionOrthotropic/Fortran/CMakeLists.txt b/FiniteElasticity/UniAxialExtensionOrthotropic/Fortran/CMakeLists.txt new file mode 100644 index 00000000..cbcec4f2 --- /dev/null +++ b/FiniteElasticity/UniAxialExtensionOrthotropic/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(UniAxialExtensionOrthotropic src/UniAxialExtensionOrthotropicExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(UniAxialExtensionOrthotropic PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(UniAxialExtensionOrthotropic PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_UniAxialExtensionOrthotropic COMMAND UniAxialExtensionOrthotropic) +add_opencmiss_environment(test_UniAxialExtensionOrthotropic) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/UniAxialExtensionOrthotropic/src/UniAxialExtensionOrthotropicExample.f90 b/FiniteElasticity/UniAxialExtensionOrthotropic/Fortran/src/UniAxialExtensionOrthotropicExample.f90 similarity index 100% rename from FiniteElasticity/UniAxialExtensionOrthotropic/src/UniAxialExtensionOrthotropicExample.f90 rename to FiniteElasticity/UniAxialExtensionOrthotropic/Fortran/src/UniAxialExtensionOrthotropicExample.f90 diff --git a/FiniteElasticity/UniAxialExtensionOrthotropic/OpenCMISS.cmake b/FiniteElasticity/UniAxialExtensionOrthotropic/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/UniAxialExtensionOrthotropic/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/UniAxialExtensionOrthotropic/build_debug/build.sh b/FiniteElasticity/UniAxialExtensionOrthotropic/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/UniAxialExtensionOrthotropic/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FiniteElasticity/testingPoints/CMakeLists.txt b/FiniteElasticity/testingPoints/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FiniteElasticity/testingPoints/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FiniteElasticity/testingPoints/Fortran/CMakeLists.txt b/FiniteElasticity/testingPoints/Fortran/CMakeLists.txt new file mode 100644 index 00000000..03ef6345 --- /dev/null +++ b/FiniteElasticity/testingPoints/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(testingPoints src/testingPointsExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(testingPoints PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(testingPoints PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_testingPoints COMMAND testingPoints) +add_opencmiss_environment(test_testingPoints) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FiniteElasticity/testingPoints/src/testingPointsExample.f90 b/FiniteElasticity/testingPoints/Fortran/src/testingPointsExample.f90 similarity index 100% rename from FiniteElasticity/testingPoints/src/testingPointsExample.f90 rename to FiniteElasticity/testingPoints/Fortran/src/testingPointsExample.f90 diff --git a/FiniteElasticity/testingPoints/OpenCMISS.cmake b/FiniteElasticity/testingPoints/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FiniteElasticity/testingPoints/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FiniteElasticity/testingPoints/build_debug/build.sh b/FiniteElasticity/testingPoints/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FiniteElasticity/testingPoints/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/Burgers/Burgers/CMakeLists.txt b/FluidMechanics/Burgers/Burgers/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/Burgers/Burgers/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/Burgers/Burgers/Fortran/CMakeLists.txt b/FluidMechanics/Burgers/Burgers/Fortran/CMakeLists.txt new file mode 100644 index 00000000..97a3d020 --- /dev/null +++ b/FluidMechanics/Burgers/Burgers/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Burgers src/BurgersExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Burgers PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Burgers PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Burgers COMMAND Burgers) +add_opencmiss_environment(test_Burgers) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/Burgers/Burgers/src/BurgersExample.f90 b/FluidMechanics/Burgers/Burgers/Fortran/src/BurgersExample.f90 similarity index 100% rename from FluidMechanics/Burgers/Burgers/src/BurgersExample.f90 rename to FluidMechanics/Burgers/Burgers/Fortran/src/BurgersExample.f90 diff --git a/FluidMechanics/Burgers/Burgers/OpenCMISS.cmake b/FluidMechanics/Burgers/Burgers/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/Burgers/Burgers/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/Burgers/Burgers/build_debug/build.sh b/FluidMechanics/Burgers/Burgers/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/Burgers/Burgers/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/Burgers/GeneralisedBurgers/CMakeLists.txt b/FluidMechanics/Burgers/GeneralisedBurgers/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/Burgers/GeneralisedBurgers/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/Burgers/GeneralisedBurgers/Fortran/CMakeLists.txt b/FluidMechanics/Burgers/GeneralisedBurgers/Fortran/CMakeLists.txt new file mode 100644 index 00000000..0386ebff --- /dev/null +++ b/FluidMechanics/Burgers/GeneralisedBurgers/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(GeneralisedBurgers src/GeneralisedBurgersExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(GeneralisedBurgers PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(GeneralisedBurgers PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_GeneralisedBurgers COMMAND GeneralisedBurgers) +add_opencmiss_environment(test_GeneralisedBurgers) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/Burgers/GeneralisedBurgers/src/GeneralisedBurgersExample.f90 b/FluidMechanics/Burgers/GeneralisedBurgers/Fortran/src/GeneralisedBurgersExample.f90 similarity index 100% rename from FluidMechanics/Burgers/GeneralisedBurgers/src/GeneralisedBurgersExample.f90 rename to FluidMechanics/Burgers/GeneralisedBurgers/Fortran/src/GeneralisedBurgersExample.f90 diff --git a/FluidMechanics/Burgers/GeneralisedBurgers/OpenCMISS.cmake b/FluidMechanics/Burgers/GeneralisedBurgers/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/Burgers/GeneralisedBurgers/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/Burgers/GeneralisedBurgers/build_debug/build.sh b/FluidMechanics/Burgers/GeneralisedBurgers/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/Burgers/GeneralisedBurgers/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/Burgers/StaticBurgers/CMakeLists.txt b/FluidMechanics/Burgers/StaticBurgers/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/Burgers/StaticBurgers/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/Burgers/StaticBurgers/Fortran/CMakeLists.txt b/FluidMechanics/Burgers/StaticBurgers/Fortran/CMakeLists.txt new file mode 100644 index 00000000..03a7f60b --- /dev/null +++ b/FluidMechanics/Burgers/StaticBurgers/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(StaticBurgers src/StaticBurgersExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(StaticBurgers PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(StaticBurgers PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_StaticBurgers COMMAND StaticBurgers) +add_opencmiss_environment(test_StaticBurgers) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/Burgers/StaticBurgers/src/StaticBurgersExample.f90 b/FluidMechanics/Burgers/StaticBurgers/Fortran/src/StaticBurgersExample.f90 similarity index 100% rename from FluidMechanics/Burgers/StaticBurgers/src/StaticBurgersExample.f90 rename to FluidMechanics/Burgers/StaticBurgers/Fortran/src/StaticBurgersExample.f90 diff --git a/FluidMechanics/Burgers/StaticBurgers/OpenCMISS.cmake b/FluidMechanics/Burgers/StaticBurgers/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/Burgers/StaticBurgers/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/Burgers/StaticBurgers/build_debug/build.sh b/FluidMechanics/Burgers/StaticBurgers/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/Burgers/StaticBurgers/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/Darcy/Analytic/CMakeLists.txt b/FluidMechanics/Darcy/Analytic/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/Darcy/Analytic/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/Darcy/Analytic/Fortran/CMakeLists.txt b/FluidMechanics/Darcy/Analytic/Fortran/CMakeLists.txt new file mode 100644 index 00000000..6098ab98 --- /dev/null +++ b/FluidMechanics/Darcy/Analytic/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Analytic src/AnalyticExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Analytic PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Analytic PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Analytic COMMAND Analytic) +add_opencmiss_environment(test_Analytic) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/Darcy/Analytic/src/AnalyticExample.f90 b/FluidMechanics/Darcy/Analytic/Fortran/src/AnalyticExample.f90 similarity index 100% rename from FluidMechanics/Darcy/Analytic/src/AnalyticExample.f90 rename to FluidMechanics/Darcy/Analytic/Fortran/src/AnalyticExample.f90 diff --git a/FluidMechanics/Darcy/Analytic/OpenCMISS.cmake b/FluidMechanics/Darcy/Analytic/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/Darcy/Analytic/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/Darcy/Analytic/build_debug/build.sh b/FluidMechanics/Darcy/Analytic/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/Darcy/Analytic/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/Darcy/Dynamic/CMakeLists.txt b/FluidMechanics/Darcy/Dynamic/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/Darcy/Dynamic/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/Darcy/Dynamic/Fortran/CMakeLists.txt b/FluidMechanics/Darcy/Dynamic/Fortran/CMakeLists.txt new file mode 100644 index 00000000..b0d7f800 --- /dev/null +++ b/FluidMechanics/Darcy/Dynamic/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Dynamic src/DynamicExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Dynamic PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Dynamic PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Dynamic COMMAND Dynamic) +add_opencmiss_environment(test_Dynamic) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/Darcy/Dynamic/src/DynamicExample.f90 b/FluidMechanics/Darcy/Dynamic/Fortran/src/DynamicExample.f90 similarity index 100% rename from FluidMechanics/Darcy/Dynamic/src/DynamicExample.f90 rename to FluidMechanics/Darcy/Dynamic/Fortran/src/DynamicExample.f90 diff --git a/FluidMechanics/Darcy/Dynamic/OpenCMISS.cmake b/FluidMechanics/Darcy/Dynamic/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/Darcy/Dynamic/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/Darcy/Dynamic/build_debug/build.sh b/FluidMechanics/Darcy/Dynamic/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/Darcy/Dynamic/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/Darcy/MultiCompartmentStaticDarcy/CMakeLists.txt b/FluidMechanics/Darcy/MultiCompartmentStaticDarcy/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/Darcy/MultiCompartmentStaticDarcy/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/Darcy/MultiCompartmentStaticDarcy/Fortran/CMakeLists.txt b/FluidMechanics/Darcy/MultiCompartmentStaticDarcy/Fortran/CMakeLists.txt new file mode 100644 index 00000000..442b5739 --- /dev/null +++ b/FluidMechanics/Darcy/MultiCompartmentStaticDarcy/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(MultiCompartmentStaticDarcy src/MultiCompartmentStaticDarcyExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(MultiCompartmentStaticDarcy PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(MultiCompartmentStaticDarcy PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_MultiCompartmentStaticDarcy COMMAND MultiCompartmentStaticDarcy) +add_opencmiss_environment(test_MultiCompartmentStaticDarcy) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/Darcy/MultiCompartmentStaticDarcy/src/MultiCompartmentStaticDarcyExample.f90 b/FluidMechanics/Darcy/MultiCompartmentStaticDarcy/Fortran/src/MultiCompartmentStaticDarcyExample.f90 similarity index 100% rename from FluidMechanics/Darcy/MultiCompartmentStaticDarcy/src/MultiCompartmentStaticDarcyExample.f90 rename to FluidMechanics/Darcy/MultiCompartmentStaticDarcy/Fortran/src/MultiCompartmentStaticDarcyExample.f90 diff --git a/FluidMechanics/Darcy/MultiCompartmentStaticDarcy/OpenCMISS.cmake b/FluidMechanics/Darcy/MultiCompartmentStaticDarcy/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/Darcy/MultiCompartmentStaticDarcy/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/Darcy/MultiCompartmentStaticDarcy/build_debug/build.sh b/FluidMechanics/Darcy/MultiCompartmentStaticDarcy/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/Darcy/MultiCompartmentStaticDarcy/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/Darcy/QuasistaticMaterial/CMakeLists.txt b/FluidMechanics/Darcy/QuasistaticMaterial/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/Darcy/QuasistaticMaterial/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/Darcy/QuasistaticMaterial/Fortran/CMakeLists.txt b/FluidMechanics/Darcy/QuasistaticMaterial/Fortran/CMakeLists.txt new file mode 100644 index 00000000..76fafd74 --- /dev/null +++ b/FluidMechanics/Darcy/QuasistaticMaterial/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(QuasistaticMaterial src/QuasistaticMaterialExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(QuasistaticMaterial PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(QuasistaticMaterial PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_QuasistaticMaterial COMMAND QuasistaticMaterial) +add_opencmiss_environment(test_QuasistaticMaterial) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/Darcy/QuasistaticMaterial/src/QuasistaticMaterialExample.f90 b/FluidMechanics/Darcy/QuasistaticMaterial/Fortran/src/QuasistaticMaterialExample.f90 similarity index 100% rename from FluidMechanics/Darcy/QuasistaticMaterial/src/QuasistaticMaterialExample.f90 rename to FluidMechanics/Darcy/QuasistaticMaterial/Fortran/src/QuasistaticMaterialExample.f90 diff --git a/FluidMechanics/Darcy/QuasistaticMaterial/OpenCMISS.cmake b/FluidMechanics/Darcy/QuasistaticMaterial/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/Darcy/QuasistaticMaterial/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/Darcy/QuasistaticMaterial/build_debug/build.sh b/FluidMechanics/Darcy/QuasistaticMaterial/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/Darcy/QuasistaticMaterial/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/Darcy/Static/CMakeLists.txt b/FluidMechanics/Darcy/Static/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/Darcy/Static/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/Darcy/Static/Fortran/CMakeLists.txt b/FluidMechanics/Darcy/Static/Fortran/CMakeLists.txt new file mode 100644 index 00000000..d1b76f7d --- /dev/null +++ b/FluidMechanics/Darcy/Static/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Static src/StaticExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Static PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Static PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Static COMMAND Static) +add_opencmiss_environment(test_Static) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/Darcy/Static/src/StaticExample.f90 b/FluidMechanics/Darcy/Static/Fortran/src/StaticExample.f90 similarity index 100% rename from FluidMechanics/Darcy/Static/src/StaticExample.f90 rename to FluidMechanics/Darcy/Static/Fortran/src/StaticExample.f90 diff --git a/FluidMechanics/Darcy/Static/OpenCMISS.cmake b/FluidMechanics/Darcy/Static/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/Darcy/Static/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/Darcy/Static/build_debug/build.sh b/FluidMechanics/Darcy/Static/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/Darcy/Static/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/Darcy/temp_memory_issue/CMakeLists.txt b/FluidMechanics/Darcy/temp_memory_issue/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/Darcy/temp_memory_issue/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/Darcy/temp_memory_issue/Fortran/CMakeLists.txt b/FluidMechanics/Darcy/temp_memory_issue/Fortran/CMakeLists.txt new file mode 100644 index 00000000..2e89de88 --- /dev/null +++ b/FluidMechanics/Darcy/temp_memory_issue/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(temp_memory_issue src/temp_memory_issueExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(temp_memory_issue PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(temp_memory_issue PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_temp_memory_issue COMMAND temp_memory_issue) +add_opencmiss_environment(test_temp_memory_issue) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/Darcy/temp_memory_issue/src/temp_memory_issueExample.f90 b/FluidMechanics/Darcy/temp_memory_issue/Fortran/src/temp_memory_issueExample.f90 similarity index 100% rename from FluidMechanics/Darcy/temp_memory_issue/src/temp_memory_issueExample.f90 rename to FluidMechanics/Darcy/temp_memory_issue/Fortran/src/temp_memory_issueExample.f90 diff --git a/FluidMechanics/Darcy/temp_memory_issue/OpenCMISS.cmake b/FluidMechanics/Darcy/temp_memory_issue/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/Darcy/temp_memory_issue/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/Darcy/temp_memory_issue/build_debug/build.sh b/FluidMechanics/Darcy/temp_memory_issue/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/Darcy/temp_memory_issue/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/NavierStokes/42Master/CMakeLists.txt b/FluidMechanics/NavierStokes/42Master/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/NavierStokes/42Master/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/NavierStokes/42Master/Fortran/CMakeLists.txt b/FluidMechanics/NavierStokes/42Master/Fortran/CMakeLists.txt new file mode 100644 index 00000000..20e09803 --- /dev/null +++ b/FluidMechanics/NavierStokes/42Master/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(42Master src/42MasterExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(42Master PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(42Master PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_42Master COMMAND 42Master) +add_opencmiss_environment(test_42Master) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/NavierStokes/42Master/src/42MasterExample.f90 b/FluidMechanics/NavierStokes/42Master/Fortran/src/42MasterExample.f90 similarity index 100% rename from FluidMechanics/NavierStokes/42Master/src/42MasterExample.f90 rename to FluidMechanics/NavierStokes/42Master/Fortran/src/42MasterExample.f90 diff --git a/FluidMechanics/NavierStokes/42Master/OpenCMISS.cmake b/FluidMechanics/NavierStokes/42Master/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/NavierStokes/42Master/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/NavierStokes/42Master/build_debug/build.sh b/FluidMechanics/NavierStokes/42Master/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/NavierStokes/42Master/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/NavierStokes/Coupled1DCellML/CMakeLists.txt b/FluidMechanics/NavierStokes/Coupled1DCellML/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/NavierStokes/Coupled1DCellML/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/NavierStokes/Coupled1DCellML/Fortran/CMakeLists.txt b/FluidMechanics/NavierStokes/Coupled1DCellML/Fortran/CMakeLists.txt new file mode 100644 index 00000000..56eeffea --- /dev/null +++ b/FluidMechanics/NavierStokes/Coupled1DCellML/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Coupled1DCellML src/FortranExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Coupled1DCellML PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Coupled1DCellML PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Coupled1DCellML COMMAND Coupled1DCellML) +add_opencmiss_environment(test_Coupled1DCellML) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/NavierStokes/Coupled1DCellML/OpenCMISS.cmake b/FluidMechanics/NavierStokes/Coupled1DCellML/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/NavierStokes/Coupled1DCellML/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/NavierStokes/Coupled1DCellML/build_debug/build.sh b/FluidMechanics/NavierStokes/Coupled1DCellML/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/NavierStokes/Coupled1DCellML/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/NavierStokes/Poiseuille/2DChannel/Static/CMakeLists.txt b/FluidMechanics/NavierStokes/Poiseuille/2DChannel/Static/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/NavierStokes/Poiseuille/2DChannel/Static/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/NavierStokes/Poiseuille/2DChannel/Static/Fortran/CMakeLists.txt b/FluidMechanics/NavierStokes/Poiseuille/2DChannel/Static/Fortran/CMakeLists.txt new file mode 100644 index 00000000..d1b76f7d --- /dev/null +++ b/FluidMechanics/NavierStokes/Poiseuille/2DChannel/Static/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Static src/StaticExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Static PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Static PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Static COMMAND Static) +add_opencmiss_environment(test_Static) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/NavierStokes/Poiseuille/2DChannel/Static/src/StaticExample.f90 b/FluidMechanics/NavierStokes/Poiseuille/2DChannel/Static/Fortran/src/StaticExample.f90 similarity index 100% rename from FluidMechanics/NavierStokes/Poiseuille/2DChannel/Static/src/StaticExample.f90 rename to FluidMechanics/NavierStokes/Poiseuille/2DChannel/Static/Fortran/src/StaticExample.f90 diff --git a/FluidMechanics/NavierStokes/Poiseuille/2DChannel/Static/OpenCMISS.cmake b/FluidMechanics/NavierStokes/Poiseuille/2DChannel/Static/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/NavierStokes/Poiseuille/2DChannel/Static/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/NavierStokes/Poiseuille/2DChannel/Static/build_debug/build.sh b/FluidMechanics/NavierStokes/Poiseuille/2DChannel/Static/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/NavierStokes/Poiseuille/2DChannel/Static/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/NavierStokes/RoutineCheck/ALE/CMakeLists.txt b/FluidMechanics/NavierStokes/RoutineCheck/ALE/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/NavierStokes/RoutineCheck/ALE/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/NavierStokes/RoutineCheck/ALE/Fortran/CMakeLists.txt b/FluidMechanics/NavierStokes/RoutineCheck/ALE/Fortran/CMakeLists.txt new file mode 100644 index 00000000..80318461 --- /dev/null +++ b/FluidMechanics/NavierStokes/RoutineCheck/ALE/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(ALE src/ALEExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(ALE PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(ALE PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_ALE COMMAND ALE) +add_opencmiss_environment(test_ALE) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/NavierStokes/RoutineCheck/ALE/src/ALEExample.f90 b/FluidMechanics/NavierStokes/RoutineCheck/ALE/Fortran/src/ALEExample.f90 similarity index 100% rename from FluidMechanics/NavierStokes/RoutineCheck/ALE/src/ALEExample.f90 rename to FluidMechanics/NavierStokes/RoutineCheck/ALE/Fortran/src/ALEExample.f90 diff --git a/FluidMechanics/NavierStokes/RoutineCheck/ALE/OpenCMISS.cmake b/FluidMechanics/NavierStokes/RoutineCheck/ALE/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/NavierStokes/RoutineCheck/ALE/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/NavierStokes/RoutineCheck/ALE/build_debug/build.sh b/FluidMechanics/NavierStokes/RoutineCheck/ALE/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/NavierStokes/RoutineCheck/ALE/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/NavierStokes/RoutineCheck/Dynamic/CMakeLists.txt b/FluidMechanics/NavierStokes/RoutineCheck/Dynamic/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/NavierStokes/RoutineCheck/Dynamic/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/NavierStokes/RoutineCheck/Dynamic/Fortran/CMakeLists.txt b/FluidMechanics/NavierStokes/RoutineCheck/Dynamic/Fortran/CMakeLists.txt new file mode 100644 index 00000000..b0d7f800 --- /dev/null +++ b/FluidMechanics/NavierStokes/RoutineCheck/Dynamic/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Dynamic src/DynamicExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Dynamic PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Dynamic PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Dynamic COMMAND Dynamic) +add_opencmiss_environment(test_Dynamic) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/NavierStokes/RoutineCheck/Dynamic/src/DynamicExample.f90 b/FluidMechanics/NavierStokes/RoutineCheck/Dynamic/Fortran/src/DynamicExample.f90 similarity index 100% rename from FluidMechanics/NavierStokes/RoutineCheck/Dynamic/src/DynamicExample.f90 rename to FluidMechanics/NavierStokes/RoutineCheck/Dynamic/Fortran/src/DynamicExample.f90 diff --git a/FluidMechanics/NavierStokes/RoutineCheck/Dynamic/OpenCMISS.cmake b/FluidMechanics/NavierStokes/RoutineCheck/Dynamic/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/NavierStokes/RoutineCheck/Dynamic/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/NavierStokes/RoutineCheck/Dynamic/build_debug/build.sh b/FluidMechanics/NavierStokes/RoutineCheck/Dynamic/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/NavierStokes/RoutineCheck/Dynamic/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/NavierStokes/RoutineCheck/ParallelDynamic/CMakeLists.txt b/FluidMechanics/NavierStokes/RoutineCheck/ParallelDynamic/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/NavierStokes/RoutineCheck/ParallelDynamic/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/NavierStokes/RoutineCheck/ParallelDynamic/Fortran/CMakeLists.txt b/FluidMechanics/NavierStokes/RoutineCheck/ParallelDynamic/Fortran/CMakeLists.txt new file mode 100644 index 00000000..e5a509ef --- /dev/null +++ b/FluidMechanics/NavierStokes/RoutineCheck/ParallelDynamic/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(ParallelDynamic src/ParallelDynamicExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(ParallelDynamic PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(ParallelDynamic PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_ParallelDynamic COMMAND ParallelDynamic) +add_opencmiss_environment(test_ParallelDynamic) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/NavierStokes/RoutineCheck/ParallelDynamic/src/ParallelDynamicExample.f90 b/FluidMechanics/NavierStokes/RoutineCheck/ParallelDynamic/Fortran/src/ParallelDynamicExample.f90 similarity index 100% rename from FluidMechanics/NavierStokes/RoutineCheck/ParallelDynamic/src/ParallelDynamicExample.f90 rename to FluidMechanics/NavierStokes/RoutineCheck/ParallelDynamic/Fortran/src/ParallelDynamicExample.f90 diff --git a/FluidMechanics/NavierStokes/RoutineCheck/ParallelDynamic/OpenCMISS.cmake b/FluidMechanics/NavierStokes/RoutineCheck/ParallelDynamic/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/NavierStokes/RoutineCheck/ParallelDynamic/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/NavierStokes/RoutineCheck/ParallelDynamic/build_debug/build.sh b/FluidMechanics/NavierStokes/RoutineCheck/ParallelDynamic/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/NavierStokes/RoutineCheck/ParallelDynamic/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/NavierStokes/RoutineCheck/ParallelStatic/CMakeLists.txt b/FluidMechanics/NavierStokes/RoutineCheck/ParallelStatic/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/NavierStokes/RoutineCheck/ParallelStatic/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/NavierStokes/RoutineCheck/ParallelStatic/Fortran/CMakeLists.txt b/FluidMechanics/NavierStokes/RoutineCheck/ParallelStatic/Fortran/CMakeLists.txt new file mode 100644 index 00000000..b1c43e68 --- /dev/null +++ b/FluidMechanics/NavierStokes/RoutineCheck/ParallelStatic/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(ParallelStatic src/ParallelStaticExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(ParallelStatic PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(ParallelStatic PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_ParallelStatic COMMAND ParallelStatic) +add_opencmiss_environment(test_ParallelStatic) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/NavierStokes/RoutineCheck/ParallelStatic/src/ParallelStaticExample.f90 b/FluidMechanics/NavierStokes/RoutineCheck/ParallelStatic/Fortran/src/ParallelStaticExample.f90 similarity index 100% rename from FluidMechanics/NavierStokes/RoutineCheck/ParallelStatic/src/ParallelStaticExample.f90 rename to FluidMechanics/NavierStokes/RoutineCheck/ParallelStatic/Fortran/src/ParallelStaticExample.f90 diff --git a/FluidMechanics/NavierStokes/RoutineCheck/ParallelStatic/OpenCMISS.cmake b/FluidMechanics/NavierStokes/RoutineCheck/ParallelStatic/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/NavierStokes/RoutineCheck/ParallelStatic/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/NavierStokes/RoutineCheck/ParallelStatic/build_debug/build.sh b/FluidMechanics/NavierStokes/RoutineCheck/ParallelStatic/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/NavierStokes/RoutineCheck/ParallelStatic/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/NavierStokes/RoutineCheck/Static/CMakeLists.txt b/FluidMechanics/NavierStokes/RoutineCheck/Static/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/NavierStokes/RoutineCheck/Static/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/NavierStokes/RoutineCheck/Static/Fortran/CMakeLists.txt b/FluidMechanics/NavierStokes/RoutineCheck/Static/Fortran/CMakeLists.txt new file mode 100644 index 00000000..d1b76f7d --- /dev/null +++ b/FluidMechanics/NavierStokes/RoutineCheck/Static/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Static src/StaticExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Static PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Static PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Static COMMAND Static) +add_opencmiss_environment(test_Static) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/NavierStokes/RoutineCheck/Static/src/StaticExample.f90 b/FluidMechanics/NavierStokes/RoutineCheck/Static/Fortran/src/StaticExample.f90 similarity index 100% rename from FluidMechanics/NavierStokes/RoutineCheck/Static/src/StaticExample.f90 rename to FluidMechanics/NavierStokes/RoutineCheck/Static/Fortran/src/StaticExample.f90 diff --git a/FluidMechanics/NavierStokes/RoutineCheck/Static/OpenCMISS.cmake b/FluidMechanics/NavierStokes/RoutineCheck/Static/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/NavierStokes/RoutineCheck/Static/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/NavierStokes/RoutineCheck/Static/build_debug/build.sh b/FluidMechanics/NavierStokes/RoutineCheck/Static/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/NavierStokes/RoutineCheck/Static/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/NavierStokes/Static_FieldML/CMakeLists.txt b/FluidMechanics/NavierStokes/Static_FieldML/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/NavierStokes/Static_FieldML/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/NavierStokes/Static_FieldML/Fortran/CMakeLists.txt b/FluidMechanics/NavierStokes/Static_FieldML/Fortran/CMakeLists.txt new file mode 100644 index 00000000..59e91a6f --- /dev/null +++ b/FluidMechanics/NavierStokes/Static_FieldML/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Static_FieldML src/Static_FieldMLExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Static_FieldML PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Static_FieldML PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Static_FieldML COMMAND Static_FieldML) +add_opencmiss_environment(test_Static_FieldML) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/NavierStokes/Static_FieldML/src/Static_FieldMLExample.f90 b/FluidMechanics/NavierStokes/Static_FieldML/Fortran/src/Static_FieldMLExample.f90 similarity index 100% rename from FluidMechanics/NavierStokes/Static_FieldML/src/Static_FieldMLExample.f90 rename to FluidMechanics/NavierStokes/Static_FieldML/Fortran/src/Static_FieldMLExample.f90 diff --git a/FluidMechanics/NavierStokes/Static_FieldML/OpenCMISS.cmake b/FluidMechanics/NavierStokes/Static_FieldML/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/NavierStokes/Static_FieldML/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/NavierStokes/Static_FieldML/build_debug/build.sh b/FluidMechanics/NavierStokes/Static_FieldML/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/NavierStokes/Static_FieldML/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/NavierStokes/SupgChannel/CMakeLists.txt b/FluidMechanics/NavierStokes/SupgChannel/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/NavierStokes/SupgChannel/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/NavierStokes/SupgChannel/Fortran/CMakeLists.txt b/FluidMechanics/NavierStokes/SupgChannel/Fortran/CMakeLists.txt new file mode 100644 index 00000000..f56d0a9c --- /dev/null +++ b/FluidMechanics/NavierStokes/SupgChannel/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(SupgChannel src/SupgChannelExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(SupgChannel PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(SupgChannel PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_SupgChannel COMMAND SupgChannel) +add_opencmiss_environment(test_SupgChannel) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/NavierStokes/SupgChannel/src/SupgChannelExample.f90 b/FluidMechanics/NavierStokes/SupgChannel/Fortran/src/SupgChannelExample.f90 similarity index 100% rename from FluidMechanics/NavierStokes/SupgChannel/src/SupgChannelExample.f90 rename to FluidMechanics/NavierStokes/SupgChannel/Fortran/src/SupgChannelExample.f90 diff --git a/FluidMechanics/NavierStokes/SupgChannel/OpenCMISS.cmake b/FluidMechanics/NavierStokes/SupgChannel/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/NavierStokes/SupgChannel/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/NavierStokes/SupgChannel/build_debug/build.sh b/FluidMechanics/NavierStokes/SupgChannel/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/NavierStokes/SupgChannel/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/NavierStokes/TaylorGreen/CMakeLists.txt b/FluidMechanics/NavierStokes/TaylorGreen/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/NavierStokes/TaylorGreen/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/NavierStokes/TaylorGreen/Fortran/CMakeLists.txt b/FluidMechanics/NavierStokes/TaylorGreen/Fortran/CMakeLists.txt new file mode 100644 index 00000000..dced1bcc --- /dev/null +++ b/FluidMechanics/NavierStokes/TaylorGreen/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(TaylorGreen src/TaylorGreenExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(TaylorGreen PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(TaylorGreen PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_TaylorGreen COMMAND TaylorGreen) +add_opencmiss_environment(test_TaylorGreen) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/NavierStokes/TaylorGreen/src/TaylorGreenExample.f90 b/FluidMechanics/NavierStokes/TaylorGreen/Fortran/src/TaylorGreenExample.f90 similarity index 100% rename from FluidMechanics/NavierStokes/TaylorGreen/src/TaylorGreenExample.f90 rename to FluidMechanics/NavierStokes/TaylorGreen/Fortran/src/TaylorGreenExample.f90 diff --git a/FluidMechanics/NavierStokes/TaylorGreen/OpenCMISS.cmake b/FluidMechanics/NavierStokes/TaylorGreen/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/NavierStokes/TaylorGreen/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/NavierStokes/TaylorGreen/build_debug/build.sh b/FluidMechanics/NavierStokes/TaylorGreen/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/NavierStokes/TaylorGreen/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_0.5/CMakeLists.txt b/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_0.5/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_0.5/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_0.5/Fortran/CMakeLists.txt b/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_0.5/Fortran/CMakeLists.txt new file mode 100644 index 00000000..f9e6a8bb --- /dev/null +++ b/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_0.5/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(DynamicTest_theta_0.5 src/DynamicTest_theta_0.5Example.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(DynamicTest_theta_0.5 PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(DynamicTest_theta_0.5 PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_DynamicTest_theta_0.5 COMMAND DynamicTest_theta_0.5) +add_opencmiss_environment(test_DynamicTest_theta_0.5) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_0.5/src/DynamicTest_theta_0.5Example.f90 b/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_0.5/Fortran/src/DynamicTest_theta_0.5Example.f90 similarity index 100% rename from FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_0.5/src/DynamicTest_theta_0.5Example.f90 rename to FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_0.5/Fortran/src/DynamicTest_theta_0.5Example.f90 diff --git a/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_0.5/OpenCMISS.cmake b/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_0.5/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_0.5/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_0.5/build_debug/build.sh b/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_0.5/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_0.5/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_1.0/CMakeLists.txt b/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_1.0/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_1.0/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_1.0/Fortran/CMakeLists.txt b/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_1.0/Fortran/CMakeLists.txt new file mode 100644 index 00000000..22914ad4 --- /dev/null +++ b/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_1.0/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(DynamicTest_theta_1.0 src/DynamicTest_theta_1.0Example.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(DynamicTest_theta_1.0 PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(DynamicTest_theta_1.0 PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_DynamicTest_theta_1.0 COMMAND DynamicTest_theta_1.0) +add_opencmiss_environment(test_DynamicTest_theta_1.0) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_1.0/src/DynamicTest_theta_1.0Example.f90 b/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_1.0/Fortran/src/DynamicTest_theta_1.0Example.f90 similarity index 100% rename from FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_1.0/src/DynamicTest_theta_1.0Example.f90 rename to FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_1.0/Fortran/src/DynamicTest_theta_1.0Example.f90 diff --git a/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_1.0/OpenCMISS.cmake b/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_1.0/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_1.0/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_1.0/build_debug/build.sh b/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_1.0/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/NavierStokes/temp_tests/DynamicTest_theta_1.0/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/Poiseuille/Static/CMakeLists.txt b/FluidMechanics/Poiseuille/Static/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/Poiseuille/Static/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/Poiseuille/Static/Fortran/CMakeLists.txt b/FluidMechanics/Poiseuille/Static/Fortran/CMakeLists.txt new file mode 100644 index 00000000..d1b76f7d --- /dev/null +++ b/FluidMechanics/Poiseuille/Static/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Static src/StaticExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Static PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Static PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Static COMMAND Static) +add_opencmiss_environment(test_Static) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/Poiseuille/Static/src/StaticExample.f90 b/FluidMechanics/Poiseuille/Static/Fortran/src/StaticExample.f90 similarity index 100% rename from FluidMechanics/Poiseuille/Static/src/StaticExample.f90 rename to FluidMechanics/Poiseuille/Static/Fortran/src/StaticExample.f90 diff --git a/FluidMechanics/Poiseuille/Static/OpenCMISS.cmake b/FluidMechanics/Poiseuille/Static/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/Poiseuille/Static/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/Poiseuille/Static/build_debug/build.sh b/FluidMechanics/Poiseuille/Static/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/Poiseuille/Static/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/SCRATCH/DynamicNavierStokesInParallel/CMakeLists.txt b/FluidMechanics/SCRATCH/DynamicNavierStokesInParallel/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/SCRATCH/DynamicNavierStokesInParallel/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/SCRATCH/DynamicNavierStokesInParallel/Fortran/CMakeLists.txt b/FluidMechanics/SCRATCH/DynamicNavierStokesInParallel/Fortran/CMakeLists.txt new file mode 100644 index 00000000..87a40147 --- /dev/null +++ b/FluidMechanics/SCRATCH/DynamicNavierStokesInParallel/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(DynamicNavierStokesInParallel src/DynamicNavierStokesInParallelExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(DynamicNavierStokesInParallel PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(DynamicNavierStokesInParallel PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_DynamicNavierStokesInParallel COMMAND DynamicNavierStokesInParallel) +add_opencmiss_environment(test_DynamicNavierStokesInParallel) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/SCRATCH/DynamicNavierStokesInParallel/src/DynamicNavierStokesInParallelExample.f90 b/FluidMechanics/SCRATCH/DynamicNavierStokesInParallel/Fortran/src/DynamicNavierStokesInParallelExample.f90 similarity index 100% rename from FluidMechanics/SCRATCH/DynamicNavierStokesInParallel/src/DynamicNavierStokesInParallelExample.f90 rename to FluidMechanics/SCRATCH/DynamicNavierStokesInParallel/Fortran/src/DynamicNavierStokesInParallelExample.f90 diff --git a/FluidMechanics/SCRATCH/DynamicNavierStokesInParallel/OpenCMISS.cmake b/FluidMechanics/SCRATCH/DynamicNavierStokesInParallel/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/SCRATCH/DynamicNavierStokesInParallel/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/SCRATCH/DynamicNavierStokesInParallel/build_debug/build.sh b/FluidMechanics/SCRATCH/DynamicNavierStokesInParallel/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/SCRATCH/DynamicNavierStokesInParallel/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/Stokes/42Master/CMakeLists.txt b/FluidMechanics/Stokes/42Master/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/Stokes/42Master/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/Stokes/42Master/Fortran/CMakeLists.txt b/FluidMechanics/Stokes/42Master/Fortran/CMakeLists.txt new file mode 100644 index 00000000..20e09803 --- /dev/null +++ b/FluidMechanics/Stokes/42Master/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(42Master src/42MasterExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(42Master PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(42Master PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_42Master COMMAND 42Master) +add_opencmiss_environment(test_42Master) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/Stokes/42Master/src/42MasterExample.f90 b/FluidMechanics/Stokes/42Master/Fortran/src/42MasterExample.f90 similarity index 100% rename from FluidMechanics/Stokes/42Master/src/42MasterExample.f90 rename to FluidMechanics/Stokes/42Master/Fortran/src/42MasterExample.f90 diff --git a/FluidMechanics/Stokes/42Master/OpenCMISS.cmake b/FluidMechanics/Stokes/42Master/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/Stokes/42Master/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/Stokes/42Master/build_debug/build.sh b/FluidMechanics/Stokes/42Master/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/Stokes/42Master/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/Stokes/RoutineCheck/ALE/CMakeLists.txt b/FluidMechanics/Stokes/RoutineCheck/ALE/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/Stokes/RoutineCheck/ALE/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/Stokes/RoutineCheck/ALE/Fortran/CMakeLists.txt b/FluidMechanics/Stokes/RoutineCheck/ALE/Fortran/CMakeLists.txt new file mode 100644 index 00000000..80318461 --- /dev/null +++ b/FluidMechanics/Stokes/RoutineCheck/ALE/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(ALE src/ALEExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(ALE PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(ALE PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_ALE COMMAND ALE) +add_opencmiss_environment(test_ALE) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/Stokes/RoutineCheck/ALE/src/ALEExample.f90 b/FluidMechanics/Stokes/RoutineCheck/ALE/Fortran/src/ALEExample.f90 similarity index 100% rename from FluidMechanics/Stokes/RoutineCheck/ALE/src/ALEExample.f90 rename to FluidMechanics/Stokes/RoutineCheck/ALE/Fortran/src/ALEExample.f90 diff --git a/FluidMechanics/Stokes/RoutineCheck/ALE/OpenCMISS.cmake b/FluidMechanics/Stokes/RoutineCheck/ALE/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/Stokes/RoutineCheck/ALE/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/Stokes/RoutineCheck/ALE/build_debug/build.sh b/FluidMechanics/Stokes/RoutineCheck/ALE/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/Stokes/RoutineCheck/ALE/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/Stokes/RoutineCheck/Dynamic/CMakeLists.txt b/FluidMechanics/Stokes/RoutineCheck/Dynamic/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/Stokes/RoutineCheck/Dynamic/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/Stokes/RoutineCheck/Dynamic/Fortran/CMakeLists.txt b/FluidMechanics/Stokes/RoutineCheck/Dynamic/Fortran/CMakeLists.txt new file mode 100644 index 00000000..b0d7f800 --- /dev/null +++ b/FluidMechanics/Stokes/RoutineCheck/Dynamic/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Dynamic src/DynamicExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Dynamic PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Dynamic PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Dynamic COMMAND Dynamic) +add_opencmiss_environment(test_Dynamic) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/Stokes/RoutineCheck/Dynamic/src/DynamicExample.f90 b/FluidMechanics/Stokes/RoutineCheck/Dynamic/Fortran/src/DynamicExample.f90 similarity index 100% rename from FluidMechanics/Stokes/RoutineCheck/Dynamic/src/DynamicExample.f90 rename to FluidMechanics/Stokes/RoutineCheck/Dynamic/Fortran/src/DynamicExample.f90 diff --git a/FluidMechanics/Stokes/RoutineCheck/Dynamic/OpenCMISS.cmake b/FluidMechanics/Stokes/RoutineCheck/Dynamic/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/Stokes/RoutineCheck/Dynamic/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/Stokes/RoutineCheck/Dynamic/build_debug/build.sh b/FluidMechanics/Stokes/RoutineCheck/Dynamic/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/Stokes/RoutineCheck/Dynamic/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/FluidMechanics/Stokes/RoutineCheck/Static/CMakeLists.txt b/FluidMechanics/Stokes/RoutineCheck/Static/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/FluidMechanics/Stokes/RoutineCheck/Static/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/FluidMechanics/Stokes/RoutineCheck/Static/Fortran/CMakeLists.txt b/FluidMechanics/Stokes/RoutineCheck/Static/Fortran/CMakeLists.txt new file mode 100644 index 00000000..d1b76f7d --- /dev/null +++ b/FluidMechanics/Stokes/RoutineCheck/Static/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Static src/StaticExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Static PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Static PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Static COMMAND Static) +add_opencmiss_environment(test_Static) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/FluidMechanics/Stokes/RoutineCheck/Static/src/StaticExample.f90 b/FluidMechanics/Stokes/RoutineCheck/Static/Fortran/src/StaticExample.f90 similarity index 100% rename from FluidMechanics/Stokes/RoutineCheck/Static/src/StaticExample.f90 rename to FluidMechanics/Stokes/RoutineCheck/Static/Fortran/src/StaticExample.f90 diff --git a/FluidMechanics/Stokes/RoutineCheck/Static/OpenCMISS.cmake b/FluidMechanics/Stokes/RoutineCheck/Static/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/FluidMechanics/Stokes/RoutineCheck/Static/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/FluidMechanics/Stokes/RoutineCheck/Static/build_debug/build.sh b/FluidMechanics/Stokes/RoutineCheck/Static/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/FluidMechanics/Stokes/RoutineCheck/Static/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/InterfaceExamples/CoupledFluidSolid/CMakeLists.txt b/InterfaceExamples/CoupledFluidSolid/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/InterfaceExamples/CoupledFluidSolid/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/InterfaceExamples/CoupledFluidSolid/Fortran/CMakeLists.txt b/InterfaceExamples/CoupledFluidSolid/Fortran/CMakeLists.txt new file mode 100644 index 00000000..7480a563 --- /dev/null +++ b/InterfaceExamples/CoupledFluidSolid/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(CoupledFluidSolid src/FortranExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(CoupledFluidSolid PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(CoupledFluidSolid PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_CoupledFluidSolid COMMAND CoupledFluidSolid) +add_opencmiss_environment(test_CoupledFluidSolid) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/InterfaceExamples/CoupledFluidSolid/Fortran/OpenCMISS.cmake b/InterfaceExamples/CoupledFluidSolid/Fortran/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/InterfaceExamples/CoupledFluidSolid/Fortran/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/InterfaceExamples/CoupledFluidSolid/OpenCMISS.cmake b/InterfaceExamples/CoupledFluidSolid/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/InterfaceExamples/CoupledFluidSolid/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/InterfaceExamples/CoupledFluidSolid/build_debug/build.sh b/InterfaceExamples/CoupledFluidSolid/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/InterfaceExamples/CoupledFluidSolid/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/InterfaceExamples/CoupledLaplace/CMakeLists.txt b/InterfaceExamples/CoupledLaplace/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/InterfaceExamples/CoupledLaplace/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/InterfaceExamples/CoupledLaplace/Fortran/CMakeLists.txt b/InterfaceExamples/CoupledLaplace/Fortran/CMakeLists.txt new file mode 100644 index 00000000..bcc05faf --- /dev/null +++ b/InterfaceExamples/CoupledLaplace/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(CoupledLaplace src/CoupledLaplaceExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(CoupledLaplace PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(CoupledLaplace PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_CoupledLaplace COMMAND CoupledLaplace) +add_opencmiss_environment(test_CoupledLaplace) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/InterfaceExamples/CoupledLaplace/src/CoupledLaplaceExample.f90 b/InterfaceExamples/CoupledLaplace/Fortran/src/CoupledLaplaceExample.f90 similarity index 100% rename from InterfaceExamples/CoupledLaplace/src/CoupledLaplaceExample.f90 rename to InterfaceExamples/CoupledLaplace/Fortran/src/CoupledLaplaceExample.f90 diff --git a/InterfaceExamples/CoupledLaplace/OpenCMISS.cmake b/InterfaceExamples/CoupledLaplace/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/InterfaceExamples/CoupledLaplace/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/InterfaceExamples/CoupledLaplace/build_debug/build.sh b/InterfaceExamples/CoupledLaplace/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/InterfaceExamples/CoupledLaplace/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/InterfaceExamples/InputCoupledLaplace/CMakeLists.txt b/InterfaceExamples/InputCoupledLaplace/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/InterfaceExamples/InputCoupledLaplace/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/InterfaceExamples/InputCoupledLaplace/Fortran/CMakeLists.txt b/InterfaceExamples/InputCoupledLaplace/Fortran/CMakeLists.txt new file mode 100644 index 00000000..1470edf5 --- /dev/null +++ b/InterfaceExamples/InputCoupledLaplace/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(InputCoupledLaplace src/InputCoupledLaplaceExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(InputCoupledLaplace PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(InputCoupledLaplace PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_InputCoupledLaplace COMMAND InputCoupledLaplace) +add_opencmiss_environment(test_InputCoupledLaplace) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/InterfaceExamples/InputCoupledLaplace/src/InputCoupledLaplaceExample.f90 b/InterfaceExamples/InputCoupledLaplace/Fortran/src/InputCoupledLaplaceExample.f90 similarity index 100% rename from InterfaceExamples/InputCoupledLaplace/src/InputCoupledLaplaceExample.f90 rename to InterfaceExamples/InputCoupledLaplace/Fortran/src/InputCoupledLaplaceExample.f90 diff --git a/InterfaceExamples/InputCoupledLaplace/OpenCMISS.cmake b/InterfaceExamples/InputCoupledLaplace/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/InterfaceExamples/InputCoupledLaplace/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/InterfaceExamples/InputCoupledLaplace/build_debug/build.sh b/InterfaceExamples/InputCoupledLaplace/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/InterfaceExamples/InputCoupledLaplace/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/InterfaceExamples/InputCoupledStokes/CMakeLists.txt b/InterfaceExamples/InputCoupledStokes/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/InterfaceExamples/InputCoupledStokes/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/InterfaceExamples/InputCoupledStokes/Fortran/CMakeLists.txt b/InterfaceExamples/InputCoupledStokes/Fortran/CMakeLists.txt new file mode 100644 index 00000000..29da4516 --- /dev/null +++ b/InterfaceExamples/InputCoupledStokes/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(InputCoupledStokes src/InputCoupledStokesExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(InputCoupledStokes PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(InputCoupledStokes PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_InputCoupledStokes COMMAND InputCoupledStokes) +add_opencmiss_environment(test_InputCoupledStokes) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/InterfaceExamples/InputCoupledStokes/src/InputCoupledStokesExample.f90 b/InterfaceExamples/InputCoupledStokes/Fortran/src/InputCoupledStokesExample.f90 similarity index 100% rename from InterfaceExamples/InputCoupledStokes/src/InputCoupledStokesExample.f90 rename to InterfaceExamples/InputCoupledStokes/Fortran/src/InputCoupledStokesExample.f90 diff --git a/InterfaceExamples/InputCoupledStokes/OpenCMISS.cmake b/InterfaceExamples/InputCoupledStokes/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/InterfaceExamples/InputCoupledStokes/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/InterfaceExamples/InputCoupledStokes/build_debug/build.sh b/InterfaceExamples/InputCoupledStokes/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/InterfaceExamples/InputCoupledStokes/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/InterfaceExamples/InputUnCoupledLaplace/CMakeLists.txt b/InterfaceExamples/InputUnCoupledLaplace/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/InterfaceExamples/InputUnCoupledLaplace/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/InterfaceExamples/InputUnCoupledLaplace/Fortran/CMakeLists.txt b/InterfaceExamples/InputUnCoupledLaplace/Fortran/CMakeLists.txt new file mode 100644 index 00000000..6c248128 --- /dev/null +++ b/InterfaceExamples/InputUnCoupledLaplace/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(InputUnCoupledLaplace src/InputUnCoupledLaplaceExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(InputUnCoupledLaplace PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(InputUnCoupledLaplace PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_InputUnCoupledLaplace COMMAND InputUnCoupledLaplace) +add_opencmiss_environment(test_InputUnCoupledLaplace) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/InterfaceExamples/InputUnCoupledLaplace/src/InputUnCoupledLaplaceExample.f90 b/InterfaceExamples/InputUnCoupledLaplace/Fortran/src/InputUnCoupledLaplaceExample.f90 similarity index 100% rename from InterfaceExamples/InputUnCoupledLaplace/src/InputUnCoupledLaplaceExample.f90 rename to InterfaceExamples/InputUnCoupledLaplace/Fortran/src/InputUnCoupledLaplaceExample.f90 diff --git a/InterfaceExamples/InputUnCoupledLaplace/OpenCMISS.cmake b/InterfaceExamples/InputUnCoupledLaplace/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/InterfaceExamples/InputUnCoupledLaplace/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/InterfaceExamples/InputUnCoupledLaplace/build_debug/build.sh b/InterfaceExamples/InputUnCoupledLaplace/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/InterfaceExamples/InputUnCoupledLaplace/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/InterfaceExamples/UnCoupledLaplace/CMakeLists.txt b/InterfaceExamples/UnCoupledLaplace/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/InterfaceExamples/UnCoupledLaplace/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/InterfaceExamples/UnCoupledLaplace/Fortran/CMakeLists.txt b/InterfaceExamples/UnCoupledLaplace/Fortran/CMakeLists.txt new file mode 100644 index 00000000..4df9f6d9 --- /dev/null +++ b/InterfaceExamples/UnCoupledLaplace/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(UnCoupledLaplace src/UnCoupledLaplaceExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(UnCoupledLaplace PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(UnCoupledLaplace PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_UnCoupledLaplace COMMAND UnCoupledLaplace) +add_opencmiss_environment(test_UnCoupledLaplace) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/InterfaceExamples/UnCoupledLaplace/src/UnCoupledLaplaceExample.f90 b/InterfaceExamples/UnCoupledLaplace/Fortran/src/UnCoupledLaplaceExample.f90 similarity index 100% rename from InterfaceExamples/UnCoupledLaplace/src/UnCoupledLaplaceExample.f90 rename to InterfaceExamples/UnCoupledLaplace/Fortran/src/UnCoupledLaplaceExample.f90 diff --git a/InterfaceExamples/UnCoupledLaplace/OpenCMISS.cmake b/InterfaceExamples/UnCoupledLaplace/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/InterfaceExamples/UnCoupledLaplace/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/InterfaceExamples/UnCoupledLaplace/build_debug/build.sh b/InterfaceExamples/UnCoupledLaplace/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/InterfaceExamples/UnCoupledLaplace/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/LinearElasticity/2DExtensionPlaneStressLagrangeBasis/CMakeLists.txt b/LinearElasticity/2DExtensionPlaneStressLagrangeBasis/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/LinearElasticity/2DExtensionPlaneStressLagrangeBasis/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/LinearElasticity/2DExtensionPlaneStressLagrangeBasis/Fortran/CMakeLists.txt b/LinearElasticity/2DExtensionPlaneStressLagrangeBasis/Fortran/CMakeLists.txt new file mode 100644 index 00000000..c16cc7b1 --- /dev/null +++ b/LinearElasticity/2DExtensionPlaneStressLagrangeBasis/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(2DExtensionPlaneStressLagrangeBasis src/2DExtensionPlaneStressLagrangeBasisExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(2DExtensionPlaneStressLagrangeBasis PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(2DExtensionPlaneStressLagrangeBasis PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_2DExtensionPlaneStressLagrangeBasis COMMAND 2DExtensionPlaneStressLagrangeBasis) +add_opencmiss_environment(test_2DExtensionPlaneStressLagrangeBasis) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/LinearElasticity/2DExtensionPlaneStressLagrangeBasis/src/2DExtensionPlaneStressLagrangeBasisExample.f90 b/LinearElasticity/2DExtensionPlaneStressLagrangeBasis/Fortran/src/2DExtensionPlaneStressLagrangeBasisExample.f90 similarity index 100% rename from LinearElasticity/2DExtensionPlaneStressLagrangeBasis/src/2DExtensionPlaneStressLagrangeBasisExample.f90 rename to LinearElasticity/2DExtensionPlaneStressLagrangeBasis/Fortran/src/2DExtensionPlaneStressLagrangeBasisExample.f90 diff --git a/LinearElasticity/2DExtensionPlaneStressLagrangeBasis/OpenCMISS.cmake b/LinearElasticity/2DExtensionPlaneStressLagrangeBasis/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/LinearElasticity/2DExtensionPlaneStressLagrangeBasis/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/LinearElasticity/2DExtensionPlaneStressLagrangeBasis/build_debug/build.sh b/LinearElasticity/2DExtensionPlaneStressLagrangeBasis/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/LinearElasticity/2DExtensionPlaneStressLagrangeBasis/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/LinearElasticity/3DExtensionHermiteBasis/CMakeLists.txt b/LinearElasticity/3DExtensionHermiteBasis/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/LinearElasticity/3DExtensionHermiteBasis/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/LinearElasticity/3DExtensionHermiteBasis/Fortran/CMakeLists.txt b/LinearElasticity/3DExtensionHermiteBasis/Fortran/CMakeLists.txt new file mode 100644 index 00000000..28ea81f3 --- /dev/null +++ b/LinearElasticity/3DExtensionHermiteBasis/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(3DExtensionHermiteBasis src/3DExtensionHermiteBasisExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(3DExtensionHermiteBasis PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(3DExtensionHermiteBasis PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_3DExtensionHermiteBasis COMMAND 3DExtensionHermiteBasis) +add_opencmiss_environment(test_3DExtensionHermiteBasis) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/LinearElasticity/3DExtensionHermiteBasis/src/3DExtensionHermiteBasisExample.f90 b/LinearElasticity/3DExtensionHermiteBasis/Fortran/src/3DExtensionHermiteBasisExample.f90 similarity index 100% rename from LinearElasticity/3DExtensionHermiteBasis/src/3DExtensionHermiteBasisExample.f90 rename to LinearElasticity/3DExtensionHermiteBasis/Fortran/src/3DExtensionHermiteBasisExample.f90 diff --git a/LinearElasticity/3DExtensionHermiteBasis/OpenCMISS.cmake b/LinearElasticity/3DExtensionHermiteBasis/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/LinearElasticity/3DExtensionHermiteBasis/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/LinearElasticity/3DExtensionHermiteBasis/build_debug/build.sh b/LinearElasticity/3DExtensionHermiteBasis/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/LinearElasticity/3DExtensionHermiteBasis/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/LinearElasticity/3DExtensionLagrangeBasis/CMakeLists.txt b/LinearElasticity/3DExtensionLagrangeBasis/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/LinearElasticity/3DExtensionLagrangeBasis/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/LinearElasticity/3DExtensionLagrangeBasis/Fortran/CMakeLists.txt b/LinearElasticity/3DExtensionLagrangeBasis/Fortran/CMakeLists.txt new file mode 100644 index 00000000..36e232aa --- /dev/null +++ b/LinearElasticity/3DExtensionLagrangeBasis/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(3DExtensionLagrangeBasis src/3DExtensionLagrangeBasisExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(3DExtensionLagrangeBasis PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(3DExtensionLagrangeBasis PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_3DExtensionLagrangeBasis COMMAND 3DExtensionLagrangeBasis) +add_opencmiss_environment(test_3DExtensionLagrangeBasis) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/LinearElasticity/3DExtensionLagrangeBasis/src/3DExtensionLagrangeBasisExample.f90 b/LinearElasticity/3DExtensionLagrangeBasis/Fortran/src/3DExtensionLagrangeBasisExample.f90 similarity index 100% rename from LinearElasticity/3DExtensionLagrangeBasis/src/3DExtensionLagrangeBasisExample.f90 rename to LinearElasticity/3DExtensionLagrangeBasis/Fortran/src/3DExtensionLagrangeBasisExample.f90 diff --git a/LinearElasticity/3DExtensionLagrangeBasis/OpenCMISS.cmake b/LinearElasticity/3DExtensionLagrangeBasis/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/LinearElasticity/3DExtensionLagrangeBasis/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/LinearElasticity/3DExtensionLagrangeBasis/build_debug/build.sh b/LinearElasticity/3DExtensionLagrangeBasis/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/LinearElasticity/3DExtensionLagrangeBasis/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/LinearElasticity/Analytic/CantileverBeam/CMakeLists.txt b/LinearElasticity/Analytic/CantileverBeam/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/LinearElasticity/Analytic/CantileverBeam/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/LinearElasticity/Analytic/CantileverBeam/Fortran/CMakeLists.txt b/LinearElasticity/Analytic/CantileverBeam/Fortran/CMakeLists.txt new file mode 100644 index 00000000..eebeadf8 --- /dev/null +++ b/LinearElasticity/Analytic/CantileverBeam/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(CantileverBeam src/CantileverBeamExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(CantileverBeam PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(CantileverBeam PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_CantileverBeam COMMAND CantileverBeam) +add_opencmiss_environment(test_CantileverBeam) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/LinearElasticity/Analytic/CantileverBeam/src/CantileverBeamExample.f90 b/LinearElasticity/Analytic/CantileverBeam/Fortran/src/CantileverBeamExample.f90 similarity index 100% rename from LinearElasticity/Analytic/CantileverBeam/src/CantileverBeamExample.f90 rename to LinearElasticity/Analytic/CantileverBeam/Fortran/src/CantileverBeamExample.f90 diff --git a/LinearElasticity/Analytic/CantileverBeam/OpenCMISS.cmake b/LinearElasticity/Analytic/CantileverBeam/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/LinearElasticity/Analytic/CantileverBeam/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/LinearElasticity/Analytic/CantileverBeam/build_debug/build.sh b/LinearElasticity/Analytic/CantileverBeam/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/LinearElasticity/Analytic/CantileverBeam/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/LinearElasticity/Analytic/Extension/CMakeLists.txt b/LinearElasticity/Analytic/Extension/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/LinearElasticity/Analytic/Extension/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/LinearElasticity/Analytic/Extension/Fortran/CMakeLists.txt b/LinearElasticity/Analytic/Extension/Fortran/CMakeLists.txt new file mode 100644 index 00000000..54c08fb2 --- /dev/null +++ b/LinearElasticity/Analytic/Extension/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Extension src/ExtensionExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Extension PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Extension PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Extension COMMAND Extension) +add_opencmiss_environment(test_Extension) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/LinearElasticity/Analytic/Extension/src/ExtensionExample.f90 b/LinearElasticity/Analytic/Extension/Fortran/src/ExtensionExample.f90 similarity index 100% rename from LinearElasticity/Analytic/Extension/src/ExtensionExample.f90 rename to LinearElasticity/Analytic/Extension/Fortran/src/ExtensionExample.f90 diff --git a/LinearElasticity/Analytic/Extension/OpenCMISS.cmake b/LinearElasticity/Analytic/Extension/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/LinearElasticity/Analytic/Extension/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/LinearElasticity/Analytic/Extension/build_debug/build.sh b/LinearElasticity/Analytic/Extension/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/LinearElasticity/Analytic/Extension/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/Meshes/1DCubicHermite/CMakeLists.txt b/Meshes/1DCubicHermite/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/Meshes/1DCubicHermite/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/Meshes/1DCubicHermite/Fortran/CMakeLists.txt b/Meshes/1DCubicHermite/Fortran/CMakeLists.txt new file mode 100644 index 00000000..293a8510 --- /dev/null +++ b/Meshes/1DCubicHermite/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(1DCubicHermite src/1DCubicHermiteExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(1DCubicHermite PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(1DCubicHermite PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_1DCubicHermite COMMAND 1DCubicHermite) +add_opencmiss_environment(test_1DCubicHermite) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/Meshes/1DCubicHermite/src/1DCubicHermiteExample.f90 b/Meshes/1DCubicHermite/Fortran/src/1DCubicHermiteExample.f90 similarity index 100% rename from Meshes/1DCubicHermite/src/1DCubicHermiteExample.f90 rename to Meshes/1DCubicHermite/Fortran/src/1DCubicHermiteExample.f90 diff --git a/Meshes/1DCubicHermite/OpenCMISS.cmake b/Meshes/1DCubicHermite/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/Meshes/1DCubicHermite/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/Meshes/1DCubicHermite/build_debug/build.sh b/Meshes/1DCubicHermite/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/Meshes/1DCubicHermite/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/Meshes/LagrangeSimplexMesh/CMakeLists.txt b/Meshes/LagrangeSimplexMesh/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/Meshes/LagrangeSimplexMesh/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/Meshes/LagrangeSimplexMesh/Fortran/CMakeLists.txt b/Meshes/LagrangeSimplexMesh/Fortran/CMakeLists.txt new file mode 100644 index 00000000..9df15542 --- /dev/null +++ b/Meshes/LagrangeSimplexMesh/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(LagrangeSimplexMesh src/LagrangeSimplexMeshExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(LagrangeSimplexMesh PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(LagrangeSimplexMesh PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_LagrangeSimplexMesh COMMAND LagrangeSimplexMesh) +add_opencmiss_environment(test_LagrangeSimplexMesh) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/Meshes/LagrangeSimplexMesh/src/LagrangeSimplexMeshExample.f90 b/Meshes/LagrangeSimplexMesh/Fortran/src/LagrangeSimplexMeshExample.f90 similarity index 100% rename from Meshes/LagrangeSimplexMesh/src/LagrangeSimplexMeshExample.f90 rename to Meshes/LagrangeSimplexMesh/Fortran/src/LagrangeSimplexMeshExample.f90 diff --git a/Meshes/LagrangeSimplexMesh/OpenCMISS.cmake b/Meshes/LagrangeSimplexMesh/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/Meshes/LagrangeSimplexMesh/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/Meshes/LagrangeSimplexMesh/build_debug/build.sh b/Meshes/LagrangeSimplexMesh/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/Meshes/LagrangeSimplexMesh/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/Meshes/MoreComplexMesh/CMakeLists.txt b/Meshes/MoreComplexMesh/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/Meshes/MoreComplexMesh/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/Meshes/MoreComplexMesh/Fortran/CMakeLists.txt b/Meshes/MoreComplexMesh/Fortran/CMakeLists.txt new file mode 100644 index 00000000..2bdc6cc5 --- /dev/null +++ b/Meshes/MoreComplexMesh/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(MoreComplexMesh src/MoreComplexMeshExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(MoreComplexMesh PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(MoreComplexMesh PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_MoreComplexMesh COMMAND MoreComplexMesh) +add_opencmiss_environment(test_MoreComplexMesh) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/Meshes/MoreComplexMesh/src/MoreComplexMeshExample.f90 b/Meshes/MoreComplexMesh/Fortran/src/MoreComplexMeshExample.f90 similarity index 100% rename from Meshes/MoreComplexMesh/src/MoreComplexMeshExample.f90 rename to Meshes/MoreComplexMesh/Fortran/src/MoreComplexMeshExample.f90 diff --git a/Meshes/MoreComplexMesh/OpenCMISS.cmake b/Meshes/MoreComplexMesh/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/Meshes/MoreComplexMesh/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/Meshes/MoreComplexMesh/build_debug/build.sh b/Meshes/MoreComplexMesh/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/Meshes/MoreComplexMesh/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/Meshes/MoreComplexMeshC/CMakeLists.txt b/Meshes/MoreComplexMeshC/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/Meshes/MoreComplexMeshC/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/Meshes/MoreComplexMeshC/Fortran/CMakeLists.txt b/Meshes/MoreComplexMeshC/Fortran/CMakeLists.txt new file mode 100644 index 00000000..e4043e37 --- /dev/null +++ b/Meshes/MoreComplexMeshC/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(MoreComplexMeshC src/MoreComplexMeshCExample.c) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(MoreComplexMeshC PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(MoreComplexMeshC PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_MoreComplexMeshC COMMAND MoreComplexMeshC) +add_opencmiss_environment(test_MoreComplexMeshC) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/Meshes/MoreComplexMeshC/src/MoreComplexMeshCExample.c b/Meshes/MoreComplexMeshC/Fortran/src/MoreComplexMeshCExample.c similarity index 100% rename from Meshes/MoreComplexMeshC/src/MoreComplexMeshCExample.c rename to Meshes/MoreComplexMeshC/Fortran/src/MoreComplexMeshCExample.c diff --git a/Meshes/MoreComplexMeshC/OpenCMISS.cmake b/Meshes/MoreComplexMeshC/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/Meshes/MoreComplexMeshC/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/Meshes/MoreComplexMeshC/build_debug/build.sh b/Meshes/MoreComplexMeshC/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/Meshes/MoreComplexMeshC/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/Meshes/MultipleMeshComponents/CMakeLists.txt b/Meshes/MultipleMeshComponents/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/Meshes/MultipleMeshComponents/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/Meshes/MultipleMeshComponents/Fortran/CMakeLists.txt b/Meshes/MultipleMeshComponents/Fortran/CMakeLists.txt new file mode 100644 index 00000000..6c10abcd --- /dev/null +++ b/Meshes/MultipleMeshComponents/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(MultipleMeshComponents src/MultipleMeshComponentsExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(MultipleMeshComponents PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(MultipleMeshComponents PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_MultipleMeshComponents COMMAND MultipleMeshComponents) +add_opencmiss_environment(test_MultipleMeshComponents) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/Meshes/MultipleMeshComponents/src/MultipleMeshComponentsExample.f90 b/Meshes/MultipleMeshComponents/Fortran/src/MultipleMeshComponentsExample.f90 similarity index 100% rename from Meshes/MultipleMeshComponents/src/MultipleMeshComponentsExample.f90 rename to Meshes/MultipleMeshComponents/Fortran/src/MultipleMeshComponentsExample.f90 diff --git a/Meshes/MultipleMeshComponents/OpenCMISS.cmake b/Meshes/MultipleMeshComponents/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/Meshes/MultipleMeshComponents/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/Meshes/MultipleMeshComponents/build_debug/build.sh b/Meshes/MultipleMeshComponents/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/Meshes/MultipleMeshComponents/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/Meshes/Simplex/Tetrahedral/Cubic/CMakeLists.txt b/Meshes/Simplex/Tetrahedral/Cubic/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/Meshes/Simplex/Tetrahedral/Cubic/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/Meshes/Simplex/Tetrahedral/Cubic/Fortran/CMakeLists.txt b/Meshes/Simplex/Tetrahedral/Cubic/Fortran/CMakeLists.txt new file mode 100644 index 00000000..2e1a82bc --- /dev/null +++ b/Meshes/Simplex/Tetrahedral/Cubic/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Cubic src/CubicExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Cubic PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Cubic PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Cubic COMMAND Cubic) +add_opencmiss_environment(test_Cubic) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/Meshes/Simplex/Tetrahedral/Cubic/src/CubicExample.f90 b/Meshes/Simplex/Tetrahedral/Cubic/Fortran/src/CubicExample.f90 similarity index 100% rename from Meshes/Simplex/Tetrahedral/Cubic/src/CubicExample.f90 rename to Meshes/Simplex/Tetrahedral/Cubic/Fortran/src/CubicExample.f90 diff --git a/Meshes/Simplex/Tetrahedral/Cubic/OpenCMISS.cmake b/Meshes/Simplex/Tetrahedral/Cubic/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/Meshes/Simplex/Tetrahedral/Cubic/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/Meshes/Simplex/Tetrahedral/Cubic/build_debug/build.sh b/Meshes/Simplex/Tetrahedral/Cubic/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/Meshes/Simplex/Tetrahedral/Cubic/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/Meshes/Simplex/Tetrahedral/Linear/CMakeLists.txt b/Meshes/Simplex/Tetrahedral/Linear/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/Meshes/Simplex/Tetrahedral/Linear/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/Meshes/Simplex/Tetrahedral/Linear/Fortran/CMakeLists.txt b/Meshes/Simplex/Tetrahedral/Linear/Fortran/CMakeLists.txt new file mode 100644 index 00000000..78e65438 --- /dev/null +++ b/Meshes/Simplex/Tetrahedral/Linear/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Linear src/LinearExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Linear PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Linear PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Linear COMMAND Linear) +add_opencmiss_environment(test_Linear) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/Meshes/Simplex/Tetrahedral/Linear/src/LinearExample.f90 b/Meshes/Simplex/Tetrahedral/Linear/Fortran/src/LinearExample.f90 similarity index 100% rename from Meshes/Simplex/Tetrahedral/Linear/src/LinearExample.f90 rename to Meshes/Simplex/Tetrahedral/Linear/Fortran/src/LinearExample.f90 diff --git a/Meshes/Simplex/Tetrahedral/Linear/OpenCMISS.cmake b/Meshes/Simplex/Tetrahedral/Linear/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/Meshes/Simplex/Tetrahedral/Linear/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/Meshes/Simplex/Tetrahedral/Linear/build_debug/build.sh b/Meshes/Simplex/Tetrahedral/Linear/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/Meshes/Simplex/Tetrahedral/Linear/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/Meshes/Simplex/Tetrahedral/Quadratic/CMakeLists.txt b/Meshes/Simplex/Tetrahedral/Quadratic/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/Meshes/Simplex/Tetrahedral/Quadratic/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/Meshes/Simplex/Tetrahedral/Quadratic/Fortran/CMakeLists.txt b/Meshes/Simplex/Tetrahedral/Quadratic/Fortran/CMakeLists.txt new file mode 100644 index 00000000..36193b4d --- /dev/null +++ b/Meshes/Simplex/Tetrahedral/Quadratic/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Quadratic src/QuadraticExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Quadratic PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Quadratic PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Quadratic COMMAND Quadratic) +add_opencmiss_environment(test_Quadratic) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/Meshes/Simplex/Tetrahedral/Quadratic/src/QuadraticExample.f90 b/Meshes/Simplex/Tetrahedral/Quadratic/Fortran/src/QuadraticExample.f90 similarity index 100% rename from Meshes/Simplex/Tetrahedral/Quadratic/src/QuadraticExample.f90 rename to Meshes/Simplex/Tetrahedral/Quadratic/Fortran/src/QuadraticExample.f90 diff --git a/Meshes/Simplex/Tetrahedral/Quadratic/OpenCMISS.cmake b/Meshes/Simplex/Tetrahedral/Quadratic/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/Meshes/Simplex/Tetrahedral/Quadratic/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/Meshes/Simplex/Tetrahedral/Quadratic/build_debug/build.sh b/Meshes/Simplex/Tetrahedral/Quadratic/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/Meshes/Simplex/Tetrahedral/Quadratic/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/Meshes/Simplex/Triangular/Cubic/CMakeLists.txt b/Meshes/Simplex/Triangular/Cubic/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/Meshes/Simplex/Triangular/Cubic/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/Meshes/Simplex/Triangular/Cubic/Fortran/CMakeLists.txt b/Meshes/Simplex/Triangular/Cubic/Fortran/CMakeLists.txt new file mode 100644 index 00000000..2e1a82bc --- /dev/null +++ b/Meshes/Simplex/Triangular/Cubic/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Cubic src/CubicExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Cubic PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Cubic PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Cubic COMMAND Cubic) +add_opencmiss_environment(test_Cubic) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/Meshes/Simplex/Triangular/Cubic/src/CubicExample.f90 b/Meshes/Simplex/Triangular/Cubic/Fortran/src/CubicExample.f90 similarity index 100% rename from Meshes/Simplex/Triangular/Cubic/src/CubicExample.f90 rename to Meshes/Simplex/Triangular/Cubic/Fortran/src/CubicExample.f90 diff --git a/Meshes/Simplex/Triangular/Cubic/OpenCMISS.cmake b/Meshes/Simplex/Triangular/Cubic/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/Meshes/Simplex/Triangular/Cubic/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/Meshes/Simplex/Triangular/Cubic/build_debug/build.sh b/Meshes/Simplex/Triangular/Cubic/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/Meshes/Simplex/Triangular/Cubic/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/Meshes/Simplex/Triangular/Linear/CMakeLists.txt b/Meshes/Simplex/Triangular/Linear/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/Meshes/Simplex/Triangular/Linear/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/Meshes/Simplex/Triangular/Linear/Fortran/CMakeLists.txt b/Meshes/Simplex/Triangular/Linear/Fortran/CMakeLists.txt new file mode 100644 index 00000000..78e65438 --- /dev/null +++ b/Meshes/Simplex/Triangular/Linear/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Linear src/LinearExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Linear PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Linear PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Linear COMMAND Linear) +add_opencmiss_environment(test_Linear) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/Meshes/Simplex/Triangular/Linear/src/LinearExample.f90 b/Meshes/Simplex/Triangular/Linear/Fortran/src/LinearExample.f90 similarity index 100% rename from Meshes/Simplex/Triangular/Linear/src/LinearExample.f90 rename to Meshes/Simplex/Triangular/Linear/Fortran/src/LinearExample.f90 diff --git a/Meshes/Simplex/Triangular/Linear/OpenCMISS.cmake b/Meshes/Simplex/Triangular/Linear/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/Meshes/Simplex/Triangular/Linear/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/Meshes/Simplex/Triangular/Linear/build_debug/build.sh b/Meshes/Simplex/Triangular/Linear/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/Meshes/Simplex/Triangular/Linear/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/Meshes/Simplex/Triangular/Quadratic/CMakeLists.txt b/Meshes/Simplex/Triangular/Quadratic/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/Meshes/Simplex/Triangular/Quadratic/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/Meshes/Simplex/Triangular/Quadratic/Fortran/CMakeLists.txt b/Meshes/Simplex/Triangular/Quadratic/Fortran/CMakeLists.txt new file mode 100644 index 00000000..36193b4d --- /dev/null +++ b/Meshes/Simplex/Triangular/Quadratic/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Quadratic src/QuadraticExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Quadratic PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Quadratic PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Quadratic COMMAND Quadratic) +add_opencmiss_environment(test_Quadratic) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/Meshes/Simplex/Triangular/Quadratic/src/QuadraticExample.f90 b/Meshes/Simplex/Triangular/Quadratic/Fortran/src/QuadraticExample.f90 similarity index 100% rename from Meshes/Simplex/Triangular/Quadratic/src/QuadraticExample.f90 rename to Meshes/Simplex/Triangular/Quadratic/Fortran/src/QuadraticExample.f90 diff --git a/Meshes/Simplex/Triangular/Quadratic/OpenCMISS.cmake b/Meshes/Simplex/Triangular/Quadratic/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/Meshes/Simplex/Triangular/Quadratic/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/Meshes/Simplex/Triangular/Quadratic/build_debug/build.sh b/Meshes/Simplex/Triangular/Quadratic/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/Meshes/Simplex/Triangular/Quadratic/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/Meshes/Simplex/Triangular/QuadraticSimplexManual/CMakeLists.txt b/Meshes/Simplex/Triangular/QuadraticSimplexManual/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/Meshes/Simplex/Triangular/QuadraticSimplexManual/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/Meshes/Simplex/Triangular/QuadraticSimplexManual/Fortran/CMakeLists.txt b/Meshes/Simplex/Triangular/QuadraticSimplexManual/Fortran/CMakeLists.txt new file mode 100644 index 00000000..41467b5e --- /dev/null +++ b/Meshes/Simplex/Triangular/QuadraticSimplexManual/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(QuadraticSimplexManual src/SimplexMeshExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(QuadraticSimplexManual PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(QuadraticSimplexManual PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_QuadraticSimplexManual COMMAND QuadraticSimplexManual) +add_opencmiss_environment(test_QuadraticSimplexManual) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/Meshes/Simplex/Triangular/QuadraticSimplexManual/src/SimplexMeshExample.f90 b/Meshes/Simplex/Triangular/QuadraticSimplexManual/Fortran/src/SimplexMeshExample.f90 similarity index 100% rename from Meshes/Simplex/Triangular/QuadraticSimplexManual/src/SimplexMeshExample.f90 rename to Meshes/Simplex/Triangular/QuadraticSimplexManual/Fortran/src/SimplexMeshExample.f90 diff --git a/Meshes/Simplex/Triangular/QuadraticSimplexManual/OpenCMISS.cmake b/Meshes/Simplex/Triangular/QuadraticSimplexManual/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/Meshes/Simplex/Triangular/QuadraticSimplexManual/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/Meshes/Simplex/Triangular/QuadraticSimplexManual/build_debug/build.sh b/Meshes/Simplex/Triangular/QuadraticSimplexManual/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/Meshes/Simplex/Triangular/QuadraticSimplexManual/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/Meshes/Versions3DLaplace/CMakeLists.txt b/Meshes/Versions3DLaplace/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/Meshes/Versions3DLaplace/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/Meshes/Versions3DLaplace/Fortran/CMakeLists.txt b/Meshes/Versions3DLaplace/Fortran/CMakeLists.txt new file mode 100644 index 00000000..67c46664 --- /dev/null +++ b/Meshes/Versions3DLaplace/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Versions3DLaplace src/Versions3DLaplaceExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Versions3DLaplace PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Versions3DLaplace PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Versions3DLaplace COMMAND Versions3DLaplace) +add_opencmiss_environment(test_Versions3DLaplace) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/Meshes/Versions3DLaplace/src/Versions3DLaplaceExample.f90 b/Meshes/Versions3DLaplace/Fortran/src/Versions3DLaplaceExample.f90 similarity index 100% rename from Meshes/Versions3DLaplace/src/Versions3DLaplaceExample.f90 rename to Meshes/Versions3DLaplace/Fortran/src/Versions3DLaplaceExample.f90 diff --git a/Meshes/Versions3DLaplace/OpenCMISS.cmake b/Meshes/Versions3DLaplace/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/Meshes/Versions3DLaplace/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/Meshes/Versions3DLaplace/build_debug/build.sh b/Meshes/Versions3DLaplace/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/Meshes/Versions3DLaplace/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/simple_geometry/CMakeLists.txt b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/simple_geometry/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/simple_geometry/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/simple_geometry/Fortran/CMakeLists.txt b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/simple_geometry/Fortran/CMakeLists.txt new file mode 100644 index 00000000..1a6da7cd --- /dev/null +++ b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/simple_geometry/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(simple_geometry src/simple_geometryExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(simple_geometry PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(simple_geometry PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_simple_geometry COMMAND simple_geometry) +add_opencmiss_environment(test_simple_geometry) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/simple_geometry/src/simple_geometryExample.f90 b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/simple_geometry/Fortran/src/simple_geometryExample.f90 similarity index 100% rename from MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/simple_geometry/src/simple_geometryExample.f90 rename to MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/simple_geometry/Fortran/src/simple_geometryExample.f90 diff --git a/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/simple_geometry/OpenCMISS.cmake b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/simple_geometry/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/simple_geometry/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/simple_geometry/build_debug/build.sh b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/simple_geometry/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/simple_geometry/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/titin_10/CMakeLists.txt b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/titin_10/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/titin_10/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/titin_10/Fortran/CMakeLists.txt b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/titin_10/Fortran/CMakeLists.txt new file mode 100644 index 00000000..b4813d14 --- /dev/null +++ b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/titin_10/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(titin_10 src/titin_10Example.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(titin_10 PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(titin_10 PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_titin_10 COMMAND titin_10) +add_opencmiss_environment(test_titin_10) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/titin_10/src/titin_10Example.f90 b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/titin_10/Fortran/src/titin_10Example.f90 similarity index 100% rename from MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/titin_10/src/titin_10Example.f90 rename to MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/titin_10/Fortran/src/titin_10Example.f90 diff --git a/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/titin_10/OpenCMISS.cmake b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/titin_10/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/titin_10/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/titin_10/build_debug/build.sh b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/titin_10/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/titin_10/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/while_loop/CMakeLists.txt b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/while_loop/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/while_loop/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/while_loop/Fortran/CMakeLists.txt b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/while_loop/Fortran/CMakeLists.txt new file mode 100644 index 00000000..9effedf2 --- /dev/null +++ b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/while_loop/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(while_loop src/while_loopExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(while_loop PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(while_loop PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_while_loop COMMAND while_loop) +add_opencmiss_environment(test_while_loop) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/while_loop/src/while_loopExample.f90 b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/while_loop/Fortran/src/while_loopExample.f90 similarity index 100% rename from MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/while_loop/src/while_loopExample.f90 rename to MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/while_loop/Fortran/src/while_loopExample.f90 diff --git a/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/while_loop/OpenCMISS.cmake b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/while_loop/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/while_loop/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/while_loop/build_debug/build.sh b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/while_loop/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticity1D3DMesh/while_loop/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticitySameMesh/CMakeLists.txt b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticitySameMesh/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticitySameMesh/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticitySameMesh/Fortran/CMakeLists.txt b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticitySameMesh/Fortran/CMakeLists.txt new file mode 100644 index 00000000..a3337589 --- /dev/null +++ b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticitySameMesh/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(GudunovMonodomainElasticitySameMesh src/GudunovMonodomainElasticitySameMeshExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(GudunovMonodomainElasticitySameMesh PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(GudunovMonodomainElasticitySameMesh PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_GudunovMonodomainElasticitySameMesh COMMAND GudunovMonodomainElasticitySameMesh) +add_opencmiss_environment(test_GudunovMonodomainElasticitySameMesh) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticitySameMesh/src/GudunovMonodomainElasticitySameMeshExample.f90 b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticitySameMesh/Fortran/src/GudunovMonodomainElasticitySameMeshExample.f90 similarity index 100% rename from MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticitySameMesh/src/GudunovMonodomainElasticitySameMeshExample.f90 rename to MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticitySameMesh/Fortran/src/GudunovMonodomainElasticitySameMeshExample.f90 diff --git a/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticitySameMesh/OpenCMISS.cmake b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticitySameMesh/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticitySameMesh/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticitySameMesh/build_debug/build.sh b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticitySameMesh/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/BioelectricFiniteElasticity/GudunovMonodomainElasticitySameMesh/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/CoupledDiffusionAdvectionDiffusion/CMakeLists.txt b/MultiPhysics/CoupledDiffusionAdvectionDiffusion/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/CoupledDiffusionAdvectionDiffusion/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/CoupledDiffusionAdvectionDiffusion/Fortran/CMakeLists.txt b/MultiPhysics/CoupledDiffusionAdvectionDiffusion/Fortran/CMakeLists.txt new file mode 100644 index 00000000..0fce269b --- /dev/null +++ b/MultiPhysics/CoupledDiffusionAdvectionDiffusion/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(CoupledDiffusionAdvectionDiffusion src/CoupledDiffusionAdvectionDiffusionExample.f90 src/CoupledDiffusionAdvectionDiffusionExample_old.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(CoupledDiffusionAdvectionDiffusion PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(CoupledDiffusionAdvectionDiffusion PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_CoupledDiffusionAdvectionDiffusion COMMAND CoupledDiffusionAdvectionDiffusion) +add_opencmiss_environment(test_CoupledDiffusionAdvectionDiffusion) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/CoupledDiffusionAdvectionDiffusion/src/CoupledDiffusionAdvectionDiffusionExample.f90 b/MultiPhysics/CoupledDiffusionAdvectionDiffusion/Fortran/src/CoupledDiffusionAdvectionDiffusionExample.f90 similarity index 100% rename from MultiPhysics/CoupledDiffusionAdvectionDiffusion/src/CoupledDiffusionAdvectionDiffusionExample.f90 rename to MultiPhysics/CoupledDiffusionAdvectionDiffusion/Fortran/src/CoupledDiffusionAdvectionDiffusionExample.f90 diff --git a/MultiPhysics/CoupledDiffusionAdvectionDiffusion/src/CoupledDiffusionAdvectionDiffusionExample_old.f90 b/MultiPhysics/CoupledDiffusionAdvectionDiffusion/Fortran/src/CoupledDiffusionAdvectionDiffusionExample_old.f90 similarity index 100% rename from MultiPhysics/CoupledDiffusionAdvectionDiffusion/src/CoupledDiffusionAdvectionDiffusionExample_old.f90 rename to MultiPhysics/CoupledDiffusionAdvectionDiffusion/Fortran/src/CoupledDiffusionAdvectionDiffusionExample_old.f90 diff --git a/MultiPhysics/CoupledDiffusionAdvectionDiffusion/OpenCMISS.cmake b/MultiPhysics/CoupledDiffusionAdvectionDiffusion/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/CoupledDiffusionAdvectionDiffusion/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/CoupledDiffusionAdvectionDiffusion/build_debug/build.sh b/MultiPhysics/CoupledDiffusionAdvectionDiffusion/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/CoupledDiffusionAdvectionDiffusion/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/CoupledDiffusionDiffusion/CoupledDiffusionDiffusion/CMakeLists.txt b/MultiPhysics/CoupledDiffusionDiffusion/CoupledDiffusionDiffusion/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/CoupledDiffusionDiffusion/CoupledDiffusionDiffusion/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/CoupledDiffusionDiffusion/CoupledDiffusionDiffusion/Fortran/CMakeLists.txt b/MultiPhysics/CoupledDiffusionDiffusion/CoupledDiffusionDiffusion/Fortran/CMakeLists.txt new file mode 100644 index 00000000..fc100426 --- /dev/null +++ b/MultiPhysics/CoupledDiffusionDiffusion/CoupledDiffusionDiffusion/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(CoupledDiffusionDiffusion src/CoupledDiffusionDiffusionExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(CoupledDiffusionDiffusion PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(CoupledDiffusionDiffusion PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_CoupledDiffusionDiffusion COMMAND CoupledDiffusionDiffusion) +add_opencmiss_environment(test_CoupledDiffusionDiffusion) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/CoupledDiffusionDiffusion/CoupledDiffusionDiffusion/src/CoupledDiffusionDiffusionExample.f90 b/MultiPhysics/CoupledDiffusionDiffusion/CoupledDiffusionDiffusion/Fortran/src/CoupledDiffusionDiffusionExample.f90 similarity index 100% rename from MultiPhysics/CoupledDiffusionDiffusion/CoupledDiffusionDiffusion/src/CoupledDiffusionDiffusionExample.f90 rename to MultiPhysics/CoupledDiffusionDiffusion/CoupledDiffusionDiffusion/Fortran/src/CoupledDiffusionDiffusionExample.f90 diff --git a/MultiPhysics/CoupledDiffusionDiffusion/CoupledDiffusionDiffusion/OpenCMISS.cmake b/MultiPhysics/CoupledDiffusionDiffusion/CoupledDiffusionDiffusion/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/CoupledDiffusionDiffusion/CoupledDiffusionDiffusion/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/CoupledDiffusionDiffusion/CoupledDiffusionDiffusion/build_debug/build.sh b/MultiPhysics/CoupledDiffusionDiffusion/CoupledDiffusionDiffusion/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/CoupledDiffusionDiffusion/CoupledDiffusionDiffusion/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/CoupledDiffusionDiffusion/MonolithicAnalyticTestThreeCompThreeDim/CMakeLists.txt b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicAnalyticTestThreeCompThreeDim/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicAnalyticTestThreeCompThreeDim/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/CoupledDiffusionDiffusion/MonolithicAnalyticTestThreeCompThreeDim/Fortran/CMakeLists.txt b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicAnalyticTestThreeCompThreeDim/Fortran/CMakeLists.txt new file mode 100644 index 00000000..f89e43b1 --- /dev/null +++ b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicAnalyticTestThreeCompThreeDim/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(MonolithicAnalyticTestThreeCompThreeDim src/MonolithicAnalyticTestThreeCompThreeDimExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(MonolithicAnalyticTestThreeCompThreeDim PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(MonolithicAnalyticTestThreeCompThreeDim PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_MonolithicAnalyticTestThreeCompThreeDim COMMAND MonolithicAnalyticTestThreeCompThreeDim) +add_opencmiss_environment(test_MonolithicAnalyticTestThreeCompThreeDim) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/CoupledDiffusionDiffusion/MonolithicAnalyticTestThreeCompThreeDim/src/MonolithicAnalyticTestThreeCompThreeDimExample.f90 b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicAnalyticTestThreeCompThreeDim/Fortran/src/MonolithicAnalyticTestThreeCompThreeDimExample.f90 similarity index 100% rename from MultiPhysics/CoupledDiffusionDiffusion/MonolithicAnalyticTestThreeCompThreeDim/src/MonolithicAnalyticTestThreeCompThreeDimExample.f90 rename to MultiPhysics/CoupledDiffusionDiffusion/MonolithicAnalyticTestThreeCompThreeDim/Fortran/src/MonolithicAnalyticTestThreeCompThreeDimExample.f90 diff --git a/MultiPhysics/CoupledDiffusionDiffusion/MonolithicAnalyticTestThreeCompThreeDim/OpenCMISS.cmake b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicAnalyticTestThreeCompThreeDim/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicAnalyticTestThreeCompThreeDim/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/CoupledDiffusionDiffusion/MonolithicAnalyticTestThreeCompThreeDim/build_debug/build.sh b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicAnalyticTestThreeCompThreeDim/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicAnalyticTestThreeCompThreeDim/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest/CMakeLists.txt b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest/Fortran/CMakeLists.txt b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest/Fortran/CMakeLists.txt new file mode 100644 index 00000000..44a2cb71 --- /dev/null +++ b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(MonolithicSchemeTest src/MonolithicSchemeTestExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(MonolithicSchemeTest PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(MonolithicSchemeTest PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_MonolithicSchemeTest COMMAND MonolithicSchemeTest) +add_opencmiss_environment(test_MonolithicSchemeTest) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest/src/MonolithicSchemeTestExample.f90 b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest/Fortran/src/MonolithicSchemeTestExample.f90 similarity index 100% rename from MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest/src/MonolithicSchemeTestExample.f90 rename to MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest/Fortran/src/MonolithicSchemeTestExample.f90 diff --git a/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest/OpenCMISS.cmake b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest/build_debug/build.sh b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTestAnalytic/CMakeLists.txt b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTestAnalytic/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTestAnalytic/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTestAnalytic/Fortran/CMakeLists.txt b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTestAnalytic/Fortran/CMakeLists.txt new file mode 100644 index 00000000..f492b50d --- /dev/null +++ b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTestAnalytic/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(MonolithicSchemeTestAnalytic src/MonolithicSchemeTestAnalyticExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(MonolithicSchemeTestAnalytic PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(MonolithicSchemeTestAnalytic PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_MonolithicSchemeTestAnalytic COMMAND MonolithicSchemeTestAnalytic) +add_opencmiss_environment(test_MonolithicSchemeTestAnalytic) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTestAnalytic/src/MonolithicSchemeTestAnalyticExample.f90 b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTestAnalytic/Fortran/src/MonolithicSchemeTestAnalyticExample.f90 similarity index 100% rename from MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTestAnalytic/src/MonolithicSchemeTestAnalyticExample.f90 rename to MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTestAnalytic/Fortran/src/MonolithicSchemeTestAnalyticExample.f90 diff --git a/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTestAnalytic/OpenCMISS.cmake b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTestAnalytic/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTestAnalytic/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTestAnalytic/build_debug/build.sh b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTestAnalytic/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTestAnalytic/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest_FieldML/CMakeLists.txt b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest_FieldML/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest_FieldML/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest_FieldML/Fortran/CMakeLists.txt b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest_FieldML/Fortran/CMakeLists.txt new file mode 100644 index 00000000..0bc41fdf --- /dev/null +++ b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest_FieldML/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(MonolithicSchemeTest_FieldML src/MonolithicSchemeTest_FieldMLExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(MonolithicSchemeTest_FieldML PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(MonolithicSchemeTest_FieldML PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_MonolithicSchemeTest_FieldML COMMAND MonolithicSchemeTest_FieldML) +add_opencmiss_environment(test_MonolithicSchemeTest_FieldML) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest_FieldML/src/MonolithicSchemeTest_FieldMLExample.f90 b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest_FieldML/Fortran/src/MonolithicSchemeTest_FieldMLExample.f90 similarity index 100% rename from MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest_FieldML/src/MonolithicSchemeTest_FieldMLExample.f90 rename to MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest_FieldML/Fortran/src/MonolithicSchemeTest_FieldMLExample.f90 diff --git a/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest_FieldML/OpenCMISS.cmake b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest_FieldML/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest_FieldML/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest_FieldML/build_debug/build.sh b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest_FieldML/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/CoupledDiffusionDiffusion/MonolithicSchemeTest_FieldML/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/MultiCompTransport/MultiCompAdvectionDiffusion/MonolithicSchemeAdvectionDiffusion_FieldML/CMakeLists.txt b/MultiPhysics/MultiCompTransport/MultiCompAdvectionDiffusion/MonolithicSchemeAdvectionDiffusion_FieldML/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/MultiCompTransport/MultiCompAdvectionDiffusion/MonolithicSchemeAdvectionDiffusion_FieldML/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/MultiCompTransport/MultiCompAdvectionDiffusion/MonolithicSchemeAdvectionDiffusion_FieldML/Fortran/CMakeLists.txt b/MultiPhysics/MultiCompTransport/MultiCompAdvectionDiffusion/MonolithicSchemeAdvectionDiffusion_FieldML/Fortran/CMakeLists.txt new file mode 100644 index 00000000..c50ad3bd --- /dev/null +++ b/MultiPhysics/MultiCompTransport/MultiCompAdvectionDiffusion/MonolithicSchemeAdvectionDiffusion_FieldML/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(MonolithicSchemeAdvectionDiffusion_FieldML src/MonolithicSchemeAdvectionDiffusion_FieldMLExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(MonolithicSchemeAdvectionDiffusion_FieldML PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(MonolithicSchemeAdvectionDiffusion_FieldML PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_MonolithicSchemeAdvectionDiffusion_FieldML COMMAND MonolithicSchemeAdvectionDiffusion_FieldML) +add_opencmiss_environment(test_MonolithicSchemeAdvectionDiffusion_FieldML) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/MultiCompTransport/MultiCompAdvectionDiffusion/MonolithicSchemeAdvectionDiffusion_FieldML/src/MonolithicSchemeAdvectionDiffusion_FieldMLExample.f90 b/MultiPhysics/MultiCompTransport/MultiCompAdvectionDiffusion/MonolithicSchemeAdvectionDiffusion_FieldML/Fortran/src/MonolithicSchemeAdvectionDiffusion_FieldMLExample.f90 similarity index 100% rename from MultiPhysics/MultiCompTransport/MultiCompAdvectionDiffusion/MonolithicSchemeAdvectionDiffusion_FieldML/src/MonolithicSchemeAdvectionDiffusion_FieldMLExample.f90 rename to MultiPhysics/MultiCompTransport/MultiCompAdvectionDiffusion/MonolithicSchemeAdvectionDiffusion_FieldML/Fortran/src/MonolithicSchemeAdvectionDiffusion_FieldMLExample.f90 diff --git a/MultiPhysics/MultiCompTransport/MultiCompAdvectionDiffusion/MonolithicSchemeAdvectionDiffusion_FieldML/OpenCMISS.cmake b/MultiPhysics/MultiCompTransport/MultiCompAdvectionDiffusion/MonolithicSchemeAdvectionDiffusion_FieldML/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/MultiCompTransport/MultiCompAdvectionDiffusion/MonolithicSchemeAdvectionDiffusion_FieldML/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/MultiCompTransport/MultiCompAdvectionDiffusion/MonolithicSchemeAdvectionDiffusion_FieldML/build_debug/build.sh b/MultiPhysics/MultiCompTransport/MultiCompAdvectionDiffusion/MonolithicSchemeAdvectionDiffusion_FieldML/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/MultiCompTransport/MultiCompAdvectionDiffusion/MonolithicSchemeAdvectionDiffusion_FieldML/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenDarcy/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenDarcy/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenDarcy/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenDarcy/Fortran/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenDarcy/Fortran/CMakeLists.txt new file mode 100644 index 00000000..75c0e4f3 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenDarcy/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(CylinderInflationDrivenDarcy src/CylinderInflationDrivenDarcyExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(CylinderInflationDrivenDarcy PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(CylinderInflationDrivenDarcy PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_CylinderInflationDrivenDarcy COMMAND CylinderInflationDrivenDarcy) +add_opencmiss_environment(test_CylinderInflationDrivenDarcy) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenDarcy/src/CylinderInflationDrivenDarcyExample.f90 b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenDarcy/Fortran/src/CylinderInflationDrivenDarcyExample.f90 similarity index 100% rename from MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenDarcy/src/CylinderInflationDrivenDarcyExample.f90 rename to MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenDarcy/Fortran/src/CylinderInflationDrivenDarcyExample.f90 diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenDarcy/OpenCMISS.cmake b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenDarcy/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenDarcy/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenDarcy/build_debug/build.sh b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenDarcy/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenDarcy/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenMultiCompDarcy/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenMultiCompDarcy/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenMultiCompDarcy/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenMultiCompDarcy/Fortran/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenMultiCompDarcy/Fortran/CMakeLists.txt new file mode 100644 index 00000000..90dd8b72 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenMultiCompDarcy/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(CylinderInflationDrivenMultiCompDarcy src/CylinderInflationDrivenMultiCompDarcyExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(CylinderInflationDrivenMultiCompDarcy PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(CylinderInflationDrivenMultiCompDarcy PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_CylinderInflationDrivenMultiCompDarcy COMMAND CylinderInflationDrivenMultiCompDarcy) +add_opencmiss_environment(test_CylinderInflationDrivenMultiCompDarcy) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenMultiCompDarcy/src/CylinderInflationDrivenMultiCompDarcyExample.f90 b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenMultiCompDarcy/Fortran/src/CylinderInflationDrivenMultiCompDarcyExample.f90 similarity index 100% rename from MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenMultiCompDarcy/src/CylinderInflationDrivenMultiCompDarcyExample.f90 rename to MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenMultiCompDarcy/Fortran/src/CylinderInflationDrivenMultiCompDarcyExample.f90 diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenMultiCompDarcy/OpenCMISS.cmake b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenMultiCompDarcy/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenMultiCompDarcy/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenMultiCompDarcy/build_debug/build.sh b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenMultiCompDarcy/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/CylinderInflationDrivenMultiCompDarcy/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompElastDrivenDarcy_AnalyticDarcy/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompElastDrivenDarcy_AnalyticDarcy/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompElastDrivenDarcy_AnalyticDarcy/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompElastDrivenDarcy_AnalyticDarcy/Fortran/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompElastDrivenDarcy_AnalyticDarcy/Fortran/CMakeLists.txt new file mode 100644 index 00000000..a6a12071 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompElastDrivenDarcy_AnalyticDarcy/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(IncompElastDrivenDarcy_AnalyticDarcy src/IncompElastDrivenDarcy_AnalyticDarcyExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(IncompElastDrivenDarcy_AnalyticDarcy PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(IncompElastDrivenDarcy_AnalyticDarcy PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_IncompElastDrivenDarcy_AnalyticDarcy COMMAND IncompElastDrivenDarcy_AnalyticDarcy) +add_opencmiss_environment(test_IncompElastDrivenDarcy_AnalyticDarcy) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompElastDrivenDarcy_AnalyticDarcy/src/IncompElastDrivenDarcy_AnalyticDarcyExample.f90 b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompElastDrivenDarcy_AnalyticDarcy/Fortran/src/IncompElastDrivenDarcy_AnalyticDarcyExample.f90 similarity index 100% rename from MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompElastDrivenDarcy_AnalyticDarcy/src/IncompElastDrivenDarcy_AnalyticDarcyExample.f90 rename to MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompElastDrivenDarcy_AnalyticDarcy/Fortran/src/IncompElastDrivenDarcy_AnalyticDarcyExample.f90 diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompElastDrivenDarcy_AnalyticDarcy/OpenCMISS.cmake b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompElastDrivenDarcy_AnalyticDarcy/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompElastDrivenDarcy_AnalyticDarcy/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompElastDrivenDarcy_AnalyticDarcy/build_debug/build.sh b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompElastDrivenDarcy_AnalyticDarcy/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompElastDrivenDarcy_AnalyticDarcy/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcy/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcy/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcy/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcy/Fortran/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcy/Fortran/CMakeLists.txt new file mode 100644 index 00000000..10f5c7ae --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcy/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(IncompressibleElasticityDrivenDarcy src/IncompressibleElasticityDrivenDarcyExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(IncompressibleElasticityDrivenDarcy PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(IncompressibleElasticityDrivenDarcy PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_IncompressibleElasticityDrivenDarcy COMMAND IncompressibleElasticityDrivenDarcy) +add_opencmiss_environment(test_IncompressibleElasticityDrivenDarcy) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcy/src/IncompressibleElasticityDrivenDarcyExample.f90 b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcy/Fortran/src/IncompressibleElasticityDrivenDarcyExample.f90 similarity index 100% rename from MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcy/src/IncompressibleElasticityDrivenDarcyExample.f90 rename to MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcy/Fortran/src/IncompressibleElasticityDrivenDarcyExample.f90 diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcy/OpenCMISS.cmake b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcy/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcy/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcy/build_debug/build.sh b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcy/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcy/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO/Fortran/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO/Fortran/CMakeLists.txt new file mode 100644 index 00000000..56c7961a --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(IncompressibleElasticityDrivenDarcyIO src/IncompressibleElasticityDrivenDarcyIOExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(IncompressibleElasticityDrivenDarcyIO PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(IncompressibleElasticityDrivenDarcyIO PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_IncompressibleElasticityDrivenDarcyIO COMMAND IncompressibleElasticityDrivenDarcyIO) +add_opencmiss_environment(test_IncompressibleElasticityDrivenDarcyIO) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO/src/IncompressibleElasticityDrivenDarcyIOExample.f90 b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO/Fortran/src/IncompressibleElasticityDrivenDarcyIOExample.f90 similarity index 100% rename from MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO/src/IncompressibleElasticityDrivenDarcyIOExample.f90 rename to MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO/Fortran/src/IncompressibleElasticityDrivenDarcyIOExample.f90 diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO/OpenCMISS.cmake b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO/build_debug/build.sh b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO2/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO2/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO2/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO2/Fortran/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO2/Fortran/CMakeLists.txt new file mode 100644 index 00000000..bd8461aa --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO2/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(IncompressibleElasticityDrivenDarcyIO2 src/IncompressibleElasticityDrivenDarcyIO2Example.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(IncompressibleElasticityDrivenDarcyIO2 PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(IncompressibleElasticityDrivenDarcyIO2 PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_IncompressibleElasticityDrivenDarcyIO2 COMMAND IncompressibleElasticityDrivenDarcyIO2) +add_opencmiss_environment(test_IncompressibleElasticityDrivenDarcyIO2) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO2/src/IncompressibleElasticityDrivenDarcyIO2Example.f90 b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO2/Fortran/src/IncompressibleElasticityDrivenDarcyIO2Example.f90 similarity index 100% rename from MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO2/src/IncompressibleElasticityDrivenDarcyIO2Example.f90 rename to MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO2/Fortran/src/IncompressibleElasticityDrivenDarcyIO2Example.f90 diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO2/OpenCMISS.cmake b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO2/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO2/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO2/build_debug/build.sh b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO2/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO2/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO3/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO3/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO3/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO3/Fortran/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO3/Fortran/CMakeLists.txt new file mode 100644 index 00000000..c3723240 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO3/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(IncompressibleElasticityDrivenDarcyIO3 src/IncompressibleElasticityDrivenDarcyIO3Example.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(IncompressibleElasticityDrivenDarcyIO3 PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(IncompressibleElasticityDrivenDarcyIO3 PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_IncompressibleElasticityDrivenDarcyIO3 COMMAND IncompressibleElasticityDrivenDarcyIO3) +add_opencmiss_environment(test_IncompressibleElasticityDrivenDarcyIO3) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO3/src/IncompressibleElasticityDrivenDarcyIO3Example.f90 b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO3/Fortran/src/IncompressibleElasticityDrivenDarcyIO3Example.f90 similarity index 100% rename from MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO3/src/IncompressibleElasticityDrivenDarcyIO3Example.f90 rename to MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO3/Fortran/src/IncompressibleElasticityDrivenDarcyIO3Example.f90 diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO3/OpenCMISS.cmake b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO3/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO3/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO3/build_debug/build.sh b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO3/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyIO3/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyMatSolve/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyMatSolve/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyMatSolve/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyMatSolve/Fortran/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyMatSolve/Fortran/CMakeLists.txt new file mode 100644 index 00000000..4735b14d --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyMatSolve/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(IncompressibleElasticityDrivenDarcyMatSolve src/IncompressibleElasticityDrivenDarcyMatSolveExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(IncompressibleElasticityDrivenDarcyMatSolve PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(IncompressibleElasticityDrivenDarcyMatSolve PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_IncompressibleElasticityDrivenDarcyMatSolve COMMAND IncompressibleElasticityDrivenDarcyMatSolve) +add_opencmiss_environment(test_IncompressibleElasticityDrivenDarcyMatSolve) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyMatSolve/src/IncompressibleElasticityDrivenDarcyMatSolveExample.f90 b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyMatSolve/Fortran/src/IncompressibleElasticityDrivenDarcyMatSolveExample.f90 similarity index 100% rename from MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyMatSolve/src/IncompressibleElasticityDrivenDarcyMatSolveExample.f90 rename to MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyMatSolve/Fortran/src/IncompressibleElasticityDrivenDarcyMatSolveExample.f90 diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyMatSolve/OpenCMISS.cmake b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyMatSolve/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyMatSolve/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyMatSolve/build_debug/build.sh b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyMatSolve/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenDarcyMatSolve/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcy/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcy/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcy/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcy/Fortran/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcy/Fortran/CMakeLists.txt new file mode 100644 index 00000000..e0a66874 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcy/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(IncompressibleElasticityDrivenMultiCompDarcy src/IncompressibleElasticityDrivenMultiCompDarcyExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(IncompressibleElasticityDrivenMultiCompDarcy PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(IncompressibleElasticityDrivenMultiCompDarcy PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_IncompressibleElasticityDrivenMultiCompDarcy COMMAND IncompressibleElasticityDrivenMultiCompDarcy) +add_opencmiss_environment(test_IncompressibleElasticityDrivenMultiCompDarcy) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcy/src/IncompressibleElasticityDrivenMultiCompDarcyExample.f90 b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcy/Fortran/src/IncompressibleElasticityDrivenMultiCompDarcyExample.f90 similarity index 100% rename from MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcy/src/IncompressibleElasticityDrivenMultiCompDarcyExample.f90 rename to MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcy/Fortran/src/IncompressibleElasticityDrivenMultiCompDarcyExample.f90 diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcy/OpenCMISS.cmake b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcy/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcy/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcy/build_debug/build.sh b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcy/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcy/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcyIO/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcyIO/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcyIO/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcyIO/Fortran/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcyIO/Fortran/CMakeLists.txt new file mode 100644 index 00000000..89df600d --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcyIO/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(IncompressibleElasticityDrivenMultiCompDarcyIO src/IncompressibleElasticityDrivenMultiCompDarcyIOExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(IncompressibleElasticityDrivenMultiCompDarcyIO PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(IncompressibleElasticityDrivenMultiCompDarcyIO PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_IncompressibleElasticityDrivenMultiCompDarcyIO COMMAND IncompressibleElasticityDrivenMultiCompDarcyIO) +add_opencmiss_environment(test_IncompressibleElasticityDrivenMultiCompDarcyIO) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcyIO/src/IncompressibleElasticityDrivenMultiCompDarcyIOExample.f90 b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcyIO/Fortran/src/IncompressibleElasticityDrivenMultiCompDarcyIOExample.f90 similarity index 100% rename from MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcyIO/src/IncompressibleElasticityDrivenMultiCompDarcyIOExample.f90 rename to MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcyIO/Fortran/src/IncompressibleElasticityDrivenMultiCompDarcyIOExample.f90 diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcyIO/OpenCMISS.cmake b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcyIO/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcyIO/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcyIO/build_debug/build.sh b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcyIO/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/IncompressibleElasticityDrivenMultiCompDarcyIO/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/InriaModel/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/InriaModel/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/InriaModel/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/InriaModel/Fortran/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/InriaModel/Fortran/CMakeLists.txt new file mode 100644 index 00000000..fe950854 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/InriaModel/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(InriaModel src/InriaModelExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(InriaModel PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(InriaModel PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_InriaModel COMMAND InriaModel) +add_opencmiss_environment(test_InriaModel) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/InriaModel/src/InriaModelExample.f90 b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/InriaModel/Fortran/src/InriaModelExample.f90 similarity index 100% rename from MultiPhysics/Poroelasticity/FiniteElasticityDarcy/InriaModel/src/InriaModelExample.f90 rename to MultiPhysics/Poroelasticity/FiniteElasticityDarcy/InriaModel/Fortran/src/InriaModelExample.f90 diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/InriaModel/OpenCMISS.cmake b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/InriaModel/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/InriaModel/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/InriaModel/build_debug/build.sh b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/InriaModel/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/InriaModel/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenDarcy/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenDarcy/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenDarcy/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenDarcy/Fortran/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenDarcy/Fortran/CMakeLists.txt new file mode 100644 index 00000000..77a5ac5d --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenDarcy/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(QuadraticEllipsoidDrivenDarcy src/QuadraticEllipsoidDrivenDarcyExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(QuadraticEllipsoidDrivenDarcy PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(QuadraticEllipsoidDrivenDarcy PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_QuadraticEllipsoidDrivenDarcy COMMAND QuadraticEllipsoidDrivenDarcy) +add_opencmiss_environment(test_QuadraticEllipsoidDrivenDarcy) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenDarcy/src/QuadraticEllipsoidDrivenDarcyExample.f90 b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenDarcy/Fortran/src/QuadraticEllipsoidDrivenDarcyExample.f90 similarity index 100% rename from MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenDarcy/src/QuadraticEllipsoidDrivenDarcyExample.f90 rename to MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenDarcy/Fortran/src/QuadraticEllipsoidDrivenDarcyExample.f90 diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenDarcy/OpenCMISS.cmake b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenDarcy/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenDarcy/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenDarcy/build_debug/build.sh b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenDarcy/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenDarcy/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenMultiCompDarcy/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenMultiCompDarcy/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenMultiCompDarcy/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenMultiCompDarcy/Fortran/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenMultiCompDarcy/Fortran/CMakeLists.txt new file mode 100644 index 00000000..402d64b2 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenMultiCompDarcy/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(QuadraticEllipsoidDrivenMultiCompDarcy src/QuadraticEllipsoidDrivenMultiCompDarcyExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(QuadraticEllipsoidDrivenMultiCompDarcy PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(QuadraticEllipsoidDrivenMultiCompDarcy PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_QuadraticEllipsoidDrivenMultiCompDarcy COMMAND QuadraticEllipsoidDrivenMultiCompDarcy) +add_opencmiss_environment(test_QuadraticEllipsoidDrivenMultiCompDarcy) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenMultiCompDarcy/src/QuadraticEllipsoidDrivenMultiCompDarcyExample.f90 b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenMultiCompDarcy/Fortran/src/QuadraticEllipsoidDrivenMultiCompDarcyExample.f90 similarity index 100% rename from MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenMultiCompDarcy/src/QuadraticEllipsoidDrivenMultiCompDarcyExample.f90 rename to MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenMultiCompDarcy/Fortran/src/QuadraticEllipsoidDrivenMultiCompDarcyExample.f90 diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenMultiCompDarcy/OpenCMISS.cmake b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenMultiCompDarcy/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenMultiCompDarcy/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenMultiCompDarcy/build_debug/build.sh b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenMultiCompDarcy/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/QuadraticEllipsoidDrivenMultiCompDarcy/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/SameRegionSameMesh/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/SameRegionSameMesh/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/SameRegionSameMesh/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/SameRegionSameMesh/Fortran/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/SameRegionSameMesh/Fortran/CMakeLists.txt new file mode 100644 index 00000000..3e94c509 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/SameRegionSameMesh/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(SameRegionSameMesh src/SameRegionSameMeshExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(SameRegionSameMesh PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(SameRegionSameMesh PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_SameRegionSameMesh COMMAND SameRegionSameMesh) +add_opencmiss_environment(test_SameRegionSameMesh) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/SameRegionSameMesh/src/SameRegionSameMeshExample.f90 b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/SameRegionSameMesh/Fortran/src/SameRegionSameMeshExample.f90 similarity index 100% rename from MultiPhysics/Poroelasticity/FiniteElasticityDarcy/SameRegionSameMesh/src/SameRegionSameMeshExample.f90 rename to MultiPhysics/Poroelasticity/FiniteElasticityDarcy/SameRegionSameMesh/Fortran/src/SameRegionSameMeshExample.f90 diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/SameRegionSameMesh/OpenCMISS.cmake b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/SameRegionSameMesh/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/SameRegionSameMesh/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/SameRegionSameMesh/build_debug/build.sh b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/SameRegionSameMesh/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityDarcy/SameRegionSameMesh/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/Cantilever/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/Cantilever/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/Cantilever/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/Cantilever/Fortran/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/Cantilever/Fortran/CMakeLists.txt new file mode 100644 index 00000000..903c30d8 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/Cantilever/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(Cantilever src/CantileverExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(Cantilever PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(Cantilever PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_Cantilever COMMAND Cantilever) +add_opencmiss_environment(test_Cantilever) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/Cantilever/src/CantileverExample.f90 b/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/Cantilever/Fortran/src/CantileverExample.f90 similarity index 100% rename from MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/Cantilever/src/CantileverExample.f90 rename to MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/Cantilever/Fortran/src/CantileverExample.f90 diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/Cantilever/OpenCMISS.cmake b/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/Cantilever/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/Cantilever/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/Cantilever/build_debug/build.sh b/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/Cantilever/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/Cantilever/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/StaticExtension/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/StaticExtension/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/StaticExtension/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/StaticExtension/Fortran/CMakeLists.txt b/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/StaticExtension/Fortran/CMakeLists.txt new file mode 100644 index 00000000..7f48f045 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/StaticExtension/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(StaticExtension src/StaticExtensionExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(StaticExtension PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(StaticExtension PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_StaticExtension COMMAND StaticExtension) +add_opencmiss_environment(test_StaticExtension) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/StaticExtension/src/StaticExtensionExample.f90 b/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/StaticExtension/Fortran/src/StaticExtensionExample.f90 similarity index 100% rename from MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/StaticExtension/src/StaticExtensionExample.f90 rename to MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/StaticExtension/Fortran/src/StaticExtensionExample.f90 diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/StaticExtension/OpenCMISS.cmake b/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/StaticExtension/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/StaticExtension/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/StaticExtension/build_debug/build.sh b/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/StaticExtension/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/MultiPhysics/Poroelasticity/FiniteElasticityFluidPressure/StaticExtension/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/TwoRegions/CMakeLists.txt b/TwoRegions/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/TwoRegions/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/TwoRegions/Fortran/CMakeLists.txt b/TwoRegions/Fortran/CMakeLists.txt new file mode 100644 index 00000000..6cf55aca --- /dev/null +++ b/TwoRegions/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(TwoRegions src/TwoRegionsExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(TwoRegions PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(TwoRegions PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_TwoRegions COMMAND TwoRegions) +add_opencmiss_environment(test_TwoRegions) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/TwoRegions/src/TwoRegionsExample.f90 b/TwoRegions/Fortran/src/TwoRegionsExample.f90 similarity index 100% rename from TwoRegions/src/TwoRegionsExample.f90 rename to TwoRegions/Fortran/src/TwoRegionsExample.f90 diff --git a/TwoRegions/OpenCMISS.cmake b/TwoRegions/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/TwoRegions/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/TwoRegions/build_debug/build.sh b/TwoRegions/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/TwoRegions/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/cellml/CMakeLists.txt b/cellml/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/cellml/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/cellml/Fortran/CMakeLists.txt b/cellml/Fortran/CMakeLists.txt new file mode 100644 index 00000000..e06c6dff --- /dev/null +++ b/cellml/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(cellml src/FortranExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(cellml PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(cellml PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_cellml COMMAND cellml) +add_opencmiss_environment(test_cellml) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/cellml/OpenCMISS.cmake b/cellml/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/cellml/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/cellml/build_debug/build.sh b/cellml/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/cellml/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/cellml/model-integration/CMakeLists.txt b/cellml/model-integration/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/cellml/model-integration/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/cellml/model-integration/Fortran/CMakeLists.txt b/cellml/model-integration/Fortran/CMakeLists.txt new file mode 100644 index 00000000..9ff021fe --- /dev/null +++ b/cellml/model-integration/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(model-integration src/FortranExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(model-integration PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(model-integration PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_model-integration COMMAND model-integration) +add_opencmiss_environment(test_model-integration) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/cellml/model-integration/OpenCMISS.cmake b/cellml/model-integration/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/cellml/model-integration/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/cellml/model-integration/build_debug/build.sh b/cellml/model-integration/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/cellml/model-integration/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/define-geometry-and-export/CMakeLists.txt b/define-geometry-and-export/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/define-geometry-and-export/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/define-geometry-and-export/Fortran/CMakeLists.txt b/define-geometry-and-export/Fortran/CMakeLists.txt new file mode 100644 index 00000000..ebe0ede0 --- /dev/null +++ b/define-geometry-and-export/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(define-geometry-and-export src/define-geometry-and-exportExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(define-geometry-and-export PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(define-geometry-and-export PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_define-geometry-and-export COMMAND define-geometry-and-export) +add_opencmiss_environment(test_define-geometry-and-export) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/define-geometry-and-export/src/define-geometry-and-exportExample.f90 b/define-geometry-and-export/Fortran/src/define-geometry-and-exportExample.f90 similarity index 100% rename from define-geometry-and-export/src/define-geometry-and-exportExample.f90 rename to define-geometry-and-export/Fortran/src/define-geometry-and-exportExample.f90 diff --git a/define-geometry-and-export/OpenCMISS.cmake b/define-geometry-and-export/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/define-geometry-and-export/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/define-geometry-and-export/build_debug/build.sh b/define-geometry-and-export/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/define-geometry-and-export/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/scripts/create_cmakefiles.py b/scripts/create_cmakefiles.py new file mode 100755 index 00000000..522ef4a1 --- /dev/null +++ b/scripts/create_cmakefiles.py @@ -0,0 +1,114 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +import sys +import numpy as np +import matplotlib.pyplot as plt +import csv +import collections +import copy +from sets import Set +import os +from shutil import copyfile + +cmake_content = """ +# Add example executable +add_executable({executable_name} {src}) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options({executable_name} PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries({executable_name} PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_{executable_name} COMMAND {executable_name}) +add_opencmiss_environment(test_{executable_name}) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# +""" + + +for (dirpath, subdirectories, filenames) in os.walk(".."): + print "directory {}".format(dirpath) + src_found = False + if "src" in subdirectories: + directory_content = os.listdir(os.path.join(dirpath, "src")) + if os.path.basename(dirpath) != "Fortran": + #os.mkdir("Fortran") + print 'rename "{}" to "{}"'.format(os.path.join(dirpath,"src"), os.path.join(dirpath,"Fortran","src")) + try: + os.mkdir(os.path.join(dirpath,"Fortran")) + except: + pass + os.rename(os.path.join(dirpath,"src"), os.path.join(dirpath,"Fortran","src")) + src_found = True + + if "Fortran" in subdirectories: + src_found = True + + if src_found: + print "process directory {}".format(dirpath) + + + copyfile("resources/CMakeLists-1.txt", os.path.join(dirpath,"CMakeLists.txt")) + copyfile("resources/OpenCMISS.cmake", os.path.join(dirpath,"OpenCMISS.cmake")) + + src_files = os.listdir(os.path.join(dirpath, "Fortran","src")) + src_string = "" + for filename in src_files: + src_string += " src/"+filename + executable_name = os.path.basename(dirpath) + + with open(os.path.join(dirpath,"Fortran","CMakeLists.txt"),'w') as file: + file.write(cmake_content.format(src=src_string, executable_name=executable_name, PROC_OPT="{PROC_OPT}", OPT="{OPT}", EXAMPLE_BINARY="{EXAMPLE_BINARY}")) + + try: + os.mkdir(os.path.join(dirpath,"build_debug")) + except: + pass + copyfile("resources/build.sh", os.path.join(dirpath,"build_debug","build.sh")) diff --git a/scripts/resources/CMakeLists-1.txt b/scripts/resources/CMakeLists-1.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/scripts/resources/CMakeLists-1.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/scripts/resources/OpenCMISS.cmake b/scripts/resources/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/scripts/resources/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/scripts/resources/build.sh b/scripts/resources/build.sh new file mode 100755 index 00000000..e6624bac --- /dev/null +++ b/scripts/resources/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all diff --git a/simple-field-manipulation-direct-access/CMakeLists.txt b/simple-field-manipulation-direct-access/CMakeLists.txt new file mode 100644 index 00000000..a22b61ee --- /dev/null +++ b/simple-field-manipulation-direct-access/CMakeLists.txt @@ -0,0 +1,35 @@ +# OpenCMISS (Open Continuum Mechanics, Imaging, Signal processing and System identification) +# is a mathematical modelling environment that enables the application of finite element +# analysis techniques to a variety of complex bioengineering problems. +# +# The OpenCMISS project website can be found at http://www.opencmiss.org +# For more information see http://www.opencmiss.org/documentation + +# Include the OpenCMISS initalisation & macro definition file. +include(./OpenCMISS.cmake) + +# Project setup +# ------------- +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(OpenCMISS-Example VERSION 1.0 LANGUAGES C) +enable_language(Fortran OPTIONAL) +enable_testing() + +# Find OpenCMISS +# -------------- +# +# This call tries to find a matching OpenCMISS (SDK) installation for your (default) Toolchain and MPI choice. +# Currently available OpenCMISS package components: Iron Zinc +# Requiring Iron will also include the iron_c bindings target if available. +# +# This function creates a link target 'opencmiss' that contains references to the requested OpenCMISS components. +# For Iron, it also adds the necessary MPI information - no further find_package(MPI ..) and setting of extra include +# paths needed! +find_package(OpenCMISS 1.1 REQUIRED COMPONENTS Iron CONFIG) + +# CMake application code +# ---------------------- +#add_subdirectory(C) +if (CMAKE_Fortran_COMPILER) + add_subdirectory(Fortran) +endif() diff --git a/simple-field-manipulation-direct-access/Fortran/CMakeLists.txt b/simple-field-manipulation-direct-access/Fortran/CMakeLists.txt new file mode 100644 index 00000000..559a1911 --- /dev/null +++ b/simple-field-manipulation-direct-access/Fortran/CMakeLists.txt @@ -0,0 +1,60 @@ + +# Add example executable +add_executable(simple-field-manipulation-direct-access src/simple-field-manipulation-direct-accessExample.f90) + +# Turn on Fortran preprocessing (#include directives) +if (MSVC) + set(PROC_OPT "/fpp") +else() + set(PROC_OPT "-cpp") +endif() + +# in debug mode, add flag that make Floating point exceptions fatal +set(OPT "") +if (FALSE) + if(CMAKE_BUILD_TYPE MATCHES DEBUG) + set(OPT "-ffpe-trap=invalid,zero,underflow,overflow,denormal") # GCC: make floating point exceptions fatal + endif() +endif() + +target_compile_options(simple-field-manipulation-direct-access PRIVATE ${PROC_OPT} ${OPT} "-fbacktrace") + +# Link to opencmiss +# ----------------- +# +# This simply uses the opencmiss target created by OC_INIT() above. +# +# Alternatively, you can also directly invoke 'find_package(Iron )' to explicitly +# require that version. But then you have to deal with setting up the correct MPI include directives and library paths. +# +# If required, add any other required link libraries (cellml, petsc ..) here, too. +# For example, if you needed PetSC functionality, issue +# +# find_package(PETSC REQUIRED) +# target_link_libraries(${EXAMPLE_BINARY} PRIVATE petsc) +# +# All the OpenCMISS dependencies provide a target you can link against corresponding to the (lowercase) component name. +target_link_libraries(simple-field-manipulation-direct-access PRIVATE opencmiss) + +# Add a simple test that runs the executable +add_test(NAME test_simple-field-manipulation-direct-access COMMAND simple-field-manipulation-direct-access) +add_opencmiss_environment(test_simple-field-manipulation-direct-access) + +################### +# Developer notice! +# +# If you write Fortran code and use MPI, you need to use the following MPI directives: +# +# #ifndef NOMPIMOD +# USE MPI +# #endif +# [...] +# IMPLICIT NONE +# [...] +# #ifdef NOMPIMOD +# #include "mpif.h" +# #endif +# +# Reasoning: In some cases like Windows/MPICH2 there sometimes is no mpi.mod file. In order to yet make +# the example work the build system adds the definition 'NOMPIMOD', which can be checked and acted to accordingly. +# diff --git a/simple-field-manipulation-direct-access/src/simple-field-manipulation-direct-accessExample.f90 b/simple-field-manipulation-direct-access/Fortran/src/simple-field-manipulation-direct-accessExample.f90 similarity index 100% rename from simple-field-manipulation-direct-access/src/simple-field-manipulation-direct-accessExample.f90 rename to simple-field-manipulation-direct-access/Fortran/src/simple-field-manipulation-direct-accessExample.f90 diff --git a/simple-field-manipulation-direct-access/OpenCMISS.cmake b/simple-field-manipulation-direct-access/OpenCMISS.cmake new file mode 100644 index 00000000..3d6cf515 --- /dev/null +++ b/simple-field-manipulation-direct-access/OpenCMISS.cmake @@ -0,0 +1,95 @@ +########################### +# *DO NOT CHANGE THIS FILE* +########################### +# +# Prepares the use of OpenCMISS by scanning at various path locations for OpenCMISS (SDK) installations. +# +# Search order: +# - OPENCMISS_INSTALL_DIR variable +# - OPENCMISS_INSTALL_DIR environment variable +# - OPENCMISS_SDK_DIR variable +# - OPENCMISS_SDK_DIR environment variable +# - [Windows only] The Registry is searched additionally for installed SDKs. +# +# If found +# - Includes the toolchain config script of the found opencmiss installation to enable toolchain selection logic (non-windows) + +# Convenience: The OPENCMISS_INSTALL_DIR may also be defined in the environment and various other places +if (DEFINED OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using specified installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The specified OPENCMISS_INSTALL_DIR '${OPENCMISS_INSTALL_DIR}' does not exist. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_INSTALL_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_INSTALL_DIR}" OPENCMISS_INSTALL_DIR) + get_filename_component(OPENCMISS_INSTALL_DIR "${OPENCMISS_INSTALL_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Using environment installation directory '${OPENCMISS_INSTALL_DIR}'") + else() + message(WARNING "The environment variable OPENCMISS_INSTALL_DIR='${OPENCMISS_INSTALL_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_INSTALL_DIR) + endif() +endif() +if (NOT OPENCMISS_INSTALL_DIR AND DEFINED OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The specified OPENCMISS_SDK_DIR '${OPENCMISS_SDK_DIR}' does not exist. Skipping.") + endif() +endif() +if(NOT OPENCMISS_INSTALL_DIR AND NOT "$ENV{OPENCMISS_SDK_DIR}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{OPENCMISS_SDK_DIR}" OPENCMISS_SDK_DIR) + get_filename_component(OPENCMISS_SDK_DIR "${OPENCMISS_SDK_DIR}" ABSOLUTE) + if (EXISTS "${OPENCMISS_SDK_DIR}") + message(STATUS "Using environment SDK installation directory: ${OPENCMISS_SDK_DIR}") + set(OPENCMISS_INSTALL_DIR "${OPENCMISS_SDK_DIR}") + else() + message(WARNING "The environment variable OPENCMISS_SDK_DIR='${OPENCMISS_SDK_DIR}' contains an invalid path. Skipping.") + unset(OPENCMISS_SDK_DIR) + endif() +endif() +# On windows: check the registry for installed OpenCMISS SDKs +if(NOT OPENCMISS_INSTALL_DIR AND WIN32) + foreach(ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + foreach(PACKAGE OpenCMISSUserSDK OpenCMISSDeveloperSDK) + set(_REG_KEY "[${ROOT}\\Software\\Auckland Bioengineering Institute\\${PACKAGE}]") + get_filename_component(OPENCMISS_INSTALL_DIR "${_REG_KEY}" ABSOLUTE) + #message(STATUS "Trying registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + message(STATUS "Found ${PACKAGE} in Windows registry key ${_REG_KEY}: ${OPENCMISS_INSTALL_DIR}") + break() + else() + unset(OPENCMISS_INSTALL_DIR) + endif() + endforeach() + if (EXISTS "${OPENCMISS_INSTALL_DIR}") + break() + endif() + endforeach() +endif() + +if(OPENCMISS_INSTALL_DIR) + message(STATUS "OPENCMISS_INSTALL_DIR=${OPENCMISS_INSTALL_DIR}") + # Use the OpenCMISS scripts to also allow choosing a separate toolchain + # This file is located at the opencmiss installation rather than the local example + # as it avoids file replication and makes maintenance much easier + if (TOOLCHAIN) + set(_OCTC ${OPENCMISS_INSTALL_DIR}/cmake/OCToolchainCompilers.cmake) + if (EXISTS "${_OCTC}") + include(${_OCTC}) + else() + message(WARNING "TOOLCHAIN specified but OpenCMISS config script could not be found at ${_OCTC}. Trying CMake defaults.") + endif() + unset(_OCTC) + endif() + set(OpenCMISS_DIR "${OPENCMISS_INSTALL_DIR}" CACHE PATH "Path to the found OpenCMISS (SDK) installation") +else() + message(WARNING "No OpenCMISS (SDK) installation directory detected. Using default system environment.") +endif() + \ No newline at end of file diff --git a/simple-field-manipulation-direct-access/build_debug/build.sh b/simple-field-manipulation-direct-access/build_debug/build.sh new file mode 100644 index 00000000..e6624bac --- /dev/null +++ b/simple-field-manipulation-direct-access/build_debug/build.sh @@ -0,0 +1,2 @@ +#ccc && cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all +cmake -DOPENCMISS_BUILD_TYPE=DEBUG -DCMAKE_BUILD_TYPE=DEBUG .. && make all