Skip to content

Commit

Permalink
Merge pull request #364 from easifem-fortran/dev
Browse files Browse the repository at this point in the history
easifemClasses.v23.10.2
  • Loading branch information
vickysharma0812 authored Jan 2, 2024
2 parents 4c0dea1 + 5074180 commit 2d2af0a
Show file tree
Hide file tree
Showing 376 changed files with 35,151 additions and 14,638 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ tests/
*.ipynb
*.dat
_packages/
__*



Expand Down
10 changes: 10 additions & 0 deletions Workspaces/AbstractKernel.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"folders": [
{
"path": "../src/modules/AbstractKernel"
},
{
"path": "../src/submodules/AbstractKernel"
}
]
}
38 changes: 38 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env python3

# This program is a part of EASIFEM library.
# See. www.easifem.com
# Copyright (c) 2020-2021, All right reserved, Vikas Sharma, Ph.D.
#

import os

# import sys
import platform

print("Detecting OS type...")
_os = platform.system()
if _os == "Windows":
print("ERROR: INSTALLATION on windows is work in progress")
exit
# print("Please use Windows Subsystem Linux(WSL) ")
# print("Installation DONE!!")
else:
cmake_def = ""
cmake_def += '-G "Ninja"'
cmake_def += " -D USE_GMSH_SDK:BOOL=ON"
cmake_def += " -D CMAKE_BUILD_TYPE=Debug"
cmake_def += " -D BUILD_SHARED_LIBS:BOOL=ON"
cmake_def += " -D USE_LIS:BOOL=ON"
cmake_def += " -D CMAKE_INSTALL_PREFIX:PATH=${EASIFEM_CLASSES}"
print("CMAKE DEF : ", cmake_def)
_build0 = os.path.join(os.environ["HOME"], "temp")
build_dir = os.path.join(
os.environ.get("EASIFEM_BUILD_DIR",
_build0), "easifem", "classes", "build"
)
# build_dir = os.environ["HOME"] + "/temp/easifem-base/build"
os.makedirs(build_dir, exist_ok=True)
os.system(f"cmake -S ./ -B {build_dir} {cmake_def}")
os.system(f"cmake --build {build_dir}")
print("Build DONE!!")
58 changes: 29 additions & 29 deletions cmake/addLIS.cmake
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
# This program is a part of EASIFEM library
# Copyright (C) 2020-2021 Vikas Sharma, Ph.D
# This program is a part of EASIFEM library Copyright (C) 2020-2021 Vikas
# Sharma, Ph.D
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https: //www.gnu.org/licenses/>
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https: //www.gnu.org/licenses/>
#

