Skip to content

Commit

Permalink
move linear solvers into separate directory (#1975)
Browse files Browse the repository at this point in the history
* move linear solvers into separate directory

* remove print statements

* this GMRES solves WoA with a hacked up RHS

* fix white space

* fix whitespace and add file to cmake

* remove unused

* GMRES is now working with FFT preconditioner

* codespell

* fix compile for USE_FFT=FALSE

* towards building

* compile without FFT

* update amrex and FFT solver
  • Loading branch information
asalmgren authored Nov 24, 2024
1 parent 17bb541 commit a8e96e8
Show file tree
Hide file tree
Showing 26 changed files with 1,179 additions and 320 deletions.
20 changes: 10 additions & 10 deletions CMake/BuildERFExe.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,15 @@ function(build_erf_lib erf_lib_name)
${SRC_DIR}/EB/ERF_eb_cylinder.cpp
${SRC_DIR}/EB/ERF_eb_regular.cpp
${SRC_DIR}/EB/ERF_initEB.cpp
${SRC_DIR}/EB/ERF_writeEBsurface.cpp)
${SRC_DIR}/EB/ERF_writeEBsurface.cpp
${SRC_DIR}/LinearSolvers/ERF_solve_with_EB_mlmg.cpp)
target_include_directories(${erf_lib_name} PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/Source/EB>)
target_compile_definitions(${erf_lib_name} PUBLIC ERF_USE_EB)
endif()

if(ERF_ENABLE_FFT)
target_sources(${erf_lib_name} PRIVATE
${SRC_DIR}/Utils/ERF_solve_with_fft.cpp)
${SRC_DIR}/LinearSolvers/ERF_solve_with_fft.cpp)
target_compile_definitions(${erf_lib_name} PUBLIC ERF_USE_FFT)
endif()

Expand Down Expand Up @@ -102,10 +103,6 @@ function(build_erf_lib erf_lib_name)
)
endif()

if(ERF_ENABLE_HDF5)
target_compile_definitions(${erf_lib_name} PUBLIC ERF_USE_HDF5)
endif()

