Droplet Lagrangian Transient One-dimensional Reacting Code Implementation of both liquid and gas phase governing equations.
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

Makefile 2.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. #compiler =icpc
  2. #CANTERA_DIR =/opt/scientific/cantera-2.3_intel_mkl
  3. #IDA_DIR =/opt/scientific/sundials-3.1.1_intel_mkl
  4. #EXE =lagrangianCombustion2
  5. #DESTDIR =~/bin
  6. compiler =g++
  7. CANTERA_DIR =/opt/scientific/cantera-2.4_gnu_blas
  8. IDA_DIR =/opt/scientific/sundials-3.1.1_intel_mkl
  9. EXE =DropletCombustionTest7-C7_C12
  10. #DESTDIR =~/bin
  11. DESTDIR = ../example
  12. CANTERA_INCLUDES=-I$(CANTERA_DIR)/include
  13. GSL_INCLUDES =-I/usr/include/gsl
  14. GSL_LIBS =-L/usr/lib -lgsl -lgslcblas
  15. IDA_INCLUDES =-I$(IDA_DIR)/include
  16. SUN_INCLUDES =-I$(IDA_DIR)/include
  17. IDA_LIBS =-L$(IDA_DIR)/lib -lsundials_nvecopenmp \
  18. -lsundials_ida -lsundials_sunlinsollapackband
  19. CANTERA_LIBS =-L$(CANTERA_DIR)/lib -lcantera_shared
  20. RPATH =-Wl,-rpath=$(IDA_DIR)/lib,-rpath=$(CANTERA_DIR)/lib
  21. RM=rm -f
  22. compiler?=g++
  23. ifeq ($(compiler),g++)
  24. ifeq ($(MAKECMDGOALS),debug)
  25. CPPFLAGS= -Wall -g3 -ggdb
  26. else
  27. CPPFLAGS= -Wall -O3
  28. endif
  29. CPP=g++
  30. endif
  31. ifeq ($(compiler),icpc)
  32. export GXX_INCLUDE=/usr/lib/gcc/x86_64-pc-linux-gnu/7.4.1/include/c++
  33. CPPFLAGS= -Wall -O3 -gxx-name=/usr/bin/g++-7 -std=c++11
  34. CPP=icpc
  35. endif
  36. OBJS = parse.o UserData.o gridRoutines.o residue.o solution.o main.o
  37. all: $(EXE)
  38. # pull in dependency info for *existing* .o files
  39. -include $(OBJS:.o=.d)
  40. parse.o: parse.cpp parse.h parse.hpp
  41. $(CPP) $(CPPFLAGS) -c parse.cpp -o parse.o
  42. $(CPP) -MM parse.cpp > parse.d
  43. solution.o: solution.cpp solution.h
  44. $(CPP) $(CPPFLAGS) $(CANTERA_INCLUDES) $(IDA_INCLUDES) \
  45. -c solution.cpp -o solution.o
  46. $(CPP) -MM $(CANTERA_INCLUDES) $(IDA_INCLUDES) \
  47. solution.cpp > solution.d
  48. residue.o: residue.cpp residue.h UserData.h gridRoutines.h
  49. $(CPP) $(CPPFLAGS) $(CANTERA_INCLUDES) \
  50. $(IDA_INCLUDES) $(GSL_INCLUDES) -c residue.cpp \
  51. -o residue.o -fopenmp
  52. $(CPP) -MM $(CANTERA_INCLUDES) \
  53. $(IDA_INCLUDES) $(GSL_INCLUDES) \
  54. residue.cpp > residue.d
  55. gridRoutines.o: gridRoutines.cpp gridRoutines.h parse.h
  56. $(CPP) $(CPPFLAGS) -c gridRoutines.cpp -o gridRoutines.o
  57. $(CPP) -MM gridRoutines.cpp > gridRoutines.d
  58. UserData.o: UserData.cpp UserData.h gridRoutines.h parse.h
  59. $(CPP) $(CPPFLAGS) $(CANTERA_INCLUDES) \
  60. -c UserData.cpp -o UserData.o
  61. $(CPP) -MM $(CANTERA_INCLUDES) \
  62. UserData.cpp > UserData.d
  63. main.o: main.cpp UserData.h solution.h residue.h macros.h
  64. $(CPP) $(CPPFLAGS) $(CANTERA_INCLUDES) $(IDA_INCLUDES) \
  65. -c main.cpp -o main.o
  66. $(CPP) -MM $(CANTERA_INCLUDES) $(IDA_INCLUDES) \
  67. main.cpp > main.d
  68. $(EXE): $(OBJS)
  69. $(CPP) $(CPPFLAGS) $(IDA_INCLUDES) \
  70. $(CANTERA_INCLUDES) $(GSL_INCLUDES) $(RPATH) \
  71. $(OBJS) -o $(EXE) -fopenmp $(IDA_LIBS) \
  72. $(CANTERA_LIBS) $(GSL_LIBS)
  73. debug: $(EXE)
  74. .PHONY: install
  75. install:
  76. cp $(EXE) $(DESTDIR)/$(EXE)
  77. .PHONY: clean
  78. clean:
  79. rm -f $(EXE) $(OBJS) *.d