Permalink
Browse files

Merge pull request #69 from OP2/update/documentation

Update/documentation
  • Loading branch information...
2 parents 62a4247 + 7eaf025 commit 97f50f6c8ba64d55f3749e09152f30e6bb36602e @gihanmudalige gihanmudalige committed Jan 2, 2014
Showing with 1,524 additions and 14,107 deletions.
  1. +44 −0 .gitignore
  2. +2 −2 apps/c/CMakeLists.txt
  3. +64 −0 apps/c/airfoil/README.md
  4. +0 −183 apps/c/airfoil/airfoil_hdf5_simple/dp/Makefile
  5. +0 −26 apps/c/airfoil/airfoil_hdf5_simple/dp/adt_calc.h
  6. +0 −172 apps/c/airfoil/airfoil_hdf5_simple/dp/adt_calc_kernel.cpp
  7. +0 −191 apps/c/airfoil/airfoil_hdf5_simple/dp/adt_calc_kernel.cu
  8. +0 −232 apps/c/airfoil/airfoil_hdf5_simple/dp/airfoil.cpp
  9. +0 −25 apps/c/airfoil/airfoil_hdf5_simple/dp/airfoil_kernels.cpp
  10. +0 −52 apps/c/airfoil/airfoil_hdf5_simple/dp/airfoil_kernels.cu
  11. +0 −285 apps/c/airfoil/airfoil_hdf5_simple/dp/airfoil_op.cpp
  12. +0 −33 apps/c/airfoil/airfoil_hdf5_simple/dp/bres_calc.h
  13. +0 −224 apps/c/airfoil/airfoil_hdf5_simple/dp/bres_calc_kernel.cpp
  14. +0 −260 apps/c/airfoil/airfoil_hdf5_simple/dp/bres_calc_kernel.cu
  15. +0 −343 apps/c/airfoil/airfoil_hdf5_simple/dp/convert_mesh.cpp
  16. +0 −30 apps/c/airfoil/airfoil_hdf5_simple/dp/res_calc.h
  17. +0 −239 apps/c/airfoil/airfoil_hdf5_simple/dp/res_calc_kernel.cpp
  18. +0 −273 apps/c/airfoil/airfoil_hdf5_simple/dp/res_calc_kernel.cu
  19. +0 −3 apps/c/airfoil/airfoil_hdf5_simple/dp/save_soln.h
  20. +0 −94 apps/c/airfoil/airfoil_hdf5_simple/dp/save_soln_kernel.cpp
  21. +0 −134 apps/c/airfoil/airfoil_hdf5_simple/dp/save_soln_kernel.cu
  22. +0 −12 apps/c/airfoil/airfoil_hdf5_simple/dp/update.h
  23. +0 −123 apps/c/airfoil/airfoil_hdf5_simple/dp/update_kernel.cpp
  24. +0 −206 apps/c/airfoil/airfoil_hdf5_simple/dp/update_kernel.cu
  25. +0 −79 apps/c/airfoil/airfoil_hdf5_vector/CMakeLists.txt
  26. +0 −175 apps/c/airfoil/airfoil_hdf5_vector/dp/Makefile
  27. +0 −26 apps/c/airfoil/airfoil_hdf5_vector/dp/adt_calc.h
  28. +0 −176 apps/c/airfoil/airfoil_hdf5_vector/dp/adt_calc_kernel.cpp
  29. +0 −191 apps/c/airfoil/airfoil_hdf5_vector/dp/adt_calc_kernel.cu
  30. +0 −210 apps/c/airfoil/airfoil_hdf5_vector/dp/airfoil.cpp
  31. +0 −25 apps/c/airfoil/airfoil_hdf5_vector/dp/airfoil_kernels.cpp
  32. +0 −52 apps/c/airfoil/airfoil_hdf5_vector/dp/airfoil_kernels.cu
  33. +0 −250 apps/c/airfoil/airfoil_hdf5_vector/dp/airfoil_op.cpp
  34. +0 −32 apps/c/airfoil/airfoil_hdf5_vector/dp/bres_calc.h
  35. +0 −233 apps/c/airfoil/airfoil_hdf5_vector/dp/bres_calc_kernel.cpp
  36. +0 −264 apps/c/airfoil/airfoil_hdf5_vector/dp/bres_calc_kernel.cu
  37. +0 −29 apps/c/airfoil/airfoil_hdf5_vector/dp/res_calc.h
  38. +0 −259 apps/c/airfoil/airfoil_hdf5_vector/dp/res_calc_kernel.cpp
  39. +0 −290 apps/c/airfoil/airfoil_hdf5_vector/dp/res_calc_kernel.cu
  40. +0 −3 apps/c/airfoil/airfoil_hdf5_vector/dp/save_soln.h
  41. +0 −94 apps/c/airfoil/airfoil_hdf5_vector/dp/save_soln_kernel.cpp
  42. +0 −134 apps/c/airfoil/airfoil_hdf5_vector/dp/save_soln_kernel.cu
  43. +0 −12 apps/c/airfoil/airfoil_hdf5_vector/dp/update.h
  44. +0 −123 apps/c/airfoil/airfoil_hdf5_vector/dp/update_kernel.cpp
  45. +0 −206 apps/c/airfoil/airfoil_hdf5_vector/dp/update_kernel.cu
  46. +0 −71 apps/c/airfoil/airfoil_vector/CMakeLists.txt
  47. +0 −165 apps/c/airfoil/airfoil_vector/dp/Makefile
  48. +0 −26 apps/c/airfoil/airfoil_vector/dp/adt_calc.h
  49. +0 −176 apps/c/airfoil/airfoil_vector/dp/adt_calc_kernel.cpp
  50. +0 −191 apps/c/airfoil/airfoil_vector/dp/adt_calc_kernel.cu
  51. +0 −274 apps/c/airfoil/airfoil_vector/dp/airfoil.cpp
  52. +0 −25 apps/c/airfoil/airfoil_vector/dp/airfoil_kernels.cpp
  53. +0 −52 apps/c/airfoil/airfoil_vector/dp/airfoil_kernels.cu
  54. +0 −424 apps/c/airfoil/airfoil_vector/dp/airfoil_mpi.cpp
  55. +0 −25 apps/c/airfoil/airfoil_vector/dp/airfoil_mpi_kernels.cpp
  56. +0 −52 apps/c/airfoil/airfoil_vector/dp/airfoil_mpi_kernels.cu
  57. +0 −464 apps/c/airfoil/airfoil_vector/dp/airfoil_mpi_op.cpp
  58. +0 −314 apps/c/airfoil/airfoil_vector/dp/airfoil_op.cpp
  59. +0 −32 apps/c/airfoil/airfoil_vector/dp/bres_calc.h
  60. +0 −233 apps/c/airfoil/airfoil_vector/dp/bres_calc_kernel.cpp
  61. +0 −264 apps/c/airfoil/airfoil_vector/dp/bres_calc_kernel.cu
  62. +0 −29 apps/c/airfoil/airfoil_vector/dp/res_calc.h
  63. +0 −259 apps/c/airfoil/airfoil_vector/dp/res_calc_kernel.cpp
  64. +0 −290 apps/c/airfoil/airfoil_vector/dp/res_calc_kernel.cu
  65. +0 −3 apps/c/airfoil/airfoil_vector/dp/save_soln.h
  66. +0 −94 apps/c/airfoil/airfoil_vector/dp/save_soln_kernel.cpp
  67. +0 −134 apps/c/airfoil/airfoil_vector/dp/save_soln_kernel.cu
  68. +0 −12 apps/c/airfoil/airfoil_vector/dp/update.h
  69. +0 −123 apps/c/airfoil/airfoil_vector/dp/update_kernel.cpp
  70. +0 −206 apps/c/airfoil/airfoil_vector/dp/update_kernel.cu
  71. +0 −166 apps/c/airfoil/airfoil_vector/sp/Makefile
  72. +0 −26 apps/c/airfoil/airfoil_vector/sp/adt_calc.h
  73. +0 −176 apps/c/airfoil/airfoil_vector/sp/adt_calc_kernel.cpp
  74. +0 −191 apps/c/airfoil/airfoil_vector/sp/adt_calc_kernel.cu
  75. +0 −274 apps/c/airfoil/airfoil_vector/sp/airfoil.cpp
  76. +0 −25 apps/c/airfoil/airfoil_vector/sp/airfoil_kernels.cpp
  77. +0 −52 apps/c/airfoil/airfoil_vector/sp/airfoil_kernels.cu
  78. +0 −424 apps/c/airfoil/airfoil_vector/sp/airfoil_mpi.cpp
  79. +0 −25 apps/c/airfoil/airfoil_vector/sp/airfoil_mpi_kernels.cpp
  80. +0 −52 apps/c/airfoil/airfoil_vector/sp/airfoil_mpi_kernels.cu
  81. +0 −464 apps/c/airfoil/airfoil_vector/sp/airfoil_mpi_op.cpp
  82. +0 −314 apps/c/airfoil/airfoil_vector/sp/airfoil_op.cpp
  83. +0 −32 apps/c/airfoil/airfoil_vector/sp/bres_calc.h
  84. +0 −233 apps/c/airfoil/airfoil_vector/sp/bres_calc_kernel.cpp
  85. +0 −264 apps/c/airfoil/airfoil_vector/sp/bres_calc_kernel.cu
  86. +0 −29 apps/c/airfoil/airfoil_vector/sp/res_calc.h
  87. +0 −259 apps/c/airfoil/airfoil_vector/sp/res_calc_kernel.cpp
  88. +0 −290 apps/c/airfoil/airfoil_vector/sp/res_calc_kernel.cu
  89. +0 −3 apps/c/airfoil/airfoil_vector/sp/save_soln.h
  90. +0 −94 apps/c/airfoil/airfoil_vector/sp/save_soln_kernel.cpp
  91. +0 −134 apps/c/airfoil/airfoil_vector/sp/save_soln_kernel.cu
  92. +0 −12 apps/c/airfoil/airfoil_vector/sp/update.h
  93. +0 −123 apps/c/airfoil/airfoil_vector/sp/update_kernel.cpp
  94. +0 −206 apps/c/airfoil/airfoil_vector/sp/update_kernel.cu
  95. +13 −0 apps/c/airfoil/compare_results/Makefile
  96. +85 −0 apps/c/airfoil/compare_results/compare.cpp
  97. +83 −0 apps/c/airfoil/compare_results/comparebin.cpp
  98. +83 −0 doc/BIB.bib
  99. +141 −81 doc/C++_Users_Guide.tex
  100. +19 −0 doc/README
  101. +600 −0 doc/airfoil-doc.tex
  102. BIN doc/airfoil_hdf5.pdf
  103. BIN doc/airfoil_plain.pdf
  104. BIN doc/airfoil_plain_mpi.pdf
  105. +24 −0 doc/build_docs.sh
  106. +71 −77 doc/dev.tex
  107. +288 −135 doc/mpi-dev.tex
  108. +1 −0 op2/c/Makefile
  109. +6 −3 op2/c/README
