Skip to content

Commit

Permalink
Merge branch 'devel' into elmerice
Browse files Browse the repository at this point in the history
  • Loading branch information
tzwinger committed Nov 10, 2020
2 parents 97fca49 + a3be78e commit b7e4b5a
Show file tree
Hide file tree
Showing 92 changed files with 13,083 additions and 19,033 deletions.
55 changes: 45 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@

if(APPLE)
# message("you need to have gcc-gfrotran installed using HomeBrew")
set(CMAKE_C_COMPILER "/usr/local/bin/gcc-9")
set(CMAKE_CXX_COMPILER "/usr/local/bin/g++-9")
# set(CMAKE_C_COMPILER "/usr/bin/gcc")
# set(CMAKE_CXX_COMPILER "/usr/bin/g++")
set(CMAKE_C_COMPILER "/usr/local/bin/gcc-10")
set(CMAKE_CXX_COMPILER "/usr/local/bin/g++-10")
set(CMAKE_Fortran_COMPILER "/usr/local/bin/gfortran")
# set(BLA_VENDOR "OpenBLAS")
# option(HUNTER_ENABLED "Enable Hunter package manager support" OFF)
Expand All @@ -23,12 +25,16 @@ endif()





IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Build type (Release, Debug, RelWithDebugInfo, MinSizeRel)")
ENDIF()

PROJECT(Elmer Fortran C CXX)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)

# CMAKE_VERSION seems to require this in minimum
CMAKE_MINIMUM_REQUIRED(VERSION 3.0.2)

IF(APPLE)
SET(CMAKE_MACOSX_RPATH 1)
Expand Down Expand Up @@ -122,8 +128,8 @@ MARK_AS_ADVANCED(ELMER_INSTALL_LIB_DIR)

ENABLE_TESTING()

SET(ELMER_FEM_MAJOR_VERSION 8)
SET(ELMER_FEM_MINOR_VERSION 4)
SET(ELMER_FEM_MAJOR_VERSION 9)
SET(ELMER_FEM_MINOR_VERSION 0)

SET(ELMER_FEM_VERSION
${ELMER_FEM_MAJOR_VERSION}.${ELMER_FEM_MINOR_VERSION})
Expand Down Expand Up @@ -178,13 +184,33 @@ IF(WITH_OpenMP)
OpenMP_Fortran_FLAGS
OpenMP_CXX_FLAGS
)

FIND_PACKAGE(OpenMP REQUIRED)

# Add OpenMP flags to compilation flags
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${OpenMP_Fortran_FLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
# if(APPLE)
# if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
# set(OpenMP_C "${CMAKE_C_COMPILER}")
# set(OpenMP_C_FLAGS "-fopenmp=libomp -Wno-unused-command-line-argument")
# set(OpenMP_C_LIB_NAMES "libomp" "libgomp" "libiomp5")
# set(OpenMP_libomp_LIBRARY ${OpenMP_C_LIB_NAMES})
# set(OpenMP_libgomp_LIBRARY ${OpenMP_C_LIB_NAMES})
# set(OpenMP_libiomp5_LIBRARY ${OpenMP_C_LIB_NAMES})
# endif()
# if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
# set(OpenMP_CXX "${CMAKE_CXX_COMPILER}")
# set(OpenMP_CXX_FLAGS "-fopenmp=libomp -Wno-unused-command-line-argument")
# set(OpenMP_CXX_LIB_NAMES "libomp" "libgomp" "libiomp5")
# set(OpenMP_libomp_LIBRARY ${OpenMP_CXX_LIB_NAMES})
# set(OpenMP_libgomp_LIBRARY ${OpenMP_CXX_LIB_NAMES})
# set(OpenMP_libiomp5_LIBRARY ${OpenMP_CXX_LIB_NAMES})
# endif()
# else()
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${OpenMP_Fortran_FLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
# endif()

FIND_PACKAGE(OpenMP REQUIRED)

# Test compiler support for OpenMP 4.0 features used
INCLUDE(testOpenMP40)
IF(CMAKE_Fortran_COMPILER_SUPPORTS_OPENMP40)
Expand All @@ -199,6 +225,15 @@ IF(WITH_OpenMP)
ENDIF()
ENDIF()

# Get rid of the annoying rank mismatch warning
IF("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
IF(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.9)
SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch")
# SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -std=legacy")
ENDIF()
ENDIF()


IF(WITH_MPI)
# Advanced properties
MARK_AS_ADVANCED(
Expand Down
2 changes: 2 additions & 0 deletions ElmerGUI/Application/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ SET(SOURCES src/bodypropertyeditor.cpp
twod/twodview.cpp
twod/curveeditor.cpp)

ADD_DEFINITIONS(-DEG_PLUGIN)

IF(WITH_QWT)
SET(HEADERS ${HEADERS} src/convergenceview.h)
SET(SOURCES ${SOURCES} src/convergenceview.cpp)
Expand Down
18 changes: 9 additions & 9 deletions ElmerGUI/Application/edf-extra/vectorhelmholtz.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,24 @@
<Material>
<Parameter Widget="Label" > <Name> Material properties </Name> </Parameter>
<Parameter Widget="Edit" >
<Name> Inverse Relative Permeability </Name>
<Name> Relative Permittivity </Name>
<Type> String </Type>
<Whatis> Give the inverse relative permeability compared to vacuum (real part). </Whatis>
<Whatis> Give the relative permittivity of medium (real part). </Whatis>
</Parameter>
<Parameter Widget="Edit" >
<Name> Inverse Relative Permeability im </Name>
<Name> Relative Permittivity im</Name>
<Type> String </Type>
<Whatis> Give the inverse relative permeability compared to vacuum (imag part). </Whatis>
<Whatis> Give the relative permittivity of medium (imag part). </Whatis>
</Parameter>
<Parameter Widget="Edit" >
<Name> Relative Permittivity </Name>
<Name> Relative Reluctivity</Name>
<Type> String </Type>
<Whatis> Give the relative permittivity of medium (real part). </Whatis>
<Whatis> Give the relative reluctivity of the medium (real part). </Whatis>
</Parameter>
<Parameter Widget="Edit" >
<Name> Relative Permittivity im</Name>
<Name> Relative Reluctivity im</Name>
<Type> String </Type>
<Whatis> Give the relative permittivity of medium (imag part). </Whatis>
<Whatis> Give the relative reluctivity of the medium (imag part). </Whatis>
</Parameter>
</Material>

Expand Down Expand Up @@ -308,7 +308,7 @@
<Whatis> Calculate Poynting Vector </Whatis>
</Parameter>
<Parameter Widget="CheckBox">
<Name> Calculate Div Poynting Vector </Name>
<Name> Calculate Div of Poynting Vector </Name>
<Type> Logical </Type>
<Whatis> Calculate Divergence of Poyntings vector</Whatis>
</Parameter>
Expand Down
Loading

0 comments on commit b7e4b5a

Please sign in to comment.