IF( ${PROJECT_NAME} MATCHES "easifemBase" )
OPTION( USE_LIS OFF )
IF( USE_LIS )
LIST( APPEND TARGET_COMPILE_DEF "-DUSE_LIS" )
IF( UNIX )
IF(APPLE)
SET( LIS_LIBRARIES "$ENV{EASIFEM_EXTPKGS}/lib/liblis.dylib" )
ELSE()
SET( LIS_LIBRARIES "$ENV{EASIFEM_EXTPKGS}/lib/liblis.so" )
ENDIF()
ENDIF()
TARGET_LINK_LIBRARIES( ${PROJECT_NAME} PUBLIC ${LIS_LIBRARIES} )
MESSAGE( STATUS "LIS_LIBRARIES : ${LIS_LIBRARIES}" )
ELSE()
MESSAGE( STATUS "NOT USING LIS LIBRARIES" )
ENDIF()
ENDIF()
if(${PROJECT_NAME} MATCHES "easifemBase")
option(USE_LIS OFF)
if(USE_LIS)
list(APPEND TARGET_COMPILE_DEF "-DUSE_LIS")
if(UNIX)
if(APPLE)
set(LIS_LIBRARIES "$ENV{EASIFEM_EXTPKGS}/lib/liblis.dylib")
else()
set(LIS_LIBRARIES "$ENV{EASIFEM_EXTPKGS}/lib/liblis.so")
endif()
endif()
target_link_libraries(${PROJECT_NAME} PUBLIC ${LIS_LIBRARIES})
message(STATUS "LIS_LIBRARIES : ${LIS_LIBRARIES}")
else()
message(STATUS "NOT USING LIS LIBRARIES")
endif()
endif()
35 changes: 15 additions & 20 deletions cmake/prefixPaths.cmake
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
# This program is a part of EASIFEM library
# Copyright (C) 2020-2021 Vikas Sharma, Ph.D
# This program is a part of EASIFEM library Copyright (C) 2020-2021 Vikas
# Sharma, Ph.D
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https: //www.gnu.org/licenses/>
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https: //www.gnu.org/licenses/>
#
IF(NOT CMAKE_PREFIX_PATH)
LIST(
APPEND
CMAKE_PREFIX_PATH
"$ENV{EASIFEM_EXTPKGS}"
"$ENV{EASIFEM_BASE}"
)
ENDIF()
if(NOT CMAKE_PREFIX_PATH)
list(APPEND CMAKE_PREFIX_PATH "$ENV{EASIFEM_EXTPKGS}" "$ENV{EASIFEM_BASE}")
endif()
80 changes: 40 additions & 40 deletions cmake/targetCompileDefs.cmake
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
# This program is a part of EASIFEM library
# Copyright (C) 2020-2021 Vikas Sharma, Ph.D
# This program is a part of EASIFEM library Copyright (C) 2020-2021 Vikas
# Sharma, Ph.D
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https: //www.gnu.org/licenses/>
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https: //www.gnu.org/licenses/>
#
#COMPILE DEF
# COMPILE DEF
#
#Single precision or double precision
OPTION(USE_Real32 OFF)
OPTION(USE_Real64 OFF)
IF(USE_Real32)
LIST( APPEND TARGET_COMPILE_DEF "-DUSE_Real32" )
ELSEIF(USE_Real64)
LIST( APPEND TARGET_COMPILE_DEF "-DUSE_Real64" )
ELSE()
LIST( APPEND TARGET_COMPILE_DEF "-DUSE_Real64" )
ENDIF()
OPTION(USE_Int32 OFF)
OPTION(USE_Int64 OFF)
IF(USE_Int32)
LIST( APPEND TARGET_COMPILE_DEF "-DUSE_Int32" )
ELSEIF(USE_Real64)
LIST( APPEND TARGET_COMPILE_DEF "-DUSE_Int64" )
ELSE()
LIST( APPEND TARGET_COMPILE_DEF "-DUSE_Int32" )
ENDIF()
LIST( APPEND TARGET_COMPILE_DEF "-D${CMAKE_HOST_SYSTEM_NAME}_SYSTEM" )
# Single precision or double precision
option(USE_Real32 OFF)
option(USE_Real64 OFF)
if(USE_Real32)
list(APPEND TARGET_COMPILE_DEF "-DUSE_Real32")
elseif(USE_Real64)
list(APPEND TARGET_COMPILE_DEF "-DUSE_Real64")
else()
list(APPEND TARGET_COMPILE_DEF "-DUSE_Real64")
endif()
option(USE_Int32 OFF)
option(USE_Int64 OFF)
if(USE_Int32)
list(APPEND TARGET_COMPILE_DEF "-DUSE_Int32")
elseif(USE_Real64)
list(APPEND TARGET_COMPILE_DEF "-DUSE_Int64")
else()
list(APPEND TARGET_COMPILE_DEF "-DUSE_Int32")
endif()
list(APPEND TARGET_COMPILE_DEF "-D${CMAKE_HOST_SYSTEM_NAME}_SYSTEM")