View
@@ -0,0 +1,44 @@
+# Compiled Object files
+*.slo
+*.lo
+*.o
+*_cu.o
+# Compiled Dynamic libraries
+*.so
+# Compiled Static libraries
+*.lai
+*.la
+*.a
+*_seq
+*_openmp
+*_cuda
+*_mpi
+#*.txt
+#*.dat
+*_mpi
+*.h5
+*.bin
+#fortran
+*.mod
+
+#python
+*.pyc
+
+#latex
+*.log
+*.aux
+*.toc
+*.out
+*.backup
+*.blg
+*.bbl
+*~
+*.pyg.*
+
+#directories
+./op2/c/lib/
+./op2/c/build/
+./op2/c/obj/
+./op2/c/CMakeFiles/
+./op2/fortran/lib/
+./op2/fortran/obj/
View
@@ -40,8 +40,8 @@ option(OP2_BUILD_ALL_AERO "Build all aero apps" ON)
set(OP2_AIRFOIL_APPS
airfoil/airfoil_plain
airfoil/airfoil_hdf5
- airfoil/airfoil_vector
- airfoil/airfoil_hdf5_vector
+ #airfoil/airfoil_vector
+ #airfoil/airfoil_hdf5_vector
airfoil/airfoil_tempdats
)
set(OP2_JACOBI_APPS
View
@@ -0,0 +1,64 @@
+### Airfoil
+
+Airfoil is a nonlinear 2D inviscid airfoil code that uses an unstructured grid. It is a finite volume application that
+solves the 2D Euler equations using a scalar numerical dissipation. The algorithm iterates towards the steady state
+solution, in each iteration using a control volume approach – for example the rate at which the mass changes within a
+control volume is equal to the net flux of mass into the control volume across the four faces around the cell. This is
+representative of the 3D viscous flow calculations OP2 aims to eventually support for production-grade CFD applications
+(such as the Hydra CFD code at Rolls-Royce plc.). The application implements a predictor/corrector time-marching
+loop, by (1) looping over the cells of the mesh and computing the time step for each cell, (2) computing the flux over
+internal edges (3) computing the flux over boundary edges (4) updating the solution and (5) saving the old solution
+before repeating. These main stages of the application is solved in Airfoil within five parallel loops: adt_calc,
+res_calc, bres_calc, update and save_soln. Out of these, save_soln and update are direct loops while the other three are
+indirect loops.
+
+Please see airfoil-doc under the ../../doc directory for further OP2 application development details
+
+### Airfoil Application Directory Structure
+
+Airfoil has been the main development, testing and benchmarking application in OP2. As such this directory contains
+several versions of Airfoil that demonstrate the use of various OP2 features.
+
+airfoil_plain -- airfoil implemented with user I/O routines (mesh file in ASCI - see ../../apps/mesh_generators
+on how to generate the mesh)
+
+airfoil_hdf5 -- airfoil implemented with OP2 HDF5 routines (mesh file in HDF5, see ASCI to HDF5 file converter)
+
+airfoil_vector -- airfoil user kernels modified to achieve vectorization
+
+airfoil_tempdats -- airfoil use op_decl_temp, i.e. temporary dats in application
+
+compare_results -- small utility code to compare two files (txt or bin), used to compare the final result from airfoil
+
+### Testing the Results
+
+The various parallel versions of Airfoil should be compared against the single-threaded CPU version (also known as the
+reference implementation) to ascertain the correctness of the results. The p_q array holds the final result and as such
+will be the data array to compare. One way to achieve this is to use the following OP2 calls to write the data array to
+text or binary files, for example after the end of the 1000 iterations in the airfoil code.
+
+```
+op_print_dat_to_txtfile(p_q, "out_grid_seq.dat"); //ASCI
+op_print_dat_to_binfile(p_q, "out_grid_seq.bin"); //Binary
+```
+
+Then the code in compare.cpp and comparebin.cpp can be used to compare the text file or binary file with the reference
+implementation.
+
+Bitwise accuracy can be expected across systems for the double precision version to within the accuracy of machine
+precision. For the single precision version, answers should be very close. A summary print of the rms value of the
+residual is printed out by default every 100 iterations. This in double precision for the first 1000 iterations should
+be exactly:
+
+```
+100 5.02186e-04
+200 3.41746e-04
+300 2.63430e-04
+400 2.16288e-04
+500 1.84659e-04
+600 1.60866e-04
+700 1.42253e-04
+800 1.27627e-04
+900 1.15810e-04
+1000 1.06011e-04
+```
@@ -1,183 +0,0 @@
-#
-# The following environment variables should be predefined:
-#
-# CUDA_INSTALL_PATH
-# PARMETIS_INSTALL_PATH
-# PTSCOTCH_INSTALL_PATH
-# HDF5_INSTALL_PATH
-#
-# OP2_INSTALL_PATH
-# OP2_COMPILER (gnu,intel,etc)
-#
-
-#
-# set paths for header files and libraries
-#
-OP2_INC = -I$(OP2_INSTALL_PATH)/c/include
-OP2_LIB = -L$(OP2_INSTALL_PATH)/c/lib
-
-CUDA_INC = -I$(CUDA_INSTALL_PATH)/include
-CUDA_LIB = -L$(CUDA_INSTALL_PATH)/lib64
-
-
-ifeq ($(OP2_COMPILER),gnu)
- CPP = g++
- CPPFLAGS = -g -fPIC -DUNIX -Wall #-Wextra
- OMPFLAGS = -fopenmp
- MPICPP = /usr/bin/mpiCC
- MPIFLAGS = $(CCFLAGS)
-else
-ifeq ($(OP2_COMPILER),intel)
- CPP = icpc
- CCFLAGS = -O3 -vec-report -xSSE4.2 -parallel #-g -DCOMM_PERF #-DDEBUG
- CPPFLAGS = $(CCFLAGS)
- OMPFLAGS = -openmp -openmp-report2
- MPICPP = mpiCC
- MPIFLAGS = $(CPPFLAGS)
-else
-ifeq ($(OP2_COMPILER),cray)
- CPP = CC
- CCFLAGS = -O3
- CPPFLAGS = $(CCFLAGS)
- OMPFLAGS = -openmp -openmp-report2
- MPICPP = CC
- MPIFLAGS = $(CPPFLAGS)
-else
-print:
- @echo "unrecognised value for OP2_COMPILER"
-endif
-endif
-endif
-
-
-
-#
-# set flags for NVCC compilation and linking
-#
-NVCCFLAGS = -O3 -arch=sm_20 -Xptxas=-v -Dlcm=ca -use_fast_math #-g -G -O0
-VAR = #-DOP_PART_SIZE_1=160 -DOP_PART_SIZE_2=320 -DOP_PART_SIZE_3=64 #-DOP_BLOCK_SIZE_0=64 -DOP_BLOCK_SIZE_1=64 -DOP_BLOCK_SIZE_2=64 -DOP_BLOCK_SIZE_3=64 -DOP_BLOCK_SIZE_4=64
-
-#
-# partitioning software for MPI versions
-#
-
-PARMETIS_INC = -I$(PARMETIS_INSTALL_PATH) -DHAVE_PARMETIS
-PARMETIS_LIB = -L$(PARMETIS_INSTALL_PATH) -lparmetis \
- -L$(PARMETIS_INSTALL_PATH) -lmetis
-
-PTSCOTCH_INC = -I$(PTSCOTCH_INSTALL_PATH)/include -DHAVE_PTSCOTCH
-PTSCOTCH_LIB = -L$(PTSCOTCH_INSTALL_PATH)/lib/ -lptscotch \
- -L$(PTSCOTCH_INSTALL_PATH)/lib/ -lptscotcherr
-
-HDF5_INC = -I$(HDF5_INSTALL_PATH)/include
-HDF5_LIB = -L$(HDF5_INSTALL_PATH)/lib -lhdf5 -lz
-
-
-#
-# master to make all versions
-#
-
-all: clean airfoil_mpi airfoil_cuda airfoil_openmp airfoil_seq airfoil_mpi_cuda airfoil_mpi_openmp convert_mesh
-
-#
-# simple sequential version
-#
-
-airfoil_seq: airfoil.cpp save_soln.h adt_calc.h res_calc.h bres_calc.h
- $(MPICPP) $(CPPFLAGS) airfoil.cpp $(OP2_INC) $(HDF5_INC) $(OP2_LIB) -lop2_seq -lop2_hdf5 $(HDF5_LIB) -o airfoil_seq
-
-#
-# x86 version using kernel files generated by op2.m
-#
-
-airfoil_openmp: airfoil_op.cpp airfoil_kernels.cpp \
- save_soln_kernel.cpp save_soln.h \
- adt_calc_kernel.cpp adt_calc.h \
- res_calc_kernel.cpp res_calc.h \
- bres_calc_kernel.cpp bres_calc.h \
- update_kernel.cpp update.h \
- Makefile
- $(MPICPP) $(VAR) $(CPPFLAGS) $(OMPFLAGS) $(OP2_INC) $(OP2_LIB) $(HDF5_INC) \
- airfoil_op.cpp -lm airfoil_kernels.cpp -lm -lop2_openmp -lop2_hdf5 $(HDF5_LIB) -o airfoil_openmp
-
-#
-# CUDA version using kernel files generated by op2.m
-#
-
-airfoil_cuda: airfoil_op.cpp airfoil_kernels_cu.o Makefile
- $(MPICPP) $(VAR) $(CPPFLAGS) airfoil_op.cpp airfoil_kernels_cu.o \
- $(CUDA_INC) $(OP2_INC) $(HDF5_INC) \
- $(OP2_LIB) $(CUDA_LIB) -lcudart -lop2_cuda -lop2_hdf5 $(HDF5_LIB) -o airfoil_cuda
-
-airfoil_kernels_cu.o: airfoil_kernels.cu \
- save_soln_kernel.cu save_soln.h \
- adt_calc_kernel.cu adt_calc.h \
- res_calc_kernel.cu res_calc.h \
- bres_calc_kernel.cu bres_calc.h \
- update_kernel.cu update.h \
- Makefile
- nvcc $(VAR) $(INC) $(NVCCFLAGS) $(OP2_INC) $(HDF5_INC) -I /home/gihan/openmpi-intel/include \
- -c -o airfoil_kernels_cu.o airfoil_kernels.cu
-
-#
-# mpi with sequential-nodes version
-#
-
-airfoil_mpi: airfoil.cpp save_soln.h adt_calc.h res_calc.h bres_calc.h Makefile
- $(MPICPP) $(MPIFLAGS) airfoil.cpp $(OP2_INC) $(PARMETIS_INC) $(PTSCOTCH_INC) $(HDF5_INC) \
- $(OP2_LIB) -lop2_mpi $(PARMETIS_LIB) $(PTSCOTCH_LIB) $(HDF5_LIB) -o airfoil_mpi
-
-#
-# mpi openmp version using kernel files generated by op2.m
-#
-
-airfoil_mpi_openmp: airfoil_op.cpp airfoil_kernels.cpp \
- save_soln_kernel.cpp save_soln.h \
- adt_calc_kernel.cpp adt_calc.h \
- res_calc_kernel.cpp res_calc.h \
- bres_calc_kernel.cpp bres_calc.h \
- update_kernel.cpp update.h \
- Makefile
- $(MPICPP) $(VAR) $(CPPFLAGS) $(OMPFLAGS) $(OP2_INC) $(OP2_INC) $(HDF5_INC) \
- $(PARMETIS_INC) $(PTSCOTCH_INC) \
- airfoil_op.cpp -lm airfoil_kernels.cpp $(OP2_LIB) -lop2_mpi \
- $(PARMETIS_LIB) $(PTSCOTCH_LIB) $(HDF5_LIB) -o airfoil_mpi_openmp
-
-#
-# mpi with CUDA version
-#
-
-airfoil_mpi_cuda: airfoil_op.cpp airfoil_kernels_mpi_cu.o Makefile
- $(MPICPP) $(MPIFLAGS) airfoil_op.cpp -lm airfoil_kernels_mpi_cu.o \
- $(OP2_INC) $(PARMETIS_INC) $(PTSCOTCH_INC) $(HDF5_INC) \
- $(OP2_LIB) -lop2_mpi_cuda $(PARMETIS_LIB) $(PTSCOTCH_LIB) \
- $(HDF5_LIB) $(CUDA_LIB) -lcudart -o airfoil_mpi_cuda
-
-airfoil_kernels_mpi_cu.o: airfoil_kernels.cu \
- save_soln_kernel.cu save_soln.h \
- adt_calc_kernel.cu adt_calc.h \
- res_calc_kernel.cu res_calc.h \
- bres_calc_kernel.cu bres_calc.h \
- update_kernel.cu update.h \
- Makefile
- nvcc $(INC) $(NVCCFLAGS) $(OP2_INC) -I $(MPI_INSTALL_PATH)/include \
- -c -o airfoil_kernels_mpi_cu.o airfoil_kernels.cu
-
-
-#
-# convert ASCI new_gird.dat to HDF5 new_grid.h5
-#
-
-convert_mesh: convert_mesh.cpp
- $(MPICPP) $(MPIFLAGS) convert_mesh.cpp $(OP2_INC) $(PARMETIS_INC) $(PTSCOTCH_INC) $(HDF5_INC) \
- $(OP2_LIB) -lop2_mpi $(PARMETIS_LIB) $(PTSCOTCH_LIB) $(HDF5_LIB) -o convert_mesh
-
-
-
-
-#
-# cleanup
-#
-
-clean:
- rm -f airfoil_seq airfoil_openmp airfoil_cuda airfoil_mpi airfoil_mpi_openmp airfoil_mpi_cuda convert_mesh *.o
@@ -1,26 +0,0 @@
-inline void adt_calc(double *x1,double *x2,double *x3,double *x4,double *q,double *adt){
- double dx,dy, ri,u,v,c;
-
- ri = 1.0f/q[0];
- u = ri*q[1];
- v = ri*q[2];
- c = sqrt(gam*gm1*(ri*q[3]-0.5f*(u*u+v*v)));
-
- dx = x2[0] - x1[0];
- dy = x2[1] - x1[1];
- *adt = fabs(u*dy-v*dx) + c*sqrt(dx*dx+dy*dy);
-
- dx = x3[0] - x2[0];
- dy = x3[1] - x2[1];
- *adt += fabs(u*dy-v*dx) + c*sqrt(dx*dx+dy*dy);
-
- dx = x4[0] - x3[0];
- dy = x4[1] - x3[1];
- *adt += fabs(u*dy-v*dx) + c*sqrt(dx*dx+dy*dy);
-
- dx = x1[0] - x4[0];
- dy = x1[1] - x4[1];
- *adt += fabs(u*dy-v*dx) + c*sqrt(dx*dx+dy*dy);
-
- *adt = (*adt) / cfl;
-}
Oops, something went wrong.

0 comments on commit 97f50f6

Please sign in to comment.