Skip to content

Commit

Permalink
Update for v4.
Browse files Browse the repository at this point in the history
  • Loading branch information
friedenhe committed Dec 10, 2024
1 parent bce10c3 commit 21620ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
2 changes: 1 addition & 1 deletion pyofm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '1.2.2'
__version__ = '1.2.3'

from .pyOFM import PYOFM
24 changes: 8 additions & 16 deletions src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
os.environ["CC"] = "mpicc"
os.environ["CXX"] = "mpicxx"

if os.getenv("WM_CODI_AD_FLAGS") is None:
codiFlag = "-DCODI_AD_NONE"
else:
codiFlag = os.getenv("WM_CODI_AD_FLAGS")

# These setup should reproduce calling wmake to compile OpenFOAM libraries and solvers
ext = [
Extension(
Expand All @@ -44,10 +39,6 @@
os.getenv("FOAM_SRC") + "/OSspecific/POSIX/lnInclude",
os.getenv("FOAM_LIBBIN"),
os.getenv("FOAM_USER_LIBBIN"),
# CoDiPack and MeDiPack
os.getenv("FOAM_SRC") + "/codipack/include",
os.getenv("FOAM_SRC") + "/medipack/include",
os.getenv("FOAM_SRC") + "/medipack/src",
numpy.get_include(),
],
# These are from Make/options:EXE_LIBS
Expand All @@ -57,16 +48,18 @@
# All other flags for OpenFOAM, users don't need to touch this
extra_compile_args=[
# "-DFULLDEBUG -g -O0", # this is for debugging
"-std=c++11",
"-Wno-deprecated-copy",
"-std=c++17",
"-m64",
"-DOPENFOAM_PLUS=1812",
"-Dlinux64",
"-DWM_ARCH_OPTION=64",
"-pthread",
"-DOPENFOAM=2112",
"-DDAOF_AD_TOOL_DCO_FOAM",
#"-Dlinux64",
#"-DWM_ARCH_OPTION=64",
"-DWM_DP",
"-DWM_LABEL_SIZE=32",
"-Wall",
"-Wextra",
"-Wno-deprecated-copy",
"-Wnon-virtual-dtor",
"-Wno-unused-parameter",
"-Wno-invalid-offsetof",
Expand All @@ -75,10 +68,9 @@
"-ftemplate-depth-100",
"-fPIC",
"-c",
codiFlag,
],
# Extra link flags for OpenFOAM, users don't need to touch this
extra_link_args=["-Xlinker", "--add-needed", "-Xlinker", "--no-as-needed"],
extra_link_args=["-shared", "-Xlinker", "--add-needed", "-Xlinker", "--no-as-needed"],
)
]

Expand Down

0 comments on commit 21620ee

Please sign in to comment.