Skip to content

Commit

Permalink
add linear solvers to libamrex
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang committed Sep 5, 2017
1 parent 4af0473 commit d0bfe56
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions GNUmakefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,17 @@ endif
ifeq ($(USE_FORTRAN_INTERFACE),TRUE)
Pdirs += F_Interfaces/Base F_Interfaces/Octree F_Interfaces/AmrCore
endif
ifeq ($(USE_LINEAR_SOLVERS),TRUE)
Pdirs += LinearSolvers/C_CellMG LinearSolvers/C_to_F_MG
endif
Ppack := $(foreach dir, $(Pdirs), $(AMREX_HOME)/Src/$(dir)/Make.package)
include $(Ppack)

ifeq ($(USE_LINEAR_SOLVERS),TRUE)
include $(AMREX_HOME)/Src/LinearSolvers/F_MG/FParallelMG.mak
include $(AMREX_HOME)/Src/F_BaseLib/FParallelMG.mak
endif

all: $(amrexlib)
@echo SUCCESS

Expand Down
2 changes: 1 addition & 1 deletion Src/Base/Make.package
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

AMREX_BASE=EXE

C$(AMREX_BASE)_headers += AMReX_ccse-mpi.H AMReX_Array.H AMReX_BaseIndex.H
C$(AMREX_BASE)_headers += AMReX_ccse-mpi.H AMReX_Array.H AMReX_BaseIndex.H AMReX_Tuple.H

#
# Utility classes.
Expand Down
8 changes: 8 additions & 0 deletions Tools/libamrex/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ def configure(argv):
help="Enable AMReX Fortran API [default=yes]",
choices=["yes","no"],
default="yes")
parser.add_argument("--enable-linear-solver",
help="Enable AMReX linear solvers [default=no]",
choices=["yes","no"],
default="no")
parser.add_argument("--allow-different-compiler",
help="Allow an application to use a different compiler than the one used to build libamrex [default=no]",
choices=["yes","no"],
Expand Down Expand Up @@ -73,6 +77,10 @@ def configure(argv):
f.write("USE_FORTRAN_INTERFACE = FALSE\n")
else:
f.write("USE_FORTRAN_INTERFACE = TRUE\n")
if args.enable_linear_solver == "no":
f.write("USE_LINEAR_SOLVERS = FALSE\n")
else:
f.write("USE_LINEAR_SOLVERS = TRUE\n")
if args.allow_different_compiler == "no":
f.write("ALLOW_DIFFERENT_COMP = FALSE\n")
else:
Expand Down

0 comments on commit d0bfe56

Please sign in to comment.