diff --git a/applications/solvers/fsi/fluidFoam/Make/options b/applications/solvers/fsi/fluidFoam/Make/options index 7049438e..af14289b 100644 --- a/applications/solvers/fsi/fluidFoam/Make/options +++ b/applications/solvers/fsi/fluidFoam/Make/options @@ -1,5 +1,9 @@ c++WARN = -Wall -Wextra -Werror +ifndef MKL_LIB + MKL_LIB=-lopenblas +endif + EXE_INC = -std=c++11 \ -I../../../../src/fsi \ -I../../../../src/fsi/lnInclude \ @@ -27,7 +31,7 @@ EXE_INC = -std=c++11 \ ifeq ($(WM_COMPILE_OPTION), Opt) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ -ldynamicMesh \ @@ -52,7 +56,7 @@ endif ifeq ($(WM_COMPILE_OPTION), Debug) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ -ldynamicMesh \ diff --git a/applications/solvers/fsi/fsiFluidFoam/Make/options b/applications/solvers/fsi/fsiFluidFoam/Make/options index 6da4b9b6..b8b4ded6 100644 --- a/applications/solvers/fsi/fsiFluidFoam/Make/options +++ b/applications/solvers/fsi/fsiFluidFoam/Make/options @@ -4,6 +4,10 @@ ifndef PRECICE_ROOT PRECICE_ROOT=../../../../src/thirdParty/precice endif +ifndef MKL_LIB + MKL_LIB=-lopenblas +endif + EXE_INC = -std=c++11 -fext-numeric-literals \ -isystem ../../../../src/thirdParty/elemental/install/include \ -I../../../../src/fsi/lnInclude \ @@ -30,7 +34,7 @@ EXE_INC = -std=c++11 -fext-numeric-literals \ ifeq ($(WM_COMPILE_OPTION), Opt) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ -ldynamicMesh \ @@ -56,7 +60,7 @@ endif ifeq ($(WM_COMPILE_OPTION), Debug) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ -ldynamicMesh \ diff --git a/applications/solvers/fsi/fsiFoam/Make/options b/applications/solvers/fsi/fsiFoam/Make/options index 56817f98..b6953971 100644 --- a/applications/solvers/fsi/fsiFoam/Make/options +++ b/applications/solvers/fsi/fsiFoam/Make/options @@ -1,5 +1,9 @@ c++WARN = -Wall -Wextra -Werror -Wno-literal-suffix +ifndef MKL_LIB + MKL_LIB=-lopenblas +endif + EXE_INC = -std=c++11 -fext-numeric-literals \ -isystem ../../../../src/fsi/lnInclude \ -I ../../../../src/fsi \ @@ -34,7 +38,7 @@ EXE_INC = -std=c++11 -fext-numeric-literals \ ifeq ($(WM_COMPILE_OPTION), Opt) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ -ldynamicMesh \ @@ -59,7 +63,7 @@ endif ifeq ($(WM_COMPILE_OPTION), Debug) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ -ldynamicMesh \ diff --git a/applications/solvers/fsi/fsiSolidFoam/Make/options b/applications/solvers/fsi/fsiSolidFoam/Make/options index fb2cbe97..b5a5eb08 100644 --- a/applications/solvers/fsi/fsiSolidFoam/Make/options +++ b/applications/solvers/fsi/fsiSolidFoam/Make/options @@ -4,6 +4,10 @@ ifndef PRECICE_ROOT PRECICE_ROOT=../../../../src/thirdParty/precice endif +ifndef MKL_LIB + MKL_LIB=-lopenblas +endif + EXE_INC = -std=c++11 \ -I../../../../src/fsi/lnInclude \ -isystem ../../../../src/thirdParty/eigen \ @@ -27,7 +31,7 @@ EXE_INC = -std=c++11 \ ifeq ($(WM_COMPILE_OPTION), Opt) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ -ldynamicMesh \ @@ -53,7 +57,7 @@ endif ifeq ($(WM_COMPILE_OPTION), Debug) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ -ldynamicMesh \ diff --git a/applications/solvers/fsi/solidFoam/Make/options b/applications/solvers/fsi/solidFoam/Make/options index 547a5e41..05027cee 100644 --- a/applications/solvers/fsi/solidFoam/Make/options +++ b/applications/solvers/fsi/solidFoam/Make/options @@ -1,5 +1,9 @@ c++WARN = -Wall -Wextra -Werror +ifndef MKL_LIB + MKL_LIB=-lopenblas +endif + EXE_INC = -std=c++11 \ -I../../../../src/fsi \ -I../../../../src/fsi/lnInclude \ @@ -15,7 +19,7 @@ EXE_INC = -std=c++11 \ ifeq ($(WM_COMPILE_OPTION), Opt) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ -ldynamicMesh \ @@ -40,7 +44,7 @@ endif ifeq ($(WM_COMPILE_OPTION), Debug) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ -ldynamicMesh \ diff --git a/applications/solvers/unsteadyPUCoupledFoam/Make/options b/applications/solvers/unsteadyPUCoupledFoam/Make/options index a7889c9f..e3b95be4 100644 --- a/applications/solvers/unsteadyPUCoupledFoam/Make/options +++ b/applications/solvers/unsteadyPUCoupledFoam/Make/options @@ -1,5 +1,9 @@ c++WARN = -Wall -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -Wunused-local-typedefs +ifndef MKL_LIB + MKL_LIB=-lopenblas +endif + EXE_INC = -std=c++11 \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ @@ -13,7 +17,7 @@ EXE_INC = -std=c++11 \ ifeq ($(WM_COMPILE_OPTION), Opt) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ -ldynamicMesh \ @@ -42,7 +46,7 @@ endif ifeq ($(WM_COMPILE_OPTION), Debug) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ -ldynamicMesh \ diff --git a/src/RBFMeshMotionSolver/RBFMeshMotionSolver.C b/src/RBFMeshMotionSolver/RBFMeshMotionSolver.C index adc46b59..fa7d67a2 100644 --- a/src/RBFMeshMotionSolver/RBFMeshMotionSolver.C +++ b/src/RBFMeshMotionSolver/RBFMeshMotionSolver.C @@ -4,6 +4,8 @@ * David Blom, TU Delft. All rights reserved. */ +#include "dynamicLabelList.H" +#include "PstreamReduceOps.H" #include "RBFMeshMotionSolver.H" #include #include diff --git a/src/RBFMeshMotionSolver/UnitCoarsening.C b/src/RBFMeshMotionSolver/UnitCoarsening.C index b0325585..3aa4cfda 100644 --- a/src/RBFMeshMotionSolver/UnitCoarsening.C +++ b/src/RBFMeshMotionSolver/UnitCoarsening.C @@ -105,6 +105,7 @@ namespace rbf // Get location of max error El::Entry locMax = El::MaxAbsLoc( errors ); + largestError = locMax.value; // Break if maximum points are reached if ( int( selectedPositions.size() ) >= maxPoints ) diff --git a/src/RBFMeshMotionSolver/twoDPointCorrectorRBF.C b/src/RBFMeshMotionSolver/twoDPointCorrectorRBF.C index 209583b5..faa3e447 100644 --- a/src/RBFMeshMotionSolver/twoDPointCorrectorRBF.C +++ b/src/RBFMeshMotionSolver/twoDPointCorrectorRBF.C @@ -1,4 +1,10 @@ +/* + * Author + * David Blom, TU Delft. All rights reserved. + */ + +#include "dynamicLabelList.H" #include "twoDPointCorrectorRBF.H" #include "polyMesh.H" diff --git a/src/tests/testsuite-dealii/Make/options b/src/tests/testsuite-dealii/Make/options index 84896b9a..c81c3abc 100644 --- a/src/tests/testsuite-dealii/Make/options +++ b/src/tests/testsuite-dealii/Make/options @@ -1,5 +1,9 @@ c++WARN = -Wall -Wextra -Werror -Wno-literal-suffix +ifndef MKL_LIB + MKL_LIB=-lopenblas +endif + EXE_INC = -std=c++11 \ -I ../../fsi \ -I ../../fsi/lnInclude \ @@ -32,7 +36,7 @@ EXE_INC = -std=c++11 \ ifeq ($(WM_COMPILE_OPTION), Opt) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -lgtest \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ @@ -58,7 +62,7 @@ endif ifeq ($(WM_COMPILE_OPTION), Debug) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -lgtest \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ diff --git a/src/tests/testsuite-fsi/Make/options b/src/tests/testsuite-fsi/Make/options index 84896b9a..c81c3abc 100644 --- a/src/tests/testsuite-fsi/Make/options +++ b/src/tests/testsuite-fsi/Make/options @@ -1,5 +1,9 @@ c++WARN = -Wall -Wextra -Werror -Wno-literal-suffix +ifndef MKL_LIB + MKL_LIB=-lopenblas +endif + EXE_INC = -std=c++11 \ -I ../../fsi \ -I ../../fsi/lnInclude \ @@ -32,7 +36,7 @@ EXE_INC = -std=c++11 \ ifeq ($(WM_COMPILE_OPTION), Opt) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -lgtest \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ @@ -58,7 +62,7 @@ endif ifeq ($(WM_COMPILE_OPTION), Debug) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -lgtest \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ diff --git a/src/tests/testsuite-rbf/Make/options b/src/tests/testsuite-rbf/Make/options index cf8064f0..95967e3c 100644 --- a/src/tests/testsuite-rbf/Make/options +++ b/src/tests/testsuite-rbf/Make/options @@ -1,5 +1,9 @@ c++WARN = -Wall -Wextra -Werror -Wno-literal-suffix +ifndef MKL_LIB + MKL_LIB=-lopenblas +endif + EXE_INC = -std=c++11 -fext-numeric-literals\ -isystem ../../thirdParty/elemental/install/include \ -I ../../fsi \ @@ -33,7 +37,7 @@ EXE_INC = -std=c++11 -fext-numeric-literals\ ifeq ($(WM_COMPILE_OPTION), Opt) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -lgtest \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ @@ -59,7 +63,7 @@ endif ifeq ($(WM_COMPILE_OPTION), Debug) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -lgtest \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ diff --git a/src/tests/testsuite-sdc-fsi/Make/options b/src/tests/testsuite-sdc-fsi/Make/options index 8b7894a9..13f46a89 100644 --- a/src/tests/testsuite-sdc-fsi/Make/options +++ b/src/tests/testsuite-sdc-fsi/Make/options @@ -1,5 +1,9 @@ c++WARN = -Wall -Wextra -Werror +ifndef MKL_LIB + MKL_LIB=-lopenblas +endif + EXE_INC = -std=c++11 \ -I ../../fsi \ -I ../../fsi/lnInclude \ @@ -12,7 +16,7 @@ EXE_INC = -std=c++11 \ ifeq ($(WM_COMPILE_OPTION), Opt) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -lgtest \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ @@ -38,7 +42,7 @@ endif ifeq ($(WM_COMPILE_OPTION), Debug) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -lgtest \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ diff --git a/src/tests/testsuite-sdc/Make/options b/src/tests/testsuite-sdc/Make/options index 84896b9a..c81c3abc 100644 --- a/src/tests/testsuite-sdc/Make/options +++ b/src/tests/testsuite-sdc/Make/options @@ -1,5 +1,9 @@ c++WARN = -Wall -Wextra -Werror -Wno-literal-suffix +ifndef MKL_LIB + MKL_LIB=-lopenblas +endif + EXE_INC = -std=c++11 \ -I ../../fsi \ -I ../../fsi/lnInclude \ @@ -32,7 +36,7 @@ EXE_INC = -std=c++11 \ ifeq ($(WM_COMPILE_OPTION), Opt) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -lgtest \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ @@ -58,7 +62,7 @@ endif ifeq ($(WM_COMPILE_OPTION), Debug) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -lgtest \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ diff --git a/src/tests/testsuite-spacemapping/Make/options b/src/tests/testsuite-spacemapping/Make/options index 84896b9a..c81c3abc 100644 --- a/src/tests/testsuite-spacemapping/Make/options +++ b/src/tests/testsuite-spacemapping/Make/options @@ -1,5 +1,9 @@ c++WARN = -Wall -Wextra -Werror -Wno-literal-suffix +ifndef MKL_LIB + MKL_LIB=-lopenblas +endif + EXE_INC = -std=c++11 \ -I ../../fsi \ -I ../../fsi/lnInclude \ @@ -32,7 +36,7 @@ EXE_INC = -std=c++11 \ ifeq ($(WM_COMPILE_OPTION), Opt) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -lgtest \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ @@ -58,7 +62,7 @@ endif ifeq ($(WM_COMPILE_OPTION), Debug) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -lgtest \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ diff --git a/src/tests/tubeflow-sdc-bdf-solid/Make/options b/src/tests/tubeflow-sdc-bdf-solid/Make/options index 5b4a11bf..77659025 100644 --- a/src/tests/tubeflow-sdc-bdf-solid/Make/options +++ b/src/tests/tubeflow-sdc-bdf-solid/Make/options @@ -1,5 +1,9 @@ c++WARN = -Wall -Wextra -Werror +ifndef MKL_LIB + MKL_LIB=-lopenblas +endif + EXE_INC = -std=c++11 -fopenmp \ -I ../../fsi \ -I ../../fsi/lnInclude \ @@ -11,7 +15,7 @@ EXE_INC = -std=c++11 -fopenmp \ ifeq ($(WM_COMPILE_OPTION), Opt) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -L../../thirdParty/gtest \ -lgtest \ -ldynamicFvMesh \ @@ -38,7 +42,7 @@ endif ifeq ($(WM_COMPILE_OPTION), Debug) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -L../../thirdParty/gtest \ -lgtest \ -ldynamicFvMesh \ diff --git a/src/tests/tubeflow-sdc-rk4-solid/Make/options b/src/tests/tubeflow-sdc-rk4-solid/Make/options index 43920672..ac434b2e 100644 --- a/src/tests/tubeflow-sdc-rk4-solid/Make/options +++ b/src/tests/tubeflow-sdc-rk4-solid/Make/options @@ -1,5 +1,9 @@ c++WARN = -Wall -Wextra -Werror +ifndef MKL_LIB + MKL_LIB=-lopenblas +endif + EXE_INC = -std=c++11 -fopenmp \ -I ../../fsi \ -I ../../fsi/lnInclude \ @@ -12,7 +16,7 @@ EXE_INC = -std=c++11 -fopenmp \ ifeq ($(WM_COMPILE_OPTION), Opt) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -L../../thirdParty/gtest \ -lgtest \ -ldynamicFvMesh \ @@ -39,7 +43,7 @@ endif ifeq ($(WM_COMPILE_OPTION), Debug) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -L../../thirdParty/gtest \ -lgtest \ -ldynamicFvMesh \ diff --git a/src/tests/tubeflow-sdc-solid/Make/options b/src/tests/tubeflow-sdc-solid/Make/options index 5b4a11bf..77659025 100644 --- a/src/tests/tubeflow-sdc-solid/Make/options +++ b/src/tests/tubeflow-sdc-solid/Make/options @@ -1,5 +1,9 @@ c++WARN = -Wall -Wextra -Werror +ifndef MKL_LIB + MKL_LIB=-lopenblas +endif + EXE_INC = -std=c++11 -fopenmp \ -I ../../fsi \ -I ../../fsi/lnInclude \ @@ -11,7 +15,7 @@ EXE_INC = -std=c++11 -fopenmp \ ifeq ($(WM_COMPILE_OPTION), Opt) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -L../../thirdParty/gtest \ -lgtest \ -ldynamicFvMesh \ @@ -38,7 +42,7 @@ endif ifeq ($(WM_COMPILE_OPTION), Debug) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -L../../thirdParty/gtest \ -lgtest \ -ldynamicFvMesh \ diff --git a/src/tests/tubeflow-sdc/Make/options b/src/tests/tubeflow-sdc/Make/options index 5b4a11bf..77659025 100644 --- a/src/tests/tubeflow-sdc/Make/options +++ b/src/tests/tubeflow-sdc/Make/options @@ -1,5 +1,9 @@ c++WARN = -Wall -Wextra -Werror +ifndef MKL_LIB + MKL_LIB=-lopenblas +endif + EXE_INC = -std=c++11 -fopenmp \ -I ../../fsi \ -I ../../fsi/lnInclude \ @@ -11,7 +15,7 @@ EXE_INC = -std=c++11 -fopenmp \ ifeq ($(WM_COMPILE_OPTION), Opt) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -L../../thirdParty/gtest \ -lgtest \ -ldynamicFvMesh \ @@ -38,7 +42,7 @@ endif ifeq ($(WM_COMPILE_OPTION), Debug) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -L../../thirdParty/gtest \ -lgtest \ -ldynamicFvMesh \ diff --git a/src/tests/tubeflow/Make/options b/src/tests/tubeflow/Make/options index d08bf842..59e3fab0 100644 --- a/src/tests/tubeflow/Make/options +++ b/src/tests/tubeflow/Make/options @@ -1,5 +1,9 @@ c++WARN = -Wall -Wextra -Werror +ifndef MKL_LIB + MKL_LIB=-lopenblas +endif + EXE_INC = -std=c++11 \ -isystem ../../thirdParty/eigen \ -I../../fsi/lnInclude \ @@ -21,7 +25,7 @@ EXE_INC = -std=c++11 \ ifeq ($(WM_COMPILE_OPTION), Opt) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -L../../thirdParty/gtest \ -lgtest \ -ldynamicFvMesh \ @@ -48,7 +52,7 @@ endif ifeq ($(WM_COMPILE_OPTION), Debug) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -L../../thirdParty/gtest \ -lgtest \ -ldynamicFvMesh \ diff --git a/src/tests/tubeflow3/Make/options b/src/tests/tubeflow3/Make/options index 963cbb3b..4fea315a 100644 --- a/src/tests/tubeflow3/Make/options +++ b/src/tests/tubeflow3/Make/options @@ -1,5 +1,9 @@ c++WARN = -Wall -Wextra -Werror +ifndef MKL_LIB + MKL_LIB=-lopenblas +endif + EXE_INC = -std=c++11 -fopenmp \ -isystem ../../thirdParty/eigen \ -I../../fsi/lnInclude \ @@ -21,7 +25,7 @@ EXE_INC = -std=c++11 -fopenmp \ ifeq ($(WM_COMPILE_OPTION), Opt) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -L../../thirdParty/gtest \ -lgtest \ -ldynamicFvMesh \ @@ -48,7 +52,7 @@ endif ifeq ($(WM_COMPILE_OPTION), Debug) EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ - -lopenblas -llapack -lscalapack -lpmrrr -lmetis -lparmetis -lEl -lElSuiteSparse \ + $(MKL_LIB) -lpmrrr -lEl -lElSuiteSparse \ -L../../thirdParty/gtest \ -lgtest \ -ldynamicFvMesh \ diff --git a/src/thirdParty/compile_elemental b/src/thirdParty/compile_elemental index a997030c..53c265c1 100755 --- a/src/thirdParty/compile_elemental +++ b/src/thirdParty/compile_elemental @@ -12,6 +12,12 @@ cmake \ -D CMAKE_INSTALL_PREFIX=`pwd`/../install \ -D INSTALL_PYTHON_PACKAGE=OFF \ -D CMAKE_BUILD_TYPE=Release \ + -D EL_DISABLE_PARMETIS=TRUE \ + -D CMAKE_CXX_COMPILER=g++ \ + -D CMAKE_C_COMPILER=gcc \ + -D CMAKE_Fortran_COMPILER=gfortran \ + -D EL_DISABLE_SCALAPACK=TRUE \ + -D MATH_LIBS="-L/usr/lib -lopenblas" \ .. elif [ "$WM_COMPILE_OPTION" = "Debug" ] then @@ -19,6 +25,12 @@ cmake \ -D CMAKE_INSTALL_PREFIX=`pwd`/../install \ -D INSTALL_PYTHON_PACKAGE=OFF \ -D CMAKE_BUILD_TYPE=Debug \ + -D EL_DISABLE_PARMETIS=TRUE \ + -D CMAKE_CXX_COMPILER=g++ \ + -D CMAKE_C_COMPILER=gcc \ + -D CMAKE_Fortran_COMPILER=gfortran \ + -D EL_DISABLE_SCALAPACK=TRUE \ + -D MATH_LIBS="-L/usr/lib -lopenblas" \ .. fi diff --git a/src/thirdParty/compile_supermuc b/src/thirdParty/compile_supermuc index 90758dd3..5afb8a95 100755 --- a/src/thirdParty/compile_supermuc +++ b/src/thirdParty/compile_supermuc @@ -13,7 +13,10 @@ export PETSC_ARCH=x86_64 rm -rf boost boost_${BOOST_VERSION} tar jxf boost_${BOOST_VERSION}.tar.bz2 -ln -s boost_${BOOST_VERSION} boost +ln -s boost_1_61_0 boost +sed -i "s/string const/std::string const/" ./boost/boost/rational.hpp +cd boost && ./bootstrap.sh --with-libraries=log,program_options && ./b2 -j $WM_NCOMPPROCS +cp stage/lib/* $FOAM_LIBBIN/ && cd .. rm -rf metis metis-${METIS_VERSION} @@ -58,7 +61,7 @@ cd petsc-${PETSC_VERSION} export PETSC_DIR=`pwd` -./config/configure.py --with-shared=1 --with-x=0 --with-mpi=1 --with-debugging=0 --with-blas-lapack-dir=$MKL_LIBDIR +./config/configure.py --with-shared=1 --with-x=0 --with-mpi=1 --with-debugging=0 --with-blas-lapack-dir=$MKL_LIBDIR --with-cc=mpicc --with-cxx=mpicxx --with-fc=mpif90 make @@ -100,47 +103,46 @@ cp dealii/bin/lib/libdeal* ${FOAM_LIBBIN}/ # gtest -GTEST_VERSION=1.7.0 +GTEST_VERSION=1.8.0 rm -rf gtest-${GTEST_VERSION} -unzip gtest-${GTEST_VERSION} +tar -zxf gtest-${GTEST_VERSION}.tar.gz -ln -s gtest-${GTEST_VERSION} gtest +ln -s googletest-release-${GTEST_VERSION} gtest -cd gtest-${GTEST_VERSION} +cd gtest -cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CC_COMPILER=gcc +mkdir build install && cd build -make +cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CC_COMPILER=gcc -D CMAKE_INSTALL_PREFIX=`pwd`/../install .. -cd ../ +make +make install -# precice +cd ../.. -BOOST_VERSION=1_55_0 -BOOST_VERSION_DOT=1.55.0 +cp gtest/install/lib/lib* ${FOAM_LIBBIN}/ -if [ ! -d "boost_${BOOST_VERSION}" ]; then - tar jxf boost_${BOOST_VERSION}.tar.bz2 -fi +# precice # Set environment variables necessary for building preCICE -export BOOST_ROOT=`pwd`/boost_${BOOST_VERSION} -export PRECICE_BOOST_ROOT=${BOOST_ROOT} +# Set environment variables necessary for building preCICE export PRECICE_MPI_LIB=mpi export PRECICE_MPI_LIB_PATH=${MPI_BASE}/lib64 export PRECICE_MPI_INC_PATH=${MPI_BASE}/include64 -export CPLUS_INCLUDE_PATH=`pwd`/eigen +export CPLUS_INCLUDE_PATH=`pwd`/eigen:`pwd`/boost +export LIBRARY_PATH=$FOAM_LIBBIN +export LD_LIBRARY_PATH=$FOAM_LIBBIN +export PETSC_DIR=`pwd`/petsc +export PETSC_ARCH=x86_64 cd precice python tools/python_scripts/insert_mpi_header.py -scons -j $WM_NCOMPPROCS build=release python=off petsc=on platform=supermuc compiler=mpicxx -scons -j $WM_NCOMPPROCS build=release python=off petsc=on platform=supermuc compiler=mpicxx solib +scons -j $WM_NCOMPPROCS build=release python=off petsc=on platform=supermuc compiler=mpicxx solib Symlink cp build/last/libprecice.so ${FOAM_LIBBIN}/ -cp build/last/binprecice ${FOAM_APPBIN}/ cd .. @@ -161,12 +163,38 @@ cd $BOOST_ROOT cd ../yaml-cpp rm -rf build -mkdir build +mkdir build install cd build -CC=gcc CXX=g++ cmake -DBUILD_SHARED_LIBS=ON -DBoost_NO_BOOST_CMAKE=TRUE -DBoost_NO_SYSTEM_PATHS=TRUE -DBOOST_ROOT=${BOOST_ROOT} .. +CC=gcc CXX=g++ cmake -DBUILD_SHARED_LIBS=ON -DBoost_NO_BOOST_CMAKE=TRUE -DBoost_NO_SYSTEM_PATHS=TRUE -DBOOST_ROOT=${BOOST_ROOT} -DCMAKE_INSTALL_PREFIX=`pwd`/../install .. make -j $WM_NCOMPPROCS +make install +cd .. && rm -rf build && cd .. + +rm -f yaml-cpp +ln -s yaml-cpp-release-0.5.3 yaml-cpp + +cp yaml-cpp/install/lib/libyaml-cpp* ${FOAM_LIBBIN}/ -cp libyaml-cpp* ${FOAM_LIBBIN}/ +# compile elemental + +cd elemental +mkdir -p build install && cd build + +cmake \ + -D CMAKE_INSTALL_PREFIX=`pwd`/../install \ + -D INSTALL_PYTHON_PACKAGE=OFF \ + -D CMAKE_BUILD_TYPE=Release \ + -D EL_DISABLE_PARMETIS=TRUE \ + -D CMAKE_CXX_COMPILER=g++ \ + -D CMAKE_C_COMPILER=gcc \ + -D CMAKE_Fortran_COMPILER=gfortran \ + -D EL_DISABLE_SCALAPACK=TRUE \ + -D MATH_LIBS="$MKL_LIB" \ + .. + +make -j $WM_NCOMPPROCS +make install +cp ../install/lib64/*.so* $FOAM_LIBBIN/ diff --git a/src/thirdParty/elemental b/src/thirdParty/elemental index 1e12766d..b3992705 160000 --- a/src/thirdParty/elemental +++ b/src/thirdParty/elemental @@ -1 +1 @@ -Subproject commit 1e12766da6564930de24f58d97ae29750af50bb3 +Subproject commit b399270554f3b868d52e9822ecd2ce6ad91738cf diff --git a/src/thirdParty/precice b/src/thirdParty/precice index 769983b5..f17d5b1a 160000 --- a/src/thirdParty/precice +++ b/src/thirdParty/precice @@ -1 +1 @@ -Subproject commit 769983b54ac2218d91d122ce0b82e32cf5d57b52 +Subproject commit f17d5b1ae92da8a1bdfb00b231df240556b66e78 diff --git a/tutorials/fsi/3dTube/Allclean b/tutorials/fsi/3dTube/Allclean index 6bd9e149..7c087736 100755 --- a/tutorials/fsi/3dTube/Allclean +++ b/tutorials/fsi/3dTube/Allclean @@ -12,6 +12,7 @@ cd solid cleanCase cd - +rm -f PlyParser_FoamFileParser_parsetab.py rm -rf fluid/*.foam solid/*.foam fluid/*.txt fluid/*.csv solid/*.txt fluid/*.log rm -rf fluid/gmon.out solid/*.log rm -rf fluid/0/solid diff --git a/tutorials/fsi/3dTube/fluid/constant/polyMesh/blockMeshDict.template b/tutorials/fsi/3dTube/fluid/constant/polyMesh/blockMeshDict.template new file mode 100644 index 00000000..dade26fd --- /dev/null +++ b/tutorials/fsi/3dTube/fluid/constant/polyMesh/blockMeshDict.template @@ -0,0 +1,98 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.0 | +| \\ / A nd | Web: http://www.extend-project.de | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +<% + import math + a = int( math.floor( 5 * 2**level ) ) + b = int( math.floor( 4 * 2**level ) ) + c = int( math.floor( 40 * 2**level ) ) +%> + +convertToMeters 1; + +vertices +( + (0 0 0) // 0 + (0.003414 0 0) // 1 + (0.002828 0.002828 0) // 2 + (0 0.003414 0) // 3 + + (0.005 0 0) // 4 + (0.003536 0.003536 0) // 5 + (0 0.005 0) // 6 + + (0 0 0.05) // 7 + (0.003414 0 0.05) // 8 + (0.002828 0.002828 0.05) // 9 + (0 0.003414 0.05) // 10 + + (0.005 0 0.05) // 11 + (0.003536 0.003536 0.05) // 12 + (0 0.005 0.05) // 13 +); + +blocks +( + hex (0 1 2 3 7 8 9 10) (${a} ${a} ${c}) simpleGrading (1 1 1) + hex (1 4 5 2 8 11 12 9) (${b} ${a} ${c}) simpleGrading (1 1 1) + hex (3 2 5 6 10 9 12 13) (${a} ${b} ${c}) simpleGrading (1 1 1) +); + +edges +( + arc 4 5 (0.004619 0.001913 0) + arc 5 6 (0.001913 0.004619 0) + + arc 11 12 (0.004619 0.001913 0.05) + arc 12 13 (0.001913 0.004619 0.05) +); + +patches +( + patch outlet + ( + (10 9 8 7) + (13 12 9 10) + (12 11 8 9) + ) + patch inlet + ( + (0 1 2 3) + (1 4 5 2) + (3 2 5 6) + ) + wall wall + ( + (13 12 5 6) + (12 11 4 5) + ) + symmetryPlane symmetry-x + ( + (7 10 3 0) + (10 13 6 3) + ) + symmetryPlane symmetry-y + ( + (0 1 8 7) + (1 4 11 8) + ) +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/fsi/3dTube/mesh.py b/tutorials/fsi/3dTube/mesh.py new file mode 100755 index 00000000..d0ceee4f --- /dev/null +++ b/tutorials/fsi/3dTube/mesh.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python + +import argparse, mako.template + +parser = argparse.ArgumentParser( description='Generate blockMesh configuration file for fluid and solid domains' ) +parser.add_argument('level', type=int, help='Mesh refinement level (0,1,2,...,N)' ) + +args = parser.parse_args() + +template = mako.template.Template( filename = 'fluid/constant/polyMesh/blockMeshDict.template' ) + +f = open( 'fluid/constant/polyMesh/blockMeshDict', 'w' ) +output = template.render( level = args.level ) +f.write( output ) +f.close() + +template = mako.template.Template( filename = 'solid/constant/polyMesh/blockMeshDict.template' ) + +f = open( 'solid/constant/polyMesh/blockMeshDict', 'w' ) +output = template.render( level = args.level ) +f.write( output ) +f.close() diff --git a/tutorials/fsi/3dTube/solid/constant/polyMesh/blockMeshDict.template b/tutorials/fsi/3dTube/solid/constant/polyMesh/blockMeshDict.template new file mode 100644 index 00000000..4ba06dca --- /dev/null +++ b/tutorials/fsi/3dTube/solid/constant/polyMesh/blockMeshDict.template @@ -0,0 +1,85 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.0 | +| \\ / A nd | Web: http://www.extend-project.de | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +<% + import math + a = int( math.floor( 2 * 2**level ) ) + b = 2 * int( math.floor( 5 * 2**level ) ) + c = int( math.floor( 40 * 2**level ) ) + a = max( a, 2 ) +%> +convertToMeters 1; + +vertices +( + (0.005 0 0) // 0 + (0.006 0 0) // 1 + (0 0.006 0) // 2 + (0 0.005 0) // 3 + + (0.005 0 0.05) // 4 + (0.006 0 0.05) // 5 + (0 0.006 0.05) // 6 + (0 0.005 0.05) // 7 +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (${a} ${b} ${c}) simpleGrading (1 1 1) +); + +edges +( + arc 1 2 (0.004243 0.004243 0) + arc 0 3 (0.003536 0.003536 0) + + arc 5 6 (0.004243 0.004243 0.05) + arc 4 7 (0.003536 0.003536 0.05) +); + +patches +( + patch inlet + ( + (3 2 1 0) + ) + patch outlet + ( + (4 5 6 7) + ) + wall inner-wall + ( + (3 0 4 7) + ) + wall outer-wall + ( + (6 5 1 2) + ) + symmetryPlane symmetry-x + ( + (7 6 2 3) + ) + symmetryPlane symmetry-y + ( + (0 1 5 4) + ) +); + +mergePatchPairs +( +); + +// ************************************************************************* //