Skip to content

Commit 4c0dea1

Browse files
Merge pull request #232 from vickysharma0812/dev
v23.10.1
2 parents bf37b5f + 301bc68 commit 4c0dea1

File tree

308 files changed

+31034
-10415
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

308 files changed

+31034
-10415
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
vscode-settings
2222
media/
23-
include/
2423
lib/
2524
opt/
2625
bin/

cmake/Compiler.cmake

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,34 @@ ENDIF()
3131
IF (${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU" OR Fortran_COMPILER_NAME MATCHES "gfortran*")
3232
LIST(APPEND FORTRAN_FLAGS "-ffree-form" "-ffree-line-length-none" "-std=f2018" "-fimplicit-none" )
3333
LIST(APPEND FORTRAN_FLAGS_RELEASE "-O3" )
34-
LIST(APPEND FORTRAN_FLAGS_DEBUG "-fbounds-check" "-g" "-fbacktrace" "-Wextra" "-Wall" "-fprofile-arcs" "-ftest-coverage" "-Wimplicit-interface" )
34+
35+
IF(APPLE)
36+
LIST(
37+
APPEND
38+
FORTRAN_FLAGS_DEBUG
39+
"-fbounds-check"
40+
"-g"
41+
"-fbacktrace"
42+
"-Wextra"
43+
"-Wall"
44+
# "-fprofile-arcs"
45+
"-ftest-coverage"
46+
"-Wimplicit-interface"
47+
)
48+
ELSE()
49+
LIST(
50+
APPEND
51+
FORTRAN_FLAGS_DEBUG
52+
"-fbounds-check"
53+
"-g"
54+
"-fbacktrace"
55+
"-Wextra"
56+
"-Wall"
57+
# "-fprofile-arcs"
58+
"-ftest-coverage"
59+
"-Wimplicit-interface"
60+
)
61+
ENDIF()
3562

3663
ELSEIF(${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel" OR Fortran_COMPILER_NAME MATCHES "ifort*")
3764
LIST(APPEND FORTRAN_FLAGS "-r8" "-W1")

cmake/Config.cmake.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
# find_package(easifemBase 1.0.0 CONFIG REQUIRED)
2929
#
3030
# The following variables can be set to guide the search for this package:
31-
#
32-
#
3331

3432
@PACKAGE_INIT@
3533

cmake/Modules/FindGmsh.cmake

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# ##############################################################################
2+
# Try to find Gmsh # # Once done this
3+
# will define: # GMSH_FOUND - system has Gmsh #
4+
# GMSH_INC - Gmsh include directory (static or dynamic) # GMSH_LIB -
5+
# Gmsh library # # Usage: # find_package(Gmsh) # #
6+
# Setting these changes the behavior of the search # GMSH_INC - Gmsh
7+
# include directory # GMSH_LIB - Gmsh library path
8+
# (static or dynamic) #
9+
# ##############################################################################
10+
11+
# Try to set GMSH_LIB and GMSH_INC from environment variables ##
12+
# ##############################################################################
13+
14+
if(NOT DEFINED GMSH_LIB)
15+
16+
find_package(Python3 COMPONENTS Interpreter Development)
17+
18+
if(Python3_FOUND)
19+
message(STATUS "FOUND Python3")
20+
message(STATUS "Python3_LIBRARY_DIRS ${Python3_LIBRARY_DIRS}")
21+
find_library(GMSH_LIB "gmsh" HINTS $ENV{GMSH_LIB} ${Python3_LIBRARY_DIRS}
22+
NO_CACHE)
23+
else()
24+
message(STATUS "NOT FOUND Python3")
25+
find_library(GMSH_LIB "gmsh" HINTS $ENV{GMSH_LIB} NO_CACHE)
26+
endif()
27+
endif()
28+
29+
# if(NOT DEFINED GMSH_INC) find_path(GMSH_INC "gmsh.h" HINTS $ENV{GMSH_INC}
30+
# NO_CACHE) endif()
31+
32+
# CMake check and done ##
33+
# ##############################################################################
34+
include(FindPackageHandleStandardArgs)
35+
find_package_handle_standard_args(
36+
Gmsh
37+
"Gmsh could not be found: be sure to set GMSH_LIB and GMSH_INC in your environment variables"
38+
GMSH_LIB)
39+
# GMSH_INC)

cmake/addGmsh.cmake

Lines changed: 49 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,49 @@
1-
# This program is a part of EASIFEM library
2-
# Copyright (C) 2020-2021 Vikas Sharma, Ph.D
3-
#
4-
# This program is free software: you can redistribute it and/or modify
5-
# it under the terms of the GNU General Public License as published by
6-
# the Free Software Foundation, either version 3 of the License, or
7-
# (at your option) any later version.
8-
#
9-
# This program is distributed in the hope that it will be useful,
10-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-
# GNU General Public License for more details.
13-
#
14-
# You should have received a copy of the GNU General Public License
15-
# along with this program. If not, see <https: //www.gnu.org/licenses/>
16-
#
17-
#GMSH SDK
18-
IF( ${PROJECT_NAME} MATCHES "easifemClasses" )
19-
OPTION( USE_GMSH_SDK OFF )
20-
IF( USE_GMSH_SDK )
21-
LIST( APPEND TARGET_COMPILE_DEF "-DUSE_GMSH_SDK" )
22-
IF( UNIX )
23-
IF(APPLE)
24-
SET( GMSH_LIBRARIES "$ENV{EASIFEM_EXTPKGS}/lib/libgmsh.dylib" )
25-
ELSE()
26-
# SET( GMSH_LIBRARIES "$ENV{HOME}/.local/lib/libgmsh.so" )
27-
SET( GMSH_LIBRARIES "$ENV{EASIFEM_EXTPKGS}/lib/libgmsh.so" )
28-
ENDIF()
29-
ENDIF()
30-
TARGET_LINK_LIBRARIES( ${PROJECT_NAME} PUBLIC ${GMSH_LIBRARIES} )
31-
MESSAGE( STATUS "GMSH_LIBRARIES : ${GMSH_LIBRARIES}" )
32-
ELSE()
33-
MESSAGE( STATUS "NOT USING GMSH SDK LIBRARIES" )
34-
ENDIF()
35-
ENDIF()
1+
# This program is a part of EASIFEM library Copyright (C) 2020-2021 Vikas
2+
# Sharma, Ph.D
3+
#
4+
# This program is free software: you can redistribute it and/or modify it under
5+
# the terms of the GNU General Public License as published by the Free Software
6+
# Foundation, either version 3 of the License, or (at your option) any later
7+
# version.
8+
#
9+
# This program is distributed in the hope that it will be useful, but WITHOUT
10+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11+
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12+
# details.
13+
#
14+
# You should have received a copy of the GNU General Public License along with
15+
# this program. If not, see <https: //www.gnu.org/licenses/>
16+
#
17+
# GMSH SDK IF( ${PROJECT_NAME} MATCHES "easifemClasses" ) OPTION( USE_GMSH_SDK
18+
# OFF ) IF( USE_GMSH_SDK ) LIST( APPEND TARGET_COMPILE_DEF "-DUSE_GMSH_SDK" )
19+
# FIND_PACKAGE(PkgConfig REQUIRED) FIND_LIBRARY(GMSH_LIBRARY NAMES gmsh PATHS
20+
# "$ENV{CONDA_PREFIX}/lib" "/opt/homebrew/lib" ) # PATHS "/opt/homebrew/lib" )
21+
# SET(GMSH_LIBRARIES ${GMSH_LIBRARY})
22+
#
23+
# INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS( GMSH
24+
# DEFAULT_MSG GMSH_LIBRARIES )
25+
#
26+
# # SET(GMSH_LIBRARIES "$ENV{CONDA_PREFIX}/lib/libgmsh.so")
27+
#
28+
# TARGET_LINK_LIBRARIES( ${PROJECT_NAME} PUBLIC ${GMSH_LIBRARIES} )
29+
#
30+
# MESSAGE( STATUS "GMSH_LIBRARIES : ${GMSH_LIBRARIES}" ) ELSE() MESSAGE( STATUS
31+
# "NOT USING GMSH SDK LIBRARIES" ) ENDIF() ENDIF()
32+
33+
if(${PROJECT_NAME} MATCHES "easifemClasses")
34+
option(USE_GMSH_SDK OFF)
35+
if(USE_GMSH_SDK)
36+
message(STATUS "USING GMSH SDK")
37+
list(APPEND TARGET_COMPILE_DEF "-DUSE_GMSH_SDK")
38+
find_package(Gmsh REQUIRED)
39+
if(GMSH_FOUND)
40+
message(STATUS "FOUND Gmsh")
41+
message(STATUS "GMSH_LIBRARIES : ${GMSH_LIB}")
42+
target_link_libraries(${PROJECT_NAME} PUBLIC ${GMSH_LIB})
43+
else()
44+
message(STATUS "NOT FOUND Gmsh")
45+
endif()
46+
else()
47+
message(STATUS "NOT USING GMSH SDK")
48+
endif()
49+
endif()

cmake/targetCompileDefs.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ ENDIF()
3838
LIST( APPEND TARGET_COMPILE_DEF "-D${CMAKE_HOST_SYSTEM_NAME}_SYSTEM" )
3939

4040
#DEFINE DEBUG
41-
IF( $<CONFIG:DEBUG> )
41+
IF (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
4242
LIST( APPEND TARGET_COMPILE_DEF "-DDEBUG_VER" )
4343
ENDIF()
4444

4545
#ADD TO PROJECT
4646
TARGET_COMPILE_DEFINITIONS( ${PROJECT_NAME} PUBLIC ${TARGET_COMPILE_DEF} )
47-
MESSAGE( STATUS "COMPILE DEFINITIONS USED ARE ${TARGET_COMPILE_DEF}")
47+
MESSAGE( STATUS "COMPILE DEFINITIONS USED ARE ${TARGET_COMPILE_DEF}")

cmake/targetLinkLibs.cmake

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -16,49 +16,6 @@
1616
#
1717
#
1818

19-
# Link libs to the project
20-
21-
#....................................................................
22-
#
23-
#....................................................................
24-
25-
FUNCTION(FIND_EASIFEM_DEPENDENCY EXT_PKG_LIST)
26-
FOREACH(p ${EXT_PKG_LIST})
27-
FIND_PACKAGE( ${p} REQUIRED )
28-
IF( ${p}_FOUND )
29-
MESSAGE(STATUS "FOUND ${p}")
30-
ELSE()
31-
MESSAGE(ERROR "NOT FOUND ${p}")
32-
ENDIF()
33-
ENDFOREACH()
34-
ENDFUNCTION(FIND_EASIFEM_DEPENDENCY)
35-
36-
#....................................................................
37-
#
38-
#....................................................................
39-
40-
FUNCTION(LINK_EASIFEM_DEPENDENCY EXT_PKG_LIST PROJECT_NAME)
41-
FOREACH(p ${EXT_PKG_LIST})
42-
TARGET_LINK_LIBRARIES( ${PROJECT_NAME} PUBLIC ${p}::${p} )
43-
ENDFOREACH()
44-
ENDFUNCTION(LINK_EASIFEM_DEPENDENCY)
45-
46-
#....................................................................
47-
#
48-
#....................................................................
49-
50-
IF( ${PROJECT_NAME} MATCHES "easifemBase" )
51-
IF( USE_LAPACK95 )
52-
LIST(APPEND EXT_PKGS LAPACK95)
53-
LIST( APPEND TARGET_COMPILE_DEF "-DUSE_LAPACK95" )
54-
ENDIF()
55-
56-
LIST(APPEND EXT_PKGS Sparsekit)
57-
58-
FIND_EASIFEM_DEPENDENCY( "${EXT_PKGS}" )
59-
LINK_EASIFEM_DEPENDENCY( "${EXT_PKGS}" "${PROJECT_NAME}" )
60-
ENDIF()
61-
6219
#....................................................................
6320
#
6421
#....................................................................

dprint.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"markdown": {
3+
},
4+
"toml": {
5+
},
6+
"excludes": [],
7+
"plugins": [
8+
"https://plugins.dprint.dev/markdown-0.16.3.wasm",
9+
"https://plugins.dprint.dev/toml-0.5.4.wasm"
10+
]
11+
}

install.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
else:
2121
cmake_def = ""
2222
cmake_def += '-G "Ninja"'
23-
cmake_def += " -D USE_GMSH_SDK:BOOL=OFF"
24-
cmake_def += " -D CMAKE_BUILD_TYPE:STRING=Release"
23+
cmake_def += " -D USE_GMSH_SDK:BOOL=ON"
24+
cmake_def += " -D CMAKE_BUILD_TYPE=Debug"
2525
cmake_def += " -D BUILD_SHARED_LIBS:BOOL=ON"
2626
cmake_def += " -D CMAKE_INSTALL_PREFIX:PATH=${EASIFEM_CLASSES}"
2727
print("CMAKE DEF : ", cmake_def)

src/modules/AbstractBC/CMakeLists.txt

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
1+
# This program is a part of EASIFEM library
2+
# Copyright (C) 2020-2021 Vikas Sharma, Ph.D
3+
#
4+
# This program is free software: you can redistribute it and/or modify
5+
# it under the terms of the GNU General Public License as published by
6+
# the Free Software Foundation, either version 3 of the License, or
7+
# (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU General Public License
15+
# along with this program. If not, see <https: //www.gnu.org/licenses/>
16+
#
17+
118
SET(src_path "${CMAKE_CURRENT_LIST_DIR}/src/")
219
TARGET_SOURCES(
320
${PROJECT_NAME} PRIVATE
421
${src_path}/AbstractBC_Class.F90
5-
)
22+
)

0 commit comments

Comments
 (0)