diff --git a/eos/Makefile b/eos/Makefile new file mode 100644 index 000000000..70099b914 --- /dev/null +++ b/eos/Makefile @@ -0,0 +1,75 @@ +include ../make/defaults-module.mk + +# Build + +MODULE_NAME := eos +SRCS := public/eos_def.f90 \ + public/eos_lib.f90 \ + private/create_EXCOR7_table.f90 \ + private/create_FSCRliq8_table.f90 \ + private/eos_blend.f90 \ + private/eoscms_eval.f90 \ + private/eos_ctrls_io.f90 \ + private/eosde_eval.f90 \ + private/eosdt_eval.f90 \ + private/eosdt_load_tables.f90 \ + private/eosdt_support.f90 \ + private/eos_helm_eval.f90 \ + private/eos_initialize.f90 \ + private/eospc_eval.f90 \ + private/eospt_eval.f90 \ + private/gauss_fermi.f90 \ + private/helm_alloc.f90 \ + private/helm.f90 \ + private/helm_polynomials.f90 \ + private/ideal.f90 \ + private/ion_offset.f90 \ + private/pc_eos.f90 \ + private/pc_support.f90 \ + private/skye_coulomb.f90 \ + private/skye_coulomb_liquid.f90 \ + private/skye_coulomb_solid.f90 \ + private/skye.f90 \ + private/skye_ideal.f90 \ + private/skye_thermodynamics.f90 \ + other/other_eos.f90 +SRCS_CHECK = test/src/test_eos.f90 \ + test/src/eos_support.f90 \ + test/src/test_eos_blend.f90 \ + test/src/test_eos_support.f90 +INTERNAL_DEPENDS_ON := const math utils chem num auto_diff interp_1d interp_2d +EXTERNAL_DEPENDS_ON := +BINTYPE := static-lib +INCLUDE_DIRS := -Iprivate -Ipublic -Idefaults + +# Testing + +CHECK_RESULTS_GOLDEN := test/test_output + +# Install + +MODULES := eos_def.mod eos_lib.mod +INSTALL_INCLUDES := public/helm_def.dek +INSTALL_COMMANDS += install-free-eos install-cms install-dt install-pc + +include $(MAKE_DIR)/Makefile + +install-free-eos: + if [ ! -r ../data/eosFreeEOS_data ]; then \ + tar -xJf eosFreeEOS_data.tar.xz -C ../data; \ + fi + +install-cms: + if [ ! -r ../data/eosCMS_data ]; then \ + tar -xJf eosCMS_data.tar.xz -C ../data; \ + fi + +install-dt: + if [ ! -r ../data/eosDT_data ]; then \ + tar -xJf eosDT_data.tar.xz -C ../data; \ + xz --decompress --keep --stdout helm_table.dat.xz > ../data/eosDT_data/helm_table.dat; \ + fi + +install-pc: + mkdir -p ../data/eosPC_support_data + mkdir -p ../data/eosPC_support_data/cache diff --git a/eos/build_and_test b/eos/build_and_test deleted file mode 100755 index e02a156fe..000000000 --- a/eos/build_and_test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../utils/build_and_test diff --git a/eos/build_and_test_parallel b/eos/build_and_test_parallel deleted file mode 100755 index 2b3599335..000000000 --- a/eos/build_and_test_parallel +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../utils/build_and_test_parallel diff --git a/eos/clean b/eos/clean deleted file mode 100755 index 5ea65ce22..000000000 --- a/eos/clean +++ /dev/null @@ -1,8 +0,0 @@ -cd make; make clean - -for i in eosDT_builder eosFreeEOS_builder -do - cd ../$i - ./clean -done -cd ../test/make; make clean diff --git a/eos/export b/eos/export deleted file mode 100755 index db3250885..000000000 --- a/eos/export +++ /dev/null @@ -1,2 +0,0 @@ - -../utils/e1 diff --git a/eos/i1 b/eos/i1 deleted file mode 100755 index c3dfc15ce..000000000 --- a/eos/i1 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -../utils/i1 && \ -./i1_preprocessors diff --git a/eos/i1_preprocessors b/eos/i1_preprocessors deleted file mode 100755 index 23953c617..000000000 --- a/eos/i1_preprocessors +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -function check_okay { - if [ $? -ne 0 ] - then - echo - pwd - echo "build FAILED" - echo - exit 1 - fi -} - -function do1 { - cd $1 - pwd - mkdir -p run - cd make - make ../ceos - check_okay - cd ../.. -} - -do1 eosDT_builder - diff --git a/eos/i1p b/eos/i1p deleted file mode 100755 index 023e54764..000000000 --- a/eos/i1p +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -../utils/i1p && \ -./i1_preprocessors diff --git a/eos/install b/eos/install deleted file mode 100755 index 9026e932d..000000000 --- a/eos/install +++ /dev/null @@ -1,8 +0,0 @@ -./build_and_test -if [ $? -ne 0 ] -then - exit 1 -fi -echo "export" -./export -echo "done" \ No newline at end of file diff --git a/eos/make/makefile b/eos/make/makefile deleted file mode 100644 index 2a4718cad..000000000 --- a/eos/make/makefile +++ /dev/null @@ -1,8 +0,0 @@ -# QUIET makes the output from the compilation process much less verbose -- basically, -# show which files are being compiled with which generic compilation command. The -# goal of QUIET is to make it easier to spot warnings and/or circular dependency -# errors. - -QUIET = yes - -include makefile_base diff --git a/eos/make/makefile_base b/eos/make/makefile_base deleted file mode 100644 index 1cdb5772c..000000000 --- a/eos/make/makefile_base +++ /dev/null @@ -1,153 +0,0 @@ -# This is the makefile for the mesa equation of state library - -MESA_DIR = ../.. - -################################################################# -# -# PREAMBLE - -include $(MESA_DIR)/utils/makefile_header - -################################################################# -# -# SOURCES - -SRCS = \ - eos_def.f90 \ - eos_blend.f90 \ - create_FSCRliq8_table.f90 \ - create_EXCOR7_table.f90 \ - pc_support.f90 \ - pc_eos.f90 \ - ion_offset.f90 \ - helm_polynomials.f90 \ - ideal.f90 \ - skye_thermodynamics.f90 \ - skye_ideal.f90 \ - skye_coulomb_liquid.f90 \ - skye_coulomb_solid.f90 \ - skye_coulomb.f90 \ - skye.f90 \ - helm_alloc.f90 \ - helm.f90 \ - gauss_fermi.f90 \ - eosdt_load_tables.f90 \ - eoscms_eval.f90 \ - eospc_eval.f90 \ - eosdt_support.f90 \ - eos_helm_eval.f90 \ - eosdt_eval.f90 \ - eospt_eval.f90 \ - eosde_eval.f90 \ - eos_ctrls_io.f90 \ - eos_initialize.f90 \ - eos_lib.f90 \ - other_eos.f90 - -################################################################# -# -# LIBRARIES - -ifeq ($(USE_SHARED), YES) - LIBS_OTHER = chem $(LIBS_MESA_NUMERICS) - DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER)) - LOAD_OTHER = -L$(MESA_LIB_DIR) -lchem $(LOAD_MESA_NUMERICS) -endif - -################################################################# -# -# TARGETS - -LIB = libeos.$(LIB_SUFFIX) - -OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS))) - -$(LIB) : $(OBJS) $(DEPS_OTHER) -ifneq ($(QUIET),) - @echo LIB_TOOL $(LIB) - @$(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER) -else - $(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER) -endif - -clean: - -@rm -f *.o *.mod *genmod.f90 *.a .depend *.so *.smod - -install: - @$(CP_IF_NEWER) eos_def.mod $(MESA_DIR)/include - @$(CP_IF_NEWER) eos_lib.mod $(MESA_DIR)/include - @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib - -nodeps : $(.DEFAULT_GOAL) - -################################################################# -# -# COMPILATION RULES - -MOD_DEFAULTS_DIR = $(MODULE_DIR)/defaults -INCLUDE_DEFAULTS = -I$(MOD_DEFAULTS_DIR) - -MOD_OTHER_DIR = $(MODULE_DIR)/other -INCLUDE_OTHER = -I$(MOD_OTHER_DIR) - -MOD_INCLUDES = $(INCLUDE_DEFAULTS) $(INCLUDE_OTHER) - -COMPILE = $(COMPILE_TO_DEPLOY) $(FCfree) $(MOD_INCLUDES) -#COMPILE = $(COMPILE_TO_TEST) $(FCfree) $(MOD_INCLUDES) - -COMPILE_FIXED = $(COMPILE_TO_DEPLOY) $(FCfixed) $(MOD_INCLUDES) -#COMPILE_FIXED = $(COMPILE_TO_TEST) $(FCfixed) $(MOD_INCLUDES) - -COMPILE_FIXED_LEGACY = $(filter-out -std=f2008, $(COMPILE_FIXED)) - -COMPILE_CMD = $(COMPILE) - -%.o : %.mod - -%.o : %.f -ifneq ($(QUIET),) - @echo COMPILE_CMD $< - @$(COMPILE_CMD) $< -else - $(COMPILE_CMD) $< -endif - -%.o : %.f90 -ifneq ($(QUIET),) - @echo COMPILE_CMD $< - @$(COMPILE_CMD) $< -else - $(COMPILE_CMD) $< -endif - -%.mod : %.o - @true - -################################################################# -# -# DEPENDENCIES - -SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR):$(MOD_OTHER_DIR) - -vpath %.f $(SRC_PATH) -vpath %.f90 $(SRC_PATH) -vpath %.dek $(SRC_PATH) -vpath %.defaults $(SRC_PATH) - -vpath %.mod $(MESA_DIR)/include - -NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS))) - -ifeq ($(NODEPS),) - - .depend : - ifneq ($(QUIET),) - @echo MAKEDEPF90 - @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend - else - $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend - endif - - -include .depend - -endif diff --git a/eos/mk b/eos/mk deleted file mode 100755 index f2ac277d6..000000000 --- a/eos/mk +++ /dev/null @@ -1 +0,0 @@ -cd make; make \ No newline at end of file diff --git a/eos/test/ck b/eos/test/ck deleted file mode 100755 index c429ea480..000000000 --- a/eos/test/ck +++ /dev/null @@ -1 +0,0 @@ -./../../utils/test/ck \ No newline at end of file diff --git a/eos/test/clean b/eos/test/clean deleted file mode 100755 index fe8d63c0c..000000000 --- a/eos/test/clean +++ /dev/null @@ -1,2 +0,0 @@ -cd make -make clean diff --git a/eos/test/cleanup b/eos/test/cleanup deleted file mode 100755 index e383ea3f7..000000000 --- a/eos/test/cleanup +++ /dev/null @@ -1,4 +0,0 @@ -cd make -make clean -cd ../../make -make clean diff --git a/eos/test/export b/eos/test/export deleted file mode 100755 index 0f6ebc965..000000000 --- a/eos/test/export +++ /dev/null @@ -1,2 +0,0 @@ -cd .. -./export diff --git a/eos/test/make/makefile b/eos/test/make/makefile deleted file mode 100644 index 2a4718cad..000000000 --- a/eos/test/make/makefile +++ /dev/null @@ -1,8 +0,0 @@ -# QUIET makes the output from the compilation process much less verbose -- basically, -# show which files are being compiled with which generic compilation command. The -# goal of QUIET is to make it easier to spot warnings and/or circular dependency -# errors. - -QUIET = yes - -include makefile_base diff --git a/eos/test/make/makefile_base b/eos/test/make/makefile_base deleted file mode 100644 index 5254beefe..000000000 --- a/eos/test/make/makefile_base +++ /dev/null @@ -1,110 +0,0 @@ -# This is the makefile for testing the mesa eos library - -MESA_DIR = ../../.. - -################################################################# -# -# PREAMBLE - -include $(MESA_DIR)/utils/makefile_header - -################################################################# -# -# SOURCES - -TEST_SRCS = eos_support.f90 \ - test_eos_blend.f90 test_eos_support.f90 test_eos.f90 - -TESTQ_SRCS = eos_support.f90 \ - test_eos_blend.f90 test_eos_support.f90 test_eos_quietly.f90 - -SAMPLE_SRCS = sample_eos.f90 - -################################################################# -# -# LIBRARIES - -LIBS_LOCAL = eos -DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL)) -LOAD_LOCAL = -L$(LOCAL_LIB_DIR) $(addprefix -l,$(LIBS_LOCAL)) - -LIBS_OTHER = chem $(LIBS_MESA_NUMERICS) -DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER)) -LOAD_OTHER = -L$(MESA_LIB_DIR) -lchem $(LOAD_MESA_NUMERICS) - -################################################################# -# -# TARGETS - -TEST = $(TEST_DIR)/tester -TESTQ = $(TEST_DIR)/test_quietly -SAMPLE = $(TEST_DIR)/sample - -TEST_OBJS = $(patsubst %.f90,%.o,$(TEST_SRCS)) -TESTQ_OBJS = $(patsubst %.f90,%.o,$(TESTQ_SRCS)) -SAMPLE_OBJS = $(patsubst %.f90,%.o,$(SAMPLE_SRCS)) - -all : $(TEST) $(TESTQ) $(SAMPLE) - -$(TEST) : $(TEST_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER) -$(TESTQ) : $(TESTQ_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER) -$(SAMPLE) : $(SAMPLE_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER) - -$(TEST) : OBJS = $(TEST_OBJS) -$(TESTQ) : OBJS = $(TESTQ_OBJS) -$(SAMPLE) : OBJS = $(SAMPLE_OBJS) - -$(TEST_DIR)/% : -ifneq ($(QUIET),) - @echo LOADER $@ - @$(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS) -else - $(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS) -endif - -clean: - -@rm -f *.o *.mod *.smod .depend $(TEST) $(TESTQ) $(SAMPLE) - -nodeps : $(.DEFAULT_GOAL) - -################################################################# -# -# COMPILATION RULES - -COMPILE = $(FCbasic) $(FCopenmp) $(FCopt) $(FCfree) - -%.o: %.f90 -ifneq ($(QUIET),) - @echo TEST_COMPILE $< - @$(TEST_COMPILE) $(COMPILE) $< -else - $(TEST_COMPILE) $(COMPILE) $< -endif - -################################################################# -# -# DEPENDENCIES - -# Search paths for prerequisites - -SRC_PATH = $(TEST_SRC_DIR) - -vpath %.f90 $(SRC_PATH) - -vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include - -NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS))) - -ifeq ($(NODEPS),) - - .depend : - ifneq ($(QUIET),) - @echo MAKEDEPF90 - @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend - else - $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend - endif - - -include .depend - -endif diff --git a/eos/test/mk b/eos/test/mk deleted file mode 100755 index 78c91b0e9..000000000 --- a/eos/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -function check_okay { - if [ $? -ne 0 ] - then - echo - echo "FAILED" - echo - exit 1 - fi -} - -cd ../make; make; check_okay -cd ../test/make; make diff --git a/eos/test/mkx b/eos/test/mkx deleted file mode 100755 index 25826f7f3..000000000 --- a/eos/test/mkx +++ /dev/null @@ -1 +0,0 @@ -./mk; ./export diff --git a/eos/test/rn b/eos/test/rn deleted file mode 100755 index e5d7960ab..000000000 --- a/eos/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./tester diff --git a/install b/install index 45d945ab7..60737e7e2 100755 --- a/install +++ b/install @@ -343,18 +343,6 @@ then fi do_one_parallel colors -# get rid of obsolete eos_data directory -rm -rf data/eos_data - -# check that the eos data directories exist -if [ ! -r data/eosDT_data ] -then - do_input_data eos -fi - -# now have installed eos data, so can install the eos module -do_one_parallel eos - if [ ! -r data/kap_data ] then do_input_data kap diff --git a/make/subdirs.mk b/make/subdirs.mk index fefe7f9d7..31a3c7eb4 100644 --- a/make/subdirs.mk +++ b/make/subdirs.mk @@ -1 +1 @@ -SUBDIRS := const utils math mtx auto_diff num interp_1d interp_2d chem +SUBDIRS := const utils math mtx auto_diff num interp_1d interp_2d chem eos diff --git a/touch b/touch index 59a20f1b6..a4598cdf3 100755 --- a/touch +++ b/touch @@ -24,7 +24,6 @@ do_one astero do_one atm do_one binary do_one colors -do_one eos do_one gyre do_one forum do_one ionization