target_sources(${erf_lib_name}
PRIVATE
${SRC_DIR}/ERF_Derive.cpp
Expand Down Expand Up @@ -189,10 +186,12 @@ function(build_erf_lib erf_lib_name)
${SRC_DIR}/Utils/ERF_AverageDown.cpp
${SRC_DIR}/Utils/ERF_ChopGrids.cpp
${SRC_DIR}/Utils/ERF_MomentumToVelocity.cpp
${SRC_DIR}/Utils/ERF_PoissonSolve.cpp
${SRC_DIR}/Utils/ERF_PoissonSolve_tb.cpp
${SRC_DIR}/Utils/ERF_solve_with_gmres.cpp
${SRC_DIR}/Utils/ERF_solve_with_mlmg.cpp
${SRC_DIR}/LinearSolvers/ERF_PoissonSolve.cpp
${SRC_DIR}/LinearSolvers/ERF_PoissonSolve_tb.cpp
${SRC_DIR}/LinearSolvers/ERF_compute_divergence.cpp
${SRC_DIR}/LinearSolvers/ERF_solve_with_gmres.cpp
${SRC_DIR}/LinearSolvers/ERF_solve_with_mlmg.cpp
${SRC_DIR}/LinearSolvers/ERF_TerrainPoisson.cpp
${SRC_DIR}/Utils/ERF_TerrainMetrics.cpp
${SRC_DIR}/Utils/ERF_VelocityToMomentum.cpp
${SRC_DIR}/Utils/ERF_InteriorGhostCells.cpp
Expand Down Expand Up @@ -244,6 +243,7 @@ endif()
target_include_directories(${erf_lib_name} PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/Source/Diffusion>)
target_include_directories(${erf_lib_name} PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/Source/Initialization>)
target_include_directories(${erf_lib_name} PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/Source/IO>)
target_include_directories(${erf_lib_name} PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/Source/LinearSolvers>)
target_include_directories(${erf_lib_name} PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/Source/PBL>)
target_include_directories(${erf_lib_name} PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/Source/SourceTerms>)
target_include_directories(${erf_lib_name} PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/Source/TimeIntegration>)
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ target_link_libraries(erf_api PUBLIC erf_srclib)
add_library(${PROJECT_NAME}::erf_api ALIAS erf_srclib)

# Collect all headers and make them installable with the target
set(ERF_INCLUDES "Source/ERF.H;Source/ERF_Constants.H;Source/WindFarmParametrization/SimpleActuatorDisk/ERF_SimpleAD.H;Source/WindFarmParametrization/EWP/ERF_EWP.H;Source/WindFarmParametrization/Null/ERF_NullWindFarm.H;Source/WindFarmParametrization/ERF_WindFarm.H;Source/WindFarmParametrization/Fitch/ERF_Fitch.H;Source/BoundaryConditions/ERF_PhysBCFunct.H;Source/BoundaryConditions/ERF_MOSTAverage.H;Source/BoundaryConditions/ERF_MOSTRoughness.H;Source/BoundaryConditions/ERF_ABLMost.H;Source/BoundaryConditions/ERF_FillPatcher.H;Source/BoundaryConditions/ERF_MOSTStress.H;Source/BoundaryConditions/ERF_TimeInterpolatedData.H;Source/Utils/ERF_Interpolation.H;Source/Utils/ERF_TileNoZ.H;Source/Utils/ERF_PlaneAverage.H;Source/Utils/ERF_Interpolation_WENO.H;Source/Utils/ERF_DirectionSelector.H;Source/Utils/ERF_ParFunctions.H;Source/Utils/ERF_Wstar.H;Source/Utils/ERF_Microphysics_Utils.H;Source/Utils/ERF_Sat_methods.H;Source/Utils/ERF_Interpolation_1D.H;Source/Utils/ERF_Interpolation_UPW.H;Source/Utils/ERF_TerrainMetrics.H;Source/Utils/ERF_Interpolation_WENO_Z.H;Source/Utils/ERF_Thetav.H;Source/Utils/ERF_Water_vapor_saturation.H;Source/Utils/ERF_Utils.H;Source/Utils/ERF_Orbit.H;Source/Utils/ERF_EOS.H;Source/Utils/ERF_HSE_utils.H;Source/EB/ERF_TerrainIF.H;Source/EB/ERF_FlowerIF.H;Source/EB/ERF_eb_if.H;Source/Particles/ERFPC.H;Source/Particles/ERF_ParticleData.H;Source/Prob/ERF_init_density_hse_dry.H;Source/Prob/ERF_init_rayleigh_damping.H;Source/Prob/ERF_init_constant_density_hse.H;Source/ERF_prob_common.H;Source/ERF_Derive.H;Source/Radiation/ERF_Mam4_constituents.H;Source/Radiation/ERF_Mam4_aero.H;Source/Radiation/ERF_Optics.H;Source/Radiation/ERF_Modal_aero_wateruptake.H;Source/Radiation/ERF_Cloud_rad_props.H;Source/Radiation/ERF_Phys_prop.H;Source/Radiation/ERF_Radiation.H;Source/Radiation/ERF_Albedo.H;Source/Radiation/ERF_Parameterizations.H;Source/Radiation/ERF_Rad_constants.H;Source/Radiation/ERF_Aero_rad_props.H;Source/Radiation/ERF_m2005_effradius.H;Source/Radiation/ERF_Linear_interpolate.H;Source/Radiation/ERF_Slingo.H;Source/Radiation/ERF_Rrtmgp.H;Source/Radiation/ERF_Ebert_curry.H;Source/SourceTerms/ERF_NumericalDiffusion.H;Source/SourceTerms/ERF_Src_headers.H;Source/IO/ERF_SampleData.H;Source/IO/ERF_NCInterface.H;Source/IO/ERF_NCWpsFile.H;Source/IO/ERF_NCPlotFile.H;Source/IO/ERF_ReadBndryPlanes.H;Source/IO/ERF_WriteBndryPlanes.H;Source/PBL/ERF_MYNNStruct.H;Source/PBL/ERF_PBLModels.H;Source/PBL/ERF_PBLHeight.H;Source/TimeIntegration/ERF_TI_substep_fun.H;Source/TimeIntegration/ERF_TI_slow_headers.H;Source/TimeIntegration/ERF_TI_slow_rhs_fun.H;Source/TimeIntegration/ERF_TI_fast_headers.H;Source/TimeIntegration/ERF_TI_utils.H;Source/TimeIntegration/ERF_MRI.H;Source/TimeIntegration/ERF_TI_no_substep_fun.H;Source/LandSurfaceModel/Null/ERF_NullSurf.H;Source/LandSurfaceModel/ERF_LandSurface.H;Source/LandSurfaceModel/MM5/ERF_MM5.H;Source/LandSurfaceModel/SLM/ERF_SLM.H;Source/ERF_IndexDefines.H;Source/Advection/ERF_AdvectionSrcForMom_N.H;Source/Advection/ERF_AdvectionSrcForScalars.H;Source/Advection/ERF_AdvectionSrcForMom_T.H;Source/Advection/ERF_Advection.H;Source/MultiBlock/ERF_MultiBlockContainer.H;Source/Initialization/ERF_Metgrid_utils.H;Source/Diffusion/ERF_EddyViscosity.H;Source/Diffusion/ERF_Diffusion.H;Source/Microphysics/Null/ERF_NullMoistLagrangian.H;Source/Microphysics/Null/ERF_NullMoist.H;Source/Microphysics/ERF_Microphysics.H;Source/Microphysics/ERF_LagrangianMicrophysics.H;Source/Microphysics/ERF_EulerianMicrophysics.H;Source/Microphysics/Kessler/ERF_Kessler.H;Source/Microphysics/SAM/ERF_SAM.H;Source/DataStructs/ERF_InputSpongeData.H;Source/DataStructs/ERF_TurbPertStruct.H;Source/DataStructs/ERF_SpongeStruct.H;Source/DataStructs/ERF_AdvStruct.H;Source/DataStructs/ERF_DataStruct.H;Source/DataStructs/ERF_InputSoundingData.H;Source/DataStructs/ERF_DiffStruct.H;Source/DataStructs/ERF_TurbStruct.H")
set(ERF_INCLUDES "Source/ERF.H;Source/ERF_Constants.H;Source/WindFarmParametrization/SimpleActuatorDisk/ERF_SimpleAD.H;Source/WindFarmParametrization/EWP/ERF_EWP.H;Source/WindFarmParametrization/Null/ERF_NullWindFarm.H;Source/WindFarmParametrization/ERF_WindFarm.H;Source/WindFarmParametrization/Fitch/ERF_Fitch.H;Source/BoundaryConditions/ERF_PhysBCFunct.H;Source/BoundaryConditions/ERF_MOSTAverage.H;Source/BoundaryConditions/ERF_MOSTRoughness.H;Source/BoundaryConditions/ERF_ABLMost.H;Source/BoundaryConditions/ERF_FillPatcher.H;Source/BoundaryConditions/ERF_MOSTStress.H;Source/BoundaryConditions/ERF_TimeInterpolatedData.H;Source/Utils/ERF_Interpolation.H;Source/Utils/ERF_TileNoZ.H;Source/Utils/ERF_PlaneAverage.H;Source/Utils/ERF_Interpolation_WENO.H;Source/Utils/ERF_DirectionSelector.H;Source/Utils/ERF_ParFunctions.H;Source/Utils/ERF_Wstar.H;Source/Utils/ERF_Microphysics_Utils.H;Source/Utils/ERF_Sat_methods.H;Source/Utils/ERF_Interpolation_1D.H;Source/Utils/ERF_Interpolation_UPW.H;Source/Utils/ERF_TerrainMetrics.H;Source/Utils/ERF_Interpolation_WENO_Z.H;Source/Utils/ERF_Thetav.H;Source/Utils/ERF_Water_vapor_saturation.H;Source/Utils/ERF_Utils.H;Source/Utils/ERF_Orbit.H;Source/Utils/ERF_EOS.H;Source/Utils/ERF_HSE_utils.H;Source/EB/ERF_TerrainIF.H;Source/EB/ERF_FlowerIF.H;Source/EB/ERF_eb_if.H;Source/Particles/ERFPC.H;Source/Particles/ERF_ParticleData.H;Source/Prob/ERF_init_density_hse_dry.H;Source/Prob/ERF_init_rayleigh_damping.H;Source/Prob/ERF_init_constant_density_hse.H;Source/ERF_prob_common.H;Source/ERF_Derive.H;Source/Radiation/ERF_Mam4_constituents.H;Source/Radiation/ERF_Mam4_aero.H;Source/Radiation/ERF_Optics.H;Source/Radiation/ERF_Modal_aero_wateruptake.H;Source/Radiation/ERF_Cloud_rad_props.H;Source/Radiation/ERF_Phys_prop.H;Source/Radiation/ERF_Radiation.H;Source/Radiation/ERF_Albedo.H;Source/Radiation/ERF_Parameterizations.H;Source/Radiation/ERF_Rad_constants.H;Source/Radiation/ERF_Aero_rad_props.H;Source/Radiation/ERF_m2005_effradius.H;Source/Radiation/ERF_Linear_interpolate.H;Source/Radiation/ERF_Slingo.H;Source/Radiation/ERF_Rrtmgp.H;Source/Radiation/ERF_Ebert_curry.H;Source/SourceTerms/ERF_NumericalDiffusion.H;Source/SourceTerms/ERF_Src_headers.H;Source/IO/ERF_SampleData.H;Source/IO/ERF_NCInterface.H;Source/IO/ERF_NCWpsFile.H;Source/IO/ERF_NCPlotFile.H;Source/IO/ERF_ReadBndryPlanes.H;Source/IO/ERF_WriteBndryPlanes.H;Source/PBL/ERF_MYNNStruct.H;Source/PBL/ERF_PBLModels.H;Source/PBL/ERF_PBLHeight.H;Source/TimeIntegration/ERF_TI_substep_fun.H;Source/TimeIntegration/ERF_TI_slow_headers.H;Source/TimeIntegration/ERF_TI_slow_rhs_fun.H;Source/TimeIntegration/ERF_TI_fast_headers.H;Source/TimeIntegration/ERF_TI_utils.H;Source/TimeIntegration/ERF_MRI.H;Source/TimeIntegration/ERF_TI_no_substep_fun.H;Source/LandSurfaceModel/Null/ERF_NullSurf.H;Source/LandSurfaceModel/ERF_LandSurface.H;Source/LandSurfaceModel/MM5/ERF_MM5.H;Source/LandSurfaceModel/SLM/ERF_SLM.H;Source/ERF_IndexDefines.H;Source/Advection/ERF_AdvectionSrcForMom_N.H;Source/Advection/ERF_AdvectionSrcForScalars.H;Source/Advection/ERF_AdvectionSrcForMom_T.H;Source/Advection/ERF_Advection.H;Source/MultiBlock/ERF_MultiBlockContainer.H;Source/Initialization/ERF_Metgrid_utils.H;Source/Diffusion/ERF_EddyViscosity.H;Source/Diffusion/ERF_Diffusion.H;Source/Microphysics/Null/ERF_NullMoistLagrangian.H;Source/Microphysics/Null/ERF_NullMoist.H;Source/Microphysics/ERF_Microphysics.H;Source/Microphysics/ERF_LagrangianMicrophysics.H;Source/Microphysics/ERF_EulerianMicrophysics.H;Source/Microphysics/Kessler/ERF_Kessler.H;Source/Microphysics/SAM/ERF_SAM.H;Source/DataStructs/ERF_InputSpongeData.H;Source/DataStructs/ERF_TurbPertStruct.H;Source/DataStructs/ERF_SpongeStruct.H;Source/DataStructs/ERF_AdvStruct.H;Source/DataStructs/ERF_DataStruct.H;Source/DataStructs/ERF_InputSoundingData.H;Source/DataStructs/ERF_DiffStruct.H;Source/DataStructs/ERF_TurbStruct.H ERF_TerrainPoisson.H ERF_FFT_TerrainPrecond.H")
set_target_properties(
erf_srclib PROPERTIES PUBLIC_HEADER "${ERF_INCLUDES}")

Expand Down
16 changes: 14 additions & 2 deletions Docs/sphinx_doc/LinearSolvers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@
Linear Solvers
==============

Evolving the anelastic equation set requires solution of a Poisson equation in which we solve for the update to the perturbational pressure at cell centers. AMReX provides several solver options: geometric multigrid, Fast Fourier Transforms (FFTs) and preconditioned GMRES. For simulations with no terrain or grid stretching, one of the FFT options is generally the fastest solver, followed by multigrid. We note that the multigrid solver has the option to ``ignore'' a coordinate direction if the domain is only one cell wide in that direction; this allows for efficient solution of effectively 2D problems. Multigrid can also be used when the union of grids at a level is not in itself rectangular; the FFT solvers do not work in that general case.
Evolving the anelastic equation set requires solution of a Poisson equation in which we solve for the update to the perturbational pressure at cell centers.
ERF uses several solver options available through AMReX: geometric multigrid, Fast Fourier Transforms (FFTs) and preconditioned GMRES.
For simulations with no terrain or grid stretching, one of the FFT options is generally the fastest solver,
followed by multigrid. We note that the multigrid solver has the option to ``ignore'' a coordinate direction
if the domain is only one cell wide in that direction; this allows for efficient solution of effectively 2D problems.
Multigrid can also be used when the union of grids at a level is not in itself rectangular; the FFT solvers do not work in that general case.
For simulations using grid stretching in the vertical but flat terrain, we must use the hybrid FFT solver in which we perform 2D transforms only in the lateral directions and couple the solution in the vertical direction with a tridiagonal solve. In both these cases we use a 7-point stencil. To solve the Poisson equation on terrain-fitted coordinates with general terrain, we rely on the preconditioned GMRES solver since the stencil effectively has variable coefficients and requires 19 points.
For simulations using grid stretching in the vertical but flat terrain, we must use the hybrid FFT solver in which
we perform 2D transforms only in the lateral directions and couple the solution in the vertical direction with a tridiagonal solve.
In both these cases we use a 7-point stencil.
To solve the Poisson equation on terrain-fitted coordinates with general terrain,
we rely on the FFT-preconditioned GMRES solver since the stencil effectively has variable coefficients and requires 19 points.
.. note::
**Currently only doubly periodic lateral boundary conditions are supported by the hybrid FFT, and therefore by the GMRES solver. More general boundary conditions are a work in progress.**
8 changes: 3 additions & 5 deletions Docs/sphinx_doc/Plotfiles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ List of Parameters
| Parameter | Definition | Acceptable | Default |
| | | Values | |
+=============================+==================+=======================+============+
| **erf.plotfile_type** | AMReX, NETCDF | "amrex" or | "amrex" |
| | or HDF5 | "netcdf / "NetCDF" or | |
| | | "hdf5" / "HDF5" | |
| **erf.plotfile_type** | AMReX or NETCDF | "amrex" or | "amrex" |
| | | "netcdf / "NetCDF" or | |
+-----------------------------+------------------+-----------------------+------------+
| **erf.plot_file_1** | prefix for | String | “*plt_1_*” |
| | plotfiles | | |
Expand Down Expand Up @@ -104,8 +103,7 @@ Examples of Usage
means that native plot files (actually directories) starting with the prefix
“*plt_run*” will be generated every 10 level-0 time steps. If using
amrex format, that directory names will be *plt_run00000*, *plt_run00010*,
*plt_run00020*, etc. If using HDF5 format, the names will have ".h5"
appended; if using NetCDF format, the names will have ".nc" appended.
*plt_run00020*, etc. If using NetCDF format, the names will have ".nc" appended.

In addition, while the amrex plotfiles will contain data at all of the refinement
levels, NetCDF files are separated by level.
Expand Down
18 changes: 1 addition & 17 deletions Docs/sphinx_doc/building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ or if using tcsh,
+--------------------+------------------------------+------------------+-------------+
| USE_NETCDF | Whether to enable NETCDF | TRUE / FALSE | FALSE |
+--------------------+------------------------------+------------------+-------------+
| USE_HDF5 | Whether to enable HDF5 | TRUE / FALSE | FALSE |
+--------------------+------------------------------+------------------+-------------+
| USE_PARTICLES | Whether to enable particles | TRUE / FALSE | FALSE |
+--------------------+------------------------------+------------------+-------------+
| USE_WARM_NO_PRECIP | Whether to use warm moisture | TRUE / FALSE | FALSE |
Expand Down Expand Up @@ -183,8 +181,6 @@ Analogous to GNU Make, the list of cmake directives is as follows:
+---------------------------+------------------------------+------------------+-------------+
| ERF_ENABLE_NETCDF | Whether to enable NETCDF | TRUE / FALSE | FALSE |
+---------------------------+------------------------------+------------------+-------------+
| ERF_ENABLE_HDF5 | Whether to enable HDF5 | TRUE / FALSE | FALSE |
+---------------------------+------------------------------+------------------+-------------+
| ERF_ENABLE_PARTICLES | Whether to enable particles | TRUE / FALSE | FALSE |
+---------------------------+------------------------------+------------------+-------------+
| ERF_ENABLE_WARM_NO_PRECIP | Whether to use warm moisture | TRUE / FALSE | FALSE |
Expand All @@ -205,20 +201,10 @@ Analogous to GNU Make, the list of cmake directives is as follows:
Mac with CMake
~~~~~~~~~~~~~~
Tested with macOS 12.7 (Monterey) using cmake (3.27.8), open-mpi (5.0.0), and
pkg-config (0.29.2) installed with the homebrew package manager. HDF5 and
pkg-config (0.29.2) installed with the homebrew package manager.
NetCDF will be compiled from source. The instructions below should be version
agnostic.

HDF5 (tested with v1.14.3)

#. Download latest source package from `hdfgroup.org`_
#. Extract source code ``tar xzf hdf5-<version>.tar.gz``
#. Create build directory ``cd hdf5-<version> && mkdir build && cd build``
#. Configure for your system ``../configure --prefix=/usr/local --enable-parallel``
#. Build ``make -j8`` and ``sudo make install``

.. _hdfgroup.org: https://www.hdfgroup.org/download-hdf5/source-code/

NetCDF (tested with v4.9.2)

#. Download latest source package from `ucar.edu`_
Expand Down Expand Up @@ -250,7 +236,6 @@ ERF (tested with commit ``40e64ed35ebc080ad61d08aea828330dfbdbc162``)
-DERF_ENABLE_FCOMPARE:BOOL=ON \
-DERF_ENABLE_DOCUMENTATION:BOOL=OFF \
-DERF_ENABLE_NETCDF:BOOL=ON \
-DERF_ENABLE_HDF5:BOOL=ON \
-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON \
.. && make -j8

Expand All @@ -272,7 +257,6 @@ If you will be using NetCDF, we suggest you add the following four lines to you

module load cray-hdf5-parallel/1.12.2.9
module load cray-netcdf-hdf5parallel
export HDF5_DIR=/opt/cray/pe/hdf5-parallel/1.12.2.9
export NETCDF_DIR=/opt/cray/pe/netcdf-hdf5parallel/4.9.0.9

Then build ERF as, for example (specify your own path to the AMReX submodule in ``ERF/Submodules/AMReX``):
Expand Down
1 change: 0 additions & 1 deletion Exec/DryRegTests/EkmanSpiral/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ TEST = TRUE
USE_ASSERTION = TRUE

USE_NETCDF = TRUE
USE_HDF5 = TRUE

# GNU Make
Bpack := ./Make.package
Expand Down
1 change: 0 additions & 1 deletion Exec/DryRegTests/WPS_Test/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ TEST = TRUE
USE_ASSERTION = TRUE

USE_NETCDF = TRUE
#USE_HDF5 = TRUE

# GNU Make
Bpack := ./Make.package
Expand Down
1 change: 0 additions & 1 deletion Exec/LLJ/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ TEST = TRUE
USE_ASSERTION = TRUE

USE_NETCDF = TRUE
#USE_HDF5 = TRUE

# GNU Make
Bpack := ./Make.package
Expand Down
15 changes: 6 additions & 9 deletions Exec/Make.ERF
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ include $(ERF_INIT_DIR)/Make.package
ERF_DATA_DIR = $(ERF_SOURCE_DIR)/DataStructs
include $(ERF_DATA_DIR)/Make.package

ERF_SOLVERS_DIR = $(ERF_SOURCE_DIR)/LinearSolvers
include $(ERF_SOLVERS_DIR)/Make.package

ERF_UTIL_DIR = $(ERF_SOURCE_DIR)/Utils
include $(ERF_UTIL_DIR)/Make.package

Expand All @@ -57,6 +60,9 @@ INCLUDE_LOCATIONS += $(ERF_DATA_DIR)
VPATH_LOCATIONS += $(ERF_UTIL_DIR)
INCLUDE_LOCATIONS += $(ERF_UTIL_DIR)

VPATH_LOCATIONS += $(ERF_SOLVERS_DIR)
INCLUDE_LOCATIONS += $(ERF_SOLVERS_DIR)

ifeq ($(USE_MULTIBLOCK),TRUE)
VPATH_LOCATIONS += $(ERF_MULTIBLOCK_DIR)
INCLUDE_LOCATIONS += $(ERF_MULTIBLOCK_DIR)
Expand Down Expand Up @@ -119,10 +125,6 @@ ifeq ($(USE_FFT),TRUE)
AMReXdirs += FFT
endif

ifeq ($(USE_HDF5),TRUE)
AMReXdirs += Extern/HDF5
endif

AMReXpack += $(foreach dir, $(AMReXdirs), $(AMREX_HOME)/Src/$(dir)/Make.package)

include $(AMReXpack)
Expand Down Expand Up @@ -261,11 +263,6 @@ ifeq ($(USE_NETCDF), TRUE)
endif
endif

ifeq ($(USE_HDF5), TRUE)
DEFINES += -DERF_USE_HDF5
DEFINES += -DAMREX_USE_HDF5
endif

ifeq ($(USE_TERRAIN_VELOCITY), TRUE)
DEFINES += -DERF_USE_TERRAIN_VELOCITY
endif
Expand Down
Loading

0 comments on commit a8e96e8

Please sign in to comment.