#DEFINE DEBUG
IF (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
LIST( APPEND TARGET_COMPILE_DEF "-DDEBUG_VER" )
ENDIF()
# DEFINE DEBUG
if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
list(APPEND TARGET_COMPILE_DEF "-DDEBUG_VER")
endif()

#ADD TO PROJECT
TARGET_COMPILE_DEFINITIONS( ${PROJECT_NAME} PUBLIC ${TARGET_COMPILE_DEF} )
MESSAGE( STATUS "COMPILE DEFINITIONS USED ARE ${TARGET_COMPILE_DEF}")
# ADD TO PROJECT
target_compile_definitions(${PROJECT_NAME} PUBLIC ${TARGET_COMPILE_DEF})
message(STATUS "COMPILE DEFINITIONS USED ARE ${TARGET_COMPILE_DEF}")
44 changes: 21 additions & 23 deletions cmake/targetLinkLibs.cmake
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
# This program is a part of EASIFEM library
# Copyright (C) 2020-2021 Vikas Sharma, Ph.D
# This program is a part of EASIFEM library Copyright (C) 2020-2021 Vikas
# Sharma, Ph.D
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https: //www.gnu.org/licenses/>
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https: //www.gnu.org/licenses/>
#

#....................................................................
# ....................................................................
#
#....................................................................

FIND_PACKAGE( easifemBase REQUIRED )
IF( easifemBase_FOUND )
MESSAGE(STATUS "FOUND easifemBase")
ELSE()
MESSAGE(ERROR "NOT FOUND easifemBase")
ENDIF()
TARGET_LINK_LIBRARIES( ${PROJECT_NAME} PUBLIC easifemBase::easifemBase )
# ....................................................................

find_package(easifemBase REQUIRED)
if(easifemBase_FOUND)
message(STATUS "FOUND easifemBase")
else()
message(ERROR "NOT FOUND easifemBase")
endif()
target_link_libraries(${PROJECT_NAME} PUBLIC easifemBase::easifemBase)
1 change: 1 addition & 0 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
cmake_def += " -D USE_GMSH_SDK:BOOL=ON"
cmake_def += " -D CMAKE_BUILD_TYPE=Debug"
cmake_def += " -D BUILD_SHARED_LIBS:BOOL=ON"
cmake_def += " -D USE_LIS:BOOL=ON"
cmake_def += " -D CMAKE_INSTALL_PREFIX:PATH=${EASIFEM_CLASSES}"
print("CMAKE DEF : ", cmake_def)
_build0 = os.path.join(os.environ["HOME"], "temp")
Expand Down
37 changes: 37 additions & 0 deletions release_install.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env python3

# This program is a part of EASIFEM library.
# See. www.easifem.com
# Copyright (c) 2020-2021, All right reserved, Vikas Sharma, Ph.D.
#

import os

# import sys
import platform

print("Detecting OS type...")
_os = platform.system()
if _os == "Windows":
print("ERROR: INSTALLATION on windows is work in progress")
exit
# print("Please use Windows Subsystem Linux(WSL) ")
# print("Installation DONE!!")
else:
cmake_def = ""
cmake_def += '-G "Ninja"'
cmake_def += " -D USE_GMSH_SDK:BOOL=ON"
cmake_def += " -D CMAKE_BUILD_TYPE:STRING=Release"
cmake_def += " -D BUILD_SHARED_LIBS:BOOL=ON"
cmake_def += " -D CMAKE_INSTALL_PREFIX:PATH=${EASIFEM_CLASSES}"
print("CMAKE DEF : ", cmake_def)
_build0 = os.path.join(os.environ["HOME"], "temp")
build_dir = os.path.join(
os.environ.get("EASIFEM_BUILD_DIR",
_build0), "easifem", "classes", "build"
)
# build_dir = os.environ["HOME"] + "/temp/easifem-base/build"
os.makedirs(build_dir, exist_ok=True)
os.system(f"cmake -S ./ -B {build_dir} {cmake_def}")
os.system(f"cmake --build {build_dir} --target install")
print("Installation DONE!!")
4 changes: 2 additions & 2 deletions src/modules/AbstractBC/src/AbstractBC_Class.F90
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ END SUBROUTINE bc_Get

!> author: Vikas Sharma, Ph. D.
! date: 2023-02-12
! summary: Get the node number and nodal value
! summary: Get the dirichlet boundary condition in FEVariable

INTERFACE
MODULE SUBROUTINE bc_GetFEVar(obj, fevar, globalNode, &
Expand All @@ -386,7 +386,7 @@ END SUBROUTINE bc_GetFEVar
END INTERFACE

!----------------------------------------------------------------------------
! GetFromFunction@GetMethods
! GetFromFunction@GetMethods
!----------------------------------------------------------------------------

!> author: Vikas Sharma, Ph. D.
Expand Down
Loading

0 comments on commit 2d2af0a

Please sign in to comment.