diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 0349632a..b300b81a 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -28,8 +28,10 @@ jobs: - name: Run unit tests run: | cd build + ./unit_tests + OMP_NUM_THREADS=1 ./unit_tests -r junit > unit_tests_report.xml - name: Code coverage run: | - cpp-coveralls -r . -b "build/" -i "src/" -i "include/" --exclude "ext/" --gcov-options "\-lp" --verbose + cpp-coveralls -r . -b "build/" -i "src/" -i "include/" --exclude "ext/" --gcov-options "\-lp" --verbose \ No newline at end of file diff --git a/.gitignore b/.gitignore index 94b16e77..fe6396bb 100755 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ ### Project specific ### +*.con *.cfg bin/* *.su2 diff --git a/CMakeLists.txt b/CMakeLists.txt index 715aac2f..9cae01d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,7 @@ option( BUILD_DOC "builds Doxygen and Sphinx documentation" OFF ) option( BUILD_UNITY "enables unity build for faster compile times" ON ) option( BUILD_CODE_COV "enables compiler option required for code coverage analysis" OFF ) option( BUILD_ML "enables build with tensorflow backend access" OFF ) +option( BUILD_MPI "enables build with MPI access" OFF ) ################################################# @@ -31,8 +32,10 @@ set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) find_package( OpenMP REQUIRED ) -find_package( MPI REQUIRED ) -include_directories( ${MPI_INCLUDE_PATH} ) +if( BUILD_MPI ) + find_package( MPI REQUIRED ) + include_directories( ${MPI_INCLUDE_PATH} ) +endif() find_package( LAPACK REQUIRED ) include_directories( ${LAPACK_INCLUDE_DIR} ) @@ -41,9 +44,6 @@ find_package( BLAS ) find_package( VTK COMPONENTS vtkIOGeometry vtkFiltersCore REQUIRED ) -find_package( Python3 COMPONENTS Interpreter Development NumPy REQUIRED ) -include_directories( ${Python3_INCLUDE_DIRS} ${Python3_NumPy_INCLUDE_DIRS} ) - add_compile_definitions( KITRT_PYTHON_PATH="${CMAKE_SOURCE_DIR}/python" ) add_compile_definitions( BLAZE_USE_SHARED_MEMORY_PARALLELIZATION=0 ) message( STATUS "Blaze: Shared memory parallelization disabled" ) @@ -61,7 +61,11 @@ include_directories( ${CMAKE_SOURCE_DIR}/ext/blaze ) include_directories( ${CMAKE_SOURCE_DIR}/ext/cpptoml/include ) include_directories( ${CMAKE_SOURCE_DIR}/ext/spdlog/include ) -set( CORE_LIBRARIES ${Python3_LIBRARIES} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ${MPI_LIBRARIES} ${VTK_LIBRARIES} OpenMP::OpenMP_CXX -lstdc++fs ) +if( BUILD_MPI ) + set( CORE_LIBRARIES ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ${MPI_LIBRARIES} ${VTK_LIBRARIES} OpenMP::OpenMP_CXX -lstdc++fs ) +else() + set( CORE_LIBRARIES ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ${VTK_LIBRARIES} OpenMP::OpenMP_CXX -lstdc++fs ) +endif() ################################################# @@ -106,30 +110,6 @@ target_compile_options( ${CMAKE_PROJECT_NAME} PUBLIC "$<$ target_compile_options( ${CMAKE_PROJECT_NAME} PUBLIC "$<$:${KITRT_RELEASE_OPTIONS}>" ) ################################################# - -### BUILD ML ################################### -# Standalone ML Build (legacy) -#if( BUILD_ML ) -# # Tensorflow -# include_directories( ${CMAKE_SOURCE_DIR}/ext/cppflow/include/ ) -# find_library(TENSORFLOW_LIB tensorflow) -# add_executable( ${CMAKE_PROJECT_NAME} ${SRCS} ${EXT_SRCS} ) -# -# # Specify Path for tensorflow models -# add_compile_definitions( TENSORFLOW_MODEL_PATH="${CMAKE_SOURCE_DIR}/tfmodels" ) -# -# target_compile_definitions( ${CMAKE_PROJECT_NAME} PUBLIC BUILD_ML ) -# target_link_libraries( ${CMAKE_PROJECT_NAME} ${CORE_LIBRARIES} ${TENSORFLOW_LIB}) -# set_target_properties( ${CMAKE_PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin" ) -# -# target_compile_options( ${CMAKE_PROJECT_NAME} PUBLIC "$<$:${KITRT_DEBUG_OPTIONS}>" ) -# target_compile_options( ${CMAKE_PROJECT_NAME} PUBLIC "$<$:${KITRT_RELWITHDEBINFO_OPTIONS}>" ) -# target_compile_options( ${CMAKE_PROJECT_NAME} PUBLIC "$<$:${KITRT_RELEASE_OPTIONS}>" ) -# -#endif() -################################################# - - ### BUILD UNIT TESTS ############################ if( BUILD_TESTING ) include( CTest ) diff --git a/LICENSE b/LICENSE index 1183cd3a..7c930e27 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,8 @@ -Copyright 2020 Karlsruhe Institute of Technology - Steinbuch Centre for Computing +Copyright 2024 Steffen Schotthoefer, Pia Stammer, Jonas Kusch. -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including the rights to use, copy, modify, merge, publish, the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +It is prohibited to sell copies of the software or use the software in any commerical context. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/examples/cascade_lattice.py b/examples/cascade_lattice.py new file mode 100644 index 00000000..8e13d6d4 --- /dev/null +++ b/examples/cascade_lattice.py @@ -0,0 +1,123 @@ +import os +import subprocess + + +def main(): + # Example usage: + quad_order = 19 + cl_fine_vals = [0.02, 0.02, 0.01, 0.005] + cl_coarse = 0.05 + cl_boundary = 0.2 + length = 0.05 + + for i in range(len(cl_fine_vals)): + cl_fine = cl_fine_vals[i] + modify_and_run_geo_file( + cl_fine=cl_fine, cl_coarse=cl_coarse, cl_boundary=cl_boundary, length=length + ) + modify_quad_order(quad_order=quad_order) + new_log_file, log_dir = modify_and_save_log_file( + quad_order, cl_fine, cl_coarse, cl_boundary, length + ) + print(f"New log file name: {new_log_file}") + print(f"Log directory: {log_dir}") + run_cpp_program(config_file_path="lattice.cfg") + + return 0 + + +def modify_and_run_geo_file(cl_fine, cl_coarse, cl_boundary, length): + # Define the file path + geo_file_path = "meshes/geo_files/lattice_refined.geo" + + # Read the contents of the .geo file + with open(geo_file_path, "r") as file: + lines = file.readlines() + + # Modify the variables in the first 4 lines + lines[0] = f"cl_fine = {cl_fine};\n" + lines[1] = f"cl_coarse = {cl_coarse};\n" + lines[2] = f"cl_boundary = {cl_boundary};\n" + lines[3] = f"length = {length};\n" + + # Save the modified .geo file + with open(geo_file_path, "w") as file: + file.writelines(lines) + + # Execute the command + command = f"gmsh {geo_file_path} -2 -format su2 -save_all" + os.system(command) + + +def modify_quad_order(quad_order): + # Define the file path + cfg_file_path = "lattice.cfg" + + # Read the contents of the lattice.cfg file + with open(cfg_file_path, "r") as file: + lines = file.readlines() + + # Find the line containing "QUAD_ORDER" and modify it + for i, line in enumerate(lines): + if "QUAD_ORDER" in line: + lines[i] = f"QUAD_ORDER = {quad_order}\n" + break + + # Save the modified lattice.cfg file + with open(cfg_file_path, "w") as file: + file.writelines(lines) + + +def modify_and_save_log_file(quad_order, cl_fine, cl_coarse, cl_boundary, length): + # Define the file path + cfg_file_path = "lattice.cfg" + + # Read the contents of the lattice.cfg file + with open(cfg_file_path, "r") as file: + lines = file.readlines() + + # Identify the lines containing "LOG_DIR" and "LOG_FILE" + log_dir_line = next(line for line in lines if "LOG_DIR" in line) + log_file_line = next(line for line in lines if "LOG_FILE" in line) + vtk_file_line = next(line for line in lines if "OUTPUT_FILE" in line) + + print(log_file_line) + # Extract the current log directory and file name + current_log_dir = log_dir_line.split("=")[1].strip() + current_log_file = log_file_line.split("=")[1].strip() + + # Construct the new log file name + new_log_file = f"lattice_quad_order_{quad_order}_cl_fine_{cl_fine}_cl_coarse_{cl_coarse}_cl_boundary_{cl_boundary}_length_{length}" + new_vtk_file = f"lattice_quad_order_{quad_order}_cl_fine_{cl_fine}_cl_coarse_{cl_coarse}_cl_boundary_{cl_boundary}_length_{length}" + + # Update the log file name in the lines list + log_file_line_new = f"LOG_FILE = {new_log_file}\n" + vtk_file_line_new = f"OUTPUT_FILE = {new_vtk_file}\n" + lines[lines.index(log_file_line)] = log_file_line_new + lines[lines.index(vtk_file_line)] = vtk_file_line_new + + # Save the modified lattice.cfg file + with open(cfg_file_path, "w") as file: + file.writelines(lines) + + # Return the new log file name and log directory + return new_log_file, current_log_dir + + +def run_cpp_program(config_file_path): + # Define the path to the C++ program + cpp_program_path = "../build/KiT-RT" + + # Construct the command to run the C++ program with the specified configuration file + command = [cpp_program_path, config_file_path] + + try: + # Run the C++ program + subprocess.run(command, check=True) + print("C++ program executed successfully.") + except subprocess.CalledProcessError as e: + print(f"Error running C++ program: {e}") + + +if __name__ == "__main__": + main() diff --git a/examples/configs/lattice_SN.cfg b/examples/configs/lattice_SN.cfg new file mode 100644 index 00000000..79a8dff6 --- /dev/null +++ b/examples/configs/lattice_SN.cfg @@ -0,0 +1,48 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Lattice Benchmarking File SN % +% Author % +% Date 08.01.2024 % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% +% ----IO specification ---- +% +OUTPUT_DIR = result_lattice +OUTPUT_FILE = lattice_quad_order_19_grid_20 +LOG_DIR = result_lattice/logs +LOG_FILE = lattice_quad_order_19_grid_20 +MESH_FILE = meshes/testcases/lattice/lattice_rectangular.su2 +% +% --- Problem definition --- +% +PROBLEM = LATTICE +TIME_FINAL = 2.8 +SPATIAL_DIM = 3 +SOURCE_MAGNITUDE = 1.0 +% +% ---- Solver specifications ---- +% +% Solver type +SOLVER = SN_SOLVER +% CFL number +CFL_NUMBER = 0.95 +% Reconstruction order +RECONS_ORDER = 2 +% +% ---- Boundary Conditions ---- +% +BC_NEUMANN = ( void ) +% +% ----- Quadrature Specification --- +% +QUAD_TYPE = LEBEDEV +QUAD_ORDER = 19 +% +% ----- Output ---- +% +VOLUME_OUTPUT = (MINIMAL) +VOLUME_OUTPUT_FREQUENCY = 0 +SCREEN_OUTPUT = (ITER, MASS,RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT, CUR_OUTFLOW, TOTAL_OUTFLOW, MAX_OUTFLOW, CUR_PARTICLE_ABSORPTION, TOTAL_PARTICLE_ABSORPTION, MAX_PARTICLE_ABSORPTION ) +SCREEN_OUTPUT_FREQUENCY = 10 +HISTORY_OUTPUT = (ITER, MASS, RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT, TOTAL_OUTFLOW, MAX_OUTFLOW, CUR_PARTICLE_ABSORPTION, TOTAL_PARTICLE_ABSORPTION, MAX_PARTICLE_ABSORPTION) +HISTORY_OUTPUT_FREQUENCY = 1 diff --git a/examples/meshes/geo_files/lattice_rectangular.geo b/examples/meshes/geo_files/lattice_rectangular.geo new file mode 100644 index 00000000..45a22210 --- /dev/null +++ b/examples/meshes/geo_files/lattice_rectangular.geo @@ -0,0 +1,1193 @@ +cl_fine = 0.1; +n_recombine = 80; +n_prog = 1.1; +Point(1) = {-3.5, -3.5, 0, cl_fine}; +Point(2) = {3.5, -3.5, 0, cl_fine}; +Point(3) = {-3.5, 3.5, 0, cl_fine}; +Point(4) = {3.5, 3.5, 0, cl_fine}; + +// Inner grid +Point(5) = { -2.5, -2.5, 0, cl_fine }; +Point(6) = { -2.5, -2.0, 0, cl_fine }; +Point(7) = { -2.5, -1.5, 0, cl_fine }; +Point(8) = { -2.5, -1.0, 0, cl_fine }; +Point(9) = { -2.5, -0.5, 0, cl_fine }; +Point(10) = { -2.5, 0.0, 0, cl_fine }; +Point(11) = { -2.5, 0.5, 0, cl_fine }; +Point(12) = { -2.5, 1.0, 0, cl_fine }; +Point(13) = { -2.5, 1.5, 0, cl_fine }; +Point(14) = { -2.5, 2.0, 0, cl_fine }; +Point(15) = { -2.5, 2.5, 0, cl_fine }; +Point(16) = { -2.0, -2.5, 0, cl_fine }; +Point(17) = { -2.0, -2.0, 0, cl_fine }; +Point(18) = { -2.0, -1.5, 0, cl_fine }; +Point(19) = { -2.0, -1.0, 0, cl_fine }; +Point(20) = { -2.0, -0.5, 0, cl_fine }; +Point(21) = { -2.0, 0.0, 0, cl_fine }; +Point(22) = { -2.0, 0.5, 0, cl_fine }; +Point(23) = { -2.0, 1.0, 0, cl_fine }; +Point(24) = { -2.0, 1.5, 0, cl_fine }; +Point(25) = { -2.0, 2.0, 0, cl_fine }; +Point(26) = { -2.0, 2.5, 0, cl_fine }; +Point(27) = { -1.5, -2.5, 0, cl_fine }; +Point(28) = { -1.5, -2.0, 0, cl_fine }; +Point(29) = { -1.5, -1.5, 0, cl_fine }; +Point(30) = { -1.5, -1.0, 0, cl_fine }; +Point(31) = { -1.5, -0.5, 0, cl_fine }; +Point(32) = { -1.5, 0.0, 0, cl_fine }; +Point(33) = { -1.5, 0.5, 0, cl_fine }; +Point(34) = { -1.5, 1.0, 0, cl_fine }; +Point(35) = { -1.5, 1.5, 0, cl_fine }; +Point(36) = { -1.5, 2.0, 0, cl_fine }; +Point(37) = { -1.5, 2.5, 0, cl_fine }; +Point(38) = { -1.0, -2.5, 0, cl_fine }; +Point(39) = { -1.0, -2.0, 0, cl_fine }; +Point(40) = { -1.0, -1.5, 0, cl_fine }; +Point(41) = { -1.0, -1.0, 0, cl_fine }; +Point(42) = { -1.0, -0.5, 0, cl_fine }; +Point(43) = { -1.0, 0.0, 0, cl_fine }; +Point(44) = { -1.0, 0.5, 0, cl_fine }; +Point(45) = { -1.0, 1.0, 0, cl_fine }; +Point(46) = { -1.0, 1.5, 0, cl_fine }; +Point(47) = { -1.0, 2.0, 0, cl_fine }; +Point(48) = { -1.0, 2.5, 0, cl_fine }; +Point(49) = { -0.5, -2.5, 0, cl_fine }; +Point(50) = { -0.5, -2.0, 0, cl_fine }; +Point(51) = { -0.5, -1.5, 0, cl_fine }; +Point(52) = { -0.5, -1.0, 0, cl_fine }; +Point(53) = { -0.5, -0.5, 0, cl_fine }; +Point(54) = { -0.5, 0.0, 0, cl_fine }; +Point(55) = { -0.5, 0.5, 0, cl_fine }; +Point(56) = { -0.5, 1.0, 0, cl_fine }; +Point(57) = { -0.5, 1.5, 0, cl_fine }; +Point(58) = { -0.5, 2.0, 0, cl_fine }; +Point(59) = { -0.5, 2.5, 0, cl_fine }; +Point(60) = { 0.0, -2.5, 0, cl_fine }; +Point(61) = { 0.0, -2.0, 0, cl_fine }; +Point(62) = { 0.0, -1.5, 0, cl_fine }; +Point(63) = { 0.0, -1.0, 0, cl_fine }; +Point(64) = { 0.0, -0.5, 0, cl_fine }; +Point(65) = { 0.0, 0.0, 0, cl_fine }; +Point(66) = { 0.0, 0.5, 0, cl_fine }; +Point(67) = { 0.0, 1.0, 0, cl_fine }; +Point(68) = { 0.0, 1.5, 0, cl_fine }; +Point(69) = { 0.0, 2.0, 0, cl_fine }; +Point(70) = { 0.0, 2.5, 0, cl_fine }; +Point(71) = { 0.5, -2.5, 0, cl_fine }; +Point(72) = { 0.5, -2.0, 0, cl_fine }; +Point(73) = { 0.5, -1.5, 0, cl_fine }; +Point(74) = { 0.5, -1.0, 0, cl_fine }; +Point(75) = { 0.5, -0.5, 0, cl_fine }; +Point(76) = { 0.5, 0.0, 0, cl_fine }; +Point(77) = { 0.5, 0.5, 0, cl_fine }; +Point(78) = { 0.5, 1.0, 0, cl_fine }; +Point(79) = { 0.5, 1.5, 0, cl_fine }; +Point(80) = { 0.5, 2.0, 0, cl_fine }; +Point(81) = { 0.5, 2.5, 0, cl_fine }; +Point(82) = { 1.0, -2.5, 0, cl_fine }; +Point(83) = { 1.0, -2.0, 0, cl_fine }; +Point(84) = { 1.0, -1.5, 0, cl_fine }; +Point(85) = { 1.0, -1.0, 0, cl_fine }; +Point(86) = { 1.0, -0.5, 0, cl_fine }; +Point(87) = { 1.0, 0.0, 0, cl_fine }; +Point(88) = { 1.0, 0.5, 0, cl_fine }; +Point(89) = { 1.0, 1.0, 0, cl_fine }; +Point(90) = { 1.0, 1.5, 0, cl_fine }; +Point(91) = { 1.0, 2.0, 0, cl_fine }; +Point(92) = { 1.0, 2.5, 0, cl_fine }; +Point(93) = { 1.5, -2.5, 0, cl_fine }; +Point(94) = { 1.5, -2.0, 0, cl_fine }; +Point(95) = { 1.5, -1.5, 0, cl_fine }; +Point(96) = { 1.5, -1.0, 0, cl_fine }; +Point(97) = { 1.5, -0.5, 0, cl_fine }; +Point(98) = { 1.5, 0.0, 0, cl_fine }; +Point(99) = { 1.5, 0.5, 0, cl_fine }; +Point(100) = { 1.5, 1.0, 0, cl_fine }; +Point(101) = { 1.5, 1.5, 0, cl_fine }; +Point(102) = { 1.5, 2.0, 0, cl_fine }; +Point(103) = { 1.5, 2.5, 0, cl_fine }; +Point(104) = { 2.0, -2.5, 0, cl_fine }; +Point(105) = { 2.0, -2.0, 0, cl_fine }; +Point(106) = { 2.0, -1.5, 0, cl_fine }; +Point(107) = { 2.0, -1.0, 0, cl_fine }; +Point(108) = { 2.0, -0.5, 0, cl_fine }; +Point(109) = { 2.0, 0.0, 0, cl_fine }; +Point(110) = { 2.0, 0.5, 0, cl_fine }; +Point(111) = { 2.0, 1.0, 0, cl_fine }; +Point(112) = { 2.0, 1.5, 0, cl_fine }; +Point(113) = { 2.0, 2.0, 0, cl_fine }; +Point(114) = { 2.0, 2.5, 0, cl_fine }; +Point(115) = { 2.5, -2.5, 0, cl_fine }; +Point(116) = { 2.5, -2.0, 0, cl_fine }; +Point(117) = { 2.5, -1.5, 0, cl_fine }; +Point(118) = { 2.5, -1.0, 0, cl_fine }; +Point(119) = { 2.5, -0.5, 0, cl_fine }; +Point(120) = { 2.5, 0.0, 0, cl_fine }; +Point(121) = { 2.5, 0.5, 0, cl_fine }; +Point(122) = { 2.5, 1.0, 0, cl_fine }; +Point(123) = { 2.5, 1.5, 0, cl_fine }; +Point(124) = { 2.5, 2.0, 0, cl_fine }; +Point(125) = { 2.5, 2.5, 0, cl_fine }; + +// helper boundary points +Point(126) = { -2.5, -3.5, 0, cl_fine }; +Point(127) = { -2.0, -3.5, 0, cl_fine }; +Point(128) = { -1.5, -3.5, 0, cl_fine }; +Point(129) = { -1.0, -3.5, 0, cl_fine }; +Point(130) = { -0.5, -3.5, 0, cl_fine }; +Point(131) = { 0.0, -3.5, 0, cl_fine }; +Point(132) = { 0.5, -3.5, 0, cl_fine }; +Point(133) = { 1.0, -3.5, 0, cl_fine }; +Point(134) = { 1.5, -3.5, 0, cl_fine }; +Point(135) = { 2.0, -3.5, 0, cl_fine }; +Point(136) = { 2.5, -3.5, 0, cl_fine }; +Point(137) = { -2.5, 3.5, 0, cl_fine }; +Point(138) = { -2.0, 3.5, 0, cl_fine }; +Point(139) = { -1.5, 3.5, 0, cl_fine }; +Point(140) = { -1.0, 3.5, 0, cl_fine }; +Point(141) = { -0.5, 3.5, 0, cl_fine }; +Point(142) = { 0.0, 3.5, 0, cl_fine }; +Point(143) = { 0.5, 3.5, 0, cl_fine }; +Point(144) = { 1.0, 3.5, 0, cl_fine }; +Point(145) = { 1.5, 3.5, 0, cl_fine }; +Point(146) = { 2.0, 3.5, 0, cl_fine }; +Point(147) = { 2.5, 3.5, 0, cl_fine }; +Point(148) = { -3.5, -2.5, 0, cl_fine }; +Point(149) = { -3.5, -2.0, 0, cl_fine }; +Point(150) = { -3.5, -1.5, 0, cl_fine }; +Point(151) = { -3.5, -1.0, 0, cl_fine }; +Point(152) = { -3.5, -0.5, 0, cl_fine }; +Point(153) = { -3.5, 0.0, 0, cl_fine }; +Point(154) = { -3.5, 0.5, 0, cl_fine }; +Point(155) = { -3.5, 1.0, 0, cl_fine }; +Point(156) = { -3.5, 1.5, 0, cl_fine }; +Point(157) = { -3.5, 2.0, 0, cl_fine }; +Point(158) = { -3.5, 2.5, 0, cl_fine }; +Point(159) = { 3.5, -2.5, 0, cl_fine }; +Point(160) = { 3.5, -2.0, 0, cl_fine }; +Point(161) = { 3.5, -1.5, 0, cl_fine }; +Point(162) = { 3.5, -1.0, 0, cl_fine }; +Point(163) = { 3.5, -0.5, 0, cl_fine }; +Point(164) = { 3.5, 0.0, 0, cl_fine }; +Point(165) = { 3.5, 0.5, 0, cl_fine }; +Point(166) = { 3.5, 1.0, 0, cl_fine }; +Point(167) = { 3.5, 1.5, 0, cl_fine }; +Point(168) = { 3.5, 2.0, 0, cl_fine }; +Point(169) = { 3.5, 2.5, 0, cl_fine }; + +// Horizontal and vertical lines in inner grid +Line(5) = { 5, 16}; +Line(6) = { 6, 17}; +Line(7) = { 7, 18}; +Line(8) = { 8, 19}; +Line(9) = { 9, 20}; +Line(10) = { 10, 21}; +Line(11) = { 11, 22}; +Line(12) = { 12, 23}; +Line(13) = { 13, 24}; +Line(14) = { 14, 25}; +Line(15) = { 15, 26}; +Line(16) = { 27, 16}; +Line(17) = { 28, 17}; +Line(18) = { 29, 18}; +Line(19) = { 30, 19}; +Line(20) = { 31, 20}; +Line(21) = { 32, 21}; +Line(22) = { 33, 22}; +Line(23) = { 34, 23}; +Line(24) = { 35, 24}; +Line(25) = { 36, 25}; +Line(26) = { 37, 26}; +Line(27) = { 27, 38}; +Line(28) = { 28, 39}; +Line(29) = { 29, 40}; +Line(30) = { 30, 41}; +Line(31) = { 31, 42}; +Line(32) = { 32, 43}; +Line(33) = { 33, 44}; +Line(34) = { 34, 45}; +Line(35) = { 35, 46}; +Line(36) = { 36, 47}; +Line(37) = { 37, 48}; +Line(38) = { 49, 38}; +Line(39) = { 50, 39}; +Line(40) = { 51, 40}; +Line(41) = { 52, 41}; +Line(42) = { 53, 42}; +Line(43) = { 54, 43}; +Line(44) = { 55, 44}; +Line(45) = { 56, 45}; +Line(46) = { 57, 46}; +Line(47) = { 58, 47}; +Line(48) = { 59, 48}; +Line(49) = { 49, 60}; +Line(50) = { 50, 61}; +Line(51) = { 51, 62}; +Line(52) = { 52, 63}; +Line(53) = { 53, 64}; +Line(54) = { 54, 65}; +Line(55) = { 55, 66}; +Line(56) = { 56, 67}; +Line(57) = { 57, 68}; +Line(58) = { 58, 69}; +Line(59) = { 59, 70}; +Line(60) = { 71, 60}; +Line(61) = { 72, 61}; +Line(62) = { 73, 62}; +Line(63) = { 74, 63}; +Line(64) = { 75, 64}; +Line(65) = { 76, 65}; +Line(66) = { 77, 66}; +Line(67) = { 78, 67}; +Line(68) = { 79, 68}; +Line(69) = { 80, 69}; +Line(70) = { 81, 70}; +Line(71) = { 71, 82}; +Line(72) = { 72, 83}; +Line(73) = { 73, 84}; +Line(74) = { 74, 85}; +Line(75) = { 75, 86}; +Line(76) = { 76, 87}; +Line(77) = { 77, 88}; +Line(78) = { 78, 89}; +Line(79) = { 79, 90}; +Line(80) = { 80, 91}; +Line(81) = { 81, 92}; +Line(82) = { 93, 82}; +Line(83) = { 94, 83}; +Line(84) = { 95, 84}; +Line(85) = { 96, 85}; +Line(86) = { 97, 86}; +Line(87) = { 98, 87}; +Line(88) = { 99, 88}; +Line(89) = { 100, 89}; +Line(90) = { 101, 90}; +Line(91) = { 102, 91}; +Line(92) = { 103, 92}; +Line(93) = { 93, 104}; +Line(94) = { 94, 105}; +Line(95) = { 95, 106}; +Line(96) = { 96, 107}; +Line(97) = { 97, 108}; +Line(98) = { 98, 109}; +Line(99) = { 99, 110}; +Line(100) = { 100, 111}; +Line(101) = { 101, 112}; +Line(102) = { 102, 113}; +Line(103) = { 103, 114}; +Line(104) = { 115, 104}; +Line(105) = { 116, 105}; +Line(106) = { 117, 106}; +Line(107) = { 118, 107}; +Line(108) = { 119, 108}; +Line(109) = { 120, 109}; +Line(110) = { 121, 110}; +Line(111) = { 122, 111}; +Line(112) = { 123, 112}; +Line(113) = { 124, 113}; +Line(114) = { 125, 114}; +Line(126) = { 5, 6}; +Line(127) = { 7, 6}; +Line(128) = { 7, 8}; +Line(129) = { 9, 8}; +Line(130) = { 9, 10}; +Line(131) = { 11, 10}; +Line(132) = { 11, 12}; +Line(133) = { 13, 12}; +Line(134) = { 13, 14}; +Line(135) = { 15, 14}; +Line(136) = { 16, 17}; +Line(137) = { 18, 17}; +Line(138) = { 18, 19}; +Line(139) = { 20, 19}; +Line(140) = { 20, 21}; +Line(141) = { 22, 21}; +Line(142) = { 22, 23}; +Line(143) = { 24, 23}; +Line(144) = { 24, 25}; +Line(145) = { 26, 25}; + +Line(146) = { 27, 28}; +Line(147) = { 29, 28}; +Line(148) = { 29, 30}; +Line(149) = { 31, 30}; +Line(150) = { 31, 32}; +Line(151) = { 33, 32}; +Line(152) = { 33, 34}; +Line(153) = { 35, 34}; +Line(154) = { 35, 36}; +Line(155) = { 37, 36}; + +Line(156) = { 38, 39}; +Line(157) = { 40, 39}; +Line(158) = { 40, 41}; +Line(159) = { 42, 41}; +Line(160) = { 42, 43}; +Line(161) = { 44, 43}; +Line(162) = { 44, 45}; +Line(163) = { 46, 45}; +Line(164) = { 46, 47}; +Line(165) = { 48, 47}; + +Line(166) = { 49, 50}; +Line(167) = { 51, 50}; +Line(168) = { 51, 52}; +Line(169) = { 53, 52}; +Line(170) = { 53, 54}; +Line(171) = { 55, 54}; +Line(172) = { 55, 56}; +Line(173) = { 57, 56}; +Line(174) = { 57, 58}; +Line(175) = { 59, 58}; + +Line(176) = { 60, 61}; +Line(177) = { 62, 61}; +Line(178) = { 62, 63}; +Line(179) = { 64, 63}; +Line(180) = { 64, 65}; +Line(181) = { 66, 65}; +Line(182) = { 66, 67}; +Line(183) = { 68, 67}; +Line(184) = { 68, 69}; +Line(185) = { 70, 69}; + +Line(186) = { 71, 72}; +Line(187) = { 73, 72}; +Line(188) = { 73, 74}; +Line(189) = { 75, 74}; +Line(190) = { 75, 76}; +Line(191) = { 77, 76}; +Line(192) = { 77, 78}; +Line(193) = { 79, 78}; +Line(194) = { 79, 80}; +Line(195) = { 81, 80}; + +Line(196) = { 82, 83}; +Line(197) = { 84, 83}; +Line(198) = { 84, 85}; +Line(199) = { 86, 85}; +Line(200) = { 86, 87}; +Line(201) = { 88, 87}; +Line(202) = { 88, 89}; +Line(203) = { 90, 89}; +Line(204) = { 90, 91}; +Line(205) = { 92, 91}; + +Line(206) = { 93, 94}; +Line(207) = { 95, 94}; +Line(208) = { 95, 96}; +Line(209) = { 97, 96}; +Line(210) = { 97, 98}; +Line(211) = { 99, 98}; +Line(212) = { 99, 100}; +Line(213) = { 101, 100}; +Line(214) = { 101, 102}; +Line(215) = { 103, 102}; + + +Line(216) = { 104, 105}; +Line(217) = { 106, 105}; +Line(218) = { 106, 107}; +Line(219) = { 108, 107}; +Line(220) = { 108, 109}; +Line(221) = { 110, 109}; +Line(222) = { 110, 111}; +Line(223) = { 112, 111}; +Line(224) = { 112, 113}; +Line(225) = { 114, 113}; + + +Line(226) = { 115, 116}; +Line(227) = { 117, 116}; +Line(228) = { 117, 118}; +Line(229) = { 119, 118}; +Line(230) = { 119, 120}; +Line(231) = { 121, 120}; +Line(232) = { 121, 122}; +Line(233) = { 123, 122}; +Line(234) = { 123, 124}; +Line(235) = { 125, 124}; + + +// Define inner surfaces +//+ +Curve Loop(1) = { 5, 136, -6, -126}; +Plane Surface(1) ={1}; +Curve Loop(2) = { 6, -137, -7, 127}; +Plane Surface(2) ={2}; +Curve Loop(3) = { 7, 138, -8, -128}; +Plane Surface(3) ={3}; +Curve Loop(4) = { 8, -139, -9, 129}; +Plane Surface(4) ={4}; +Curve Loop(5) = { 9, 140, -10, -130}; +Plane Surface(5) ={5}; +Curve Loop(6) = { 10, -141, -11, 131}; +Plane Surface(6) ={6}; +Curve Loop(7) = { 11, 142, -12, -132}; +Plane Surface(7) ={7}; +Curve Loop(8) = { 12, -143, -13, 133}; +Plane Surface(8) ={8}; +Curve Loop(9) = { 13, 144, -14, -134}; +Plane Surface(9) ={9}; +Curve Loop(10) = { 14, -145, -15, 135}; +Plane Surface(10) ={10}; +Curve Loop(11) = { -16, 146, 17, -136}; +Plane Surface(11) ={11}; +Curve Loop(12) = { -17, -147, 18, 137}; +Plane Surface(12) ={12}; +Curve Loop(13) = { -18, 148, 19, -138}; +Plane Surface(13) ={13}; +Curve Loop(14) = { -19, -149, 20, 139}; +Plane Surface(14) ={14}; +Curve Loop(15) = { -20, 150, 21, -140}; +Plane Surface(15) ={15}; +Curve Loop(16) = { -21, -151, 22, 141}; +Plane Surface(16) ={16}; +Curve Loop(17) = { -22, 152, 23, -142}; +Plane Surface(17) ={17}; +Curve Loop(18) = { -23, -153, 24, 143}; +Plane Surface(18) ={18}; +Curve Loop(19) = {-24, 154, 25, -144}; +Plane Surface(19) ={19}; +Curve Loop(20) = { -25, -155, 26, 145}; +Plane Surface(20) ={20}; +Curve Loop(21) = { 27, 156, -28, -146}; +Plane Surface(21) ={21}; +Curve Loop(22) = { 28, -157, -29, 147}; +Plane Surface(22) ={22}; +Curve Loop(23) = { 29, 158, -30, -148}; +Plane Surface(23) ={23}; +Curve Loop(24) = { 30, -159, -31, 149}; +Plane Surface(24) ={24}; +Curve Loop(25) = { 31, 160, -32, -150}; +Plane Surface(25) ={25}; +Curve Loop(26) = { 32, -161, -33, 151}; +Plane Surface(26) ={26}; +Curve Loop(27) = { 33, 162, -34, -152}; +Plane Surface(27) ={27}; +Curve Loop(28) = { 34, -163, -35, 153}; +Plane Surface(28) ={28}; +Curve Loop(29) = { 35, 164, -36, -154}; +Plane Surface(29) ={29}; +Curve Loop(30) = { 36, -165, -37, 155}; +Plane Surface(30) ={30}; +Curve Loop(31) = { -38, 166, 39, -156}; +Plane Surface(31) ={31}; +Curve Loop(32) = { -39, -167, 40, 157}; +Plane Surface(32) ={32}; +Curve Loop(33) = { -40, 168, 41, -158}; +Plane Surface(33) ={33}; +Curve Loop(34) = { -41, -169, 42, 159}; +Plane Surface(34) ={34}; +Curve Loop(35) = { -42, 170, 43, -160}; +Plane Surface(35) ={35}; +Curve Loop(36) = { -43, -171, 44, 161}; +Plane Surface(36) ={36}; +Curve Loop(37) = { -44, 172, 45, -162}; +Plane Surface(37) ={37}; +Curve Loop(38) = { -45, -173, 46, 163}; +Plane Surface(38) ={38}; +Curve Loop(39) = { -46, 174, 47, -164}; +Plane Surface(39) ={39}; +Curve Loop(40) = { -47, -175, 48, 165}; +Plane Surface(40) ={40}; +Curve Loop(41) = { 49, 176, -50, -166}; +Plane Surface(41) ={41}; +Curve Loop(42) = { 50, -177, -51, 167}; +Plane Surface(42) ={42}; +Curve Loop(43) = { 51, 178, -52, -168}; +Plane Surface(43) ={43}; +Curve Loop(44) = { 52, -179, -53, 169}; +Plane Surface(44) ={44}; +Curve Loop(45) = { 53, 180, -54, -170}; +Plane Surface(45) ={45}; +Curve Loop(46) = { 54, -181, -55, 171}; +Plane Surface(46) ={46}; +Curve Loop(47) = { 55, 182, -56, -172}; +Plane Surface(47) ={47}; +Curve Loop(48) = { 56, -183, -57, 173}; +Plane Surface(48) ={48}; +Curve Loop(49) = { 57, 184, -58, -174}; +Plane Surface(49) ={49}; +Curve Loop(50) = { 58, -185, -59, 175}; +Plane Surface(50) ={50}; +Curve Loop(51) = { -60, 186, 61, -176}; +Plane Surface(51) ={51}; +Curve Loop(52) = { -61, -187, 62, 177}; +Plane Surface(52) ={52}; +Curve Loop(53) = { -62, 188, 63, -178}; +Plane Surface(53) ={53}; +Curve Loop(54) = { -63, -189, 64, 179}; +Plane Surface(54) ={54}; +Curve Loop(55) = { -64, 190, 65, -180}; +Plane Surface(55) ={55}; +Curve Loop(56) = { -65, -191, 66, 181}; +Plane Surface(56) ={56}; +Curve Loop(57) = { -66, 192, 67, -182}; +Plane Surface(57) ={57}; +Curve Loop(58) = { -67, -193, 68, 183}; +Plane Surface(58) ={58}; +Curve Loop(59) = { -68, 194, 69, -184}; +Plane Surface(59) ={59}; +Curve Loop(60) = { -69, -195, 70, 185}; +Plane Surface(60) ={60}; +Curve Loop(61) = { 71, 196, -72, -186}; +Plane Surface(61) ={61}; +Curve Loop(62) = { 72, -197, -73, 187}; +Plane Surface(62) ={62}; +Curve Loop(63) = { 73, 198, -74, -188}; +Plane Surface(63) ={63}; +Curve Loop(64) = { 74, -199, -75, 189}; +Plane Surface(64) ={64}; +Curve Loop(65) = { 75, 200, -76, -190}; +Plane Surface(65) ={65}; +Curve Loop(66) = { 76, -201, -77, 191}; +Plane Surface(66) ={66}; +Curve Loop(67) = { 77, 202, -78, -192}; +Plane Surface(67) ={67}; +Curve Loop(68) = { 78, -203, -79, 193}; +Plane Surface(68) ={68}; +Curve Loop(69) = { 79, 204, -80, -194}; +Plane Surface(69) ={69}; +Curve Loop(70) = { 80, -205, -81, 195}; +Plane Surface(70) ={70}; +Curve Loop(71) = { -82, 206, 83, -196}; +Plane Surface(71) ={71}; +Curve Loop(72) = { -83, -207, 84, 197}; +Plane Surface(72) ={72}; +Curve Loop(73) = { -84, 208, 85, -198}; +Plane Surface(73) ={73}; +Curve Loop(74) = { -85, -209, 86, 199}; +Plane Surface(74) ={74}; +Curve Loop(75) = { -86, 210, 87, -200}; +Plane Surface(75) ={75}; +Curve Loop(76) = { -87, -211, 88, 201}; +Plane Surface(76) ={76}; +Curve Loop(77) = { -88, 212, 89, -202}; +Plane Surface(77) ={77}; +Curve Loop(78) = { -89, -213, 90, 203}; +Plane Surface(78) ={78}; +Curve Loop(79) = { -90, 214, 91, -204}; +Plane Surface(79) ={79}; +Curve Loop(80) = { -91, -215, 92, 205}; +Plane Surface(80) ={80}; +Curve Loop(81) = { 93, 216, -94, -206}; +Plane Surface(81) ={81}; +Curve Loop(82) = { 94, -217, -95, 207}; +Plane Surface(82) ={82}; +Curve Loop(83) = { 95, 218, -96, -208}; +Plane Surface(83) ={83}; +Curve Loop(84) = { 96, -219, -97, 209}; +Plane Surface(84) ={84}; +Curve Loop(85) = { 97, 220, -98, -210}; +Plane Surface(85) ={85}; +Curve Loop(86) = { 98, -221, -99, 211}; +Plane Surface(86) ={86}; +Curve Loop(87) = { 99, 222, -100, -212}; +Plane Surface(87) ={87}; +Curve Loop(88) = { 100, -223, -101, 213}; +Plane Surface(88) ={88}; +Curve Loop(89) = { 101, 224, -102, -214}; +Plane Surface(89) ={89}; +Curve Loop(90) = { 102, -225, -103, 215}; +Plane Surface(90) ={90}; +Curve Loop(91) = { -104, 226, 105, -216}; +Plane Surface(91) ={91}; +Curve Loop(92) = { -105, -227, 106, 217}; +Plane Surface(92) ={92}; +Curve Loop(93) = { -106, 228, 107, -218}; +Plane Surface(93) ={93}; +Curve Loop(94) = { -107, -229, 108, 219}; +Plane Surface(94) ={94}; +Curve Loop(95) = { -108, 230, 109, -220}; +Plane Surface(95) ={95}; +Curve Loop(96) = { -109, -231, 110, 221}; +Plane Surface(96) ={96}; +Curve Loop(97) = { -110, 232, 111, -222}; +Plane Surface(97) ={97}; +Curve Loop(98) = { -111, -233, 112, 223}; +Plane Surface(98) ={98}; +Curve Loop(99) = { -112, 234, 113, -224}; +Plane Surface(99) ={99}; +Curve Loop(100) = { -113, -235, 114, 225}; +Plane Surface(100) ={100}; + + +// "Outside area" +//Curve Loop(101) = {1, 2, 3, 4}; +//+ +//Curve Loop(102) = {5, -16, 27, -38, 49, -60, 71, -82, 93, -104, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 114, -103, 92, -81, 70, -59, 48, -37, 26, -15, -135, -134, -133, -132, -131, -130, -129, -128, -127, -126}; +//+ +//Plane Surface(101) = {101, 102}; + +//+ +Transfinite Surface {1}; +Transfinite Surface {2}; +Transfinite Surface {3}; +Transfinite Surface {4}; +Transfinite Surface {5}; +Transfinite Surface {6}; +Transfinite Surface {7}; +Transfinite Surface {8}; +Transfinite Surface {9}; +Transfinite Surface {10}; +Transfinite Surface {11}; +Transfinite Surface {12}; +Transfinite Surface {13}; +Transfinite Surface {14}; +Transfinite Surface {15}; +Transfinite Surface {16}; +Transfinite Surface {17}; +Transfinite Surface {18}; +Transfinite Surface {19}; +Transfinite Surface {20}; +Transfinite Surface {21}; +Transfinite Surface {22}; +Transfinite Surface {23}; +Transfinite Surface {24}; +Transfinite Surface {25}; +Transfinite Surface {26}; +Transfinite Surface {27}; +Transfinite Surface {28}; +Transfinite Surface {29}; +Transfinite Surface {30}; +Transfinite Surface {31}; +Transfinite Surface {32}; +Transfinite Surface {33}; +Transfinite Surface {34}; +Transfinite Surface {35}; +Transfinite Surface {36}; +Transfinite Surface {37}; +Transfinite Surface {38}; +Transfinite Surface {39}; +Transfinite Surface {40}; +Transfinite Surface {41}; +Transfinite Surface {42}; +Transfinite Surface {43}; +Transfinite Surface {44}; +Transfinite Surface {45}; +Transfinite Surface {46}; +Transfinite Surface {47}; +Transfinite Surface {48}; +Transfinite Surface {49}; +Transfinite Surface {50}; +Transfinite Surface {51}; +Transfinite Surface {52}; +Transfinite Surface {53}; +Transfinite Surface {54}; +Transfinite Surface {55}; +Transfinite Surface {56}; +Transfinite Surface {57}; +Transfinite Surface {58}; +Transfinite Surface {59}; +Transfinite Surface {60}; +Transfinite Surface {61}; +Transfinite Surface {62}; +Transfinite Surface {63}; +Transfinite Surface {64}; +Transfinite Surface {65}; +Transfinite Surface {66}; +Transfinite Surface {67}; +Transfinite Surface {68}; +Transfinite Surface {69}; +Transfinite Surface {70}; +Transfinite Surface {71}; +Transfinite Surface {72}; +Transfinite Surface {73}; +Transfinite Surface {74}; +Transfinite Surface {75}; +Transfinite Surface {76}; +Transfinite Surface {77}; +Transfinite Surface {78}; +Transfinite Surface {79}; +Transfinite Surface {80}; +Transfinite Surface {81}; +Transfinite Surface {82}; +Transfinite Surface {83}; +Transfinite Surface {84}; +Transfinite Surface {85}; +Transfinite Surface {86}; +Transfinite Surface {87}; +Transfinite Surface {88}; +Transfinite Surface {89}; +Transfinite Surface {90}; +Transfinite Surface {91}; +Transfinite Surface {92}; +Transfinite Surface {93}; +Transfinite Surface {94}; +Transfinite Surface {95}; +Transfinite Surface {96}; +Transfinite Surface {97}; +Transfinite Surface {98}; +Transfinite Surface {99}; +Transfinite Surface {100}; +//+ +Transfinite Curve {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103} = n_recombine Using Progression n_prog; +// add outer perimeter with half as many cells and no Progression +Transfinite Curve {104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} = n_recombine / 4 Using Progression 1; +//+ +Transfinite Curve { 127, 137, 147, 157, 167, 177, 187, 197, 207, 217, 227, 128, 138, 148, 158, 168, 178, 188, 198, 208, 218, 228, 129, 139, 149, 159, 169, 179, 189, 199, 209, 219, 229, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 131, 141, 151, 161, 171, 181, 191, 201, 211, 221, 231, 132, 142, 152, 162, 172, 182, 192, 202, 212, 222, 232, 133, 143, 153, 163, 173, 183, 193, 203, 213, 223, 233, 134, 144, 154, 164, 174, 184, 194, 204, 214, 224, 234} = n_recombine Using Progression n_prog; +// add outer perimeter with half as many cells and no Progression +Transfinite Curve {126, 136, 146, 156, 166, 176, 186, 196, 206, 216, 226, 135, 145, 155, 165, 175, 185, 195, 205, 215, 225, 235} = n_recombine / 4 Using Progression 1; +//+ +Line(236) = {1, 126}; +//+ +Line(237) = {126, 127}; +//+ +Line(238) = {127, 128}; +//+ +Line(239) = {128, 129}; +//+ +Line(240) = {129, 130}; +//+ +Line(241) = {130, 131}; +//+ +Line(242) = {131, 132}; +//+ +Line(243) = {132, 133}; +//+ +Line(244) = {133, 134}; +//+ +Line(245) = {134, 135}; +//+ +Line(246) = {135, 136}; +//+ +Line(247) = {136, 2}; +//+ +Line(248) = {2, 159}; +//+ +Line(249) = {159, 160}; +//+ +Line(250) = {160, 161}; +//+ +Line(251) = {161, 162}; +//+ +Line(252) = {162, 163}; +//+ +Line(253) = {163, 164}; +//+ +Line(254) = {164, 165}; +//+ +Line(255) = {165, 166}; +//+ +Line(256) = {166, 167}; +//+ +Line(257) = {167, 168}; +//+ +Line(258) = {168, 169}; +//+ +Line(259) = {169, 4}; +//+ +Line(260) = {4, 147}; +//+ +Line(261) = {147, 146}; +//+ +Line(262) = {146, 145}; +//+ +Line(263) = {145, 144}; +//+ +Line(264) = {144, 143}; +//+ +Line(265) = {143, 142}; +//+ +Line(266) = {142, 141}; +//+ +Line(267) = {141, 140}; +//+ +Line(268) = {140, 139}; +//+ +Line(269) = {139, 138}; +//+ +Line(270) = {138, 137}; +//+ +Line(271) = {137, 3}; +//+ +Line(272) = {3, 158}; +//+ +Line(273) = {158, 157}; +//+ +Line(274) = {157, 156}; +//+ +Line(275) = {156, 155}; +//+ +Line(276) = {155, 154}; +//+ +Line(277) = {154, 153}; +//+ +Line(278) = {153, 152}; +//+ +Line(279) = {152, 151}; +//+ +Line(280) = {151, 150}; +//+ +Line(281) = {150, 149}; +//+ +Line(282) = {149, 148}; +//+ +Line(283) = {148, 1}; +//+ +Line(284) = {126, 5}; +//+ +Line(285) = {127, 16}; +//+ +Line(286) = {128, 27}; +//+ +Line(287) = {129, 38}; +//+ +Line(288) = {130, 49}; +//+ +Line(289) = {131, 60}; +//+ +Line(290) = {132, 71}; +//+ +Line(291) = {133, 82}; +//+ +Line(292) = {134, 93}; +//+ +Line(293) = {135, 104}; +//+ +Line(294) = {136, 115}; +//+ +Line(295) = {159, 115}; +//+ +Line(296) = {160, 116}; +//+ +Line(297) = {161, 117}; +//+ +Line(298) = {162, 118}; +//+ +Line(299) = {163, 119}; +//+ +Line(300) = {164, 120}; +//+ +Line(301) = {165, 121}; +//+ +Line(302) = {166, 122}; +//+ +Line(303) = {167, 123}; +//+ +Line(304) = {168, 124}; +//+ +Line(305) = {169, 125}; +//+ +Line(306) = {147, 125}; +//+ +Line(307) = {146, 114}; +//+ +Line(308) = {145, 103}; +//+ +Line(309) = {144, 92}; +//+ +Line(310) = {143, 81}; +//+ +Line(311) = {142, 70}; +//+ +Line(312) = {141, 59}; +//+ +Line(313) = {140, 48}; +//+ +Line(314) = {139, 37}; +//+ +Line(315) = {138, 26}; +//+ +Line(316) = {137, 15}; +//+ +Line(317) = {158, 15}; +//+ +Line(318) = {157, 14}; +//+ +Line(319) = {156, 13}; +//+ +Line(320) = {155, 12}; +//+ +Line(321) = {154, 11}; +//+ +Line(322) = {153, 10}; +//+ +Line(323) = {152, 9}; +//+ +Line(324) = {151, 8}; +//+ +Line(325) = {150, 7}; +//+ +Line(326) = {149, 6}; +//+ +Line(327) = {148, 5}; +//+ +Curve Loop(103) = {236, 284, -327, 283}; +//+ +Plane Surface(102) = {103}; +//+ +Curve Loop(104) = {237, 285, -5, -284}; +//+ +Plane Surface(103) = {104}; +//+ +Curve Loop(105) = {238, 286, 16, -285}; +//+ +Plane Surface(104) = {105}; +//+ +Curve Loop(106) = {239, 287, -27, -286}; +//+ +Plane Surface(105) = {106}; +//+ +Curve Loop(107) = {240, 288, 38, -287}; +//+ +Plane Surface(106) = {107}; +//+ +Curve Loop(108) = {241, 289, -49, -288}; +//+ +Plane Surface(107) = {108}; +//+ +Curve Loop(109) = {242, 290, 60, -289}; +//+ +Plane Surface(108) = {109}; +//+ +Curve Loop(110) = {243, 291, -71, -290}; +//+ +Plane Surface(109) = {110}; +//+ +Curve Loop(111) = {244, 292, 82, -291}; +//+ +Plane Surface(110) = {111}; +//+ +Curve Loop(112) = {245, 293, -93, -292}; +//+ +Plane Surface(111) = {112}; +//+ +Curve Loop(113) = {246, 294, 104, -293}; +//+ +Plane Surface(112) = {113}; +//+ +Curve Loop(114) = {247, 248, 295, -294}; +//+ +Plane Surface(113) = {114}; +//+ +Curve Loop(115) = {249, 296, -226, -295}; +//+ +Plane Surface(114) = {115}; +//+ +Curve Loop(116) = {250, 297, 227, -296}; +//+ +Plane Surface(115) = {116}; +//+ +Curve Loop(117) = {251, 298, -228, -297}; +//+ +Plane Surface(116) = {117}; +//+ +Curve Loop(118) = {252, 299, 229, -298}; +//+ +Plane Surface(117) = {118}; +//+ +Curve Loop(119) = {253, 300, -230, -299}; +//+ +Plane Surface(118) = {119}; +//+ +Curve Loop(120) = {254, 301, 231, -300}; +//+ +Plane Surface(119) = {120}; +//+ +Curve Loop(121) = {255, 302, -232, -301}; +//+ +Plane Surface(120) = {121}; +//+ +Curve Loop(122) = {256, 303, 233, -302}; +//+ +Plane Surface(121) = {122}; +//+ +Curve Loop(123) = {257, 304, -234, -303}; +//+ +Plane Surface(122) = {123}; +//+ +Curve Loop(124) = {258, 305, 235, -304}; +//+ +Plane Surface(123) = {124}; +//+ +Curve Loop(125) = {259, 260, 306, -305}; +//+ +Plane Surface(124) = {125}; +//+ +Curve Loop(126) = {261, 307, -114, -306}; +//+ +Plane Surface(125) = {126}; +//+ +Curve Loop(127) = {262, 308, 103, -307}; +//+ +Plane Surface(126) = {127}; +//+ +Curve Loop(128) = {263, 309, -92, -308}; +//+ +Plane Surface(127) = {128}; +//+ +Curve Loop(129) = {264, 310, 81, -309}; +//+ +Plane Surface(128) = {129}; +//+ +Curve Loop(130) = {265, 311, -70, -310}; +//+ +Plane Surface(129) = {130}; +//+ +Curve Loop(131) = {266, 312, 59, -311}; +//+ +Plane Surface(130) = {131}; +//+ +Curve Loop(132) = {267, 313, -48, -312}; +//+ +Plane Surface(131) = {132}; +//+ +Curve Loop(133) = {268, 314, 37, -313}; +//+ +Plane Surface(132) = {133}; +//+ +Curve Loop(134) = {269, 315, -26, -314}; +//+ +Plane Surface(133) = {134}; +//+ +Curve Loop(135) = {270, 316, 15, -315}; +//+ +Plane Surface(134) = {135}; +//+ +Curve Loop(136) = {271, 272, 317, -316}; +//+ +Plane Surface(135) = {136}; +//+ +Curve Loop(137) = {273, 318, -135, -317}; +//+ +Plane Surface(136) = {137}; +//+ +Curve Loop(138) = {274, 319, 134, -318}; +//+ +Plane Surface(137) = {138}; +//+ +Curve Loop(139) = {275, 320, -133, -319}; +//+ +Plane Surface(138) = {139}; +//+ +Curve Loop(140) = {276, 321, 132, -320}; +//+ +Plane Surface(139) = {140}; +//+ +Curve Loop(141) = {277, 322, -131, -321}; +//+ +Plane Surface(140) = {141}; +//+ +Curve Loop(142) = {278, 323, 130, -322}; +//+ +Plane Surface(141) = {142}; +//+ +Curve Loop(143) = {279, 324, -129, -323}; +//+ +Plane Surface(142) = {143}; +//+ +Curve Loop(144) = {280, 325, 128, -324}; +//+ +Plane Surface(143) = {144}; +//+ +Curve Loop(145) = {281, 326, -127, -325}; +//+ +Plane Surface(144) = {145}; +//+ +Curve Loop(146) = {282, 327, 126, -326}; +//+ +Plane Surface(145) = {146}; +//+ +//+ +Transfinite Surface {102}; +//+ +Transfinite Surface {103}; +//+ +Transfinite Surface {104}; +//+ +Transfinite Surface {105}; +//+ +Transfinite Surface {106}; +//+ +Transfinite Surface {107}; +//+ +Transfinite Surface {108}; +//+ +Transfinite Surface {109}; +//+ +Transfinite Surface {110}; +//+ +Transfinite Surface {111}; +//+ +Transfinite Surface {112}; +//+ +Transfinite Surface {113}; +//+ +Transfinite Surface {114}; +//+ +Transfinite Surface {115}; +//+ +Transfinite Surface {116}; +//+ +Transfinite Surface {117}; +//+ +Transfinite Surface {118}; +//+ +Transfinite Surface {119}; +//+ +Transfinite Surface {120}; +//+ +Transfinite Surface {121}; +//+ +Transfinite Surface {122}; +//+ +Transfinite Surface {123}; +//+ +Transfinite Surface {124}; +//+ +Transfinite Surface {125}; +//+ +Transfinite Surface {126}; +//+ +Transfinite Surface {127}; +//+ +Transfinite Surface {128}; +//+ +Transfinite Surface {129}; +//+ +Transfinite Surface {130}; +//+ +Transfinite Surface {131}; +//+ +Transfinite Surface {132}; +//+ +Transfinite Surface {133}; +//+ +Transfinite Surface {134}; +//+ +Transfinite Surface {135}; +//+ +Transfinite Surface {136}; +//+ +Transfinite Surface {137}; +//+ +Transfinite Surface {138}; +//+ +Transfinite Surface {139}; +//+ +Transfinite Surface {140}; +//+ +Transfinite Surface {141}; +//+ +Transfinite Surface {142}; +//+ +Transfinite Surface {143}; +//+ +Transfinite Surface {144}; +//+ +Transfinite Surface {145}; +//+ +Transfinite Curve { 238, 239, 240, 241, 242, 243, 244, 245, 250, 251, 252, 253, 254, 255, 256, 257, 262, 263, 264, 265, 266, 267, 268, 269, 274, 275, 276, 277, 278, 279, 280, 281} = n_recombine Using Progression 1; +Transfinite Curve {237,246,249, 258,261,270,273,282} = n_recombine / 4 Using Progression 1; + + +Physical Curve("void",328) = {236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283}; + +Recombine Surface "*"; +// Define meshing options +//Mesh.Algorithm = 6; // Specify meshing algorithm (e.g., Delaunay) +//Mesh.ElementOrder = 1; // Specify element order +// Generate the mesh +//Mesh 2; \ No newline at end of file diff --git a/examples/meshes/geo_files/lattice_refined.geo b/examples/meshes/geo_files/lattice_refined.geo new file mode 100644 index 00000000..99d87a27 --- /dev/null +++ b/examples/meshes/geo_files/lattice_refined.geo @@ -0,0 +1,708 @@ +cl_fine = 0.02; +cl_coarse = 0.05; +cl_boundary = 0.2; +length = 0.05; +Point(1) = {-3.5, -3.5, 0, cl_boundary}; +Point(2) = {3.5, -3.5, 0, cl_boundary}; +Point(3) = {-3.5, 3.5, 0, cl_boundary}; +Point(4) = {3.5, 3.5, 0, cl_boundary}; +Point(5) = {-1.5, -1.5, 0, cl_fine}; +Point(6) = {-2.5, -1.5, 0, cl_fine}; +Point(7) = {-2.5, -2.5, 0, cl_fine}; +Point(8) = {-1.5, -2.5, 0, cl_fine}; +Point(9) = {1.5, -1.5, 0, cl_fine}; +Point(10) = {1.5, -2.5, 0, cl_fine}; +Point(11) = {2.5, -2.5, 0, cl_fine}; +Point(12) = {2.5, -1.5, 0, cl_fine}; +Point(13) = {-1.5, 1.5, 0, cl_fine}; +Point(14) = {-1.5, 0.5, 0, cl_fine}; +Point(15) = {-2.5, 0.5, 0, cl_fine}; +Point(16) = {-2.5, -0.5, 0, cl_fine}; +Point(17) = {-1.5, -0.5, 0, cl_fine}; +Point(18) = {-0.5, -1.5, 0, cl_fine}; +Point(19) = {-0.5, -2.5, 0, cl_fine}; +Point(20) = {0.5, -2.5, 0, cl_fine}; +Point(21) = {0.5, -1.5, 0, cl_fine}; +Point(22) = {1.5, -0.5, 0, cl_fine}; +Point(23) = {2.5, -0.5, 0, cl_fine}; +Point(24) = {2.5, 0.5, 0, cl_fine}; +Point(25) = {1.5, 0.5, 0, cl_fine}; +Point(26) = {1.5, 1.5, 0, cl_fine}; +Point(27) = {0.5, 1.5, 0, cl_fine}; +Point(28) = {0.5, 0.5, 0, cl_fine}; +Point(29) = {-0.5, 0.5, 0, cl_fine}; +Point(30) = {-0.5, 1.5, 0, cl_fine}; +Point(31) = {-2.5, 1.5, 0, cl_fine}; +Point(32) = {-1.5, 2.5, 0, cl_fine}; +Point(33) = {-2.5, 2.5, 0, cl_fine}; +Point(34) = {2.5, 1.5, 0, cl_fine}; +Point(35) = {2.5, 2.5, 0, cl_fine}; +Point(36) = {1.5, 2.5, 0, cl_fine}; +Point(37) = {-0.5, -0.5, 0, cl_fine}; +Point(38) = {0.5, -0.5, 0, cl_fine}; +pt_counter = 39; +mid_x = -1; +mid_y = 1; +Point(pt_counter) = {mid_x - length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x - length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +mid_x = -1; +mid_y = 0; +Point(pt_counter) = {mid_x - length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x - length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +mid_x = -1; +mid_y = -1; +Point(pt_counter) = {mid_x - length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x - length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +mid_x = -1; +mid_y = -2; +Point(pt_counter) = {mid_x - length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x - length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +mid_x = -2; +mid_y = 2; +Point(pt_counter) = {mid_x - length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x - length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +mid_x = -2; +mid_y = 1; +Point(pt_counter) = {mid_x - length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x - length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +mid_x = -2; +mid_y = 0; +Point(pt_counter) = {mid_x - length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x - length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +mid_x = -2; +mid_y = -1; +Point(pt_counter) = {mid_x - length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x - length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +mid_x = -2; +mid_y = -2; +Point(pt_counter) = {mid_x - length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x - length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +mid_x = 0; +mid_y = 1; +Point(pt_counter) = {mid_x - length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x - length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +mid_x = 0; +mid_y = 0; +Point(pt_counter) = {mid_x - length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x - length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +mid_x = 0; +mid_y = -1; +Point(pt_counter) = {mid_x - length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x - length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +mid_x = 0; +mid_y = -2; +Point(pt_counter) = {mid_x - length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x - length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +mid_x = 1; +mid_y = 1; +Point(pt_counter) = {mid_x - length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x - length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +mid_x = 1; +mid_y = 0; +Point(pt_counter) = {mid_x - length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x - length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +mid_x = 0; +mid_y = 0; +Point(pt_counter) = {mid_x - length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x - length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +mid_x = 1; +mid_y = -1; +Point(pt_counter) = {mid_x - length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x - length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +mid_x = 1; +mid_y = -2; +Point(pt_counter) = {mid_x - length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x - length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +mid_x = 2; +mid_y = 2; +Point(pt_counter) = {mid_x - length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x - length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +mid_x = 2; +mid_y = 1; +Point(pt_counter) = {mid_x - length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x - length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +mid_x = 2; +mid_y = 0; +Point(pt_counter) = {mid_x - length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x - length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +mid_x = 2; +mid_y = -1; +Point(pt_counter) = {mid_x - length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x - length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +mid_x = 2; +mid_y = -2; +Point(pt_counter) = {mid_x - length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y - length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x - length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Point(pt_counter) = {mid_x + length, mid_y + length, 0, cl_coarse}; // Point to enforce coarser refinement +pt_counter+= 1; +Line(1) = {1, 2}; +Line(2) = {3, 1}; +Line(3) = {2, 4}; +Line(4) = {4, 3}; +Line(5) = {5, 6}; +Line(6) = {6, 7}; +Line(7) = {7, 8}; +Line(8) = {8, 5}; +Line(9) = {9, 10}; +Line(10) = {10, 11}; +Line(11) = {11, 12}; +Line(12) = {12, 9}; +Line(13) = {13, 14}; +Line(14) = {14, 15}; +Line(15) = {15, 16}; +Line(16) = {16, 17}; +Line(17) = {17, 5}; +Line(18) = {5, 18}; +Line(19) = {18, 19}; +Line(20) = {19, 20}; +Line(21) = {20, 21}; +Line(22) = {21, 9}; +Line(23) = {9, 22}; +Line(24) = {22, 23}; +Line(25) = {23, 24}; +Line(26) = {24, 25}; +Line(27) = {25, 26}; +Line(28) = {26, 27}; +Line(29) = {27, 28}; +Line(30) = {28, 29}; +Line(31) = {29, 30}; +Line(32) = {30, 13}; +Line(33) = {31, 13}; +Line(34) = {13, 32}; +Line(35) = {32, 33}; +Line(36) = {33, 31}; +Line(37) = {26, 34}; +Line(38) = {34, 35}; +Line(39) = {35, 36}; +Line(40) = {36, 26}; +Line(41) = {14, 29}; +Line(42) = {29, 37}; +Line(43) = {37, 17}; +Line(44) = {17, 14}; +Line(45) = {28, 25}; +Line(46) = {25, 22}; +Line(47) = {22, 38}; +Line(48) = {38, 28}; +Line(49) = {37, 38}; +Line(50) = {38, 21}; +Line(51) = {21, 18}; +Line(52) = {18, 37}; +//+ +Physical Curve("void", 61) = {2, 4, 3, 1}; +//+ +Line(53) = {57, 55}; +//+ +Line(54) = {56, 55}; +//+ +Line(55) = {57, 58}; +//+ +Line(56) = {58, 56}; +//+ +Line(57) = {61, 62}; +//+ +Line(58) = {62, 60}; +//+ +Line(59) = {60, 59}; +//+ +Line(60) = {59, 61}; +//+ +Line(61) = {41, 39}; +//+ +Line(62) = {39, 40}; +//+ +Line(63) = {40, 42}; +//+ +Line(64) = {42, 41}; +//+ +Line(65) = {65, 63}; +//+ +Line(66) = {63, 64}; +//+ +Line(67) = {64, 66}; +//+ +Line(68) = {66, 65}; +//+ +Line(69) = {45, 43}; +//+ +Line(70) = {43, 44}; +//+ +Line(71) = {44, 46}; +//+ +Line(72) = {46, 45}; +//+ +Line(73) = {77, 75}; +//+ +Line(74) = {75, 76}; +//+ +Line(75) = {76, 78}; +//+ +Line(76) = {78, 77}; +//+ +Line(77) = {81, 79}; +//+ +Line(78) = {79, 80}; +//+ +Line(79) = {80, 82}; +//+ +Line(80) = {82, 81}; +//+ +Line(81) = {85, 83}; +//+ +Line(82) = {83, 84}; +//+ +Line(83) = {84, 86}; +//+ +Line(84) = {86, 85}; +//+ +Line(85) = {50, 49}; +//+ +Line(86) = {49, 47}; +//+ +Line(87) = {47, 48}; +//+ +Line(88) = {48, 50}; +//+ +Line(89) = {70, 69}; +//+ +Line(90) = {69, 67}; +//+ +Line(91) = {67, 68}; +//+ +Line(92) = {68, 70}; +//+ +Line(93) = {93, 91}; +//+ +Line(94) = {91, 92}; +//+ +Line(95) = {92, 94}; +//+ +Line(96) = {94, 93}; +//+ +Line(97) = {97, 95}; +//+ +Line(98) = {95, 96}; +//+ +Line(99) = {96, 98}; +//+ +Line(100) = {98, 97}; +//+ +Line(101) = {73, 74}; +//+ +Line(102) = {74, 72}; +//+ +Line(103) = {72, 71}; +//+ +Line(104) = {71, 73}; +//+ +Line(105) = {53, 54}; +//+ +Line(106) = {54, 52}; +//+ +Line(107) = {52, 51}; +//+ +Line(108) = {51, 53}; +//+ +Line(109) = {89, 90}; +//+ +Line(110) = {90, 88}; +//+ +Line(111) = {88, 87}; +//+ +Line(112) = {87, 89}; +//+ +Line(113) = {108, 110}; +//+ +Line(114) = {110, 109}; +//+ +Line(115) = {109, 107}; +//+ +Line(116) = {107, 108}; +//+ +Line(117) = {103, 104}; +//+ +Line(118) = {104, 106}; +//+ +Line(119) = {106, 105}; +//+ +Line(120) = {105, 103}; +//+ +Line(121) = {129, 130}; +//+ +Line(122) = {130, 128}; +//+ +Line(123) = {128, 127}; +//+ +Line(124) = {127, 129}; +//+ +Line(125) = {123, 124}; +//+ +Line(126) = {124, 126}; +//+ +Line(127) = {126, 125}; +//+ +Line(128) = {125, 123}; +//+ +Line(129) = {122, 121}; +//+ +Line(130) = {121, 119}; +//+ +Line(131) = {119, 120}; +//+ +Line(132) = {120, 122}; +//+ +Line(133) = {117, 115}; +//+ +Line(134) = {115, 116}; +//+ +Line(135) = {116, 118}; +//+ +Line(136) = {118, 117}; +//+ +Line(137) = {113, 111}; +//+ +Line(138) = {111, 112}; +//+ +Line(139) = {112, 114}; +//+ +Line(140) = {114, 113}; +//+ +Curve Loop(1) = {55, 56, 54, -53}; +//+ +Plane Surface(1) = {1}; +//+ +Curve Loop(2) = {36, 33, 34, 35}; +//+ +Plane Surface(2) = {1, 2}; +//+ +Curve Loop(3) = {57, 58, 59, 60}; +//+ +Plane Surface(3) = {3}; +//+ +Curve Loop(4) = {68, 65, 66, 67}; +//+ +Plane Surface(4) = {4}; +//+ +Curve Loop(5) = {89, 90, 91, 92}; +//+ +Plane Surface(5) = {5}; +//+ +Curve Loop(6) = {101, 102, 103, 104}; +//+ +Plane Surface(6) = {6}; +//+ +Curve Loop(7) = {105, 106, 107, 108}; +//+ +Plane Surface(7) = {7}; +//+ +Curve Loop(8) = {85, 86, 87, 88}; +//+ +Plane Surface(8) = {8}; +//+ +Curve Loop(9) = {72, 69, 70, 71}; +//+ +Plane Surface(9) = {9}; +//+ +Curve Loop(10) = {64, 61, 62, 63}; +//+ +Plane Surface(10) = {10}; +//+ +Curve Loop(11) = {74, 75, 76, 73}; +//+ +Plane Surface(11) = {11}; +//+ +Curve Loop(12) = {80, 77, 78, 79}; +//+ +Plane Surface(12) = {12}; +//+ +Curve Loop(13) = {84, 81, 82, 83}; +//+ +Plane Surface(13) = {13}; +//+ +Curve Loop(14) = {111, 112, 109, 110}; +//+ +Plane Surface(14) = {14}; +//+ +Curve Loop(15) = {115, 116, 113, 114}; +//+ +Plane Surface(15) = {15}; +//+ +Curve Loop(16) = {120, 117, 118, 119}; +//+ +Plane Surface(16) = {16}; +//+ +Curve Loop(17) = {97, 98, 99, 100}; +//+ +Plane Surface(17) = {17}; +//+ +Curve Loop(18) = {96, 93, 94, 95}; +//+ +Plane Surface(18) = {18}; +//+ +Curve Loop(19) = {121, 122, 123, 124}; +//+ +Plane Surface(19) = {19}; +//+ +Curve Loop(20) = {127, 128, 125, 126}; +//+ +Plane Surface(20) = {20}; +//+ +Curve Loop(21) = {129, 130, 131, 132}; +//+ +Plane Surface(21) = {21}; +//+ +Curve Loop(22) = {136, 133, 134, 135}; +//+ +Plane Surface(22) = {22}; +//+ +Curve Loop(23) = {138, 139, 140, 137}; +//+ +Plane Surface(23) = {23}; +//+ +Curve Loop(24) = {32, 13, 41, 31, 32, 13, 41, 31}; +//+ +Curve Loop(25) = {30, 42, 49, 48}; +//+ +Plane Surface(25) = {12, 25}; +//+ +Curve Loop(26) = {31, 32, 13, 41}; +//+ +Plane Surface(26) = {10, 26}; +//+ +Curve Loop(27) = {41, 42, 43, 44}; +//+ +Plane Surface(27) = {9, 27}; +//+ +Curve Loop(28) = {14, 15, 16, 44}; +//+ +Plane Surface(28) = {4, 28}; +//+ +Curve Loop(29) = {43, 17, 18, 52}; +//+ +Plane Surface(29) = {8, 29}; +//+ +Curve Loop(30) = {8, 5, 6, 7}; +//+ +Plane Surface(30) = {6, 30}; +//+ +Curve Loop(31) = {51, 19, 20, 21}; +//+ +Plane Surface(31) = {14, 31}; +//+ +Curve Loop(32) = {51, 52, 49, 50}; +//+ +Plane Surface(32) = {13, 32}; +//+ +Curve Loop(33) = {22, 23, 47, 50}; +//+ +Plane Surface(33) = {16, 33}; +//+ +Curve Loop(34) = {47, 48, 45, 46}; +//+ +Plane Surface(34) = {17, 34}; +//+ +Curve Loop(35) = {45, 27, 28, 29}; +//+ +Plane Surface(35) = {18, 35}; +//+ +Curve Loop(36) = {26, 46, 24, 25, 26, 46, 24, 25}; +//+ + +Curve Loop(37) = {39, 40, 37, 38}; +//+ +Plane Surface(37) = {23, 37}; +//+ +Curve Loop(38) = {25, 26, 46, 24}; +//+ +Plane Surface(38) = {21, 38}; +//+ +Curve Loop(39) = {12, 9, 10, 11}; +//+ +Plane Surface(39) = {19, 39}; +//+ +Curve Loop(40) = {4, 2, 1, 3}; + +//+ +Line(141) = {31, 15}; +//+ +Line(142) = {16, 6}; +//+ +Line(143) = {8, 19}; +//+ +Line(144) = {20, 10}; +//+ +Line(145) = {12, 23}; +//+ +Line(146) = {24, 34}; + +//+ +Line(147) = {30, 27}; +//+ +Curve Loop(41) = {141, 15, 142, 6, 7, 143, 20, 144, 10, 11, 145, 25, 146, 38, 39, 40, 28, -147, 32, 34, 35, 36}; +//+ +Plane Surface(40) = {40, 41}; +//+ +Curve Loop(42) = {141, -14, -13, -33}; +//+ +Plane Surface(41) = {3, 42}; +//+ +Curve Loop(43) = {31, 147, 29, 30}; +//+ +Plane Surface(42) = {11, 43}; +//+ +Curve Loop(44) = {37, -146, 26, 27}; +//+ +Plane Surface(43) = {22, 44}; +//+ +Curve Loop(45) = {24, -145, 12, 23}; +//+ +Plane Surface(44) = {20, 45}; +//+ +Curve Loop(46) = {22, 9, -144, 21}; +//+ +Plane Surface(45) = {15, 46}; +//+ +Curve Loop(47) = {18, 19, -143, 8}; +//+ +Plane Surface(46) = {7, 47}; +//+ +Curve Loop(48) = {17, 5, -142, 16}; +//+ +Plane Surface(47) = {5, 48}; +//+ +Plane Surface(48) = {3, 42}; diff --git a/examples/meshes/geo_files/lattice_uniform.geo b/examples/meshes/geo_files/lattice_uniform.geo new file mode 100644 index 00000000..00971773 --- /dev/null +++ b/examples/meshes/geo_files/lattice_uniform.geo @@ -0,0 +1,227 @@ +cl_fine = 0.075; +cl_coarse = 0.1; +length = 0.05; +Point(1) = {-3.5, -3.5, 0, cl_coarse}; +Point(2) = {3.5, -3.5, 0, cl_coarse}; +Point(3) = {-3.5, 3.5, 0, cl_coarse}; +Point(4) = {3.5, 3.5, 0, cl_coarse}; +Point(5) = {-1.5, -1.5, 0, cl_fine}; +Point(6) = {-2.5, -1.5, 0, cl_fine}; +Point(7) = {-2.5, -2.5, 0, cl_fine}; +Point(8) = {-1.5, -2.5, 0, cl_fine}; +Point(9) = {1.5, -1.5, 0, cl_fine}; +Point(10) = {1.5, -2.5, 0, cl_fine}; +Point(11) = {2.5, -2.5, 0, cl_fine}; +Point(12) = {2.5, -1.5, 0, cl_fine}; +Point(13) = {-1.5, 1.5, 0, cl_fine}; +Point(14) = {-1.5, 0.5, 0, cl_fine}; +Point(15) = {-2.5, 0.5, 0, cl_fine}; +Point(16) = {-2.5, -0.5, 0, cl_fine}; +Point(17) = {-1.5, -0.5, 0, cl_fine}; +Point(18) = {-0.5, -1.5, 0, cl_fine}; +Point(19) = {-0.5, -2.5, 0, cl_fine}; +Point(20) = {0.5, -2.5, 0, cl_fine}; +Point(21) = {0.5, -1.5, 0, cl_fine}; +Point(22) = {1.5, -0.5, 0, cl_fine}; +Point(23) = {2.5, -0.5, 0, cl_fine}; +Point(24) = {2.5, 0.5, 0, cl_fine}; +Point(25) = {1.5, 0.5, 0, cl_fine}; +Point(26) = {1.5, 1.5, 0, cl_fine}; +Point(27) = {0.5, 1.5, 0, cl_fine}; +Point(28) = {0.5, 0.5, 0, cl_fine}; +Point(29) = {-0.5, 0.5, 0, cl_fine}; +Point(30) = {-0.5, 1.5, 0, cl_fine}; +Point(31) = {-2.5, 1.5, 0, cl_fine}; +Point(32) = {-1.5, 2.5, 0, cl_fine}; +Point(33) = {-2.5, 2.5, 0, cl_fine}; +Point(34) = {2.5, 1.5, 0, cl_fine}; +Point(35) = {2.5, 2.5, 0, cl_fine}; +Point(36) = {1.5, 2.5, 0, cl_fine}; +Point(37) = {-0.5, -0.5, 0, cl_fine}; +Point(38) = {0.5, -0.5, 0, cl_fine}; +//+ +Line(1) = {3, 1}; +//+ +Line(2) = {1, 2}; +//+ +Line(3) = {2, 4}; +//+ +Line(4) = {4, 3}; +//+ +Line(5) = {29, 37}; +//+ +Line(6) = {37, 38}; +//+ +Line(7) = {38, 28}; +//+ +Line(8) = {28, 29}; +//+ +Line(9) = {29, 14}; +//+ +Line(10) = {14, 13}; +//+ +Line(11) = {13, 30}; +//+ +Line(12) = {30, 29}; +//+ +Line(13) = {27, 26}; +//+ +Line(14) = {26, 25}; +//+ +Line(15) = {25, 28}; +//+ +Line(16) = {28, 27}; +//+ +Line(17) = {26, 36}; +//+ +Line(18) = {36, 35}; +//+ +Line(19) = {34, 35}; +//+ +Line(20) = {34, 26}; +//+ +Line(21) = {24, 23}; +//+ +Line(22) = {23, 22}; +//+ +Line(23) = {22, 25}; +//+ +Line(24) = {25, 24}; +//+ +Line(25) = {9, 10}; +//+ +Line(26) = {10, 11}; +//+ +Line(27) = {11, 12}; +//+ +Line(28) = {12, 9}; +//+ +Line(29) = {9, 21}; +//+ +Line(30) = {21, 38}; +//+ +Line(31) = {38, 22}; +//+ +Line(32) = {22, 9}; +//+ +Line(33) = {20, 21}; +//+ +Line(34) = {21, 18}; +//+ +Line(35) = {19, 18}; +//+ +Line(36) = {19, 20}; +//+ +Line(37) = {37, 17}; +//+ +Line(38) = {5, 17}; +//+ +Line(39) = {5, 18}; +//+ +Line(40) = {18, 37}; +//+ +Line(41) = {14, 15}; +//+ +Line(42) = {15, 16}; +//+ +Line(43) = {16, 17}; +//+ +Line(44) = {17, 14}; +//+ +Line(45) = {32, 13}; +//+ +Line(46) = {13, 31}; +//+ +Line(47) = {31, 33}; +//+ +Line(48) = {33, 32}; +//+ +Line(49) = {6, 7}; +//+ +Line(50) = {7, 8}; +//+ +Line(51) = {8, 5}; +//+ +Line(52) = {5, 6}; +//+ +Curve Loop(1) = {5, 6, 7, 8}; +//+ +Plane Surface(1) = {1}; +//+ +Curve Loop(2) = {1, 2, 3, 4}; +//+ +Curve Loop(3) = {8, -12, -11, -10, 41, 42, 43, -38, 39, -35, 36, 33, -29, -32, -22, -21, -24, -14, -13, -16}; +//+ +Curve Loop(4) = {45, 46, 47, 48}; +//+ +Curve Loop(5) = {19, -18, -17, -20}; +//+ +Curve Loop(6) = {28, 25, 26, 27}; +//+ +Curve Loop(7) = {51, 52, 49, 50}; +//+ +Plane Surface(2) = {2, 3, 4, 5, 6, 7}; +//+ +Plane Surface(3) = {4}; +//+ +Curve Loop(8) = {12, 9, 10, 11}; +//+ +Plane Surface(4) = {8}; +//+ +Curve Loop(9) = {44, -9, 5, 37}; +//+ +Plane Surface(5) = {9}; +//+ +Curve Loop(10) = {41, 42, 43, 44}; +//+ +Plane Surface(6) = {10}; +//+ +Curve Loop(11) = {37, -38, 39, 40}; +//+ +Plane Surface(7) = {11}; +//+ +Plane Surface(8) = {7}; +//+ +Curve Loop(12) = {35, -34, -33, -36}; +//+ +Plane Surface(9) = {12}; +//+ +Curve Loop(13) = {30, -6, -40, -34}; +//+ +Plane Surface(10) = {13}; +//+ +Curve Loop(14) = {29, 30, 31, 32}; +//+ +Plane Surface(11) = {14}; +//+ +Plane Surface(12) = {6}; +//+ +Curve Loop(15) = {22, 23, 24, 21}; +//+ +Plane Surface(13) = {15}; +//+ +Curve Loop(16) = {15, -7, 31, 23}; +//+ +Plane Surface(14) = {16}; +//+ +Curve Loop(17) = {13, 14, 15, 16}; +//+ +Plane Surface(15) = {17}; +//+ +Plane Surface(16) = {5}; +//+ +Physical Curve("void", 53) = {1, 2, 3, 4}; +//+ +Transfinite Curve {47, 48, 46} = 10 Using Progression 1; +//+ +Transfinite Surface {15} = {25, 26, 27, 28}; +//+ +Transfinite Surface {15} = {25, 26, 27, 28}; +//+ +Transfinite Curve {12} = 10 Using Progression 1; +//+ +Transfinite Curve {12, 11, 9} = 10 Using Progression 1; +//+ +Transfinite Curve {12, 11, 9} = 10 Using Progression 1; +//+ +Surface{2, 4} In Surface{2}; diff --git a/examples/meshes/geo_files/make_lattice_mesh.sh b/examples/meshes/geo_files/make_lattice_mesh.sh new file mode 100644 index 00000000..95974234 --- /dev/null +++ b/examples/meshes/geo_files/make_lattice_mesh.sh @@ -0,0 +1 @@ +gmsh lattice_rectangular.geo -2 -format su2 -save_all \ No newline at end of file diff --git a/examples/meshes/meshing_scripts/.DS_Store b/examples/meshes/meshing_scripts/.DS_Store new file mode 100644 index 00000000..5008ddfc Binary files /dev/null and b/examples/meshes/meshing_scripts/.DS_Store differ diff --git a/examples/meshes/create_1dmesh.py b/examples/meshes/meshing_scripts/create_1dmesh.py similarity index 100% rename from examples/meshes/create_1dmesh.py rename to examples/meshes/meshing_scripts/create_1dmesh.py diff --git a/examples/meshes/create_checkerboard_mesh.py b/examples/meshes/meshing_scripts/create_checkerboard_mesh.py similarity index 100% rename from examples/meshes/create_checkerboard_mesh.py rename to examples/meshes/meshing_scripts/create_checkerboard_mesh.py diff --git a/examples/meshes/create_hohlraum_2d_mesh.py b/examples/meshes/meshing_scripts/create_hohlraum_2d_mesh.py similarity index 100% rename from examples/meshes/create_hohlraum_2d_mesh.py rename to examples/meshes/meshing_scripts/create_hohlraum_2d_mesh.py diff --git a/examples/meshes/meshing_scripts/create_lattice_mesh_unstr_refined.py b/examples/meshes/meshing_scripts/create_lattice_mesh_unstr_refined.py new file mode 100644 index 00000000..82903c27 --- /dev/null +++ b/examples/meshes/meshing_scripts/create_lattice_mesh_unstr_refined.py @@ -0,0 +1,107 @@ +import pygmsh as pg +import numpy as np +import itertools +import os +from optparse import OptionParser +import subprocess + + +def add_block(x0, y0, length, char_length, geom): + coords = np.array([ + [x0, y0, 0.0], + [x0 + length, y0, 0.0], + [x0 + length, y0 + length, 0.0], + [x0, y0 + length, 0.0] + ]) + return geom.add_polygon(coords, char_length) + + +def add_boundary(x0, y0, length, cl_max, cl_min, geom): + coords = np.array([ + [x0, y0, 0.0], + [x0 + length, y0, 0.0], + [x0 + length, y0 + length, 0.0], + [x0, y0 + length, 0.0] + ]) + pts = [] + for coord in coords: + pts.append(geom.add_point(coord, cl_max)) + + l1 = geom.add_line(pts[0], pts[1]) + l2 = geom.add_line(pts[1], pts[2]) + l3 = geom.add_line(pts[2], pts[3]) + l4 = geom.add_line(pts[3], pts[0]) + + bd1 = geom.add_boundary_layer( + edges_list=[l1, l2], + hfar=cl_max, + hwall_n=cl_min, + ratio=1.1, + thickness=0.1, + anisomax=100.0, + ) + + return bd1 + + +def main(): + print("---------- Start Creating the mesh ------------") + print("Parsing options") + # --- parse options --- + parser = OptionParser() + parser.add_option("-o", "--output_name", dest="output_name", default="lattice_unstructured") + parser.add_option("-c", "--cl_min", dest="cl_min", default=1e-3) + parser.add_option("-d", "--cl_max", dest="cl_max", default=5 * 1e-1) + (options, args) = parser.parse_args() + + options.output_name = str(options.output_name) + options.cl_max = float(options.cl_max) + options.cl_min = float(options.cl_min) + cl_max = options.cl_max + cl_min = options.cl_min + + geom = pg.opencascade.Geometry(characteristic_length_min=None, characteristic_length_max=None) + domain = add_block(-3.5, -3.5, 7, cl_max, geom) + + xpos = ypos = [1 - 3.5, 2 - 3.5, 3 - 3.5, 4 - 3.5, 5 - 3.5] + pattern = list(itertools.product(xpos, ypos))[::2] + pattern.pop(7) + + boxes = [domain] + boundary_layers = [] + thickness = 0.1 + # for pos in pattern: + # boxes.append(add_block(pos[0], pos[1], 1, cl_max, geom)) + # boundary_layers.append(add_boundary(pos[0], pos[1], 1, cl_max, cl_min, geom)) + # poly = boxes[5] + pt1 = geom.add_point([0, 0, 0], lcar=cl_min) + pt2 = geom.add_point([1, 1, 0], lcar=cl_min) + pt3 = geom.add_point([0, 1, 0], lcar=cl_min) + l0 = geom.add_line(pt1, pt2) + + # l1 = geom.add_line(pt2, pt3) + # l2 = geom.add_line(pt3, pt1) + # ll0 = geom.add_line_loop((l0, l1, l2)) + # rs0 = geom.add_surface(ll0) + # tf_line = geom.set_transfinite_lines([l0], 100, progression=1.5) + # geom.set_recombined_surfaces([rs0]) + + # geom.boolean_fragments(boxes, []) + + geom.add_physical(domain.lines, label="void") + + mesh_code = geom.get_code() + + with open(options.output_name + ".geo", "w") as mesh_file: + mesh_file.write(mesh_code) + + os.system('gmsh ' + options.output_name + '.geo -2 -format su2 -save_all') + os.system('gmsh ' + options.output_name + '.geo -2 -format vtk -save_all') + + # os.system('rm ' + options.output_name + '.geo') + # add mesh refinements + print("---------- Successfully created the mesh ------------") + + +if __name__ == '__main__': + main() diff --git a/examples/meshes/meshing_scripts/create_lattice_mesh_unstructured.py b/examples/meshes/meshing_scripts/create_lattice_mesh_unstructured.py new file mode 100644 index 00000000..4c1b1e81 --- /dev/null +++ b/examples/meshes/meshing_scripts/create_lattice_mesh_unstructured.py @@ -0,0 +1,56 @@ +import pygmsh as pg +import numpy as np +import itertools +import os +from optparse import OptionParser + + +def add_block(x0, y0, length, char_length, geom): + coords = np.array([ + [x0, y0, 0.0], + [x0 + length, y0, 0.0], + [x0 + length, y0 + length, 0.0], + [x0, y0 + length, 0.0] + ]) + return geom.add_polygon(coords, char_length) + + +def main(): + print("---------- Start Creating the mesh ------------") + print("Parsing options") + # --- parse options --- + parser = OptionParser() + parser.add_option("-o", "--output_name", dest="output_name", default="../lattice_unstructured") + parser.add_option("-c", "--char_length", dest="char_length", default=0.01) + (options, args) = parser.parse_args() + + options.output_name = str(options.output_name) + options.char_length = float(options.char_length) + char_length = options.char_length + geom = pg.opencascade.Geometry() + domain = add_block(-3.5, -3.5, 7, char_length, geom) + xpos = ypos = [1 - 3.5, 2 - 3.5, 3 - 3.5, 4 - 3.5, 5 - 3.5] + pattern = list(itertools.product(xpos, ypos))[::2] + pattern.pop(7) + boxes = [domain] + for pos in pattern: + boxes.append(add_block(pos[0], pos[1], 1, char_length, geom)) + geom.boolean_fragments(boxes, []) + geom.add_physical(domain.lines, label="void") + + #geom.add_raw_code("Transfinite Surface{:};") + #geom.add_raw_code('Mesh.Algorithm= 3;') + #geom.add_raw_code("Recombine Surface {:} = 0;") + + mesh_code = geom.get_code() + with open(options.output_name + ".geo", "w") as mesh_file: + mesh_file.write(mesh_code) + os.system('gmsh ' + options.output_name + '.geo -2 -format su2 -save_all') + os.system('gmsh ' + options.output_name + '.geo -2 -format v -save_all') + # os.system('gmsh ' + options.output_name + '.geo') + # os.system('rm ' + options.output_name + '.geo') + print("---------- Successfully created the mesh ------------") + + +if __name__ == '__main__': + main() diff --git a/examples/meshes/create_linesource_mesh.py b/examples/meshes/meshing_scripts/create_linesource_mesh.py similarity index 100% rename from examples/meshes/create_linesource_mesh.py rename to examples/meshes/meshing_scripts/create_linesource_mesh.py diff --git a/examples/meshes/create_structured_2dmesh.py b/examples/meshes/meshing_scripts/create_structured_2dmesh.py similarity index 90% rename from examples/meshes/create_structured_2dmesh.py rename to examples/meshes/meshing_scripts/create_structured_2dmesh.py index 969f1089..6957fe52 100644 --- a/examples/meshes/create_structured_2dmesh.py +++ b/examples/meshes/meshing_scripts/create_structured_2dmesh.py @@ -5,17 +5,16 @@ from optparse import OptionParser -def add_block(x0,y0,lengthX, lengthY,char_length,geom): +def add_block(x0, y0, lengthX, lengthY, char_length, geom): coords = np.array([ [x0, y0, 0.0], - [x0+lengthX, y0, 0.0], - [x0+lengthX, y0+lengthY, 0.0], - [x0, y0+lengthY, 0.0] + [x0 + lengthX, y0, 0.0], + [x0 + lengthX, y0 + lengthY, 0.0], + [x0, y0 + lengthY, 0.0] ]) return geom.add_polygon(coords, char_length) - def main(): print("---------- Start Creating the mesh ------------") print("Parsing options") @@ -23,9 +22,9 @@ def main(): parser = OptionParser() parser.add_option("-o", "--output_name", dest="output_name", default="struct_2dmesh") parser.add_option("-c", "--char_length", dest="char_length", default=0.01) - parser.add_option("-s", "--start_pt", dest="start_pt", nargs=2, default=(0,0)) - parser.add_option("-l", "--length", dest="length", nargs=2, default=(1,1)) - parser.add_option("-b", "--boundary", dest="b_type", default="dirichletNeumann") + parser.add_option("-s", "--start_pt", dest="start_pt", nargs=2, default=(0, 0)) + parser.add_option("-l", "--length", dest="length", nargs=2, default=(1, 1)) + parser.add_option("-b", "--boundary", dest="b_type", default="void") (options, args) = parser.parse_args() options.output_name = str(options.output_name) @@ -38,7 +37,7 @@ def main(): y0 = float(options.start_pt[1]) geom = pg.opencascade.Geometry() - domain = add_block(x0,y0,lengthX, lengthY,char_length,geom) + domain = add_block(x0, y0, lengthX, lengthY, char_length, geom) if options.b_type == "void": geom.add_physical(domain.lines, label="void") diff --git a/examples/meshes/create_structured_hohlraum_2d_mesh.py b/examples/meshes/meshing_scripts/create_structured_symmterichohlraum_2d_mesh.py similarity index 54% rename from examples/meshes/create_structured_hohlraum_2d_mesh.py rename to examples/meshes/meshing_scripts/create_structured_symmterichohlraum_2d_mesh.py index 5decf507..b8edcc9a 100644 --- a/examples/meshes/create_structured_hohlraum_2d_mesh.py +++ b/examples/meshes/meshing_scripts/create_structured_symmterichohlraum_2d_mesh.py @@ -5,27 +5,35 @@ from optparse import OptionParser -def add_block(x0,y0,lengthX, lengthY,char_length,geom): - coords = np.array([ - [x0, y0, 0.0], - [x0+lengthX, y0, 0.0], - [x0+lengthX, y0+lengthY, 0.0], - [x0, y0+lengthY, 0.0] - ]) +def add_block(x0, y0, lengthX, lengthY, char_length, geom): + coords = np.array( + [ + [x0, y0, 0.0], + [x0 + lengthX, y0, 0.0], + [x0 + lengthX, y0 + lengthY, 0.0], + [x0, y0 + lengthY, 0.0], + ] + ) return geom.add_polygon(coords, char_length) - def main(): print("---------- Start Creating the mesh ------------") print("Parsing options") # --- parse options --- parser = OptionParser() - parser.add_option("-o", "--output_name", dest="output_name", default="struct_2dmesh") + parser.add_option( + "-o", + "--output_name", + dest="output_name", + default="struct_mesh_symmetric_hohlraum", + ) parser.add_option("-c", "--char_length", dest="char_length", default=0.01) - parser.add_option("-s", "--start_pt", dest="start_pt", nargs=2, default=(0,0)) - parser.add_option("-l", "--length", dest="length", nargs=2, default=(1,1)) - parser.add_option("-b", "--boundary", dest="b_type", default="void") + parser.add_option( + "-s", "--start_pt", dest="start_pt", nargs=2, default=(-0.65, -0.65) + ) + parser.add_option("-l", "--length", dest="length", nargs=2, default=(1.3, 1.3)) + parser.add_option("-b", "--boundary", dest="b_type", default="dirichletNeumann") (options, args) = parser.parse_args() options.output_name = str(options.output_name) @@ -38,7 +46,7 @@ def main(): y0 = float(options.start_pt[1]) geom = pg.opencascade.Geometry() - domain = add_block(x0,y0,lengthX, lengthY,char_length,geom) + domain = add_block(x0, y0, lengthX, lengthY, char_length, geom) if options.b_type == "void": geom.add_physical(domain.lines, label="void") @@ -56,35 +64,36 @@ def main(): geom.add_physical(void, label="void") elif options.b_type == "dirichletNeumann": - dirichlet = list() - wall_low = list() - wall_up = list() - wall_low.append(domain.lines[0]) - wall_up.append(domain.lines[2]) - - dirichlet.append(domain.lines[1]) - dirichlet.append(domain.lines[3]) - - geom.add_physical(dirichlet, label="dirichlet") - geom.add_physical(wall_low, label="wall_low") - geom.add_physical(wall_up, label="wall_up") - print("| Neumann marker has tag wall_low and wall_up") - print("| Dirichlet marker has tag dirichlet") + dirichlet_wall_up = list() + dirichlet_wall_low = list() + neumann_wall_left = list() + neumann_wall_right = list() + dirichlet_wall_low.append(domain.lines[0]) + dirichlet_wall_up.append(domain.lines[2]) + + neumann_wall_left.append(domain.lines[1]) + neumann_wall_right.append(domain.lines[3]) + + geom.add_physical(dirichlet_wall_up, label="wall_low") + geom.add_physical(dirichlet_wall_low, label="wall_up") + geom.add_physical(neumann_wall_left, label="wall_left") + geom.add_physical(neumann_wall_right, label="wall_right") + print("| Wall marker have tags wall_left, wall_right, wall_up, and wall_low") else: print("Boundary condition not yet implemented") geom.add_raw_code("Transfinite Surface{:};") - geom.add_raw_code('Mesh.Algorithm= 3;') + geom.add_raw_code("Mesh.Algorithm= 3;") geom.add_raw_code("Recombine Surface {:} = 0;") mesh_code = geom.get_code() with open(options.output_name + ".geo", "w") as mesh_file: mesh_file.write(mesh_code) - os.system('gmsh ' + options.output_name + '.geo -2 -format su2 -save_all') - os.system('rm ' + options.output_name + '.geo') + os.system("gmsh " + options.output_name + ".geo -2 -format su2 -save_all") + os.system("rm " + options.output_name + ".geo") print("---------- Successfully created the mesh ------------") -if __name__ == '__main__': +if __name__ == "__main__": main() diff --git a/examples/meshes/meshing_scripts/lattice.py b/examples/meshes/meshing_scripts/lattice.py new file mode 100644 index 00000000..de2a69a6 --- /dev/null +++ b/examples/meshes/meshing_scripts/lattice.py @@ -0,0 +1,106 @@ +# ------------------------------------------------------------------------------ +# +# Gmsh Python tutorial 12 +# +# Cross-patch meshing with compounds +# +# ------------------------------------------------------------------------------ + +import gmsh +import sys +from optparse import OptionParser + + +def main(filename, lc, sigma_t): + # Specify domain + refinement_box_width = 0.02 + transition_thickness = 0.02 + + x = [-3.5, 3.5] + y = [-3.5, 3.5] + + x_inner = [-2.5, -2.5, -2.5, -1.5, -1.5, -0.5, -0.5, .5, .5, 1.5, 1.5, 1.5] + y_inner = [1.5, -0.5, -2.5, 0.5, -1.5, -0.5, -2.5, 0.5, -1.5, 1.5, -0.5, -2.5, ] + + gmsh.initialize() # initialize gmsh + + domain = gmsh.model.occ.addRectangle(x[0], y[0], 0, 7, 7) + + gmsh.model.occ.synchronize() + + geometries = [(2, domain)] + for x_i, y_i in zip(x_inner, y_inner): + box = gmsh.model.occ.addRectangle(x_i, y_i, 0, 1, 1) + geometries.append((2, box)) + + ov, ovv = gmsh.model.occ.fragment(geometries, []) # stitch together geometries + gmsh.model.occ.synchronize() + + # Generate refinement areas in mesh + box_x = [(-2.5, -2.5), (-2.5, -2.5), (-2.5, -2.5), (-1.5, -1.5), (-.5, -.5), (0.5, 0.5), (1.5, 1.5), (2.5, 2.5), + (2.5, 2.5), (2.5, 2.5), + (-2.5, -1.5), (1.5, 2.5), (-2.5, -.5), (.5, 2.5), (-2.5, 2.5), (-2.5, 2.5), (-2.5, 2.5), (-2.5, -1.5), + (-0.5, 0.5), (1.5, 2.5), ] + box_y = [(-2.5, -1.5), (-0.5, 0.5), (1.5, 2.5), (-2.5, 2.5), (-2.5, 1.5), (-2.5, 1.5), (-2.5, 2.5), (-2.5, -1.5), + (-0.5, 0.5), (1.5, 2.5), + (2.5, 2.5), (2.5, 2.5), (1.5, 1.5), (1.5, 1.5), (0.5, 0.5), (-0.5, -0.5), (-1.5, -1.5), (-2.5, -2.5), + (-2.5, -2.5), (-2.5, -2.5), ] + fields = [] + + for (b_x_i, b_y_i) in zip(box_x, box_y): # Generate mesh refinement boxes around the absortion boundaries + field = gmsh.model.mesh.field.add("Box") + gmsh.model.mesh.field.setNumber(field, "VIn", lc / sigma_t) + gmsh.model.mesh.field.setNumber(field, "VOut", lc) + gmsh.model.mesh.field.setNumber(field, "XMin", b_x_i[0] - refinement_box_width) + gmsh.model.mesh.field.setNumber(field, "XMax", b_x_i[1] + refinement_box_width) + gmsh.model.mesh.field.setNumber(field, "YMin", b_y_i[0] - refinement_box_width) + gmsh.model.mesh.field.setNumber(field, "YMax", b_y_i[1] + refinement_box_width) + gmsh.model.mesh.field.setNumber(field, "Thickness", transition_thickness) + fields.append(field) + # Finally, let's use the minimum of all the fields as the background mesh field: + min_field = gmsh.model.mesh.field.add("Min") + gmsh.model.mesh.field.setNumbers(min_field, "FieldsList", fields) + gmsh.model.mesh.field.setAsBackgroundMesh(min_field) + gmsh.model.occ.synchronize() + + # mark boundaries + boundary_lines = gmsh.model.occ.getEntities(1) # 1 specifies edges (lines) + surface = gmsh.model.occ.getEntities(2) # 1 specifies edges (lines) + + boundary_marker = gmsh.model.addPhysicalGroup(1, [l[1] for l in boundary_lines[:4]]) + gmsh.model.setPhysicalName(1, boundary_marker, "void") + surface_marker = gmsh.model.addPhysicalGroup(2, [s[1] for s in surface]) + gmsh.model.setPhysicalName(2, surface_marker, "domain") + gmsh.model.occ.synchronize() + + gmsh.model.mesh.generate(2) + + # gmsh.write(filename + ".msh") + # os.system('gmsh ' + filename + '.msh -2 -format su2 -save_all') + + gmsh.write(filename + ".vtk") + gmsh.write(filename + ".su2") + # gmsh.write(filename + ".geo_unrolled") + # Launch the GUI to see the results: + # if '-nopopup' not in sys.argv: + # gmsh.fltk.run() + # os.system('gmsh ' + filename + '.geo_unrolled -2 -format su2 -save_all') + + gmsh.finalize() # finalize gmsh + + return 0 + + +if __name__ == '__main__': + print("---------- Start Creating the mesh ------------") + print("Parsing options") + # --- parse options --- + parser = OptionParser() + parser.add_option("-o", "--output_name", dest="output_name", default="../lattice_refined") + parser.add_option("-c", "--char_length", dest="char_length", default=0.5) + parser.add_option("-s", "--sigma_t", dest="sigma_t", default=11) + (options, args) = parser.parse_args() + options.output_name = str(options.output_name) + options.char_length = float(options.char_length) + options.sigma_t = float(options.sigma_t) + main(options.output_name, options.char_length, options.sigma_t) diff --git a/examples/meshes/meshing_scripts/lattice_pygmsh7.py b/examples/meshes/meshing_scripts/lattice_pygmsh7.py new file mode 100644 index 00000000..1695c508 --- /dev/null +++ b/examples/meshes/meshing_scripts/lattice_pygmsh7.py @@ -0,0 +1,103 @@ +import numpy as np +import pygmsh +import os +import pyvista + +lc = 100.0 # Characteristic length of mesh +xmin, xmax = 0.0, 2000.0 # X axis boundaries +zmin, zmax = -500.0, -2500.0 # Z axis boundaries + +inj_z = -1500.0 # Depth of injection +flt_offset = 50.0 # Offset of fault +flt_thick = 10.0 # Thickness of fault +tana = np.tan(np.deg2rad(80.0)) # Tangeant of dipping angle of fault +dist = 500.0 - 0.5 * flt_thick # Distance from injection point (0.0, -1500.0) to left wall of fault + +bnd_thick = 10.0 # Thickness of boundary elements + +bound_right_pts = [ + [xmax, zmin, 0.0], + [xmax + bnd_thick, zmin, 0.0], + [xmax + bnd_thick, zmax, 0.0], + [xmax, zmax, 0.0], + [xmax, -1700.0 + flt_offset, 0.0], + [xmax, -1550.0 + flt_offset, 0.0], + [xmax, -1450.0 + flt_offset, 0.0], + [xmax, -1300.0 + flt_offset, 0.0], +] +bound_top_pts = [ + [xmin, zmin, 0.0], + [dist + (zmin - inj_z) / tana, zmin, 0.0], + [dist + (zmin - inj_z) / tana + flt_thick, zmin, 0.0], + [xmax, zmin, 0.0], + [xmax + bnd_thick, zmin, 0.0], + [xmax + bnd_thick, zmin + bnd_thick, 0.0], + [dist + (zmin - inj_z + bnd_thick) / tana + flt_thick, zmin + bnd_thick, 0.0], + [dist + (zmin - inj_z + bnd_thick) / tana, zmin + bnd_thick, 0.0], + [xmin, zmin + bnd_thick, 0.0], +] +bound_bot_pts = [ + [xmin, zmax, 0.0], + [dist + (zmax - inj_z) / tana, zmax, 0.0], + [dist + (zmax - inj_z) / tana + flt_thick, zmax, 0.0], + [xmax, zmax, 0.0], + [xmax + bnd_thick, zmax, 0.0], + [xmax + bnd_thick, zmax - bnd_thick, 0.0], + [dist + (zmax - inj_z - bnd_thick) / tana + flt_thick, zmax - bnd_thick, 0.0], + [dist + (zmax - inj_z - bnd_thick) / tana, zmax - bnd_thick, 0.0], + [xmin, zmax - bnd_thick, 0.0], +] + + +def add_block(x0, y0, length): + coords = np.array([ + [x0, y0, 0.0], + [x0 + length, y0, 0.0], + [x0 + length, y0 + length, 0.0], + [x0, y0 + length, 0.0] + ]) + return coords + + +lc = 0.1 +x_inner = [-2.5, -2.5, -2.5, -1.5, -1.5, -0.5, -0.5, .5, .5, 1.5, 1.5, 1.5] +y_inner = [1.5, -0.5, -2.5, 0.5, -1.5, -0.5, -2.5, 0.5, -1.5, 1.5, -0.5, -2.5] + +boxes = [] +for x_i, y_i in zip(x_inner, y_inner): + box = add_block(x_i, y_i, 1) + boxes.append(box) + +domain_edge_pts = [[-3.5, -3.5, 0], [3.5, -3.5, 0], [3.5, 3.5, 0], [-3.5, 3.5, 0]] +with pygmsh.geo.Geometry() as geo: + # Define polygons + + domain = geo.add_polygon(domain_edge_pts, mesh_size=lc) + # geo.boolean_fragments([domain], []) + + # geo.add_physical(domain, "domain") + geo.add_physical(domain.lines, label="void") + + # Remove duplicate entities + mesh = geo.generate_mesh(dim=2) # algorithm=6 + + # Export the mesh for post-processing + mesh.write("mesh.vtk") + mesh.write("../mesh2.su2") + mesh.write("../mesh2.geo_unrolled") + # mesh_code = geo.get_code() + # with open("mesh.geo", "w") as mesh_file: + # mesh_file.write(mesh_code) + # os.system('gmsh ' + 'mesh.geo -2 -format su2 -save_all') + +pyvista.set_plot_theme("document") + +p = pyvista.Plotter(window_size=(800, 800)) +p.add_mesh( + mesh=pyvista.from_meshio(mesh), + scalar_bar_args={"title": "Materials"}, + show_scalar_bar=True, + show_edges=True, +) +p.view_xy() +p.show() diff --git a/examples/meshes/pseudo1dmesh.py b/examples/meshes/meshing_scripts/pseudo1dmesh.py similarity index 100% rename from examples/meshes/pseudo1dmesh.py rename to examples/meshes/meshing_scripts/pseudo1dmesh.py diff --git a/examples/meshes/meshing_scripts/test.py b/examples/meshes/meshing_scripts/test.py new file mode 100644 index 00000000..2680664a --- /dev/null +++ b/examples/meshes/meshing_scripts/test.py @@ -0,0 +1,185 @@ +import numpy as np +import pygmsh +import os +import pyvista + +lc = 100.0 # Characteristic length of mesh +xmin, xmax = 0.0, 2000.0 # X axis boundaries +zmin, zmax = -500.0, -2500.0 # Z axis boundaries + +inj_z = -1500.0 # Depth of injection +flt_offset = 50.0 # Offset of fault +flt_thick = 10.0 # Thickness of fault +tana = np.tan(np.deg2rad(80.0)) # Tangeant of dipping angle of fault +dist = 500.0 - 0.5 * flt_thick # Distance from injection point (0.0, -1500.0) to left wall of fault + +bnd_thick = 10.0 # Thickness of boundary elements + +depths = [zmin, -1300.0, -1450.0, -1550.0, -1700.0, zmax] +fault_left = [[dist + (z - inj_z) / tana, z, 0.0] for z in depths] + +depths = [zmin, -1300.0 + flt_offset, -1450.0 + flt_offset, -1550.0 + flt_offset, -1700.0 + flt_offset, zmax] +fault_right = [[dist + (z - inj_z) / tana + flt_thick, z, 0.0] for z in depths] + +fault_pts = fault_left + fault_right[::-1] + +cenaq_left_pts = [ + [xmin, -1450.0, 0.0], + [dist + (-1450.0 - inj_z) / tana, -1450.0, 0.0], + [dist + (-1550.0 - inj_z) / tana, -1550.0, 0.0], + [xmin, -1550.0, 0.0], +] +capro_top_left_pts = [ + [xmin, -1300.0, 0.0], + [dist + (-1300.0 - inj_z) / tana, -1300.0, 0.0], + [dist + (-1450.0 - inj_z) / tana, -1450.0, 0.0], + [xmin, -1450.0, 0.0], +] +capro_bot_left_pts = [ + [xmin, -1550.0, 0.0], + [dist + (-1550.0 - inj_z) / tana, -1550.0, 0.0], + [dist + (-1700.0 - inj_z) / tana, -1700.0, 0.0], + [xmin, -1700.0, 0.0], +] +uppaq_left_pts = [ + [xmin, zmin, 0.0], + [dist + (zmin - inj_z) / tana, zmin, 0.0], + [dist + (-1300.0 - inj_z) / tana, -1300.0, 0.0], + [xmin, -1300.0, 0.0], +] +basaq_left_pts = [ + [xmin, -1700.0, 0.0], + [dist + (-1700.0 - inj_z) / tana, -1700.0, 0.0], + [dist + (zmax - inj_z) / tana, zmax, 0.0], + [xmin, zmax, 0.0], +] + +cenaq_right_pts = [ + [dist + (-1450.0 - inj_z + flt_offset) / tana + flt_thick, -1450.0 + flt_offset, 0.0], + [xmax, -1450.0 + flt_offset, 0.0], + [xmax, -1550.0 + flt_offset, 0.0], + [dist + (-1550.0 - inj_z + flt_offset) / tana + flt_thick, -1550.0 + flt_offset, 0.0], +] +capro_top_right_pts = [ + [dist + (-1300.0 - inj_z + flt_offset) / tana + flt_thick, -1300.0 + flt_offset, 0.0], + [xmax, -1300.0 + flt_offset, 0.0], + [xmax, -1450.0 + flt_offset, 0.0], + [dist + (-1450.0 - inj_z + flt_offset) / tana + flt_thick, -1450.0 + flt_offset, 0.0], +] +capro_bot_right_pts = [ + [dist + (-1550.0 - inj_z + flt_offset) / tana + flt_thick, -1550.0 + flt_offset, 0.0], + [xmax, -1550.0 + flt_offset, 0.0], + [xmax, -1700.0 + flt_offset, 0.0], + [dist + (-1700.0 - inj_z + flt_offset) / tana + flt_thick, -1700.0 + flt_offset, 0.0], +] +uppaq_right_pts = [ + [dist + (zmin - inj_z) / tana + flt_thick, zmin, 0.0], + [xmax, zmin, 0.0], + [xmax, -1300.0 + flt_offset, 0.0], + [dist + (-1300.0 - inj_z + flt_offset) / tana + flt_thick, -1300.0 + flt_offset, 0.0], +] +basaq_right_pts = [ + [dist + (-1700.0 - inj_z + flt_offset) / tana + flt_thick, -1700.0 + flt_offset, 0.0], + [xmax, -1700.0 + flt_offset, 0.0], + [xmax, zmax, 0.0], + [dist + (zmax - inj_z) / tana + flt_thick, zmax, 0.0], +] + +bound_right_pts = [ + [xmax, zmin, 0.0], + [xmax + bnd_thick, zmin, 0.0], + [xmax + bnd_thick, zmax, 0.0], + [xmax, zmax, 0.0], + [xmax, -1700.0 + flt_offset, 0.0], + [xmax, -1550.0 + flt_offset, 0.0], + [xmax, -1450.0 + flt_offset, 0.0], + [xmax, -1300.0 + flt_offset, 0.0], +] +bound_top_pts = [ + [xmin, zmin, 0.0], + [dist + (zmin - inj_z) / tana, zmin, 0.0], + [dist + (zmin - inj_z) / tana + flt_thick, zmin, 0.0], + [xmax, zmin, 0.0], + [xmax + bnd_thick, zmin, 0.0], + [xmax + bnd_thick, zmin + bnd_thick, 0.0], + [dist + (zmin - inj_z + bnd_thick) / tana + flt_thick, zmin + bnd_thick, 0.0], + [dist + (zmin - inj_z + bnd_thick) / tana, zmin + bnd_thick, 0.0], + [xmin, zmin + bnd_thick, 0.0], +] +bound_bot_pts = [ + [xmin, zmax, 0.0], + [dist + (zmax - inj_z) / tana, zmax, 0.0], + [dist + (zmax - inj_z) / tana + flt_thick, zmax, 0.0], + [xmax, zmax, 0.0], + [xmax + bnd_thick, zmax, 0.0], + [xmax + bnd_thick, zmax - bnd_thick, 0.0], + [dist + (zmax - inj_z - bnd_thick) / tana + flt_thick, zmax - bnd_thick, 0.0], + [dist + (zmax - inj_z - bnd_thick) / tana, zmax - bnd_thick, 0.0], + [xmin, zmax - bnd_thick, 0.0], +] + +with pygmsh.geo.Geometry() as geo: + # Define polygons + fault = geo.add_polygon(fault_pts, mesh_size=0.1 * lc) + cenaq_left = geo.add_polygon(cenaq_left_pts, mesh_size=0.1 * lc) + capro_top_left = geo.add_polygon(capro_top_left_pts, mesh_size=0.2 * lc) + capro_bot_left = geo.add_polygon(capro_bot_left_pts, mesh_size=0.2 * lc) + uppaq_left = geo.add_polygon(uppaq_left_pts, mesh_size=2.0 * lc) + basaq_left = geo.add_polygon(basaq_left_pts, mesh_size=2.0 * lc) + cenaq_right = geo.add_polygon(cenaq_right_pts, mesh_size=0.75 * lc) + capro_top_right = geo.add_polygon(capro_top_right_pts, mesh_size=0.75 * lc) + capro_bot_right = geo.add_polygon(capro_bot_right_pts, mesh_size=0.75 * lc) + uppaq_right = geo.add_polygon(uppaq_right_pts, mesh_size=2.0 * lc) + basaq_right = geo.add_polygon(basaq_right_pts, mesh_size=2.0 * lc) + bound_right = geo.add_polygon(bound_right_pts, mesh_size=lc) + bound_top = geo.add_polygon(bound_top_pts, mesh_size=lc) + bound_bot = geo.add_polygon(bound_bot_pts, mesh_size=lc) + + # Define materials + geo.add_physical([uppaq_left, uppaq_right], "UPPAQ") + geo.add_physical([capro_top_left, capro_bot_left, capro_top_right, capro_bot_right], "CAPRO") + geo.add_physical([cenaq_left, cenaq_right], "CENAQ") + geo.add_physical([basaq_left, basaq_right], "BASAQ") + geo.add_physical(fault, "FAULT") + geo.add_physical([bound_right, bound_top, bound_bot], "BOUND") + + # Remove duplicate entities + geo.env.removeAllDuplicates() + mesh = geo.generate_mesh(dim=2, algorithm=6) + + # Convert cell sets to material + cell_data = [np.empty(len(c.data), dtype=int) for c in mesh.cells] + field_data = {} + for i, (k, v) in enumerate(mesh.cell_sets.items()): + if k: + field_data[k] = np.array([i + 1, 3]) + for ii, vv in enumerate(v): + cell_data[ii][vv] = i + 1 + mesh.cell_data["material"] = cell_data + mesh.field_data.update(field_data) + mesh.cell_sets = {} + + # Remove lower dimension entities + idx = [i for i, cell in enumerate(mesh.cells) if cell.type == "triangle"] + mesh.cells = [mesh.cells[i] for i in idx] + mesh.cell_data = {k: [v[i] for i in idx] for k, v in mesh.cell_data.items()} + + # Export the mesh for post-processing + mesh.write("mesh.vtk") + mesh.write("mesh2.su2") + # mesh_code = geo.get_code() + # with open("mesh.geo", "w") as mesh_file: + # mesh_file.write(mesh_code) + # os.system('gmsh ' + 'mesh.geo -2 -format su2 -save_all') + +pyvista.set_plot_theme("document") + +p = pyvista.Plotter(window_size=(800, 800)) +p.add_mesh( + mesh=pyvista.from_meshio(mesh), + scalar_bar_args={"title": "Materials"}, + show_scalar_bar=True, + show_edges=True, +) +p.view_xy() +p.show() diff --git a/examples/meshes/meshing_scripts/test2.py b/examples/meshes/meshing_scripts/test2.py new file mode 100644 index 00000000..092ff82a --- /dev/null +++ b/examples/meshes/meshing_scripts/test2.py @@ -0,0 +1,47 @@ +import numpy +import meshio +import gmsh +import pygmsh + +resolution = 0.01 +# Channel parameters +L = 2.2 +H = 0.41 +c = [0.2, 0.2, 0] +r = 0.05 + +domain_edge_pts = [[-3.5, -3.5, 0], [3.5, -3.5, 0], [3.5, 3.5, 0], [-3.5, 3.5, 0]] + +# Initialize empty geometry using the build in kernel in GMSH +geometry = pygmsh.geo.Geometry() +# Fetch model we would like to add data to +model = geometry.__enter__() +# Add circle +# circle = model.add_circle(c, r, mesh_size=resolution) + +# Add points that bound the domain +points = [model.add_point(domain_edge_pts[0], mesh_size=resolution), + model.add_point(domain_edge_pts[1], mesh_size=resolution), + model.add_point(domain_edge_pts[2], mesh_size=resolution), + model.add_point(domain_edge_pts[3], mesh_size=resolution)] +# Add lines between all points creating the rectangle +channel_lines = [model.add_line(points[i], points[i + 1]) + for i in range(-1, len(points) - 1)] +# Create a line loop and plane surface for meshing +channel_loop = model.add_curve_loop(channel_lines) +plane_surface = model.add_plane_surface(channel_loop) + +# Call gmsh kernel before add physical entities +model.synchronize() + +volume_marker = 6 +model.add_physical([plane_surface], "Volume") +model.add_physical([channel_lines[0], channel_lines[1], channel_lines[2], channel_lines[3]], "void") + +geometry.generate_mesh(dim=2) +gmsh.write("mesh_test2.msh") +gmsh.write("../mesh_test2.su2") +gmsh.write("mesh_test2.vtk") + +gmsh.clear() +geometry.__exit__() diff --git a/examples/meshes/phantom2D.vtk b/examples/meshes/phantom2D.vtk deleted file mode 100644 index 5be52dc7..00000000 Binary files a/examples/meshes/phantom2D.vtk and /dev/null differ diff --git a/examples/meshes/pseudo1d.py b/examples/meshes/pseudo1d.py deleted file mode 100644 index e69de29b..00000000 diff --git a/examples/meshes/structuredMesh.geo b/examples/meshes/structuredMesh.geo deleted file mode 100644 index 76356e6f..00000000 --- a/examples/meshes/structuredMesh.geo +++ /dev/null @@ -1,33 +0,0 @@ -nCells = 199; -length = 1.0; -//+ -Point(1) = {0, length, 0, 1.0}; -//+ -Point(2) = {length, length, 0, 1.0}; -//+ -Point(3) = {length, 0, 0, 1.0}; -//+ -Point(4) = {0, 0, 0, 1.0}; -//+ -Line(1) = {1, 4}; -//+ -Line(2) = {4, 3}; -//+ -Line(3) = {3, 2}; -//+ -Line(4) = {2, 1}; -//+ -Curve Loop(1) = {1, 2, 3, 4}; -//+ -Plane Surface(1) = {1}; -//+ -Physical Curve("void", 5) = {1, 4, 2, 3}; - -//+ -Transfinite Surface {1} = {4, 3, 2, 1}; -//+ -Transfinite Curve {1, 3} = nCells Using Progression 1; -//+ -Transfinite Curve {4, 2} = nCells Using Progression 1; -//+ -Recombine Surface {1}; diff --git a/examples/meshes/structuredTriangleMesh.geo b/examples/meshes/structuredTriangleMesh.geo deleted file mode 100644 index 2988fdee..00000000 --- a/examples/meshes/structuredTriangleMesh.geo +++ /dev/null @@ -1,30 +0,0 @@ -NCells = 149; -//+ -Point(1) = {0, 1, 0, 1.0}; -//+ -Point(2) = {1, 1, 0, 1.0}; -//+ -Point(3) = {1, 0, 0, 1.0}; -//+ -Point(4) = {0, 0, 0, 1.0}; -//+ -Line(1) = {1, 4}; -//+ -Line(2) = {4, 3}; -//+ -Line(3) = {3, 2}; -//+ -Line(4) = {2, 1}; -//+ -Curve Loop(1) = {1, 2, 3, 4}; -//+ -Plane Surface(1) = {1}; -//+ -Physical Curve("void", 5) = {1, 4, 2, 3}; - -//+ -Transfinite Surface {1} = {4, 3, 2, 1}; -//+ -Transfinite Curve {1, 3} = NCells Using Progression 1; -//+ -Transfinite Curve {4, 2} = NCells Using Progression 1; diff --git a/examples_hpc/quarter_hohlraum/mesh/make_quarterHohlraum_mesh.sh b/examples_hpc/quarter_hohlraum/mesh/make_quarterHohlraum_mesh.sh new file mode 100644 index 00000000..20d048a4 --- /dev/null +++ b/examples_hpc/quarter_hohlraum/mesh/make_quarterHohlraum_mesh.sh @@ -0,0 +1,17 @@ +#rm lattice_n20.su2 lattice_n20.con +#rm lattice_n40.su2 lattice_n40.con +#rm lattice_n80.su2 lattice_n80.con +rm quarter_sym_hohlraum_p02.su2 quarter_sym_hohlraum_p02.con +rm quarter_sym_hohlraum_p01.su2 quarter_sym_hohlraum_p01.con +rm quarter_sym_hohlraum_p005.su2 quarter_sym_hohlraum_p005.con +rm quarter_sym_hohlraum_p0025.su2 quarter_sym_hohlraum_p0025.con +rm quarter_sym_hohlraum_p00125.su2 quarter_sym_hohlraum_p00125.con +rm quarter_sym_hohlraum_p00075.su2 quarter_sym_hohlraum_p00075.con + + +gmsh quarter_sym_hohlraum_p02.geo -2 -format su2 -save_all -o quarter_sym_hohlraum_p02.su2 +gmsh quarter_sym_hohlraum_p01.geo -2 -format su2 -save_all -o quarter_sym_hohlraum_p01.su2 +gmsh quarter_sym_hohlraum_p005.geo -2 -format su2 -save_all -o quarter_sym_hohlraum_p005.su2 +gmsh quarter_sym_hohlraum_p0025.geo -2 -format su2 -save_all -o quarter_sym_hohlraum_p0025.su2 +gmsh quarter_sym_hohlraum_p00125.geo -2 -format su2 -save_all -o quarter_sym_hohlraum_p00125.su2 +gmsh quarter_sym_hohlraum_p00075.geo -2 -format su2 -save_all -o quarter_sym_hohlraum_p00075.su2 diff --git a/examples_hpc/quarter_hohlraum/mesh/quarter_sym_hohlraum.geo b/examples_hpc/quarter_hohlraum/mesh/quarter_sym_hohlraum.geo new file mode 100644 index 00000000..3703e04d --- /dev/null +++ b/examples_hpc/quarter_hohlraum/mesh/quarter_sym_hohlraum.geo @@ -0,0 +1,142 @@ +cl_fine = 0.01; +cl_finer = cl_fine / 3; + +// Outer points +Point(1) = {0.65, 0.65, 0, cl_fine}; +Point(2) = {0., 0.65, 0, cl_fine}; +Point(3) = {0.65, 0., 0, cl_fine}; +Point(4) = {0., 0., 0, cl_fine}; + +// Geometry features +// Black +Point(6) = {0.65, 0.6, 0, cl_fine}; + +Point(13) = {0.65, 0.4, 0, cl_fine}; +Point(14) = {0.6, 0.4, 0, cl_fine}; +Point(15) = {0.6, 0.0, 0, cl_fine}; + + +// Green (and blue) + +Point(19) = {0.2, 0.4, 0, cl_finer}; +Point(20) = {0, 0.4, 0, cl_finer}; +Point(21) = {0.2, 0, 0, cl_finer}; + +Point(22) = {0.15, 0.35, 0, cl_finer}; +Point(23) = {0.0, 0.35, 0, cl_finer}; +Point(24) = {0.15, 0.0, 0, cl_finer}; + + + +// Helper points and lines +Point(27) = {0.6, 0.6, 0, cl_fine}; + + + +Point(44) = { cl_fine, 0.6 , 0, cl_finer*2}; +Point(45) = { 0, 0.6 , 0, cl_finer*2}; +Point(46) = {cl_fine, 0.6 - cl_fine, 0, cl_finer*2}; +Point(47) = {0, 0.6 - cl_fine, 0, cl_finer*2}; + +Point(52) = {0.4 + cl_fine, cl_fine, 0, cl_finer*2}; +Point(53) = {0.4 - cl_fine, cl_fine, 0, cl_finer*2}; +Point(54) = {0.4 + cl_fine, 0, 0, cl_finer*2}; +Point(55) = {0.4 - cl_fine, 0, 0, cl_finer*2}; + +//+ +Line(1) = {2, 1}; +//+ +Line(2) = {1, 6}; +//+ +Line(3) = {6, 13}; +//+ +Line(4) = {13, 3}; +//+ +Line(5) = {3, 15}; +//+ +Line(6) = {54, 55}; +//+ +Line(7) = {55, 21}; +//+ +Line(8) = {21, 24}; +//+ +Line(9) = {24, 4}; +//+ +Line(10) = {4, 23}; +//+ +Line(11) = {23, 20}; +//+ +Line(12) = {20, 47}; +//+ +Line(13) = {47, 45}; +//+ +Line(14) = {45, 2}; + + +Line(15) = {24, 22}; +//+ +Line(16) = {22, 23}; +//+ +Line(17) = {20, 19}; +//+ +Line(18) = {19, 21}; +//+ +Line(19) = {55, 53}; +//+ +Line(20) = {53, 52}; +//+ +Line(21) = {52, 54}; +//+ +Line(22) = {47, 46}; +//+ +Line(23) = {46, 44}; +//+ +Line(24) = {44, 45}; +//+ +Line(25) = {44, 27}; +//+ +Line(26) = {27, 6}; +//+ +Line(27) = {27, 14}; +//+ +Line(28) = {14, 13}; +//+ +Line(29) = {54, 15}; +//+ +Physical Curve("inflow", 60) = {3}; +//+ +Physical Curve("void", 60) += {1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12,13,14, 29}; +//+//+ +Line(30) = {14, 15}; +//+ +Curve Loop(1) = {10, -16, -15, 9}; +//+ +Plane Surface(1) = {1}; +//+ +Curve Loop(2) = {18, 8, 15, 16, 11, 17}; +//+ +Plane Surface(2) = {2}; +//+ +Curve Loop(3) = {7, -18, -17, 12, 22, 23, 25, 27, 30, -29, -21, -20, -19}; +//+ +Plane Surface(3) = {3}; +//+ +Curve Loop(4) = {23, 24, -13, 22}; +//+ +Plane Surface(4) = {4}; +//+ +Curve Loop(5) = {21, 6, 19, 20}; +//+ +Plane Surface(5) = {5}; +//+ +Curve Loop(6) = {5, -30, 28, 4}; +//+ +Plane Surface(6) = {6}; +//+ +Curve Loop(7) = {28, -3, -26, 27}; +//+ +Plane Surface(7) = {7}; +//+ +Curve Loop(8) = {26, -2, -1, -14, -24, 25}; +//+ +Plane Surface(8) = {8}; diff --git a/examples_hpc/quarter_hohlraum/quarter_hohlraum.cfg b/examples_hpc/quarter_hohlraum/quarter_hohlraum.cfg new file mode 100644 index 00000000..aac2a2b1 --- /dev/null +++ b/examples_hpc/quarter_hohlraum/quarter_hohlraum.cfg @@ -0,0 +1,52 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Hohlraum Benchmarking File MN % +% Author % +% Date 27.04.2022 % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% ---- File specifications ---- +% +OUTPUT_DIR = result +% Output file +OUTPUT_FILE = quarter_hohlraum_point01 +% Log directory +LOG_DIR = result/logs +% Log file +LOG_FILE = quarter_hohlraum_point01 +% Mesh File +MESH_FILE = mesh/quarter_hohlraum_point01.su2 +% +% ---- Problem specifications ---- +% +PROBLEM = QUARTER_HOHLRAUM +SPATIAL_DIM = 2 +% +% ---- Design Parameters --- +N_SAMPLING_PTS_LINE_GREEN = 100 +% +% ---- Solver specifications ---- +% +CFL_NUMBER = 0.7 +TIME_FINAL = 2 +SOLVER = SN_SOLVER +RECONS_ORDER = 2 +TIME_INTEGRATION_ORDER = 2 +% +% ---- Boundary Conditions ---- +% +BC_NEUMANN = ( void, inflow ) +% +% ---- Quadrature ---- +% +QUAD_TYPE = GAUSS_LEGENDRE_TENSORIZED_2D +QUAD_ORDER = 4 +% +% ----- Output ---- +% +VOLUME_OUTPUT = (MINIMAL) +VOLUME_OUTPUT_FREQUENCY = 0 +SCREEN_OUTPUT = ( ITER, WALL_TIME, MASS, RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT, CUR_OUTFLOW, TOTAL_OUTFLOW, MAX_OUTFLOW, TOTAL_PARTICLE_ABSORPTION_CENTER, TOTAL_PARTICLE_ABSORPTION_VERTICAL, TOTAL_PARTICLE_ABSORPTION_HORIZONTAL, PROBE_MOMENT_TIME_TRACE, VAR_ABSORPTION_GREEN) +SCREEN_OUTPUT_FREQUENCY = 20 +HISTORY_OUTPUT = ( ITER, WALL_TIME, MASS, RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT, CUR_OUTFLOW, TOTAL_OUTFLOW, MAX_OUTFLOW, TOTAL_PARTICLE_ABSORPTION_CENTER, TOTAL_PARTICLE_ABSORPTION_VERTICAL, TOTAL_PARTICLE_ABSORPTION_HORIZONTAL, PROBE_MOMENT_TIME_TRACE, VAR_ABSORPTION_GREEN) +HISTORY_OUTPUT_FREQUENCY = 1 + diff --git a/examples_hpc/sym_hohlraum/mesh/sym_hohlraum.geo b/examples_hpc/sym_hohlraum/mesh/sym_hohlraum.geo new file mode 100644 index 00000000..3bb978a3 --- /dev/null +++ b/examples_hpc/sym_hohlraum/mesh/sym_hohlraum.geo @@ -0,0 +1,407 @@ +n_recombine = 20; +n_recombine_coarse = n_recombine /2 ; +n_prog = 1.05; + +cl_fine = 0.1; + +// Outer points +Point(1) = {-0.65, -0.65, 0, cl_fine}; +Point(2) = {0.65, -0.65, 0, cl_fine}; +Point(3) = {-0.65, 0.65, 0, cl_fine}; +Point(4) = {0.65, 0.65, 0, cl_fine}; + +// Geometry features +// Black +Point(5) = {-0.65, 0.6, 0, cl_fine}; +Point(6) = {0.65, 0.6, 0, cl_fine}; +Point(7) = {-0.65, -0.6, 0, cl_fine}; +Point(8) = {0.65, -0.6, 0, cl_fine}; + +// Red +Point(9) = {-0.65, 0.4, 0, cl_fine}; +Point(10) = {-0.6, 0.4, 0, cl_fine}; +Point(11) = {-0.6, -0.4, 0, cl_fine}; +Point(12) = {-0.65, -0.4, 0, cl_fine}; + +Point(13) = {0.65, 0.4, 0, cl_fine}; +Point(14) = {0.6, 0.4, 0, cl_fine}; +Point(15) = {0.6, -0.4, 0, cl_fine}; +Point(16) = {0.65, -0.4, 0, cl_fine}; + +// Green (and blue) +Point(17) = {-0.2, -0.4, 0, cl_fine}; +Point(18) = {-0.2, 0.4, 0, cl_fine}; +Point(19) = {0.2, 0.4, 0, cl_fine}; +Point(20) = {0.2, -0.4, 0, cl_fine}; + +Point(21) = {-0.15, -0.35, 0, cl_fine}; +Point(22) = {-0.15, 0.35, 0, cl_fine}; +Point(23) = {0.15, 0.35, 0, cl_fine}; +Point(24) = {0.15, -0.35, 0, cl_fine}; + + + + +// Lines of basic geometric features +//+ +Line(1) = {3, 5}; +//+ +//+ +Line(3) = {6, 4}; +//+ +Line(5) = {7, 1}; +//+ +Line(8) = {2, 8}; +//+ +//+ +Line(10) = {12, 11}; +//+ +//+ +Line(13) = {10, 9}; +//+ +//+ +Line(15) = {15, 16}; +//+ +//+ +Line(17) = {13, 14}; +//+ +//+ +Line(19) = {21, 24}; +//+ +Line(20) = {24, 23}; +//+ +Line(21) = {23, 22}; +//+ +Line(22) = {22, 21}; +//+ +//Line(26) = {19, 18}; +//+ +Line(28) = {5, 9}; +//+ +Line(29) = {12, 7}; +//+q +Line(30) = {8, 16}; +//+ +Line(31) = {13, 6}; + +// Helper points and lines +Point(25) = {-0.6, 0.6, 0, cl_fine}; +Point(26) = {-0.6, -0.6, 0, cl_fine}; +Point(27) = {0.6, 0.6, 0, cl_fine}; +Point(28) = {0.6, -0.6, 0, cl_fine}; + +Point(29) = {-0.2, 0.6, 0, cl_fine}; +Point(30) = {-0.2, -0.6, 0, cl_fine}; +Point(31) = {0.2, 0.6, 0, cl_fine}; +Point(32) = {0.2, -0.6, 0, cl_fine}; + +Point(33) = {-0.2, 0.65, 0, cl_fine}; +Point(34) = {-0.2, -0.65, 0, cl_fine}; +Point(35) = {0.2, 0.65, 0, cl_fine}; +Point(36) = {0.2, -0.65, 0, cl_fine}; +//+ +Point(37) = {-0.6, 0.65, 0, cl_fine}; +Point(38) = {-0.6, -0.65, 0, cl_fine}; +Point(39) = {0.6, 0.65, 0, cl_fine}; +Point(40) = {0.6, -0.65, 0, cl_fine}; +//+ +Line(32) = {7, 26}; +//+ +Line(33) = {26, 11}; +//+ +Line(34) = {11, 10}; +//+ +Line(35) = {9, 12}; +//+ +Line(37) = {28, 8}; +//+ +Line(38) = {28, 15}; +//+ +Line(40) = {18, 19}; +//+ +Line(41) = {19, 23}; +//+ +Line(42) = {19, 20}; +//+ +Line(43) = {20, 24}; +//+ +Line(44) = {21, 17}; +//+ +Line(45) = {17, 20}; +//+ +Line(46) = {17, 18}; +//+ +Line(47) = {10, 25}; +//+ +Line(48) = {25, 5}; +//+ +Line(50) = {27, 14}; +//+ +Line(51) = {27, 6}; +//+ +Line(52) = {13, 16}; +//+ +Line(53) = {14, 15}; +//+ +Line(54) = {19, 14}; +//+ +Line(55) = {20, 15}; +//+ +Line(56) = {17, 11}; +//+ +Line(57) = {10, 18}; +//+ +Line(58) = {25, 29}; +//+ +Line(59) = {29, 31}; +//+ +Line(60) = {31, 27}; +//+ +Line(61) = {22, 18}; +//+ +Line(62) = {29, 18}; +//+ +Line(63) = {31, 19}; +//+ +Line(64) = {17, 30}; +//+ +Line(65) = {30, 26}; +//+ +Line(66) = {30, 32}; +//+ +Line(67) = {32, 28}; +//+ +Line(68) = {32, 20}; +//+ +Line(69) = {1, 38}; +//+ +Line(70) = {38, 26}; +//+ +Line(71) = {38, 34}; +//+ +Line(72) = {34, 36}; +//+ +Line(73) = {36, 40}; +//+ +Line(74) = {40, 2}; +//+ +Line(75) = {40, 28}; +//+ +Line(76) = {36, 32}; +//+ +Line(77) = {34, 30}; +//+ +Line(78) = {39, 27}; +//+ +Line(79) = {39, 4}; +//+ +Line(80) = {39, 35}; +//+ +Line(81) = {35, 31}; +//+ +Line(82) = {35, 33}; +//+ +Line(83) = {33, 29}; +//+ +Line(84) = {33, 37}; +//+ +Line(85) = {37, 25}; +//+ +Line(86) = {37, 3}; +//+ +Curve Loop(1) = {48, -1, -86, 85}; +//+ +Plane Surface(1) = {1}; +//+ +Curve Loop(2) = {47, 48, 28, -13}; +//+ +Plane Surface(2) = {2}; +//+ +Curve Loop(3) = {34, 13, 35, 10}; +//+ +Plane Surface(3) = {3}; +//+ +Curve Loop(4) = {33, -10, 29, 32}; +//+ +Plane Surface(4) = {4}; +//+ +Curve Loop(5) = {70, -32, 5, 69}; +//+ +Plane Surface(5) = {5}; +//+ +Curve Loop(6) = {71, 77, 65, -70}; +//+ +Plane Surface(6) = {6}; +//+ +Curve Loop(7) = {72, 76, -66, -77}; +//+ +Plane Surface(7) = {7}; +//+ +Curve Loop(8) = {73, 75, -67, -76}; +//+ +Plane Surface(8) = {8}; +//+ +Curve Loop(9) = {74, 8, -37, -75}; +//+ +Plane Surface(9) = {9}; +//+ +Curve Loop(10) = {37, 30, -15, -38}; +//+ +Plane Surface(10) = {10}; +//+ +Curve Loop(11) = {15, -52, 17, 53}; +//+ +Plane Surface(11) = {11}; +//+ +Curve Loop(12) = {17, -50, 51, -31}; +//+ +Plane Surface(12) = {12}; +//+ +Curve Loop(13) = {51, 3, -79, 78}; +//+ +Plane Surface(13) = {13}; +//+ +Curve Loop(14) = {60, -78, 80, 81}; +//+ +Plane Surface(14) = {14}; +//+ +Curve Loop(15) = {59, -81, 82, 83}; +//+ +Plane Surface(15) = {15}; +//+ +Curve Loop(16) = {58, -83, 84, 85}; +//+ +Plane Surface(16) = {16}; +//+ +Curve Loop(17) = {57, -62, -58, -47}; +//+ +Plane Surface(17) = {17}; +//+ +Curve Loop(18) = {56, 34, 57, -46}; +//+ +Plane Surface(18) = {18}; +//+ +Curve Loop(19) = {65, 33, -56, 64}; +//+ +Plane Surface(19) = {19}; +//+ +Curve Loop(20) = {66, 68, -45, 64}; +//+ +Plane Surface(20) = {20}; +//+ +Curve Loop(21) = {67, 38, -55, -68}; +//+ +Plane Surface(21) = {21}; +//+ +Curve Loop(22) = {55, -53, -54, 42}; +//+ +Plane Surface(22) = {22}; +//+ +Curve Loop(23) = {54, -50, -60, 63}; +//+ +Plane Surface(23) = {23}; +//+ +Curve Loop(24) = {40, -63, -59, 62}; +//+ +Plane Surface(24) = {24}; +//+ +Curve Loop(25) = {21, 61, 40, 41}; +//+ +Plane Surface(25) = {25}; +//+ +Curve Loop(26) = {46, -61, 22, 44}; +//+ +Plane Surface(26) = {26}; +//+ +Curve Loop(27) = {44, 45, 43, -19}; +//+ +Plane Surface(27) = {27}; +//+ +Curve Loop(28) = {43, 20, -41, 42}; +//+ +Plane Surface(28) = {28}; +//+ +Curve Loop(29) = {19, 20, 21, 22}; +//+ +Plane Surface(29) = {29}; +//+ +Physical Curve("void", 87) = {71, 72, 73, 74, 8, 52, 3, 79, 80, 82, 84, 86, 1, 35, 5, 69}; +//+ +Physical Curve("inflow", 88) = {29, 30, 31, 28}; +//+ +Transfinite Surface {4}; +//+ +Transfinite Surface {5}; +//+ +Transfinite Surface {6}; +//+ +Transfinite Surface {7}; +//+ +Transfinite Surface {8}; +//+ +Transfinite Surface {9}; +//+ +Transfinite Surface {10}; +//+ +Transfinite Surface {11}; +//+ +Transfinite Surface {12}; +//+ +Transfinite Surface {13}; +//+ +Transfinite Surface {14}; +//+ +Transfinite Surface {15}; +//+ +Transfinite Surface {16}; +//+ +Transfinite Surface {1}; +//+ +Transfinite Surface {2}; +//+ +Transfinite Surface {3}; +//+ +Transfinite Surface {19}; +//+ +Transfinite Surface {20}; +//+ +Transfinite Surface {21}; +//+ +Transfinite Surface {22}; +//+ +Transfinite Surface {23}; +//+ +Transfinite Surface {24}; +//+ +Transfinite Surface {17}; +//+ +Transfinite Surface {18}; +//+ +Transfinite Surface {27}; +//+ +Transfinite Surface {28}; +//+ +Transfinite Surface {25}; +//+ +Transfinite Surface {26}; +//+ +Transfinite Surface {29}; +//+ +Transfinite Curve {44, 43, 41, 61} = n_recombine Using Progression 1; +// + all vertical +Transfinite Curve {71, 65, 56, 57, 58, 84, 72, 66, 45, 19, 21, 40, 59, 82, 73, 67, 55, 54, 60, 80} = n_recombine_coarse * 8 Using Progression 1; +//+ horizontal wide +Transfinite Curve {35, 34, 46, 22, 20, 42, 53, 52} = n_recombine_coarse * 16 Using Progression 1; +//+ horizontal small +Transfinite Curve {28, 47, 62, 63, 50, 31, 30, 38, 68, 64, 33, 29} = n_recombine_coarse * 4 Using Progression 1; +//+ inlets +Transfinite Curve {69, 32, 10, 13, 48, 86, 79, 51, 17, 15, 37, 74} = n_recombine_coarse Using Progression 1; +//+ upper and lower bound +Transfinite Curve {5, 70, 77, 76, 75, 8, 3, 78, 81, 83, 85, 1} = n_recombine_coarse Using Progression 1; + +Recombine Surface "*"; +// Define meshing options +//Mesh.Algorithm = 6; // Specify meshing algorithm (e.g., Delaunay) +//Mesh.ElementOrder = 1; // Specify element order +// Generate the mesh +//Mesh 2; \ No newline at end of file diff --git a/examples_hpc/sym_hohlraum/sym_hohlraum.cfg b/examples_hpc/sym_hohlraum/sym_hohlraum.cfg new file mode 100644 index 00000000..0ba5ff55 --- /dev/null +++ b/examples_hpc/sym_hohlraum/sym_hohlraum.cfg @@ -0,0 +1,53 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Hohlraum Benchmarking File MN % +% Author % +% Date 27.04.2022 % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% ---- File specifications ---- +% +OUTPUT_DIR = result +% Output file +OUTPUT_FILE = sym_hohlraum +% Log directory +LOG_DIR = result/logs +% Log file +LOG_FILE = sym_hohlraum +% Mesh File +MESH_FILE = mesh/sym_hohlraum_n20.su2 +% +% ---- Problem specifications ---- +% +PROBLEM = SYMMETRIC_HOHLRAUM +SPATIAL_DIM = 2 +% +% ---- Design Parameters --- +N_SAMPLING_PTS_LINE_GREEN = 100 +% +% ---- Solver specifications ---- +% +HPC_SOLVER = YES +CFL_NUMBER = 0.5 +TIME_FINAL = 1 +SOLVER = SN_SOLVER +RECONS_ORDER = 2 +TIME_INTEGRATION_ORDER = 2 +% +% ---- Boundary Conditions ---- +% +BC_NEUMANN = ( void, inflow ) +% +% ---- Quadrature ---- +% +QUAD_TYPE = GAUSS_LEGENDRE_TENSORIZED_2D +QUAD_ORDER = 10 +% +% ----- Output ---- +% +VOLUME_OUTPUT = (MINIMAL) +VOLUME_OUTPUT_FREQUENCY = 0 +SCREEN_OUTPUT = ( ITER, WALL_TIME, MASS, RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT, CUR_OUTFLOW, TOTAL_OUTFLOW, MAX_OUTFLOW, TOTAL_PARTICLE_ABSORPTION_CENTER, TOTAL_PARTICLE_ABSORPTION_VERTICAL, TOTAL_PARTICLE_ABSORPTION_HORIZONTAL, PROBE_MOMENT_TIME_TRACE, VAR_ABSORPTION_GREEN) +SCREEN_OUTPUT_FREQUENCY = 1 +HISTORY_OUTPUT = ( ITER, WALL_TIME, MASS, RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT, CUR_OUTFLOW, TOTAL_OUTFLOW, MAX_OUTFLOW, TOTAL_PARTICLE_ABSORPTION_CENTER, TOTAL_PARTICLE_ABSORPTION_VERTICAL, TOTAL_PARTICLE_ABSORPTION_HORIZONTAL, PROBE_MOMENT_TIME_TRACE, VAR_ABSORPTION_GREEN, VAR_ABSORPTION_GREEN_LINE) +HISTORY_OUTPUT_FREQUENCY = 1 + diff --git a/include/common/config.hpp b/include/common/config.hpp index ad42c2da..6957abe0 100644 --- a/include/common/config.hpp +++ b/include/common/config.hpp @@ -48,8 +48,9 @@ class Config // std::vector _1dIntegrationBounds; /*!< @brief Quadrature Order*/ // Mesh - unsigned _nCells; /*!< @brief Number of cells in the mesh */ - unsigned short _dim; /*!< @brief spatial dimensionality of the mesh/test case */ + unsigned _nCells; /*!< @brief Number of cells in the mesh */ + unsigned short _dim; /*!< @brief spatial dimensionality of the mesh/test case */ + bool _forcedConnectivityWrite; /*!< @brief If true, the meshconnectivity is always computed and written to .con file */ // Boundary Conditions /*!< @brief List of all Pairs (marker, BOUNDARY_TYPE), e.g. (farfield,DIRICHLET). @@ -61,6 +62,7 @@ class Config std::vector _MarkerNeumann; /*!< @brief Neumann BC markers. */ // Solver + bool _HPC; /* Triggers usage of faster SN solvers */ double _CFL; /*!< @brief CFL Number for Solver*/ double _tEnd; /*!< @brief Final Time for Simulation */ PROBLEM_NAME _problemName; /*!< @brief Name of predefined Problem */ @@ -90,6 +92,24 @@ class Config std::string _hydrogenFile; /*!< @brief Name of hydrogen cross section file path*/ std::string _oxygenFile; /*!< @brief Name of oxygen cross section file path */ std::string _stoppingPowerFile; /*!< @brief Name of stopping power file path */ + // Lattice + double _dsgnAbsBlue; /*!< @brief Absorption in all blue blocks */ + double _dsgnScatterWhite; /*!< @brief Scattering in all white blocks */ + std::vector _dsgnAbsIndividual; /*!< @brief Absorption in all 7x7 blocks of the Lattice test case (up left to low right) */ + unsigned short _nDsgnAbsIndividual; /*!< @brief Number of individual blocks. Needs to be 49*/ + std::vector _dsgnScatterIndividual; /*!< @brief Scatter in all 7x7 blocks of the Lattice test case (up left to low right) */ + unsigned short _nDsgnScatterIndividual; /*!< @brief Number of individual blocks. Needs to be 49*/ + + // Hohlraum + unsigned short _nProbingCellsLineGreenHohlraum; /*!< @brief Number SamplingPoints for Hohlraum Green region sampling.*/ + double _posCenterXHohlraum; /*!< @brief Center of the Hohlraum Green region. */ + double _posCenterYHohlraum; /*!< @brief Center of the Hohlraum Green region. */ + double _posRedRightTop; /*!< @brief y coord of the top of the right red area */ + double _posRedLeftTop; /*!< @brief y coord of the top of the left red area */ + double _posRedRightBottom; /*!< @brief y coord of the bottom of the right red area */ + double _posRedLeftBottom; /*!< @brief y coord of the bottom of the left red area */ + double _posRedLeftBorder; /*!< @brief pos of the inner border of the left red area */ + double _posRedRightBorder; /*!< @brief pos of the inner border of the right red area */ // CSD double _maxEnergyCSD; /*!< @brief Maximum energy for CSD simulation */ @@ -237,6 +257,8 @@ class Config // List Options void AddStringListOption( const std::string name, unsigned short& input_size, std::vector& option_field ); + void AddDoubleListOption( const std::string name, unsigned short& input_size, std::vector& option_field ); + template void AddEnumListOption( const std::string name, unsigned short& num_marker, @@ -246,6 +268,9 @@ class Config // Initialize the cmdline and file logger void InitLogger(); + // Helper functions + template K findKey( const std::map& myMap, const V& valueToFind ); + public: /*! * @brief Constructor of the class which reads the input file. @@ -279,21 +304,24 @@ class Config std::string inline GetDataDir() const { return std::filesystem::path( _dataDir ).lexically_normal(); } // Quadrature Structure - unsigned GetNQuadPoints() { return _nQuadPoints; } + unsigned GetNQuadPoints() const { return _nQuadPoints; } QUAD_NAME inline GetQuadName() const { return _quadName; } unsigned short inline GetQuadOrder() const { return _quadOrder; } // Mesh Structure - unsigned GetNCells() { return _nCells; } + unsigned GetNCells() const { return _nCells; } unsigned short GetDim() const { return _dim; } + bool inline GetForcedConnectivity() const { return _forcedConnectivityWrite; } // Solver Structure + bool inline GetHPC() const { return _HPC; } + double inline GetCFL() const { return _CFL; } bool inline GetCleanFluxMat() const { return _cleanFluxMat; } ENTROPY_NAME inline GetEntropyName() const { return _entropyName; } unsigned short inline GetMaxMomentDegree() const { return _maxMomentDegree; } PROBLEM_NAME inline GetProblemName() const { return _problemName; } - unsigned inline GetReconsOrder() { return _reconsOrder; } + unsigned inline GetSpatialOrder() { return _reconsOrder; } SOLVER_NAME inline GetSolverName() const { return _solverName; } double inline GetTEnd() const { return _tEnd; } bool inline GetSNAllGaussPts() const { return _allGaussPts; } @@ -306,6 +334,24 @@ class Config double inline GetSourceMagnitude() const { return _magQ; } // CSD double inline GetMaxEnergyCSD() const { return _maxEnergyCSD; } + // Lattice + double inline GetLatticeAbsBlue() const { return _dsgnAbsBlue; } + double inline GetLatticeScatterWhite() const { return _dsgnScatterWhite; } + std::vector inline GetLatticeAbsorptionIndividual() const { return _dsgnAbsIndividual; } + unsigned short inline GetNLatticeAbsIndividual() { return _nDsgnAbsIndividual; } + std::vector inline GetLatticeScatterIndividual() const { return _dsgnScatterIndividual; } + unsigned short inline GetNLatticeScatterIndividual() const { return _nDsgnScatterIndividual; } + // Hohlraum + unsigned short inline GetNumProbingCellsLineHohlraum() const { return _nProbingCellsLineGreenHohlraum; } + double inline GetPosXCenterGreenHohlraum() const { return _posCenterXHohlraum; } + double inline GetPosYCenterGreenHohlraum() const { return _posCenterYHohlraum; } + double inline GetPosRedRightTopHohlraum() const { return _posRedRightTop; } + double inline GetPosRedRightBottomHohlraum() const { return _posRedRightBottom; } + double inline GetPosRedLeftTopHohlraum() const { return _posRedLeftTop; } + double inline GetPosRedLeftBottomHohlraum() const { return _posRedLeftBottom; } + double inline GetPosRedLeftBorderHohlraum() const { return _posRedLeftBorder; } + double inline GetPosRedRightBorderHohlraum() const { return _posRedRightBorder; } + // Optimizer double inline GetNewtonOptimizerEpsilon() const { return _optimizerEpsilon; } unsigned long inline GetNewtonIter() const { return _newtonIter; } @@ -317,9 +363,9 @@ class Config double inline GetEntropyDynamicAnsatz() const { return _entropyDynamicClosure; } // Neural Closure - unsigned short inline GetModelMK() { return _neuralModel; } - unsigned short inline GetNeuralModelGamma() { return _neuralGamma; } - bool inline GetEnforceNeuralRotationalSymmetry() { return _enforceNeuralRotationalSymmetry; } + unsigned short inline GetModelMK() const { return _neuralModel; } + unsigned short inline GetNeuralModelGamma() const { return _neuralGamma; } + bool inline GetEnforceNeuralRotationalSymmetry() const { return _enforceNeuralRotationalSymmetry; } // Boundary Conditions BOUNDARY_TYPE GetBoundaryType( std::string nameMarker ) const; /*!< @brief Get Boundary Type of given marker */ @@ -330,52 +376,54 @@ class Config // Basis name SPHERICAL_BASIS_NAME inline GetSphericalBasisName() const { return _sphericalBasisName; } // Output Structure - std::vector inline GetVolumeOutput() { return _volumeOutput; } - unsigned short inline GetNVolumeOutput() { return _nVolumeOutput; } - unsigned short inline GetVolumeOutputFrequency() { return _volumeOutputFrequency; } + std::vector inline GetVolumeOutput() const { return _volumeOutput; } + unsigned short inline GetNVolumeOutput() const { return _nVolumeOutput; } + unsigned short inline GetVolumeOutputFrequency() const { return _volumeOutputFrequency; } - std::vector inline GetScreenOutput() { return _screenOutput; } - unsigned short inline GetNScreenOutput() { return _nScreenOutput; } - unsigned short inline GetScreenOutputFrequency() { return _screenOutputFrequency; } + std::vector inline GetScreenOutput() const { return _screenOutput; } + unsigned short inline GetNScreenOutput() const { return _nScreenOutput; } + unsigned short inline GetScreenOutputFrequency() const { return _screenOutputFrequency; } - std::vector inline GetHistoryOutput() { return _historyOutput; } - unsigned short inline GetNHistoryOutput() { return _nHistoryOutput; } - unsigned short inline GetHistoryOutputFrequency() { return _historyOutputFrequency; } + std::vector inline GetHistoryOutput() const { return _historyOutput; } + unsigned short inline GetNHistoryOutput() const { return _nHistoryOutput; } + unsigned short inline GetHistoryOutputFrequency() const { return _historyOutputFrequency; } // Data generator - bool inline GetDataGeneratorMode() { return _dataGeneratorMode; } - SAMPLER_NAME inline GetSamplerName() { return _sampler; } - unsigned long inline GetTrainingDataSetSize() { return _tainingSetSize; } - bool inline GetSizeByDimension() { return _sizeByDimension; } - unsigned long inline GetMaxValFirstMoment() { return _maxValFirstMoment; } // Deprecated - double GetRealizableSetEpsilonU0() { return _RealizableSetEpsilonU0; } - double GetRealizableSetEpsilonU1() { return _RealizableSetEpsilonU1; } - bool inline GetNormalizedSampling() { return _normalizedSampling; } - bool inline GetAlphaSampling() { return _alphaSampling; } - bool inline GetUniformSamlping() { return _sampleUniform; } - double inline GetAlphaSamplingBound() { return _alphaBound; } - double inline GetMinimalEVBound() { return _minEVAlphaSampling; } + bool inline GetDataGeneratorMode() const { return _dataGeneratorMode; } + SAMPLER_NAME inline GetSamplerName() const { return _sampler; } + unsigned long inline GetTrainingDataSetSize() const { return _tainingSetSize; } + bool inline GetSizeByDimension() const { return _sizeByDimension; } + unsigned long inline GetMaxValFirstMoment() const { return _maxValFirstMoment; } // Deprecated + double GetRealizableSetEpsilonU0() const { return _RealizableSetEpsilonU0; } + double GetRealizableSetEpsilonU1() const { return _RealizableSetEpsilonU1; } + bool inline GetNormalizedSampling() const { return _normalizedSampling; } + bool inline GetAlphaSampling() const { return _alphaSampling; } + bool inline GetUniformSamlping() const { return _sampleUniform; } + double inline GetAlphaSamplingBound() const { return _alphaBound; } + double inline GetMinimalEVBound() const { return _minEVAlphaSampling; } // double inline GetMinimalSamplingVelocity() { return _minSamplingVelocity; } - double inline GetMaximalSamplingVelocity() { return _maxSamplingVelocity; } - double inline GetMinimalSamplingTemperature() { return _minSamplingTemperature; } - double inline GetMaximalSamplingTemperature() { return _maxSamplingTemperature; } - unsigned short inline GetNSamplingTemperatures() { return _nTemperatures; } - bool inline GetIsMomentSolver() { return _isMomentSolver; } - unsigned short inline GetRKStages() { return _rungeKuttaStages; } + double inline GetMaximalSamplingVelocity() const { return _maxSamplingVelocity; } + double inline GetMinimalSamplingTemperature() const { return _minSamplingTemperature; } + double inline GetMaximalSamplingTemperature() const { return _maxSamplingTemperature; } + unsigned short inline GetNSamplingTemperatures() const { return _nTemperatures; } + bool inline GetIsMomentSolver() const { return _isMomentSolver; } + unsigned short inline GetTemporalOrder() const { return _rungeKuttaStages; } // ---- Setters for option structure // This section is dangerous // Quadrature Structure - void inline SetNQuadPoints( unsigned nq ) { _nQuadPoints = nq; } /*!< @brief Never change the nq! This is only for the test framework. */ - void inline SetQuadName( QUAD_NAME quadName ) { _quadName = quadName; } /*!< @brief Never change the quadName! This is only for the test framework. */ + void inline SetNQuadPoints( unsigned nq ) { _nQuadPoints = nq; } /*!< @brief Never change the nq! This is only for the test framework. */ + void inline SetQuadName( QUAD_NAME quadName ) { + _quadName = quadName; + } /*!< @brief Never change the quadName! This is only for the test framework. */ void inline SetQuadOrder( unsigned quadOrder ) { _quadOrder = quadOrder; - } /*!< @brief Never change the quadOrder! This is only for the test framework. */ + } /*!< @brief Never change the quadOrder! This is only for the test framework. */ void inline SetSNAllGaussPts( bool useall ) { _allGaussPts = useall; } /*!< @brief Never change the this! This is only for the test framework. */ // Mesh Structure void inline SetNCells( unsigned nCells ) { _nCells = nCells; } - void inline SetEnforceNeuralRotationalSymmetry(bool symmetryEnforce) { _enforceNeuralRotationalSymmetry =symmetryEnforce ; } - + void inline SetEnforceNeuralRotationalSymmetry( bool symmetryEnforce ) { _enforceNeuralRotationalSymmetry = symmetryEnforce; } + void inline SetForcedConnectivity( bool connectivityEnforce ) { _forcedConnectivityWrite = connectivityEnforce; } }; #endif // CONFIG_H diff --git a/include/common/globalconstants.hpp b/include/common/globalconstants.hpp index 1c7dd338..826bd338 100644 --- a/include/common/globalconstants.hpp +++ b/include/common/globalconstants.hpp @@ -102,7 +102,11 @@ enum PROBLEM_NAME { PROBLEM_RadiationCT, PROBLEM_Meltingcube, PROBLEM_Meltingcube1D, - PROBLEM_Hohlraum + PROBLEM_Hohlraum, + PROBLEM_SymmetricHohlraum, + PROBLEM_QuarterHohlraum, + PROBLEM_Lattice, + PROBLEM_HalfLattice }; inline std::map Problem_Map{ { "LINESOURCE", PROBLEM_Linesource }, @@ -116,7 +120,11 @@ inline std::map Problem_Map{ { "LINESOURCE", PROBLEM_ { "RADIATIONCT", PROBLEM_RadiationCT }, { "MELTINGCUBE", PROBLEM_Meltingcube }, { "MELTINGCUBE_1D", PROBLEM_Meltingcube1D }, - { "HOHLRAUM", PROBLEM_Hohlraum } }; + { "HOHLRAUM", PROBLEM_Hohlraum }, + { "SYMMETRIC_HOHLRAUM", PROBLEM_SymmetricHohlraum }, + { "QUARTER_HOHLRAUM", PROBLEM_QuarterHohlraum }, + { "LATTICE", PROBLEM_Lattice }, + { "HALF_LATTICE", PROBLEM_HalfLattice } }; // Kernel name enum KERNEL_NAME { KERNEL_Isotropic, KERNEL_Isotropic1D }; @@ -165,10 +173,53 @@ inline std::map VolOutput_Map{ { "ANALYTIC", ANALYTIC }, { "MINIMAL", MINIMAL }, { "MOMENTS", MOMENTS }, { "DUAL_MOMENTS", DUAL_MOMENTS }, { "MEDICAL", MEDICAL } }; // Scalar output -enum SCALAR_OUTPUT { ITER, MASS, RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT }; +enum SCALAR_OUTPUT { + WALL_TIME, + ITER, + MASS, + RMS_FLUX, + VTK_OUTPUT, + CSV_OUTPUT, + CUR_OUTFLOW, + TOTAL_OUTFLOW, + CUR_OUTFLOW_P1, + TOTAL_OUTFLOW_P1, + CUR_OUTFLOW_P2, + TOTAL_OUTFLOW_P2, + MAX_OUTFLOW, + CUR_PARTICLE_ABSORPTION, + TOTAL_PARTICLE_ABSORPTION, + MAX_PARTICLE_ABSORPTION, + TOTAL_PARTICLE_ABSORPTION_CENTER, + TOTAL_PARTICLE_ABSORPTION_VERTICAL, + TOTAL_PARTICLE_ABSORPTION_HORIZONTAL, + PROBE_MOMENT_TIME_TRACE, + VAR_ABSORPTION_GREEN, + VAR_ABSORPTION_GREEN_LINE +}; -inline std::map ScalarOutput_Map{ - { "ITER", ITER }, { "MASS", MASS }, { "RMS_FLUX", RMS_FLUX }, { "VTK_OUTPUT", VTK_OUTPUT }, { "CSV_OUTPUT", CSV_OUTPUT } }; +inline std::map ScalarOutput_Map{ { "ITER", ITER }, + { "WALL_TIME", WALL_TIME }, + { "MASS", MASS }, + { "RMS_FLUX", RMS_FLUX }, + { "VTK_OUTPUT", VTK_OUTPUT }, + { "CSV_OUTPUT", CSV_OUTPUT }, + { "CUR_OUTFLOW", CUR_OUTFLOW }, + { "TOTAL_OUTFLOW", TOTAL_OUTFLOW }, + { "CUR_OUTFLOW_P1", CUR_OUTFLOW_P1 }, + { "TOTAL_OUTFLOW_P1", TOTAL_OUTFLOW_P1 }, + { "CUR_OUTFLOW_P2", CUR_OUTFLOW_P2 }, + { "TOTAL_OUTFLOW_P2", TOTAL_OUTFLOW_P2 }, + { "MAX_OUTFLOW", MAX_OUTFLOW }, + { "CUR_PARTICLE_ABSORPTION", CUR_PARTICLE_ABSORPTION }, + { "TOTAL_PARTICLE_ABSORPTION", TOTAL_PARTICLE_ABSORPTION }, + { "MAX_PARTICLE_ABSORPTION", MAX_PARTICLE_ABSORPTION }, + { "TOTAL_PARTICLE_ABSORPTION_CENTER", TOTAL_PARTICLE_ABSORPTION_CENTER }, + { "TOTAL_PARTICLE_ABSORPTION_VERTICAL", TOTAL_PARTICLE_ABSORPTION_VERTICAL }, + { "TOTAL_PARTICLE_ABSORPTION_HORIZONTAL", TOTAL_PARTICLE_ABSORPTION_HORIZONTAL }, + { "PROBE_MOMENT_TIME_TRACE", PROBE_MOMENT_TIME_TRACE }, + { "VAR_ABSORPTION_GREEN", VAR_ABSORPTION_GREEN }, + { "VAR_ABSORPTION_GREEN_LINE", VAR_ABSORPTION_GREEN_LINE } }; // Spherical Basis Name enum SPHERICAL_BASIS_NAME { SPHERICAL_HARMONICS, SPHERICAL_MONOMIALS, SPHERICAL_MONOMIALS_ROTATED }; diff --git a/include/common/io.hpp b/include/common/io.hpp index 9aec05f4..377c1332 100644 --- a/include/common/io.hpp +++ b/include/common/io.hpp @@ -1,10 +1,10 @@ #ifndef IO_H #define IO_H +#include "common/globalconstants.hpp" #include "common/typedef.hpp" #include #include - // Forward Declarations class Config; class Mesh; @@ -22,10 +22,27 @@ void ExportVTK( const std::string fileName, Mesh* LoadSU2MeshFromFile( const Config* settings ); +void LoadConnectivityFromFile( const std::string outputFile, + std::vector>& cellNeighbors, + std::vector>& cellInterfaceMidPoints, + std::vector>& cellNormals, + std::vector& cellBoundaryTypes, + unsigned nCells, + unsigned nNodesPerCell, + unsigned nDim ); + +void WriteConnecitivityToFile( const std::string outputFile, + const std::vector>& cellNeighbors, + const std::vector>& cellInterfaceMidPoints, + const std::vector>& cellNormals, + const std::vector& cellBoundaryTypes, + unsigned nCells, + unsigned nDim ); + std::string ParseArguments( int argc, char* argv[] ); void PrintLogHeader( std::string inputFile ); -Matrix createSU2MeshFromImage( std::string imageName, std::string SU2Filename ); +// Matrix createSU2MeshFromImage( std::string imageName, std::string SU2Filename ); Deprecated #endif // IO_H diff --git a/include/common/linalg.hpp b/include/common/linalg.hpp new file mode 100644 index 00000000..6cf1e877 --- /dev/null +++ b/include/common/linalg.hpp @@ -0,0 +1,35 @@ +/* set of linear algebra functions*/ +#include +#include + +namespace LinAlg { + +inline double dot( std::vector& vec1, std::vector& vec2, unsigned len ) { + double result = 0.0; + for( unsigned i = 0; i < len; i++ ) { + result += vec1[i] * vec2[i]; + } + return result; +} + +inline double l2_norm( std::vector& vec1, unsigned len ) { + double result = 0.0; + for( unsigned i = 0; i < len; i++ ) { + result += vec1[i] * vec1[i]; + } + return sqrt( result ); +} + +inline double mat_vec( std::vector& mat, std::vector& vec1, std::vector& vec2, unsigned n_row, unsigned n_col ) { + /* dim(mat)=n_row x n_col + dim(vec1)=n_row + dim(vec2)=n_col + */ + for( unsigned i = 0; i < n_row; i++ ) { + for( unsigned j = 0; j < n_col; j++ ) { + vec2[j] += mat[i * n_col + j] * vec1[i]; + } + } +} + +} // namespace LinAlg \ No newline at end of file diff --git a/include/common/mesh.hpp b/include/common/mesh.hpp index 283d3b44..04c5ff7e 100644 --- a/include/common/mesh.hpp +++ b/include/common/mesh.hpp @@ -6,23 +6,25 @@ #include "common/typedef.hpp" #include -#include -#include #include #include "toolboxes/errormessages.hpp" #include "toolboxes/reconstructor.hpp" +class Config; + class Mesh { protected: + const Config* _settings; /*!< @brief config class for global information */ + const unsigned _dim; /*!< @brief spatial dimension of the mesh, i.e. 1D,2D,3D */ const unsigned _numCells; /*!< @brief number of cells in the mesh */ const unsigned _numNodes; /*!< @brief number of nodes in the mesh (for node centered view)*/ const unsigned _numNodesPerCell; /*!< @brief number of nodes per cell */ const unsigned _numBoundaries; /*!< @brief number of boundary cells in the mesh */ const unsigned _ghostCellID; /*!< @brief Id of the ghost cell. (we use only one ghost cell). equal to _numCells and therefore has the ID of the - last cell + 1 */ + last cell + 1 */ unsigned _numNodesPerBoundary; std::vector> _bounds; // ??? @@ -66,7 +68,8 @@ class Mesh /*! @brief Constructor of mesh. Needs nodes, cells, and boundary descriptions as specified above. * See LoadSU2MeshFromFile in io.cpp for setup information*/ - Mesh( std::vector nodes, + Mesh( const Config* settings, + std::vector nodes, std::vector> cells, std::vector>> boundaries ); ~Mesh(); @@ -122,6 +125,14 @@ class Mesh * @return dimension: scalar */ double GetDistanceToOrigin( unsigned idx_cell ) const; + /*! @brief Returns index of cell containing the coordinate (x,y) + * @return cell_idx: unsigned */ + unsigned GetCellOfKoordinate( const double x, const double y ) const; + + /*! @brief Returns index of cells contained in the ball around the coordinate (x,y) with radius r + * @return cell_idxs: std::vector */ + std::vector GetCellsofBall( const double x, const double y, const double r ) const; + /*! @brief ComputeSlopes calculates the slope in every cell into x and y direction using the divergence theorem. * @param nq is number of quadrature points * @param psiDerX is slope in x direction (gets computed. Slope is stored here) @@ -148,6 +159,10 @@ class Mesh * @param psiDerX is slope in x direction (gets computed. Slope is stored here) * @param psi is solution for which slope is computed */ void ComputeSlopes1D( unsigned nq, VectorVector& psiDerX, const VectorVector& psi ) const; + + private: + bool isPointInTriangle( double x, double y, double x1, double y1, double x2, double y2, double x3, double y3 ) const; + bool IsPointInsideCell( unsigned idx_cell, double x, double y ) const; /*!< @brief Function to check if a point is inside a polygon (cell)*/ }; #endif // MESH_H diff --git a/include/common/optionstructure.hpp b/include/common/optionstructure.hpp index 0730c681..b1821607 100644 --- a/include/common/optionstructure.hpp +++ b/include/common/optionstructure.hpp @@ -161,6 +161,22 @@ class OptionStringList : public OptionBase void SetDefault() override; }; +class OptionDoubleList : public OptionBase +{ + std::vector& _field; /*!< @brief Reference to the string list field value. no default value */ + std::string _name; /*!< @brief string identifier for the option */ + unsigned short& _size; /*!< @brief Size of string list */ + + public: + OptionDoubleList( std::string option_field_name, unsigned short& list_size, std::vector& option_field ); + + ~OptionDoubleList() override {} + + std::string SetValue( std::vector option_value ) override; + + void SetDefault() override; +}; + // Template classes (TODO: Find a way to split code to .cpp) template class OptionEnum : public OptionBase diff --git a/include/fluxes/numericalflux.hpp b/include/fluxes/numericalflux.hpp index 407b37cf..02811a60 100644 --- a/include/fluxes/numericalflux.hpp +++ b/include/fluxes/numericalflux.hpp @@ -21,6 +21,18 @@ class NumericalFluxBase */ virtual double Flux( const Vector& Omega, double psiL, double psiR, const Vector& n ) const = 0; + /** + * @brief Flux computes flux on edge for fixed ordinate at a given edge using x and y axis + * @param quadPts ordinates for flux computation + * @param psiL left solution state + * @param psiR right solution state + * @param n scaled normal vector of given edge + * @param n_sys number of quadpts + * @param numerical flux value + */ + virtual void Flux( const VectorVector& quadPts, const Vector& psiL, const Vector& psiR, Vector& flux, const Vector& n, unsigned n_sys ) = 0; + + /** * @brief Flux computes flux on edge for fixed ordinate at a given edge (in XZ plane) * @param Omega fixed ordinate for flux computation diff --git a/include/fluxes/upwindflux.hpp b/include/fluxes/upwindflux.hpp index 1cb39e60..69ce8feb 100644 --- a/include/fluxes/upwindflux.hpp +++ b/include/fluxes/upwindflux.hpp @@ -25,6 +25,18 @@ class UpwindFlux : public NumericalFluxBase * @return numerical flux value */ double Flux( const Vector& Omega, double psiL, double psiR, const Vector& n ) const override; + + /** + * @brief Flux computes flux on edge for fixed ordinate at a given edge using x and y axis + * @param quadPts ordinates for flux computation + * @param psiL left solution state + * @param psiR right solution state + * @param n scaled normal vector of given edge + * @param n_sys number of quadpts + * @param flux numerical flux value + */ + void Flux( const VectorVector& quadPts, const Vector& psiL, const Vector& psiR, Vector& flux, const Vector& n, unsigned n_sys ) override; + /** * @brief FluxXZ computes flux on edge for fixed ordinate at a given edge using x and z axis * @param Omega fixed ordinate for flux computation diff --git a/include/optimizers/neuralnetworkoptimizer.hpp b/include/optimizers/neuralnetworkoptimizer.hpp index 902c2812..cad5ca9c 100644 --- a/include/optimizers/neuralnetworkoptimizer.hpp +++ b/include/optimizers/neuralnetworkoptimizer.hpp @@ -30,23 +30,27 @@ class NeuralNetworkOptimizer : public OptimizerBase unsigned _nq; /*!< @brief number of quadrature points */ Vector _weights; /*!< @brief quadrature weights, dim(_weights) = (_nq) */ - std::string _tfModelInputName; /*!< @brief Name of the tf model input */ - cppflow::model* _tfModel; /*!< @brief wrapper object for the compiled tensorflow model*/ - cppflow::tensor _modelInput; /*!< @brief model input tensor. dims: _nCellsx_nSys*/ - std::vector _modelServingVectorU; /*!< @brief model input as a 1D vector. dims: _nCells*(_nSys-1) */ - std::vector _modelServingVectorAlpha; /*!< @brief model output as a 1D vector. dims: _nCells*_nSys */ + std::string _tfModelInputName; /*!< @brief Name of the tf model input */ + cppflow::model* _tfModel; /*!< @brief wrapper object for the compiled tensorflow model*/ + cppflow::tensor _modelInput; /*!< @brief model input tensor. dims: _nCellsx_nSys*/ + std::vector _modelServingVectorU; /*!< @brief model input as a 1D vector. dims: _nCells*(_nSys-1) */ + std::vector _modelServingVectorAlpha; /*!< @brief model output as a 1D vector. dims: _nCells*_nSys */ // std::vector _modelOutput; /*!< @brief model input tensor. dims: _nModelOutputx_nCellsx_nSys*/ - unsigned _nSystem; /*!< @brief size of the moment system including zero order moment*/ - VectorVector _reducedMomentBasis; /*!< @brief reduced basis functions (excluding order zero) */ + unsigned _nSystem; /*!< @brief size of the moment system including zero order moment*/ + VectorVector _reducedMomentBasis; /*!< @brief reduced basis functions (excluding order zero) */ - std::vector _rotationMats; /*!< @brief vector of Rotation matrices for symmetry enforcing */ - std::vector _rotationMatsT; /*!< @brief vector of transpose Rotation matrices for symmetry enforcing */ + std::vector _rotationMats; /*!< @brief vector of Rotation matrices for symmetry enforcing */ + std::vector _rotationMatsT; /*!< @brief vector of transpose Rotation matrices for symmetry enforcing */ Matrix CreateRotator( const Vector& uFirstMoment ); /*!< @brief Creates a rotation matrix R for the tensorized monomial basis using the first moment of a momnet vector */ - Matrix CreateRotatorSphericalHarmonics( const double x, const double y ); /*!< @brief Creates a rotation matrix R for the spherical harmonics basisusing the first moment of a momnet vector */ - Matrix CreateRotatorSphericalHarmonics2D( const double x, const double y ); /*!< @brief Creates a rotation matrix R for the spherical harmonics basisusing the first moment of a momnet vector */ + Matrix CreateRotatorSphericalHarmonics( + const double x, + const double y ); /*!< @brief Creates a rotation matrix R for the spherical harmonics basisusing the first moment of a momnet vector */ + Matrix CreateRotatorSphericalHarmonics2D( + const double x, + const double y ); /*!< @brief Creates a rotation matrix R for the spherical harmonics basisusing the first moment of a momnet vector */ Vector RotateM1( Vector& vec, Matrix& R ); /*!< @brief Rotates the M1 part of a 2D moment vector using a rotation matrix R */ /*!< @brief Rotates the tensorized M2 part of a 2D moment vector using a rotation matrix R */ diff --git a/include/problems/aircavity1d.hpp b/include/problems/aircavity1d.hpp index bacd44cb..9cd72b6f 100644 --- a/include/problems/aircavity1d.hpp +++ b/include/problems/aircavity1d.hpp @@ -10,7 +10,7 @@ class AirCavity1D : public ProblemBase double _sigmaS; /*!< @brief Scattering coefficient */ public: - AirCavity1D( Config* settings, Mesh* mesh ); + AirCavity1D( Config* settings, Mesh* mesh, QuadratureBase* quad ); ~AirCavity1D(); std::vector GetExternalSource( const Vector& energies ) override; VectorVector SetupIC() override; @@ -27,7 +27,7 @@ class AirCavity1D_Moment : public ProblemBase double _sigmaS; /*!< @brief Scattering coefficient */ public: - AirCavity1D_Moment( Config* settings, Mesh* mesh ); + AirCavity1D_Moment( Config* settings, Mesh* mesh, QuadratureBase* quad ); ~AirCavity1D_Moment(); std::vector GetExternalSource( const Vector& energies ) override; VectorVector SetupIC() override; diff --git a/include/problems/checkerboard.hpp b/include/problems/checkerboard.hpp index 2f43ce59..ec056297 100644 --- a/include/problems/checkerboard.hpp +++ b/include/problems/checkerboard.hpp @@ -8,8 +8,8 @@ class SphericalBase; class Checkerboard_SN : public ProblemBase { private: - Vector _scatteringXS; /*!< @brief Vector of scattering crosssections */ - Vector _totalXS; /*!< @brief Vector of total crosssections */ + Vector _sigmaS; /*!< @brief Vector of scattering crosssections */ + Vector _sigmaT; /*!< @brief Vector of total crosssections */ Checkerboard_SN() = delete; @@ -17,7 +17,7 @@ class Checkerboard_SN : public ProblemBase bool isSource( const Vector& pos ) const; /*!< @return True if pos is in source region, False otherwise */ public: - Checkerboard_SN( Config* settings, Mesh* mesh ); + Checkerboard_SN( Config* settings, Mesh* mesh, QuadratureBase* quad ); virtual ~Checkerboard_SN(); virtual VectorVector GetScatteringXS( const Vector& energies ) override; @@ -29,8 +29,8 @@ class Checkerboard_SN : public ProblemBase class Checkerboard_Moment : public ProblemBase { private: - Vector _scatteringXS; /*!< @brief Vector of scattering crosssections len: numCells */ - Vector _totalXS; /*!< @brief Vector of total crosssections. len: numCells*/ + Vector _sigmaS; /*!< @brief Vector of scattering crosssections len: numCells */ + Vector _sigmaT; /*!< @brief Vector of total crosssections. len: numCells*/ Checkerboard_Moment() = delete; @@ -48,7 +48,7 @@ class Checkerboard_Moment : public ProblemBase int GlobalIndex( int l, int k ) const; public: - Checkerboard_Moment( Config* settings, Mesh* mesh ); + Checkerboard_Moment( Config* settings, Mesh* mesh, QuadratureBase* quad ); virtual ~Checkerboard_Moment(); virtual VectorVector GetScatteringXS( const Vector& energies ) override; @@ -60,8 +60,8 @@ class Checkerboard_Moment : public ProblemBase class Checkerboard_SN_1D : public ProblemBase { private: - Vector _scatteringXS; /*!< @brief Vector of scattering crosssections */ - Vector _totalXS; /*!< @brief Vector of total crosssections */ + Vector _sigmaS; /*!< @brief Vector of scattering crosssections */ + Vector _sigmaT; /*!< @brief Vector of total crosssections */ Checkerboard_SN_1D() = delete; @@ -69,7 +69,7 @@ class Checkerboard_SN_1D : public ProblemBase bool isSource( const Vector& pos ) const; /*!< @return True if pos is in source region, False otherwise */ public: - Checkerboard_SN_1D( Config* settings, Mesh* mesh ); + Checkerboard_SN_1D( Config* settings, Mesh* mesh, QuadratureBase* quad ); virtual ~Checkerboard_SN_1D(); virtual VectorVector GetScatteringXS( const Vector& energies ) override; @@ -81,8 +81,8 @@ class Checkerboard_SN_1D : public ProblemBase class Checkerboard_Moment_1D : public ProblemBase { private: - Vector _scatteringXS; /*!< @brief Vector of scattering crosssections len: numCells */ - Vector _totalXS; /*!< @brief Vector of total crosssections. len: numCells*/ + Vector _sigmaS; /*!< @brief Vector of scattering crosssections len: numCells */ + Vector _sigmaT; /*!< @brief Vector of total crosssections. len: numCells*/ Checkerboard_Moment_1D() = delete; @@ -100,7 +100,7 @@ class Checkerboard_Moment_1D : public ProblemBase int GlobalIndex( int l, int k ) const; public: - Checkerboard_Moment_1D( Config* settings, Mesh* mesh ); + Checkerboard_Moment_1D( Config* settings, Mesh* mesh, QuadratureBase* quad ); virtual ~Checkerboard_Moment_1D(); virtual VectorVector GetScatteringXS( const Vector& energies ) override; diff --git a/include/problems/halflattice.hpp b/include/problems/halflattice.hpp new file mode 100644 index 00000000..d15b0eb0 --- /dev/null +++ b/include/problems/halflattice.hpp @@ -0,0 +1,84 @@ +#ifndef HALFLATTICE_H +#define HALFLATTICE_H + +#include "problembase.hpp" + +class SphericalBase; + +class HalfLattice_SN : public ProblemBase +{ + private: + HalfLattice_SN() = delete; + + Vector _sigmaS; /*!< @brief Vector of scattering crosssections */ + Vector _sigmaT; /*!< @brief Vector of total crosssections */ + + std::map _ghostCellsReflectingY; /*!< map that indicates if a ghostcell has a fixed value or is a mirroring boundary */ + std::map _quadratureYReflection; /*!< map that gives a Reflection against the y axis for the velocity ordinates */ + + // Lattice QOIS + double _curAbsorptionLattice; /*!< @brief Absorption of particles at Lattice checkerboard regions at current time step */ + double _totalAbsorptionLattice; /*!< @brief Absorption of particles at Lattice checkerboard regions integrated until current time step */ + double _curMaxAbsorptionLattice; /*!< @brief Maximum pointwise absorption of particles at Lattice checkerboard regions until current time step */ + + bool IsAbsorption( const Vector& pos ) const; /*!< @return True if pos is in absorption region, False otherwise */ + bool IsSource( const Vector& pos ) const; /*!< @return True if pos is in source region, False otherwise */ + + protected: + void SetGhostCells() override; /*!< @brief Sets vector of ghost cells for boundary conditions */ + unsigned GetBlockID( const Vector& pos ) const; /*!< @brief Returns checkerboard field id (0-48, row major) of the Lattice test case */ + + public: + HalfLattice_SN( Config* settings, Mesh* mesh, QuadratureBase* quad ); + virtual ~HalfLattice_SN(); + + virtual VectorVector GetScatteringXS( const Vector& energies ) override; + virtual VectorVector GetTotalXS( const Vector& energies ) override; + virtual std::vector GetExternalSource( const Vector& energies ) override; + virtual VectorVector SetupIC() override; + + const Vector& GetGhostCellValue( int idx_cell, const Vector& cell_sol ) override final; + + void ComputeCurrentOutflow( const VectorVector& solution ) override; /*!< @brief Computes Problemspeagnostic Scalar QOI */ + void ComputeMaxOrdinatewiseOutflow( const VectorVector& solution ) override; /*!< @brief Computes Problemspeagnostic Scalar QOI */ + + double GetCurAbsorptionLattice() override final; + double GetTotalAbsorptionLattice() override final; + double GetMaxAbsorptionLattice() override final; + void ComputeTotalAbsorptionLattice( double dT ) override; + void ComputeCurrentAbsorptionLattice( const Vector& scalarFlux ) override; + void ComputeMaxAbsorptionLattice( const Vector& scalarFlux ) override; +}; + +class HalfLattice_Moment : public ProblemBase +{ + private: + Vector _sigmaS; /*!< @brief Vector of scattering crosssections len: numCells */ + Vector _sigmaT; /*!< @brief Vector of total crosssections. len: numCells*/ + + HalfLattice_Moment() = delete; + + bool isAbsorption( const Vector& pos ) const; /*!< @return True if pos is in absorption region, False otherwise */ + bool isSource( const Vector& pos ) const; /*!< @return True if pos is in source region, False otherwise */ + + /*! + * @brief Gets the global index for given order l of Legendre polynomials and given + * order k of Legendre functions. + * Note: This is code doubling from PNSolver::GlobalIndex + * @param l order of Legendre polynomial + * @param k order of Legendre function + * @returns globalIndex + */ + int GlobalIndex( int l, int k ) const; + + public: + HalfLattice_Moment( Config* settings, Mesh* mesh, QuadratureBase* quad ); + virtual ~HalfLattice_Moment(); + + virtual VectorVector GetScatteringXS( const Vector& energies ) override; + virtual VectorVector GetTotalXS( const Vector& energies ) override; + virtual std::vector GetExternalSource( const Vector& energies ) override; + virtual VectorVector SetupIC() override; +}; + +#endif // HALFLATTICE_H diff --git a/include/problems/hohlraum.hpp b/include/problems/hohlraum.hpp index 365a18e5..d43348b5 100644 --- a/include/problems/hohlraum.hpp +++ b/include/problems/hohlraum.hpp @@ -7,11 +7,11 @@ class Hohlraum : public ProblemBase { private: Hohlraum() = delete; - Vector _scatteringXS; /*!< @brief Vector of scattering crosssections */ - Vector _totalXS; /*!< @brief Vector of total crosssections */ + Vector _sigmaS; /*!< @brief Vector of scattering crosssections */ + Vector _sigmaT; /*!< @brief Vector of total crosssections */ public: - Hohlraum( Config* settings, Mesh* mesh ); + Hohlraum( Config* settings, Mesh* mesh, QuadratureBase* quad ); virtual ~Hohlraum(); virtual std::vector GetExternalSource( const Vector& energies ) override; virtual VectorVector SetupIC() override; @@ -25,7 +25,7 @@ class Hohlraum_Moment : public Hohlraum Hohlraum_Moment() = delete; public: - Hohlraum_Moment( Config* settings, Mesh* mesh ); + Hohlraum_Moment( Config* settings, Mesh* mesh, QuadratureBase* quad ); ~Hohlraum_Moment(); std::vector GetExternalSource( const Vector& energies ) override final; VectorVector SetupIC() override final; diff --git a/include/problems/lattice.hpp b/include/problems/lattice.hpp new file mode 100644 index 00000000..e2cd95b6 --- /dev/null +++ b/include/problems/lattice.hpp @@ -0,0 +1,80 @@ +#ifndef LATTICE_H +#define LATTICE_H + +#include "problembase.hpp" + +class SphericalBase; + +class Lattice_SN : public ProblemBase +{ + private: + Lattice_SN() = delete; + + Vector _sigmaS; /*!< @brief Vector of scattering crosssections */ + Vector _sigmaT; /*!< @brief Vector of total crosssections */ + + // Lattice QOIS + double _curAbsorptionLattice; /*!< @brief Absorption of particles at Lattice checkerboard regions at current time step */ + double _totalAbsorptionLattice; /*!< @brief Absorption of particles at Lattice checkerboard regions integrated until current time step */ + double _curMaxAbsorptionLattice; /*!< @brief Maximum pointwise absorption of particles at Lattice checkerboard regions until current time step */ + + bool IsAbsorption( const Vector& pos ) const; /*!< @return True if pos is in absorption region, False otherwise */ + bool IsSource( const Vector& pos ) const; /*!< @return True if pos is in source region, False otherwise */ + + bool IsAbsorption( double x, double y ) const; /*!< @return True if pos is in absorption region, False otherwise */ + + protected: + void SetGhostCells() override; /*!< @brief Sets vector of ghost cells for boundary conditions */ + unsigned GetBlockID( const Vector& pos ) const; /*!< @brief Returns checkerboard field id (0-48, row major) of the Lattice test case */ + + public: + Lattice_SN( Config* settings, Mesh* mesh, QuadratureBase* quad ); + virtual ~Lattice_SN(); + + virtual VectorVector GetScatteringXS( const Vector& energies ) override; + virtual VectorVector GetTotalXS( const Vector& energies ) override; + virtual std::vector GetExternalSource( const Vector& energies ) override; + virtual VectorVector SetupIC() override; + + const Vector& GetGhostCellValue( int idx_cell, const Vector& cell_sol ) override final; + + double GetCurAbsorptionLattice() override final; + double GetTotalAbsorptionLattice() override final; + double GetMaxAbsorptionLattice() override final; + void ComputeTotalAbsorptionLattice( double dT ) override; + void ComputeCurrentAbsorptionLattice( const Vector& scalarFlux ) override; + void ComputeMaxAbsorptionLattice( const Vector& scalarFlux ) override; +}; + +class Lattice_Moment : public ProblemBase +{ + private: + Vector _sigmaS; /*!< @brief Vector of scattering crosssections len: numCells */ + Vector _sigmaT; /*!< @brief Vector of total crosssections. len: numCells*/ + + Lattice_Moment() = delete; + + bool isAbsorption( const Vector& pos ) const; /*!< @return True if pos is in absorption region, False otherwise */ + bool isSource( const Vector& pos ) const; /*!< @return True if pos is in source region, False otherwise */ + + /*! + * @brief Gets the global index for given order l of Legendre polynomials and given + * order k of Legendre functions. + * Note: This is code doubling from PNSolver::GlobalIndex + * @param l order of Legendre polynomial + * @param k order of Legendre function + * @returns globalIndex + */ + int GlobalIndex( int l, int k ) const; + + public: + Lattice_Moment( Config* settings, Mesh* mesh, QuadratureBase* quad ); + virtual ~Lattice_Moment(); + + virtual VectorVector GetScatteringXS( const Vector& energies ) override; + virtual VectorVector GetTotalXS( const Vector& energies ) override; + virtual std::vector GetExternalSource( const Vector& energies ) override; + virtual VectorVector SetupIC() override; +}; + +#endif // LATTICE_H diff --git a/include/problems/linesource.hpp b/include/problems/linesource.hpp index 1416d404..502d84c6 100644 --- a/include/problems/linesource.hpp +++ b/include/problems/linesource.hpp @@ -9,10 +9,11 @@ class LineSource : public ProblemBase LineSource() = delete; protected: - double _sigmaS; /*!< @brief Scattering coefficient */ + Vector _sigmaS; /*!< @brief Vector of scattering crosssections */ + Vector _sigmaT; /*!< @brief Vector of total crosssections */ public: - LineSource( Config* settings, Mesh* mesh ); + LineSource( Config* settings, Mesh* mesh, QuadratureBase* quad ); ~LineSource(); @@ -25,6 +26,10 @@ class LineSource : public ProblemBase */ virtual double GetAnalyticalSolution( double x, double y, double t, double sigma_s ) override; + VectorVector GetScatteringXS( const Vector& energies ) override; + VectorVector GetTotalXS( const Vector& energies ) override; + std::vector GetExternalSource( const Vector& energies ) override; + private: /*! @brief Helper Functions to compute the analytic solution for sigma != 0 * (See publication: Garret,Hauck; Momentum Closures for Linear Kinetic Transport Equations) @@ -48,12 +53,9 @@ class LineSource_SN : public LineSource LineSource_SN() = delete; public: - LineSource_SN( Config* settings, Mesh* mesh ); + LineSource_SN( Config* settings, Mesh* mesh, QuadratureBase* quad ); ~LineSource_SN(); - VectorVector GetScatteringXS( const Vector& energies ) override; - VectorVector GetTotalXS( const Vector& energies ) override; - std::vector GetExternalSource( const Vector& energies ) override; VectorVector SetupIC() override; }; @@ -63,13 +65,12 @@ class LineSource_Moment : public LineSource LineSource_Moment() = delete; public: - LineSource_Moment( Config* settings, Mesh* mesh ); + LineSource_Moment( Config* settings, Mesh* mesh, QuadratureBase* quad ); ~LineSource_Moment(); - VectorVector GetScatteringXS( const Vector& energies ) override; - VectorVector GetTotalXS( const Vector& energies ) override; - std::vector GetExternalSource( const Vector& energies ) override; VectorVector SetupIC() override; + + std::vector GetExternalSource( const Vector& energies ) override final; }; class LineSource_SN_1D : public LineSource_SN @@ -78,7 +79,7 @@ class LineSource_SN_1D : public LineSource_SN LineSource_SN_1D() = delete; public: - LineSource_SN_1D( Config* settings, Mesh* mesh ); + LineSource_SN_1D( Config* settings, Mesh* mesh, QuadratureBase* quad ); VectorVector SetupIC() override; }; @@ -89,7 +90,7 @@ class LineSource_Moment_1D : public LineSource_Moment LineSource_Moment_1D() = delete; public: - LineSource_Moment_1D( Config* settings, Mesh* mesh ); + LineSource_Moment_1D( Config* settings, Mesh* mesh, QuadratureBase* quad ); VectorVector SetupIC() override; }; diff --git a/include/problems/meltingcube.hpp b/include/problems/meltingcube.hpp index 62eeb273..aef01ddf 100644 --- a/include/problems/meltingcube.hpp +++ b/include/problems/meltingcube.hpp @@ -12,7 +12,7 @@ class MeltingCube : public ProblemBase double _sigmaS; /*!< @brief Scattering coefficient */ public: - MeltingCube( Config* settings, Mesh* mesh ); + MeltingCube( Config* settings, Mesh* mesh, QuadratureBase* quad ); ~MeltingCube(); VectorVector GetScatteringXS( const Vector& energies ) override; VectorVector GetTotalXS( const Vector& energies ) override; @@ -25,7 +25,7 @@ class MeltingCube_SN : public MeltingCube MeltingCube_SN() = delete; public: - MeltingCube_SN( Config* settings, Mesh* mesh ); + MeltingCube_SN( Config* settings, Mesh* mesh, QuadratureBase* quad ); ~MeltingCube_SN(); VectorVector SetupIC() override; }; @@ -36,7 +36,7 @@ class MeltingCube_Moment : public MeltingCube MeltingCube_Moment() = delete; public: - MeltingCube_Moment( Config* settings, Mesh* mesh ); + MeltingCube_Moment( Config* settings, Mesh* mesh, QuadratureBase* quad ); ~MeltingCube_Moment(); VectorVector SetupIC() override; }; @@ -47,7 +47,7 @@ class MeltingCube_SN_1D : public MeltingCube MeltingCube_SN_1D() = delete; public: - MeltingCube_SN_1D( Config* settings, Mesh* mesh ); + MeltingCube_SN_1D( Config* settings, Mesh* mesh, QuadratureBase* quad ); ~MeltingCube_SN_1D(); VectorVector SetupIC() override; @@ -59,7 +59,7 @@ class MeltingCube_Moment_1D : public MeltingCube MeltingCube_Moment_1D() = delete; public: - MeltingCube_Moment_1D( Config* settings, Mesh* mesh ); + MeltingCube_Moment_1D( Config* settings, Mesh* mesh, QuadratureBase* quad ); ~MeltingCube_Moment_1D(); VectorVector SetupIC() override; diff --git a/include/problems/phantomimage.hpp b/include/problems/phantomimage.hpp index 0c7c00d4..6123cab6 100644 --- a/include/problems/phantomimage.hpp +++ b/include/problems/phantomimage.hpp @@ -9,7 +9,7 @@ class PhantomImage : public ProblemBase PhantomImage() = delete; double _sigmaS; /*!< @brief Scattering coefficient */ public: - PhantomImage( Config* settings, Mesh* mesh ); + PhantomImage( Config* settings, Mesh* mesh, QuadratureBase* quad ); virtual ~PhantomImage(); VectorVector SetupIC() override; std::vector GetExternalSource( const Vector& energies ) override; diff --git a/include/problems/problembase.hpp b/include/problems/problembase.hpp index ba42cd41..d78f4495 100644 --- a/include/problems/problembase.hpp +++ b/include/problems/problembase.hpp @@ -2,29 +2,42 @@ #define PROBLEMBASE_H #include "common/typedef.hpp" +#include // Forward Declaration class Config; class Mesh; +class QuadratureBase; class ProblemBase { - protected: - Config* _settings; /*!< @brief pointer to settings */ - Mesh* _mesh; /*!< @brief pointer to mesh */ + Config* _settings; /*!< @brief pointer to settings */ + Mesh* _mesh; /*!< @brief pointer to mesh */ + QuadratureBase* _quad; /*!< @brief pointer to quadrature */ std::vector _density; /*!< @brief vector with patient densities */ std::vector _stoppingPower; /*!< @brief vector with stopping powers*/ - + std::map _ghostCells; /*!< @brief Vector of ghost cells for boundary conditions */ + virtual void SetGhostCells(); /*!< @brief Sets vector of ghost cells for + boundary conditions */ + VectorVector _dummyProbeMoments; + std::vector _dummyProbeValsGreenLine; ProblemBase() = delete; + // Quantities of Interest + double _curScalarOutflow; /*!< @brief Outflow over whole boundary at current time step */ + double _totalScalarOutflow; /*!< @brief Outflow over whole boundary integrated until current time step */ + double _curMaxOrdinateOutflow; /*!< @brief Maximum ordinate-wise ouftlow over boundary over all time steps */ + double _mass; /*!< @brief Integrated radiation flux over the whole simulation (i.e. mass of the particles) */ + double _changeRateFlux; /*!< @brief Integrated change of radiation flux over the whole simulation */ + public: /** - * @brief GetScatteringXS gives back vector (each energy) of vectors (each grid cell) - * of scattering cross sections for materials defined by density and energies - * in vector energy + * @brief GetScatteringXS gives back vector (each energy) of vectors (each + * grid cell) of scattering cross sections for materials defined by density + * and energies in vector energy * @param energies is the energy the cross section is queried for */ virtual VectorVector GetScatteringXS( const Vector& energies ) = 0; @@ -43,8 +56,8 @@ class ProblemBase virtual Vector GetTotalXSE( const Vector& /*energies*/ ) { return Vector( 1 ); } /** - * @brief GetScatteringXSE gives back vector (each energy) of scattering cross sections for energies - * in vector energy + * @brief GetScatteringXSE gives back vector (each energy) of scattering cross + * sections for energies in vector energy * @param energies is the energy the cross section is queried for * @param angles are the queried angles */ @@ -53,16 +66,16 @@ class ProblemBase } /** - * @brief GetScatteringXSE gives back vector (each energy) of scattering cross sections for energies - * in vector energy + * @brief GetScatteringXSE gives back vector (each energy) of scattering cross + * sections for energies in vector energy * @param energies is the energy the cross section is queried for * @param angles are the queried angles */ virtual VectorVector GetScatteringXSE( const Vector& energies, const Vector& angles ); /** - * @brief GetExternalSource gives back vector of vectors of source terms for each - * energy, cell and angle + * @brief GetExternalSource gives back vector of vectors of source terms for + * each energy, cell and angle * @param energies is the energy the cross section is queried for */ virtual std::vector GetExternalSource( const Vector& energies ) = 0; @@ -85,9 +98,21 @@ class ProblemBase */ virtual VectorVector SetupIC() = 0; - /*! @brief Exact analytical solution for the Line Source Test Case. Returns 0 for all other test cases. + /** + * @brief Returns the Value of the ghost cell with index idx_cell + */ + virtual const Vector& GetGhostCellValue( int idx_cell, const Vector& cell_sol ); + + /** + * @brief Returns the pointer to ghostcell map + */ + std::map& GetGhostCells() { return _ghostCells; }; + + /*! @brief Exact analytical solution for the Line Source Test Case. Returns 0 + for all other test cases. @return exact solution at x,y,t,scatteringXS - */ // Default is set to 0. ~> if no analytical solution is available. + */ + // Default is set to 0. ~> if no analytical solution is available. double virtual GetAnalyticalSolution( double /*x*/, double /*y*/, double /*t*/, double /*scatteringXS*/ ) { return 0.0; } /** @@ -95,7 +120,7 @@ class ProblemBase * @param settings stores all needed user information * @param mesh for the test case */ - ProblemBase( Config* settings, Mesh* mesh ); + ProblemBase( Config* settings, Mesh* mesh, QuadratureBase* quad ); virtual ~ProblemBase(); /** @@ -104,7 +129,53 @@ class ProblemBase * @param mesh for the test case * @return pointer to ProblemBase */ - static ProblemBase* Create( Config* settings, Mesh* mesh ); + static ProblemBase* Create( Config* settings, Mesh* mesh, QuadratureBase* quad ); + + // ---- Helper Functions to compute quantities of interest ---- + // Getter + // Test case agnostic + virtual double GetMass() { return _mass; }; + virtual double GetChangeRateFlux() { return _changeRateFlux; }; + virtual double GetCurrentOutflow() { return _curScalarOutflow; }; + virtual double GetTotalOutflow() { return _totalScalarOutflow; }; + virtual double GetMaxOrdinatewiseOutflow() { return _curMaxOrdinateOutflow; }; + // Test case Specific + // Lattice + virtual double GetCurAbsorptionLattice() { return 0.0; }; + virtual double GetTotalAbsorptionLattice() { return 0.0; }; + virtual double GetMaxAbsorptionLattice() { return 0.0; }; + // Symmetric Hohlraum + virtual double GetCurAbsorptionHohlraumCenter() { return 0.0; }; + virtual double GetCurAbsorptionHohlraumVertical() { return 0.0; }; + virtual double GetCurAbsorptionHohlraumHorizontal() { return 0.0; }; + virtual double GetTotalAbsorptionHohlraumCenter() { return 0.0; }; + virtual double GetTotalAbsorptionHohlraumVertical() { return 0.0; }; + virtual double GetTotalAbsorptionHohlraumHorizontal() { return 0.0; }; + virtual double GetVarAbsorptionHohlraumGreen() { return 0.0; }; + virtual const VectorVector& GetCurrentProbeMoment() const { return _dummyProbeMoments; }; + virtual const std::vector& GetCurrentProbeValuesGreenLine() const { return _dummyProbeValsGreenLine; }; + virtual const std::vector& GetCurrentVarProbeValuesGreenLine() const { return _dummyProbeValsGreenLine; }; + + // Computer + // Test case agnostic + virtual void ComputeCurrentOutflow( const VectorVector& solution ); /*!< @brief Computes Problemspeagnostic Scalar QOI */ + virtual void ComputeMaxOrdinatewiseOutflow( const VectorVector& solution ); /*!< @brief Computes Problemspeagnostic Scalar QOI */ + void ComputeTotalOutflow( double dT ); /*!< @brief Computes Problemspeagnostic Scalar QOI */ + void ComputeMass( const Vector& scalarFlux ); /*!< @brief Computes Problemspeagnostic Scalar QOI */ + void ComputeChangeRateFlux( const Vector& scalarFlux, const Vector& scalarFluxNew ); /*!< @brief Computes Problemspeagnostic Scalar QOI */ + + // Test case Specific + // Lattice + virtual void ComputeTotalAbsorptionLattice( double /* dT */ ){}; /*!< @brief Computes Problemspecific Scalar QOI */ + virtual void ComputeCurrentAbsorptionLattice( const Vector& /* scalarFlux */ ){}; /*!< @brief Computes Problemspecific Scalar QOI */ + virtual void ComputeMaxAbsorptionLattice( const Vector& /* scalarFlux */ ){}; /*!< @brief Computes Problemspecific Scalar QOI */ + + // Symmetric Hohlraum + virtual void ComputeCurrentAbsorptionHohlraum( const Vector& /* scalarFlux */ ){}; /*!< @brief Computes Problemspecific Scalar QOI */ + virtual void ComputeTotalAbsorptionHohlraum( double /* dT */ ){}; /*!< @brief Computes Problemspecific Scalar QOI */ + virtual void ComputeCurrentProbeMoment( const VectorVector& /* solution */ ){}; /*!< @brief Computes Problemspecific Scalar QOI */ + virtual void ComputeVarAbsorptionGreen( const Vector& /* scalarFlux*/ ){}; /*!< @brief Computes Problemspecific Scalar QOI */ + virtual void ComputeQOIsGreenProbingLine( const Vector& /* scalarFlux*/ ){}; /*!< @brief Computes Problemspecific Scalar QOI */ }; #endif diff --git a/include/problems/quarterhohlraum.hpp b/include/problems/quarterhohlraum.hpp new file mode 100644 index 00000000..73a71807 --- /dev/null +++ b/include/problems/quarterhohlraum.hpp @@ -0,0 +1,91 @@ +#ifndef QUARTER_HOHLRAUM_H +#define QUARTER_HOHLRAUM_H + +#include "problems/problembase.hpp" + +class QuarterHohlraum : public ProblemBase +{ + private: + QuarterHohlraum() = delete; + + std::vector linspace2D( const std::vector& start, const std::vector& end, unsigned num_points ); + std::map _ghostCellsReflectingX; /*!< map that indicates if a ghostcell has a fixed value or is a mirroring boundary */ + std::map _ghostCellsReflectingY; /*!< map that indicates if a ghostcell has a fixed value or is a mirroring boundary */ + std::map _quadratureXReflection; /*!< map that gives a Reflection against the x axis for the velocity ordinates */ + std::map _quadratureYReflection; /*!< map that gives a Reflection against the y axis for the velocity ordinates */ + + protected: + Vector _sigmaS; /*!< @brief Vector of scattering crosssections */ + Vector _sigmaT; /*!< @brief Vector of total crosssections */ + + std::vector _cornerUpperLeftGreen; /*!< @brief Coord of corner of the green area (minus thickness/2 of it) */ + std::vector _cornerLowerLeftGreen; /*!< @brief Coord of corner of the green area (minus thickness/2 of it) */ + std::vector _cornerUpperRightGreen; /*!< @brief Coord of corner of the green area (minus thickness/2 of it) */ + std::vector _cornerLowerRightGreen; /*!< @brief Coord of corner of the green area (minus thickness/2 of it) */ + double _thicknessGreen; /*!< @brief thickness of the green area */ + double _redRightTop; /*!< @brief x coord of the right top corner of the red area */ + double _posRedRightBorder; /*!< @brief x coord of the left border of the right red area */ + + void SetGhostCells() override; /*!< @brief Sets vector of ghost cells for boundary conditions */ + + void SetProbingCellsLineGreen(); /*!< @brief Sets cell ids for probing cells on the green line of the hohlraum */ + + double _curAbsorptionHohlraumCenter; /*!< @brief Absorption of particles at Hohlraum center at current time step */ + double _curAbsorptionHohlraumVertical; /*!< @brief Absorption of particles at Hohlraum vertical walls at current time step */ + double _curAbsorptionHohlraumHorizontal; /*!< @brief Absorption of particles at Hohlraum horizontal walls at current time step */ + double _totalAbsorptionHohlraumCenter; /*!< @brief Absorption of particles at Hohlraum center integrated until current time step */ + double _totalAbsorptionHohlraumVertical; /*!< @brief Absorption of particles at Hohlraum vertical walls integrated until current time step */ + double _totalAbsorptionHohlraumHorizontal; /*!< @brief Absorption of particles at Hohlraum horizontal walls integrated until current time step */ + double _varAbsorptionHohlraumGreen; /*!< @brief Absorption of particles at Hohlraum green center cells integrated at current time step */ + std::vector _probingCells; /*!< @brief Indices of cells that contain a probing sensor */ + VectorVector _probingMoments; /*!< @brief Solution Momnets at the probing cells that contain a probing sensor */ + unsigned _nProbingCellsLineGreen; /*!< @brief Number of sampling cells that contain a probing sensor for the sliding window */ + std::vector _probingCellsLineGreen; /*!< @brief Indices of cells that contain a probing sensor for the sliding window */ + std::vector _absorptionValsIntegrated; /*!< @brief Avg Absorption value at the sampleing points of lineGreen */ + std::vector _varAbsorptionValsIntegrated; /*!< @brief Var in Avg Absorption value at the sampleing points of lineGreen */ + + public: + QuarterHohlraum( Config* settings, Mesh* mesh, QuadratureBase* quad ); + virtual ~QuarterHohlraum(); + virtual std::vector GetExternalSource( const Vector& energies ) override; + virtual VectorVector SetupIC() override; + VectorVector GetScatteringXS( const Vector& energies ) override final; + VectorVector GetTotalXS( const Vector& energies ) override final; + const Vector& GetGhostCellValue( int idx_cell, const Vector& cell_sol ) override final; + + void ComputeCurrentAbsorptionHohlraum( const Vector& scalarFlux ) override; /*!< @brief Computes Problemspecific Scalar QOI */ + void ComputeTotalAbsorptionHohlraum( double dT ) override; /*!< @brief Computes Problemspecific Scalar QOI */ + void ComputeCurrentProbeMoment( const VectorVector& solution ) override; /*!< @brief Computes Problemspecific Scalar QOI */ + void ComputeVarAbsorptionGreen( const Vector& scalarFlux ) override; /*!< @brief Computes Problemspecific Scalar QOI */ + void ComputeQOIsGreenProbingLine( const Vector& scalarFlux ) override; + + void ComputeCurrentOutflow( const VectorVector& solution ) override; /*!< @brief Computes Problemspeagnostic Scalar QOI */ + void ComputeMaxOrdinatewiseOutflow( const VectorVector& solution ) override; /*!< @brief Computes Problemspeagnostic Scalar QOI */ + + double GetCurAbsorptionHohlraumCenter() override { return _curAbsorptionHohlraumCenter; }; + double GetCurAbsorptionHohlraumVertical() override { return _curAbsorptionHohlraumVertical; }; + double GetCurAbsorptionHohlraumHorizontal() override { return _curAbsorptionHohlraumHorizontal; }; + double GetTotalAbsorptionHohlraumCenter() override { return _totalAbsorptionHohlraumCenter; }; + double GetTotalAbsorptionHohlraumVertical() override { return _totalAbsorptionHohlraumVertical; }; + double GetTotalAbsorptionHohlraumHorizontal() override { return _totalAbsorptionHohlraumHorizontal; }; + double GetVarAbsorptionHohlraumGreen() override { return _varAbsorptionHohlraumGreen; }; + const VectorVector& GetCurrentProbeMoment() const override { return _probingMoments; }; + virtual const std::vector& GetCurrentProbeValuesGreenLine() const override { return _absorptionValsIntegrated; }; + virtual const std::vector& GetCurrentVarProbeValuesGreenLine() const override { return _varAbsorptionValsIntegrated; }; +}; + +class QuarterHohlraum_Moment : public QuarterHohlraum +{ + private: + QuarterHohlraum_Moment() = delete; + // TODO void SetGhostCells() override final; /*!< @brief Sets vector of ghost cells for boundary conditions */ + + public: + QuarterHohlraum_Moment( Config* settings, Mesh* mesh, QuadratureBase* quad ); + ~QuarterHohlraum_Moment(); + std::vector GetExternalSource( const Vector& energies ) override final; + VectorVector SetupIC() override final; + void ComputeCurrentProbeMoment( const VectorVector& solution ) override final; /*!< @brief Computes Problemspecific Scalar QOI */ +}; + +#endif // QUARTER_HOHLRAUM_H diff --git a/include/problems/radiationctimage.hpp b/include/problems/radiationctimage.hpp index 2f66efc6..6c66f3a7 100644 --- a/include/problems/radiationctimage.hpp +++ b/include/problems/radiationctimage.hpp @@ -9,7 +9,7 @@ class RadiationCTImage : public ProblemBase RadiationCTImage() = delete; public: - RadiationCTImage( Config* settings, Mesh* mesh ); + RadiationCTImage( Config* settings, Mesh* mesh, QuadratureBase* quad ); ~RadiationCTImage(); std::vector GetExternalSource( const Vector& energies ) override; VectorVector SetupIC() override; @@ -24,7 +24,7 @@ class RadiationCTImage_Moment : public RadiationCTImage RadiationCTImage_Moment() = delete; public: - RadiationCTImage_Moment( Config* settings, Mesh* mesh ); + RadiationCTImage_Moment( Config* settings, Mesh* mesh, QuadratureBase* quad ); ~RadiationCTImage_Moment(); std::vector GetExternalSource( const Vector& energies ) override final; VectorVector SetupIC() override final; diff --git a/include/problems/starmapvalidation.hpp b/include/problems/starmapvalidation.hpp index 011464fb..2d5b1667 100644 --- a/include/problems/starmapvalidation.hpp +++ b/include/problems/starmapvalidation.hpp @@ -14,7 +14,7 @@ class StarMapValidation_SN : public ProblemBase double NormPDF( double x, double mu, double sigma ); /*!< Creates an 1D normal distribution at x with mean mu and stddev sigma */ public: - StarMapValidation_SN( Config* settings, Mesh* mesh ); + StarMapValidation_SN( Config* settings, Mesh* mesh, QuadratureBase* quad ); ~StarMapValidation_SN(); VectorVector GetScatteringXS( const Vector& energies ) override; @@ -32,7 +32,7 @@ class StarMapValidation_Moment : public StarMapValidation_SN StarMapValidation_Moment() = delete; public: - StarMapValidation_Moment( Config* settings, Mesh* mesh ); + StarMapValidation_Moment( Config* settings, Mesh* mesh, QuadratureBase* quad ); ~StarMapValidation_Moment(); VectorVector SetupIC() override; std::vector GetExternalSource( const Vector& energies ) override; diff --git a/include/problems/symmetrichohlraum.hpp b/include/problems/symmetrichohlraum.hpp new file mode 100644 index 00000000..ca9e1e8d --- /dev/null +++ b/include/problems/symmetrichohlraum.hpp @@ -0,0 +1,95 @@ +#ifndef SYMMETRIC_HOHLRAUM_H +#define SYMMETRIC_HOHLRAUM_H + +#include "problems/problembase.hpp" + +class SymmetricHohlraum : public ProblemBase +{ + private: + SymmetricHohlraum() = delete; + + std::vector linspace2D( const std::vector& start, const std::vector& end, unsigned num_points ); + + protected: + Vector _sigmaS; /*!< @brief Vector of scattering crosssections */ + Vector _sigmaT; /*!< @brief Vector of total crosssections */ + + std::vector _cornerUpperLeftGreen; /*!< @brief Coord of corner of the green area (minus thickness/2 of it) relative to the green center */ + std::vector _cornerLowerLeftGreen; /*!< @brief Coord of corner of the green area (minus thickness/2 of it) relative to the green center */ + std::vector + _cornerUpperRightGreen; /*!< @brief Coord of corner of the green area (minus thickness/2 of it) relative to the green center */ + std::vector + _cornerLowerRightGreen; /*!< @brief Coord of corner of the green area (minus thickness/2 of it) relative to the green center */ + + double _widthGreen; /*!< @brief width of the green area */ + double _heightGreen; /*!< @brief height of the green area */ + double _thicknessGreen; /*!< @brief thickness of the green area */ + std::vector _centerGreen; /*!< @brief Center of the Hohlraum */ + + double _redLeftTop; /*!< @brief y coord of the top of the left red area */ + double _redLeftBottom; /*!< @brief y coord of the bottom of the left red area */ + double _redRightTop; /*!< @brief y coord of the top of the right red area */ + double _redRightBottom; /*!< @brief y coord of the bottom of the right red area */ + double _posRedLeftBorder; /*!< @brief thickness of the left red area */ + double _posRedRightBorder; /*!< @brief thickness of the right red area */ + + void SetGhostCells() override; /*!< @brief Sets vector of ghost cells for boundary conditions */ + + void SetProbingCellsLineGreen(); /*!< @brief Sets cell ids for probing cells on the green line of the hohlraum */ + + double _curAbsorptionHohlraumCenter; /*!< @brief Absorption of particles at Hohlraum center at current time step */ + double _curAbsorptionHohlraumVertical; /*!< @brief Absorption of particles at Hohlraum vertical walls at current time step */ + double _curAbsorptionHohlraumHorizontal; /*!< @brief Absorption of particles at Hohlraum horizontal walls at current time step */ + double _totalAbsorptionHohlraumCenter; /*!< @brief Absorption of particles at Hohlraum center integrated until current time step */ + double _totalAbsorptionHohlraumVertical; /*!< @brief Absorption of particles at Hohlraum vertical walls integrated until current time step */ + double _totalAbsorptionHohlraumHorizontal; /*!< @brief Absorption of particles at Hohlraum horizontal walls integrated until current time step */ + double _varAbsorptionHohlraumGreen; /*!< @brief Absorption of particles at Hohlraum green center cells integrated at current time step */ + std::vector _probingCells; /*!< @brief Indices of cells that contain a probing sensor */ + VectorVector _probingMoments; /*!< @brief Solution Momnets at the probing cells that contain a probing sensor */ + unsigned _nProbingCellsLineGreen; /*!< @brief Number of sampling cells that contain a probing sensor for the sliding window */ + std::vector _probingCellsLineGreen; /*!< @brief Indices of cells that contain a probing sensor for the sliding window */ + std::vector _absorptionValsIntegrated; /*!< @brief Avg Absorption value at the sampleing points of lineGreen */ + std::vector _varAbsorptionValsIntegrated; /*!< @brief Var in Avg Absorption value at the sampleing points of lineGreen */ + + public: + SymmetricHohlraum( Config* settings, Mesh* mesh, QuadratureBase* quad ); + virtual ~SymmetricHohlraum(); + virtual std::vector GetExternalSource( const Vector& energies ) override; + virtual VectorVector SetupIC() override; + VectorVector GetScatteringXS( const Vector& energies ) override final; + VectorVector GetTotalXS( const Vector& energies ) override final; + const Vector& GetGhostCellValue( int idx_cell, const Vector& cell_sol ) override final; + + void ComputeCurrentAbsorptionHohlraum( const Vector& scalarFlux ) override; /*!< @brief Computes Problemspecific Scalar QOI */ + void ComputeTotalAbsorptionHohlraum( double dT ) override; /*!< @brief Computes Problemspecific Scalar QOI */ + void ComputeCurrentProbeMoment( const VectorVector& solution ) override; /*!< @brief Computes Problemspecific Scalar QOI */ + void ComputeVarAbsorptionGreen( const Vector& scalarFlux ) override; /*!< @brief Computes Problemspecific Scalar QOI */ + void ComputeQOIsGreenProbingLine( const Vector& scalarFlux ) override; + + double GetCurAbsorptionHohlraumCenter() override { return _curAbsorptionHohlraumCenter; }; + double GetCurAbsorptionHohlraumVertical() override { return _curAbsorptionHohlraumVertical; }; + double GetCurAbsorptionHohlraumHorizontal() override { return _curAbsorptionHohlraumHorizontal; }; + double GetTotalAbsorptionHohlraumCenter() override { return _totalAbsorptionHohlraumCenter; }; + double GetTotalAbsorptionHohlraumVertical() override { return _totalAbsorptionHohlraumVertical; }; + double GetTotalAbsorptionHohlraumHorizontal() override { return _totalAbsorptionHohlraumHorizontal; }; + double GetVarAbsorptionHohlraumGreen() override { return _varAbsorptionHohlraumGreen; }; + const VectorVector& GetCurrentProbeMoment() const override { return _probingMoments; }; + virtual const std::vector& GetCurrentProbeValuesGreenLine() const override { return _absorptionValsIntegrated; }; + virtual const std::vector& GetCurrentVarProbeValuesGreenLine() const override { return _varAbsorptionValsIntegrated; }; +}; + +class SymmetricHohlraum_Moment : public SymmetricHohlraum +{ + private: + SymmetricHohlraum_Moment() = delete; + // TODO void SetGhostCells() override final; /*!< @brief Sets vector of ghost cells for boundary conditions */ + + public: + SymmetricHohlraum_Moment( Config* settings, Mesh* mesh, QuadratureBase* quad ); + ~SymmetricHohlraum_Moment(); + std::vector GetExternalSource( const Vector& energies ) override final; + VectorVector SetupIC() override final; + void ComputeCurrentProbeMoment( const VectorVector& solution ) override final; /*!< @brief Computes Problemspecific Scalar QOI */ +}; + +#endif // SYMMETRIC_HOHLRAUM_H diff --git a/include/quadratures/quadraturebase.hpp b/include/quadratures/quadraturebase.hpp index 9a9312b2..ef769a18 100644 --- a/include/quadratures/quadraturebase.hpp +++ b/include/quadratures/quadraturebase.hpp @@ -61,19 +61,19 @@ class QuadratureBase static QuadratureBase* Create( QUAD_NAME name, unsigned quadOrder ); // Getter - inline std::string GetName() const { return _name; } /*! @returns std::string _name: name of the quadrature */ - inline unsigned GetOrder() const { return _order; } /*! @returns unsigned _order: order of the quadrature */ - inline unsigned GetNq() const { return _nq; } /*! @returns unsigned _nq: number of gridpoints of the quadrature */ - inline VectorVector GetPoints() const { return _pointsKarth; } /*! @returns VectorVector _points: coordinates of gridpoints of the quadrature */ - inline VectorVector GetPointsSphere() const { + inline std::string GetName() const { return _name; } /*! @returns std::string _name: name of the quadrature */ + inline unsigned GetOrder() const { return _order; } /*! @returns unsigned _order: order of the quadrature */ + inline unsigned GetNq() const { return _nq; } /*! @returns unsigned _nq: number of gridpoints of the quadrature */ + inline const VectorVector& GetPoints() const { return _pointsKarth; } /*! @returns VectorVector _points: coordinates of the quad pts */ + inline const VectorVector& GetPointsSphere() const { return _pointsSphere; - } /*! @returns VectorVector _pointsSphere: "---- " in spherical coordinates (my, phi)*/ - inline Vector GetWeights() const { return _weights; } /*! @returns Vector _weights: weights of gridpoints of the quadrature */ + } /*! @returns VectorVector _pointsSphere: "---- " in spherical coordinates (my, phi)*/ + inline const Vector& GetWeights() const { return _weights; } /*! @returns Vector _weights: weights of gridpoints of the quadrature */ /*! @returns VectorVectorU _connectivity: connectivity of gridpoints of the quadrature */ - inline VectorVectorU GetConnectivity() const { return _connectivity; } + inline const VectorVectorU& GetConnectivity() const { return _connectivity; } /*!< @brief Returns approved Dimensions for this quadrature */ - inline std::vector GetSupportedDims() const { return _supportedDimensions; } + inline const std::vector GetSupportedDims() const { return _supportedDimensions; } /*!< @brief Scales the quadrature weights according to the intervall [-velocityScaling , velocityScaling] in 1D Scales the radius of the velocity sphere by velocityScaling in 2D and 3D */ virtual void ScalePointsAndWeights( double velocityScaling ); diff --git a/include/solvers/csdsnsolver.hpp b/include/solvers/csdsnsolver.hpp index 88aeb5cc..01e73f62 100644 --- a/include/solvers/csdsnsolver.hpp +++ b/include/solvers/csdsnsolver.hpp @@ -3,7 +3,6 @@ // externals #include "spdlog/spdlog.h" -#include #include "common/config.hpp" #include "common/io.hpp" diff --git a/include/solvers/mnsolver.hpp b/include/solvers/mnsolver.hpp index dc2b749b..3a06bd4b 100644 --- a/include/solvers/mnsolver.hpp +++ b/include/solvers/mnsolver.hpp @@ -52,8 +52,7 @@ class MNSolver : public SolverBase // Solver virtual void FVMUpdate( unsigned idx_iter ) override; virtual void FluxUpdate() override; - virtual void IterPreprocessing( unsigned /*idx_iter*/ ) override; - virtual void IterPostprocessing( unsigned /*idx_iter*/ ) override; + virtual void IterPreprocessing( unsigned idx_iter ) override; void FluxUpdatePseudo1D(); // Helper void FluxUpdatePseudo2D(); // Helper @@ -70,6 +69,6 @@ class MNSolver : public SolverBase // Helper /*! @brief Computes the radiative flux from the solution vector of the moment system */ - void ComputeRadFlux() override; + void ComputeScalarFlux() override; }; #endif // MNSOLVER_H diff --git a/include/solvers/pnsolver.hpp b/include/solvers/pnsolver.hpp index df5052c0..d549a381 100644 --- a/include/solvers/pnsolver.hpp +++ b/include/solvers/pnsolver.hpp @@ -42,16 +42,15 @@ class PNSolver : public SolverBase // IO void PrepareVolumeOutput() override; - void WriteVolumeOutput( unsigned idx_pseudoTime ) override; + void WriteVolumeOutput( unsigned idx_iter ) override; // Solver - void FVMUpdate( unsigned idx_energy ) override; + void FVMUpdate( unsigned idx_iter ) override; void FluxUpdate() override; - void IterPreprocessing( unsigned idx_pseudotime ) override; - void IterPostprocessing( unsigned idx_pseudotime ) override; + void IterPreprocessing( unsigned idx_iter ) override; // Helper - void ComputeRadFlux() override; + void ComputeScalarFlux() override; // Initialization of the Solver /*! @brief parameter functions for setting up system matrix diff --git a/include/solvers/snsolver.hpp b/include/solvers/snsolver.hpp index 28fc5bc0..374281e2 100644 --- a/include/solvers/snsolver.hpp +++ b/include/solvers/snsolver.hpp @@ -10,7 +10,8 @@ class SNSolver : public SolverBase // quadrature related numbers - VectorVector _quadPoints; /*!< @brief quadrature points, dim(_quadPoints) = (_nq,spatialDim) */ + VectorVector _quadPoints; /*!< @brief quadrature points, dim(_quadPoints) = + (_nq,spatialDim) */ Vector _weights; /*!< @brief quadrature weights, dim(_weights) = (_nq) */ public: @@ -24,20 +25,17 @@ class SNSolver : public SolverBase protected: // IO void virtual PrepareVolumeOutput() override; - void virtual WriteVolumeOutput( unsigned idx_pseudoTime ) override; + void virtual WriteVolumeOutput( unsigned idx_iter ) override; // Solver - void virtual FVMUpdate( unsigned idx_energy ) override; + void virtual FVMUpdate( unsigned idx_iter ) override; void virtual FluxUpdate() override; - void virtual IterPreprocessing( unsigned idx_pseudotime ) override; - void virtual IterPostprocessing( unsigned idx_pseudotime ) override; + void virtual IterPreprocessing( unsigned idx_iter ) override; // Helper - void ComputeRadFlux() override; + void ComputeScalarFlux() override; void FluxUpdatePseudo1D(); // Helper void FluxUpdatePseudo2D(); // Helper - - // --- Member variables --- }; #endif // SNSOLVER_H diff --git a/include/solvers/snsolver_hpc.hpp b/include/solvers/snsolver_hpc.hpp new file mode 100644 index 00000000..0046621e --- /dev/null +++ b/include/solvers/snsolver_hpc.hpp @@ -0,0 +1,224 @@ +#ifndef SNSOLVERHPC_H +#define SNSOLVERHPC_H + +// include Matrix, Vector definitions +#include "common/globalconstants.hpp" +#include "common/typedef.hpp" + +// externals +#include "spdlog/spdlog.h" + +// Forward Declarations +class Config; +class Mesh; +class ProblemBase; + +/*! @brief Base class for all solvers. */ +class SNSolverHPC +{ + + private: + int _rank; + int _numProcs; + unsigned _localNSys; + unsigned _startSysIdx; + unsigned _endSysIdx; + + double _currTime; /*!< @brief wall-time after current iteration */ + Config* _settings; /*!< @brief config class for global information */ + Mesh* _mesh; + ProblemBase* _problem; + + // Time + unsigned _nIter; /*!< @brief number of time steps, for non CSD, this equals _nEnergies, for _csd, _maxIter =_nEnergies-1*/ + double _dT; /*!< @brief energy/time step size */ + + // Mesh related members, memory optimized + unsigned _nCells; /*!< @brief number of spatial cells */ + unsigned _nSys; /*!< @brief number of equations in the transport system, i.e. num quad pts */ + unsigned _nq; /*!< @brief number of quadrature points */ + unsigned _nDim; + unsigned _nNbr; + unsigned _nNodes; + + std::vector _areas; /*!< @brief surface area of all spatial cells, + dim(_areas) = _NCells */ + std::vector _normals; /*!< @brief edge normals multiplied by edge length, + dim(_normals) = (_NCells,nEdgesPerCell,spatialDim) */ + std::vector _neighbors; /*!< @brief edge neighbor cell ids, dim(_neighbors) = (_NCells,nEdgesPerCell) */ + std::vector _cellMidPoints; /*!< @brief dim _nCells x _dim */ + + std::vector _interfaceMidPoints; /*!< @brief dim: _nCells x _nEdgesPerCell x _dim */ + std::vector _cellBoundaryTypes; /*!< @brief dim: _nCells x _nEdgesPerCell x _dim */ + std::map> _ghostCells; /*!< @brief Vector of ghost cells for boundary conditions. CAN BE MORE EFFICIENT */ + std::vector _relativeInterfaceMidPt; /*!< @brief dim _nCells * _nNbr * _nDim */ + std::vector _relativeCellVertices; /*!< @brief dim _nCells * _nNbr * _nDim */ + + std::map _ghostCellsReflectingY; /*!< map that indicates if a ghostcell has a fixed value or is a mirroring boundary */ + std::map _ghostCellsReflectingX; /*!< map that indicates if a ghostcell has a fixed value or is a mirroring boundary */ + std::vector _quadratureYReflection; /*!< map that gives a Reflection against the y axis for the velocity ordinates */ + std::vector _quadratureXReflection; /*!< map that gives a Reflection against the y axis for the velocity ordinates */ + + unsigned _temporalOrder; /*!< @brief temporal order (current: 1 & 2) */ + unsigned _spatialOrder; /*!< @brief spatial order (current: 1 & 2) */ + std::vector _solDx; /*!< @brief dim = _nCells x _nSys x _dim*/ + std::vector _limiter; /*!< @brief dim = _nCells x _nSys */ + + // Scattering, absorption and source + std::vector _sigmaS; /*!< @brief dim: _nCells */ + std::vector _sigmaT; /*!< @brief dim: _nCells */ + std::vector _source; /*!< @brief dim: _nCells x _nSys */ + std::vector _scatteringKernel; /*!< @brief dim: _nSys x _nSys */ + + // quadrature related numbers + std::vector _quadPts; /*!< @brief dim: _nSys x _dim*/ + std::vector _quadWeights; /*!< @brief dim: _nSys*/ + + // Solution related members + std::vector _sol; /*!< @brief dim = _nCells x _nSys */ + std::vector _flux; /*!< @brief dim = _nCells x _nSys */ + + // Output related members + std::vector _scalarFlux; /*!< @brief dim = _nCells */ + + // Lattice QOIS + unsigned _nOutputMoments; + + double _mass; + double _rmsFlux; + double _curAbsorptionLattice; /*!< @brief Absorption of particles at Lattice checkerboard regions at current time step */ + double _totalAbsorptionLattice; /*!< @brief Absorption of particles at Lattice checkerboard regions integrated until current time step */ + double _curMaxAbsorptionLattice; /*!< @brief Maximum pointwise absorption of particles at Lattice checkerboard regions until current time step */ + double _curScalarOutflow; /*!< @brief Outflow over whole boundary at current time step */ + double _totalScalarOutflow; /*!< @brief Outflow over whole boundary integrated until current time step */ + double _curMaxOrdinateOutflow; /*!< @brief Maximum ordinate-wise ouftlow over boundary over all time steps */ + std::vector _localMaxOrdinateOutflow; /*!< @brief Maximum ordinate-wise ouftlow over boundary over all time steps */ + double _curScalarOutflowPeri1; /*!< @brief Outflow over whole boundary at current time step */ + double _totalScalarOutflowPeri1; /*!< @brief Outflow over whole boundary integrated until current time step */ + double _curScalarOutflowPeri2; /*!< @brief Outflow over whole boundary at current time step */ + double _totalScalarOutflowPeri2; /*!< @brief Outflow over whole boundary integrated until current time step */ + // helper + std::map> _cellsLatticePerimeter1; + std::map> _cellsLatticePerimeter2; + std::vector _isPerimeterLatticeCell1; + std::vector _isPerimeterLatticeCell2; + + // Hohlraum QOIS + double _totalAbsorptionHohlraumCenter; + double _totalAbsorptionHohlraumVertical; + double _totalAbsorptionHohlraumHorizontal; + double _curAbsorptionHohlraumCenter; + double _curAbsorptionHohlraumVertical; + double _curAbsorptionHohlraumHorizontal; + double _varAbsorptionHohlraumGreen; + std::vector< std::vector> _probingCellsHohlraum; /*!< @brief Indices of cells that contain a probing sensor */ + std::vector _probingMoments; /*!< @brief Solution Momnets at the probing cells that contain a probing sensor */ + unsigned _probingMomentsTimeIntervals; /*!< @brief Solution Momnets at the probing cells that contain a probing sensor */ + + unsigned _nProbingCellsLineGreen; /*!< @brief Number of sampling cells that contain a probing sensor for the sliding window */ + std::vector _probingCellsLineGreen; /*!< @brief Indices of cells that contain a probing sensor for the sliding window */ + std::vector _absorptionValsIntegrated; /*!< @brief Avg Absorption value at the sampleing points of lineGreen */ + std::vector _varAbsorptionValsIntegrated; /*!< @brief Var in Avg Absorption value at the sampleing points of lineGreen */ + + // Design parameters + std::vector _cornerUpperLeftGreen; /*!< @brief Coord of corner of the green area (minus thickness/2 of it) relative to the green center */ + std::vector _cornerLowerLeftGreen; /*!< @brief Coord of corner of the green area (minus thickness/2 of it) relative to the green center */ + std::vector + _cornerUpperRightGreen; /*!< @brief Coord of corner of the green area (minus thickness/2 of it) relative to the green center */ + std::vector + _cornerLowerRightGreen; /*!< @brief Coord of corner of the green area (minus thickness/2 of it) relative to the green center */ + + double _thicknessGreen; /*!< @brief thickness of the green area */ + std::vector _centerGreen; /*!< @brief Center of the Hohlraum */ + + // Output + std::vector>> _outputFields; /*!< @brief Solver Output: dimensions + (GroupID,FieldID,CellID).*/ + std::vector> _outputFieldNames; /*!< @brief Names of the outputFields: dimensions + (GroupID,FieldID) */ + + std::vector _screenOutputFields; /*!< @brief Solver Output: dimensions (FieldID). */ + std::vector _screenOutputFieldNames; /*!< @brief Names of the outputFields: dimensions (FieldID) */ + + std::vector _historyOutputFields; /*!< @brief Solver Output: dimensions (FieldID). */ + std::vector _historyOutputFieldNames; /*!< @brief Names of the outputFields: dimensions (FieldID) */ + + // ---- Member functions ---- + + // Solver + void FluxOrder1(); + void FluxOrder2(); + + void FVMUpdate(); + + void IterPostprocessing(); + + void SetGhostCells(); /*!< @brief Sets vector of ghost cells for + + // Helper + /*! @brief ComputeTimeStep calculates the maximal stable time step using the + cfl number + @param cfl Courant-Friedrichs-Levy condition number */ + double ComputeTimeStep( double cfl ) const; + + // IO + /*! @brief Initializes the output groups and fields of this solver and names + * the fields */ + void PrepareVolumeOutput(); + /*! @brief Function that prepares VTK export and csv export of the current + solver iteration + @param idx_iter current (pseudo) time iteration */ + void WriteVolumeOutput( unsigned idx_iter ); + /*! @brief Save Output solution at given energy (pseudo time) to VTK file. + Write frequency is given by option VOLUME_OUTPUT_FREQUENCY. Always prints + last iteration without iteration affix. + @param idx_iter current (pseudo) time iteration */ + void PrintVolumeOutput( int idx_iter ); + /*! @brief Initialized the output fields and their Names for the screenoutput + */ + void PrepareScreenOutput(); + + /*! @brief Function that writes screen and history output fields + @param idx_iter current (pseudo) time iteration */ + void WriteScalarOutput( unsigned idx_iter ); + /*! @brief Prints ScreenOutputFields to Screen and to logger. Write frequency + is given by option SCREEN_OUTPUT_FREQUENCY. Always prints last iteration. + @param idx_iter current (pseudo) time iteration */ + void PrintScreenOutput( unsigned idx_iter ); + /*! @brief Initialized the historyOutputFields and their Names for history + output. Write frequency is given by option HISTORY_OUTPUT_FREQUENCY. Always + prints last iteration. */ + void PrepareHistoryOutput(); + /*! @brief Prints HistoryOutputFields to logger + @param idx_iter current (pseudo) time iteration */ + void PrintHistoryOutput( unsigned idx_iter ); + /*! @brief Pre Solver Screen and Logger Output */ + void DrawPreSolverOutput(); + /*! @brief Post Solver Screen and Logger Output */ + void DrawPostSolverOutput(); + + // Helper + unsigned Idx2D( unsigned idx1, unsigned idx2, unsigned len2 ); + unsigned Idx3D( unsigned idx1, unsigned idx2, unsigned idx3, unsigned len2, unsigned len3 ); + bool IsAbsorptionLattice( double x, double y ) const; + void ComputeCellsPerimeterLattice(); + + void SetProbingCellsLineGreen(); + void ComputeQOIsGreenProbingLine(); + std::vector linspace2D( const std::vector& start, const std::vector& end, unsigned num_points ); + + public: + /*! @brief Solver constructor + * @param settings config class that stores all needed config information */ + SNSolverHPC( Config* settings ); + + ~SNSolverHPC(); + + /*! @brief Solve functions runs main iteration loop. Components of the solve + * loop are pure and subclassed by the child solvers. */ + void Solve(); + + /*! @brief Save Output solution to VTK file */ + void PrintVolumeOutput() const {}; // Only for debugging purposes. +}; +#endif // SNSOLVERHPC_H diff --git a/include/solvers/solverbase.hpp b/include/solvers/solverbase.hpp index 7ed4b4fa..8b6e7551 100644 --- a/include/solvers/solverbase.hpp +++ b/include/solvers/solverbase.hpp @@ -20,6 +20,7 @@ class Reconstructor; class SolverBase { protected: + double _currTime; /*!< @brief wall-time after current iteration */ NumericalFluxBase* _g; /*!< @brief class for numerical flux */ Config* _settings; /*!< @brief config class for global information */ ProblemBase* _problem; /*!< @brief problem class for initial conditions */ @@ -27,19 +28,22 @@ class SolverBase // --------- Often used variables of member classes for faster access ---- // Time or Energystepping - unsigned _maxIter; /*!< @brief number of time steps, for non CSD, this equals _nEnergies, for _csd, _maxIter = _nEnergies-1*/ + unsigned _nIter; /*!< @brief number of time steps, for non CSD, this equals _nEnergies, for _csd, _maxIter =_nEnergies-1*/ unsigned _nEnergies; /*!< @brief number of energysteps, number of nodal energy values for CSD */ - double _dE; /*!< @brief energy/time step size */ + double _dT; /*!< @brief energy/time step size */ Vector _energies; /*!< @brief energy groups used in the simulation [keV] */ // Mesh related members - Mesh* _mesh; /*!< @brief mesh object for writing out information */ - unsigned _nCells; /*!< @brief number of spatial cells */ - std::vector _boundaryCells; /*!< @brief boundary type for all cells, dim(_boundary) = (_NCells) */ - std::vector _areas; /*!< @brief surface area of all spatial cells, dim(_areas) = _NCells */ - std::vector> - _normals; /*!< @brief edge normals multiplied by edge length, dim(_normals) = (_NCells,nEdgesPerCell,spatialDim) */ - std::vector> _neighbors; /*!< @brief edge neighbor cell ids, dim(_neighbors) = (_NCells,nEdgesPerCell) */ + Mesh* _mesh; /*!< @brief mesh object for writing out information */ + unsigned _nCells; /*!< @brief number of spatial cells */ + std::vector _boundaryCells; /*!< @brief boundary type for all cells, dim(_boundary) = + (_NCells) */ + std::vector _areas; /*!< @brief surface area of all spatial cells, + dim(_areas) = _NCells */ + std::vector> _normals; /*!< @brief edge normals multiplied by edge length, + dim(_normals) = (_NCells,nEdgesPerCell,spatialDim) */ + std::vector> _neighbors; /*!< @brief edge neighbor cell ids, dim(_neighbors) = + (_NCells,nEdgesPerCell) */ // slope related params Reconstructor* _reconstructor; /*!< @brief reconstructor object for high-order scheme */ @@ -49,90 +53,99 @@ class SolverBase std::vector _density; /*!< @brief patient density, dim(_density) = _nCells (only for csdsolver) */ Vector _s; /*!< @brief stopping power, dim(_s) = _maxIter (only for csdsolver) */ - Vector _sMid; /*!< @brief stopping power at intermediate time steps, dim(_s) = _maxIter (only for csdsolver) */ + Vector _sMid; /*!< @brief stopping power at intermediate time steps, dim(_s) = + _maxIter (only for csdsolver) */ - std::vector _Q; /*!< @brief external source term. Dim(_Q) = _maxIter x (_nCells x _nSystem) */ - VectorVector _sigmaS; /*!< @brief scattering cross section for all energies. len: _nEnergies x _nCells */ - VectorVector _sigmaT; /*!< @brief total cross section for all energies. len: _nEnergies x _nCells*/ + VectorVector _sigmaS; /*!< @brief scattering cross section for all energies. len: _nEnergies x _nCells or 1 x _nCells (if not time dependent)*/ + VectorVector _sigmaT; /*!< @brief total cross section for all energies. len:_nEnergies x _nCells or 1 x _nCells (if not time dependent)*/ + std::vector _Q; /*!< @brief external source term. Dim(_Q) = _maxIter x (_nCells x _nSystem) or 1 x _nCells (if not time dependent)*/ // quadrature related numbers QuadratureBase* _quadrature; /*!< @brief pointer to quadrature class */ unsigned _nq; /*!< @brief number of quadrature points */ // Solution related members - VectorVector _sol; /*!< @brief solution of the PDE, e.g. angular flux or moments */ - VectorVector _solNew; /*!< @brief VectorVector to store the new flux and later the new solution per iteration */ - Vector _fluxNew; /*!< @brief Vector to store the new Flux. Dim _nCells */ - Vector _flux; /*!< @brief Vector to store the old Flux. Dim _nCells*/ - - // solution gradient and limiter for each cell and each system var. dim: _nCells x nSys. nSys depents on the solver (either moments or quadpts) + VectorVector _sol; /*!< @brief solution of the PDE, e.g. angular flux or moments */ + VectorVector _solNew; /*!< @brief VectorVector to store the new flux and later + the new solution per iteration */ + Vector _scalarFluxNew; /*!< @brief Vector to store the new Flux. Dim _nCells */ + Vector _scalarFlux; /*!< @brief Vector to store the old Flux. Dim _nCells*/ + + // solution gradient and limiter for each cell and each system var. dim: + // _nCells x nSys. nSys depents on the solver (either moments or quadpts) VectorVector _solDx; /*!< @brief solution gradient in x direction*/ VectorVector _solDy; /*!< @brief solution gradient in y direction*/ - VectorVector _limiter; /*! < @brief slope limiter at cell and system pt */ - - std::vector _solverOutput; /*!< @brief LEGACY: Outputfield for solver ==> Will be replaced by _outputFields in the near future */ + VectorVector _limiter; /*!< @brief slope limiter at cell and system pt */ // Output related members - std::vector>> _outputFields; /*!< @brief Solver Output: dimensions (GroupID,FieldID,CellID).*/ - std::vector> _outputFieldNames; /*!< @brief Names of the outputFields: dimensions (GroupID,FieldID) */ - // we will have to add a further dimension for quadPoints and weights once we start with multilevel SN + std::vector>> _outputFields; /*!< @brief Solver Output: dimensions + (GroupID,FieldID,CellID).*/ + std::vector> _outputFieldNames; /*!< @brief Names of the outputFields: dimensions + (GroupID,FieldID) */ - // Output related members std::vector _screenOutputFields; /*!< @brief Solver Output: dimensions (FieldID). */ std::vector _screenOutputFieldNames; /*!< @brief Names of the outputFields: dimensions (FieldID) */ - // Output related members std::vector _historyOutputFields; /*!< @brief Solver Output: dimensions (FieldID). */ std::vector _historyOutputFieldNames; /*!< @brief Names of the outputFields: dimensions (FieldID) */ // ---- Member functions ---- // Solver - /*! @brief Performs preprocessing steps before the pseudo time iteration is started*/ + /*! @brief Performs preprocessing steps before the pseudo time iteration is + * started*/ virtual void SolverPreprocessing(); /*! @brief Performs preprocessing for the current solver iteration @param idx_iter current (peudo) time iteration */ virtual void IterPreprocessing( unsigned idx_iter ) = 0; /*! @brief Performs postprocessing for the current solver iteration */ - virtual void IterPostprocessing( unsigned idx_pseudotime ) = 0; - /*! @brief Constructs the flux update for the current iteration and stores it in psiNew*/ + virtual void IterPostprocessing( unsigned idx_iter ); + /*! @brief Constructs the flux update for the current iteration and stores it + * in psiNew*/ virtual void FluxUpdate() = 0; /*! @brief Computes the finite Volume update step for the current iteration @param idx_iter current (peudo) time iteration */ virtual void FVMUpdate( unsigned idx_iter ) = 0; /*! @brief Computes the finite Volume update step for the current iteration @param idx_iter current (peudo) time iteration */ - virtual void RKUpdate( VectorVector sol0, VectorVector sol_rk ); + virtual void RKUpdate( VectorVector& sol0, VectorVector& sol_rk ); // Helper - /*! @brief ComputeTimeStep calculates the maximal stable time step using the cfl number + /*! @brief ComputeTimeStep calculates the maximal stable time step using the + cfl number @param cfl Courant-Friedrichs-Levy condition number */ double ComputeTimeStep( double cfl ) const; - /*! @brief Computes the flux of the solution to check conservation properties */ - virtual void ComputeRadFlux() = 0; + /*! @brief Computes the flux of the solution to check conservation properties + */ + virtual void ComputeScalarFlux() = 0; // IO - /*! @brief Initializes the output groups and fields of this solver and names the fields */ + /*! @brief Initializes the output groups and fields of this solver and names + * the fields */ virtual void PrepareVolumeOutput() = 0; - /*! @brief Function that prepares VTK export and csv export of the current solver iteration + /*! @brief Function that prepares VTK export and csv export of the current + solver iteration @param idx_iter current (pseudo) time iteration */ virtual void WriteVolumeOutput( unsigned idx_iter ) = 0; - /*! @brief Save Output solution at given energy (pseudo time) to VTK file. Write frequency is given by - option VOLUME_OUTPUT_FREQUENCY. Always prints last iteration without iteration affix. + /*! @brief Save Output solution at given energy (pseudo time) to VTK file. + Write frequency is given by option VOLUME_OUTPUT_FREQUENCY. Always prints + last iteration without iteration affix. @param idx_iter current (pseudo) time iteration */ void PrintVolumeOutput( int idx_iter ) const; - /*! @brief Initialized the output fields and their Names for the screenoutput */ + /*! @brief Initialized the output fields and their Names for the screenoutput + */ void PrepareScreenOutput(); /*! @brief Function that writes screen and history output fields @param idx_iter current (pseudo) time iteration */ void WriteScalarOutput( unsigned idx_iter ); - /*! @brief Prints ScreenOutputFields to Screen and to logger. Write frequency is given by - option SCREEN_OUTPUT_FREQUENCY. Always prints last iteration. + /*! @brief Prints ScreenOutputFields to Screen and to logger. Write frequency + is given by option SCREEN_OUTPUT_FREQUENCY. Always prints last iteration. @param idx_iter current (pseudo) time iteration */ void PrintScreenOutput( unsigned idx_iter ); - /*! @brief Initialized the historyOutputFields and their Names for history output. Write frequency is given by - option HISTORY_OUTPUT_FREQUENCY. Always prints last iteration. */ + /*! @brief Initialized the historyOutputFields and their Names for history + output. Write frequency is given by option HISTORY_OUTPUT_FREQUENCY. Always + prints last iteration. */ void PrepareHistoryOutput(); /*! @brief Prints HistoryOutputFields to logger @param idx_iter current (pseudo) time iteration */ @@ -154,7 +167,8 @@ class SolverBase * @return pointer to SolverBase */ static SolverBase* Create( Config* settings ); - /*! @brief Solve functions runs main iteration loop. Components of the solve loop are pure virtual and subclassed by the child solvers. */ + /*! @brief Solve functions runs main iteration loop. Components of the solve + * loop are pure virtual and subclassed by the child solvers. */ virtual void Solve(); /*! @brief Save Output solution to VTK file */ diff --git a/include/toolboxes/reconstructor.hpp b/include/toolboxes/reconstructor.hpp index 4f88d629..ee126369 100644 --- a/include/toolboxes/reconstructor.hpp +++ b/include/toolboxes/reconstructor.hpp @@ -27,7 +27,7 @@ class Reconstructor virtual ~Reconstructor() {} static Reconstructor* Create( Config* settings ); - unsigned inline GetReconsOrder() { return _reconsOrder; } + unsigned inline GetSpatialOrder() { return _reconsOrder; } /*! Method 1: structured developing * @brief Slope of angular flux psi inside a given cell diff --git a/include/toolboxes/textprocessingtoolbox.hpp b/include/toolboxes/textprocessingtoolbox.hpp index ad3e2519..2f5c09fa 100644 --- a/include/toolboxes/textprocessingtoolbox.hpp +++ b/include/toolboxes/textprocessingtoolbox.hpp @@ -8,7 +8,10 @@ #include "common/typedef.hpp" #include +#include #include +#include +#include #include #include @@ -39,7 +42,7 @@ inline std::vector Split( const std::string& s, char delimiter ) { * @brief utility function for printing a VectorVector * @param vectorIn VectorVector we want to print */ -inline void PrintVectorVector( const VectorVector vectorIn ) { +inline void PrintVectorVector( const VectorVector& vectorIn ) { unsigned dimOuter = vectorIn.size(); unsigned dimInner = vectorIn[0].size(); @@ -54,9 +57,9 @@ inline void PrintVectorVector( const VectorVector vectorIn ) { } } -inline void PrintMatrix( const Matrix mat ) { std::cout << mat << std::endl; } +inline void PrintMatrix( const Matrix& mat ) { std::cout << mat << std::endl; } -inline void PrintMatrixToFile( const Matrix mat, std::string filename, unsigned matsize ) { +inline void PrintMatrixToFile( const Matrix& mat, std::string filename, unsigned matsize ) { std::ofstream myfile; myfile.open( filename ); for( unsigned i = 0; i < matsize; i++ ) { @@ -69,7 +72,7 @@ inline void PrintMatrixToFile( const Matrix mat, std::string filename, unsigned myfile.close(); } -inline void PrintVectorToFile( const Vector vec, std::string filename, unsigned vecsize ) { +inline void PrintVectorToFile( const Vector& vec, std::string filename, unsigned vecsize ) { std::ofstream myfile; myfile.open( filename ); for( unsigned i = 0; i < vecsize; i++ ) { @@ -78,7 +81,7 @@ inline void PrintVectorToFile( const Vector vec, std::string filename, unsigned myfile.close(); } -inline void PrintCppVectorToFile( const std::vector vec, std::string filename, unsigned vecsize ) { +inline void PrintCppVectorToFile( const std::vector& vec, std::string filename, unsigned vecsize ) { std::ofstream myfile; myfile.open( filename ); for( unsigned i = 0; i < vecsize; i++ ) { @@ -87,7 +90,14 @@ inline void PrintCppVectorToFile( const std::vector vec, std::string file myfile.close(); } -inline void PrintVectorVectorToFile( const VectorVector vecvec, std::string filename, unsigned size_outer, unsigned size_inner ) { +template inline void PrintCppVector( const std::vector& vec, unsigned vecsize ) { + for( unsigned i = 0; i < vecsize - 1; i++ ) { + std::cout << vec[i] << ", "; + } + std::cout << vec[vecsize - 1] << "\n"; +} + +inline void PrintVectorVectorToFile( const VectorVector& vecvec, std::string filename, unsigned size_outer, unsigned size_inner ) { std::ofstream myfile; myfile.open( filename ); for( unsigned i = 0; i < size_outer; i++ ) { @@ -116,6 +126,47 @@ inline bool StringEndsWith( std::string const& value, std::string const& ending return std::equal( ending.rbegin(), ending.rend(), value.rbegin() ); } +inline std::string DoubleToScientificNotation2( double value ) { + // Using std::ostringstream to format the double in scientific notation + std::ostringstream oss; + oss << std::scientific << std::setprecision( 4 ) << value; + + // Retrieve the string from the stream + std::string scientificNotation = oss.str(); + + // Remove trailing zeros after the decimal point + size_t pos = scientificNotation.find( '.' ); + if( pos != std::string::npos ) { + scientificNotation.erase( scientificNotation.find_last_not_of( '0' ) + 1 ); + scientificNotation.erase( scientificNotation.find_last_not_of( '.' ) + 1 ); + } + + // Remove unnecessary trailing decimal point + scientificNotation = std::regex_replace( scientificNotation, std::regex( "\\.0+$" ), "" ); + + return scientificNotation; +} + +inline std::string DoubleToScientificNotation( double value ) { + // Using std::ostringstream to format the double in scientific notation + std::ostringstream oss; + oss << std::scientific << std::setprecision( 6 ) << value; + + // Retrieve the string from the stream + std::string scientificNotation = oss.str(); + + // Replace 'e' with 'E' for scientific notation alignment with Python + size_t e_pos = scientificNotation.find( 'e' ); + if( e_pos != std::string::npos ) { + scientificNotation[e_pos] = 'E'; + } + + // Remove unnecessary trailing decimal point + scientificNotation = std::regex_replace( scientificNotation, std::regex( "\\.0+$" ), "" ); + + return scientificNotation; +} + } // namespace TextProcessingToolbox #endif // TEXTPROCESSINGTOOLBOX_H diff --git a/requirements.txt b/requirements.txt index 3f7e1738..2d406a6b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ pygmsh==6.1.1 numpy pydicom +gmsh \ No newline at end of file diff --git a/src/common/config.cpp b/src/common/config.cpp index 6dda8ea1..1483ac77 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -5,7 +5,9 @@ * * Disclaimer: This class structure was copied and modifed with open source permission from SU2 v7.0.3 https://su2code.github.io/ */ - +#ifdef BUILD_MPI +#include +#endif #include "common/config.hpp" #include "common/globalconstants.hpp" #include "common/optionstructure.hpp" @@ -19,7 +21,6 @@ #include "spdlog/spdlog.h" #include #include -#include using namespace std; @@ -164,6 +165,13 @@ void Config::AddStringListOption( const string name, unsigned short& num_marker, _optionMap.insert( pair( name, val ) ); } +void Config::AddDoubleListOption( const string name, unsigned short& num_marker, std::vector& option_field ) { + assert( _optionMap.find( name ) == _optionMap.end() ); + _allOptions.insert( pair( name, true ) ); + OptionBase* val = new OptionDoubleList( name, num_marker, option_field ); + _optionMap.insert( pair( name, val ) ); +} + template void Config::AddEnumListOption( const std::string name, unsigned short& input_size, @@ -215,6 +223,9 @@ void Config::SetConfigOptions() { AddStringOption( "MESH_FILE", _meshFile, string( "mesh.su2" ) ); /*! @brief MESH_FILE \n DESCRIPTION: Name of mesh file \n DEFAULT "" \ingroup Config.*/ AddStringOption( "CT_FILE", _ctFile, string( "/home/pia/kitrt/examples/meshes/phantom.png" ) ); + /*! @brief FORCE_CONNECTIVITY_RECOMPUTE \n DESCRIPTION:If true, mesh recomputes connectivity instead of loading from file \n DEFAULT false + * \ingroup Config.*/ + AddBoolOption( "FORCE_CONNECTIVITY_RECOMPUTE", _forcedConnectivityWrite, false ); // Quadrature relatated options /*! @brief QUAD_TYPE \n DESCRIPTION: Type of Quadrature rule \n Options: see @link QUAD_NAME \endlink \n DEFAULT: QUAD_MonteCarlo @@ -225,6 +236,9 @@ void Config::SetConfigOptions() { AddUnsignedShortOption( "QUAD_ORDER", _quadOrder, 1 ); // Solver related options + /*! @brief HPC_SOLVER \n DESCRIPTION: If true, the SN Solver uses hpc implementation. \n DEFAULT false \ingroup Config */ + AddBoolOption( "HPC_SOLVER", _HPC, false ); + /*! @brief MAX_MOMENT_ORDER \n: DESCRIPTON: Specifies the maximal order of Moments for PN and SN Solver */ AddUnsignedShortOption( "MAX_MOMENT_SOLVER", _maxMomentDegree, 1 ); /*! @brief CFL \n DESCRIPTION: CFL number \n DEFAULT 1.0 @ingroup Config.*/ @@ -244,9 +258,9 @@ void Config::SetConfigOptions() { * applicable in regression sampling \n DEFAULT false \ingroup Config */ AddBoolOption( "REALIZABILITY_RECONSTRUCTION", _realizabilityRecons, false ); /*! @brief Runge Kutta Staes \n DESCRIPTION: Sets number of Runge Kutta Stages for time integration \n DEFAULT 1 \ingroup Config */ - AddUnsignedShortOption( "RUNGE_KUTTA_STAGES", _rungeKuttaStages, 1 ); + AddUnsignedShortOption( "TIME_INTEGRATION_ORDER", _rungeKuttaStages, 1 ); - // Problem Relateed Options + // Problem Related Options /*! @brief MaterialDir \n DESCRIPTION: Relative Path to the data directory (used in the ICRU database class), starting from the directory of the * cfg file . \n DEFAULT "../data/material/" \ingroup Config */ AddStringOption( "DATA_DIR", _dataDir, string( "../data/" ) ); @@ -273,6 +287,30 @@ void Config::SetConfigOptions() { /*! @brief MAX_ENERGY_CSD \n DESCRIPTION: Sets maximum energy for the CSD simulation.\n DEFAULT \ingroup Config */ AddDoubleOption( "MAX_ENERGY_CSD", _maxEnergyCSD, 5.0 ); + // Lattice related options + /*! @brief LATTICE_DSGN_ABSORPTION_BLUE \n DESCRIPTION: Sets absorption rate for the blue blocks (absorption blocks) in the lattice test case. \n + * DEFAULT 10.0 \ingroup Config */ + AddDoubleOption( "LATTICE_DSGN_ABSORPTION_BLUE", _dsgnAbsBlue, 10.0 ); + /*! @brief LATTICE_DSGN_SCATTER_WHITE \n DESCRIPTION: Sets absorption rate for the white blocks (scattering blocks) in the lattice test case. \n + * DEFAULT 1.0 \ingroup Config */ + AddDoubleOption( "LATTICE_DSGN_SCATTER_WHITE", _dsgnScatterWhite, 1.0 ); + /*! @brief LATTICE_DSGN_ABSORPTION_INDIVIDUAL \n DESCRIPTION: Sets absorption rate all 7x7 blocks in the lattice test case. Order from upper left + * to lower right (row major). \n DEFAULT \ingroup Config */ + AddDoubleListOption( "LATTICE_DSGN_ABSORPTION_INDIVIDUAL", _nDsgnAbsIndividual, _dsgnAbsIndividual ); + /*! @brief LATTICE_DSGN_SCATTER_INDIVIDUAL \n DESCRIPTION: Sets scattering rate all 7x7 blocks in the lattice test case. Order from upper left to + * lower right (row major). \n DEFAULT \ingroup Config */ + AddDoubleListOption( "LATTICE_DSGN_SCATTER_INDIVIDUAL", _nDsgnScatterIndividual, _dsgnScatterIndividual ); + + // Hohlraum related options + AddUnsignedShortOption( "N_SAMPLING_PTS_LINE_GREEN", _nProbingCellsLineGreenHohlraum, 4 ); + AddDoubleOption( "POS_CENTER_X", _posCenterXHohlraum, 0.0 ); + AddDoubleOption( "POS_CENTER_Y", _posCenterYHohlraum, 0.0 ); + AddDoubleOption( "POS_RED_RIGHT_TOP", _posRedRightTop, 0.4 ); + AddDoubleOption( "POS_RED_RIGHT_BOTTOM", _posRedRightBottom, -0.4 ); + AddDoubleOption( "POS_RED_LEFT_TOP", _posRedLeftTop, 0.4 ); + AddDoubleOption( "POS_RED_LEFT_BOTTOM", _posRedLeftBottom, -0.4 ); + AddDoubleOption( "POS_BORDER_RED_LEFT", _posRedLeftBorder, -0.65 ); + AddDoubleOption( "POS_BORDER_RED_RIGHT", _posRedRightBorder, 0.65 ); // Entropy related options /*! @brief Entropy Functional \n DESCRIPTION: Entropy functional used for the MN_Solver \n DEFAULT QUADRTATIC @ingroup Config. */ AddEnumOption( "ENTROPY_FUNCTIONAL", _entropyName, Entropy_Map, QUADRATIC ); @@ -521,18 +559,6 @@ void Config::SetPostprocessing() { default: _isMomentSolver = false; } - // Check, if mesh file exists - // if( _solverName == CSD_SN_FOKKERPLANCK_TRAFO_SOLVER ) { // Check if this is neccessary - // if( !std::filesystem::exists( this->GetHydrogenFile() ) ) { - // ErrorMessages::Error( "Path to mesh file <" + this->GetHydrogenFile() + "> does not exist. Please check your config file.", - // CURRENT_FUNCTION ); - // } - // if( !std::filesystem::exists( this->GetOxygenFile() ) ) { - // ErrorMessages::Error( "Path to mesh file <" + this->GetOxygenFile() + "> does not exist. Please check your config file.", - // CURRENT_FUNCTION ); - // } - //} - // Quadrature Postprocessing { QuadratureBase* quad = QuadratureBase::Create( this ); @@ -567,7 +593,7 @@ void Config::SetPostprocessing() { ErrorMessages::Error( "CSD_MN_SOLVER only works with Spherical Harmonics currently.", CURRENT_FUNCTION ); } - if( GetReconsOrder() > 2 ) { + if( GetSpatialOrder() > 2 ) { ErrorMessages::Error( "Solvers only work with 1st and 2nd order spatial fluxes.", CURRENT_FUNCTION ); } @@ -615,10 +641,17 @@ void Config::SetPostprocessing() { for( unsigned short idx_volOutput = 0; idx_volOutput < _nVolumeOutput; idx_volOutput++ ) { switch( _solverName ) { case SN_SOLVER: - supportedGroups = { MINIMAL, ANALYTIC }; + if( _problemName == PROBLEM_Linesource ) + supportedGroups = { MINIMAL, ANALYTIC }; + else { + supportedGroups = { MINIMAL }; + if( _HPC ) supportedGroups = { MINIMAL, MOMENTS }; + } + if( supportedGroups.end() == std::find( supportedGroups.begin(), supportedGroups.end(), _volumeOutput[idx_volOutput] ) ) { - ErrorMessages::Error( "SN_SOLVER only supports volume output MINIMAL and ANALYTIC.\nPlease check your .cfg file.", - CURRENT_FUNCTION ); + ErrorMessages::Error( + "SN_SOLVER only supports volume output MINIMAL and ANALYTIC (and experimentally MOMENTS).\nPlease check your .cfg file.", + CURRENT_FUNCTION ); } if( _volumeOutput[idx_volOutput] == ANALYTIC && _problemName != PROBLEM_Linesource ) { ErrorMessages::Error( "Analytical solution (VOLUME_OUTPUT=ANALYTIC) is only available for the PROBLEM=LINESOURCE.\nPlease " @@ -628,16 +661,18 @@ void Config::SetPostprocessing() { break; case MN_SOLVER: // Fallthrough case MN_SOLVER_NORMALIZED: - supportedGroups = { MINIMAL, MOMENTS, DUAL_MOMENTS, ANALYTIC }; + if( _problemName == PROBLEM_SymmetricHohlraum ) + supportedGroups = { MINIMAL, MOMENTS, DUAL_MOMENTS }; + else if( _problemName == PROBLEM_Linesource ) + supportedGroups = { MINIMAL, ANALYTIC, MOMENTS, DUAL_MOMENTS }; + else + supportedGroups = { MINIMAL, MOMENTS, DUAL_MOMENTS }; if( supportedGroups.end() == std::find( supportedGroups.begin(), supportedGroups.end(), _volumeOutput[idx_volOutput] ) ) { - - ErrorMessages::Error( - "MN_SOLVER only supports volume output ANALYTIC, MINIMAL, MOMENTS and DUAL_MOMENTS.\nPlease check your .cfg file.", - CURRENT_FUNCTION ); - } - if( _volumeOutput[idx_volOutput] == ANALYTIC && _problemName != PROBLEM_Linesource ) { - ErrorMessages::Error( "Analytical solution (VOLUME_OUTPUT=ANALYTIC) is only available for the PROBLEM=LINESOURCE.\nPlease " - "check your .cfg file.", + std::string supportedGroupStr = ""; + for( unsigned i = 0; i < supportedGroups.size(); i++ ) { + supportedGroupStr += findKey( VolOutput_Map, supportedGroups[i] ) + ", "; + } + ErrorMessages::Error( "MN_SOLVER supports volume outputs" + supportedGroupStr + ".\nPlease check your .cfg file.", CURRENT_FUNCTION ); } break; @@ -654,7 +689,7 @@ void Config::SetPostprocessing() { CURRENT_FUNCTION ); } break; - case CSD_SN_SOLVER: // Fallthrough + case CSD_SN_SOLVER: supportedGroups = { MINIMAL, MEDICAL }; if( supportedGroups.end() == std::find( supportedGroups.begin(), supportedGroups.end(), _volumeOutput[idx_volOutput] ) ) { @@ -712,7 +747,90 @@ void Config::SetPostprocessing() { CURRENT_FUNCTION ); } } + // Check if the choice of screen output is compatible to the problem + for( unsigned short idx_screenOutput = 0; idx_screenOutput < _nScreenOutput; idx_screenOutput++ ) { + std::vector legalOutputs; + std::vector::iterator it; + switch( _problemName ) { + case PROBLEM_HalfLattice: + case PROBLEM_Lattice: + legalOutputs = { ITER, + WALL_TIME, + MASS, + RMS_FLUX, + VTK_OUTPUT, + CSV_OUTPUT, + CUR_OUTFLOW, + TOTAL_OUTFLOW, + CUR_OUTFLOW_P1, + TOTAL_OUTFLOW_P1, + CUR_OUTFLOW_P2, + TOTAL_OUTFLOW_P2, + MAX_OUTFLOW, + CUR_PARTICLE_ABSORPTION, + TOTAL_PARTICLE_ABSORPTION, + MAX_PARTICLE_ABSORPTION }; + it = std::find( legalOutputs.begin(), legalOutputs.end(), _screenOutput[idx_screenOutput] ); + if( it == legalOutputs.end() ) { + std::string foundKey = findKey( ScalarOutput_Map, _screenOutput[idx_screenOutput] ); + ErrorMessages::Error( + "Illegal output field <" + foundKey + + "> for option SCREEN_OUTPUT for this test case.\n" + "Supported fields are: ITER, MASS, RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT, FINAL_TIME_OUTFLOW, TOTAL_OUTFLOW, MAX_OUTFLOW, " + "FINAL_TIME_PARTICLE_ABSORPTION, TOTAL_PARTICLE_ABSORPTION, MAX_PARTICLE_ABSORPTION\n" + "Please check your .cfg file.", + CURRENT_FUNCTION ); + } + break; + case PROBLEM_QuarterHohlraum: + case PROBLEM_SymmetricHohlraum: + legalOutputs = { ITER, + WALL_TIME, + MASS, + RMS_FLUX, + VTK_OUTPUT, + CSV_OUTPUT, + CUR_OUTFLOW, + TOTAL_OUTFLOW, + MAX_OUTFLOW, + TOTAL_PARTICLE_ABSORPTION_CENTER, + TOTAL_PARTICLE_ABSORPTION_VERTICAL, + TOTAL_PARTICLE_ABSORPTION_HORIZONTAL, + TOTAL_PARTICLE_ABSORPTION, + PROBE_MOMENT_TIME_TRACE, + VAR_ABSORPTION_GREEN }; + + it = std::find( legalOutputs.begin(), legalOutputs.end(), _screenOutput[idx_screenOutput] ); + + if( it == legalOutputs.end() ) { + std::string foundKey = findKey( ScalarOutput_Map, _screenOutput[idx_screenOutput] ); + ErrorMessages::Error( + "Illegal output field <" + foundKey + + "> for option SCREEN_OUTPUT for this test case.\n" + "Supported fields are: ITER, MASS, RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT, TOTAL_PARTICLE_ABSORPTION_CENTER, \n" + "TOTAL_PARTICLE_ABSORPTION_VERTICAL, TOTAL_PARTICLE_ABSORPTION_HORIZONTAL, PROBE_MOMENT_TIME_TRACE, CUR_OUTFLOW, \n " + "TOTAL_OUTFLOW, MAX_OUTFLOW, VAR_ABSORPTION_GREEN \n" + "Please check your .cfg file.", + CURRENT_FUNCTION ); + } + break; + + default: + legalOutputs = { ITER, WALL_TIME, MASS, RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT, CUR_OUTFLOW, TOTAL_OUTFLOW, MAX_OUTFLOW }; + it = std::find( legalOutputs.begin(), legalOutputs.end(), _screenOutput[idx_screenOutput] ); + if( it == legalOutputs.end() ) { + std::string foundKey = findKey( ScalarOutput_Map, _screenOutput[idx_screenOutput] ); + ErrorMessages::Error( + "Illegal output field <" + foundKey + + "> for option SCREEN_OUTPUT for this test case.\n" + "Supported fields are: ITER, MASS, RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT, CUR_OUTFLOW, TOTAL_OUTFLOW, MAX_OUTFLOW \n" + "Please check your .cfg file.", + CURRENT_FUNCTION ); + } + break; + } + } // Set ITER always to index 0 . Assume only one instance of iter is chosen if( _nScreenOutput > 0 ) { std::vector::iterator it; @@ -728,17 +846,41 @@ void Config::SetPostprocessing() { _screenOutput.push_back( MASS ); _screenOutput.push_back( VTK_OUTPUT ); } + + // Postprocessing for probing moments in symmetric Hohlraum. Make it four outputs + if( _problemName == PROBLEM_SymmetricHohlraum ) { + std::vector::iterator it; + + it = find( _screenOutput.begin(), _screenOutput.end(), PROBE_MOMENT_TIME_TRACE ); + + if( it != _screenOutput.end() ) { + _screenOutput.erase( it ); + _nScreenOutput += 3; // extend the screen output by the number of probing points + for( unsigned i = 0; i < 4; i++ ) _screenOutput.push_back( PROBE_MOMENT_TIME_TRACE ); + } + } + if( _problemName == PROBLEM_QuarterHohlraum ) { + std::vector::iterator it; + + it = find( _screenOutput.begin(), _screenOutput.end(), PROBE_MOMENT_TIME_TRACE ); + + if( it != _screenOutput.end() ) { + _screenOutput.erase( it ); + _nScreenOutput += 1; // extend the screen output by the number of probing points + for( unsigned i = 0; i < 2; i++ ) _screenOutput.push_back( PROBE_MOMENT_TIME_TRACE ); + } + } } // History Output Postprocessing { - // Check for doublicates in VOLUME OUTPUT + // Check for doublicates in HISTORY OUTPUT std::map dublicate_map; - for( unsigned short idx_screenOutput = 0; idx_screenOutput < _nHistoryOutput; idx_screenOutput++ ) { - std::map::iterator it = dublicate_map.find( _historyOutput[idx_screenOutput] ); + for( unsigned idx_historyOutput = 0; idx_historyOutput < _nHistoryOutput; idx_historyOutput++ ) { + std::map::iterator it = dublicate_map.find( _historyOutput[idx_historyOutput] ); if( it == dublicate_map.end() ) { - dublicate_map.insert( std::pair( _historyOutput[idx_screenOutput], 0 ) ); + dublicate_map.insert( std::pair( _historyOutput[idx_historyOutput], 0 ) ); } else { it->second++; @@ -746,11 +888,98 @@ void Config::SetPostprocessing() { } for( auto& e : dublicate_map ) { if( e.second > 0 ) { - ErrorMessages::Error( "Each output field for option SCREEN_OUTPUT can only be set once.\nPlease check your .cfg file.", + ErrorMessages::Error( "Each output field for option HISTORY_OUTPUT can only be set once.\nPlease check your .cfg file.", CURRENT_FUNCTION ); } } + // Check if the choice of history output is compatible to the problem + for( unsigned short idx_screenOutput = 0; idx_screenOutput < _nHistoryOutput; idx_screenOutput++ ) { + std::vector legalOutputs; + std::vector::iterator it; + + switch( _problemName ) { + case PROBLEM_HalfLattice: + case PROBLEM_Lattice: + legalOutputs = { ITER, + WALL_TIME, + MASS, + RMS_FLUX, + VTK_OUTPUT, + CSV_OUTPUT, + CUR_OUTFLOW, + TOTAL_OUTFLOW, + CUR_OUTFLOW_P1, + TOTAL_OUTFLOW_P1, + CUR_OUTFLOW_P2, + TOTAL_OUTFLOW_P2, + MAX_OUTFLOW, + CUR_PARTICLE_ABSORPTION, + TOTAL_PARTICLE_ABSORPTION, + MAX_PARTICLE_ABSORPTION }; + it = std::find( legalOutputs.begin(), legalOutputs.end(), _historyOutput[idx_screenOutput] ); + if( it == legalOutputs.end() ) { + std::string foundKey = findKey( ScalarOutput_Map, _historyOutput[idx_screenOutput] ); + ErrorMessages::Error( + "Illegal output field <" + foundKey + + "> for option HISTORY_OUTPUT for this test case.\n" + "Supported fields are: ITER, MASS, RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT, FINAL_TIME_OUTFLOW,\n" + "TOTAL_OUTFLOW, MAX_OUTFLOW, FINAL_TIME_PARTICLE_ABSORPTION, TOTAL_PARTICLE_ABSORPTION, MAX_PARTICLE_ABSORPTION\n" + "Please check your .cfg file.", + CURRENT_FUNCTION ); + } + break; + case PROBLEM_QuarterHohlraum: + case PROBLEM_SymmetricHohlraum: + legalOutputs = { ITER, + WALL_TIME, + MASS, + RMS_FLUX, + VTK_OUTPUT, + CSV_OUTPUT, + CUR_OUTFLOW, + TOTAL_OUTFLOW, + MAX_OUTFLOW, + TOTAL_PARTICLE_ABSORPTION_CENTER, + TOTAL_PARTICLE_ABSORPTION_VERTICAL, + TOTAL_PARTICLE_ABSORPTION_HORIZONTAL, + TOTAL_PARTICLE_ABSORPTION, + PROBE_MOMENT_TIME_TRACE, + VAR_ABSORPTION_GREEN, + VAR_ABSORPTION_GREEN_LINE }; + + it = std::find( legalOutputs.begin(), legalOutputs.end(), _historyOutput[idx_screenOutput] ); + + if( it == legalOutputs.end() ) { + std::string foundKey = findKey( ScalarOutput_Map, _historyOutput[idx_screenOutput] ); + ErrorMessages::Error( + "Illegal output field <" + foundKey + + "> for option HISTORY_OUTPUT for this test case.\n" + "Supported fields are: ITER, MASS, RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT, TOTAL_PARTICLE_ABSORPTION_CENTER, \n " + "TOTAL_PARTICLE_ABSORPTION_VERTICAL, TOTAL_PARTICLE_ABSORPTION_HORIZONTAL,PROBE_MOMENT_TIME_TRACE, CUR_OUTFLOW, \n" + "TOTAL_OUTFLOW, MAX_OUTFLOW , VAR_ABSORPTION_GREEN, VAR_ABSORPTION_GREEN_LINE \n" + "Please check your .cfg file.", + CURRENT_FUNCTION ); + } + break; + + default: + legalOutputs = { ITER, WALL_TIME, MASS, RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT, CUR_OUTFLOW, TOTAL_OUTFLOW, MAX_OUTFLOW }; + it = std::find( legalOutputs.begin(), legalOutputs.end(), _historyOutput[idx_screenOutput] ); + + if( it == legalOutputs.end() ) { + std::string foundKey = findKey( ScalarOutput_Map, _historyOutput[idx_screenOutput] ); + ErrorMessages::Error( + "Illegal output field <" + foundKey + + "> for option SCREEN_OUTPUT for this test case.\n" + "Supported fields are: ITER, MASS, RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT, CUR_OUTFLOW, TOTAL_OUTFLOW, MAX_OUTFLOW \n" + "Please check your .cfg file.", + CURRENT_FUNCTION ); + } + break; + } + } + // Set ITER always to index 0 . Assume only one instance of iter is chosen if( _nHistoryOutput > 0 ) { std::vector::iterator it; @@ -760,11 +989,42 @@ void Config::SetPostprocessing() { } // Set default screen output if( _nHistoryOutput == 0 ) { - _nHistoryOutput = 4; + _nHistoryOutput = 5; _historyOutput.push_back( ITER ); - _historyOutput.push_back( RMS_FLUX ); _historyOutput.push_back( MASS ); + _historyOutput.push_back( RMS_FLUX ); _historyOutput.push_back( VTK_OUTPUT ); + _historyOutput.push_back( CSV_OUTPUT ); + } + + // Postprocessing for probing moments in symmetric Hohlraum. Make it four outputs + if( _problemName == PROBLEM_SymmetricHohlraum ) { + std::vector::iterator it; + it = find( _historyOutput.begin(), _historyOutput.end(), PROBE_MOMENT_TIME_TRACE ); + if( it != _historyOutput.end() ) { + _historyOutput.erase( it ); + _nHistoryOutput += 11; // extend the screen output by the number of probing points + for( unsigned i = 0; i < 12; i++ ) _historyOutput.push_back( PROBE_MOMENT_TIME_TRACE ); + } + } + if( _problemName == PROBLEM_QuarterHohlraum ) { + std::vector::iterator it; + it = find( _historyOutput.begin(), _historyOutput.end(), PROBE_MOMENT_TIME_TRACE ); + if( it != _historyOutput.end() ) { + _historyOutput.erase( it ); + _nHistoryOutput += 5; // extend the screen output by the number of probing points + for( unsigned i = 0; i < 6; i++ ) _historyOutput.push_back( PROBE_MOMENT_TIME_TRACE ); + } + } + + if( _problemName == PROBLEM_SymmetricHohlraum || _problemName == PROBLEM_QuarterHohlraum ) { + std::vector::iterator it; + it = find( _historyOutput.begin(), _historyOutput.end(), VAR_ABSORPTION_GREEN_LINE ); + if( it != _historyOutput.end() ) { + _historyOutput.erase( it ); + _nHistoryOutput += _nProbingCellsLineGreenHohlraum - 1; // extend the screen output by the number of probing points + for( unsigned i = 0; i < _nProbingCellsLineGreenHohlraum; i++ ) _historyOutput.push_back( VAR_ABSORPTION_GREEN_LINE ); + } } } @@ -946,46 +1206,52 @@ bool Config::TokenizeString( string& str, string& option_name, vector& o } void Config::InitLogger() { + int rank = 0; +#ifdef BUILD_MPI + MPI_Comm_rank( MPI_COMM_WORLD, &rank ); // Initialize MPI +#endif + + if( rank == 0 ) { - // Declare Logger - spdlog::level::level_enum terminalLogLvl; - spdlog::level::level_enum fileLogLvl; + // Declare Logger + spdlog::level::level_enum terminalLogLvl; + spdlog::level::level_enum fileLogLvl; - // Choose Logger + // Choose Logger #ifdef BUILD_TESTING - terminalLogLvl = spdlog::level::err; - fileLogLvl = spdlog::level::info; + terminalLogLvl = spdlog::level::err; + fileLogLvl = spdlog::level::info; #elif NDEBUG - terminalLogLvl = spdlog::level::info; - fileLogLvl = spdlog::level::info; + terminalLogLvl = spdlog::level::info; + fileLogLvl = spdlog::level::info; #else - terminalLogLvl = spdlog::level::debug; - fileLogLvl = spdlog::level::debug; + terminalLogLvl = spdlog::level::debug; + fileLogLvl = spdlog::level::debug; #endif - // create log dir if not existent - if( !std::filesystem::exists( _logDir ) ) { - std::filesystem::create_directory( _logDir ); - } - - if( !spdlog::get( "event" ) ) { - // create sinks if level is not off - std::vector sinks; - if( terminalLogLvl != spdlog::level::off ) { - // create spdlog terminal sink - auto terminalSink = std::make_shared(); - terminalSink->set_level( terminalLogLvl ); - terminalSink->set_pattern( "%v" ); - sinks.push_back( terminalSink ); + // create log dir if not existent + if( !std::filesystem::exists( _logDir ) ) { + std::filesystem::create_directory( _logDir ); } - if( fileLogLvl != spdlog::level::off ) { - // define filename on root - int pe; - MPI_Comm_rank( MPI_COMM_WORLD, &pe ); - char cfilename[1024]; - - if( pe == 0 ) { - // get date and time + + if( !spdlog::get( "event" ) ) { + // create sinks if level is not off + std::vector sinks; + if( terminalLogLvl != spdlog::level::off ) { + // create spdlog terminal sink + auto terminalSink = std::make_shared(); + terminalSink->set_level( terminalLogLvl ); + terminalSink->set_pattern( "%v" ); + sinks.push_back( terminalSink ); + } + if( fileLogLvl != spdlog::level::off ) { + // define filename on root + // int pe = 0; + // MPI_Comm_rank( MPI_COMM_WORLD, &pe ); + // char cfilename[1024]; + + // if( pe == 0 ) { + // get date and time time_t now = time( nullptr ); struct tm tstruct; char buf[80]; @@ -993,51 +1259,61 @@ void Config::InitLogger() { strftime( buf, sizeof( buf ), "%Y-%m-%d_%X", &tstruct ); // set filename - std::string filename; + std::string filepathStr; if( _logFileName.compare( "use_date" ) == 0 ) { _logFileName = buf; // set filename to date and time + filepathStr = _logDir + _logFileName; } - filename = _logFileName; - - // in case of existing files append '_#' - int ctr = 0; - if( std::filesystem::exists( _logDir + filename ) ) { - filename += "_" + std::to_string( ++ctr ); - } - while( std::filesystem::exists( _logDir + filename ) ) { - filename.pop_back(); - filename += std::to_string( ++ctr ); + else { + std::filesystem::path filePath( _logDir + _logFileName ); + std::string baseFilename( _logDir + _logFileName ); + filepathStr = _logDir + _logFileName; + // Check if the file with the original name exists + if( std::filesystem::exists( filePath ) ) { + // Extract the stem and extension + std::string stem = filePath.stem().string(); + std::string extension = filePath.extension().string(); + + // Counter for incrementing the filename + int counter = 1; + + // Keep incrementing the counter until a unique filename is found + while( std::filesystem::exists( filePath ) ) { + stem = baseFilename + std::to_string( counter ); + filePath.replace_filename( stem + extension ); + counter++; + } + } + filepathStr = filePath.string(); } - strncpy( cfilename, filename.c_str(), sizeof( cfilename ) ); - cfilename[sizeof( cfilename ) - 1] = 0; + //} + // MPI_Bcast( &cfilename, sizeof( cfilename ), MPI_CHAR, 0, MPI_COMM_WORLD ); + // MPI_Barrier( MPI_COMM_WORLD ); + + // create spdlog file sink + auto fileSink = std::make_shared( filepathStr ); + fileSink->set_level( fileLogLvl ); + fileSink->set_pattern( "%Y-%m-%d %H:%M:%S.%f | %v" ); + sinks.push_back( fileSink ); } - MPI_Bcast( &cfilename, sizeof( cfilename ), MPI_CHAR, 0, MPI_COMM_WORLD ); - MPI_Barrier( MPI_COMM_WORLD ); - - // create spdlog file sink - auto fileSink = std::make_shared( _logDir + cfilename ); - fileSink->set_level( fileLogLvl ); - fileSink->set_pattern( "%Y-%m-%d %H:%M:%S.%f | %v" ); - sinks.push_back( fileSink ); - } - // register all sinks - auto event_logger = std::make_shared( "event", begin( sinks ), end( sinks ) ); - spdlog::register_logger( event_logger ); - spdlog::flush_every( std::chrono::seconds( 5 ) ); - } + // register all sinks + auto event_logger = std::make_shared( "event", begin( sinks ), end( sinks ) ); + spdlog::register_logger( event_logger ); + spdlog::flush_every( std::chrono::seconds( 5 ) ); + } - if( !spdlog::get( "tabular" ) ) { - // create sinks if level is not off - std::vector sinks; - if( fileLogLvl != spdlog::level::off ) { - // define filename on root - int pe; - MPI_Comm_rank( MPI_COMM_WORLD, &pe ); - char cfilename[1024]; - - if( pe == 0 ) { - // get date and time + if( !spdlog::get( "tabular" ) ) { + // create sinks if level is not off + std::vector sinks; + if( fileLogLvl != spdlog::level::off ) { + // define filename on root + // int pe = 0; + // MPI_Comm_rank( MPI_COMM_WORLD, &pe ); + // char cfilename[1024]; + + // if( pe == 0 ) { + // get date and time time_t now = time( nullptr ); struct tm tstruct; char buf[80]; @@ -1045,37 +1321,63 @@ void Config::InitLogger() { strftime( buf, sizeof( buf ), "%Y-%m-%d_%X.csv", &tstruct ); // set filename - std::string filename; - if( _logFileName.compare( "use_date" ) == 0 ) - filename = buf; // set filename to date and time - else - filename = _logFileName + ".csv"; - - // in case of existing files append '_#' - int ctr = 0; - if( std::filesystem::exists( _logDir + filename ) ) { - filename += "_" + std::to_string( ++ctr ); + // set filename + std::string filepathStr; + if( _logFileName.compare( "use_date" ) == 0 ) { + _logFileName = buf; // set filename to date and time + filepathStr = _logDir + _logFileName + ".csv"; } - while( std::filesystem::exists( _logDir + filename ) ) { - filename.pop_back(); - filename += std::to_string( ++ctr ); + else { + std::filesystem::path filePath( _logDir + _logFileName + ".csv" ); + std::string baseFilename( _logDir + _logFileName ); + filepathStr = _logDir + _logFileName + ".csv"; + // Check if the file with the original name exists + if( std::filesystem::exists( filePath ) ) { + // Extract the stem and extension + std::string stem = filePath.stem().string(); + std::string extension = filePath.extension().string(); + + // Counter for incrementing the filename + int counter = 1; + + // Keep incrementing the counter until a unique filename is found + while( std::filesystem::exists( filePath ) ) { + stem = baseFilename + std::to_string( counter ); + filePath.replace_filename( stem + extension ); + counter++; + } + } + filepathStr = filePath.string(); } - strncpy( cfilename, filename.c_str(), sizeof( cfilename ) ); - cfilename[sizeof( cfilename ) - 1] = 0; + //} + // MPI_Bcast( &cfilename, sizeof( cfilename ), MPI_CHAR, 0, MPI_COMM_WORLD ); + // MPI_Barrier( MPI_COMM_WORLD ); + + // create spdlog file sink + auto fileSink = std::make_shared( filepathStr ); + fileSink->set_level( fileLogLvl ); + fileSink->set_pattern( "%Y-%m-%d %H:%M:%S.%f ,%v" ); + sinks.push_back( fileSink ); } - MPI_Bcast( &cfilename, sizeof( cfilename ), MPI_CHAR, 0, MPI_COMM_WORLD ); - MPI_Barrier( MPI_COMM_WORLD ); - - // create spdlog file sink - auto fileSink = std::make_shared( _logDir + cfilename ); - fileSink->set_level( fileLogLvl ); - fileSink->set_pattern( "%Y-%m-%d %H:%M:%S.%f ,%v" ); - sinks.push_back( fileSink ); - } - // register all sinks - auto tabular_logger = std::make_shared( "tabular", begin( sinks ), end( sinks ) ); - spdlog::register_logger( tabular_logger ); - spdlog::flush_every( std::chrono::seconds( 5 ) ); + // register all sinks + auto tabular_logger = std::make_shared( "tabular", begin( sinks ), end( sinks ) ); + spdlog::register_logger( tabular_logger ); + spdlog::flush_every( std::chrono::seconds( 5 ) ); + } } +#ifdef BUILD_MPI + MPI_Barrier( MPI_COMM_WORLD ); +#endif } + +// Function to find the key for a given value in a map +template K Config::findKey( const std::map& myMap, const V& valueToFind ) { + for( const auto& pair : myMap ) { + if( pair.second == valueToFind ) { + return pair.first; // Return the key if the value is found + } + } + // If the value is not found, you can return a default value or throw an exception + throw std::out_of_range( "Value not found in the map" ); +} \ No newline at end of file diff --git a/src/common/io.cpp b/src/common/io.cpp index 89e9bf79..b19ed8e4 100644 --- a/src/common/io.cpp +++ b/src/common/io.cpp @@ -1,6 +1,6 @@ /*! * \file io.cpp - * \brief Set of utility io functions for rtns + * \brief Set of utility io functions for KiT-RT * \author J. Kusch, S. Schotthoefer, P. Stammer, J. Wolters, T. Xiao */ @@ -11,11 +11,17 @@ #include "toolboxes/errormessages.hpp" #include "toolboxes/textprocessingtoolbox.hpp" +#include +#include #include +#ifdef BUILD_MPI #include -#include +#endif +#include +#include +#include #include #include #include @@ -27,9 +33,9 @@ #include #include -#include -#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION -#include +// #include +// #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +// #include using vtkPointsSP = vtkSmartPointer; using vtkUnstructuredGridSP = vtkSmartPointer; @@ -43,8 +49,8 @@ void ExportVTK( const std::string fileName, const std::vector>>& outputFields, const std::vector>& outputFieldNames, const Mesh* mesh ) { - int rank; - MPI_Comm_rank( MPI_COMM_WORLD, &rank ); + int rank = 0; + // MPI_Comm_rank( MPI_COMM_WORLD, &rank ); if( rank == 0 ) { unsigned dim = mesh->GetDim(); unsigned numCells = mesh->GetNumCells(); @@ -76,16 +82,19 @@ void ExportVTK( const std::string fileName, } } vtkCellArraySP cellArray = vtkCellArraySP::New(); - for( unsigned i = 0; i < numCells; ++i ) { - if( numNodesPerCell == 3 ) { - auto tri = vtkTriangleSP::New(); + if( numNodesPerCell == 3 ) { + auto tri = vtkTriangleSP::New(); + for( unsigned i = 0; i < numCells; ++i ) { for( unsigned j = 0; j < numNodesPerCell; ++j ) { tri->GetPointIds()->SetId( j, cells[i][j] ); } cellArray->InsertNextCell( tri ); } - if( numNodesPerCell == 4 ) { - auto quad = vtkQuad::New(); + } + + if( numNodesPerCell == 4 ) { + auto quad = vtkQuad::New(); + for( unsigned i = 0; i < numCells; ++i ) { for( unsigned j = 0; j < numNodesPerCell; ++j ) { quad->GetPointIds()->SetId( j, cells[i][j] ); } @@ -100,11 +109,12 @@ void ExportVTK( const std::string fileName, } // Write the output + auto cellData = vtkDoubleArraySP::New(); + for( unsigned idx_group = 0; idx_group < outputFields.size(); idx_group++ ) { for( unsigned idx_field = 0; idx_field < outputFields[idx_group].size(); idx_field++ ) { // Loop over all output fields - - auto cellData = vtkDoubleArraySP::New(); + cellData = vtkDoubleArraySP::New(); cellData->SetName( outputFieldNames[idx_group][idx_field].c_str() ); for( unsigned idx_cell = 0; idx_cell < numCells; idx_cell++ ) { @@ -123,21 +133,19 @@ void ExportVTK( const std::string fileName, converter->PassCellDataOn(); converter->Update(); - auto conv_grid = converter->GetOutput(); - - writer->SetInputData( conv_grid ); + writer->SetInputData( converter->GetOutput() ); writer->Write(); - // auto log = spdlog::get( "event" ); - // log->info( "Result successfully exported to '{0}'!", fileNameWithExt ); + // auto log = spdlog::get( "event" ); + // log->info( "Result successfully exported to '{0}'!", fileNameWithExt ); } - MPI_Barrier( MPI_COMM_WORLD ); + // MPI_Barrier( MPI_COMM_WORLD ); } Mesh* LoadSU2MeshFromFile( const Config* settings ) { auto log = spdlog::get( "event" ); - log->info( "| Importing mesh. This may take a while for large meshes." ); + // log->info( "| Importing mesh. This may take a while for large meshes." ); unsigned dim; std::vector nodes; std::vector> cells; @@ -297,14 +305,141 @@ Mesh* LoadSU2MeshFromFile( const Config* settings ) { } ifs.close(); // log->info( "| Mesh imported." ); - return new Mesh( nodes, cells, boundaries ); + return new Mesh( settings, nodes, cells, boundaries ); +} + +void LoadConnectivityFromFile( const std::string inputFile, + std::vector>& cellNeighbors, + std::vector>& cellInterfaceMidPoints, + std::vector>& cellNormals, + std::vector& cellBoundaryTypes, + unsigned nCells, + unsigned nNodesPerCell, + unsigned nDim ) { + // File has nCells lines, each line is a comma separated entry containing: + // cellNeighbors (nNodesPerCell elements), + // cellInterfaceMidPoints (nNodesPerCell x nDim elements), + // cellNormals (nNodesPerCell x nDim elements), + // cellBoundaryTypes (1 element), (tranlated from unsigned to enum BOUNDARY_TYPE) + + std::ifstream inFile( inputFile ); + + if( !inFile.is_open() ) { + ErrorMessages::Error( "Error opening connectivity file.", CURRENT_FUNCTION ); + return; + } + for( unsigned i = 0; i < nCells; ++i ) { + std::string line; + unsigned count = 1; + + std::getline( inFile, line ); + for( char ch : line ) { + if( ch == ',' ) { + count++; + } + } + + unsigned correctedNodesPerCell = nNodesPerCell; + if( count < nNodesPerCell + nNodesPerCell * nDim * 2 + 1 ) { + correctedNodesPerCell = nNodesPerCell - 1; + ErrorMessages::Error( "Error opening connectivity file.", CURRENT_FUNCTION ); + } + + std::istringstream iss( line ); + // Load cellNeighbors + cellNeighbors[i].resize( correctedNodesPerCell ); + + for( unsigned j = 0; j < correctedNodesPerCell; ++j ) { + std::getline( iss, line, ',' ); + std::istringstream converter( line ); + converter >> std::fixed >> setprecision( 12 ) >> cellNeighbors[i][j]; + } + + // Load cellInterfaceMidPoints + cellInterfaceMidPoints[i].resize( correctedNodesPerCell ); + for( unsigned j = 0; j < correctedNodesPerCell; ++j ) { + cellInterfaceMidPoints[i][j] = Vector( nDim, 0.0 ); + for( unsigned k = 0; k < nDim; ++k ) { + std::getline( iss, line, ',' ); + std::istringstream converter( line ); + converter >> std::fixed >> setprecision( 12 ) >> cellInterfaceMidPoints[i][j][k]; // Replace with appropriate member of Vector + // std::cout << std::fixed << setprecision( 12 ) << cellInterfaceMidPoints[i][j][k] << std::endl; + } + } + // Load cellNormals + cellNormals[i].resize( correctedNodesPerCell ); + for( unsigned j = 0; j < correctedNodesPerCell; ++j ) { + cellNormals[i][j] = Vector( nDim, 0.0 ); + for( unsigned k = 0; k < nDim; ++k ) { + std::getline( iss, line, ',' ); + std::istringstream converter( line ); + converter >> std::fixed >> setprecision( 12 ) >> cellNormals[i][j][k]; // Replace with appropriate member of Vector + } + } + // Load cellBoundaryTypes + std::getline( iss, line, ',' ); + std::istringstream converter( line ); + unsigned boundaryTypeValue; + converter >> boundaryTypeValue; + cellBoundaryTypes[i] = static_cast( boundaryTypeValue ); + } + inFile.close(); +} + +void WriteConnecitivityToFile( const std::string outputFile, + const std::vector>& cellNeighbors, + const std::vector>& cellInterfaceMidPoints, + const std::vector>& cellNormals, + const std::vector& cellBoundaryTypes, + unsigned nCells, + unsigned nDim ) { + // File has nCells lines, each line is a comma separated entry containing: + // cellNeighbors (nNodesPerCell elements), + // cellInterfaceMidPoints (nNodesPerCell x nDim elements), + // cellNormals (nNodesPerCell x nDim elements), + // cellBoundaryTypes (1 element), (tranlated from BOUNDARY_TYPE to unsigned) + + std::ofstream outFile( outputFile ); + outFile << std::fixed << setprecision( 12 ); + // const std::size_t bufferSize = 10000; // Adjust as needed + // outFile.rdbuf()->pubsetbuf( 0, bufferSize ); + if( outFile.is_open() ) { + // Write data to the file + for( unsigned i = 0; i < nCells; ++i ) { + // Write cellNeighbors + for( unsigned j = 0; j < cellNeighbors[i].size(); ++j ) { + outFile << cellNeighbors[i][j]; + if( j < cellNeighbors[i].size() - 1 ) { + outFile << ","; + } + } + // Write cellInterfaceMidPoints + for( unsigned j = 0; j < cellInterfaceMidPoints[i].size(); ++j ) { + for( unsigned k = 0; k < nDim; ++k ) { + outFile << "," << cellInterfaceMidPoints[i][j][k]; + } + } + // Write cellNormals + for( unsigned j = 0; j < cellNormals[i].size(); ++j ) { + for( unsigned k = 0; k < nDim; ++k ) { + outFile << "," << cellNormals[i][j][k]; + } + } + + // Write cellBoundaryTypes + outFile << "," << static_cast( cellBoundaryTypes[i] ); + outFile << std::endl; + } + outFile.close(); + } + else { + ErrorMessages::Error( "Error opening connectivity file.", CURRENT_FUNCTION ); + } } std::string ParseArguments( int argc, char* argv[] ) { std::string inputFile; - std::string usage_help = "\n" - "Usage: " + - std::string( argv[0] ) + " inputfile\n"; + std::string usage_help = "\nUsage: " + std::string( argv[0] ) + " inputfile\n"; if( argc < 2 ) { std::cout << usage_help; @@ -328,9 +463,13 @@ std::string ParseArguments( int argc, char* argv[] ) { } void PrintLogHeader( std::string inputFile ) { - int nprocs, rank; + int nprocs = 1; + int rank = 0; +#ifdef BUILD_MPI + // Initialize MPI MPI_Comm_size( MPI_COMM_WORLD, &nprocs ); MPI_Comm_rank( MPI_COMM_WORLD, &rank ); +#endif if( rank == 0 ) { auto log = spdlog::get( "event" ); @@ -366,9 +505,12 @@ void PrintLogHeader( std::string inputFile ) { } // log->info( "------------------------------------------------------------------------" ); } +#ifdef BUILD_MPI MPI_Barrier( MPI_COMM_WORLD ); +#endif } +/* Matrix createSU2MeshFromImage( std::string imageName, std::string SU2Filename ) { auto log = spdlog::get( "event" ); @@ -433,3 +575,4 @@ Matrix createSU2MeshFromImage( std::string imageName, std::string SU2Filename ) return gsImage.transpose(); } +*/ \ No newline at end of file diff --git a/src/common/mesh.cpp b/src/common/mesh.cpp index 1e43d967..8ff2f2d7 100644 --- a/src/common/mesh.cpp +++ b/src/common/mesh.cpp @@ -1,37 +1,110 @@ #include "common/mesh.hpp" - +#include "common/config.hpp" +#include "common/io.hpp" +#include #include - -Mesh::Mesh( std::vector nodes, +#include +#include +#include +#ifdef BUILD_MPI +#include +#endif +#include +#include + +Mesh::Mesh( const Config* settings, + std::vector nodes, std::vector> cells, std::vector>> boundaries ) : _dim( nodes[0].size() ), _numCells( cells.size() ), _numNodes( nodes.size() ), _numNodesPerCell( cells[0].size() ), _numBoundaries( boundaries.size() ), _ghostCellID( _numCells ), _nodes( nodes ), _cells( cells ), _boundaries( boundaries ) { + + _settings = settings; if( _dim == 2 ) { _numNodesPerBoundary = 2u; } else { ErrorMessages::Error( "Unsupported mesh dimension!", CURRENT_FUNCTION ); } + int nprocs = 1; + int rank = 0; +#ifdef BUILD_MPI + MPI_Comm_size( MPI_COMM_WORLD, &nprocs ); + MPI_Comm_rank( MPI_COMM_WORLD, &rank ); +#endif + if( rank == 0 ) { + + auto log = spdlog::get( "event" ); + log->info( "| Compute cell areas..." ); + } ComputeCellAreas(); + if( rank == 0 ) { + auto log = spdlog::get( "event" ); + log->info( "| Compute cell midpoints..." ); + } ComputeCellMidpoints(); - ComputeConnectivity(); + + // Connectivity + std::string connectivityFile = _settings->GetMeshFile(); + size_t lastDotIndex = connectivityFile.find_last_of( '.' ); + connectivityFile = connectivityFile.substr( 0, lastDotIndex ); + connectivityFile += ".con"; + if( !std::filesystem::exists( connectivityFile ) || _settings->GetForcedConnectivity() ) { + if( rank == 0 ) { + auto log = spdlog::get( "event" ); + + log->info( "| Compute mesh connectivity..." ); + } + ComputeConnectivity(); // Computes _cellNeighbors, _cellInterfaceMidPoints, _cellNormals, _cellBoundaryTypes + if( !_settings->GetForcedConnectivity() ) { + if( rank == 0 ) { + auto log = spdlog::get( "event" ); + + log->info( "| Save mesh connectivity to file " + connectivityFile ); + WriteConnecitivityToFile( + connectivityFile, _cellNeighbors, _cellInterfaceMidPoints, _cellNormals, _cellBoundaryTypes, _numCells, _dim ); + } + } + } + else { + // Resize the outer vector to have nCells elements + _cellNeighbors.resize( _numCells ); + _cellInterfaceMidPoints.resize( _numCells ); + _cellNormals.resize( _numCells ); + _cellBoundaryTypes.resize( _numCells ); + if( rank == 0 ) { + auto log = spdlog::get( "event" ); + log->info( "| Load mesh connectivity from file " + connectivityFile ); + } + LoadConnectivityFromFile( + connectivityFile, _cellNeighbors, _cellInterfaceMidPoints, _cellNormals, _cellBoundaryTypes, _numCells, _numNodesPerCell, _dim ); + } + if( rank == 0 ) { + auto log = spdlog::get( "event" ); + log->info( "| Compute boundary..." ); + } ComputeBounds(); + if( rank == 0 ) { + auto log = spdlog::get( "event" ); + log->info( "| Mesh created." ); + } } Mesh::~Mesh() {} void Mesh::ComputeConnectivity() { - - // get MPI info - int comm_size, comm_rank; - MPI_Comm_size( MPI_COMM_WORLD, &comm_size ); - MPI_Comm_rank( MPI_COMM_WORLD, &comm_rank ); - - // determine number/chunk size and indices of cells treated by each mpi thread - unsigned chunkSize = std::ceil( static_cast( _numCells ) / static_cast( comm_size ) ); - unsigned mpiCellStart = comm_rank * chunkSize; - unsigned mpiCellEnd = std::min( ( comm_rank + 1 ) * chunkSize, _numCells ); + int nprocs = 1; + int rank = 0; +#ifdef BUILD_MPI + MPI_Comm_size( MPI_COMM_WORLD, &nprocs ); + MPI_Comm_rank( MPI_COMM_WORLD, &rank ); +#endif + + unsigned comm_size = 1; // No MPI implementation right now + // determine number/chunk size and indices of cells treated by each mpi thread (deactivated for now) + unsigned chunkSize = _numCells; // std::ceil( static_cast( _numCells ) / static_cast( comm_size ) ); + unsigned mpiCellStart = 0; // comm_rank * chunkSize; + unsigned mpiCellEnd = _numCells; // std::min( ( comm_rank + 1 ) * chunkSize, _numCells ); // 'flat' vectors are a flattened representation of the neighbors numCells nested vectors; easier for MPI // 'part' vectors store information for each single MPI thread @@ -39,8 +112,95 @@ void Mesh::ComputeConnectivity() { std::vector normalsFlatPart( _numNodesPerCell * chunkSize, Vector( _dim, -1.0 ) ); std::vector interfaceMidFlatPart( _numNodesPerCell * chunkSize, Vector( _dim, -1.0 ) ); + // ++++++ + std::vector> neighbors( _numCells ); + std::vector> normals( _numCells ); + std::vector> interfaceMid( _numCells ); + + std::map, std::vector> edge_to_cells; + // Step 1: Build a mapping from edges to cells + if( rank == 0 ) { + auto log = spdlog::get( "event" ); + log->info( "| ...map edges to cells..." ); + } + for( unsigned i = 0; i < _numCells; ++i ) { + const auto& cell = _cells[i]; + for( unsigned j = 0; j < _numNodesPerCell; ++j ) { + unsigned v1 = cell[j]; + unsigned v2 = cell[( j + 1 ) % _numNodesPerCell]; + std::pair edge = std::minmax( v1, v2 ); + edge_to_cells[edge].push_back( i ); + } + } + + // Step 2: Determine neighbors + if( rank == 0 ) { + auto log = spdlog::get( "event" ); + log->info( "| ...determine neighbors of cells..." ); + } + + for( const auto& item : edge_to_cells ) { + const auto& cell_list = item.second; + const auto& nodes_of_edge = item.first; + // std::cout << "nodes_of_edge: " << nodes_of_edge.first << " " << nodes_of_edge.second << std::endl; + if( cell_list.size() == 2 ) { + if( cell_list[0] == cell_list[1] ) { + ErrorMessages::Error( "Error", CURRENT_FUNCTION ); + } + unsigned cell1 = cell_list[0]; + unsigned cell2 = cell_list[1]; + + neighbors[cell1].push_back( cell2 ); + neighbors[cell2].push_back( cell1 ); + + normals[cell1].push_back( + ComputeOutwardFacingNormal( _nodes[nodes_of_edge.first], _nodes[nodes_of_edge.second], _cellMidPoints[cell1] ) ); + normals[cell2].push_back( + ComputeOutwardFacingNormal( _nodes[nodes_of_edge.first], _nodes[nodes_of_edge.second], _cellMidPoints[cell2] ) ); + interfaceMid[cell1].push_back( ComputeCellInterfaceMidpoints( _nodes[nodes_of_edge.first], _nodes[nodes_of_edge.second] ) ); + interfaceMid[cell2].push_back( ComputeCellInterfaceMidpoints( _nodes[nodes_of_edge.first], _nodes[nodes_of_edge.second] ) ); + } + else if( /* condition */ cell_list.size() == 1 ) { + + unsigned cell1 = cell_list[0]; + neighbors[cell1].push_back( _ghostCellID ); // neighbor must be a ghost cell + normals[cell1].push_back( + ComputeOutwardFacingNormal( _nodes[nodes_of_edge.first], _nodes[nodes_of_edge.second], _cellMidPoints[cell1] ) ); + interfaceMid[cell1].push_back( ComputeCellInterfaceMidpoints( _nodes[nodes_of_edge.first], _nodes[nodes_of_edge.second] ) ); + } + else { + ErrorMessages::Error( "More than 2 cells share an edge: " + std::to_string( cell_list.size() ), CURRENT_FUNCTION ); + } + } + // check for any unassigned faces + _cellNeighbors.resize( _numCells ); + for( unsigned i = 0; i < _numCells; ++i ) { + _cellNeighbors[i].resize( _numNodesPerCell ); + if( neighbors[i].size() != _numNodesPerCell ) { + ErrorMessages::Error( "Not " + std::to_string( _numNodesPerCell ) + " neighbors detected: " + std::to_string( i ), CURRENT_FUNCTION ); + } + if( normals[i].size() != _numNodesPerCell ) { + ErrorMessages::Error( "Not" + std::to_string( _numNodesPerCell ) + " normals detected: " + std::to_string( i ), CURRENT_FUNCTION ); + } + if( interfaceMid[i].size() != _numNodesPerCell ) { + ErrorMessages::Error( "Not" + std::to_string( _numNodesPerCell ) + " interfaceMid detected: " + std::to_string( i ), CURRENT_FUNCTION ); + } + for( unsigned j = 0; j < _numNodesPerCell; ++j ) { + if( neighbors[i][j] == -1 ) { + ErrorMessages::Error( "Face not assigned: " + std::to_string( i ) + " " + std::to_string( j ), CURRENT_FUNCTION ); + } + _cellNeighbors[i][j] = neighbors[i][j]; + } + } + _cellNormals = normals; + _cellInterfaceMidPoints = interfaceMid; + + /* // pre sort cells and boundaries; sorting is needed for std::set_intersection + log->info( "| ...sort cells..." ); + auto sortedCells( _cells ); +#pragma omp parallel for for( unsigned i = 0; i < _numCells; ++i ) { std::sort( sortedCells[i].begin(), sortedCells[i].end() ); } @@ -51,13 +211,18 @@ void Mesh::ComputeConnectivity() { } // save which cell has which nodes + log->info( "| ...connect cells to nodes..." ); blaze::CompressedMatrix connMat( _numCells, _numNodes ); + + // #pragma omp parallel for for( unsigned i = mpiCellStart; i < mpiCellEnd; ++i ) { for( auto j : _cells[i] ) connMat.set( i, j, true ); } // determine neighbor cells and normals with MPI and OpenMP -#pragma omp parallel for + log->info( "| ...determine neighbors of cells..." ); + +#pragma omp parallel for schedule( guided ) for( unsigned i = mpiCellStart; i < mpiCellEnd; ++i ) { std::vector* cellsI = &sortedCells[i]; unsigned ctr = 0; @@ -67,7 +232,8 @@ void Mesh::ComputeConnectivity() { else if( ctr == _numNodesPerCell ) break; else if( static_cast( blaze::dot( blaze::row( connMat, i ), blaze::row( connMat, j ) ) ) == - _numNodesPerBoundary ) { // in 2D cells are neighbors if they share two nodes std::vector* cellsJ = &sortedCells[j]; + _numNodesPerBoundary ) { // in 2D cells are neighbors if they share two nodes std::vector* cellsJ = + // &sortedCells[j]; // which are the two common nodes and which edge belongs to them? std::vector* cellsJ = &sortedCells[j]; std::vector commonElements; // vector of nodes that are shared by cells i and j @@ -80,8 +246,9 @@ void Mesh::ComputeConnectivity() { // determine unused index unsigned pos0 = _numNodesPerCell * ( i - mpiCellStart ); unsigned pos = pos0; - while( neighborsFlatPart[pos] != -1 && pos < pos0 + _numNodesPerCell - 1 && pos < chunkSize * _numNodesPerCell - 1 ) + while( neighborsFlatPart[pos] != -1 && pos < pos0 + _numNodesPerCell - 1 && pos < chunkSize * _numNodesPerCell - 1 ) { pos++; // neighbors should be at same edge position for cells i AND j + } neighborsFlatPart[pos] = j; // compute normal vector normalsFlatPart[pos] = ComputeOutwardFacingNormal( _nodes[commonElements[0]], _nodes[commonElements[1]], _cellMidPoints[i] ); @@ -101,15 +268,17 @@ void Mesh::ComputeConnectivity() { bNodes->begin(), bNodes->end(), std::back_inserter( commonElements ) ); // find common nodes of two cells - // _boundaries[k].second has all boundary nodes of boundary k. Therefore if all cell nodes lie on the boundary, the number of common - // nodes can be 3 for triangles, 4 for quadrangles etc + // _boundaries[k].second has all boundary nodes of boundary k. Therefore if all cell nodes lie on the boundary, the number of + // common nodes can be 3 for triangles, 4 for quadrangles etc if( commonElements.size() >= _numNodesPerBoundary && commonElements.size() <= _numNodesPerCell ) { unsigned pos0 = _numNodesPerCell * ( i - mpiCellStart ); unsigned pos = pos0; - while( neighborsFlatPart[pos] != -1 && pos < pos0 + _numNodesPerCell - 1 && pos < chunkSize * _numNodesPerCell - 1 ) pos++; + while( neighborsFlatPart[pos] != -1 && pos < pos0 + _numNodesPerCell - 1 && pos < chunkSize * _numNodesPerCell - 1 ) { + pos++; + } neighborsFlatPart[pos] = _ghostCellID; - normalsFlatPart[pos] = ComputeOutwardFacingNormal( _nodes[commonElements[0]], _nodes[commonElements[1]], _cellMidPoints[i] ); - interfaceMidFlatPart[pos] = ComputeCellInterfaceMidpoints( _nodes[commonElements[0]], _nodes[commonElements[1]] ); + normalsFlatPart[pos] = ComputeOutwardFacingNormal( _nodes[commonElements[0]], _nodes[commonElements[1]], +_cellMidPoints[i] ); interfaceMidFlatPart[pos] = ComputeCellInterfaceMidpoints( _nodes[commonElements[0]], _nodes[commonElements[1]] ); } } } @@ -119,20 +288,20 @@ void Mesh::ComputeConnectivity() { std::vector neighborsFlat( _numNodesPerCell * chunkSize * comm_size, -1 ); std::vector normalsFlat( _numNodesPerCell * chunkSize * comm_size, Vector( _dim, 0.0 ) ); std::vector interfaceMidFlat( _numNodesPerCell * chunkSize * comm_size, Vector( _dim, 0.0 ) ); - if( comm_size == 1 ) { // can be done directly if there is only one MPI thread - neighborsFlat.assign( neighborsFlatPart.begin(), neighborsFlatPart.end() ); - normalsFlat.assign( normalsFlatPart.begin(), normalsFlatPart.end() ); - interfaceMidFlat.assign( interfaceMidFlatPart.begin(), interfaceMidFlatPart.end() ); - } - else { - MPI_Allgather( neighborsFlatPart.data(), - _numNodesPerCell * chunkSize, - MPI_INT, - neighborsFlat.data(), - _numNodesPerCell * chunkSize, - MPI_INT, - MPI_COMM_WORLD ); - } + // if( comm_size == 1 ) { // can be done directly if there is only one MPI thread + neighborsFlat.assign( neighborsFlatPart.begin(), neighborsFlatPart.end() ); + normalsFlat.assign( normalsFlatPart.begin(), normalsFlatPart.end() ); + interfaceMidFlat.assign( interfaceMidFlatPart.begin(), interfaceMidFlatPart.end() ); + //} + // else { + // MPI_Allgather( neighborsFlatPart.data(), + // _numNodesPerCell * chunkSize, + // MPI_INT, + // neighborsFlat.data(), + // _numNodesPerCell * chunkSize, + // MPI_INT, + // MPI_COMM_WORLD ); + //} // check for any unassigned faces if( std::any_of( neighborsFlat.begin(), neighborsFlat.end(), []( int i ) { return i == -1; } ) ) { // if any entry in neighborsFlat is -1 @@ -151,23 +320,26 @@ void Mesh::ComputeConnectivity() { unsigned IDj = neighborsFlat[i]; if( IDi == IDj ) continue; // avoid self assignment if( IDj == _ghostCellID ) { // cell is boundary cell - if( std::find( _cellNeighbors[IDi].begin(), _cellNeighbors[IDi].end(), _ghostCellID ) == _cellNeighbors[IDi].end() ) { - _cellNeighbors[IDi].push_back( _ghostCellID ); - _cellNormals[IDi].push_back( normalsFlat[i] ); - _cellInterfaceMidPoints[IDi].push_back( interfaceMidFlat[i] ); - } + // if( std::find( _cellNeighbors[IDi].begin(), _cellNeighbors[IDi].end(), _ghostCellID ) == _cellNeighbors[IDi].end() ) { + _cellNeighbors[IDi].push_back( _ghostCellID ); + _cellNormals[IDi].push_back( normalsFlat[i] ); + _cellInterfaceMidPoints[IDi].push_back( interfaceMidFlat[i] ); + // temp++; + // } + // std::cout << temp << "\n"; } else { // normal cell neighbor - if( std::find( _cellNeighbors[IDi].begin(), _cellNeighbors[IDi].end(), IDj ) == _cellNeighbors[IDi].end() ) { - _cellNeighbors[IDi].push_back( IDj ); - _cellNormals[IDi].push_back( normalsFlat[i] ); - _cellInterfaceMidPoints[IDi].push_back( interfaceMidFlat[i] ); - } + // if( std::find( _cellNeighbors[IDi].begin(), _cellNeighbors[IDi].end(), IDj ) == _cellNeighbors[IDi].end() ) { + _cellNeighbors[IDi].push_back( neighborsFlat[i] ); + _cellNormals[IDi].push_back( normalsFlat[i] ); + _cellInterfaceMidPoints[IDi].push_back( interfaceMidFlat[i] ); + //} } } - +*/ // assign boundary types to all cells _cellBoundaryTypes.resize( _numCells, BOUNDARY_TYPE::NONE ); +#pragma omp parallel for for( unsigned i = 0; i < _numCells; ++i ) { if( std::any_of( _cellNeighbors[i].begin(), _cellNeighbors[i].end(), [this]( unsigned i ) { return i == _ghostCellID; @@ -185,6 +357,7 @@ void Mesh::ComputeConnectivity() { void Mesh::ComputeCellAreas() { _cellAreas.resize( _numCells ); +#pragma omp parallel for for( unsigned i = 0; i < _numCells; ++i ) { switch( _numNodesPerCell ) { case 3: { // triangular cells @@ -223,6 +396,7 @@ void Mesh::ComputeCellAreas() { void Mesh::ComputeCellMidpoints() { _cellMidPoints = std::vector( _numCells, Vector( _dim, 0.0 ) ); +#pragma omp parallel for for( unsigned j = 0; j < _numCells; ++j ) { // loop over cells for( unsigned l = 0; l < _cells[j].size(); ++l ) { // loop over nodes of the cell _cellMidPoints[j] = _cellMidPoints[j] + _nodes[_cells[j][l]]; @@ -255,7 +429,7 @@ void Mesh::ComputeSlopes( unsigned nq, VectorVector& psiDerX, VectorVector& psiD psiDerX[idx_cell][idx_sys] = 0.0; psiDerY[idx_cell][idx_sys] = 0.0; if( _cellBoundaryTypes[idx_cell] != 2 ) continue; // skip ghost cells - // compute derivative by summing over cell boundary + // compute derivative by summing over cell boundary using Green Gauss Theorem for( unsigned idx_nbr = 0; idx_nbr < _cellNeighbors[idx_cell].size(); ++idx_nbr ) { psiDerX[idx_cell][idx_sys] += 0.5 * ( psi[idx_cell][idx_sys] + psi[_cellNeighbors[idx_cell][idx_nbr]][idx_sys] ) * _cellNormals[idx_cell][idx_nbr][0]; @@ -290,14 +464,18 @@ void Mesh::ComputeLimiter( double const eps = 1e-10; #pragma omp parallel for for( unsigned idx_cell = 0; idx_cell < _numCells; idx_cell++ ) { - for( unsigned idx_sys = 0; idx_sys < nSys; idx_sys++ ) { - double r = 0.0; - if( _cellBoundaryTypes[idx_cell] != 2 ) { + if( _cellBoundaryTypes[idx_cell] != 2 ) { + for( unsigned idx_sys = 0; idx_sys < nSys; idx_sys++ ) { limiter[idx_cell][idx_sys] = 0.0; // turn to first order on boundaries - continue; // skip computation } + continue; // skip computation + } + + for( unsigned idx_sys = 0; idx_sys < nSys; idx_sys++ ) { + double r = 0.0; double minSol = sol[idx_cell][idx_sys]; double maxSol = sol[idx_cell][idx_sys]; + Vector localLimiter( _numNodesPerCell, 0.0 ); for( unsigned idx_nbr = 0; idx_nbr < _cellNeighbors[idx_cell].size(); idx_nbr++ ) { // Compute ptswise max and minimum solultion values of current and neighbor cells @@ -309,19 +487,20 @@ void Mesh::ComputeLimiter( minSol = sol[glob_nbr][idx_sys]; } } + for( unsigned idx_nbr = 0; idx_nbr < _cellNeighbors[idx_cell].size(); idx_nbr++ ) { // Compute value at interface midpoint, called gaussPt double gaussPt = 0.0; // gauss point is at cell vertex - gaussPt = solDx[idx_cell][idx_sys] * ( _nodes[_cells[idx_cell][idx_nbr]][0] - _cellMidPoints[idx_cell][0] ) + - solDy[idx_cell][idx_sys] * ( _nodes[_cells[idx_cell][idx_nbr]][1] - _cellMidPoints[idx_cell][1] ); + gaussPt = ( solDx[idx_cell][idx_sys] * ( _nodes[_cells[idx_cell][idx_nbr]][0] - _cellMidPoints[idx_cell][0] ) + + solDy[idx_cell][idx_sys] * ( _nodes[_cells[idx_cell][idx_nbr]][1] - _cellMidPoints[idx_cell][1] ) ); // Compute limiter input if( std::abs( gaussPt ) > eps ) { if( gaussPt > 0.0 ) { r = ( maxSol - sol[idx_cell][idx_sys] ) / gaussPt; } - else if( gaussPt < 0.0 ) { + else { r = ( minSol - sol[idx_cell][idx_sys] ) / gaussPt; } } @@ -332,70 +511,19 @@ void Mesh::ComputeLimiter( std::cout << "r <0.0 \n"; // if this happens there is a bug or a deformend mesh } localLimiter[idx_nbr] = std::min( r, 1.0 ); // LimiterBarthJespersen( r ); - // double epsVenka = ( 1 * sqrt( _cellAreas[idx_cell] ) ); - // epsVenka = epsVenka * epsVenka * epsVenka; - // double dMax = maxSol - sol[idx_cell][idx_sys]; - // double dMin = minSol - sol[idx_cell][idx_sys]; - //// venkat limiter - // if( gaussPt > 0.0 ) { - // localLimiter[idx_nbr] = ( 1 / gaussPt ) * ( ( dMax * dMax + epsVenka * epsVenka ) * gaussPt + 2 * gaussPt * gaussPt * dMax ) / - // ( dMax * dMax + 2 * gaussPt * gaussPt + dMax * gaussPt + epsVenka * epsVenka ); - //} - // else if( gaussPt < 0.0 ) { - // localLimiter[idx_nbr] = ( 1 / gaussPt ) * ( ( dMin * dMin + epsVenka * epsVenka ) * gaussPt + 2 * gaussPt * gaussPt * dMin ) / - // ( dMin * dMin + 2 * gaussPt * gaussPt + dMin * gaussPt + epsVenka * epsVenka ); - //} - // else { - // localLimiter[idx_nbr] = 1.0; - //} } // get smallest limiter limiter[idx_cell][idx_sys] = localLimiter[0]; for( unsigned idx_nbr = 0; idx_nbr < _cellNeighbors[idx_cell].size(); idx_nbr++ ) { if( localLimiter[idx_nbr] < limiter[idx_cell][idx_sys] ) limiter[idx_cell][idx_sys] = localLimiter[idx_nbr]; } - // check maximum principle - // for( unsigned idx_nbr = 0; idx_nbr < _cellNeighbors[idx_cell].size(); idx_nbr++ ) { - // double currLim = limiter[idx_cell][idx_sys]; - // // double dy = solDy[idx_cell][idx_sys]; - // // double dx = solDx[idx_cell][idx_sys]; - // // double rijx = _cellInterfaceMidPoints[idx_cell][idx_nbr][0]; - // // double rijy = _cellInterfaceMidPoints[idx_cell][idx_nbr][1]; - // // double cmx = _cellMidPoints[idx_cell][0]; - // // double cmy = _cellMidPoints[idx_cell][1]; - // // double curSol = sol[idx_cell][idx_sys]; - // double gaussPt = solDx[idx_cell][idx_sys] * ( _cellInterfaceMidPoints[idx_cell][idx_nbr][0] - _cellMidPoints[idx_cell][0] ) + - // solDy[idx_cell][idx_sys] * ( _cellInterfaceMidPoints[idx_cell][idx_nbr][1] - _cellMidPoints[idx_cell][1] ); - - // double psiL = sol[idx_cell][idx_sys] + currLim * gaussPt; - // // double psiL2 = curSol + currLim * ( dx * ( rijx - cmx ) + dy * ( rijy - cmy ) ); - - // if( psiL > maxSol ) { - // // std::cout << "max principle hurt\n"; - // // gaussPt = solDx[idx_cell][idx_sys] * ( _nodes[_cells[idx_cell][idx_nbr]][0] - _cellMidPoints[idx_cell][0] ) + - // // solDy[idx_cell][idx_sys] * ( _nodes[_cells[idx_cell][idx_nbr]][1] - _cellMidPoints[idx_cell][1] ); - // // std::cout << "gaussPt" << gaussPt << "\n"; - // // std::cout << "enumMax" << maxSol - sol[idx_cell][idx_sys] << "\n"; - // // std::cout << "enumMin" << minSol - sol[idx_cell][idx_sys] << "\n"; - // // std::cout << "minSol" << minSol << "psiL" << psiL << "maxSol" << maxSol << "\n"; - // // limiter[idx_cell][idx_sys] = 0.0; - // } - // if( psiL < minSol ) { - // // std::cout << "min principle hurt\n"; - // // std::cout << "gaussPt" << gaussPt << "\n"; - // // std::cout << "enumMax" << maxSol - sol[idx_cell][idx_sys] << "\n"; - // // std::cout << "enumMin" << minSol - sol[idx_cell][idx_sys] << "\n"; - // // std::cout << "minSol" << minSol << "psiL" << psiL << "maxSol" << maxSol << "\n"; - // // limiter[idx_cell][idx_sys] = 0.0; - // } - //} } } } void Mesh::ComputeLimiter1D( unsigned nSys, const VectorVector& sol, VectorVector& limiter ) const { - //#pragma omp parallel for double const eps = 1e-10; +#pragma omp parallel for for( unsigned idx_cell = 0; idx_cell < _numCells; idx_cell++ ) { for( unsigned idx_sys = 0; idx_sys < nSys; idx_sys++ ) { double r = 0.0; @@ -418,13 +546,15 @@ void Mesh::ComputeLimiter1D( unsigned nSys, const VectorVector& sol, VectorVecto // double LimiterBarthJespersen( double r ) { return std::min( r, 1.0 ); } void Mesh::ComputeBounds() { - _bounds = std::vector( _dim, std::make_pair( std::numeric_limits::infinity(), -std::numeric_limits::infinity() ) ); - for( unsigned i = 0; i < _numNodes; ++i ) { - for( unsigned j = 0; j < _dim; ++j ) { - if( _nodes[i][j] < _bounds[j].first ) _bounds[j].first = _nodes[i][j]; - if( _nodes[i][j] > _bounds[j].second ) _bounds[j].second = _nodes[i][j]; - } - } + _bounds = std::vector( _dim, std::make_pair( 0.0, 1.0 ) ); // Currently not used + //_bounds = std::vector( _dim, std::make_pair( std::numeric_limits::infinity(), -std::numeric_limits::infinity() ) ); + // + // for( unsigned i = 0; i < _numNodes; ++i ) { + // for( unsigned j = 0; j < _dim; ++j ) { + // if( _nodes[i][j] < _bounds[j].first ) _bounds[j].first = _nodes[i][j]; + // if( _nodes[i][j] > _bounds[j].second ) _bounds[j].second = _nodes[i][j]; + // } + // } } const std::vector& Mesh::GetNodes() const { return _nodes; } @@ -446,3 +576,115 @@ double Mesh::GetDistanceToOrigin( unsigned idx_cell ) const { } return sqrt( distance ); } + +unsigned Mesh::GetCellOfKoordinate( const double x, const double y ) const { + // Experimental parallel implementation + unsigned koordinate_cell_id = std::numeric_limits::max(); + bool found = false; + + // #pragma omp parallel for shared( found ) + for( unsigned idx_cell = 0; idx_cell < _numCells; idx_cell++ ) { + if( IsPointInsideCell( idx_cell, x, y ) ) { + // #pragma omp critical + { + if( !found ) { + koordinate_cell_id = idx_cell; + found = true; + } + } + } + // Check if cancellation has been requested + } + if( !found ) { + ErrorMessages::Error( "Probing point (" + std::to_string( x ) + "," + std::to_string( y ) + ") is not contained in mesh.", CURRENT_FUNCTION ); + } + return koordinate_cell_id; +} + +std::vector Mesh::GetCellsofBall( const double x, const double y, const double r ) const { + std::vector cells_in_ball; + + // Experimental parallel implementation + // #pragma omp parallel for + for( unsigned idx_cell = 0; idx_cell < _numCells; idx_cell++ ) { + // Assume GetCellCenter returns the center coordinates of the cell + double cell_x = _cellMidPoints[idx_cell][0]; + double cell_y = _cellMidPoints[idx_cell][1]; + + // Calculate the distance from the cell center to the point (x, y) + double distance = std::sqrt( ( cell_x - x ) * ( cell_x - x ) + ( cell_y - y ) * ( cell_y - y ) ); + + if( distance <= r ) { + // #pragma omp critical + { cells_in_ball.push_back( idx_cell ); } + } + } + + if( cells_in_ball.empty() ) { // take the only cell that contains the point + std::cout << "No cells found within the ball centered at (" << x << "," << y << ") with radius " << r << "." << std::endl; + std::cout << "Taking the only cell that contains the point." << std::endl; + cells_in_ball.push_back( GetCellOfKoordinate( x, y ) ); + // ErrorMessages::Error( "No cells found within the ball centered at (" + std::to_string( x ) + "," + std::to_string( y ) + ") with radius " + + // std::to_string( r ) + ".", + // CURRENT_FUNCTION ); + } + + return cells_in_ball; +} + +bool Mesh::IsPointInsideCell( unsigned idx_cell, double x, double y ) const { + bool inside = false; + if( _numNodesPerCell == 3 ) { + inside = isPointInTriangle( x, + y, + _nodes[_cells[idx_cell][0]][0], + _nodes[_cells[idx_cell][0]][1], + _nodes[_cells[idx_cell][1]][0], + _nodes[_cells[idx_cell][1]][1], + _nodes[_cells[idx_cell][2]][0], + _nodes[_cells[idx_cell][2]][1] ); + } + else if( _numNodesPerCell == 4 ) { // quadrilateral cell +> divide into 2 triangles + inside = isPointInTriangle( x, + y, + _nodes[_cells[idx_cell][0]][0], + _nodes[_cells[idx_cell][0]][1], + _nodes[_cells[idx_cell][1]][0], + _nodes[_cells[idx_cell][1]][1], + _nodes[_cells[idx_cell][2]][0], + _nodes[_cells[idx_cell][2]][1] ) || + isPointInTriangle( x, + y, + _nodes[_cells[idx_cell][0]][0], + _nodes[_cells[idx_cell][0]][1], + _nodes[_cells[idx_cell][2]][0], + _nodes[_cells[idx_cell][2]][1], + _nodes[_cells[idx_cell][3]][0], + _nodes[_cells[idx_cell][3]][1] ); + } + else { + ErrorMessages::Error( "Unsupported number of nodes per cell: " + std::to_string( _numNodesPerCell ), CURRENT_FUNCTION ); + } + // if( inside ) { + // std::cout << "Cells: " << idx_cell << "pt: " << _cellMidPoints[idx_cell][0] << " " << _cellMidPoints[idx_cell][1] << " pt: " << x << " " << + // y + // << "\n"; + // } + + return inside; +} + +bool Mesh::isPointInTriangle( double x, double y, double x1, double y1, double x2, double y2, double x3, double y3 ) const { + // Calculate the area of the triangle + double d1, d2, d3; + bool hasNeg, hasPos; + + d1 = ( x - x2 ) * ( y1 - y2 ) - ( x1 - x2 ) * ( y - y2 ); + d2 = ( x - x3 ) * ( y2 - y3 ) - ( x2 - x3 ) * ( y - y3 ); + d3 = ( x - x1 ) * ( y3 - y1 ) - ( x3 - x1 ) * ( y - y1 ); + + hasNeg = ( d1 < 0 ) || ( d2 < 0 ) || ( d3 < 0 ); + hasPos = ( d1 > 0 ) || ( d2 > 0 ) || ( d3 > 0 ); + + return !( hasNeg && hasPos ); +} diff --git a/src/common/optionstructure.cpp b/src/common/optionstructure.cpp index ff0ee575..486a8964 100644 --- a/src/common/optionstructure.cpp +++ b/src/common/optionstructure.cpp @@ -237,3 +237,36 @@ std::string OptionStringList::SetValue( std::vector option_value ) void OptionStringList::SetDefault() { this->_size = 0; // There is no default value for list } + +// --- members of OptionDoubleList + +OptionDoubleList::OptionDoubleList( std::string option_field_name, unsigned short& list_size, std::vector& option_field ) + : _field( option_field ), _size( list_size ) { + this->_name = option_field_name; +} + +std::string OptionDoubleList::SetValue( std::vector option_value ) { + OptionBase::SetValue( option_value ); + // The size is the length of option_value + unsigned short option_size = option_value.size(); + if( option_size == 1 && option_value[0].compare( "NONE" ) == 0 ) { + this->_size = 0; + return ""; + } + this->_size = option_size; + + // Parse all of the options + this->_field.resize( this->_size ); + for( unsigned long i = 0; i < option_size; i++ ) { + std::istringstream is( option_value[i] ); + double val; + if( is >> val ) { + this->_field.at( i ) = val; + } + } + return ""; +} + +void OptionDoubleList::SetDefault() { + this->_size = 0; // There is no default value for list +} diff --git a/src/datagenerator/datageneratorbase.cpp b/src/datagenerator/datageneratorbase.cpp index a901cb4b..69cbd0d2 100644 --- a/src/datagenerator/datageneratorbase.cpp +++ b/src/datagenerator/datageneratorbase.cpp @@ -22,7 +22,7 @@ #include "toolboxes/textprocessingtoolbox.hpp" #include "velocitybasis/sphericalbase.hpp" -//#include +// #include #include "spdlog/spdlog.h" #include #include @@ -54,8 +54,9 @@ DataGeneratorBase::DataGeneratorBase( Config* settings ) { _quadPointsSphere = _quadrature->GetPointsSphere(); // Spherical Harmonics - if( _settings->GetSphericalBasisName() == SPHERICAL_HARMONICS && _maxPolyDegree > 0 && _settings->GetAlphaSampling() == false) { - ErrorMessages::Error( "No direct moment sampling algorithm for spherical harmonics basis with degree higher than 0 implemented", CURRENT_FUNCTION ); + if( _settings->GetSphericalBasisName() == SPHERICAL_HARMONICS && _maxPolyDegree > 0 && _settings->GetAlphaSampling() == false ) { + ErrorMessages::Error( "No direct moment sampling algorithm for spherical harmonics basis with degree higher than 0 implemented", + CURRENT_FUNCTION ); } _basisGenerator = SphericalBase::Create( _settings ); @@ -136,7 +137,7 @@ void DataGeneratorBase::SampleMultiplierAlpha() { for( unsigned idx_set = 0; idx_set < _setSize; idx_set++ ) { Vector alphaRed = Vector( _nTotalEntries - 1, 0.0 ); // local reduced alpha - bool accepted = false; + bool accepted = false; bool normAccepted = false; while( !accepted ) { // Sample random multivariate uniformly distributed alpha between minAlpha and MaxAlpha. @@ -159,7 +160,7 @@ void DataGeneratorBase::SampleMultiplierAlpha() { for( unsigned idx_quad = 0; idx_quad < _nq; idx_quad++ ) { integral += _entropy->EntropyPrimeDual( dot( alphaRed, momentsRed[idx_quad] ) ) * _weights[idx_quad]; } - _alpha[idx_set][0] = -(log( integral )+ log(_momentBasis[0][0]) )/_momentBasis[0][0]; // normalization + _alpha[idx_set][0] = -( log( integral ) + log( _momentBasis[0][0] ) ) / _momentBasis[0][0]; // normalization // Assemble complete alpha (normalized) for( unsigned idx_sys = 1; idx_sys < _nTotalEntries; idx_sys++ ) { @@ -199,7 +200,7 @@ bool DataGeneratorBase::ComputeEVRejection( unsigned idx_set ) { Vector ew = Vector( _nTotalEntries, 0.0 ); eigen( hessianSym, ew ); if( min( ew ) < _settings->GetMinimalEVBound() ) { - std::cout << "ew: " << min( ew ) << "\n"; + // std::cout << "ew: " << min( ew ) << "\n"; return false; } return true; @@ -212,8 +213,7 @@ bool DataGeneratorBase::ComputeReducedEVRejection( VectorVector& redMomentBasis, Vector ew = Vector( _nTotalEntries - 1, 0.0 ); eigen( hessianSym, ew ); if( min( ew ) < _settings->GetMinimalEVBound() ) { - std::cout << "ew: " << min( ew ) << "\n"; - + // std::cout << "ew: " << min( ew ) << "\n"; return false; } return true; diff --git a/src/fluxes/upwindflux.cpp b/src/fluxes/upwindflux.cpp index 45ed825e..2caac866 100644 --- a/src/fluxes/upwindflux.cpp +++ b/src/fluxes/upwindflux.cpp @@ -13,6 +13,16 @@ double UpwindFlux::Flux( const Vector& Omega, double psiL, double psiR, const Ve } } +void UpwindFlux::Flux( const VectorVector& quadPts, const Vector& psiL, const Vector& psiR, Vector& flux, const Vector& n, unsigned n_sys ) { + double inner; // Only use x and y axis in 2d case, minus because y axis is flipped for some reason + + for( unsigned idx_q = 0; idx_q < n_sys; idx_q++ ) { + inner = quadPts[idx_q][0] * n[0] + quadPts[idx_q][1] * n[1]; + + flux[idx_q] += ( inner > 0 ) ? inner * psiL[idx_q] : inner * psiR[idx_q]; + } +} + double UpwindFlux::FluxXZ( const Vector& Omega, double psiL, double psiR, const Vector& n ) const { double inner = Omega[0] * n[0] + Omega[2] * n[1]; // Only use x and z axis in 2d case if( inner > 0 ) { diff --git a/src/main.cpp b/src/main.cpp index f2758426..07cfcc1f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4,16 +4,17 @@ * @version: 0.1 */ -#include -#define PY_ARRAY_UNIQUE_SYMBOL KITRT_ARRAY_API +#ifdef BUILD_MPI #include +#endif +#include #include #include "common/config.hpp" #include "common/io.hpp" -#include "solvers/solverbase.hpp" - #include "datagenerator/datageneratorbase.hpp" +#include "solvers/snsolver_hpc.hpp" +#include "solvers/solverbase.hpp" #ifdef BUILD_GUI #include @@ -23,16 +24,16 @@ int main( int argc, char** argv ) { #ifdef BUILD_GUI - MPI_Init( &argc, &argv ); QApplication app( argc, argv ); MainWindow mw; mw.show(); return app.exec(); #else +// wchar_t* program = Py_DecodeLocale( argv[0], NULL ); +// Py_SetProgramName( program ); +#ifdef BUILD_MPI MPI_Init( &argc, &argv ); - wchar_t* program = Py_DecodeLocale( argv[0], NULL ); - Py_SetProgramName( program ); - +#endif std::string filename = ParseArguments( argc, argv ); // CD Load Settings from File @@ -49,17 +50,25 @@ int main( int argc, char** argv ) { } else { // Build solver - SolverBase* solver = SolverBase::Create( config ); - - // Run solver and export - solver->Solve(); - solver->PrintVolumeOutput(); - delete solver; + if( config->GetHPC() ) { + SNSolverHPC* solver = new SNSolverHPC( config ); + // Run solver and export + solver->Solve(); + delete solver; + } + else { + SolverBase* solver = SolverBase::Create( config ); + // Run solver and export + solver->Solve(); + solver->PrintVolumeOutput(); + delete solver; + } } delete config; - +#ifdef BUILD_MPI MPI_Finalize(); +#endif return EXIT_SUCCESS; #endif diff --git a/src/problems/aircavity1d.cpp b/src/problems/aircavity1d.cpp index bc856b03..26c8a393 100644 --- a/src/problems/aircavity1d.cpp +++ b/src/problems/aircavity1d.cpp @@ -7,7 +7,9 @@ #include "velocitybasis/sphericalbase.hpp" #include "velocitybasis/sphericalharmonics.hpp" -AirCavity1D::AirCavity1D( Config* settings, Mesh* mesh ) : ProblemBase( settings, mesh ) { _sigmaS = settings->GetSigmaS(); } +AirCavity1D::AirCavity1D( Config* settings, Mesh* mesh, QuadratureBase* quad ) : ProblemBase( settings, mesh, quad ) { + _sigmaS = settings->GetSigmaS(); +} AirCavity1D::~AirCavity1D() {} @@ -50,7 +52,9 @@ VectorVector AirCavity1D::GetTotalXS( const Vector& energies ) { return VectorVe // ------ Moment version --- -AirCavity1D_Moment::AirCavity1D_Moment( Config* settings, Mesh* mesh ) : ProblemBase( settings, mesh ) { _sigmaS = settings->GetSigmaS(); } +AirCavity1D_Moment::AirCavity1D_Moment( Config* settings, Mesh* mesh, QuadratureBase* quad ) : ProblemBase( settings, mesh, quad ) { + _sigmaS = settings->GetSigmaS(); +} AirCavity1D_Moment::~AirCavity1D_Moment() {} @@ -64,7 +68,7 @@ std::vector AirCavity1D_Moment::GetExternalSource( const Vector& / VectorVector AirCavity1D_Moment::SetupIC() { if( _settings->GetSolverName() == PN_SOLVER ) { - + // In case of PN, spherical basis is per default SPHERICAL_HARMONICS in 3 velocity dimensions SphericalBase* tempBase = new SphericalHarmonics( _settings->GetMaxMomentDegree(), 3 ); diff --git a/src/problems/checkerboard.cpp b/src/problems/checkerboard.cpp index c8c3483e..9ce4326e 100644 --- a/src/problems/checkerboard.cpp +++ b/src/problems/checkerboard.cpp @@ -8,27 +8,27 @@ // ---- Checkerboard Sn ---- // Constructor for Ckeckerboard case with Sn -Checkerboard_SN::Checkerboard_SN( Config* settings, Mesh* mesh ) : ProblemBase( settings, mesh ) { +Checkerboard_SN::Checkerboard_SN( Config* settings, Mesh* mesh, QuadratureBase* quad ) : ProblemBase( settings, mesh, quad ) { // Initialise crosssections to 1 - _scatteringXS = Vector( _mesh->GetNumCells(), 1.0 ); - _totalXS = Vector( _mesh->GetNumCells(), 1.0 ); + _sigmaS = Vector( _mesh->GetNumCells(), 1.0 ); + _sigmaT = Vector( _mesh->GetNumCells(), 1.0 ); // For absorption cells: set scattering XS to 0 and absorption to 10 auto cellMids = _mesh->GetCellMidPoints(); for( unsigned j = 0; j < cellMids.size(); ++j ) { if( isAbsorption( cellMids[j] ) ) { - _scatteringXS[j] = 0.0; - _totalXS[j] = 10.0; + _sigmaS[j] = 0.0; + _sigmaT[j] = 10.0; } } } Checkerboard_SN::~Checkerboard_SN() {} -VectorVector Checkerboard_SN::GetScatteringXS( const Vector& energies ) { return VectorVector( energies.size(), _scatteringXS ); } +VectorVector Checkerboard_SN::GetScatteringXS( const Vector& /*energies */ ) { return VectorVector( 1u, _sigmaS ); } -VectorVector Checkerboard_SN::GetTotalXS( const Vector& energies ) { return VectorVector( energies.size(), _totalXS ); } +VectorVector Checkerboard_SN::GetTotalXS( const Vector& /*energies */ ) { return VectorVector( 1u, _sigmaT ); } std::vector Checkerboard_SN::GetExternalSource( const Vector& /*energies*/ ) { VectorVector Q( _mesh->GetNumCells(), Vector( 1u, 0.0 ) ); @@ -70,27 +70,27 @@ bool Checkerboard_SN::isSource( const Vector& pos ) const { // ---- Checkerboard Moments ---- // Constructor for checkerboard case with Pn -Checkerboard_Moment::Checkerboard_Moment( Config* settings, Mesh* mesh ) : ProblemBase( settings, mesh ) { +Checkerboard_Moment::Checkerboard_Moment( Config* settings, Mesh* mesh, QuadratureBase* quad ) : ProblemBase( settings, mesh, quad ) { // Initialise crosssections = 1 (scattering) - _scatteringXS = Vector( _mesh->GetNumCells(), 1.0 ); - _totalXS = Vector( _mesh->GetNumCells(), 1.0 ); + _sigmaS = Vector( _mesh->GetNumCells(), 1.0 ); + _sigmaT = Vector( _mesh->GetNumCells(), 1.0 ); // for absorption regions change crosssections to all absorption auto cellMids = _mesh->GetCellMidPoints(); for( unsigned j = 0; j < cellMids.size(); ++j ) { if( isAbsorption( cellMids[j] ) ) { - _scatteringXS[j] = 0.0; - _totalXS[j] = 10.0; + _sigmaS[j] = 0.0; + _sigmaT[j] = 10.0; } } } Checkerboard_Moment::~Checkerboard_Moment() {} -VectorVector Checkerboard_Moment::GetScatteringXS( const Vector& energies ) { return VectorVector( energies.size(), _scatteringXS ); } +VectorVector Checkerboard_Moment::GetScatteringXS( const Vector& /*energies*/ ) { return VectorVector( 1u, _sigmaS ); } -VectorVector Checkerboard_Moment::GetTotalXS( const Vector& energies ) { return VectorVector( energies.size(), _totalXS ); } +VectorVector Checkerboard_Moment::GetTotalXS( const Vector& /*energies*/ ) { return VectorVector( 1u, _sigmaT ); } std::vector Checkerboard_Moment::GetExternalSource( const Vector& /*energies*/ ) { // In case of PN, spherical basis is per default SPHERICAL_HARMONICS @@ -213,27 +213,27 @@ bool Checkerboard_Moment::isSource( const Vector& pos ) const { // ---- Checkerboard SN 1D ---- // Constructor for Ckeckerboard case with Sn -Checkerboard_SN_1D::Checkerboard_SN_1D( Config* settings, Mesh* mesh ) : ProblemBase( settings, mesh ) { +Checkerboard_SN_1D::Checkerboard_SN_1D( Config* settings, Mesh* mesh, QuadratureBase* quad ) : ProblemBase( settings, mesh, quad ) { // Initialise crosssections to 1 - _scatteringXS = Vector( _mesh->GetNumCells(), 1.0 ); - _totalXS = Vector( _mesh->GetNumCells(), 1.0 ); + _sigmaS = Vector( _mesh->GetNumCells(), 1.0 ); + _sigmaT = Vector( _mesh->GetNumCells(), 1.0 ); // For absorption cells: set scattering XS to 0 and absorption to 10 auto cellMids = _mesh->GetCellMidPoints(); for( unsigned j = 0; j < cellMids.size(); ++j ) { if( isAbsorption( cellMids[j] ) ) { - _scatteringXS[j] = 0.0; - _totalXS[j] = 10.0; + _sigmaS[j] = 0.0; + _sigmaT[j] = 10.0; } } } Checkerboard_SN_1D::~Checkerboard_SN_1D() {} -VectorVector Checkerboard_SN_1D::GetScatteringXS( const Vector& energies ) { return VectorVector( energies.size(), _scatteringXS ); } +VectorVector Checkerboard_SN_1D::GetScatteringXS( const Vector& energies ) { return VectorVector( energies.size(), _sigmaS ); } -VectorVector Checkerboard_SN_1D::GetTotalXS( const Vector& energies ) { return VectorVector( energies.size(), _totalXS ); } +VectorVector Checkerboard_SN_1D::GetTotalXS( const Vector& energies ) { return VectorVector( energies.size(), _sigmaT ); } std::vector Checkerboard_SN_1D::GetExternalSource( const Vector& /*energies*/ ) { VectorVector Q( _mesh->GetNumCells(), Vector( 1u, 0.0 ) ); @@ -268,27 +268,27 @@ bool Checkerboard_SN_1D::isSource( const Vector& pos ) const { // --- Moment version 1d --- -Checkerboard_Moment_1D::Checkerboard_Moment_1D( Config* settings, Mesh* mesh ) : ProblemBase( settings, mesh ) { +Checkerboard_Moment_1D::Checkerboard_Moment_1D( Config* settings, Mesh* mesh, QuadratureBase* quad ) : ProblemBase( settings, mesh, quad ) { // Initialise crosssections to 1 - _scatteringXS = Vector( _mesh->GetNumCells(), 1.0 ); - _totalXS = Vector( _mesh->GetNumCells(), 1.0 ); + _sigmaS = Vector( _mesh->GetNumCells(), 1.0 ); + _sigmaT = Vector( _mesh->GetNumCells(), 1.0 ); // For absorption cells: set scattering XS to 0 and absorption to 10 auto cellMids = _mesh->GetCellMidPoints(); for( unsigned j = 0; j < cellMids.size(); ++j ) { if( isAbsorption( cellMids[j] ) ) { - _scatteringXS[j] = 0.0; - _totalXS[j] = 10.0; + _sigmaS[j] = 0.0; + _sigmaT[j] = 10.0; } } } Checkerboard_Moment_1D::~Checkerboard_Moment_1D() {} -VectorVector Checkerboard_Moment_1D::GetScatteringXS( const Vector& energies ) { return VectorVector( energies.size(), _scatteringXS ); } +VectorVector Checkerboard_Moment_1D::GetScatteringXS( const Vector& /*energies*/ ) { return VectorVector( 1u, _sigmaS ); } -VectorVector Checkerboard_Moment_1D::GetTotalXS( const Vector& energies ) { return VectorVector( energies.size(), _totalXS ); } +VectorVector Checkerboard_Moment_1D::GetTotalXS( const Vector& /*energies*/ ) { return VectorVector( 1u, _sigmaT ); } std::vector Checkerboard_Moment_1D::GetExternalSource( const Vector& /*energies*/ ) { if( _settings->GetSolverName() == PN_SOLVER || _settings->GetSolverName() == CSD_PN_SOLVER ) { diff --git a/src/problems/halflattice.cpp b/src/problems/halflattice.cpp new file mode 100644 index 00000000..77a50d9a --- /dev/null +++ b/src/problems/halflattice.cpp @@ -0,0 +1,457 @@ +#include "problems/halflattice.hpp" +#include "common/config.hpp" +#include "common/mesh.hpp" +#include "quadratures/quadraturebase.hpp" +#include "toolboxes/textprocessingtoolbox.hpp" +#include "velocitybasis/sphericalbase.hpp" +#include "velocitybasis/sphericalharmonics.hpp" + +// ---- Checkerboard Sn ---- +// Constructor for Ckeckerboard case with Sn +HalfLattice_SN::HalfLattice_SN( Config* settings, Mesh* mesh, QuadratureBase* quad ) : ProblemBase( settings, mesh, quad ) { + + // Initialise scattering crosssections to 1 and absorption cross sections to 0 + _sigmaS = Vector( _mesh->GetNumCells(), 1. ); + _sigmaT = Vector( _mesh->GetNumCells(), 1. ); + + // Initialize Quantities of interest + _curAbsorptionLattice = 0.0; + _curMaxAbsorptionLattice = 0.0; + _totalAbsorptionLattice = 0.0; + + if( _settings->GetNLatticeAbsIndividual() == 49 && _settings->GetNLatticeScatterIndividual() == 49 ) { // Individual values set + auto log = spdlog::get( "event" ); + log->info( "| " ); + log->info( "| Lattice test case WITH individual scattering and absorption values for each block. " ); + + auto cellMids = _mesh->GetCellMidPoints(); + + std::vector scatteringValues = _settings->GetLatticeScatterIndividual(); + std::vector absorptionValues = _settings->GetLatticeAbsorptionIndividual(); + + for( unsigned j = 0; j < cellMids.size(); ++j ) { + _sigmaS[j] = scatteringValues[GetBlockID( cellMids[j] )]; + _sigmaT[j] = absorptionValues[GetBlockID( cellMids[j] )] + scatteringValues[GetBlockID( cellMids[j] )]; + } + } + else { + auto log = spdlog::get( "event" ); + //log->info( "| " ); + //log->info( "| Lattice test case WITHOUT individual scattering and absorption values for each block. " ); + // For absorption cells: set scattering XS to 0 and absorption to 10 + auto cellMids = _mesh->GetCellMidPoints(); + for( unsigned j = 0; j < cellMids.size(); ++j ) { + if( IsAbsorption( cellMids[j] ) ) { + _sigmaS[j] = 0.0; + _sigmaT[j] = _settings->GetLatticeAbsBlue(); + } + else if( !IsSource( cellMids[j] ) ) { // White block + _sigmaS[j] = _settings->GetLatticeScatterWhite(); + _sigmaT[j] = _settings->GetLatticeScatterWhite(); + } + } + } + + SetGhostCells(); +} + +HalfLattice_SN::~HalfLattice_SN() {} + +VectorVector HalfLattice_SN::GetScatteringXS( const Vector& /*energies */ ) { return VectorVector( 1u, _sigmaS ); } + +VectorVector HalfLattice_SN::GetTotalXS( const Vector& /*energies */ ) { return VectorVector( 1u, _sigmaT ); } + +std::vector HalfLattice_SN::GetExternalSource( const Vector& /*energies*/ ) { + VectorVector Q( _mesh->GetNumCells(), Vector( 1u, 0.0 ) ); + auto cellMids = _mesh->GetCellMidPoints(); + for( unsigned j = 0; j < cellMids.size(); ++j ) { + if( IsSource( cellMids[j] ) ) Q[j] = _settings->GetSourceMagnitude(); // isotropic source + } + return std::vector( 1u, Q ); +} + +VectorVector HalfLattice_SN::SetupIC() { + VectorVector psi( _mesh->GetNumCells(), Vector( _settings->GetNQuadPoints(), 0.0 ) ); + return psi; +} + +bool HalfLattice_SN::IsAbsorption( const Vector& pos ) const { + // Check whether pos is inside absorbing squares + double xy_corrector = -3.5; + std::vector lbounds{ 1 + xy_corrector, 2 + xy_corrector, 3 + xy_corrector, 4 + xy_corrector, 5 + xy_corrector }; + std::vector ubounds{ 2 + xy_corrector, 3 + xy_corrector, 4 + xy_corrector, 5 + xy_corrector, 6 + xy_corrector }; + for( unsigned k = 0; k < lbounds.size(); ++k ) { + for( unsigned l = 0; l < lbounds.size(); ++l ) { + if( ( l + k ) % 2 == 1 || ( k == 2 && l == 2 ) || ( k == 2 && l == 4 ) ) continue; + if( pos[0] >= lbounds[k] && pos[0] <= ubounds[k] && pos[1] >= lbounds[l] && pos[1] <= ubounds[l] ) { + return true; + } + } + } + return false; +} + +unsigned HalfLattice_SN::GetBlockID( const Vector& pos ) const { + double xy_corrector = 3.5; + int block_x = int( pos[0] + xy_corrector ); + int block_y = int( pos[1] + xy_corrector ); + return (unsigned)( block_y * 7 + block_x ); +} + +bool HalfLattice_SN::IsSource( const Vector& pos ) const { + // Check whether pos is part of source region + if( pos[0] >= 3 - 3.5 && pos[0] <= 4 - 3.5 && pos[1] >= 3 - 3.5 && pos[1] <= 4 - 3.5 ) + return true; + else + return false; +} + +void HalfLattice_SN::SetGhostCells() { + // Loop over all cells. If its a Dirichlet boundary, add cell to dict with {cell_idx, boundary_value} + auto cellBoundaries = _mesh->GetBoundaryTypes(); + std::map ghostCellMap; + std::map ghostCellReflMap; + + double tol = 1e-12; // For distance to boundary + + unsigned nGhostcells = 0; + for( unsigned idx_cell = 0; idx_cell < _mesh->GetNumCells(); idx_cell++ ) { + if( cellBoundaries[idx_cell] == BOUNDARY_TYPE::NEUMANN || cellBoundaries[idx_cell] == BOUNDARY_TYPE::DIRICHLET ) { + nGhostcells++; + } + } + + QuadratureBase* quad = QuadratureBase::Create( _settings ); + VectorVector vq = quad->GetPoints(); + unsigned nq = quad->GetNq(); + + if( _settings->GetQuadName() != QUAD_GaussLegendreTensorized2D ) { + ErrorMessages::Error( "This simplified test case only works with symmetric quadrature orders. Use QUAD_GAUSS_LEGENDRE_TENSORIZED_2D", + CURRENT_FUNCTION ); + } + { // Create the symmetry maps for the quadratures + + for( unsigned idx_q = 0; idx_q < nq; idx_q++ ) { + for( unsigned idx_q2 = 0; idx_q2 < nq; idx_q2++ ) { + if( abs( vq[idx_q][0] + vq[idx_q2][0] ) + abs( vq[idx_q][1] - vq[idx_q2][1] ) < tol ) { + _quadratureYReflection[idx_q] = idx_q2; + break; + } + } + } + } + + if( _quadratureYReflection.size() != nq ) { + ErrorMessages::Error( "Problem with Y symmetry of quadrature of this mesh", CURRENT_FUNCTION ); + } + + Vector right_inflow( nq, 0.0 ); + Vector vertical_flow( nq, 0.0 ); + + for( unsigned idx_q = 0; idx_q < nq; idx_q++ ) { + if( vq[idx_q][0] < 0.0 ) right_inflow[idx_q] = 1.0; + } + + auto nodes = _mesh->GetNodes(); + + for( unsigned idx_cell = 0; idx_cell < _mesh->GetNumCells(); idx_cell++ ) { + if( cellBoundaries[idx_cell] == BOUNDARY_TYPE::NEUMANN || cellBoundaries[idx_cell] == BOUNDARY_TYPE::DIRICHLET ) { + + auto localCellNodes = _mesh->GetCells()[idx_cell]; + + _ghostCellsReflectingY[idx_cell] = false; + for( unsigned idx_node = 0; idx_node < _mesh->GetNumNodesPerCell(); idx_node++ ) { // Check if corner node is in this cell + if( abs( nodes[localCellNodes[idx_node]][1] ) < -3.5 + tol || abs( nodes[localCellNodes[idx_node]][1] ) > 3.5 - tol ) { + // upper and lower boundary + ghostCellMap.insert( { idx_cell, vertical_flow } ); + break; + } + else if( abs( nodes[localCellNodes[idx_node]][0] ) < tol ) { // close to 0 => left boundary + _ghostCellsReflectingY[idx_cell] = true; + ghostCellMap.insert( { idx_cell, vertical_flow } ); + break; + } + else { // right boundary + ghostCellMap.insert( { idx_cell, vertical_flow } ); + break; + } + } + } + } + _ghostCells = ghostCellMap; + + delete quad; +} + +const Vector& HalfLattice_SN::GetGhostCellValue( int idx_cell, const Vector& cell_sol ) { + if( _ghostCellsReflectingY[idx_cell] ) { + for( unsigned idx_sys = 0; idx_sys < cell_sol.size(); idx_sys++ ) { + _ghostCells[idx_cell][idx_sys] = cell_sol[_quadratureYReflection[idx_sys]]; + } + } + return _ghostCells[idx_cell]; +} + +// QOI getter +double HalfLattice_SN::GetCurAbsorptionLattice() { return _curAbsorptionLattice; } +double HalfLattice_SN::GetTotalAbsorptionLattice() { return _totalAbsorptionLattice; } +double HalfLattice_SN::GetMaxAbsorptionLattice() { return _curMaxAbsorptionLattice; } + +// QOI setter +void HalfLattice_SN::ComputeTotalAbsorptionLattice( double dT ) { _totalAbsorptionLattice += _curAbsorptionLattice * dT; } + +void HalfLattice_SN::ComputeCurrentAbsorptionLattice( const Vector& scalarFlux ) { + _curAbsorptionLattice = 0.0; + unsigned nCells = _mesh->GetNumCells(); + auto cellMids = _mesh->GetCellMidPoints(); + std::vector areas = _mesh->GetCellAreas(); + + for( unsigned idx_cell = 0; idx_cell < nCells; idx_cell++ ) { + if( IsAbsorption( cellMids[idx_cell] ) ) { + _curAbsorptionLattice += scalarFlux[idx_cell] * ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ) * areas[idx_cell]; + } + } +} +// TODO all absorption qois can be refactored in one function +void HalfLattice_SN::ComputeMaxAbsorptionLattice( const Vector& scalarFlux ) { + unsigned nCells = _mesh->GetNumCells(); + auto cellMids = _mesh->GetCellMidPoints(); + std::vector areas = _mesh->GetCellAreas(); + + for( unsigned idx_cell = 0; idx_cell < nCells; idx_cell++ ) { + if( IsAbsorption( cellMids[idx_cell] ) ) { + if( _curMaxAbsorptionLattice < scalarFlux[idx_cell] * ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ) ) + _curMaxAbsorptionLattice = scalarFlux[idx_cell] * ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ); + } + } +} + +void HalfLattice_SN::ComputeMaxOrdinatewiseOutflow( const VectorVector& solution ) { + if( _settings->GetSolverName() == SN_SOLVER || _settings->GetSolverName() == CSD_SN_SOLVER ) { + double currOrdinatewiseOutflow = 0.0; + double transportDirection = 0.0; + + auto nCells = _mesh->GetNumCells(); + auto cellMids = _mesh->GetCellMidPoints(); + auto areas = _mesh->GetCellAreas(); + auto neigbors = _mesh->GetNeighbours(); + auto normals = _mesh->GetNormals(); + + auto quadPoints = _quad->GetPoints(); + auto weights = _quad->GetWeights(); + auto nq = _quad->GetNq(); + + // Iterate over boundaries + for( std::map::iterator it = _ghostCells.begin(); it != _ghostCells.end(); ++it ) { + int idx_cell = it->first; // Get Boundary cell index + + if( !_ghostCellsReflectingY[idx_cell] ) { // Only work on non-reflecting boundaries + for( unsigned idx_nbr = 0; idx_nbr < neigbors[idx_cell].size(); ++idx_nbr ) { + // Find face that points outward + if( neigbors[idx_cell][idx_nbr] == nCells ) { + // Iterate over transport directions + for( unsigned idx_quad = 0; idx_quad < nq; ++idx_quad ) { + transportDirection = + normals[idx_cell][idx_nbr][0] * quadPoints[idx_quad][0] + normals[idx_cell][idx_nbr][1] * quadPoints[idx_quad][1]; + // Find outward facing transport directions + if( transportDirection > 0.0 ) { + + currOrdinatewiseOutflow = transportDirection / norm( normals[idx_cell][idx_nbr] ) * solution[idx_cell][idx_quad]; + + if( currOrdinatewiseOutflow > _curMaxOrdinateOutflow ) _curMaxOrdinateOutflow = currOrdinatewiseOutflow; + } + } + } + } + } + } + } + // TODO define alternative for Moment solvers +} + +void HalfLattice_SN::ComputeCurrentOutflow( const VectorVector& solution ) { + if( _settings->GetSolverName() == SN_SOLVER || _settings->GetSolverName() == CSD_SN_SOLVER ) { + + _curScalarOutflow = 0.0; + double transportDirection = 0.0; + + auto nCells = _mesh->GetNumCells(); + auto cellMids = _mesh->GetCellMidPoints(); + auto areas = _mesh->GetCellAreas(); + auto neigbors = _mesh->GetNeighbours(); + auto normals = _mesh->GetNormals(); + + auto quadPoints = _quad->GetPoints(); + auto weights = _quad->GetWeights(); + auto nq = _quad->GetNq(); + + // Iterate over boundaries + for( std::map::iterator it = _ghostCells.begin(); it != _ghostCells.end(); ++it ) { + int idx_cell = it->first; // Get Boundary cell index + + // Iterate over face cell faces + if( !_ghostCellsReflectingY[idx_cell] ) { // Only work on non-reflecting boundaries + for( unsigned idx_nbr = 0; idx_nbr < neigbors[idx_cell].size(); ++idx_nbr ) { + // Find face that points outward + if( neigbors[idx_cell][idx_nbr] == nCells ) { + // Iterate over transport directions + for( unsigned idx_quad = 0; idx_quad < nq; ++idx_quad ) { + transportDirection = + normals[idx_cell][idx_nbr][0] * quadPoints[idx_quad][0] + normals[idx_cell][idx_nbr][1] * quadPoints[idx_quad][1]; + // Find outward facing transport directions + if( transportDirection > 0.0 ) { + _curScalarOutflow += transportDirection * solution[idx_cell][idx_quad] * weights[idx_quad]; // Integrate flux + } + } + } + } + } + } + } + // TODO define alternative for Moment solvers +} + +// ---- Checkerboard Moments ---- + +// Constructor for checkerboard case with Pn +HalfLattice_Moment::HalfLattice_Moment( Config* settings, Mesh* mesh, QuadratureBase* quad ) : ProblemBase( settings, mesh, quad ) { + + // Initialise crosssections = 1 (scattering) + _sigmaS = Vector( _mesh->GetNumCells(), 1.0 ); + _sigmaT = Vector( _mesh->GetNumCells(), 1.0 ); + + // for absorption regions change crosssections to all absorption + auto cellMids = _mesh->GetCellMidPoints(); + for( unsigned j = 0; j < cellMids.size(); ++j ) { + if( isAbsorption( cellMids[j] ) ) { + _sigmaS[j] = 0.0; + _sigmaT[j] = 10.0; + } + } +} + +HalfLattice_Moment::~HalfLattice_Moment() {} + +VectorVector HalfLattice_Moment::GetScatteringXS( const Vector& /*energies*/ ) { return VectorVector( 1u, _sigmaS ); } + +VectorVector HalfLattice_Moment::GetTotalXS( const Vector& /*energies*/ ) { return VectorVector( 1u, _sigmaT ); } + +std::vector HalfLattice_Moment::GetExternalSource( const Vector& /*energies*/ ) { + // In case of PN, spherical basis is per default SPHERICAL_HARMONICS + + double integrationFactor = ( 4 * M_PI ); + if( _settings->GetDim() == 2 ) { + integrationFactor = M_PI; + } + SphericalBase* tempBase = SphericalBase::Create( _settings ); + unsigned ntotalEquations = tempBase->GetBasisSize(); + + VectorVector Q( _mesh->GetNumCells(), Vector( ntotalEquations, 0.0 ) ); // zero could lead to problems? + VectorVector cellMids = _mesh->GetCellMidPoints(); + + Vector uIC( ntotalEquations, 0 ); + + if( _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS ) { + QuadratureBase* quad = QuadratureBase::Create( _settings ); + VectorVector quadPointsSphere = quad->GetPointsSphere(); + Vector w = quad->GetWeights(); + + double my, phi; + VectorVector moments = VectorVector( quad->GetNq(), Vector( tempBase->GetBasisSize(), 0.0 ) ); + + for( unsigned idx_quad = 0; idx_quad < quad->GetNq(); idx_quad++ ) { + my = quadPointsSphere[idx_quad][0]; + phi = quadPointsSphere[idx_quad][1]; + moments[idx_quad] = tempBase->ComputeSphericalBasis( my, phi ); + } + // Integrate <1*m> to get factors for monomial basis in isotropic scattering + for( unsigned idx_quad = 0; idx_quad < quad->GetNq(); idx_quad++ ) { + uIC += w[idx_quad] * moments[idx_quad]; + } + delete quad; + } + double kinetic_density = _settings->GetSourceMagnitude(); + for( unsigned j = 0; j < cellMids.size(); ++j ) { + if( isSource( cellMids[j] ) ) { + if( _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS ) { + Q[j] = kinetic_density * uIC / uIC[0] / integrationFactor; // Remember scaling + } + if( _settings->GetSphericalBasisName() == SPHERICAL_HARMONICS ) { + Q[j][0] = kinetic_density / integrationFactor; // first bassis function is 1/ ( 4 * M_PI ) + } + } + } + delete tempBase; // Only temporally needed + return std::vector( 1u, Q ); +} + +VectorVector HalfLattice_Moment::SetupIC() { + double integrationFactor = ( 4 * M_PI ); + if( _settings->GetDim() == 2 ) { + integrationFactor = M_PI; + } + // In case of PN, spherical basis is per default SPHERICAL_HARMONICS + SphericalBase* tempBase = SphericalBase::Create( _settings ); + unsigned ntotalEquations = tempBase->GetBasisSize(); + + VectorVector initialSolution( _mesh->GetNumCells(), Vector( ntotalEquations, 0 ) ); // zero could lead to problems? + VectorVector cellMids = _mesh->GetCellMidPoints(); + + Vector tempIC( ntotalEquations, 0 ); + + if( _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS ) { + QuadratureBase* quad = QuadratureBase::Create( _settings ); + VectorVector quadPointsSphere = quad->GetPointsSphere(); + Vector w = quad->GetWeights(); + + double my, phi; + VectorVector moments = VectorVector( quad->GetNq(), Vector( tempBase->GetBasisSize(), 0.0 ) ); + + for( unsigned idx_quad = 0; idx_quad < quad->GetNq(); idx_quad++ ) { + my = quadPointsSphere[idx_quad][0]; + phi = quadPointsSphere[idx_quad][1]; + moments[idx_quad] = tempBase->ComputeSphericalBasis( my, phi ); + } + // Integrate <1*m> to get factors for monomial basis in isotropic scattering + for( unsigned idx_quad = 0; idx_quad < quad->GetNq(); idx_quad++ ) { + tempIC += w[idx_quad] * moments[idx_quad]; + } + delete quad; + } + // Initial condition is dirac impulse at (x,y) = (0,0) ==> constant in angle ==> all moments - exept first - are zero. + double kinetic_density = 1e-4; + for( unsigned j = 0; j < cellMids.size(); ++j ) { + if( _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS ) { + initialSolution[j] = kinetic_density * tempIC / tempIC[0] / integrationFactor; // Remember scaling + } + if( _settings->GetSphericalBasisName() == SPHERICAL_HARMONICS ) { + initialSolution[j][0] = kinetic_density / integrationFactor; // first bassis function is 1/ ( 4 * M_PI ) + } + } + delete tempBase; // Only temporally needed + return initialSolution; +} + +bool HalfLattice_Moment::isAbsorption( const Vector& pos ) const { + // Check whether pos is in absorption region + double xy_corrector = -3.5; + std::vector lbounds{ 1 + xy_corrector, 2 + xy_corrector, 3 + xy_corrector, 4 + xy_corrector, 5 + xy_corrector }; + std::vector ubounds{ 2 + xy_corrector, 3 + xy_corrector, 4 + xy_corrector, 5 + xy_corrector, 6 + xy_corrector }; + for( unsigned k = 0; k < lbounds.size(); ++k ) { + for( unsigned l = 0; l < lbounds.size(); ++l ) { + if( ( l + k ) % 2 == 1 || ( k == 2 && l == 2 ) || ( k == 2 && l == 4 ) ) continue; + if( pos[0] >= lbounds[k] && pos[0] <= ubounds[k] && pos[1] >= lbounds[l] && pos[1] <= ubounds[l] ) { + return true; + } + } + } + return false; +} + +bool HalfLattice_Moment::isSource( const Vector& pos ) const { + // Check whether pos is in source region + if( pos[0] >= 3 - 3.5 && pos[0] <= 4 - 3.5 && pos[1] >= 3 - 3.5 && pos[1] <= 4 - 3.5 ) + return true; + else + return false; +} diff --git a/src/problems/hohlraum.cpp b/src/problems/hohlraum.cpp index 200ff3a2..19206993 100644 --- a/src/problems/hohlraum.cpp +++ b/src/problems/hohlraum.cpp @@ -11,9 +11,9 @@ #include "velocitybasis/sphericalbase.hpp" #include "velocitybasis/sphericalharmonics.hpp" -Hohlraum::Hohlraum( Config* settings, Mesh* mesh ) : ProblemBase( settings, mesh ) { - _scatteringXS = Vector( _mesh->GetNumCells(), 0.1 ); // white area default - _totalXS = Vector( _mesh->GetNumCells(), 0.1 ); // white area default +Hohlraum::Hohlraum( Config* settings, Mesh* mesh, QuadratureBase* quad ) : ProblemBase( settings, mesh, quad ) { + _sigmaS = Vector( _mesh->GetNumCells(), 0.1 ); // white area default + _sigmaT = Vector( _mesh->GetNumCells(), 0.1 ); // white area default #pragma omp parallel for for( unsigned idx_cell = 0; idx_cell < _mesh->GetNumCells(); idx_cell++ ) { @@ -21,40 +21,40 @@ Hohlraum::Hohlraum( Config* settings, Mesh* mesh ) : ProblemBase( settings, mesh double y = _mesh->GetCellMidPoints()[idx_cell][1]; // red area if( x < 0.05 && y > 0.25 && y < 1.05 ) { - _scatteringXS[idx_cell] = 95.0; - _totalXS[idx_cell] = 100.0; + _sigmaS[idx_cell] = 95.0; + _sigmaT[idx_cell] = 100.0; } // green area 1 if( x > 0.45 && x < 0.85 && y > 0.25 && y < 0.3 ) { - _scatteringXS[idx_cell] = 90.0; - _totalXS[idx_cell] = 100.0; + _sigmaS[idx_cell] = 90.0; + _sigmaT[idx_cell] = 100.0; } // green area 2 if( x > 0.45 && x < 0.85 && y > 1.0 && y < 1.05 ) { - _scatteringXS[idx_cell] = 90.0; - _totalXS[idx_cell] = 100.0; + _sigmaS[idx_cell] = 90.0; + _sigmaT[idx_cell] = 100.0; } // green area 3 if( x > 0.45 && x < 0.5 && y > 0.25 && y < 1.05 ) { - _scatteringXS[idx_cell] = 90.0; - _totalXS[idx_cell] = 100.0; + _sigmaS[idx_cell] = 90.0; + _sigmaT[idx_cell] = 100.0; } // black area if( x > 0.5 && x < 0.85 && y > 0.3 && y < 1.0 ) { - _scatteringXS[idx_cell] = 50.0; - _totalXS[idx_cell] = 100.0; + _sigmaS[idx_cell] = 50.0; + _sigmaT[idx_cell] = 100.0; } // blue area if( x > 1.25 || y < 0.05 || y > 1.25 ) { - _scatteringXS[idx_cell] = 0.0; - _totalXS[idx_cell] = 100.0; + _sigmaS[idx_cell] = 0.0; + _sigmaT[idx_cell] = 100.0; } } } Hohlraum::~Hohlraum() {} -std::vector Hohlraum::GetExternalSource( const Vector& energies ) { +std::vector Hohlraum::GetExternalSource( const Vector& /*energies*/ ) { VectorVector Q( _mesh->GetNumCells(), Vector( 1u, 0.0 ) ); auto cellMids = _mesh->GetCellMidPoints(); #pragma omp parallel for @@ -84,15 +84,15 @@ VectorVector Hohlraum::SetupIC() { return psi; } -VectorVector Hohlraum::GetScatteringXS( const Vector& energies ) { return VectorVector( energies.size(), _scatteringXS ); } +VectorVector Hohlraum::GetScatteringXS( const Vector& /*energies*/ ) { return VectorVector( 1u, _sigmaS ); } -VectorVector Hohlraum::GetTotalXS( const Vector& energies ) { return VectorVector( energies.size(), _totalXS ); } +VectorVector Hohlraum::GetTotalXS( const Vector& /*energies*/ ) { return VectorVector( 1u, _sigmaT ); } -Hohlraum_Moment::Hohlraum_Moment( Config* settings, Mesh* mesh ) : Hohlraum( settings, mesh ) {} +Hohlraum_Moment::Hohlraum_Moment( Config* settings, Mesh* mesh, QuadratureBase* quad ) : Hohlraum( settings, mesh, quad ) {} Hohlraum_Moment::~Hohlraum_Moment() {} -std::vector Hohlraum_Moment::GetExternalSource( const Vector& energies ) { +std::vector Hohlraum_Moment::GetExternalSource( const Vector& /*energies*/ ) { // In case of PN, spherical basis is per default SPHERICAL_HARMONICS double integrationFactor = ( 4 * M_PI ); diff --git a/src/problems/lattice.cpp b/src/problems/lattice.cpp new file mode 100644 index 00000000..f742f296 --- /dev/null +++ b/src/problems/lattice.cpp @@ -0,0 +1,324 @@ +#include "problems/lattice.hpp" +#include "common/config.hpp" +#include "common/mesh.hpp" +#include "quadratures/quadraturebase.hpp" +#include "toolboxes/textprocessingtoolbox.hpp" +#include "velocitybasis/sphericalbase.hpp" +#include "velocitybasis/sphericalharmonics.hpp" + +// ---- Checkerboard Sn ---- +// Constructor for Ckeckerboard case with Sn +Lattice_SN::Lattice_SN( Config* settings, Mesh* mesh, QuadratureBase* quad ) : ProblemBase( settings, mesh, quad ) { + + // Initialise scattering crosssections to 1 and absorption cross sections to 0 + _sigmaS = Vector( _mesh->GetNumCells(), 1. ); + _sigmaT = Vector( _mesh->GetNumCells(), 1. ); + + // Initialize Quantities of interest + _curAbsorptionLattice = 0.0; + _curMaxAbsorptionLattice = 0.0; + _totalAbsorptionLattice = 0.0; + + if( _settings->GetNLatticeAbsIndividual() == 49 && _settings->GetNLatticeScatterIndividual() == 49 ) { // Individual values set + // auto log = spdlog::get( "event" ); + // log->info( "| " ); + // log->info( "| Lattice test case WITH individual scattering and absorption values for each block. " ); + + auto cellMids = _mesh->GetCellMidPoints(); + + std::vector scatteringValues = _settings->GetLatticeScatterIndividual(); + std::vector absorptionValues = _settings->GetLatticeAbsorptionIndividual(); + + for( unsigned j = 0; j < cellMids.size(); ++j ) { + _sigmaS[j] = scatteringValues[GetBlockID( cellMids[j] )]; + _sigmaT[j] = absorptionValues[GetBlockID( cellMids[j] )] + scatteringValues[GetBlockID( cellMids[j] )]; + } + } + else { + // auto log = spdlog::get( "event" ); + // log->info( "| " ); + // log->info( "| Lattice test case WITHOUT individual scattering and absorption values for each block. " ); + // For absorption cells: set scattering XS to 0 and absorption to 10 + auto cellMids = _mesh->GetCellMidPoints(); + for( unsigned j = 0; j < cellMids.size(); ++j ) { + if( IsAbsorption( cellMids[j] ) ) { + _sigmaS[j] = 0.0; + _sigmaT[j] = _settings->GetLatticeAbsBlue(); + } + else if( !IsSource( cellMids[j] ) ) { // White block + _sigmaS[j] = _settings->GetLatticeScatterWhite(); + _sigmaT[j] = _settings->GetLatticeScatterWhite(); + } + } + } + + SetGhostCells(); +} + +Lattice_SN::~Lattice_SN() {} + +VectorVector Lattice_SN::GetScatteringXS( const Vector& /*energies */ ) { return VectorVector( 1u, _sigmaS ); } + +VectorVector Lattice_SN::GetTotalXS( const Vector& /*energies */ ) { return VectorVector( 1u, _sigmaT ); } + +std::vector Lattice_SN::GetExternalSource( const Vector& /*energies*/ ) { + VectorVector Q( _mesh->GetNumCells(), Vector( 1u, 0.0 ) ); + auto cellMids = _mesh->GetCellMidPoints(); + for( unsigned j = 0; j < cellMids.size(); ++j ) { + if( IsSource( cellMids[j] ) ) Q[j] = _settings->GetSourceMagnitude(); // isotropic source + } + return std::vector( 1u, Q ); +} + +VectorVector Lattice_SN::SetupIC() { + VectorVector psi( _mesh->GetNumCells(), Vector( _settings->GetNQuadPoints(), 0.0 ) ); + return psi; +} + +bool Lattice_SN::IsAbsorption( const Vector& pos ) const { + // Check whether pos is inside absorbing squares + double xy_corrector = -3.5; + std::vector lbounds{ 1 + xy_corrector, 2 + xy_corrector, 3 + xy_corrector, 4 + xy_corrector, 5 + xy_corrector }; + std::vector ubounds{ 2 + xy_corrector, 3 + xy_corrector, 4 + xy_corrector, 5 + xy_corrector, 6 + xy_corrector }; + for( unsigned k = 0; k < lbounds.size(); ++k ) { + for( unsigned l = 0; l < lbounds.size(); ++l ) { + if( ( l + k ) % 2 == 1 || ( k == 2 && l == 2 ) || ( k == 2 && l == 4 ) ) continue; + if( pos[0] >= lbounds[k] && pos[0] <= ubounds[k] && pos[1] >= lbounds[l] && pos[1] <= ubounds[l] ) { + return true; + } + } + } + return false; +} + +bool Lattice_SN::IsAbsorption( double x, double y ) const { + // Check whether pos is inside absorbing squares + double xy_corrector = -3.5; + std::vector lbounds{ 1 + xy_corrector, 2 + xy_corrector, 3 + xy_corrector, 4 + xy_corrector, 5 + xy_corrector }; + std::vector ubounds{ 2 + xy_corrector, 3 + xy_corrector, 4 + xy_corrector, 5 + xy_corrector, 6 + xy_corrector }; + for( unsigned k = 0; k < lbounds.size(); ++k ) { + for( unsigned l = 0; l < lbounds.size(); ++l ) { + if( ( l + k ) % 2 == 1 || ( k == 2 && l == 2 ) || ( k == 2 && l == 4 ) ) continue; + if( x >= lbounds[k] && x <= ubounds[k] && y >= lbounds[l] && y <= ubounds[l] ) { + return true; + } + } + } + return false; +} + +unsigned Lattice_SN::GetBlockID( const Vector& pos ) const { + double xy_corrector = 3.5; + int block_x = int( pos[0] + xy_corrector ); + int block_y = int( pos[1] + xy_corrector ); + return (unsigned)( block_y * 7 + block_x ); +} + +bool Lattice_SN::IsSource( const Vector& pos ) const { + // Check whether pos is part of source region + if( pos[0] >= 3 - 3.5 && pos[0] <= 4 - 3.5 && pos[1] >= 3 - 3.5 && pos[1] <= 4 - 3.5 ) + return true; + else + return false; +} + +void Lattice_SN::SetGhostCells() { + // Loop over all cells. If its a Dirichlet boundary, add cell to dict with {cell_idx, boundary_value} + auto cellBoundaries = _mesh->GetBoundaryTypes(); + std::map ghostCellMap; + + QuadratureBase* quad = QuadratureBase::Create( _settings ); + VectorVector vq = quad->GetPoints(); + unsigned nq = quad->GetNq(); + + Vector void_ghostcell( nq, 0.0 ); + + for( unsigned idx_cell = 0; idx_cell < _mesh->GetNumCells(); idx_cell++ ) { + if( cellBoundaries[idx_cell] == BOUNDARY_TYPE::NEUMANN || cellBoundaries[idx_cell] == BOUNDARY_TYPE::DIRICHLET ) { + ghostCellMap[idx_cell] = void_ghostcell; + } + } + _ghostCells = ghostCellMap; + + delete quad; +} + +const Vector& Lattice_SN::GetGhostCellValue( int idx_cell, const Vector& /* cell_sol */ ) { return _ghostCells[idx_cell]; } + +// QOI getter +double Lattice_SN::GetCurAbsorptionLattice() { return _curAbsorptionLattice; } +double Lattice_SN::GetTotalAbsorptionLattice() { return _totalAbsorptionLattice; } +double Lattice_SN::GetMaxAbsorptionLattice() { return _curMaxAbsorptionLattice; } +// QOI setter +void Lattice_SN::ComputeTotalAbsorptionLattice( double dT ) { _totalAbsorptionLattice += _curAbsorptionLattice * dT; } + +void Lattice_SN::ComputeCurrentAbsorptionLattice( const Vector& scalarFlux ) { + _curAbsorptionLattice = 0.0; + unsigned nCells = _mesh->GetNumCells(); + auto cellMids = _mesh->GetCellMidPoints(); + std::vector areas = _mesh->GetCellAreas(); + + for( unsigned idx_cell = 0; idx_cell < nCells; idx_cell++ ) { + if( IsAbsorption( cellMids[idx_cell] ) ) { + _curAbsorptionLattice += scalarFlux[idx_cell] * ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ) * areas[idx_cell]; + } + } +} +// TODO all absorption qois can be refactored in one function +void Lattice_SN::ComputeMaxAbsorptionLattice( const Vector& scalarFlux ) { + unsigned nCells = _mesh->GetNumCells(); + auto cellMids = _mesh->GetCellMidPoints(); + std::vector areas = _mesh->GetCellAreas(); + + for( unsigned idx_cell = 0; idx_cell < nCells; idx_cell++ ) { + if( IsAbsorption( cellMids[idx_cell] ) ) { + if( _curMaxAbsorptionLattice < scalarFlux[idx_cell] * ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ) ) + _curMaxAbsorptionLattice = scalarFlux[idx_cell] * ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ); + } + } +} + +// ---- Checkerboard Moments ---- + +// Constructor for checkerboard case with Pn +Lattice_Moment::Lattice_Moment( Config* settings, Mesh* mesh, QuadratureBase* quad ) : ProblemBase( settings, mesh, quad ) { + + // Initialise crosssections = 1 (scattering) + _sigmaS = Vector( _mesh->GetNumCells(), 1.0 ); + _sigmaT = Vector( _mesh->GetNumCells(), 1.0 ); + + // for absorption regions change crosssections to all absorption + auto cellMids = _mesh->GetCellMidPoints(); + for( unsigned j = 0; j < cellMids.size(); ++j ) { + if( isAbsorption( cellMids[j] ) ) { + _sigmaS[j] = 0.0; + _sigmaT[j] = 10.0; + } + } +} + +Lattice_Moment::~Lattice_Moment() {} + +VectorVector Lattice_Moment::GetScatteringXS( const Vector& /*energies*/ ) { return VectorVector( 1u, _sigmaS ); } + +VectorVector Lattice_Moment::GetTotalXS( const Vector& /*energies*/ ) { return VectorVector( 1u, _sigmaT ); } + +std::vector Lattice_Moment::GetExternalSource( const Vector& /*energies*/ ) { + // In case of PN, spherical basis is per default SPHERICAL_HARMONICS + + double integrationFactor = ( 4 * M_PI ); + if( _settings->GetDim() == 2 ) { + integrationFactor = M_PI; + } + SphericalBase* tempBase = SphericalBase::Create( _settings ); + unsigned ntotalEquations = tempBase->GetBasisSize(); + + VectorVector Q( _mesh->GetNumCells(), Vector( ntotalEquations, 0.0 ) ); // zero could lead to problems? + VectorVector cellMids = _mesh->GetCellMidPoints(); + + Vector uIC( ntotalEquations, 0 ); + + if( _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS ) { + QuadratureBase* quad = QuadratureBase::Create( _settings ); + VectorVector quadPointsSphere = quad->GetPointsSphere(); + Vector w = quad->GetWeights(); + + double my, phi; + VectorVector moments = VectorVector( quad->GetNq(), Vector( tempBase->GetBasisSize(), 0.0 ) ); + + for( unsigned idx_quad = 0; idx_quad < quad->GetNq(); idx_quad++ ) { + my = quadPointsSphere[idx_quad][0]; + phi = quadPointsSphere[idx_quad][1]; + moments[idx_quad] = tempBase->ComputeSphericalBasis( my, phi ); + } + // Integrate <1*m> to get factors for monomial basis in isotropic scattering + for( unsigned idx_quad = 0; idx_quad < quad->GetNq(); idx_quad++ ) { + uIC += w[idx_quad] * moments[idx_quad]; + } + delete quad; + } + double kinetic_density = _settings->GetSourceMagnitude(); + for( unsigned j = 0; j < cellMids.size(); ++j ) { + if( isSource( cellMids[j] ) ) { + if( _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS ) { + Q[j] = kinetic_density * uIC / uIC[0] / integrationFactor; // Remember scaling + } + if( _settings->GetSphericalBasisName() == SPHERICAL_HARMONICS ) { + Q[j][0] = kinetic_density / integrationFactor; // first bassis function is 1/ ( 4 * M_PI ) + } + } + } + delete tempBase; // Only temporally needed + return std::vector( 1u, Q ); +} + +VectorVector Lattice_Moment::SetupIC() { + double integrationFactor = ( 4 * M_PI ); + if( _settings->GetDim() == 2 ) { + integrationFactor = M_PI; + } + // In case of PN, spherical basis is per default SPHERICAL_HARMONICS + SphericalBase* tempBase = SphericalBase::Create( _settings ); + unsigned ntotalEquations = tempBase->GetBasisSize(); + + VectorVector initialSolution( _mesh->GetNumCells(), Vector( ntotalEquations, 0 ) ); // zero could lead to problems? + VectorVector cellMids = _mesh->GetCellMidPoints(); + + Vector tempIC( ntotalEquations, 0 ); + + if( _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS ) { + QuadratureBase* quad = QuadratureBase::Create( _settings ); + VectorVector quadPointsSphere = quad->GetPointsSphere(); + Vector w = quad->GetWeights(); + + double my, phi; + VectorVector moments = VectorVector( quad->GetNq(), Vector( tempBase->GetBasisSize(), 0.0 ) ); + + for( unsigned idx_quad = 0; idx_quad < quad->GetNq(); idx_quad++ ) { + my = quadPointsSphere[idx_quad][0]; + phi = quadPointsSphere[idx_quad][1]; + moments[idx_quad] = tempBase->ComputeSphericalBasis( my, phi ); + } + // Integrate <1*m> to get factors for monomial basis in isotropic scattering + for( unsigned idx_quad = 0; idx_quad < quad->GetNq(); idx_quad++ ) { + tempIC += w[idx_quad] * moments[idx_quad]; + } + delete quad; + } + // Initial condition is dirac impulse at (x,y) = (0,0) ==> constant in angle ==> all moments - exept first - are zero. + double kinetic_density = 1e-4; + for( unsigned j = 0; j < cellMids.size(); ++j ) { + if( _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS ) { + initialSolution[j] = kinetic_density * tempIC / tempIC[0] / integrationFactor; // Remember scaling + } + if( _settings->GetSphericalBasisName() == SPHERICAL_HARMONICS ) { + initialSolution[j][0] = kinetic_density / integrationFactor; // first bassis function is 1/ ( 4 * M_PI ) + } + } + delete tempBase; // Only temporally needed + return initialSolution; +} + +bool Lattice_Moment::isAbsorption( const Vector& pos ) const { + // Check whether pos is in absorption region + double xy_corrector = -3.5; + std::vector lbounds{ 1 + xy_corrector, 2 + xy_corrector, 3 + xy_corrector, 4 + xy_corrector, 5 + xy_corrector }; + std::vector ubounds{ 2 + xy_corrector, 3 + xy_corrector, 4 + xy_corrector, 5 + xy_corrector, 6 + xy_corrector }; + for( unsigned k = 0; k < lbounds.size(); ++k ) { + for( unsigned l = 0; l < lbounds.size(); ++l ) { + if( ( l + k ) % 2 == 1 || ( k == 2 && l == 2 ) || ( k == 2 && l == 4 ) ) continue; + if( pos[0] >= lbounds[k] && pos[0] <= ubounds[k] && pos[1] >= lbounds[l] && pos[1] <= ubounds[l] ) { + return true; + } + } + } + return false; +} + +bool Lattice_Moment::isSource( const Vector& pos ) const { + // Check whether pos is in source region + if( pos[0] >= 3 - 3.5 && pos[0] <= 4 - 3.5 && pos[1] >= 3 - 3.5 && pos[1] <= 4 - 3.5 ) + return true; + else + return false; +} diff --git a/src/problems/linesource.cpp b/src/problems/linesource.cpp index 23505735..94d70b61 100644 --- a/src/problems/linesource.cpp +++ b/src/problems/linesource.cpp @@ -8,10 +8,22 @@ // ---- Linesource ---- -LineSource::LineSource( Config* settings, Mesh* mesh ) : ProblemBase( settings, mesh ) { _sigmaS = settings->GetSigmaS(); } +LineSource::LineSource( Config* settings, Mesh* mesh, QuadratureBase* quad ) : ProblemBase( settings, mesh, quad ) { + _sigmaS = Vector( _mesh->GetNumCells(), _settings->GetSigmaS() ); + _sigmaT = Vector( _mesh->GetNumCells(), _settings->GetSigmaS() ); +} LineSource::~LineSource() {} +VectorVector LineSource::GetScatteringXS( const Vector& /*energies*/ ) { return VectorVector( 1u, _sigmaS ); } + +VectorVector LineSource::GetTotalXS( const Vector& /*energies*/ ) { return VectorVector( 1u, _sigmaS ); } + +std::vector LineSource::GetExternalSource( const Vector& /*energies*/ ) { + VectorVector Q( _mesh->GetNumCells(), Vector( 1u, 0.0 ) ); + return std::vector( 1u, Q ); +} + double LineSource::GetAnalyticalSolution( double x, double y, double t, double /*sigma_s*/ ) { double solution = 0.0; @@ -106,20 +118,10 @@ double LineSource::HelperIntRho_ptc2( double t, double gamma ) { // ---- LineSource_SN ---- -LineSource_SN::LineSource_SN( Config* settings, Mesh* mesh ) : LineSource( settings, mesh ) {} +LineSource_SN::LineSource_SN( Config* settings, Mesh* mesh, QuadratureBase* quad ) : LineSource( settings, mesh, quad ) {} LineSource_SN::~LineSource_SN() {} -VectorVector LineSource_SN::GetScatteringXS( const Vector& energies ) { - return VectorVector( energies.size(), Vector( _mesh->GetNumCells(), _sigmaS ) ); -} - -VectorVector LineSource_SN::GetTotalXS( const Vector& energies ) { return VectorVector( energies.size(), Vector( _mesh->GetNumCells(), _sigmaS ) ); } - -std::vector LineSource_SN::GetExternalSource( const Vector& /*energies*/ ) { - return std::vector( 1u, std::vector( _mesh->GetNumCells(), Vector( 1u, 0.0 ) ) ); -} - VectorVector LineSource_SN::SetupIC() { VectorVector psi( _mesh->GetNumCells(), Vector( _settings->GetNQuadPoints(), 1e-10 ) ); auto cellMids = _mesh->GetCellMidPoints(); @@ -134,18 +136,10 @@ VectorVector LineSource_SN::SetupIC() { // ---- LineSource_PN ---- -LineSource_Moment::LineSource_Moment( Config* settings, Mesh* mesh ) : LineSource( settings, mesh ) {} +LineSource_Moment::LineSource_Moment( Config* settings, Mesh* mesh, QuadratureBase* quad ) : LineSource( settings, mesh, quad ) {} LineSource_Moment::~LineSource_Moment() {} -VectorVector LineSource_Moment::GetScatteringXS( const Vector& energies ) { - return VectorVector( energies.size(), Vector( _mesh->GetNumCells(), _sigmaS ) ); -} - -VectorVector LineSource_Moment::GetTotalXS( const Vector& energies ) { - return VectorVector( energies.size(), Vector( _mesh->GetNumCells(), _sigmaS ) ); -} - std::vector LineSource_Moment::GetExternalSource( const Vector& /*energies*/ ) { SphericalBase* tempBase = SphericalBase::Create( _settings ); unsigned ntotalEquations = tempBase->GetBasisSize(); @@ -209,7 +203,7 @@ VectorVector LineSource_Moment::SetupIC() { // ---- LineSource SN pseudo1D ---- -LineSource_SN_1D::LineSource_SN_1D( Config* settings, Mesh* mesh ) : LineSource_SN( settings, mesh ) {} +LineSource_SN_1D::LineSource_SN_1D( Config* settings, Mesh* mesh, QuadratureBase* quad ) : LineSource_SN( settings, mesh, quad ) {} VectorVector LineSource_SN_1D::SetupIC() { VectorVector psi( _mesh->GetNumCells(), Vector( _settings->GetNQuadPoints(), 1e-10 ) ); @@ -227,7 +221,7 @@ VectorVector LineSource_SN_1D::SetupIC() { // ---- LineSource Moment pseudo1D ---- -LineSource_Moment_1D::LineSource_Moment_1D( Config* settings, Mesh* mesh ) : LineSource_Moment( settings, mesh ) {} +LineSource_Moment_1D::LineSource_Moment_1D( Config* settings, Mesh* mesh, QuadratureBase* quad ) : LineSource_Moment( settings, mesh, quad ) {} VectorVector LineSource_Moment_1D::SetupIC() { double t = 3.2e-4; // pseudo time for gaussian smoothing (Approx to dirac impulse) @@ -280,7 +274,7 @@ VectorVector LineSource_Moment_1D::SetupIC() { for( unsigned j = 0; j < cellMids.size(); ++j ) { double x = cellMids[j][0]; double kinetic_density = std::max( 1.0 / ( 4.0 * M_PI * t ) * std::exp( -( x * x ) / ( 4 * t ) ), epsilon ); - if( _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS || _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS_ROTATED) { + if( _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS || _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS_ROTATED ) { initialSolution[j] = kinetic_density * uIC / uIC[0]; // Remember scaling } if( _settings->GetSphericalBasisName() == SPHERICAL_HARMONICS ) { diff --git a/src/problems/meltingcube.cpp b/src/problems/meltingcube.cpp index a596abc3..02f4e401 100644 --- a/src/problems/meltingcube.cpp +++ b/src/problems/meltingcube.cpp @@ -8,7 +8,9 @@ // ---- Linesource ---- -MeltingCube::MeltingCube( Config* settings, Mesh* mesh ) : ProblemBase( settings, mesh ) { _sigmaS = settings->GetSigmaS(); } +MeltingCube::MeltingCube( Config* settings, Mesh* mesh, QuadratureBase* quad ) : ProblemBase( settings, mesh, quad ) { + _sigmaS = settings->GetSigmaS(); +} MeltingCube::~MeltingCube() {} @@ -24,7 +26,7 @@ std::vector MeltingCube::GetExternalSource( const Vector& /*energi // ---- MeltingCube_SN ---- -MeltingCube_SN::MeltingCube_SN( Config* settings, Mesh* mesh ) : MeltingCube( settings, mesh ) {} +MeltingCube_SN::MeltingCube_SN( Config* settings, Mesh* mesh, QuadratureBase* quad ) : MeltingCube( settings, mesh, quad ) {} MeltingCube_SN::~MeltingCube_SN() {} @@ -34,8 +36,7 @@ VectorVector MeltingCube_SN::SetupIC() { double kinetic_density = 0.0; double epsilon = 1e-3; // minimal value for first moment to avoid div by zero error for( unsigned j = 0; j < cellMids.size(); ++j ) { - double x = cellMids[j][0]; - double y = cellMids[j][1]; + if( norm( cellMids[j] ) < 0.4 ) { kinetic_density = std::max( 0.2 * std::cos( norm( cellMids[j] ) * 4 ) * std::cos( norm( cellMids[j] ) * 4.0 ), epsilon ); } @@ -49,7 +50,7 @@ VectorVector MeltingCube_SN::SetupIC() { // ---- LineSource_PN ---- -MeltingCube_Moment::MeltingCube_Moment( Config* settings, Mesh* mesh ) : MeltingCube( settings, mesh ) {} +MeltingCube_Moment::MeltingCube_Moment( Config* settings, Mesh* mesh, QuadratureBase* quad ) : MeltingCube( settings, mesh, quad ) {} MeltingCube_Moment::~MeltingCube_Moment() {} @@ -108,7 +109,7 @@ VectorVector MeltingCube_Moment::SetupIC() { // ---- LineSource SN pseudo1D ---- -MeltingCube_SN_1D::MeltingCube_SN_1D( Config* settings, Mesh* mesh ) : MeltingCube( settings, mesh ) {} +MeltingCube_SN_1D::MeltingCube_SN_1D( Config* settings, Mesh* mesh, QuadratureBase* quad ) : MeltingCube( settings, mesh, quad ) {} MeltingCube_SN_1D::~MeltingCube_SN_1D() {} @@ -135,13 +136,13 @@ VectorVector MeltingCube_SN_1D::SetupIC() { // ---- LineSource Moment pseudo1D ---- -MeltingCube_Moment_1D::MeltingCube_Moment_1D( Config* settings, Mesh* mesh ) : MeltingCube( settings, mesh ) {} +MeltingCube_Moment_1D::MeltingCube_Moment_1D( Config* settings, Mesh* mesh, QuadratureBase* quad ) : MeltingCube( settings, mesh, quad ) {} MeltingCube_Moment_1D::~MeltingCube_Moment_1D() {} VectorVector MeltingCube_Moment_1D::SetupIC() { - double t = 3.2e-4; // pseudo time for gaussian smoothing (Approx to dirac impulse) - double epsilon = 1e-3; // minimal value for first moment to avoid div by zero error + // double t = 3.2e-4; // pseudo time for gaussian smoothing (Approx to dirac impulse) + double epsilon = 1e-3; // minimal value for first moment to avoid div by zero error // In case of PN, spherical basis is per default SPHERICAL_HARMONICS if( _settings->GetSolverName() == PN_SOLVER || _settings->GetSolverName() == CSD_PN_SOLVER ) { diff --git a/src/problems/phantomimage.cpp b/src/problems/phantomimage.cpp index 02eddfdb..6c0e11fa 100644 --- a/src/problems/phantomimage.cpp +++ b/src/problems/phantomimage.cpp @@ -6,7 +6,7 @@ // ---- 2d test case -PhantomImage::PhantomImage( Config* settings, Mesh* mesh ) : ProblemBase( settings, mesh ) {} +PhantomImage::PhantomImage( Config* settings, Mesh* mesh, QuadratureBase* quad ) : ProblemBase( settings, mesh, quad ) {} PhantomImage::~PhantomImage() {} @@ -32,8 +32,12 @@ std::vector PhantomImage::GetDensity( const VectorVector& cellMidPoints std::string imageFile = _settings->GetCTFile(); std::string meshFile = _settings->GetMeshFile(); - Matrix gsImage = createSU2MeshFromImage( imageFile, meshFile ); - auto bounds = _mesh->GetBounds(); + ErrorMessages::Error( "Python API support is deprecated for KiT-RT. This function needs to be rewritten.\n Use a python script to first create " + "the mesh, then call KiT-RT from Python. This is the recommended workflow for stability and performance.", + CURRENT_FUNCTION ); + + Matrix gsImage = Matrix( 0, 0 ); // createSU2MeshFromImage( imageFile, meshFile ); DEprecated + auto bounds = _mesh->GetBounds(); double xMin = bounds[0].first; double xMax = bounds[0].second; diff --git a/src/problems/problembase.cpp b/src/problems/problembase.cpp index e570329d..4d56fd2b 100644 --- a/src/problems/problembase.cpp +++ b/src/problems/problembase.cpp @@ -1,86 +1,127 @@ #include "problems/problembase.hpp" + #include "common/config.hpp" +#include "common/mesh.hpp" #include "problems/aircavity1d.hpp" #include "problems/checkerboard.hpp" +#include "problems/halflattice.hpp" #include "problems/hohlraum.hpp" +#include "problems/lattice.hpp" #include "problems/linesource.hpp" #include "problems/meltingcube.hpp" #include "problems/phantomimage.hpp" +#include "problems/quarterhohlraum.hpp" #include "problems/radiationctimage.hpp" #include "problems/starmapvalidation.hpp" +#include "problems/symmetrichohlraum.hpp" +#include "quadratures/quadraturebase.hpp" #include "toolboxes/errormessages.hpp" -ProblemBase::ProblemBase( Config* settings, Mesh* mesh ) { +ProblemBase::ProblemBase( Config* settings, Mesh* mesh, QuadratureBase* quad ) { _settings = settings; _mesh = mesh; + _quad = quad; + + // initialize QOI helper variables + _curMaxOrdinateOutflow = 0.0; + _curScalarOutflow = 0.0; + _totalScalarOutflow = 0.0; + _mass = 0.0; + _changeRateFlux = 0.0; + _dummyProbeMoments = VectorVector( 4, Vector( 3, 0.0 ) ); + _dummyProbeValsGreenLine = std::vector( _settings->GetNumProbingCellsLineHohlraum(), 0.0 ); + SetGhostCells(); } ProblemBase::~ProblemBase() {} -ProblemBase* ProblemBase::Create( Config* settings, Mesh* mesh ) { - +ProblemBase* ProblemBase::Create( Config* settings, Mesh* mesh, QuadratureBase* quad ) { // Choose problem type switch( settings->GetProblemName() ) { case PROBLEM_Linesource: { if( settings->GetIsMomentSolver() ) - return new LineSource_Moment( settings, mesh ); + return new LineSource_Moment( settings, mesh, quad ); else - return new LineSource_SN( settings, mesh ); + return new LineSource_SN( settings, mesh, quad ); } break; case PROBLEM_Linesource1D: { if( settings->GetIsMomentSolver() ) - return new LineSource_Moment_1D( settings, mesh ); + return new LineSource_Moment_1D( settings, mesh, quad ); else - return new LineSource_SN_1D( settings, mesh ); + return new LineSource_SN_1D( settings, mesh, quad ); } break; case PROBLEM_Checkerboard: { if( settings->GetIsMomentSolver() ) - return new Checkerboard_Moment( settings, mesh ); + return new Checkerboard_Moment( settings, mesh, quad ); else - return new Checkerboard_SN( settings, mesh ); + return new Checkerboard_SN( settings, mesh, quad ); } break; case PROBLEM_Checkerboard1D: { if( settings->GetIsMomentSolver() ) - return new Checkerboard_Moment_1D( settings, mesh ); + return new Checkerboard_Moment_1D( settings, mesh, quad ); else - return new Checkerboard_SN_1D( settings, mesh ); + return new Checkerboard_SN_1D( settings, mesh, quad ); } break; case PROBLEM_Aircavity1D: { if( settings->GetIsMomentSolver() ) - return new AirCavity1D_Moment( settings, mesh ); + return new AirCavity1D_Moment( settings, mesh, quad ); else - return new AirCavity1D( settings, mesh ); + return new AirCavity1D( settings, mesh, quad ); } break; case PROBLEM_StarmapValidation: { if( settings->GetIsMomentSolver() ) - return new StarMapValidation_Moment( settings, mesh ); + return new StarMapValidation_Moment( settings, mesh, quad ); else - return new StarMapValidation_SN( settings, mesh ); + return new StarMapValidation_SN( settings, mesh, quad ); } break; - case PROBLEM_Phantomimage: return new PhantomImage( settings, mesh ); + case PROBLEM_Phantomimage: return new PhantomImage( settings, mesh, quad ); case PROBLEM_RadiationCT: { if( settings->GetIsMomentSolver() ) - return new RadiationCTImage_Moment( settings, mesh ); + return new RadiationCTImage_Moment( settings, mesh, quad ); else - return new RadiationCTImage( settings, mesh ); + return new RadiationCTImage( settings, mesh, quad ); } break; case PROBLEM_Meltingcube: { if( settings->GetIsMomentSolver() ) - return new MeltingCube_Moment( settings, mesh ); + return new MeltingCube_Moment( settings, mesh, quad ); else - return new MeltingCube_SN( settings, mesh ); + return new MeltingCube_SN( settings, mesh, quad ); } break; case PROBLEM_Meltingcube1D: { if( settings->GetIsMomentSolver() ) - return new MeltingCube_Moment_1D( settings, mesh ); + return new MeltingCube_Moment_1D( settings, mesh, quad ); else - return new MeltingCube_SN_1D( settings, mesh ); + return new MeltingCube_SN_1D( settings, mesh, quad ); } break; case PROBLEM_Hohlraum: { if( settings->GetIsMomentSolver() ) - return new Hohlraum_Moment( settings, mesh ); + return new Hohlraum_Moment( settings, mesh, quad ); + else + return new Hohlraum( settings, mesh, quad ); + } break; + case PROBLEM_SymmetricHohlraum: { + if( settings->GetIsMomentSolver() ) + return new SymmetricHohlraum_Moment( settings, mesh, quad ); + else + return new SymmetricHohlraum( settings, mesh, quad ); + } break; + case PROBLEM_QuarterHohlraum: { + if( settings->GetIsMomentSolver() ) + return new QuarterHohlraum_Moment( settings, mesh, quad ); + else + return new QuarterHohlraum( settings, mesh, quad ); + } break; + case PROBLEM_Lattice: { + if( settings->GetIsMomentSolver() ) + return new Lattice_Moment( settings, mesh, quad ); + else + return new Lattice_SN( settings, mesh, quad ); + } break; + case PROBLEM_HalfLattice: { + if( settings->GetIsMomentSolver() ) + return new HalfLattice_Moment( settings, mesh, quad ); else - return new Hohlraum( settings, mesh ); + return new HalfLattice_SN( settings, mesh, quad ); } break; default: ErrorMessages::Error( "No valid physical problem chosen. Please check your config file", CURRENT_FUNCTION ); return nullptr; @@ -90,7 +131,8 @@ ProblemBase* ProblemBase::Create( Config* settings, Mesh* mesh ) { // Default densities = 1 std::vector ProblemBase::GetDensity( const VectorVector& cellMidPoints ) { return std::vector( cellMidPoints.size(), 1.0 ); } -// Legacy code: Scattering crossection loaded from database ENDF with physics class -> later overwritten with ICRU data +// Legacy code: Scattering crossection loaded from database ENDF with physics +// class -> later overwritten with ICRU data VectorVector ProblemBase::GetScatteringXSE( const Vector& /*energies*/, const Vector& /*angles*/ ) { ErrorMessages::Error( "Not yet implemented", CURRENT_FUNCTION ); return VectorVector( 1, Vector( 1, 0 ) ); @@ -101,3 +143,122 @@ Vector ProblemBase::GetStoppingPower( const Vector& /* energies */ ) { ErrorMessages::Error( "Not yet implemented", CURRENT_FUNCTION ); return Vector( 1, -1.0 ); } + +void ProblemBase::SetGhostCells() { + // Loop over all cells. If its a Dirichlet boundary, add cell to dict with + // {cell_idx, boundary_value} + auto cellBoundaries = _mesh->GetBoundaryTypes(); + std::map ghostCellMap; + + Vector dummyGhostCell( 1, 0.0 ); + // #pragma omp parallel for + for( unsigned idx_cell = 0; idx_cell < _mesh->GetNumCells(); idx_cell++ ) { + if( cellBoundaries[idx_cell] == BOUNDARY_TYPE::NEUMANN || cellBoundaries[idx_cell] == BOUNDARY_TYPE::DIRICHLET ) { + // TODO: Refactor Boundary Conditions: We only have Ghost Cells with + // Dirichlet conditions right now + // #pragma omp critical + { ghostCellMap.insert( { idx_cell, dummyGhostCell } ); } + } + } + _ghostCells = ghostCellMap; +} + +const Vector& ProblemBase::GetGhostCellValue( int /*idx_cell*/, const Vector& cell_sol ) { return cell_sol; } + +void ProblemBase::ComputeMaxOrdinatewiseOutflow( const VectorVector& solution ) { + if( _settings->GetSolverName() == SN_SOLVER || _settings->GetSolverName() == CSD_SN_SOLVER ) { + double currOrdinatewiseOutflow = 0.0; + double transportDirection = 0.0; + + auto nCells = _mesh->GetNumCells(); + auto cellMids = _mesh->GetCellMidPoints(); + auto areas = _mesh->GetCellAreas(); + auto neigbors = _mesh->GetNeighbours(); + auto normals = _mesh->GetNormals(); + + auto quadPoints = _quad->GetPoints(); + auto weights = _quad->GetWeights(); + auto nq = _quad->GetNq(); + + // Iterate over boundaries + for( std::map::iterator it = _ghostCells.begin(); it != _ghostCells.end(); ++it ) { + int idx_cell = it->first; // Get Boundary cell index + for( unsigned idx_nbr = 0; idx_nbr < neigbors[idx_cell].size(); ++idx_nbr ) { + // Find face that points outward + if( neigbors[idx_cell][idx_nbr] == nCells ) { + // Iterate over transport directions + for( unsigned idx_quad = 0; idx_quad < nq; ++idx_quad ) { + transportDirection = + normals[idx_cell][idx_nbr][0] * quadPoints[idx_quad][0] + normals[idx_cell][idx_nbr][1] * quadPoints[idx_quad][1]; + // Find outward facing transport directions + if( transportDirection > 0.0 ) { + + currOrdinatewiseOutflow = transportDirection / norm( normals[idx_cell][idx_nbr] ) * solution[idx_cell][idx_quad]; + + if( currOrdinatewiseOutflow > _curMaxOrdinateOutflow ) _curMaxOrdinateOutflow = currOrdinatewiseOutflow; + } + } + } + } + } + } + // TODO define alternative for Moment solvers +} + +void ProblemBase::ComputeCurrentOutflow( const VectorVector& solution ) { + if( _settings->GetSolverName() == SN_SOLVER || _settings->GetSolverName() == CSD_SN_SOLVER ) { + + _curScalarOutflow = 0.0; + double transportDirection = 0.0; + + auto nCells = _mesh->GetNumCells(); + auto cellMids = _mesh->GetCellMidPoints(); + auto areas = _mesh->GetCellAreas(); + auto neigbors = _mesh->GetNeighbours(); + auto normals = _mesh->GetNormals(); + + auto quadPoints = _quad->GetPoints(); + auto weights = _quad->GetWeights(); + auto nq = _quad->GetNq(); + + // Iterate over boundaries + for( std::map::iterator it = _ghostCells.begin(); it != _ghostCells.end(); ++it ) { + int idx_cell = it->first; // Get Boundary cell index + + // Iterate over face cell faces + + for( unsigned idx_nbr = 0; idx_nbr < neigbors[idx_cell].size(); ++idx_nbr ) { + // Find face that points outward + if( neigbors[idx_cell][idx_nbr] == nCells ) { + // Iterate over transport directions + for( unsigned idx_quad = 0; idx_quad < nq; ++idx_quad ) { + transportDirection = + normals[idx_cell][idx_nbr][0] * quadPoints[idx_quad][0] + normals[idx_cell][idx_nbr][1] * quadPoints[idx_quad][1]; + // Find outward facing transport directions + if( transportDirection > 0.0 ) { + _curScalarOutflow += transportDirection * solution[idx_cell][idx_quad] * weights[idx_quad]; // Integrate flux + } + } + } + } + } + } + // TODO define alternative for Moment solvers +} + +void ProblemBase::ComputeTotalOutflow( double dT ) { _totalScalarOutflow += _curScalarOutflow * dT; } + +void ProblemBase::ComputeMass( const Vector& scalarFlux ) { + _mass = 0.0; + + auto areas = _mesh->GetCellAreas(); + unsigned nCells = _mesh->GetNumCells(); +#pragma omp parallel for default( shared ) reduction( + : _mass ) + for( unsigned idx_cell = 0; idx_cell < nCells; ++idx_cell ) { + _mass += scalarFlux[idx_cell] * areas[idx_cell]; + } +} + +void ProblemBase::ComputeChangeRateFlux( const Vector& scalarFlux, const Vector& scalarFluxNew ) { + _changeRateFlux = blaze::l2Norm( scalarFluxNew - scalarFlux ); +} diff --git a/src/problems/quarterhohlraum.cpp b/src/problems/quarterhohlraum.cpp new file mode 100644 index 00000000..094f785e --- /dev/null +++ b/src/problems/quarterhohlraum.cpp @@ -0,0 +1,558 @@ +#include "problems/quarterhohlraum.hpp" +#include "common/config.hpp" +#include "common/io.hpp" +#include "common/mesh.hpp" +#include "quadratures/qgausslegendretensorized.hpp" +#include "quadratures/quadraturebase.hpp" +#include "solvers/csdpn_starmap_constants.hpp" +#include "toolboxes/errormessages.hpp" +#include "toolboxes/interpolation.hpp" +#include "toolboxes/textprocessingtoolbox.hpp" +#include "velocitybasis/sphericalbase.hpp" +#include "velocitybasis/sphericalharmonics.hpp" + +QuarterHohlraum::QuarterHohlraum( Config* settings, Mesh* mesh, QuadratureBase* quad ) : ProblemBase( settings, mesh, quad ) { + _sigmaS = Vector( _mesh->GetNumCells(), 0.1 ); // white area default + _sigmaT = Vector( _mesh->GetNumCells(), 0.1 ); // white area default + + // Geometry of the red barrier + _redRightTop = _settings->GetPosRedRightTopHohlraum(); + _posRedRightBorder = _settings->GetPosRedRightBorderHohlraum(); + + // Geometry of the green capsule + _thicknessGreen = 0.05; + _cornerUpperLeftGreen = { 0., 0.4 - _thicknessGreen / 2.0 }; + _cornerLowerLeftGreen = { 0., +_thicknessGreen / 2.0 }; + _cornerUpperRightGreen = { 0.2 - _thicknessGreen / 2.0, 0.4 - _thicknessGreen / 2.0 }; + _cornerLowerRightGreen = { 0.2 - _thicknessGreen / 2.0, 0. + _thicknessGreen / 2.0 }; + + _curAbsorptionHohlraumCenter = 0.0; + _curAbsorptionHohlraumVertical = 0.0; + _curAbsorptionHohlraumHorizontal = 0.0; + _totalAbsorptionHohlraumCenter = 0.0; + _totalAbsorptionHohlraumVertical = 0.0; + _totalAbsorptionHohlraumHorizontal = 0.0; + _varAbsorptionHohlraumGreen = 0.0; + _probingCells = { + _mesh->GetCellOfKoordinate( 0.4, 0. ), + _mesh->GetCellOfKoordinate( 0., 0.5 ), + }; + _probingMoments = VectorVector( 2, Vector( 3, 0.0 ) ); + _nProbingCellsLineGreen = _settings->GetNumProbingCellsLineHohlraum(); + SetProbingCellsLineGreen(); + _absorptionValsIntegrated = std::vector( _nProbingCellsLineGreen, 0.0 ); + _varAbsorptionValsIntegrated = std::vector( _nProbingCellsLineGreen, 0.0 ); + +#pragma omp parallel for + for( unsigned idx_cell = 0; idx_cell < _mesh->GetNumCells(); idx_cell++ ) { + // Assumption: Domain size is 1.3x1.3 + double x = _mesh->GetCellMidPoints()[idx_cell][0]; + double y = _mesh->GetCellMidPoints()[idx_cell][1]; + + // red area right + if( x > _posRedRightBorder && y < _redRightTop ) { + _sigmaS[idx_cell] = 95.0; + _sigmaT[idx_cell] = 100.0; + } + // green and blue area + if( x > -0.2 && x < 0.2 && y > -0.4 && y < 0.4 ) { + _sigmaS[idx_cell] = 90.0; + _sigmaT[idx_cell] = 100.0; + } + // blue checkered area (overwrites part of green n blue area) + if( x > -0.15 && x < 0.15 && y > -0.35 && y < 0.35 ) { + _sigmaS[idx_cell] = 0.0; + _sigmaT[idx_cell] = 100.0; + } + // black area (upper and lower boundary) + if( y > 0.6 || y < -0.6 ) { + _sigmaS[idx_cell] = 50.0; + _sigmaT[idx_cell] = 100.0; + } + } + SetGhostCells(); +} + +QuarterHohlraum::~QuarterHohlraum() {} + +std::vector QuarterHohlraum::GetExternalSource( const Vector& /* energies */ ) { + VectorVector Q( _mesh->GetNumCells(), Vector( 1u, 0.0 ) ); + return std::vector( 1u, Q ); +} + +VectorVector QuarterHohlraum::SetupIC() { + VectorVector psi( _mesh->GetNumCells(), Vector( _settings->GetNQuadPoints(), 0.0 ) ); + VectorVector cellMids = _mesh->GetCellMidPoints(); + + for( unsigned j = 0; j < cellMids.size(); ++j ) { + psi[j] = 0.0; // zero initial condition + } + return psi; +} + +void QuarterHohlraum::SetGhostCells() { + // Loop over all cells. If its a Dirichlet boundary, add cell to dict with {cell_idx, boundary_value} + auto cellBoundaries = _mesh->GetBoundaryTypes(); + std::map ghostCellMap; + std::map ghostCellReflMap; + + double tol = 1e-12; // For distance to boundary + + QuadratureBase* quad = QuadratureBase::Create( _settings ); + VectorVector vq = quad->GetPoints(); + unsigned nq = quad->GetNq(); + + if( _settings->GetQuadName() != QUAD_GaussLegendreTensorized2D ) { + ErrorMessages::Error( "This simplified test case only works with symmetric quadrature orders. Use QUAD_GAUSS_LEGENDRE_TENSORIZED_2D", + CURRENT_FUNCTION ); + } + { // Create the symmetry maps for the quadratures + + for( unsigned idx_q = 0; idx_q < nq; idx_q++ ) { + for( unsigned idx_q2 = 0; idx_q2 < nq; idx_q2++ ) { + if( abs( vq[idx_q][0] + vq[idx_q2][0] ) + abs( vq[idx_q][1] - vq[idx_q2][1] ) < tol ) { + _quadratureYReflection[idx_q] = idx_q2; + break; + } + } + for( unsigned idx_q2 = 0; idx_q2 < nq; idx_q2++ ) { + if( abs( vq[idx_q][0] - vq[idx_q2][0] ) + abs( vq[idx_q][1] + vq[idx_q2][1] ) < tol ) { + _quadratureXReflection[idx_q] = idx_q2; + break; + } + } + } + } + if( _quadratureXReflection.size() != nq ) { + ErrorMessages::Error( "Problem with X symmetry of quadrature of this mesh", CURRENT_FUNCTION ); + } + if( _quadratureYReflection.size() != nq ) { + ErrorMessages::Error( "Problem with Y symmetry of quadrature of this mesh", CURRENT_FUNCTION ); + } + + Vector right_inflow( nq, 0.0 ); + Vector vertical_flow( nq, 0.0 ); + + for( unsigned idx_q = 0; idx_q < nq; idx_q++ ) { + if( vq[idx_q][0] < 0.0 ) right_inflow[idx_q] = 1.0; + } + + auto nodes = _mesh->GetNodes(); +#pragma omp parallel for + for( unsigned idx_cell = 0; idx_cell < _mesh->GetNumCells(); idx_cell++ ) { + if( cellBoundaries[idx_cell] == BOUNDARY_TYPE::NEUMANN || cellBoundaries[idx_cell] == BOUNDARY_TYPE::DIRICHLET ) { +#pragma omp critical + { + auto localCellNodes = _mesh->GetCells()[idx_cell]; + + _ghostCellsReflectingX[idx_cell] = false; + _ghostCellsReflectingY[idx_cell] = false; + for( unsigned idx_node = 0; idx_node < _mesh->GetNumNodesPerCell(); idx_node++ ) { // Check if corner node is in this cell + if( abs( nodes[localCellNodes[idx_node]][0] ) < tol ) { // close to 0 => left boundary + _ghostCellsReflectingY[idx_cell] = true; + ghostCellMap.insert( { idx_cell, vertical_flow } ); + break; + } + else if( abs( nodes[localCellNodes[idx_node]][0] ) > 0.65 - tol ) { // right boundary + ghostCellMap.insert( { idx_cell, right_inflow } ); + break; + } + else if( abs( nodes[localCellNodes[idx_node]][1] ) < tol ) { // lower boundary + _ghostCellsReflectingX[idx_cell] = true; + ghostCellMap.insert( { idx_cell, vertical_flow } ); + + break; + } + else if( abs( nodes[localCellNodes[idx_node]][1] ) > 0.65 - tol ) { // upper boundary + ghostCellMap.insert( { idx_cell, vertical_flow } ); + break; + } + else if( idx_node == _mesh->GetNumNodesPerCell() - 1 ) { + ErrorMessages::Error( " Problem with ghost cell setup and boundary of this mesh at cell " + std::to_string( idx_cell ) + + " with node coordinates " + std::to_string( _mesh->GetNodes()[localCellNodes[idx_node]][0] ) + "," + + std::to_string( _mesh->GetNodes()[localCellNodes[idx_node]][1] ), + CURRENT_FUNCTION ); + } + } + } + } + } + _ghostCells = ghostCellMap; + + delete quad; +} + +const Vector& QuarterHohlraum::GetGhostCellValue( int idx_cell, const Vector& cell_sol ) { + if( _ghostCellsReflectingX[idx_cell] ) { + for( unsigned idx_sys = 0; idx_sys < cell_sol.size(); idx_sys++ ) { + _ghostCells[idx_cell][idx_sys] = cell_sol[_quadratureXReflection[idx_sys]]; + } + } + else if( _ghostCellsReflectingY[idx_cell] ) { + for( unsigned idx_sys = 0; idx_sys < cell_sol.size(); idx_sys++ ) { + _ghostCells[idx_cell][idx_sys] = cell_sol[_quadratureYReflection[idx_sys]]; + } + } + return _ghostCells[idx_cell]; +} + +VectorVector QuarterHohlraum::GetScatteringXS( const Vector& /* energies */ ) { return VectorVector( 1u, _sigmaS ); } + +VectorVector QuarterHohlraum::GetTotalXS( const Vector& /* energies */ ) { return VectorVector( 1u, _sigmaT ); } + +void QuarterHohlraum::ComputeCurrentAbsorptionHohlraum( const Vector& scalarFlux ) { + _curAbsorptionHohlraumCenter = 0.0; // Green and blue areas of symmetric hohlraum + _curAbsorptionHohlraumVertical = 0.0; // Red areas of symmetric hohlraum + _curAbsorptionHohlraumHorizontal = 0.0; // Black areas of symmetric hohlraum + + unsigned nCells = _mesh->GetNumCells(); + auto cellMids = _mesh->GetCellMidPoints(); + std::vector areas = _mesh->GetCellAreas(); + +#pragma omp parallel for default( shared ) \ + reduction( + : _curAbsorptionHohlraumCenter, _curAbsorptionHohlraumVertical, _curAbsorptionHohlraumHorizontal ) + for( unsigned idx_cell = 0; idx_cell < nCells; idx_cell++ ) { + double x = _mesh->GetCellMidPoints()[idx_cell][0]; + double y = _mesh->GetCellMidPoints()[idx_cell][1]; + + if( x > -0.2 && x < 0.2 && y > -0.35 && y < 0.35 ) { + _curAbsorptionHohlraumCenter += scalarFlux[idx_cell] * ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ) * areas[idx_cell]; + } + if( ( x < -0.6 && y > -0.4 && y < 0.4 ) || ( x > 0.6 && y > -0.4 && y < 0.4 ) ) { + _curAbsorptionHohlraumVertical += scalarFlux[idx_cell] * ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ) * areas[idx_cell]; + } + if( y > 0.6 || y < -0.6 ) { + _curAbsorptionHohlraumHorizontal += scalarFlux[idx_cell] * ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ) * areas[idx_cell]; + } + } +} + +void QuarterHohlraum::ComputeTotalAbsorptionHohlraum( double dT ) { + _totalAbsorptionHohlraumCenter += _curAbsorptionHohlraumCenter * dT; + _totalAbsorptionHohlraumVertical += _curAbsorptionHohlraumVertical * dT; + _totalAbsorptionHohlraumHorizontal += _curAbsorptionHohlraumHorizontal * dT; +} + +void QuarterHohlraum::ComputeVarAbsorptionGreen( const Vector& scalarFlux ) { + double a_g = 0.0; + _varAbsorptionHohlraumGreen = 0.0; + + unsigned nCells = _mesh->GetNumCells(); + auto cellMids = _mesh->GetCellMidPoints(); + std::vector areas = _mesh->GetCellAreas(); + +#pragma omp parallel default( shared ) reduction( + : a_g ) + for( unsigned idx_cell = 0; idx_cell < nCells; ++idx_cell ) { + double x = cellMids[idx_cell][0]; + double y = cellMids[idx_cell][1]; + bool green1, green2, green3, green4; + + green1 = x > -0.2 && x < -0.15 && y > -0.35 && y < 0.35; // green area 1 (lower boundary) + green2 = x > 0.15 && x < 0.2 && y > -0.35 && y < 0.35; // green area 2 (upper boundary) + green3 = x > -0.2 && x < 0.2 && y > -0.4 && y < -0.35; // green area 3 (left boundary) + green4 = x > -0.2 && x < 0.2 && y > 0.35 && y < 0.4; // green area 4 (right boundary) + + if( green1 || green2 || green3 || green4 ) { + a_g += ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ) * scalarFlux[idx_cell] * areas[idx_cell]; + } + } + +#pragma omp parallel default( shared ) reduction( + : _varAbsorptionHohlraumGreen ) + for( unsigned idx_cell = 0; idx_cell < nCells; ++idx_cell ) { + double x = cellMids[idx_cell][0]; + double y = cellMids[idx_cell][1]; + bool green1, green2, green3, green4; + + green1 = x > -0.2 && x < -0.15 && y > -0.35 && y < 0.35; // green area 1 (lower boundary) + green2 = x > 0.15 && x < 0.2 && y > -0.35 && y < 0.35; // green area 2 (upper boundary) + green3 = x > -0.2 && x < 0.2 && y > -0.4 && y < -0.35; // green area 3 (left boundary) + green4 = x > -0.2 && x < 0.2 && y > 0.35 && y < 0.4; // green area 4 (right boundary) + + if( green1 || green2 || green3 || green4 ) { + _varAbsorptionHohlraumGreen += ( a_g - scalarFlux[idx_cell] * ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ) ) * + ( a_g - scalarFlux[idx_cell] * ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ) ) * areas[idx_cell]; + } + } +} + +void QuarterHohlraum::ComputeCurrentProbeMoment( const VectorVector& solution ) { + const VectorVector& quadPoints = _quad->GetPoints(); + const Vector& weights = _quad->GetWeights(); + unsigned nq = _quad->GetNq(); + + for( unsigned idx_cell = 0; idx_cell < 2; idx_cell++ ) { // Loop over probing cells + _probingMoments[idx_cell][0] = blaze::dot( solution[_probingCells[idx_cell]], weights ); + _probingMoments[idx_cell][1] = 0.0; + _probingMoments[idx_cell][2] = 0.0; + + for( unsigned idx_quad = 0; idx_quad < nq; idx_quad++ ) { + _probingMoments[idx_cell][1] += quadPoints[idx_quad][0] * solution[_probingCells[idx_cell]][idx_quad] * weights[idx_quad]; + _probingMoments[idx_cell][2] += quadPoints[idx_quad][2] * solution[_probingCells[idx_cell]][idx_quad] * weights[idx_quad]; + } + } +} + +void QuarterHohlraum::SetProbingCellsLineGreen() { + + double verticalLineWidth = std::abs( _cornerUpperLeftGreen[1] - _cornerLowerLeftGreen[1] ); + double horizontalLineWidth = std::abs( _cornerUpperLeftGreen[0] - _cornerUpperRightGreen[0] ); + + // double dx = 2 * ( horizontalLineWidth + verticalLineWidth ) / ( (double)_nProbingCellsLineGreen ); + + unsigned nHorizontalProbingCells = + (unsigned)std::ceil( _nProbingCellsLineGreen * ( horizontalLineWidth / ( horizontalLineWidth + verticalLineWidth ) ) ); + unsigned nVerticalProbingCells = _nProbingCellsLineGreen - nHorizontalProbingCells; + + _probingCellsLineGreen = std::vector( _nProbingCellsLineGreen ); + + // printf( "here" ); + + // Sample points on each side of the rectangle + std::vector side3 = linspace2D( _cornerLowerRightGreen, _cornerUpperRightGreen, nVerticalProbingCells ); + std::vector side4 = linspace2D( _cornerUpperRightGreen, _cornerUpperLeftGreen, nHorizontalProbingCells ); + + // printf( "here" ); + // Combine the points from each side + _probingCellsLineGreen.insert( _probingCellsLineGreen.end(), side3.begin(), side3.end() ); + _probingCellsLineGreen.insert( _probingCellsLineGreen.end(), side4.begin(), side4.end() ); +} + +void QuarterHohlraum::ComputeQOIsGreenProbingLine( const Vector& scalarFlux ) { + + double verticalLineWidth = std::abs( _cornerUpperLeftGreen[1] - _cornerLowerLeftGreen[1] ); + double horizontalLineWidth = std::abs( _cornerUpperLeftGreen[0] - _cornerUpperRightGreen[0] ); + + double dl = 2 * ( horizontalLineWidth + verticalLineWidth ) / ( (double)_nProbingCellsLineGreen ); + double area = dl * _thicknessGreen; + double a_g = 0; + double l_max = _nProbingCellsLineGreen * dl; + + for( unsigned i = 0; i < _nProbingCellsLineGreen; i++ ) { // Loop over probing cells + _absorptionValsIntegrated[i] = + ( _sigmaT[_probingCellsLineGreen[i]] - _sigmaS[_probingCellsLineGreen[i]] ) * scalarFlux[_probingCellsLineGreen[i]] * area; + a_g += _absorptionValsIntegrated[i] / (double)_nProbingCellsLineGreen; + } + for( unsigned i = 0; i < _nProbingCellsLineGreen; i++ ) { // Loop over probing cells + _varAbsorptionValsIntegrated[i] = dl / l_max * ( a_g - _absorptionValsIntegrated[i] ) * ( a_g - _absorptionValsIntegrated[i] ); + } +} + +std::vector QuarterHohlraum::linspace2D( const std::vector& start, const std::vector& end, unsigned num_points ) { + std::vector result; + result.resize( num_points ); + double stepX = ( end[0] - start[0] ) / ( num_points - 1 ); + double stepY = ( end[1] - start[1] ) / ( num_points - 1 ); + + for( unsigned i = 0; i < num_points; ++i ) { + double x = start[0] + i * stepX; + double y = start[1] + i * stepY; + + result[i] = _mesh->GetCellOfKoordinate( x, y ); + } + + return result; +} + +void QuarterHohlraum::ComputeCurrentOutflow( const VectorVector& solution ) { + if( _settings->GetSolverName() == SN_SOLVER || _settings->GetSolverName() == CSD_SN_SOLVER ) { + + _curScalarOutflow = 0.0; + double transportDirection = 0.0; + + auto nCells = _mesh->GetNumCells(); + auto cellMids = _mesh->GetCellMidPoints(); + auto areas = _mesh->GetCellAreas(); + auto neigbors = _mesh->GetNeighbours(); + auto normals = _mesh->GetNormals(); + + auto quadPoints = _quad->GetPoints(); + auto weights = _quad->GetWeights(); + auto nq = _quad->GetNq(); + + // Iterate over boundaries + for( std::map::iterator it = _ghostCells.begin(); it != _ghostCells.end(); ++it ) { + int idx_cell = it->first; // Get Boundary cell index + + // Iterate over face cell faces + if( !_ghostCellsReflectingX[idx_cell] && !_ghostCellsReflectingY[idx_cell] ) { + for( unsigned idx_nbr = 0; idx_nbr < neigbors[idx_cell].size(); ++idx_nbr ) { + // Find face that points outward + if( neigbors[idx_cell][idx_nbr] == nCells ) { + // Iterate over transport directions + for( unsigned idx_quad = 0; idx_quad < nq; ++idx_quad ) { + transportDirection = + normals[idx_cell][idx_nbr][0] * quadPoints[idx_quad][0] + normals[idx_cell][idx_nbr][1] * quadPoints[idx_quad][1]; + // Find outward facing transport directions + if( transportDirection > 0.0 ) { + _curScalarOutflow += transportDirection * solution[idx_cell][idx_quad] * weights[idx_quad]; // Integrate flux + } + } + } + } + } + } + } + // TODO define alternative for Moment solvers +} + +void QuarterHohlraum::ComputeMaxOrdinatewiseOutflow( const VectorVector& solution ) { + if( _settings->GetSolverName() == SN_SOLVER || _settings->GetSolverName() == CSD_SN_SOLVER ) { + double currOrdinatewiseOutflow = 0.0; + double transportDirection = 0.0; + + auto nCells = _mesh->GetNumCells(); + auto cellMids = _mesh->GetCellMidPoints(); + auto areas = _mesh->GetCellAreas(); + auto neigbors = _mesh->GetNeighbours(); + auto normals = _mesh->GetNormals(); + + auto quadPoints = _quad->GetPoints(); + auto weights = _quad->GetWeights(); + auto nq = _quad->GetNq(); + + // Iterate over boundaries + for( std::map::iterator it = _ghostCells.begin(); it != _ghostCells.end(); ++it ) { + int idx_cell = it->first; // Get Boundary cell index + if( !_ghostCellsReflectingX[idx_cell] && !_ghostCellsReflectingY[idx_cell] ) { + for( unsigned idx_nbr = 0; idx_nbr < neigbors[idx_cell].size(); ++idx_nbr ) { + // Find face that points outward + if( neigbors[idx_cell][idx_nbr] == nCells ) { + // Iterate over transport directions + for( unsigned idx_quad = 0; idx_quad < nq; ++idx_quad ) { + transportDirection = + normals[idx_cell][idx_nbr][0] * quadPoints[idx_quad][0] + normals[idx_cell][idx_nbr][1] * quadPoints[idx_quad][1]; + // Find outward facing transport directions + if( transportDirection > 0.0 ) { + currOrdinatewiseOutflow = transportDirection / norm( normals[idx_cell][idx_nbr] ) * solution[idx_cell][idx_quad]; + if( currOrdinatewiseOutflow > _curMaxOrdinateOutflow ) _curMaxOrdinateOutflow = currOrdinatewiseOutflow; + } + } + } + } + } + } + } + // TODO define alternative for Moment solvers +} +// -------------- Moment Symmetric Hohlraum --------------- + +QuarterHohlraum_Moment::QuarterHohlraum_Moment( Config* settings, Mesh* mesh, QuadratureBase* quad ) : QuarterHohlraum( settings, mesh, quad ) {} + +QuarterHohlraum_Moment::~QuarterHohlraum_Moment() {} + +std::vector QuarterHohlraum_Moment::GetExternalSource( const Vector& /* energies */ ) { + // In case of PN, spherical basis is per default SPHERICAL_HARMONICS + + double integrationFactor = ( 4 * M_PI ); + if( _settings->GetDim() == 2 ) { + integrationFactor = M_PI; + } + SphericalBase* tempBase = SphericalBase::Create( _settings ); + unsigned ntotalEquations = tempBase->GetBasisSize(); + + VectorVector Q( _mesh->GetNumCells(), Vector( ntotalEquations, 0.0 ) ); // zero could lead to problems? + VectorVector cellMids = _mesh->GetCellMidPoints(); + + Vector uIC( ntotalEquations, 0 ); + + if( _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS || _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS_ROTATED ) { + QuadratureBase* quad = QuadratureBase::Create( _settings ); + VectorVector quadPointsSphere = quad->GetPointsSphere(); + Vector w = quad->GetWeights(); + + double my, phi; + VectorVector moments = VectorVector( quad->GetNq(), Vector( tempBase->GetBasisSize(), 0.0 ) ); + + for( unsigned idx_quad = 0; idx_quad < quad->GetNq(); idx_quad++ ) { + my = quadPointsSphere[idx_quad][0]; + phi = quadPointsSphere[idx_quad][1]; + moments[idx_quad] = tempBase->ComputeSphericalBasis( my, phi ); + } + // Integrate <1*m> to get factors for monomial basis in isotropic scattering + for( unsigned idx_quad = 0; idx_quad < quad->GetNq(); idx_quad++ ) { + uIC += w[idx_quad] * moments[idx_quad]; + } + delete quad; + } + double kinetic_density = 0.0; //_settings->GetSourceMagnitude(); + for( unsigned j = 0; j < cellMids.size(); ++j ) { + if( cellMids[j][0] < 0.05 ) { + if( _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS || _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS_ROTATED ) { + Q[j] = kinetic_density * uIC / uIC[0] / integrationFactor; // Remember scaling + } + if( _settings->GetSphericalBasisName() == SPHERICAL_HARMONICS ) { + Q[j][0] = kinetic_density / integrationFactor; // first bassis function is 1/ ( 4 * M_PI ) + } + } + } + delete tempBase; // Only temporally needed + return std::vector( 1u, Q ); +} + +VectorVector QuarterHohlraum_Moment::SetupIC() { + double integrationFactor = ( 4 * M_PI ); + if( _settings->GetDim() == 2 ) { + integrationFactor = M_PI; + } + // In case of PN, spherical basis is per default SPHERICAL_HARMONICS + SphericalBase* tempBase = SphericalBase::Create( _settings ); + unsigned ntotalEquations = tempBase->GetBasisSize(); + + VectorVector initialSolution( _mesh->GetNumCells(), Vector( ntotalEquations, 0 ) ); // zero could lead to problems? + VectorVector cellMids = _mesh->GetCellMidPoints(); + + Vector tempIC( ntotalEquations, 0 ); + + if( _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS || _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS_ROTATED ) { + QuadratureBase* quad = QuadratureBase::Create( _settings ); + VectorVector quadPointsSphere = quad->GetPointsSphere(); + Vector w = quad->GetWeights(); + + double my, phi; + VectorVector moments = VectorVector( quad->GetNq(), Vector( tempBase->GetBasisSize(), 0.0 ) ); + + for( unsigned idx_quad = 0; idx_quad < quad->GetNq(); idx_quad++ ) { + my = quadPointsSphere[idx_quad][0]; + phi = quadPointsSphere[idx_quad][1]; + moments[idx_quad] = tempBase->ComputeSphericalBasis( my, phi ); + } + // Integrate <1*m> to get factors for monomial basis in isotropic scattering + for( unsigned idx_quad = 0; idx_quad < quad->GetNq(); idx_quad++ ) { + tempIC += w[idx_quad] * moments[idx_quad]; + } + delete quad; + } + // Initial condition is dirac impulse at (x,y) = (0,0) ==> constant in angle ==> all moments - exept first - are zero. + double kinetic_density = 1e-4; + // std::vector _boundaryCells; + for( unsigned j = 0; j < cellMids.size(); ++j ) { + + // boundary condition: Source on left side + if( cellMids[j][0] < 0.0 && ( cellMids[j][1] > 0.0 && cellMids[j][1] < 1.3 ) ) { // test case uses ghost cells + kinetic_density = _settings->GetSourceMagnitude(); + _mesh->SetBoundaryType( j, DIRICHLET ); + } + else { + kinetic_density = 1e-4; + } + + if( _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS || _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS_ROTATED ) { + initialSolution[j] = kinetic_density * tempIC / tempIC[0] / integrationFactor; // Remember scaling + } + if( _settings->GetSphericalBasisName() == SPHERICAL_HARMONICS ) { + initialSolution[j][0] = kinetic_density / integrationFactor; // first bassis function is 1/ ( 4 * M_PI ) + } + } + delete tempBase; // Only temporally needed + return initialSolution; +} + +void QuarterHohlraum_Moment::ComputeCurrentProbeMoment( const VectorVector& solution ) { + for( unsigned idx_cell = 0; idx_cell < 4; idx_cell++ ) { // Loop over probing cells + _probingMoments[idx_cell][0] = solution[_probingCells[idx_cell]][0]; + if( _probingMoments[idx_cell].size() > 1 ) { + _probingMoments[idx_cell][1] = solution[_probingCells[idx_cell]][1]; + _probingMoments[idx_cell][2] = solution[_probingCells[idx_cell]][2]; + } + } +} \ No newline at end of file diff --git a/src/problems/radiationctimage.cpp b/src/problems/radiationctimage.cpp index 9bd4f0e1..ed4da342 100644 --- a/src/problems/radiationctimage.cpp +++ b/src/problems/radiationctimage.cpp @@ -13,7 +13,7 @@ #include -RadiationCTImage::RadiationCTImage( Config* settings, Mesh* mesh ) : ProblemBase( settings, mesh ) {} +RadiationCTImage::RadiationCTImage( Config* settings, Mesh* mesh, QuadratureBase* quad ) : ProblemBase( settings, mesh, quad ) {} RadiationCTImage::~RadiationCTImage() {} @@ -67,9 +67,14 @@ VectorVector RadiationCTImage::SetupIC() { std::vector RadiationCTImage::GetDensity( const VectorVector& /*cellMidPoints*/ ) { std::string imageFile = _settings->GetCTFile(); std::string meshFile = _settings->GetMeshFile(); - Matrix gsImage = createSU2MeshFromImage( imageFile, meshFile ); - auto bounds = _mesh->GetBounds(); - auto cellMidPoints = _mesh->GetCellMidPoints(); + ErrorMessages::Error( "Python API support is deprecated for KiT-RT. This function needs to be rewritten.\n Use a python script to first create " + "the mesh, then call KiT-RT from Python. This is the recommended workflow for stability and performance.", + CURRENT_FUNCTION ); + Matrix gsImage = Matrix( 0, 0 ); // createSU2MeshFromImage( imageFile, meshFile ); DEprecated + + ErrorMessages::Error( "GetBounds function currently deprecetaded", CURRENT_FUNCTION ); + auto bounds = _mesh->GetBounds(); + auto cellMidPoints = _mesh->GetCellMidPoints(); double xMin = bounds[0].first; double xMax = bounds[0].second; @@ -107,7 +112,7 @@ VectorVector RadiationCTImage::GetTotalXS( const Vector& /*energies*/ ) { return VectorVector( 1, Vector( 1, 0.0 ) ); } -RadiationCTImage_Moment::RadiationCTImage_Moment( Config* settings, Mesh* mesh ) : RadiationCTImage( settings, mesh ) {} +RadiationCTImage_Moment::RadiationCTImage_Moment( Config* settings, Mesh* mesh, QuadratureBase* quad ) : RadiationCTImage( settings, mesh, quad ) {} RadiationCTImage_Moment::~RadiationCTImage_Moment() {} diff --git a/src/problems/starmapvalidation.cpp b/src/problems/starmapvalidation.cpp index bc50a749..d5d5e436 100644 --- a/src/problems/starmapvalidation.cpp +++ b/src/problems/starmapvalidation.cpp @@ -11,11 +11,11 @@ #include #include -StarMapValidation_SN::StarMapValidation_SN( Config* settings, Mesh* mesh ) : ProblemBase( settings, mesh ) {} +StarMapValidation_SN::StarMapValidation_SN( Config* settings, Mesh* mesh, QuadratureBase* quad ) : ProblemBase( settings, mesh, quad ) {} StarMapValidation_SN::~StarMapValidation_SN() {} -VectorVector StarMapValidation_SN::GetScatteringXS( const Vector& energies ) { +VectorVector StarMapValidation_SN::GetScatteringXS( const Vector& /*energies*/ ) { // @TODO // Specified in subclasses return VectorVector( 1, Vector( 1, 0.0 ) ); @@ -83,7 +83,8 @@ std::vector StarMapValidation_SN::GetDensity( const VectorVector& /*cell } // Moment version below -StarMapValidation_Moment::StarMapValidation_Moment( Config* settings, Mesh* mesh ) : StarMapValidation_SN( settings, mesh ) {} +StarMapValidation_Moment::StarMapValidation_Moment( Config* settings, Mesh* mesh, QuadratureBase* quad ) + : StarMapValidation_SN( settings, mesh, quad ) {} StarMapValidation_Moment::~StarMapValidation_Moment() {} @@ -99,9 +100,9 @@ VectorVector StarMapValidation_Moment::SetupIC() { double x = 0.0, y = 0.0, f = 0.0; for( unsigned idx_cell = 0; idx_cell < _mesh->GetNumCells(); ++idx_cell ) { - x = cellMidpoints[idx_cell][0]; - y = cellMidpoints[idx_cell][1]; - f = NormPDF( x, pos_beam[0], stddev ) * NormPDF( y, pos_beam[1], stddev ); + x = cellMidpoints[idx_cell][0]; + y = cellMidpoints[idx_cell][1]; + f = NormPDF( x, pos_beam[0], stddev ) * NormPDF( y, pos_beam[1], stddev ); initialSolution[idx_cell][0] = f * StarMAPmoments[0]; for( unsigned idx_sys = 1; idx_sys < ntotalEquations; idx_sys++ ) { diff --git a/src/problems/symmetrichohlraum.cpp b/src/problems/symmetrichohlraum.cpp new file mode 100644 index 00000000..73a65bc0 --- /dev/null +++ b/src/problems/symmetrichohlraum.cpp @@ -0,0 +1,452 @@ +#include "problems/symmetrichohlraum.hpp" +#include "common/config.hpp" +#include "common/io.hpp" +#include "common/mesh.hpp" +#include "quadratures/qgausslegendretensorized.hpp" +#include "quadratures/quadraturebase.hpp" +#include "solvers/csdpn_starmap_constants.hpp" +#include "toolboxes/errormessages.hpp" +#include "toolboxes/interpolation.hpp" +#include "toolboxes/textprocessingtoolbox.hpp" +#include "velocitybasis/sphericalbase.hpp" +#include "velocitybasis/sphericalharmonics.hpp" + +SymmetricHohlraum::SymmetricHohlraum( Config* settings, Mesh* mesh, QuadratureBase* quad ) : ProblemBase( settings, mesh, quad ) { + _sigmaS = Vector( _mesh->GetNumCells(), 0.1 ); // white area default + _sigmaT = Vector( _mesh->GetNumCells(), 0.1 ); // white area default + + // Design parameters defining the hohlraum geometry + + // Red + _redLeftTop = _settings->GetPosRedLeftTopHohlraum(); + _redLeftBottom = _settings->GetPosRedLeftBottomHohlraum(); + _redRightTop = _settings->GetPosRedRightTopHohlraum(); + _redRightBottom = _settings->GetPosRedRightBottomHohlraum(); + _posRedLeftBorder = _settings->GetPosRedLeftBorderHohlraum(); + _posRedRightBorder = _settings->GetPosRedRightBorderHohlraum(); + + // Green + _widthGreen = 0.4; + _heightGreen = 0.8; + _thicknessGreen = 0.05; + _centerGreen = { _settings->GetPosXCenterGreenHohlraum(), _settings->GetPosYCenterGreenHohlraum() }; + + _cornerUpperLeftGreen = { _centerGreen[0] - _widthGreen / 2.0, _centerGreen[1] + _heightGreen / 2.0 }; + _cornerLowerLeftGreen = { _centerGreen[0] - _widthGreen / 2.0, _centerGreen[1] - _heightGreen / 2.0 }; + _cornerUpperRightGreen = { _centerGreen[0] + _widthGreen / 2.0, _centerGreen[1] + _heightGreen / 2.0 }; + _cornerLowerRightGreen = { _centerGreen[0] + _widthGreen / 2.0, _centerGreen[1] - _heightGreen / 2.0 }; + + // QOIS + _curAbsorptionHohlraumCenter = 0.0; + _curAbsorptionHohlraumVertical = 0.0; + _curAbsorptionHohlraumHorizontal = 0.0; + _totalAbsorptionHohlraumCenter = 0.0; + _totalAbsorptionHohlraumVertical = 0.0; + _totalAbsorptionHohlraumHorizontal = 0.0; + _varAbsorptionHohlraumGreen = 0.0; + + _probingCells = { + _mesh->GetCellOfKoordinate( -0.4, 0. ), + _mesh->GetCellOfKoordinate( 0.4, 0. ), + _mesh->GetCellOfKoordinate( 0., -0.5 ), + _mesh->GetCellOfKoordinate( 0., 0.5 ), + }; + + _probingMoments = VectorVector( 4, Vector( 3, 0.0 ) ); + _nProbingCellsLineGreen = _settings->GetNumProbingCellsLineHohlraum(); + + SetProbingCellsLineGreen(); + _absorptionValsIntegrated = std::vector( _nProbingCellsLineGreen, 0.0 ); + _varAbsorptionValsIntegrated = std::vector( _nProbingCellsLineGreen, 0.0 ); + +#pragma omp parallel for + for( unsigned idx_cell = 0; idx_cell < _mesh->GetNumCells(); idx_cell++ ) { + // Assumption: Domain size is 1.3x1.3 + double x = _mesh->GetCellMidPoints()[idx_cell][0]; + double y = _mesh->GetCellMidPoints()[idx_cell][1]; + + // red area left + if( x < _posRedLeftBorder && y > _redLeftBottom && y < _redLeftTop ) { + _sigmaS[idx_cell] = 95.0; + _sigmaT[idx_cell] = 100.0; + } + // red area right + if( x > _posRedRightBorder && y > _redRightBottom && y < _redRightTop ) { + _sigmaS[idx_cell] = 95.0; + _sigmaT[idx_cell] = 100.0; + } + + // green area 1 (including blue area) + if( x > -0.2 + _centerGreen[0] && x < 0.2 + _centerGreen[0] && y > -0.4 + _centerGreen[1] && y < 0.4 + _centerGreen[1] ) { + _sigmaS[idx_cell] = 90.0; + _sigmaT[idx_cell] = 100.0; + } + // blue checkered area (overwrites part of green n blue area) + if( x > -0.15 + _centerGreen[0] && x < 0.15 + _centerGreen[0] && y > -0.35 + _centerGreen[1] && y < 0.35 + _centerGreen[1] ) { + _sigmaS[idx_cell] = 0.0; + _sigmaT[idx_cell] = 100.0; + } + // black area (upper and lower boundary) + if( y > 0.6 || y < -0.6 ) { + _sigmaS[idx_cell] = 50.0; + _sigmaT[idx_cell] = 100.0; + } + } + SetGhostCells(); +} + +SymmetricHohlraum::~SymmetricHohlraum() {} + +std::vector SymmetricHohlraum::GetExternalSource( const Vector& /* energies */ ) { + VectorVector Q( _mesh->GetNumCells(), Vector( 1u, 0.0 ) ); + return std::vector( 1u, Q ); +} + +VectorVector SymmetricHohlraum::SetupIC() { + VectorVector psi( _mesh->GetNumCells(), Vector( _settings->GetNQuadPoints(), 0.0 ) ); + VectorVector cellMids = _mesh->GetCellMidPoints(); + + for( unsigned j = 0; j < cellMids.size(); ++j ) { + psi[j] = 0.0; // zero initial condition + } + return psi; +} + +void SymmetricHohlraum::SetGhostCells() { + // Loop over all cells. If its a Dirichlet boundary, add cell to dict with {cell_idx, boundary_value} + auto cellBoundaries = _mesh->GetBoundaryTypes(); + std::map ghostCellMap; + + QuadratureBase* quad = QuadratureBase::Create( _settings ); + VectorVector vq = quad->GetPoints(); + unsigned nq = quad->GetNq(); + + Vector left_inflow( nq, 0.0 ); + Vector right_inflow( nq, 0.0 ); + Vector vertical_flow( nq, 0.0 ); + + for( unsigned idx_q = 0; idx_q < nq; idx_q++ ) { + if( vq[idx_q][0] > 0.0 ) left_inflow[idx_q] = 1.0; + if( vq[idx_q][0] < 0.0 ) right_inflow[idx_q] = 1.0; + } + + for( unsigned idx_cell = 0; idx_cell < _mesh->GetNumCells(); idx_cell++ ) { + double x = _mesh->GetCellMidPoints()[idx_cell][0]; + double y = _mesh->GetCellMidPoints()[idx_cell][1]; + + if( cellBoundaries[idx_cell] == BOUNDARY_TYPE::NEUMANN || cellBoundaries[idx_cell] == BOUNDARY_TYPE::DIRICHLET ) { + if( y < -0.6 ) + ghostCellMap.insert( { idx_cell, vertical_flow } ); + else if( y > 0.6 ) + ghostCellMap.insert( { idx_cell, vertical_flow } ); + else if( x < -0.6 ) + ghostCellMap.insert( { idx_cell, left_inflow } ); + else if( x > 0.6 ) + ghostCellMap.insert( { idx_cell, right_inflow } ); + } + } + _ghostCells = ghostCellMap; + + delete quad; +} + +const Vector& SymmetricHohlraum::GetGhostCellValue( int idx_cell, const Vector& /* cell_sol */ ) { return _ghostCells[idx_cell]; } + +VectorVector SymmetricHohlraum::GetScatteringXS( const Vector& /* energies */ ) { return VectorVector( 1u, _sigmaS ); } + +VectorVector SymmetricHohlraum::GetTotalXS( const Vector& /* energies */ ) { return VectorVector( 1u, _sigmaT ); } + +void SymmetricHohlraum::ComputeCurrentAbsorptionHohlraum( const Vector& scalarFlux ) { + _curAbsorptionHohlraumCenter = 0.0; // Green and blue areas of symmetric hohlraum + _curAbsorptionHohlraumVertical = 0.0; // Red areas of symmetric hohlraum + _curAbsorptionHohlraumHorizontal = 0.0; // Black areas of symmetric hohlraum + + unsigned nCells = _mesh->GetNumCells(); + auto cellMids = _mesh->GetCellMidPoints(); + std::vector areas = _mesh->GetCellAreas(); + +#pragma omp parallel for default( shared ) \ + reduction( + : _curAbsorptionHohlraumCenter, _curAbsorptionHohlraumVertical, _curAbsorptionHohlraumHorizontal ) + for( unsigned idx_cell = 0; idx_cell < nCells; idx_cell++ ) { + double x = _mesh->GetCellMidPoints()[idx_cell][0]; + double y = _mesh->GetCellMidPoints()[idx_cell][1]; + + if( x > -0.2 && x < 0.2 && y > -0.35 && y < 0.35 ) { + _curAbsorptionHohlraumCenter += scalarFlux[idx_cell] * ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ) * areas[idx_cell]; + } + if( ( x < -0.6 && y > -0.4 && y < 0.4 ) || ( x > 0.6 && y > -0.4 && y < 0.4 ) ) { + _curAbsorptionHohlraumVertical += scalarFlux[idx_cell] * ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ) * areas[idx_cell]; + } + if( y > 0.6 || y < -0.6 ) { + _curAbsorptionHohlraumHorizontal += scalarFlux[idx_cell] * ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ) * areas[idx_cell]; + } + } +} + +void SymmetricHohlraum::ComputeTotalAbsorptionHohlraum( double dT ) { + _totalAbsorptionHohlraumCenter += _curAbsorptionHohlraumCenter * dT; + _totalAbsorptionHohlraumVertical += _curAbsorptionHohlraumVertical * dT; + _totalAbsorptionHohlraumHorizontal += _curAbsorptionHohlraumHorizontal * dT; +} + +void SymmetricHohlraum::ComputeVarAbsorptionGreen( const Vector& scalarFlux ) { + double a_g = 0.0; + _varAbsorptionHohlraumGreen = 0.0; + + unsigned nCells = _mesh->GetNumCells(); + auto cellMids = _mesh->GetCellMidPoints(); + std::vector areas = _mesh->GetCellAreas(); + +#pragma omp parallel for default( shared ) reduction( + : a_g ) + for( unsigned idx_cell = 0; idx_cell < nCells; ++idx_cell ) { + double x = cellMids[idx_cell][0]; + double y = cellMids[idx_cell][1]; + // green area 1 (lower boundary) + bool green1 = x > -0.2 + _settings->GetPosXCenterGreenHohlraum() && x < -0.15 + _settings->GetPosXCenterGreenHohlraum() && + y > -0.35 + _settings->GetPosYCenterGreenHohlraum() && y < 0.35 + _settings->GetPosYCenterGreenHohlraum(); + // green area 2 (upper boundary) + bool green2 = x > 0.15 + _settings->GetPosXCenterGreenHohlraum() && x < 0.2 + _settings->GetPosXCenterGreenHohlraum() && + y > -0.35 + _settings->GetPosYCenterGreenHohlraum() && y < 0.35 + _settings->GetPosYCenterGreenHohlraum(); + // green area 3 (left boundary) + bool green3 = x > -0.2 + _settings->GetPosXCenterGreenHohlraum() && x < 0.2 + _settings->GetPosXCenterGreenHohlraum() && + y > -0.4 + _settings->GetPosYCenterGreenHohlraum() && y < -0.35 + _settings->GetPosYCenterGreenHohlraum(); + // green area 4 (right boundary) + bool green4 = x > -0.2 + _settings->GetPosXCenterGreenHohlraum() && x < 0.2 + _settings->GetPosXCenterGreenHohlraum() && + y > 0.35 + _settings->GetPosYCenterGreenHohlraum() && y < 0.4 + _settings->GetPosYCenterGreenHohlraum(); + + if( green1 || green2 || green3 || green4 ) { + a_g += ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ) * scalarFlux[idx_cell] * areas[idx_cell]; + } + } + +#pragma omp parallel for default( shared ) reduction( + : _varAbsorptionHohlraumGreen ) + for( unsigned idx_cell = 0; idx_cell < nCells; ++idx_cell ) { + double x = cellMids[idx_cell][0]; + double y = cellMids[idx_cell][1]; + // green area 1 (lower boundary) + bool green1 = x > -0.2 + _settings->GetPosXCenterGreenHohlraum() && x < -0.15 + _settings->GetPosXCenterGreenHohlraum() && + y > -0.35 + _settings->GetPosYCenterGreenHohlraum() && y < 0.35 + _settings->GetPosYCenterGreenHohlraum(); + // green area 2 (upper boundary) + bool green2 = x > 0.15 + _settings->GetPosXCenterGreenHohlraum() && x < 0.2 + _settings->GetPosXCenterGreenHohlraum() && + y > -0.35 + _settings->GetPosYCenterGreenHohlraum() && y < 0.35 + _settings->GetPosYCenterGreenHohlraum(); + // green area 3 (left boundary) + bool green3 = x > -0.2 + _settings->GetPosXCenterGreenHohlraum() && x < 0.2 + _settings->GetPosXCenterGreenHohlraum() && + y > -0.4 + _settings->GetPosYCenterGreenHohlraum() && y < -0.35 + _settings->GetPosYCenterGreenHohlraum(); + // green area 4 (right boundary) + bool green4 = x > -0.2 + _settings->GetPosXCenterGreenHohlraum() && x < 0.2 + _settings->GetPosXCenterGreenHohlraum() && + y > 0.35 + _settings->GetPosYCenterGreenHohlraum() && y < 0.4 + _settings->GetPosYCenterGreenHohlraum(); + + if( green1 || green2 || green3 || green4 ) { + _varAbsorptionHohlraumGreen += ( a_g - scalarFlux[idx_cell] * ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ) ) * + ( a_g - scalarFlux[idx_cell] * ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ) ) * areas[idx_cell]; + } + } +} + +void SymmetricHohlraum::ComputeCurrentProbeMoment( const VectorVector& solution ) { + const VectorVector& quadPoints = _quad->GetPoints(); + const Vector& weights = _quad->GetWeights(); + unsigned nq = _quad->GetNq(); + + for( unsigned idx_cell = 0; idx_cell < 4; idx_cell++ ) { // Loop over probing cells + _probingMoments[idx_cell][0] = blaze::dot( solution[_probingCells[idx_cell]], weights ); + _probingMoments[idx_cell][1] = 0.0; + _probingMoments[idx_cell][2] = 0.0; + + for( unsigned idx_quad = 0; idx_quad < nq; idx_quad++ ) { + _probingMoments[idx_cell][1] += quadPoints[idx_quad][0] * solution[_probingCells[idx_cell]][idx_quad] * weights[idx_quad]; + _probingMoments[idx_cell][2] += quadPoints[idx_quad][2] * solution[_probingCells[idx_cell]][idx_quad] * weights[idx_quad]; + } + } +} + +void SymmetricHohlraum::SetProbingCellsLineGreen() { + + double verticalLineWidth = std::abs( _cornerUpperLeftGreen[1] - _cornerLowerLeftGreen[1] - _thicknessGreen ); + double horizontalLineWidth = std::abs( _cornerUpperLeftGreen[0] - _cornerUpperRightGreen[0] ); + + // double dx = 2 * ( horizontalLineWidth + verticalLineWidth ) / ( (double)_nProbingCellsLineGreen ); + + unsigned nHorizontalProbingCells = + (unsigned)std::ceil( _nProbingCellsLineGreen / 2 * ( horizontalLineWidth / ( horizontalLineWidth + verticalLineWidth ) ) ); + unsigned nVerticalProbingCells = _nProbingCellsLineGreen - nHorizontalProbingCells; + + _probingCellsLineGreen = std::vector( _nProbingCellsLineGreen ); + + std::vector p1 = { _cornerUpperLeftGreen[0] + _thicknessGreen / 2.0, _cornerUpperLeftGreen[1] - _thicknessGreen / 2.0 }; + std::vector p2 = { _cornerLowerLeftGreen[0] + _thicknessGreen / 2.0, _cornerLowerLeftGreen[1] + _thicknessGreen / 2.0 }; + std::vector p3 = { _cornerUpperRightGreen[0] - _thicknessGreen / 2.0, _cornerUpperRightGreen[1] - _thicknessGreen / 2.0 }; + std::vector p4 = { _cornerLowerRightGreen[0] - _thicknessGreen / 2.0, _cornerLowerRightGreen[1] + _thicknessGreen / 2.0 }; + + // Sample points on each side of the rectangle + std::vector side1 = linspace2D( p1, p2, nVerticalProbingCells ); + std::vector side2 = linspace2D( p2, p3, nHorizontalProbingCells ); + std::vector side3 = linspace2D( p3, p4, nVerticalProbingCells ); + std::vector side4 = linspace2D( p4, p1, nHorizontalProbingCells ); + + // printf( "here" ); + // Combine the points from each side + _probingCellsLineGreen.insert( _probingCellsLineGreen.end(), side1.begin(), side1.end() ); + _probingCellsLineGreen.insert( _probingCellsLineGreen.end(), side2.begin(), side2.end() ); + _probingCellsLineGreen.insert( _probingCellsLineGreen.end(), side3.begin(), side3.end() ); + _probingCellsLineGreen.insert( _probingCellsLineGreen.end(), side4.begin(), side4.end() ); +} + +void SymmetricHohlraum::ComputeQOIsGreenProbingLine( const Vector& scalarFlux ) { + + double verticalLineWidth = std::abs( _cornerUpperLeftGreen[1] - _cornerLowerLeftGreen[1] - _thicknessGreen ); + double horizontalLineWidth = std::abs( _cornerUpperLeftGreen[0] - _cornerUpperRightGreen[0] - _thicknessGreen ); + + double dl = 2 * ( horizontalLineWidth + verticalLineWidth ) / ( (double)_nProbingCellsLineGreen ); + double area = dl * _thicknessGreen; + double a_g = 0; + double l_max = _nProbingCellsLineGreen * dl; + + for( unsigned i = 0; i < _nProbingCellsLineGreen; i++ ) { // Loop over probing cells + _absorptionValsIntegrated[i] = + ( _sigmaT[_probingCellsLineGreen[i]] - _sigmaS[_probingCellsLineGreen[i]] ) * scalarFlux[_probingCellsLineGreen[i]] * area; + a_g += _absorptionValsIntegrated[i] / (double)_nProbingCellsLineGreen; + } + for( unsigned i = 0; i < _nProbingCellsLineGreen; i++ ) { // Loop over probing cells + _varAbsorptionValsIntegrated[i] = dl / l_max * ( a_g - _absorptionValsIntegrated[i] ) * ( a_g - _absorptionValsIntegrated[i] ); + } +} + +std::vector SymmetricHohlraum::linspace2D( const std::vector& start, const std::vector& end, unsigned num_points ) { + std::vector result; + result.resize( num_points ); + double stepX = ( end[0] - start[0] ) / ( num_points - 1 ); + double stepY = ( end[1] - start[1] ) / ( num_points - 1 ); + + for( unsigned i = 0; i < num_points; ++i ) { + double x = start[0] + i * stepX; + double y = start[1] + i * stepY; + + result[i] = _mesh->GetCellOfKoordinate( x, y ); + } + + return result; +} +// -------------- Moment Symmetric Hohlraum --------------- + +SymmetricHohlraum_Moment::SymmetricHohlraum_Moment( Config* settings, Mesh* mesh, QuadratureBase* quad ) + : SymmetricHohlraum( settings, mesh, quad ) {} + +SymmetricHohlraum_Moment::~SymmetricHohlraum_Moment() {} + +std::vector SymmetricHohlraum_Moment::GetExternalSource( const Vector& /* energies */ ) { + // In case of PN, spherical basis is per default SPHERICAL_HARMONICS + + double integrationFactor = ( 4 * M_PI ); + if( _settings->GetDim() == 2 ) { + integrationFactor = M_PI; + } + SphericalBase* tempBase = SphericalBase::Create( _settings ); + unsigned ntotalEquations = tempBase->GetBasisSize(); + + VectorVector Q( _mesh->GetNumCells(), Vector( ntotalEquations, 0.0 ) ); // zero could lead to problems? + VectorVector cellMids = _mesh->GetCellMidPoints(); + + Vector uIC( ntotalEquations, 0 ); + + if( _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS || _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS_ROTATED ) { + QuadratureBase* quad = QuadratureBase::Create( _settings ); + VectorVector quadPointsSphere = quad->GetPointsSphere(); + Vector w = quad->GetWeights(); + + double my, phi; + VectorVector moments = VectorVector( quad->GetNq(), Vector( tempBase->GetBasisSize(), 0.0 ) ); + + for( unsigned idx_quad = 0; idx_quad < quad->GetNq(); idx_quad++ ) { + my = quadPointsSphere[idx_quad][0]; + phi = quadPointsSphere[idx_quad][1]; + moments[idx_quad] = tempBase->ComputeSphericalBasis( my, phi ); + } + // Integrate <1*m> to get factors for monomial basis in isotropic scattering + for( unsigned idx_quad = 0; idx_quad < quad->GetNq(); idx_quad++ ) { + uIC += w[idx_quad] * moments[idx_quad]; + } + delete quad; + } + double kinetic_density = 0.0; //_settings->GetSourceMagnitude(); + for( unsigned j = 0; j < cellMids.size(); ++j ) { + if( cellMids[j][0] < 0.05 ) { + if( _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS || _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS_ROTATED ) { + Q[j] = kinetic_density * uIC / uIC[0] / integrationFactor; // Remember scaling + } + if( _settings->GetSphericalBasisName() == SPHERICAL_HARMONICS ) { + Q[j][0] = kinetic_density / integrationFactor; // first bassis function is 1/ ( 4 * M_PI ) + } + } + } + delete tempBase; // Only temporally needed + return std::vector( 1u, Q ); +} + +VectorVector SymmetricHohlraum_Moment::SetupIC() { + double integrationFactor = ( 4 * M_PI ); + if( _settings->GetDim() == 2 ) { + integrationFactor = M_PI; + } + // In case of PN, spherical basis is per default SPHERICAL_HARMONICS + SphericalBase* tempBase = SphericalBase::Create( _settings ); + unsigned ntotalEquations = tempBase->GetBasisSize(); + + VectorVector initialSolution( _mesh->GetNumCells(), Vector( ntotalEquations, 0 ) ); // zero could lead to problems? + VectorVector cellMids = _mesh->GetCellMidPoints(); + + Vector tempIC( ntotalEquations, 0 ); + + if( _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS || _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS_ROTATED ) { + QuadratureBase* quad = QuadratureBase::Create( _settings ); + VectorVector quadPointsSphere = quad->GetPointsSphere(); + Vector w = quad->GetWeights(); + + double my, phi; + VectorVector moments = VectorVector( quad->GetNq(), Vector( tempBase->GetBasisSize(), 0.0 ) ); + + for( unsigned idx_quad = 0; idx_quad < quad->GetNq(); idx_quad++ ) { + my = quadPointsSphere[idx_quad][0]; + phi = quadPointsSphere[idx_quad][1]; + moments[idx_quad] = tempBase->ComputeSphericalBasis( my, phi ); + } + // Integrate <1*m> to get factors for monomial basis in isotropic scattering + for( unsigned idx_quad = 0; idx_quad < quad->GetNq(); idx_quad++ ) { + tempIC += w[idx_quad] * moments[idx_quad]; + } + delete quad; + } + // Initial condition is dirac impulse at (x,y) = (0,0) ==> constant in angle ==> all moments - exept first - are zero. + double kinetic_density = 1e-4; + // std::vector _boundaryCells; + for( unsigned j = 0; j < cellMids.size(); ++j ) { + + // boundary condition: Source on left side + if( cellMids[j][0] < 0.0 && ( cellMids[j][1] > 0.0 && cellMids[j][1] < 1.3 ) ) { // test case uses ghost cells + kinetic_density = _settings->GetSourceMagnitude(); + _mesh->SetBoundaryType( j, DIRICHLET ); + } + else { + kinetic_density = 1e-4; + } + + if( _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS || _settings->GetSphericalBasisName() == SPHERICAL_MONOMIALS_ROTATED ) { + initialSolution[j] = kinetic_density * tempIC / tempIC[0] / integrationFactor; // Remember scaling + } + if( _settings->GetSphericalBasisName() == SPHERICAL_HARMONICS ) { + initialSolution[j][0] = kinetic_density / integrationFactor; // first bassis function is 1/ ( 4 * M_PI ) + } + } + delete tempBase; // Only temporally needed + return initialSolution; +} + +void SymmetricHohlraum_Moment::ComputeCurrentProbeMoment( const VectorVector& solution ) { + for( unsigned idx_cell = 0; idx_cell < 4; idx_cell++ ) { // Loop over probing cells + _probingMoments[idx_cell][0] = solution[_probingCells[idx_cell]][0]; + if( _probingMoments[idx_cell].size() > 1 ) { + _probingMoments[idx_cell][1] = solution[_probingCells[idx_cell]][1]; + _probingMoments[idx_cell][2] = solution[_probingCells[idx_cell]][2]; + } + } +} \ No newline at end of file diff --git a/src/quadratures/qgausslegendretensorized2D.cpp b/src/quadratures/qgausslegendretensorized2D.cpp index 5f26bfd6..618be423 100644 --- a/src/quadratures/qgausslegendretensorized2D.cpp +++ b/src/quadratures/qgausslegendretensorized2D.cpp @@ -58,7 +58,7 @@ void QGaussLegendreTensorized2D::SetPointsAndWeights() { } unsigned range = std::floor( _order / 2.0 ); // comment (steffen): Only half of the points, due to projection - double normalizationFactor = .5; + double normalizationFactor = 0.5; // resize points and weights _pointsKarth.resize( _nq ); diff --git a/src/solvers/csdmnsolver.cpp b/src/solvers/csdmnsolver.cpp index 01025aba..327003b8 100644 --- a/src/solvers/csdmnsolver.cpp +++ b/src/solvers/csdmnsolver.cpp @@ -113,20 +113,17 @@ void CSDMNSolver::SolverPreprocessing() { } void CSDMNSolver::IterPostprocessing( unsigned idx_iter ) { - // --- Update Solution --- - //_sol = _solNew; - // --- Compute Flux for solution and Screen Output --- - ComputeRadFlux(); + ComputeScalarFlux(); // --- Compute Dose --- #pragma omp parallel for for( unsigned j = 0; j < _nCells; ++j ) { if( idx_iter > 0 && idx_iter < _nEnergies - 1 ) { - _dose[j] += _dE * ( _sol[j][0] * _sMid[idx_iter] ) / _density[j]; // update dose with trapezoidal rule // diss Kerstin + _dose[j] += _dT * ( _sol[j][0] * _sMid[idx_iter] ) / _density[j]; // update dose with trapezoidal rule // diss Kerstin } else { - _dose[j] += 0.5 * _dE * ( _sol[j][0] * _sMid[idx_iter] ) / _density[j]; + _dose[j] += 0.5 * _dT * ( _sol[j][0] * _sMid[idx_iter] ) / _density[j]; } } } @@ -186,7 +183,7 @@ void CSDMNSolver::FluxUpdate() { void CSDMNSolver::FVMUpdate( unsigned idx_energy ) { bool implicitScattering = true; // transform energy difference - _dE = fabs( _eTrafo[idx_energy + 1] - _eTrafo[idx_energy] ); + _dT = fabs( _eTrafo[idx_energy + 1] - _eTrafo[idx_energy] ); // loop over all spatial cells #pragma omp parallel for for( unsigned idx_cell = 0; idx_cell < _nCells; idx_cell++ ) { @@ -197,13 +194,13 @@ void CSDMNSolver::FVMUpdate( unsigned idx_energy ) { int idx_sys = _basis->GetGlobalIndexBasis( idx_l, idx_k ); if( implicitScattering ) { _solNew[idx_cell][idx_sys] = - _sol[idx_cell][idx_sys] - ( _dE / _areas[idx_cell] ) * _solNew[idx_cell][idx_sys]; /* cell averaged flux */ - _solNew[idx_cell][idx_sys] = _solNew[idx_cell][idx_sys] / ( 1.0 + _dE * _sigmaTAtEnergy[idx_l] ); /* implicit scattering */ + _sol[idx_cell][idx_sys] - ( _dT / _areas[idx_cell] ) * _solNew[idx_cell][idx_sys]; /* cell averaged flux */ + _solNew[idx_cell][idx_sys] = _solNew[idx_cell][idx_sys] / ( 1.0 + _dT * _sigmaTAtEnergy[idx_l] ); /* implicit scattering */ } else { _solNew[idx_cell][idx_sys] = _sol[idx_cell][idx_sys] - - ( _dE / _areas[idx_cell] ) * _solNew[idx_cell][idx_sys] /* cell averaged flux */ - - _dE * _sol[idx_cell][idx_sys] * _sigmaTAtEnergy[idx_l]; /* scattering */ + ( _dT / _areas[idx_cell] ) * _solNew[idx_cell][idx_sys] /* cell averaged flux */ + - _dT * _sol[idx_cell][idx_sys] * _sigmaTAtEnergy[idx_l]; /* scattering */ } } // Source Term TODO @@ -304,13 +301,13 @@ void CSDMNSolver::WriteVolumeOutput( unsigned idx_pseudoTime ) { unsigned nGroups = (unsigned)_settings->GetNVolumeOutput(); double maxDose; if( ( _settings->GetVolumeOutputFrequency() != 0 && idx_pseudoTime % (unsigned)_settings->GetVolumeOutputFrequency() == 0 ) || - ( idx_pseudoTime == _maxIter - 1 ) /* need sol at last iteration */ ) { + ( idx_pseudoTime == _nIter - 1 ) /* need sol at last iteration */ ) { for( unsigned idx_group = 0; idx_group < nGroups; idx_group++ ) { switch( _settings->GetVolumeOutput()[idx_group] ) { case MINIMAL: for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { - _outputFields[idx_group][0][idx_cell] = _fluxNew[idx_cell]; + _outputFields[idx_group][0][idx_cell] = _scalarFluxNew[idx_cell]; } break; diff --git a/src/solvers/csdpnsolver.cpp b/src/solvers/csdpnsolver.cpp index 9ad9a0f2..ee6925e7 100644 --- a/src/solvers/csdpnsolver.cpp +++ b/src/solvers/csdpnsolver.cpp @@ -93,19 +93,17 @@ void CSDPNSolver::IterPreprocessing( unsigned idx_iter ) { void CSDPNSolver::SolverPreprocessing() {} void CSDPNSolver::IterPostprocessing( unsigned idx_iter ) { - // --- Update Solution --- - //_sol = _solNew; // --- Compute Flux for solution and Screen Output --- - ComputeRadFlux(); + ComputeScalarFlux(); // -- Compute Dose for( unsigned j = 0; j < _nCells; ++j ) { if( idx_iter > 0 && idx_iter < _nEnergies - 1 ) { - _dose[j] += _dE * ( _sol[j][0] * _sMid[idx_iter] ) / _density[j]; // update dose with trapezoidal rule // diss Kerstin + _dose[j] += _dT * ( _sol[j][0] * _sMid[idx_iter] ) / _density[j]; // update dose with trapezoidal rule // diss Kerstin } else { - _dose[j] += 0.5 * _dE * ( _sol[j][0] * _sMid[idx_iter] ) / _density[j]; + _dose[j] += 0.5 * _dT * ( _sol[j][0] * _sMid[idx_iter] ) / _density[j]; } } } @@ -193,7 +191,7 @@ void CSDPNSolver::FluxUpdate() { void CSDPNSolver::FVMUpdate( unsigned idx_energy ) { bool implicitScattering = true; // transform energy difference - _dE = fabs( _eTrafo[idx_energy + 1] - _eTrafo[idx_energy] ); + _dT = fabs( _eTrafo[idx_energy + 1] - _eTrafo[idx_energy] ); // loop over all spatial cells #pragma omp parallel for @@ -205,13 +203,13 @@ void CSDPNSolver::FVMUpdate( unsigned idx_energy ) { int idx_sys = GlobalIndex( idx_l, idx_k ); if( implicitScattering ) { _solNew[idx_cell][idx_sys] = - _sol[idx_cell][idx_sys] - ( _dE / _areas[idx_cell] ) * _solNew[idx_cell][idx_sys]; /* cell averaged flux */ - _solNew[idx_cell][idx_sys] = _solNew[idx_cell][idx_sys] / ( 1.0 + _dE * _sigmaTAtEnergy[idx_l] ); /* implicit scattering */ + _sol[idx_cell][idx_sys] - ( _dT / _areas[idx_cell] ) * _solNew[idx_cell][idx_sys]; /* cell averaged flux */ + _solNew[idx_cell][idx_sys] = _solNew[idx_cell][idx_sys] / ( 1.0 + _dT * _sigmaTAtEnergy[idx_l] ); /* implicit scattering */ } else { _solNew[idx_cell][idx_sys] = _sol[idx_cell][idx_sys] - - ( _dE / _areas[idx_cell] ) * _solNew[idx_cell][idx_sys] /* cell averaged flux */ - - _dE * _sol[idx_cell][idx_sys] * _sigmaTAtEnergy[idx_l]; /* scattering */ + ( _dT / _areas[idx_cell] ) * _solNew[idx_cell][idx_sys] /* cell averaged flux */ + - _dT * _sol[idx_cell][idx_sys] * _sigmaTAtEnergy[idx_l]; /* scattering */ } } // Source Term @@ -276,13 +274,13 @@ void CSDPNSolver::WriteVolumeOutput( unsigned idx_pseudoTime ) { unsigned nGroups = (unsigned)_settings->GetNVolumeOutput(); double maxDose; if( ( _settings->GetVolumeOutputFrequency() != 0 && idx_pseudoTime % (unsigned)_settings->GetVolumeOutputFrequency() == 0 ) || - ( idx_pseudoTime == _maxIter - 1 ) /* need sol at last iteration */ ) { + ( idx_pseudoTime == _nIter - 1 ) /* need sol at last iteration */ ) { for( unsigned idx_group = 0; idx_group < nGroups; idx_group++ ) { switch( _settings->GetVolumeOutput()[idx_group] ) { case MINIMAL: for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { - _outputFields[idx_group][0][idx_cell] = _fluxNew[idx_cell]; + _outputFields[idx_group][0][idx_cell] = _scalarFluxNew[idx_cell]; } break; diff --git a/src/solvers/csdsnsolver.cpp b/src/solvers/csdsnsolver.cpp index 0f11fd7a..fe9f593a 100644 --- a/src/solvers/csdsnsolver.cpp +++ b/src/solvers/csdsnsolver.cpp @@ -13,7 +13,6 @@ // externals #include "spdlog/spdlog.h" -#include CSDSNSolver::CSDSNSolver( Config* settings ) : SNSolver( settings ) { _dose = std::vector( _settings->GetNCells(), 0.0 ); @@ -98,7 +97,7 @@ void CSDSNSolver::IterPreprocessing( unsigned idx_pseudotime ) { _mesh->ComputeLimiter( _nq, _solDx, _solDy, solDivRho, _limiter ); } - _dE = fabs( _eTrafo[idx_pseudotime + 1] - _eTrafo[idx_pseudotime] ); + _dT = fabs( _eTrafo[idx_pseudotime + 1] - _eTrafo[idx_pseudotime] ); Vector sigmaSAtEnergy( _polyDegreeBasis + 1, 0.0 ); Vector sigmaTAtEnergy( _polyDegreeBasis + 1, 0.0 ); @@ -120,27 +119,17 @@ void CSDSNSolver::IterPreprocessing( unsigned idx_pseudotime ) { Vector u = _M * _sol[j]; unsigned counter = 0; - for( unsigned l = 0; l <= _polyDegreeBasis; ++l ) { + for( int l = 0; l <= (int)_polyDegreeBasis; ++l ) { for( int m = -l; m <= l; ++m ) { - u[counter] = u[counter] / ( 1.0 + _dE * sigmaTAtEnergy[l] ); + u[counter] = u[counter] / ( 1.0 + _dT * sigmaTAtEnergy[l] ); counter++; } } _sol[j] = _O * u; - //_sol[j] = blaze::solve( _identity + _dE * _O * Sigma * _M, _sol[j] ); } } -void CSDSNSolver::SolverPreprocessing() { - // Need to transform ordinate solution with density and scattering, depending on problem setup - // do substitution from psi to psiTildeHat (cf. Dissertation Kerstion Kuepper, Eq. 1.23) - //#pragma omp parallel for - // for( unsigned j = 0; j < _nCells; ++j ) { - // for( unsigned k = 0; k < _nq; ++k ) { - // _sol[j][k] = _sol[j][k] * _density[j] * _s[0]; // note that _s[_nEnergies - 1] is stopping power at highest energy - // } - // } -} +void CSDSNSolver::SolverPreprocessing() {} void CSDSNSolver::IterPostprocessing( unsigned idx_pseudotime ) { unsigned n = idx_pseudotime; @@ -151,12 +140,12 @@ void CSDSNSolver::IterPostprocessing( unsigned idx_pseudotime ) { // -- Compute Dose #pragma omp parallel for for( unsigned j = 0; j < _nCells; ++j ) { - _fluxNew[j] = dot( _sol[j], _weights ); // unscaled rad flux + _scalarFluxNew[j] = dot( _sol[j], _weights ); // unscaled rad flux if( n > 0 && n < _nEnergies - 1 ) { - _dose[j] += _dE * ( _fluxNew[j] * _sMid[n] ) / _density[j]; // update dose with trapezoidal rule // diss Kerstin + _dose[j] += _dT * ( _scalarFluxNew[j] * _sMid[n] ) / _density[j]; // update dose with trapezoidal rule // diss Kerstin } else { - _dose[j] += 0.5 * _dE * ( _fluxNew[j] * _sMid[n] ) / _density[j]; + _dose[j] += 0.5 * _dT * ( _scalarFluxNew[j] * _sMid[n] ) / _density[j]; } } } @@ -212,7 +201,7 @@ void CSDSNSolver::FVMUpdate( unsigned /*idx_energy*/ ) { // loop over all ordinates for( unsigned i = 0; i < _nq; ++i ) { // time update angular flux with numerical flux and total scattering cross section - _solNew[j][i] = _sol[j][i] - _dE * _solNew[j][i]; + _solNew[j][i] = _sol[j][i] - _dT * _solNew[j][i]; } } } @@ -260,13 +249,13 @@ void CSDSNSolver::WriteVolumeOutput( unsigned idx_pseudoTime ) { unsigned nGroups = (unsigned)_settings->GetNVolumeOutput(); double maxDose; if( ( _settings->GetVolumeOutputFrequency() != 0 && idx_pseudoTime % (unsigned)_settings->GetVolumeOutputFrequency() == 0 ) || - ( idx_pseudoTime == _maxIter - 1 ) /* need sol at last iteration */ ) { + ( idx_pseudoTime == _nIter - 1 ) /* need sol at last iteration */ ) { for( unsigned idx_group = 0; idx_group < nGroups; idx_group++ ) { switch( _settings->GetVolumeOutput()[idx_group] ) { case MINIMAL: for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { - _outputFields[idx_group][0][idx_cell] = _fluxNew[idx_cell]; + _outputFields[idx_group][0][idx_cell] = _scalarFluxNew[idx_cell]; } break; diff --git a/src/solvers/mnsolver.cpp b/src/solvers/mnsolver.cpp index 7b5246df..7f634ec7 100644 --- a/src/solvers/mnsolver.cpp +++ b/src/solvers/mnsolver.cpp @@ -13,7 +13,6 @@ // externals #include "spdlog/spdlog.h" -#include MNSolver::MNSolver( Config* settings ) : SolverBase( settings ) { @@ -21,7 +20,6 @@ MNSolver::MNSolver( Config* settings ) : SolverBase( settings ) { _basis = SphericalBase::Create( _settings ); _nSystem = _basis->GetBasisSize(); - // build quadrature object and store quadrature points and weights _quadPoints = _quadrature->GetPoints(); _weights = _quadrature->GetWeights(); @@ -131,12 +129,7 @@ void MNSolver::IterPreprocessing( unsigned /*idx_pseudotime*/ ) { } } -void MNSolver::IterPostprocessing( unsigned /*idx_iter*/ ) { - // --- Compute Flux for solution and Screen Output --- - ComputeRadFlux(); -} - -void MNSolver::ComputeRadFlux() { +void MNSolver::ComputeScalarFlux() { double firstMomentScaleFactor = 4 * M_PI; if( _settings->GetProblemName() == PROBLEM_Aircavity1D || _settings->GetProblemName() == PROBLEM_Linesource1D || _settings->GetProblemName() == PROBLEM_Checkerboard1D ) { @@ -147,7 +140,7 @@ void MNSolver::ComputeRadFlux() { } #pragma omp parallel for for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { - _fluxNew[idx_cell] = _sol[idx_cell][0] * firstMomentScaleFactor; + _scalarFluxNew[idx_cell] = _sol[idx_cell][0] * firstMomentScaleFactor; } } @@ -258,20 +251,39 @@ void MNSolver::FluxUpdatePseudo2D() { } void MNSolver::FVMUpdate( unsigned idx_iter ) { + if( _Q.size() == 1u && _sigmaT.size() == 1u && _sigmaS.size() == 1u ) { // Physics constant in time // Loop over the grid cells #pragma omp parallel for - for( unsigned idx_cell = 0; idx_cell < _nCells; idx_cell++ ) { - // Dirichlet Boundaries stay - if( _boundaryCells[idx_cell] == BOUNDARY_TYPE::DIRICHLET ) continue; - // Flux update - for( unsigned idx_sys = 0; idx_sys < _nSystem; idx_sys++ ) { - _solNew[idx_cell][idx_sys] = _sol[idx_cell][idx_sys] /* old solution */ - - ( _dE / _areas[idx_cell] ) * _solNew[idx_cell][idx_sys] /* cell averaged flux */ - + _dE * _sigmaS[idx_iter][idx_cell] * _sol[idx_cell][0] * _scatterMatDiag[idx_sys] /* scattering gain */ - - _dE * ( _sigmaT[idx_iter][idx_cell] ) * _sol[idx_cell][idx_sys]; /* scattering and absorbtion loss */ + for( unsigned idx_cell = 0; idx_cell < _nCells; idx_cell++ ) { + // Dirichlet Boundaries stay + if( _boundaryCells[idx_cell] == BOUNDARY_TYPE::DIRICHLET ) continue; + // Flux update + for( unsigned idx_sys = 0; idx_sys < _nSystem; idx_sys++ ) { + _solNew[idx_cell][idx_sys] = _sol[idx_cell][idx_sys] /* old solution */ + - ( _dT / _areas[idx_cell] ) * _solNew[idx_cell][idx_sys] /* cell averaged flux */ + + _dT * _sigmaS[0][idx_cell] * _sol[idx_cell][0] * _scatterMatDiag[idx_sys] /* scattering gain */ + - _dT * ( _sigmaT[0][idx_cell] ) * _sol[idx_cell][idx_sys]; /* scattering and absorbtion loss */ + } + // Source Term + _solNew[idx_cell] += _dT * _Q[0][idx_cell]; + } + } + else { + // Loop over the grid cells +#pragma omp parallel for + for( unsigned idx_cell = 0; idx_cell < _nCells; idx_cell++ ) { + // Dirichlet Boundaries stay + if( _boundaryCells[idx_cell] == BOUNDARY_TYPE::DIRICHLET ) continue; + // Flux update + for( unsigned idx_sys = 0; idx_sys < _nSystem; idx_sys++ ) { + _solNew[idx_cell][idx_sys] = _sol[idx_cell][idx_sys] /* old solution */ + - ( _dT / _areas[idx_cell] ) * _solNew[idx_cell][idx_sys] /* cell averaged flux */ + + _dT * _sigmaS[idx_iter][idx_cell] * _sol[idx_cell][0] * _scatterMatDiag[idx_sys] /* scattering gain */ + - _dT * ( _sigmaT[idx_iter][idx_cell] ) * _sol[idx_cell][idx_sys]; /* scattering and absorbtion loss */ + } + // Source Term + _solNew[idx_cell] += _dT * _Q[idx_iter][idx_cell]; } - // Source Term - _solNew[idx_cell] += _dE * _Q[0][idx_cell]; } } @@ -404,7 +416,7 @@ void MNSolver::WriteVolumeOutput( unsigned idx_iter ) { switch( _settings->GetVolumeOutput()[idx_group] ) { case MINIMAL: for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { - _outputFields[idx_group][0][idx_cell] = _fluxNew[idx_cell]; + _outputFields[idx_group][0][idx_cell] = _scalarFluxNew[idx_cell]; } break; case MOMENTS: @@ -424,7 +436,7 @@ void MNSolver::WriteVolumeOutput( unsigned idx_iter ) { case ANALYTIC: // Compute total "mass" of the system ==> to check conservation properties for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { - double time = idx_iter * _dE; + double time = idx_iter * _dT; _outputFields[idx_group][0][idx_cell] = _problem->GetAnalyticalSolution( _mesh->GetCellMidPoints()[idx_cell][0], _mesh->GetCellMidPoints()[idx_cell][1], time, _sigmaS[idx_iter][idx_cell] ); } diff --git a/src/solvers/mnsolver_normalized.cpp b/src/solvers/mnsolver_normalized.cpp index a622b4f3..06db2bbf 100644 --- a/src/solvers/mnsolver_normalized.cpp +++ b/src/solvers/mnsolver_normalized.cpp @@ -17,7 +17,6 @@ // externals #include "spdlog/spdlog.h" #include -#include MNSolverNormalized::MNSolverNormalized( Config* settings ) : MNSolver( settings ) { _u0 = Vector( _nCells, 0.0 ); @@ -32,13 +31,13 @@ MNSolverNormalized::MNSolverNormalized( Config* settings ) : MNSolver( settings MNSolverNormalized::~MNSolverNormalized() {} -void MNSolverNormalized::IterPreprocessing( unsigned idx_pseudotime ) { +void MNSolverNormalized::IterPreprocessing( unsigned /*idx_pseudotime*/ ) { Vector alpha_norm_per_cell( _nCells, 0 ); // ONLY FOR DEBUGGING! THIS SLOWS DOWN THE CODE - //if (idx_pseudotime < 1600){ - // // preprocessor - // _optimizer3->SolveMultiCell( _alpha, _sol, _momentBasis, alpha_norm_per_cell ); // Newton for the first few iterations -// + // if (idx_pseudotime < 1600){ + // // preprocessor + // _optimizer3->SolveMultiCell( _alpha, _sol, _momentBasis, alpha_norm_per_cell ); // Newton for the first few iterations + // // #pragma omp parallel for // for( unsigned idx_cell = 0; idx_cell < _nCells; idx_cell++ ) { // for( unsigned idx_quad = 0; idx_quad < _nq; idx_quad++ ) { @@ -47,28 +46,27 @@ void MNSolverNormalized::IterPreprocessing( unsigned idx_pseudotime ) { // } // } //} - //else + // else { - //std::cout << "Start Network based closure"; - //if (idx_pseudotime==1600){ - // #pragma omp parallel for - // for( unsigned idx_cell = 0; idx_cell < _nCells; idx_cell++ ) { - // _sol[idx_cell][0] = max(1e-10, _sol[idx_cell][0]); - // } - //} - // ------- Entropy closure Step ---------------- - #pragma omp parallel for + // std::cout << "Start Network based closure"; + // if (idx_pseudotime==1600){ + // #pragma omp parallel for + // for( unsigned idx_cell = 0; idx_cell < _nCells; idx_cell++ ) { + // _sol[idx_cell][0] = max(1e-10, _sol[idx_cell][0]); + // } + // } + // ------- Entropy closure Step ---------------- +#pragma omp parallel for for( unsigned idx_cell = 0; idx_cell < _nCells; idx_cell++ ) { _u0[idx_cell] = _sol[idx_cell][0]; _sol[idx_cell] /= _u0[idx_cell]; // assume _u0 > 0 always!! } - _optimizer->SolveMultiCell( _alpha, _sol, _momentBasis, alpha_norm_per_cell ); // Newton for the first few iterations int norm_err = 0.0; // Check if solution is close to reconstruction, if not, apply newton optimizer - #pragma omp parallel for +#pragma omp parallel for for( unsigned idx_cell = 0; idx_cell < _nCells; idx_cell++ ) { _optimizer2->ReconstructMoments( _sol2[idx_cell], _alpha[idx_cell], _momentBasis ); //_optimizer2->ReconstructMoments( _sol2[idx_cell], _alpha[idx_cell], _momentBasis ); @@ -83,31 +81,31 @@ void MNSolverNormalized::IterPreprocessing( unsigned idx_pseudotime ) { } } std::cout << "Number of inaccurate cells: " << norm_err << "\n"; - - // ------- Solution reconstruction step ---- + + // ------- Solution reconstruction step ---- #pragma omp parallel for - for( unsigned idx_cell = 0; idx_cell < _nCells; idx_cell++ ) { - alpha_norm_per_cell[idx_cell] *= _momentBasis[0][0] * 0.5 * _settings->GetRegularizerGamma(); // is constant - if( _settings->GetEntropyDynamicAnsatz() ) { - for( unsigned idx_quad = 0; idx_quad < _nq; idx_quad++ ) { - // compute the kinetic density at all grid cells - _kineticDensity[idx_cell][idx_quad] = - _u0[idx_cell] * - _entropy->EntropyPrimeDual( blaze::dot( _alpha[idx_cell], _momentBasis[idx_quad] ) - alpha_norm_per_cell[idx_cell] ); + for( unsigned idx_cell = 0; idx_cell < _nCells; idx_cell++ ) { + alpha_norm_per_cell[idx_cell] *= _momentBasis[0][0] * 0.5 * _settings->GetRegularizerGamma(); // is constant + if( _settings->GetEntropyDynamicAnsatz() ) { + for( unsigned idx_quad = 0; idx_quad < _nq; idx_quad++ ) { + // compute the kinetic density at all grid cells + _kineticDensity[idx_cell][idx_quad] = + _u0[idx_cell] * + _entropy->EntropyPrimeDual( blaze::dot( _alpha[idx_cell], _momentBasis[idx_quad] ) - alpha_norm_per_cell[idx_cell] ); + } } - } - else { - for( unsigned idx_quad = 0; idx_quad < _nq; idx_quad++ ) { - // compute the kinetic density at all grid cells - _kineticDensity[idx_cell][idx_quad] = - _u0[idx_cell] * _entropy->EntropyPrimeDual( blaze::dot( _alpha[idx_cell], _momentBasis[idx_quad] ) ); + else { + for( unsigned idx_quad = 0; idx_quad < _nq; idx_quad++ ) { + // compute the kinetic density at all grid cells + _kineticDensity[idx_cell][idx_quad] = + _u0[idx_cell] * _entropy->EntropyPrimeDual( blaze::dot( _alpha[idx_cell], _momentBasis[idx_quad] ) ); + } } + if( _settings->GetRealizabilityReconstruction() ) { + ComputeRealizableSolution( idx_cell ); + } + _sol[idx_cell] *= _u0[idx_cell]; } - if( _settings->GetRealizabilityReconstruction() ) { - ComputeRealizableSolution( idx_cell ); - } - _sol[idx_cell] *= _u0[idx_cell]; - } } // ------ Compute slope limiters and cell gradients --- diff --git a/src/solvers/pnsolver.cpp b/src/solvers/pnsolver.cpp index 55b7535a..46bf63d8 100644 --- a/src/solvers/pnsolver.cpp +++ b/src/solvers/pnsolver.cpp @@ -11,7 +11,6 @@ #include "spdlog/spdlog.h" #include -#include PNSolver::PNSolver( Config* settings ) : SolverBase( settings ) { _polyDegreeBasis = settings->GetMaxMomentDegree(); @@ -67,15 +66,7 @@ void PNSolver::IterPreprocessing( unsigned /*idx_iter*/ ) { } } -void PNSolver::IterPostprocessing( unsigned /*idx_iter*/ ) { - // --- Update Solution --- - //_sol = _solNew; - - // --- Compute Flux for solution and Screen Output --- - ComputeRadFlux(); -} - -void PNSolver::ComputeRadFlux() { +void PNSolver::ComputeScalarFlux() { double firstMomentScaleFactor = 4 * M_PI; if( _settings->GetProblemName() == PROBLEM_Aircavity1D || _settings->GetProblemName() == PROBLEM_Linesource1D || _settings->GetProblemName() == PROBLEM_Checkerboard1D || _settings->GetProblemName() == PROBLEM_Meltingcube1D ) { @@ -83,7 +74,7 @@ void PNSolver::ComputeRadFlux() { } #pragma omp parallel for for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { - _fluxNew[idx_cell] = _sol[idx_cell][0] * firstMomentScaleFactor; + _scalarFluxNew[idx_cell] = _sol[idx_cell][0] * firstMomentScaleFactor; } } @@ -214,22 +205,43 @@ void PNSolver::FluxUpdatePseudo2D() { } } -void PNSolver::FVMUpdate( unsigned idx_energy ) { +void PNSolver::FVMUpdate( unsigned idx_iter ) { + if( _Q.size() == 1u && _sigmaT.size() == 1u && _sigmaS.size() == 1u ) { // Physics constant in time // Loop over all spatial cells #pragma omp parallel for - for( unsigned idx_cell = 0; idx_cell < _nCells; idx_cell++ ) { - // Dirichlet cells stay at IC, farfield assumption - if( _boundaryCells[idx_cell] == BOUNDARY_TYPE::DIRICHLET ) continue; - // Flux update - for( unsigned idx_sys = 0; idx_sys < _nSystem; idx_sys++ ) { - _solNew[idx_cell][idx_sys] = _sol[idx_cell][idx_sys] - ( _dE / _areas[idx_cell] ) * _solNew[idx_cell][idx_sys] /* cell averaged flux */ - - _dE * _sol[idx_cell][idx_sys] * - ( _sigmaS[idx_energy][idx_cell] * _scatterMatDiag[idx_sys] /* scattering influence */ - + _sigmaT[idx_energy][idx_cell] ); - /* total xs influence */ + for( unsigned idx_cell = 0; idx_cell < _nCells; idx_cell++ ) { + // Dirichlet cells stay at IC, farfield assumption + if( _boundaryCells[idx_cell] == BOUNDARY_TYPE::DIRICHLET ) continue; + // Flux update + + for( unsigned idx_sys = 0; idx_sys < _nSystem; idx_sys++ ) { + _solNew[idx_cell][idx_sys] = _sol[idx_cell][idx_sys] - + ( _dT / _areas[idx_cell] ) * _solNew[idx_cell][idx_sys] /* cell averaged flux */ + - _dT * _sol[idx_cell][idx_sys] * + ( _sigmaS[0][idx_cell] * _scatterMatDiag[idx_sys] /* scattering influence */ + + _sigmaT[0][idx_cell] ); /* total xs influence */ + } + // Source Term + _solNew[idx_cell] += _dT * _Q[0][idx_cell]; + } + } + else { + // Loop over all spatial cells +#pragma omp parallel for + for( unsigned idx_cell = 0; idx_cell < _nCells; idx_cell++ ) { + // Dirichlet cells stay at IC, farfield assumption + if( _boundaryCells[idx_cell] == BOUNDARY_TYPE::DIRICHLET ) continue; + // Flux update + for( unsigned idx_sys = 0; idx_sys < _nSystem; idx_sys++ ) { + _solNew[idx_cell][idx_sys] = _sol[idx_cell][idx_sys] - + ( _dT / _areas[idx_cell] ) * _solNew[idx_cell][idx_sys] /* cell averaged flux */ + - _dT * _sol[idx_cell][idx_sys] * + ( _sigmaS[idx_iter][idx_cell] * _scatterMatDiag[idx_sys] /* scattering influence */ + + _sigmaT[idx_iter][idx_cell] ); /* total xs influence */ + } + // Source Term + _solNew[idx_cell] += _dT * _Q[idx_iter][idx_cell]; } - // Source Term - _solNew[idx_cell] += _dE * _Q[0][idx_cell]; } } @@ -489,7 +501,7 @@ void PNSolver::WriteVolumeOutput( unsigned idx_iter ) { switch( _settings->GetVolumeOutput()[idx_group] ) { case MINIMAL: for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { - _outputFields[idx_group][0][idx_cell] = _fluxNew[idx_cell]; + _outputFields[idx_group][0][idx_cell] = _scalarFluxNew[idx_cell]; } break; case MOMENTS: @@ -502,7 +514,7 @@ void PNSolver::WriteVolumeOutput( unsigned idx_iter ) { case ANALYTIC: for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { - double time = idx_iter * _dE; + double time = idx_iter * _dT; _outputFields[idx_group][0][idx_cell] = _outputFields[idx_group][0][idx_cell] = _problem->GetAnalyticalSolution( _mesh->GetCellMidPoints()[idx_cell][0], _mesh->GetCellMidPoints()[idx_cell][1], time, _sigmaS[idx_iter][idx_cell] ); diff --git a/src/solvers/snsolver.cpp b/src/solvers/snsolver.cpp index fe8bb7de..527e48cb 100644 --- a/src/solvers/snsolver.cpp +++ b/src/solvers/snsolver.cpp @@ -1,4 +1,5 @@ #include "solvers/snsolver.hpp" + #include "common/config.hpp" #include "common/io.hpp" #include "common/mesh.hpp" @@ -9,10 +10,7 @@ #include "toolboxes/errormessages.hpp" #include "toolboxes/textprocessingtoolbox.hpp" -// externals #include "spdlog/spdlog.h" -#include -#include SNSolver::SNSolver( Config* settings ) : SolverBase( settings ) { _quadPoints = _quadrature->GetPoints(); @@ -36,23 +34,15 @@ void SNSolver::IterPreprocessing( unsigned /*idx_iter*/ ) { } } -void SNSolver::IterPostprocessing( unsigned /*idx_iter*/ ) { - // --- Update Solution --- - //_sol = _solNew; - - // --- Compute Flux for solution and Screen Output --- - ComputeRadFlux(); -} - -void SNSolver::ComputeRadFlux() { - double firstMomentScaleFactor = 4 * M_PI; - if( _settings->GetProblemName() == PROBLEM_Aircavity1D || _settings->GetProblemName() == PROBLEM_Linesource1D || - _settings->GetProblemName() == PROBLEM_Checkerboard1D || _settings->GetProblemName() == PROBLEM_Meltingcube1D ) { - firstMomentScaleFactor = 2.0; - } +void SNSolver::ComputeScalarFlux() { + // double firstMomentScaleFactor = 4 * M_PI; + // if( _settings->GetProblemName() == PROBLEM_Aircavity1D || _settings->GetProblemName() == PROBLEM_Linesource1D || + // _settings->GetProblemName() == PROBLEM_Checkerboard1D || _settings->GetProblemName() == PROBLEM_Meltingcube1D ) { + // // firstMomentScaleFactor = 2.0; + //} #pragma omp parallel for for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { - _fluxNew[idx_cell] = blaze::dot( _sol[idx_cell], _weights ) / firstMomentScaleFactor; + _scalarFluxNew[idx_cell] = blaze::dot( _sol[idx_cell], _weights ); // / firstMomentScaleFactor; } } @@ -78,7 +68,8 @@ void SNSolver::FluxUpdatePseudo1D() { for( unsigned idx_quad = 0; idx_quad < _nq; ++idx_quad ) { // Reset temporary variable _solNew[idx_cell][idx_quad] = 0.0; - // Loop over all neighbor cells (edges) of cell j and compute numerical fluxes + // Loop over all neighbor cells (edges) of cell j and compute numerical + // fluxes for( unsigned idx_nbr = 0; idx_nbr < _neighbors[idx_cell].size(); ++idx_nbr ) { // store flux contribution on psiNew_sigmaS to save memory if( _boundaryCells[idx_cell] == BOUNDARY_TYPE::NEUMANN && _neighbors[idx_cell][idx_nbr] == _nCells ) @@ -117,81 +108,117 @@ void SNSolver::FluxUpdatePseudo1D() { } void SNSolver::FluxUpdatePseudo2D() { - // Loop over all spatial cells + if( _reconsOrder == 1 ) { + // Loop over all spatial cells #pragma omp parallel for - for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { - double solL; - double solR; - // Dirichlet cells stay at IC, farfield assumption - if( _boundaryCells[idx_cell] == BOUNDARY_TYPE::DIRICHLET ) continue; - // Loop over all ordinates - for( unsigned idx_quad = 0; idx_quad < _nq; ++idx_quad ) { + for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { + // Dirichlet cells stay at IC, farfield assumption + if( _boundaryCells[idx_cell] == BOUNDARY_TYPE::DIRICHLET ) continue; // Reset temporary variable - _solNew[idx_cell][idx_quad] = 0.0; - // Loop over all neighbor cells (edges) of cell j and compute numerical fluxes + _solNew[idx_cell] *= 0.0; // blaze op + + // Loop over all neighbor cells (edges) of cell j and compute numerical + // fluxes for( unsigned idx_nbr = 0; idx_nbr < _neighbors[idx_cell].size(); ++idx_nbr ) { // store flux contribution on psiNew_sigmaS to save memory - if( _boundaryCells[idx_cell] == BOUNDARY_TYPE::NEUMANN && _neighbors[idx_cell][idx_nbr] == _nCells ) - _solNew[idx_cell][idx_quad] += - _g->Flux( _quadPoints[idx_quad], _sol[idx_cell][idx_quad], _sol[idx_cell][idx_quad], _normals[idx_cell][idx_nbr] ); + if( _boundaryCells[idx_cell] == BOUNDARY_TYPE::NEUMANN && _neighbors[idx_cell][idx_nbr] == _nCells ) { + _g->Flux( _quadPoints, + _sol[idx_cell], + _problem->GetGhostCellValue( idx_cell, _sol[idx_cell] ), + _solNew[idx_cell], + _normals[idx_cell][idx_nbr], + _nq ); + } + else { + // first order solver + _g->Flux( _quadPoints, _sol[idx_cell], _sol[_neighbors[idx_cell][idx_nbr]], _solNew[idx_cell], _normals[idx_cell][idx_nbr], _nq ); + } + } + } + } + else if( _reconsOrder == 2 ) { + // Loop over all spatial cells +#pragma omp parallel for + for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { + Vector solL; + Vector solR; + // Dirichlet cells stay at IC, farfield assumption + if( _boundaryCells[idx_cell] == BOUNDARY_TYPE::DIRICHLET ) continue; + // Loop over all ordinates + _solNew[idx_cell] *= 0.0; // blaze operation + // Loop over all neighbor cells (edges) of cell j and compute numerical + // fluxes + for( unsigned idx_nbr = 0; idx_nbr < _neighbors[idx_cell].size(); ++idx_nbr ) { + // store flux contribution on psiNew_sigmaS to save memory + if( _boundaryCells[idx_cell] == BOUNDARY_TYPE::NEUMANN && _neighbors[idx_cell][idx_nbr] == _nCells ) { + _g->Flux( _quadPoints, + _sol[idx_cell], + _problem->GetGhostCellValue( idx_cell, _sol[idx_cell] ), + _solNew[idx_cell], + _normals[idx_cell][idx_nbr], + _nq ); + } else { unsigned int nbr_glob = _neighbors[idx_cell][idx_nbr]; // global idx of neighbor cell - switch( _reconsOrder ) { - // first order solver - case 1: - _solNew[idx_cell][idx_quad] += - _g->Flux( _quadPoints[idx_quad], _sol[idx_cell][idx_quad], _sol[nbr_glob][idx_quad], _normals[idx_cell][idx_nbr] ); - break; - // second order solver - case 2: - // left status of interface - solL = _sol[idx_cell][idx_quad] + - _limiter[idx_cell][idx_quad] * - ( _solDx[idx_cell][idx_quad] * ( _interfaceMidPoints[idx_cell][idx_nbr][0] - _cellMidPoints[idx_cell][0] ) + - _solDy[idx_cell][idx_quad] * ( _interfaceMidPoints[idx_cell][idx_nbr][1] - _cellMidPoints[idx_cell][1] ) ); - solR = _sol[nbr_glob][idx_quad] + - _limiter[nbr_glob][idx_quad] * - ( _solDx[nbr_glob][idx_quad] * ( _interfaceMidPoints[idx_cell][idx_nbr][0] - _cellMidPoints[nbr_glob][0] ) + - _solDy[nbr_glob][idx_quad] * ( _interfaceMidPoints[idx_cell][idx_nbr][1] - _cellMidPoints[nbr_glob][1] ) ); + // left status of interface + solL = _sol[idx_cell] + + _limiter[idx_cell] * ( _solDx[idx_cell] * ( _interfaceMidPoints[idx_cell][idx_nbr][0] - _cellMidPoints[idx_cell][0] ) + + _solDy[idx_cell] * ( _interfaceMidPoints[idx_cell][idx_nbr][1] - _cellMidPoints[idx_cell][1] ) ); - // flux evaluation - _solNew[idx_cell][idx_quad] += _g->Flux( _quadPoints[idx_quad], solL, solR, _normals[idx_cell][idx_nbr] ); - break; - default: ErrorMessages::Error( "Reconstruction order not supported.", CURRENT_FUNCTION ); break; - } + solR = _sol[nbr_glob] + + _limiter[nbr_glob] * ( _solDx[nbr_glob] * ( _interfaceMidPoints[idx_cell][idx_nbr][0] - _cellMidPoints[nbr_glob][0] ) + + _solDy[nbr_glob] * ( _interfaceMidPoints[idx_cell][idx_nbr][1] - _cellMidPoints[nbr_glob][1] ) ); + + // flux evaluation + _g->Flux( _quadPoints, solL, solR, _solNew[idx_cell], _normals[idx_cell][idx_nbr], _nq ); } } } } } -void SNSolver::FVMUpdate( unsigned idx_energy ) { +void SNSolver::FVMUpdate( unsigned idx_iter ) { + if( _Q.size() == 1u && _sigmaT.size() == 1u && _sigmaS.size() == 1u ) { #pragma omp parallel for - for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { - // Dirichlet cells stay at IC, farfield assumption - if( _boundaryCells[idx_cell] == BOUNDARY_TYPE::DIRICHLET ) continue; - // loop over all ordinates - for( unsigned idx_quad = 0; idx_quad < _nq; ++idx_quad ) { - // time update angular flux with numerical flux and total scattering cross section - _solNew[idx_cell][idx_quad] = _sol[idx_cell][idx_quad] - ( _dE / _areas[idx_cell] ) * _solNew[idx_cell][idx_quad] - - _dE * _sigmaT[idx_energy][idx_cell] * _sol[idx_cell][idx_quad]; - } - // compute scattering effects - _solNew[idx_cell] += _dE * _sigmaS[idx_energy][idx_cell] * _scatteringKernel * _sol[idx_cell]; // multiply scattering matrix with psi + for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { + // Dirichlet cells stay at IC, farfield assumption + if( _boundaryCells[idx_cell] == BOUNDARY_TYPE::DIRICHLET ) continue; + // loop over all ordinates + // for( unsigned idx_quad = 0; idx_quad < _nq; ++idx_quad ) { + // time update angular flux with numerical flux and total scattering cross + // section - // Source Term - if( _Q.size() == 1u ) { // constant source for all energies - if( _Q[0][idx_cell].size() == 1u ) // isotropic source - _solNew[idx_cell] += _dE * _Q[0][idx_cell][0]; - else - _solNew[idx_cell] += _dE * _Q[0][idx_cell]; + _solNew[idx_cell] = _sol[idx_cell] - ( _dT / _areas[idx_cell] ) * _solNew[idx_cell] - _dT * _sigmaT[0][idx_cell] * _sol[idx_cell]; + //} + // compute scattering effects + _solNew[idx_cell] += _dT * _sigmaS[0][idx_cell] * _scatteringKernel * _sol[idx_cell]; // multiply scattering matrix with psi + // Source Term + // if( _Q[0][idx_cell].size() == 1u ) // isotropic source + _solNew[idx_cell] += _dT * _Q[0][idx_cell][0]; + // else + // _solNew[idx_cell] += _dT * _Q[0][idx_cell]; } - else { + } + else { +#pragma omp parallel for + for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { + // Dirichlet cells stay at IC, farfield assumption + if( _boundaryCells[idx_cell] == BOUNDARY_TYPE::DIRICHLET ) continue; + // loop over all ordinates + // for( unsigned idx_quad = 0; idx_quad < _nq; ++idx_quad ) { + // time update angular flux with numerical flux and total scattering cross + // section + _solNew[idx_cell] = _sol[idx_cell] - ( _dT / _areas[idx_cell] ) * _solNew[idx_cell] - _dT * _sigmaT[idx_iter][idx_cell] * _sol[idx_cell]; + // } + // compute scattering effects + _solNew[idx_cell] += _dT * _sigmaS[idx_iter][idx_cell] * _scatteringKernel * _sol[idx_cell]; // multiply scattering matrix with psi + + // Source Term if( _Q[0][idx_cell].size() == 1u ) // isotropic source - _solNew[idx_cell] += _dE * _Q[idx_energy][idx_cell][0]; + _solNew[idx_cell] += _dT * _Q[idx_iter][idx_cell][0]; else - _solNew[idx_cell] += _dE * _Q[idx_energy][idx_cell]; + _solNew[idx_cell] += _dT * _Q[idx_iter][idx_cell]; } } } @@ -230,22 +257,22 @@ void SNSolver::PrepareVolumeOutput() { } } -void SNSolver::WriteVolumeOutput( unsigned idx_pseudoTime ) { +void SNSolver::WriteVolumeOutput( unsigned idx_iter ) { unsigned nGroups = (unsigned)_settings->GetNVolumeOutput(); - if( ( _settings->GetVolumeOutputFrequency() != 0 && idx_pseudoTime % (unsigned)_settings->GetVolumeOutputFrequency() == 0 ) || - ( idx_pseudoTime == _nEnergies - 1 ) /* need sol at last iteration */ ) { + if( ( _settings->GetVolumeOutputFrequency() != 0 && idx_iter % (unsigned)_settings->GetVolumeOutputFrequency() == 0 ) || + ( idx_iter == _nEnergies - 1 ) /* need sol at last iteration */ ) { for( unsigned idx_group = 0; idx_group < nGroups; idx_group++ ) { switch( _settings->GetVolumeOutput()[idx_group] ) { case MINIMAL: for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { - _outputFields[idx_group][0][idx_cell] = _fluxNew[idx_cell]; + _outputFields[idx_group][0][idx_cell] = _scalarFluxNew[idx_cell]; } break; case ANALYTIC: for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { - double time = idx_pseudoTime * _dE; + double time = idx_iter * _dT; _outputFields[idx_group][0][idx_cell] = _problem->GetAnalyticalSolution( - _mesh->GetCellMidPoints()[idx_cell][0], _mesh->GetCellMidPoints()[idx_cell][1], time, _sigmaS[idx_pseudoTime][idx_cell] ); + _mesh->GetCellMidPoints()[idx_cell][0], _mesh->GetCellMidPoints()[idx_cell][1], time, _sigmaS[idx_iter][idx_cell] ); } break; diff --git a/src/solvers/snsolver_hpc.cpp b/src/solvers/snsolver_hpc.cpp new file mode 100644 index 00000000..d5816bb7 --- /dev/null +++ b/src/solvers/snsolver_hpc.cpp @@ -0,0 +1,1511 @@ +#ifdef BUILD_MPI +#include +#endif +#include "common/config.hpp" +#include "common/io.hpp" +#include "common/mesh.hpp" +#include "kernels/scatteringkernelbase.hpp" +#include "problems/problembase.hpp" +#include "quadratures/quadraturebase.hpp" +#include "solvers/snsolver_hpc.hpp" +#include "toolboxes/textprocessingtoolbox.hpp" + +SNSolverHPC::SNSolverHPC( Config* settings ) { +#ifdef BUILD_MPI + // Initialize MPI + MPI_Comm_size( MPI_COMM_WORLD, &_numProcs ); + MPI_Comm_rank( MPI_COMM_WORLD, &_rank ); +#endif +#ifndef BUILD_MPI + _numProcs = 1; // default values + _rank = 0; +#endif + + _settings = settings; + _currTime = 0.0; + + _nOutputMoments = 2; // Currently only u_1 (x direction) and u_1 (y direction) are supported + // Create Mesh + _mesh = LoadSU2MeshFromFile( settings ); + _settings->SetNCells( _mesh->GetNumCells() ); + auto quad = QuadratureBase::Create( settings ); + _settings->SetNQuadPoints( quad->GetNq() ); + + _nCells = _mesh->GetNumCells(); + _nNbr = _mesh->GetNumNodesPerCell(); + _nDim = _mesh->GetDim(); + _nNodes = _mesh->GetNumNodes(); + + _nq = quad->GetNq(); + _nSys = _nq; + _localNSys = _nq / _numProcs; + _startSysIdx = _rank * _localNSys; + _endSysIdx = _rank * _localNSys + _localNSys; + if( _rank == _numProcs - 1 ) { + _localNSys += _nq % _numProcs; + _endSysIdx = _nSys; + } + + _spatialOrder = _settings->GetSpatialOrder(); + _temporalOrder = _settings->GetTemporalOrder(); + + _areas = std::vector( _nCells ); + _normals = std::vector( _nCells * _nNbr * _nDim ); + _neighbors = std::vector( _nCells * _nNbr ); + _cellMidPoints = std::vector( _nCells * _nDim ); + _interfaceMidPoints = std::vector( _nCells * _nNbr * _nDim ); + _cellBoundaryTypes = std::vector( _nCells ); + _relativeInterfaceMidPt = std::vector( _nCells * _nNbr * _nDim ); + _relativeCellVertices = std::vector( _nCells * _nNbr * _nDim ); + + // Slope + _solDx = std::vector( _nCells * _localNSys * _nDim ); + _limiter = std::vector( _nCells * _localNSys ); + + // Physics + _sigmaS = std::vector( _nCells ); + _sigmaT = std::vector( _nCells ); + _source = std::vector( _nCells * _localNSys ); + + // Quadrature + _quadPts = std::vector( _localNSys * _nDim ); + _quadWeights = std::vector( _localNSys ); + + // Solution + _sol = std::vector( _nCells * _localNSys ); + _flux = std::vector( _nCells * _localNSys ); + + _scalarFlux = std::vector( _nCells ); + _localMaxOrdinateOutflow = std::vector( _nCells ); + + auto areas = _mesh->GetCellAreas(); + auto neighbors = _mesh->GetNeighbours(); + auto normals = _mesh->GetNormals(); + auto cellMidPts = _mesh->GetCellMidPoints(); + auto interfaceMidPts = _mesh->GetInterfaceMidPoints(); + auto boundaryTypes = _mesh->GetBoundaryTypes(); + auto nodes = _mesh->GetNodes(); + auto cells = _mesh->GetCells(); + + for( unsigned idx_cell = 0; idx_cell < _nCells; idx_cell++ ) { + _areas[idx_cell] = areas[idx_cell]; + } + + _dT = ComputeTimeStep( _settings->GetCFL() ); + _nIter = unsigned( _settings->GetTEnd() / _dT ) + 1; + + auto quadPoints = quad->GetPoints(); + auto quadWeights = quad->GetWeights(); + + _problem = ProblemBase::Create( _settings, _mesh, quad ); + auto sigmaT = _problem->GetTotalXS( Vector( _nIter, 0.0 ) ); + auto sigmaS = _problem->GetScatteringXS( Vector( _nIter, 0.0 ) ); + auto source = _problem->GetExternalSource( Vector( _nIter, 0.0 ) ); + + // Copy to everything to solver + _mass = 0; +#pragma omp parallel for + for( unsigned idx_sys = 0; idx_sys < _localNSys; idx_sys++ ) { + for( unsigned idx_dim = 0; idx_dim < _nDim; idx_dim++ ) { + _quadPts[Idx2D( idx_sys, idx_dim, _nDim )] = quadPoints[idx_sys + _startSysIdx][idx_dim]; + } + _quadWeights[idx_sys] = + 2.0 * quadWeights[idx_sys + _startSysIdx]; // Rescaling of quadweights TODO: Check if this needs general refactoring + } + +#pragma omp parallel for + for( unsigned idx_cell = 0; idx_cell < _nCells; idx_cell++ ) { + _cellBoundaryTypes[idx_cell] = boundaryTypes[idx_cell]; + + for( unsigned idx_dim = 0; idx_dim < _nDim; idx_dim++ ) { + _cellMidPoints[Idx2D( idx_cell, idx_dim, _nDim )] = cellMidPts[idx_cell][idx_dim]; + } + + for( unsigned idx_nbr = 0; idx_nbr < _nNbr; idx_nbr++ ) { + + _neighbors[Idx2D( idx_cell, idx_nbr, _nNbr )] = neighbors[idx_cell][idx_nbr]; + + for( unsigned idx_dim = 0; idx_dim < _nDim; idx_dim++ ) { + _normals[Idx3D( idx_cell, idx_nbr, idx_dim, _nNbr, _nDim )] = normals[idx_cell][idx_nbr][idx_dim]; + _interfaceMidPoints[Idx3D( idx_cell, idx_nbr, idx_dim, _nNbr, _nDim )] = interfaceMidPts[idx_cell][idx_nbr][idx_dim]; + _relativeInterfaceMidPt[Idx3D( idx_cell, idx_nbr, idx_dim, _nNbr, _nDim )] = + _interfaceMidPoints[Idx3D( idx_cell, idx_nbr, idx_dim, _nNbr, _nDim )] - _cellMidPoints[Idx2D( idx_cell, idx_dim, _nDim )]; + _relativeCellVertices[Idx3D( idx_cell, idx_nbr, idx_dim, _nNbr, _nDim )] = + nodes[cells[idx_cell][idx_nbr]][idx_dim] - cellMidPts[idx_cell][idx_dim]; + } + } + + _sigmaS[idx_cell] = sigmaS[0][idx_cell]; + _sigmaT[idx_cell] = sigmaT[0][idx_cell]; + _scalarFlux[idx_cell] = 0; + + for( unsigned idx_sys = 0; idx_sys < _localNSys; idx_sys++ ) { + _source[Idx2D( idx_cell, idx_sys, _localNSys )] = source[0][idx_cell][0]; // CAREFUL HERE hardcoded to isotropic source + _sol[Idx2D( idx_cell, idx_sys, _localNSys )] = 0.0; // initial condition is zero + + _scalarFlux[idx_cell] += _sol[Idx2D( idx_cell, idx_sys, _localNSys )] * _quadWeights[idx_sys]; + } + // _mass += _scalarFlux[idx_cell] * _areas[idx_cell]; + } +#ifdef BUILD_MPI + MPI_Barrier( MPI_COMM_WORLD ); +#endif + SetGhostCells(); + if( _rank == 0 ) { + PrepareScreenOutput(); // Screen Output + PrepareHistoryOutput(); // History Output + } +#ifdef BUILD_MPI + MPI_Barrier( MPI_COMM_WORLD ); +#endif + delete quad; + + // Initialiye QOIS + _mass = 0; + _rmsFlux = 0; + + // Lattice + { + _curAbsorptionLattice = 0; + _totalAbsorptionLattice = 0; + _curMaxAbsorptionLattice = 0; + _curScalarOutflow = 0; + _totalScalarOutflow = 0; + _curMaxOrdinateOutflow = 0; + _curScalarOutflowPeri1 = 0; + _totalScalarOutflowPeri1 = 0; + _curScalarOutflowPeri2 = 0; + _totalScalarOutflowPeri2 = 0; + ComputeCellsPerimeterLattice(); + } + // Hohlraum + { + _totalAbsorptionHohlraumCenter = 0; + _totalAbsorptionHohlraumVertical = 0; + _totalAbsorptionHohlraumHorizontal = 0; + _curAbsorptionHohlraumCenter = 0; + _curAbsorptionHohlraumVertical = 0; + _curAbsorptionHohlraumHorizontal = 0; + _varAbsorptionHohlraumGreen = 0; + + unsigned n_probes = 4; + if( _settings->GetProblemName() == PROBLEM_SymmetricHohlraum ) n_probes = 4; + if( _settings->GetProblemName() == PROBLEM_QuarterHohlraum ) n_probes = 2; + //_probingMomentsTimeIntervals = 10; + _probingMoments = std::vector( n_probes * 3, 0. ); // 10 time horizons + + if( _settings->GetProblemName() == PROBLEM_SymmetricHohlraum ) { + _probingCellsHohlraum = { + _mesh->GetCellsofBall( -0.4, 0., 0.01 ), + _mesh->GetCellsofBall( 0.4, 0., 0.01 ), + _mesh->GetCellsofBall( 0., -0.5, 0.01 ), + _mesh->GetCellsofBall( 0., 0.5, 0.01 ), + }; + } + else if( _settings->GetProblemName() == PROBLEM_QuarterHohlraum ) { + _probingCellsHohlraum = { + _mesh->GetCellsofBall( 0.4, 0., 0.01 ), + _mesh->GetCellsofBall( 0., 0.5, 0.01 ), + }; + } + + // Green + _thicknessGreen = 0.05; + + if( _settings->GetProblemName() == PROBLEM_SymmetricHohlraum ) { + _centerGreen = { _settings->GetPosXCenterGreenHohlraum(), _settings->GetPosYCenterGreenHohlraum() }; + _cornerUpperLeftGreen = { -0.2 + _centerGreen[0], 0.4 + _centerGreen[1] }; + _cornerLowerLeftGreen = { -0.2 + _centerGreen[0], -0.4 + _centerGreen[1] }; + _cornerUpperRightGreen = { 0.2 + _centerGreen[0], 0.4 + _centerGreen[1] }; + _cornerLowerRightGreen = { 0.2 + _centerGreen[0], -0.4 + _centerGreen[1] }; + } + else { + _centerGreen = { 0.0, 0.0 }; + _cornerUpperLeftGreen = { 0., 0.4 - _thicknessGreen / 2.0 }; + _cornerLowerLeftGreen = { 0., +_thicknessGreen / 2.0 }; + _cornerUpperRightGreen = { 0.2 - _thicknessGreen / 2.0, 0.4 - _thicknessGreen / 2.0 }; + _cornerLowerRightGreen = { 0.2 - _thicknessGreen / 2.0, 0. + _thicknessGreen / 2.0 }; + } + + _nProbingCellsLineGreen = _settings->GetNumProbingCellsLineHohlraum(); + + SetProbingCellsLineGreen(); // ONLY FOR HOHLRAUM + + _absorptionValsIntegrated = std::vector( _nProbingCellsLineGreen, 0.0 ); + _varAbsorptionValsIntegrated = std::vector( _nProbingCellsLineGreen, 0.0 ); + } +} + +SNSolverHPC::~SNSolverHPC() { + delete _mesh; + delete _problem; +} + +void SNSolverHPC::Solve() { + + // --- Preprocessing --- + if( _rank == 0 ) { + PrepareVolumeOutput(); + DrawPreSolverOutput(); + } + + auto start = std::chrono::high_resolution_clock::now(); // Start timing + + std::chrono::duration duration; + // Loop over energies (pseudo-time of continuous slowing down approach) + for( unsigned iter = 0; iter < _nIter; iter++ ) { + if( iter == _nIter - 1 ) { // last iteration + _dT = _settings->GetTEnd() - iter * _dT; + } + if( _temporalOrder == 2 ) { + std::vector solRK0( _sol ); + ( _spatialOrder == 2 ) ? FluxOrder2() : FluxOrder1(); + FVMUpdate(); + ( _spatialOrder == 2 ) ? FluxOrder2() : FluxOrder1(); + FVMUpdate(); +#pragma omp parallel for + for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { +#pragma omp simd + for( unsigned idx_sys = 0; idx_sys < _localNSys; idx_sys++ ) { + _sol[Idx2D( idx_cell, idx_sys, _localNSys )] = + 0.5 * ( solRK0[Idx2D( idx_cell, idx_sys, _localNSys )] + + _sol[Idx2D( idx_cell, idx_sys, _localNSys )] ); // Solution averaging with HEUN + } + } + } + else { + ( _spatialOrder == 2 ) ? FluxOrder2() : FluxOrder1(); + FVMUpdate(); + } + IterPostprocessing(); + // --- Wall time measurement + duration = std::chrono::high_resolution_clock::now() - start; + _currTime = std::chrono::duration_cast>( duration ).count(); + + // --- Write Output --- + if( _rank == 0 ) { + + WriteScalarOutput( iter ); + + // --- Update Scalar Fluxes + + // --- Print Output --- + PrintScreenOutput( iter ); + PrintHistoryOutput( iter ); + PrintVolumeOutput( iter ); + } + } + + // --- Postprocessing --- + if( _rank == 0 ) { + DrawPostSolverOutput(); + } +} + +void SNSolverHPC::PrintVolumeOutput( int idx_iter ) { + if( _settings->GetVolumeOutputFrequency() != 0 && idx_iter % (unsigned)_settings->GetVolumeOutputFrequency() == 0 ) { + WriteVolumeOutput( idx_iter ); + ExportVTK( _settings->GetOutputFile() + "_" + std::to_string( idx_iter ), _outputFields, _outputFieldNames, _mesh ); // slow + } + if( idx_iter == (int)_nIter - 1 ) { // Last iteration write without suffix. + WriteVolumeOutput( idx_iter ); + ExportVTK( _settings->GetOutputFile(), _outputFields, _outputFieldNames, _mesh ); + } +} + +void SNSolverHPC::FluxOrder2() { + + double const eps = 1e-10; + +#pragma omp parallel for + for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { // Compute Slopes + if( _cellBoundaryTypes[idx_cell] == BOUNDARY_TYPE::NONE ) { // skip ghost cells +#pragma omp simd + for( unsigned idx_sys = 0; idx_sys < _localNSys; idx_sys++ ) { + + _limiter[Idx2D( idx_cell, idx_sys, _localNSys )] = 1.; // limiter should be zero at boundary + + _solDx[Idx3D( idx_cell, idx_sys, 0, _localNSys, _nDim )] = 0.; + _solDx[Idx3D( idx_cell, idx_sys, 1, _localNSys, _nDim )] = 0.; + + double solInterfaceAvg = 0.0; + for( unsigned idx_nbr = 0; idx_nbr < _nNbr; ++idx_nbr ) { // Compute slopes and mininum and maximum + unsigned idx_nbr_glob = _neighbors[Idx2D( idx_cell, idx_nbr, _nNbr )]; + + // Slopes + solInterfaceAvg = 0.5 * ( _sol[Idx2D( idx_cell, idx_sys, _localNSys )] + _sol[Idx2D( idx_nbr_glob, idx_sys, _localNSys )] ); + _solDx[Idx3D( idx_cell, idx_sys, 0, _localNSys, _nDim )] += + solInterfaceAvg * _normals[Idx3D( idx_cell, idx_nbr, 0, _nNbr, _nDim )]; + _solDx[Idx3D( idx_cell, idx_sys, 1, _localNSys, _nDim )] += + solInterfaceAvg * _normals[Idx3D( idx_cell, idx_nbr, 1, _nNbr, _nDim )]; + } + + _solDx[Idx3D( idx_cell, idx_sys, 0, _localNSys, _nDim )] /= _areas[idx_cell]; + _solDx[Idx3D( idx_cell, idx_sys, 1, _localNSys, _nDim )] /= _areas[idx_cell]; + } + } + } +#pragma omp parallel for + for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { // Compute Limiter + if( _cellBoundaryTypes[idx_cell] == BOUNDARY_TYPE::NONE ) { // skip ghost cells + +#pragma omp simd + for( unsigned idx_sys = 0; idx_sys < _localNSys; idx_sys++ ) { + + double gaussPoint = 0; + double r = 0; + double minSol = _sol[Idx2D( idx_cell, idx_sys, _localNSys )]; + double maxSol = _sol[Idx2D( idx_cell, idx_sys, _localNSys )]; + + for( unsigned idx_nbr = 0; idx_nbr < _nNbr; ++idx_nbr ) { // Compute slopes and mininum and maximum + unsigned idx_nbr_glob = _neighbors[Idx2D( idx_cell, idx_nbr, _nNbr )]; + // Compute ptswise max and minimum solultion values of current and neighbor cells + maxSol = std::max( _sol[Idx2D( idx_nbr_glob, idx_sys, _localNSys )], maxSol ); + minSol = std::min( _sol[Idx2D( idx_nbr_glob, idx_sys, _localNSys )], minSol ); + } + + for( unsigned idx_nbr = 0; idx_nbr < _nNbr; idx_nbr++ ) { // Compute limiter, see https://arxiv.org/pdf/1710.07187.pdf + + // Compute test value at cell vertex, called gaussPt + gaussPoint = + _solDx[Idx3D( idx_cell, idx_sys, 0, _localNSys, _nDim )] * + _relativeCellVertices[Idx3D( idx_cell, idx_nbr, 0, _nNbr, _nDim )] + + _solDx[Idx3D( idx_cell, idx_sys, 1, _localNSys, _nDim )] * _relativeCellVertices[Idx3D( idx_cell, idx_nbr, 1, _nNbr, _nDim )]; + + // BARTH-JESPERSEN LIMITER + // r = ( gaussPoint > 0 ) ? std::min( ( maxSol - _sol[Idx2D( idx_cell, idx_sys, _localNSys )] ) / ( gaussPoint + eps ), 1.0 ) + // : std::min( ( minSol - _sol[Idx2D( idx_cell, idx_sys, _localNSys )] ) / ( gaussPoint - eps ), 1.0 ); + // + // r = ( std::abs( gaussPoint ) < eps ) ? 1 : r; + //_limiter[Idx2D( idx_cell, idx_sys, _localNSys )] = std::min( r, _limiter[Idx2D( idx_cell, idx_sys, _localNSys )] ); + + // VENKATAKRISHNAN LIMITER + double delta1Max = maxSol - _sol[Idx2D( idx_cell, idx_sys, _localNSys )]; + double delta1Min = minSol - _sol[Idx2D( idx_cell, idx_sys, _localNSys )]; + + r = ( gaussPoint > 0 ) ? ( ( delta1Max * delta1Max + _areas[idx_cell] ) * gaussPoint + 2 * gaussPoint * gaussPoint * delta1Max ) / + ( delta1Max * delta1Max + 2 * gaussPoint * gaussPoint + delta1Max * gaussPoint + _areas[idx_cell] ) / + ( gaussPoint + eps ) + : ( ( delta1Min * delta1Min + _areas[idx_cell] ) * gaussPoint + 2 * gaussPoint * gaussPoint * delta1Min ) / + ( delta1Min * delta1Min + 2 * gaussPoint * gaussPoint + delta1Min * gaussPoint + _areas[idx_cell] ) / + ( gaussPoint - eps ); + + r = ( std::abs( gaussPoint ) < eps ) ? 1 : r; + + _limiter[Idx2D( idx_cell, idx_sys, _localNSys )] = std::min( r, _limiter[Idx2D( idx_cell, idx_sys, _localNSys )] ); + } + } + } + else { +#pragma omp simd + for( unsigned idx_sys = 0; idx_sys < _localNSys; idx_sys++ ) { + _limiter[Idx2D( idx_cell, idx_sys, _localNSys )] = 0.; // limiter should be zero at boundary + _solDx[Idx3D( idx_cell, idx_sys, 0, _localNSys, _nDim )] = 0.; + _solDx[Idx3D( idx_cell, idx_sys, 1, _localNSys, _nDim )] = 0.; + } + } + } + +#pragma omp parallel for + for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { // Compute Flux +#pragma omp simd + for( unsigned idx_sys = 0; idx_sys < _localNSys; idx_sys++ ) { + _flux[Idx2D( idx_cell, idx_sys, _localNSys )] = 0.; + } + + // Fluxes + for( unsigned idx_nbr = 0; idx_nbr < _nNbr; ++idx_nbr ) { + if( _cellBoundaryTypes[idx_cell] == BOUNDARY_TYPE::NEUMANN && _neighbors[Idx2D( idx_cell, idx_nbr, _nNbr )] == _nCells ) { +#pragma omp simd + for( unsigned idx_sys = 0; idx_sys < _localNSys; idx_sys++ ) { + double localInner = _quadPts[Idx2D( idx_sys, 0, _nDim )] * _normals[Idx3D( idx_cell, idx_nbr, 0, _nNbr, _nDim )] + + _quadPts[Idx2D( idx_sys, 1, _nDim )] * _normals[Idx3D( idx_cell, idx_nbr, 1, _nNbr, _nDim )]; + if( localInner > 0 ) { + _flux[Idx2D( idx_cell, idx_sys, _localNSys )] += localInner * _sol[Idx2D( idx_cell, idx_sys, _localNSys )]; + } + else { + double ghostCellValue = _ghostCells[idx_cell][idx_sys]; // fixed boundary + _flux[Idx2D( idx_cell, idx_sys, _localNSys )] += localInner * ghostCellValue; + } + } + } + else { +// Second order +#pragma omp simd + for( unsigned idx_sys = 0; idx_sys < _localNSys; idx_sys++ ) { + // store flux contribution on psiNew_sigmaS to save memory + unsigned idx_nbr_glob = _neighbors[Idx2D( idx_cell, idx_nbr, _nNbr )]; // global idx of neighbor cell + double localInner = _quadPts[Idx2D( idx_sys, 0, _nDim )] * _normals[Idx3D( idx_cell, idx_nbr, 0, _nNbr, _nDim )] + + _quadPts[Idx2D( idx_sys, 1, _nDim )] * _normals[Idx3D( idx_cell, idx_nbr, 1, _nNbr, _nDim )]; + + _flux[Idx2D( idx_cell, idx_sys, _localNSys )] += + ( localInner > 0 ) ? localInner * ( _sol[Idx2D( idx_cell, idx_sys, _localNSys )] + + _limiter[Idx2D( idx_cell, idx_sys, _localNSys )] * + ( _solDx[Idx3D( idx_cell, idx_sys, 0, _localNSys, _nDim )] * + _relativeInterfaceMidPt[Idx3D( idx_cell, idx_nbr, 0, _nNbr, _nDim )] + + _solDx[Idx3D( idx_cell, idx_sys, 1, _localNSys, _nDim )] * + _relativeInterfaceMidPt[Idx3D( idx_cell, idx_nbr, 1, _nNbr, _nDim )] ) ) + : localInner * ( _sol[Idx2D( idx_nbr_glob, idx_sys, _localNSys )] + + _limiter[Idx2D( idx_nbr_glob, idx_sys, _localNSys )] * + ( _solDx[Idx3D( idx_nbr_glob, idx_sys, 0, _localNSys, _nDim )] * + ( _interfaceMidPoints[Idx3D( idx_cell, idx_nbr, 0, _nNbr, _nDim )] - + _cellMidPoints[Idx2D( idx_nbr_glob, 0, _nDim )] ) + + _solDx[Idx3D( idx_nbr_glob, idx_sys, 1, _localNSys, _nDim )] * + ( _interfaceMidPoints[Idx3D( idx_cell, idx_nbr, 1, _nNbr, _nDim )] - + _cellMidPoints[Idx2D( idx_nbr_glob, 1, _nDim )] ) ) ); + } + } + } + } +} + +void SNSolverHPC::FluxOrder1() { + +#pragma omp parallel for + for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { + +#pragma omp simd + for( unsigned idx_sys = 0; idx_sys < _localNSys; idx_sys++ ) { + _flux[Idx2D( idx_cell, idx_sys, _localNSys )] = 0.0; // Reset temporary variable + } + + // Fluxes + for( unsigned idx_nbr = 0; idx_nbr < _nNbr; ++idx_nbr ) { + if( _cellBoundaryTypes[idx_cell] == BOUNDARY_TYPE::NEUMANN && _neighbors[Idx2D( idx_cell, idx_nbr, _nNbr )] == _nCells ) { +#pragma omp simd + for( unsigned idx_sys = 0; idx_sys < _localNSys; idx_sys++ ) { + double localInner = _quadPts[Idx2D( idx_sys, 0, _nDim )] * _normals[Idx3D( idx_cell, idx_nbr, 0, _nNbr, _nDim )] + + _quadPts[Idx2D( idx_sys, 1, _nDim )] * _normals[Idx3D( idx_cell, idx_nbr, 1, _nNbr, _nDim )]; + if( localInner > 0 ) { + _flux[Idx2D( idx_cell, idx_sys, _localNSys )] += localInner * _sol[Idx2D( idx_cell, idx_sys, _localNSys )]; + } + else { + double ghostCellValue = _ghostCells[idx_cell][idx_sys]; // fixed boundary + _flux[Idx2D( idx_cell, idx_sys, _localNSys )] += localInner * ghostCellValue; + } + } + } + else { + unsigned nbr_glob = _neighbors[Idx2D( idx_cell, idx_nbr, _nNbr )]; // global idx of neighbor cell +#pragma omp simd + for( unsigned idx_sys = 0; idx_sys < _localNSys; idx_sys++ ) { + + double localInner = _quadPts[Idx2D( idx_sys, 0, _nDim )] * _normals[Idx3D( idx_cell, idx_nbr, 0, _nNbr, _nDim )] + + _quadPts[Idx2D( idx_sys, 1, _nDim )] * _normals[Idx3D( idx_cell, idx_nbr, 1, _nNbr, _nDim )]; + + _flux[Idx2D( idx_cell, idx_sys, _localNSys )] += ( localInner > 0 ) ? localInner * _sol[Idx2D( idx_cell, idx_sys, _localNSys )] + : localInner * _sol[Idx2D( nbr_glob, idx_sys, _localNSys )]; + } + } + } + } +} + +void SNSolverHPC::FVMUpdate() { + _mass = 0.0; + _rmsFlux = 0.0; + std::vector temp_scalarFlux( _nCells ); // for MPI allreduce + +#pragma omp parallel for reduction( + : _mass, _rmsFlux ) + for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { + +#pragma omp simd + for( unsigned idx_sys = 0; idx_sys < _localNSys; idx_sys++ ) { + // Update + _sol[Idx2D( idx_cell, idx_sys, _localNSys )] = + ( 1 - _dT * _sigmaT[idx_cell] ) * _sol[Idx2D( idx_cell, idx_sys, _localNSys )] - + _dT / _areas[idx_cell] * _flux[Idx2D( idx_cell, idx_sys, _localNSys )] + + _dT * ( _sigmaS[idx_cell] * _scalarFlux[idx_cell] / ( 2 * M_PI ) + _source[Idx2D( idx_cell, idx_sys, _localNSys )] ); + } + double localScalarFlux = 0; + +#pragma omp simd reduction( + : localScalarFlux ) + for( unsigned idx_sys = 0; idx_sys < _localNSys; idx_sys++ ) { + _sol[Idx2D( idx_cell, idx_sys, _localNSys )] = std::max( _sol[Idx2D( idx_cell, idx_sys, _localNSys )], 0.0 ); + localScalarFlux += _sol[Idx2D( idx_cell, idx_sys, _localNSys )] * _quadWeights[idx_sys]; + } + _mass += localScalarFlux * _areas[idx_cell]; + _rmsFlux += ( localScalarFlux - _scalarFlux[idx_cell] ) * ( localScalarFlux - _scalarFlux[idx_cell] ); + temp_scalarFlux[idx_cell] = localScalarFlux; // set flux + } +// MPI Allreduce: _scalarFlux +#ifdef BUILD_MPI + MPI_Barrier( MPI_COMM_WORLD ); + MPI_Allreduce( temp_scalarFlux.data(), _scalarFlux.data(), _nCells, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD ); + MPI_Barrier( MPI_COMM_WORLD ); +#endif +#ifndef BUILD_MPI + _scalarFlux = temp_scalarFlux; +#endif +} + +void SNSolverHPC::IterPostprocessing() { + // ALREDUCE NEEDED + + _curAbsorptionLattice = 0.0; + _curScalarOutflow = 0.0; + _curScalarOutflowPeri1 = 0.0; + _curScalarOutflowPeri2 = 0.0; + _curAbsorptionHohlraumCenter = 0.0; // Green and blue areas of symmetric hohlraum + _curAbsorptionHohlraumVertical = 0.0; // Red areas of symmetric hohlraum + _curAbsorptionHohlraumHorizontal = 0.0; // Black areas of symmetric hohlraum + _varAbsorptionHohlraumGreen = 0.0; + double a_g = 0.0; + +#pragma omp parallel for reduction( + : _curAbsorptionLattice, \ + _curScalarOutflow, \ + _curScalarOutflowPeri1, \ + _curScalarOutflowPeri2, \ + _curAbsorptionHohlraumCenter, \ + _curAbsorptionHohlraumVertical, \ + _curAbsorptionHohlraumHorizontal, \ + a_g ) reduction( max : _curMaxOrdinateOutflow, _curMaxAbsorptionLattice ) + for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { + + if( _settings->GetProblemName() == PROBLEM_Lattice || _settings->GetProblemName() == PROBLEM_HalfLattice ) { + if( IsAbsorptionLattice( _cellMidPoints[Idx2D( idx_cell, 0, _nDim )], _cellMidPoints[Idx2D( idx_cell, 1, _nDim )] ) ) { + double sigmaAPsi = _scalarFlux[idx_cell] * ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ) * _areas[idx_cell]; + _curAbsorptionLattice += sigmaAPsi; + _curMaxAbsorptionLattice = ( _curMaxAbsorptionLattice < sigmaAPsi ) ? sigmaAPsi : _curMaxAbsorptionLattice; + } + } + + if( _settings->GetProblemName() == PROBLEM_SymmetricHohlraum || _settings->GetProblemName() == PROBLEM_QuarterHohlraum ) { + + double x = _cellMidPoints[Idx2D( idx_cell, 0, _nDim )]; + double y = _cellMidPoints[Idx2D( idx_cell, 1, _nDim )]; + _curAbsorptionLattice += _scalarFlux[idx_cell] * ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ) * _areas[idx_cell]; + if( x > -0.2 + _settings->GetPosXCenterGreenHohlraum() && x < 0.2 + _settings->GetPosXCenterGreenHohlraum() && + y > -0.4 + _settings->GetPosYCenterGreenHohlraum() && y < 0.4 + _settings->GetPosYCenterGreenHohlraum() ) { + _curAbsorptionHohlraumCenter += _scalarFlux[idx_cell] * ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ) * _areas[idx_cell]; + } + if( ( x < _settings->GetPosRedLeftBorderHohlraum() && y > _settings->GetPosRedLeftBottomHohlraum() && + y < _settings->GetPosRedLeftTopHohlraum() ) || + ( x > _settings->GetPosRedRightBorderHohlraum() && y > _settings->GetPosRedLeftBottomHohlraum() && + y < _settings->GetPosRedRightTopHohlraum() ) ) { + _curAbsorptionHohlraumVertical += _scalarFlux[idx_cell] * ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ) * _areas[idx_cell]; + } + if( y > 0.6 || y < -0.6 ) { + _curAbsorptionHohlraumHorizontal += _scalarFlux[idx_cell] * ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ) * _areas[idx_cell]; + } + + // Variation in absorption of center (part 1) + // green area 1 (lower boundary) + bool green1 = x > -0.2 + _settings->GetPosXCenterGreenHohlraum() && x < 0.2 + _settings->GetPosXCenterGreenHohlraum() && + y > -0.4 + _settings->GetPosYCenterGreenHohlraum() && y < -0.35 + _settings->GetPosYCenterGreenHohlraum(); + // green area 2 (upper boundary) + bool green2 = x > -0.2 + _settings->GetPosXCenterGreenHohlraum() && x < 0.2 + _settings->GetPosXCenterGreenHohlraum() && + y > 0.35 + _settings->GetPosYCenterGreenHohlraum() && y < 0.4 + _settings->GetPosYCenterGreenHohlraum(); + // green area 3 (left boundary) + bool green3 = x > -0.2 + _settings->GetPosXCenterGreenHohlraum() && x < -0.15 + _settings->GetPosXCenterGreenHohlraum() && + y > -0.35 + _settings->GetPosYCenterGreenHohlraum() && y < 0.35 + _settings->GetPosYCenterGreenHohlraum(); + // green area 4 (right boundary) + bool green4 = x > 0.15 + _settings->GetPosXCenterGreenHohlraum() && x < 0.2 + _settings->GetPosXCenterGreenHohlraum() && + y > -0.35 + _settings->GetPosYCenterGreenHohlraum() && y < 0.35 + _settings->GetPosYCenterGreenHohlraum(); + if( green1 || green2 || green3 || green4 ) { + a_g += ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ) * _scalarFlux[idx_cell] * _areas[idx_cell]; + } + } + + if( _settings->GetProblemName() == PROBLEM_Lattice ) { + // Outflow out of inner and middle perimeter + if( _isPerimeterLatticeCell1[idx_cell] ) { // inner + for( unsigned idx_nbr_helper = 0; idx_nbr_helper < _cellsLatticePerimeter1[idx_cell].size(); ++idx_nbr_helper ) { +#pragma omp simd reduction( + : _curScalarOutflowPeri1 ) + for( unsigned idx_sys = 0; idx_sys < _localNSys; idx_sys++ ) { + double localInner = _quadPts[Idx2D( idx_sys, 0, _nDim )] * + _normals[Idx3D( idx_cell, _cellsLatticePerimeter1[idx_cell][idx_nbr_helper], 0, _nNbr, _nDim )] + + _quadPts[Idx2D( idx_sys, 1, _nDim )] * + _normals[Idx3D( idx_cell, _cellsLatticePerimeter1[idx_cell][idx_nbr_helper], 1, _nNbr, _nDim )]; + // Find outward facing transport directions + + if( localInner > 0.0 ) { + _curScalarOutflowPeri1 += + localInner * _sol[Idx2D( idx_cell, idx_sys, _localNSys )] * _quadWeights[idx_sys]; // Integrate flux + } + } + } + } + if( _isPerimeterLatticeCell2[idx_cell] ) { // middle + for( unsigned idx_nbr_helper = 0; idx_nbr_helper < _cellsLatticePerimeter2[idx_cell].size(); ++idx_nbr_helper ) { +#pragma omp simd reduction( + : _curScalarOutflowPeri2 ) + for( unsigned idx_sys = 0; idx_sys < _localNSys; idx_sys++ ) { + double localInner = _quadPts[Idx2D( idx_sys, 0, _nDim )] * + _normals[Idx3D( idx_cell, _cellsLatticePerimeter2[idx_cell][idx_nbr_helper], 0, _nNbr, _nDim )] + + _quadPts[Idx2D( idx_sys, 1, _nDim )] * + _normals[Idx3D( idx_cell, _cellsLatticePerimeter2[idx_cell][idx_nbr_helper], 1, _nNbr, _nDim )]; + // Find outward facing transport directions + + if( localInner > 0.0 ) { + _curScalarOutflowPeri2 += + localInner * _sol[Idx2D( idx_cell, idx_sys, _localNSys )] * _quadWeights[idx_sys]; // Integrate flux + } + } + } + } + } + // Outflow out of domain + if( _cellBoundaryTypes[idx_cell] == BOUNDARY_TYPE::NEUMANN ) { + // Iterate over face cell faces + double currOrdinatewiseOutflow = 0.0; + + for( unsigned idx_nbr = 0; idx_nbr < _nNbr; ++idx_nbr ) { + // Find face that points outward + if( _neighbors[Idx2D( idx_cell, idx_nbr, _nNbr )] == _nCells ) { +#pragma omp simd reduction( + : _curScalarOutflow ) reduction( max : _curMaxOrdinateOutflow ) + for( unsigned idx_sys = 0; idx_sys < _localNSys; idx_sys++ ) { + + double localInner = _quadPts[Idx2D( idx_sys, 0, _nDim )] * _normals[Idx3D( idx_cell, idx_nbr, 0, _nNbr, _nDim )] + + _quadPts[Idx2D( idx_sys, 1, _nDim )] * _normals[Idx3D( idx_cell, idx_nbr, 1, _nNbr, _nDim )]; + // Find outward facing transport directions + + if( localInner > 0.0 ) { + _curScalarOutflow += + localInner * _sol[Idx2D( idx_cell, idx_sys, _localNSys )] * _quadWeights[idx_sys]; // Integrate flux + + currOrdinatewiseOutflow = + _sol[Idx2D( idx_cell, idx_sys, _localNSys )] * localInner / + sqrt( ( + _normals[Idx3D( idx_cell, idx_nbr, 0, _nNbr, _nDim )] * _normals[Idx3D( idx_cell, idx_nbr, 0, _nNbr, _nDim )] + + _normals[Idx3D( idx_cell, idx_nbr, 1, _nNbr, _nDim )] * _normals[Idx3D( idx_cell, idx_nbr, 1, _nNbr, _nDim )] ) ); + + _curMaxOrdinateOutflow = + ( currOrdinatewiseOutflow > _curMaxOrdinateOutflow ) ? currOrdinatewiseOutflow : _curMaxOrdinateOutflow; + } + } + } + } + } + } +// MPI Allreduce +#ifdef BUILD_MPI + double tmp_curScalarOutflow = 0.0; + double tmp_curScalarOutflowPeri1 = 0.0; + double tmp_curScalarOutflowPeri2 = 0.0; + double tmp_mass = 0.0; + double tmp_rmsFlux = 0.0; + MPI_Barrier( MPI_COMM_WORLD ); + MPI_Allreduce( &_curScalarOutflow, &tmp_curScalarOutflow, 1, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD ); + _curScalarOutflow = tmp_curScalarOutflow; + MPI_Barrier( MPI_COMM_WORLD ); + MPI_Allreduce( &_curScalarOutflowPeri1, &tmp_curScalarOutflowPeri1, 1, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD ); + _curScalarOutflowPeri1 = tmp_curScalarOutflowPeri1; + MPI_Barrier( MPI_COMM_WORLD ); + MPI_Allreduce( &_curScalarOutflowPeri2, &tmp_curScalarOutflowPeri2, 1, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD ); + _curScalarOutflowPeri2 = tmp_curScalarOutflowPeri2; + MPI_Barrier( MPI_COMM_WORLD ); + MPI_Allreduce( &_mass, &tmp_mass, 1, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD ); + _mass = tmp_mass; + MPI_Barrier( MPI_COMM_WORLD ); + MPI_Allreduce( &_rmsFlux, &tmp_rmsFlux, 1, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD ); + _rmsFlux = tmp_rmsFlux; + MPI_Barrier( MPI_COMM_WORLD ); +#endif + // Variation absorption (part II) + if( _settings->GetProblemName() == PROBLEM_SymmetricHohlraum ) { + unsigned n_probes = 4; + std::vector temp_probingMoments( 3 * n_probes ); // for MPI allreduce + +#pragma omp parallel for reduction( + : _varAbsorptionHohlraumGreen ) + for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { + double x = _cellMidPoints[Idx2D( idx_cell, 0, _nDim )]; + double y = _cellMidPoints[Idx2D( idx_cell, 1, _nDim )]; + + // green area 1 (lower boundary) + bool green1 = x > -0.2 + _settings->GetPosXCenterGreenHohlraum() && x < 0.2 + _settings->GetPosXCenterGreenHohlraum() && + y > -0.4 + _settings->GetPosYCenterGreenHohlraum() && y < -0.35 + _settings->GetPosYCenterGreenHohlraum(); + // green area 2 (upper boundary) + bool green2 = x > -0.2 + _settings->GetPosXCenterGreenHohlraum() && x < 0.2 + _settings->GetPosXCenterGreenHohlraum() && + y > 0.35 + _settings->GetPosYCenterGreenHohlraum() && y < 0.4 + _settings->GetPosYCenterGreenHohlraum(); + // green area 3 (left boundary) + bool green3 = x > -0.2 + _settings->GetPosXCenterGreenHohlraum() && x < -0.15 + _settings->GetPosXCenterGreenHohlraum() && + y > -0.35 + _settings->GetPosYCenterGreenHohlraum() && y < 0.35 + _settings->GetPosYCenterGreenHohlraum(); + // green area 4 (right boundary) + bool green4 = x > 0.15 + _settings->GetPosXCenterGreenHohlraum() && x < 0.2 + _settings->GetPosXCenterGreenHohlraum() && + y > -0.35 + _settings->GetPosYCenterGreenHohlraum() && y < 0.35 + _settings->GetPosYCenterGreenHohlraum(); + if( green1 || green2 || green3 || green4 ) { + _varAbsorptionHohlraumGreen += ( a_g - _scalarFlux[idx_cell] * ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ) ) * + ( a_g - _scalarFlux[idx_cell] * ( _sigmaT[idx_cell] - _sigmaS[idx_cell] ) ) * _areas[idx_cell]; + } + } + // Probes value moments + // #pragma omp parallel for + for( unsigned idx_probe = 0; idx_probe < n_probes; idx_probe++ ) { // Loop over probing cells + temp_probingMoments[Idx2D( idx_probe, 0, 3 )] = 0.0; + temp_probingMoments[Idx2D( idx_probe, 1, 3 )] = 0.0; + temp_probingMoments[Idx2D( idx_probe, 2, 3 )] = 0.0; + // for( unsigned idx_ball = 0; idx_ball < _probingCellsHohlraum[idx_probe].size(); idx_ball++ ) { + // std::cout << idx_ball << _areas[_probingCellsHohlraum[idx_probe][idx_ball]] / ( 0.01 * 0.01 * M_PI ) << std::endl; + //} + for( unsigned idx_sys = 0; idx_sys < _localNSys; idx_sys++ ) { + for( unsigned idx_ball = 0; idx_ball < _probingCellsHohlraum[idx_probe].size(); idx_ball++ ) { + temp_probingMoments[Idx2D( idx_probe, 0, 3 )] += _sol[Idx2D( _probingCellsHohlraum[idx_probe][idx_ball], idx_sys, _localNSys )] * + _quadWeights[idx_sys] * _areas[_probingCellsHohlraum[idx_probe][idx_ball]] / + ( 0.01 * 0.01 * M_PI ); + temp_probingMoments[Idx2D( idx_probe, 1, 3 )] += + _quadPts[Idx2D( idx_sys, 0, _nDim )] * _sol[Idx2D( _probingCellsHohlraum[idx_probe][idx_ball], idx_sys, _localNSys )] * + _quadWeights[idx_sys] * _areas[_probingCellsHohlraum[idx_probe][idx_ball]] / ( 0.01 * 0.01 * M_PI ); + temp_probingMoments[Idx2D( idx_probe, 2, 3 )] += + _quadPts[Idx2D( idx_sys, 1, _nDim )] * _sol[Idx2D( _probingCellsHohlraum[idx_probe][idx_ball], idx_sys, _localNSys )] * + _quadWeights[idx_sys] * _areas[_probingCellsHohlraum[idx_probe][idx_ball]] / ( 0.01 * 0.01 * M_PI ); + } + } + } + + // probe values green + ComputeQOIsGreenProbingLine(); +#ifdef BUILD_MPI + MPI_Barrier( MPI_COMM_WORLD ); + MPI_Allreduce( temp_probingMoments.data(), _probingMoments.data(), 3 * n_probes, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD ); + MPI_Barrier( MPI_COMM_WORLD ); +#endif +#ifndef BUILD_MPI + for( unsigned idx_probe = 0; idx_probe < n_probes; idx_probe++ ) { // Loop over probing cells + _probingMoments[Idx2D( idx_probe, 0, 3 )] = temp_probingMoments[Idx2D( idx_probe, 0, 3 )]; + _probingMoments[Idx2D( idx_probe, 1, 3 )] = temp_probingMoments[Idx2D( idx_probe, 1, 3 )]; + _probingMoments[Idx2D( idx_probe, 2, 3 )] = temp_probingMoments[Idx2D( idx_probe, 2, 3 )]; + } +#endif + } + + // Update time integral values on rank 0 + if( _rank == 0 ) { + _totalScalarOutflow += _curScalarOutflow * _dT; + _totalScalarOutflowPeri1 += _curScalarOutflowPeri1 * _dT; + _totalScalarOutflowPeri2 += _curScalarOutflowPeri2 * _dT; + _totalAbsorptionLattice += _curAbsorptionLattice * _dT; + + _totalAbsorptionHohlraumCenter += _curAbsorptionHohlraumCenter * _dT; + _totalAbsorptionHohlraumVertical += _curAbsorptionHohlraumVertical * _dT; + _totalAbsorptionHohlraumHorizontal += _curAbsorptionHohlraumHorizontal * _dT; + + _rmsFlux = sqrt( _rmsFlux ); + } +} + +bool SNSolverHPC::IsAbsorptionLattice( double x, double y ) const { + // Check whether pos is inside absorbing squares + double xy_corrector = -3.5; + std::vector lbounds{ 1 + xy_corrector, 2 + xy_corrector, 3 + xy_corrector, 4 + xy_corrector, 5 + xy_corrector }; + std::vector ubounds{ 2 + xy_corrector, 3 + xy_corrector, 4 + xy_corrector, 5 + xy_corrector, 6 + xy_corrector }; + for( unsigned k = 0; k < lbounds.size(); ++k ) { + for( unsigned l = 0; l < lbounds.size(); ++l ) { + if( ( l + k ) % 2 == 1 || ( k == 2 && l == 2 ) || ( k == 2 && l == 4 ) ) continue; + if( x >= lbounds[k] && x <= ubounds[k] && y >= lbounds[l] && y <= ubounds[l] ) { + return true; + } + } + } + return false; +} + +// --- Helper --- +double SNSolverHPC::ComputeTimeStep( double cfl ) const { + // for pseudo 1D, set timestep to dx + double dx, dy; + switch( _settings->GetProblemName() ) { + case PROBLEM_Checkerboard1D: + dx = 7.0 / (double)_nCells; + dy = 0.3; + return cfl * ( dx * dy ) / ( dx + dy ); + break; + case PROBLEM_Linesource1D: // Fallthrough + case PROBLEM_Meltingcube1D: // Fallthrough + case PROBLEM_Aircavity1D: + dx = 3.0 / (double)_nCells; + dy = 0.3; + return cfl * ( dx * dy ) / ( dx + dy ); + break; + default: break; // 2d as normal + } + // 2D case + double charSize = __DBL_MAX__; // minimum char size of all mesh cells in the mesh + for( unsigned j = 0; j < _nCells; j++ ) { + double currCharSize = sqrt( _areas[j] ); + if( currCharSize < charSize ) { + charSize = currCharSize; + } + } + if( _rank == 0 ) { + auto log = spdlog::get( "event" ); + std::string line = "| Smallest characteristic length of a grid cell in this mesh: " + std::to_string( charSize ); + log->info( line ); + line = "| Corresponding maximal time-step: " + std::to_string( cfl * charSize ); + log->info( line ); + } + return cfl * charSize; +} + +// --- IO ---- +void SNSolverHPC::PrepareScreenOutput() { + unsigned nFields = (unsigned)_settings->GetNScreenOutput(); + + _screenOutputFieldNames.resize( nFields ); + _screenOutputFields.resize( nFields ); + + // Prepare all output Fields ==> Specified in option SCREEN_OUTPUT + for( unsigned idx_field = 0; idx_field < nFields; idx_field++ ) { + // Prepare all Output Fields per group + + // Different procedure, depending on the Group... + switch( _settings->GetScreenOutput()[idx_field] ) { + case MASS: _screenOutputFieldNames[idx_field] = "Mass"; break; + case ITER: _screenOutputFieldNames[idx_field] = "Iter"; break; + case WALL_TIME: _screenOutputFieldNames[idx_field] = "Wall time [s]"; break; + case RMS_FLUX: _screenOutputFieldNames[idx_field] = "RMS flux"; break; + case VTK_OUTPUT: _screenOutputFieldNames[idx_field] = "VTK out"; break; + case CSV_OUTPUT: _screenOutputFieldNames[idx_field] = "CSV out"; break; + case CUR_OUTFLOW: _screenOutputFieldNames[idx_field] = "Cur. outflow"; break; + case TOTAL_OUTFLOW: _screenOutputFieldNames[idx_field] = "Tot. outflow"; break; + case CUR_OUTFLOW_P1: _screenOutputFieldNames[idx_field] = "Cur. outflow P1"; break; + case TOTAL_OUTFLOW_P1: _screenOutputFieldNames[idx_field] = "Tot. outflow P1"; break; + case CUR_OUTFLOW_P2: _screenOutputFieldNames[idx_field] = "Cur. outflow P2"; break; + case TOTAL_OUTFLOW_P2: _screenOutputFieldNames[idx_field] = "Tot. outflow P2"; break; + case MAX_OUTFLOW: _screenOutputFieldNames[idx_field] = "Max outflow"; break; + case CUR_PARTICLE_ABSORPTION: _screenOutputFieldNames[idx_field] = "Cur. absorption"; break; + case TOTAL_PARTICLE_ABSORPTION: _screenOutputFieldNames[idx_field] = "Tot. absorption"; break; + case MAX_PARTICLE_ABSORPTION: _screenOutputFieldNames[idx_field] = "Max absorption"; break; + case TOTAL_PARTICLE_ABSORPTION_CENTER: _screenOutputFieldNames[idx_field] = "Tot. abs. center"; break; + case TOTAL_PARTICLE_ABSORPTION_VERTICAL: _screenOutputFieldNames[idx_field] = "Tot. abs. vertical wall"; break; + case TOTAL_PARTICLE_ABSORPTION_HORIZONTAL: _screenOutputFieldNames[idx_field] = "Tot. abs. horizontal wall"; break; + case PROBE_MOMENT_TIME_TRACE: + _screenOutputFieldNames[idx_field] = "Probe 1 u_0"; + idx_field++; + _screenOutputFieldNames[idx_field] = "Probe 2 u_0"; + if( _settings->GetProblemName() == PROBLEM_SymmetricHohlraum ) { + idx_field++; + _screenOutputFieldNames[idx_field] = "Probe 3 u_0"; + idx_field++; + _screenOutputFieldNames[idx_field] = "Probe 4 u_0"; + } + break; + case VAR_ABSORPTION_GREEN: _screenOutputFieldNames[idx_field] = "Var. absorption green"; break; + default: ErrorMessages::Error( "Screen output field not defined!", CURRENT_FUNCTION ); break; + } + } +} + +void SNSolverHPC::WriteScalarOutput( unsigned idx_iter ) { + unsigned n_probes = 4; + + unsigned nFields = (unsigned)_settings->GetNScreenOutput(); + const VectorVector probingMoments = _problem->GetCurrentProbeMoment(); + // -- Screen Output + for( unsigned idx_field = 0; idx_field < nFields; idx_field++ ) { + // Prepare all Output Fields per group + // Different procedure, depending on the Group... + switch( _settings->GetScreenOutput()[idx_field] ) { + case MASS: _screenOutputFields[idx_field] = _mass; break; + case ITER: _screenOutputFields[idx_field] = idx_iter; break; + case WALL_TIME: _screenOutputFields[idx_field] = _currTime; break; + case RMS_FLUX: _screenOutputFields[idx_field] = _rmsFlux; break; + case VTK_OUTPUT: + _screenOutputFields[idx_field] = 0; + if( ( _settings->GetVolumeOutputFrequency() != 0 && idx_iter % (unsigned)_settings->GetVolumeOutputFrequency() == 0 ) || + ( idx_iter == _nIter - 1 ) /* need sol at last iteration */ ) { + _screenOutputFields[idx_field] = 1; + } + break; + case CSV_OUTPUT: + _screenOutputFields[idx_field] = 0; + if( ( _settings->GetHistoryOutputFrequency() != 0 && idx_iter % (unsigned)_settings->GetHistoryOutputFrequency() == 0 ) || + ( idx_iter == _nIter - 1 ) /* need sol at last iteration */ ) { + _screenOutputFields[idx_field] = 1; + } + break; + case CUR_OUTFLOW: _screenOutputFields[idx_field] = _curScalarOutflow; break; + case TOTAL_OUTFLOW: _screenOutputFields[idx_field] = _totalScalarOutflow; break; + case CUR_OUTFLOW_P1: _screenOutputFields[idx_field] = _curScalarOutflowPeri1; break; + case TOTAL_OUTFLOW_P1: _screenOutputFields[idx_field] = _totalScalarOutflowPeri1; break; + case CUR_OUTFLOW_P2: _screenOutputFields[idx_field] = _curScalarOutflowPeri2; break; + case TOTAL_OUTFLOW_P2: _screenOutputFields[idx_field] = _totalScalarOutflowPeri2; break; + case MAX_OUTFLOW: _screenOutputFields[idx_field] = _curMaxOrdinateOutflow; break; + case CUR_PARTICLE_ABSORPTION: _screenOutputFields[idx_field] = _curAbsorptionLattice; break; + case TOTAL_PARTICLE_ABSORPTION: _screenOutputFields[idx_field] = _totalAbsorptionLattice; break; + case MAX_PARTICLE_ABSORPTION: _screenOutputFields[idx_field] = _curMaxAbsorptionLattice; break; + case TOTAL_PARTICLE_ABSORPTION_CENTER: _screenOutputFields[idx_field] = _totalAbsorptionHohlraumCenter; break; + case TOTAL_PARTICLE_ABSORPTION_VERTICAL: _screenOutputFields[idx_field] = _totalAbsorptionHohlraumVertical; break; + case TOTAL_PARTICLE_ABSORPTION_HORIZONTAL: _screenOutputFields[idx_field] = _totalAbsorptionHohlraumHorizontal; break; + case PROBE_MOMENT_TIME_TRACE: + if( _settings->GetProblemName() == PROBLEM_SymmetricHohlraum ) n_probes = 4; + if( _settings->GetProblemName() == PROBLEM_QuarterHohlraum ) n_probes = 2; + for( unsigned i = 0; i < n_probes; i++ ) { + _screenOutputFields[idx_field] = _probingMoments[Idx2D( i, 0, 3 )]; + idx_field++; + } + idx_field--; + break; + case VAR_ABSORPTION_GREEN: _screenOutputFields[idx_field] = _varAbsorptionHohlraumGreen; break; + default: ErrorMessages::Error( "Screen output group not defined!", CURRENT_FUNCTION ); break; + } + } + + // --- History output --- + nFields = (unsigned)_settings->GetNHistoryOutput(); + + std::vector screenOutputFields = _settings->GetScreenOutput(); + for( unsigned idx_field = 0; idx_field < nFields; idx_field++ ) { + + // Prepare all Output Fields per group + // Different procedure, depending on the Group... + switch( _settings->GetHistoryOutput()[idx_field] ) { + case MASS: _historyOutputFields[idx_field] = _mass; break; + case ITER: _historyOutputFields[idx_field] = idx_iter; break; + case WALL_TIME: _historyOutputFields[idx_field] = _currTime; break; + case RMS_FLUX: _historyOutputFields[idx_field] = _rmsFlux; break; + case VTK_OUTPUT: + _historyOutputFields[idx_field] = 0; + if( ( _settings->GetVolumeOutputFrequency() != 0 && idx_iter % (unsigned)_settings->GetVolumeOutputFrequency() == 0 ) || + ( idx_iter == _nIter - 1 ) /* need sol at last iteration */ ) { + _historyOutputFields[idx_field] = 1; + } + break; + + case CSV_OUTPUT: + _historyOutputFields[idx_field] = 0; + if( ( _settings->GetHistoryOutputFrequency() != 0 && idx_iter % (unsigned)_settings->GetHistoryOutputFrequency() == 0 ) || + ( idx_iter == _nIter - 1 ) /* need sol at last iteration */ ) { + _historyOutputFields[idx_field] = 1; + } + break; + case CUR_OUTFLOW: _historyOutputFields[idx_field] = _curScalarOutflow; break; + case TOTAL_OUTFLOW: _historyOutputFields[idx_field] = _totalScalarOutflow; break; + case CUR_OUTFLOW_P1: _historyOutputFields[idx_field] = _curScalarOutflowPeri1; break; + case TOTAL_OUTFLOW_P1: _historyOutputFields[idx_field] = _totalScalarOutflowPeri1; break; + case CUR_OUTFLOW_P2: _historyOutputFields[idx_field] = _curScalarOutflowPeri2; break; + case TOTAL_OUTFLOW_P2: _historyOutputFields[idx_field] = _totalScalarOutflowPeri2; break; + case MAX_OUTFLOW: _historyOutputFields[idx_field] = _curMaxOrdinateOutflow; break; + case CUR_PARTICLE_ABSORPTION: _historyOutputFields[idx_field] = _curAbsorptionLattice; break; + case TOTAL_PARTICLE_ABSORPTION: _historyOutputFields[idx_field] = _totalAbsorptionLattice; break; + case MAX_PARTICLE_ABSORPTION: _historyOutputFields[idx_field] = _curMaxAbsorptionLattice; break; + case TOTAL_PARTICLE_ABSORPTION_CENTER: _historyOutputFields[idx_field] = _totalAbsorptionHohlraumCenter; break; + case TOTAL_PARTICLE_ABSORPTION_VERTICAL: _historyOutputFields[idx_field] = _totalAbsorptionHohlraumVertical; break; + case TOTAL_PARTICLE_ABSORPTION_HORIZONTAL: _historyOutputFields[idx_field] = _totalAbsorptionHohlraumHorizontal; break; + case PROBE_MOMENT_TIME_TRACE: + if( _settings->GetProblemName() == PROBLEM_SymmetricHohlraum ) n_probes = 4; + if( _settings->GetProblemName() == PROBLEM_QuarterHohlraum ) n_probes = 2; + for( unsigned i = 0; i < n_probes; i++ ) { + for( unsigned j = 0; j < 3; j++ ) { + _historyOutputFields[idx_field] = _probingMoments[Idx2D( i, j, 3 )]; + idx_field++; + } + } + idx_field--; + break; + case VAR_ABSORPTION_GREEN: _historyOutputFields[idx_field] = _varAbsorptionHohlraumGreen; break; + case VAR_ABSORPTION_GREEN_LINE: + for( unsigned i = 0; i < _settings->GetNumProbingCellsLineHohlraum(); i++ ) { + _historyOutputFieldNames[idx_field] = _varAbsorptionValsIntegrated[i]; + idx_field++; + } + idx_field--; + break; + default: ErrorMessages::Error( "History output group not defined!", CURRENT_FUNCTION ); break; + } + } +} + +void SNSolverHPC::PrintScreenOutput( unsigned idx_iter ) { + auto log = spdlog::get( "event" ); + + unsigned strLen = 15; // max width of one column + char paddingChar = ' '; + + // assemble the line to print + std::string lineToPrint = "| "; + std::string tmp; + for( unsigned idx_field = 0; idx_field < _settings->GetNScreenOutput(); idx_field++ ) { + tmp = std::to_string( _screenOutputFields[idx_field] ); + + // Format outputs correctly + std::vector integerFields = { ITER }; + std::vector scientificFields = { RMS_FLUX, + MASS, + WALL_TIME, + CUR_OUTFLOW, + TOTAL_OUTFLOW, + CUR_OUTFLOW_P1, + TOTAL_OUTFLOW_P1, + CUR_OUTFLOW_P2, + TOTAL_OUTFLOW_P2, + MAX_OUTFLOW, + CUR_PARTICLE_ABSORPTION, + TOTAL_PARTICLE_ABSORPTION, + MAX_PARTICLE_ABSORPTION, + TOTAL_PARTICLE_ABSORPTION_CENTER, + TOTAL_PARTICLE_ABSORPTION_VERTICAL, + TOTAL_PARTICLE_ABSORPTION_HORIZONTAL, + PROBE_MOMENT_TIME_TRACE, + VAR_ABSORPTION_GREEN, + VAR_ABSORPTION_GREEN_LINE }; + std::vector booleanFields = { VTK_OUTPUT, CSV_OUTPUT }; + + if( !( integerFields.end() == std::find( integerFields.begin(), integerFields.end(), _settings->GetScreenOutput()[idx_field] ) ) ) { + tmp = std::to_string( (int)_screenOutputFields[idx_field] ); + } + else if( !( booleanFields.end() == std::find( booleanFields.begin(), booleanFields.end(), _settings->GetScreenOutput()[idx_field] ) ) ) { + tmp = "no"; + if( (bool)_screenOutputFields[idx_field] ) tmp = "yes"; + } + else if( !( scientificFields.end() == + std::find( scientificFields.begin(), scientificFields.end(), _settings->GetScreenOutput()[idx_field] ) ) ) { + + std::stringstream ss; + ss << TextProcessingToolbox::DoubleToScientificNotation( _screenOutputFields[idx_field] ); + tmp = ss.str(); + tmp.erase( std::remove( tmp.begin(), tmp.end(), '+' ), tmp.end() ); // removing the '+' sign + } + + if( strLen > tmp.size() ) // Padding + tmp.insert( 0, strLen - tmp.size(), paddingChar ); + else if( strLen < tmp.size() ) // Cutting + tmp.resize( strLen ); + + lineToPrint += tmp + " |"; + } + if( _settings->GetScreenOutputFrequency() != 0 && idx_iter % (unsigned)_settings->GetScreenOutputFrequency() == 0 ) { + log->info( lineToPrint ); + } + else if( idx_iter == _nIter - 1 ) { // Always print last iteration + log->info( lineToPrint ); + } +} + +void SNSolverHPC::PrepareHistoryOutput() { + unsigned n_probes = 4; + + unsigned nFields = (unsigned)_settings->GetNHistoryOutput(); + + _historyOutputFieldNames.resize( nFields ); + _historyOutputFields.resize( nFields ); + + // Prepare all output Fields ==> Specified in option SCREEN_OUTPUT + for( unsigned idx_field = 0; idx_field < nFields; idx_field++ ) { + // Prepare all Output Fields per group + + // Different procedure, depending on the Group... + switch( _settings->GetHistoryOutput()[idx_field] ) { + case MASS: _historyOutputFieldNames[idx_field] = "Mass"; break; + case ITER: _historyOutputFieldNames[idx_field] = "Iter"; break; + case WALL_TIME: _historyOutputFieldNames[idx_field] = "Wall_time_[s]"; break; + case RMS_FLUX: _historyOutputFieldNames[idx_field] = "RMS_flux"; break; + case VTK_OUTPUT: _historyOutputFieldNames[idx_field] = "VTK_out"; break; + case CSV_OUTPUT: _historyOutputFieldNames[idx_field] = "CSV_out"; break; + case CUR_OUTFLOW: _historyOutputFieldNames[idx_field] = "Cur_outflow"; break; + case TOTAL_OUTFLOW: _historyOutputFieldNames[idx_field] = "Total_outflow"; break; + case CUR_OUTFLOW_P1: _historyOutputFieldNames[idx_field] = "Cur_outflow_P1"; break; + case TOTAL_OUTFLOW_P1: _historyOutputFieldNames[idx_field] = "Total_outflow_P1"; break; + case CUR_OUTFLOW_P2: _historyOutputFieldNames[idx_field] = "Cur_outflow_P2"; break; + case TOTAL_OUTFLOW_P2: _historyOutputFieldNames[idx_field] = "Total_outflow_P2"; break; + case MAX_OUTFLOW: _historyOutputFieldNames[idx_field] = "Max_outflow"; break; + case CUR_PARTICLE_ABSORPTION: _historyOutputFieldNames[idx_field] = "Cur_absorption"; break; + case TOTAL_PARTICLE_ABSORPTION: _historyOutputFieldNames[idx_field] = "Total_absorption"; break; + case MAX_PARTICLE_ABSORPTION: _historyOutputFieldNames[idx_field] = "Max_absorption"; break; + case TOTAL_PARTICLE_ABSORPTION_CENTER: _historyOutputFieldNames[idx_field] = "Cumulated_absorption_center"; break; + case TOTAL_PARTICLE_ABSORPTION_VERTICAL: _historyOutputFieldNames[idx_field] = "Cumulated_absorption_vertical_wall"; break; + case TOTAL_PARTICLE_ABSORPTION_HORIZONTAL: _historyOutputFieldNames[idx_field] = "Cumulated_absorption_horizontal_wall"; break; + case PROBE_MOMENT_TIME_TRACE: + if( _settings->GetProblemName() == PROBLEM_SymmetricHohlraum ) n_probes = 4; + if( _settings->GetProblemName() == PROBLEM_QuarterHohlraum ) n_probes = 2; + for( unsigned i = 0; i < n_probes; i++ ) { + for( unsigned j = 0; j < 3; j++ ) { + _historyOutputFieldNames[idx_field] = "Probe " + std::to_string( i ) + " u_" + std::to_string( j ); + idx_field++; + } + } + idx_field--; + break; + case VAR_ABSORPTION_GREEN: _historyOutputFieldNames[idx_field] = "Var. absorption green"; break; + case VAR_ABSORPTION_GREEN_LINE: + for( unsigned i = 0; i < _settings->GetNumProbingCellsLineHohlraum(); i++ ) { + _historyOutputFieldNames[idx_field] = "Probe Green Line " + std::to_string( i ); + idx_field++; + } + idx_field--; + break; + default: ErrorMessages::Error( "History output field not defined!", CURRENT_FUNCTION ); break; + } + } +} + +void SNSolverHPC::PrintHistoryOutput( unsigned idx_iter ) { + + auto log = spdlog::get( "tabular" ); + + // assemble the line to print + std::string lineToPrint = ""; + std::string tmp; + for( int idx_field = 0; idx_field < _settings->GetNHistoryOutput() - 1; idx_field++ ) { + if( idx_field == 0 ) { + tmp = std::to_string( _historyOutputFields[idx_field] ); // Iteration count + } + else { + tmp = TextProcessingToolbox::DoubleToScientificNotation( _historyOutputFields[idx_field] ); + } + lineToPrint += tmp + ","; + } + tmp = TextProcessingToolbox::DoubleToScientificNotation( _historyOutputFields[_settings->GetNScreenOutput() - 1] ); + lineToPrint += tmp; // Last element without comma + + if( _settings->GetHistoryOutputFrequency() != 0 && idx_iter % (unsigned)_settings->GetHistoryOutputFrequency() == 0 ) { + log->info( lineToPrint ); + } + else if( idx_iter == _nIter - 1 ) { // Always print last iteration + log->info( lineToPrint ); + } +} + +void SNSolverHPC::DrawPreSolverOutput() { + + // Logger + auto log = spdlog::get( "event" ); + auto logCSV = spdlog::get( "tabular" ); + + std::string hLine = "--"; + + unsigned strLen = 15; // max width of one column + char paddingChar = ' '; + + // Assemble Header for Screen Output + std::string lineToPrint = "| "; + std::string tmpLine = "-----------------"; + for( unsigned idxFields = 0; idxFields < _settings->GetNScreenOutput(); idxFields++ ) { + std::string tmp = _screenOutputFieldNames[idxFields]; + + if( strLen > tmp.size() ) // Padding + tmp.insert( 0, strLen - tmp.size(), paddingChar ); + else if( strLen < tmp.size() ) // Cutting + tmp.resize( strLen ); + + lineToPrint += tmp + " |"; + hLine += tmpLine; + } + log->info( "---------------------------- Solver Starts -----------------------------" ); + log->info( "| The simulation will run for {} iterations.", _nIter ); + log->info( "| The spatial grid contains {} cells.", _nCells ); + if( _settings->GetSolverName() != PN_SOLVER && _settings->GetSolverName() != CSD_PN_SOLVER ) { + log->info( "| The velocity grid contains {} points.", _nq ); + } + log->info( hLine ); + log->info( lineToPrint ); + log->info( hLine ); + + std::string lineToPrintCSV = ""; + for( int idxFields = 0; idxFields < _settings->GetNHistoryOutput() - 1; idxFields++ ) { + std::string tmp = _historyOutputFieldNames[idxFields]; + lineToPrintCSV += tmp + ","; + } + lineToPrintCSV += _historyOutputFieldNames[_settings->GetNHistoryOutput() - 1]; + logCSV->info( lineToPrintCSV ); +} + +void SNSolverHPC::DrawPostSolverOutput() { + + // Logger + auto log = spdlog::get( "event" ); + + std::string hLine = "--"; + + unsigned strLen = 10; // max width of one column + char paddingChar = ' '; + + // Assemble Header for Screen Output + std::string lineToPrint = "| "; + std::string tmpLine = "------------"; + for( unsigned idxFields = 0; idxFields < _settings->GetNScreenOutput(); idxFields++ ) { + std::string tmp = _screenOutputFieldNames[idxFields]; + + if( strLen > tmp.size() ) // Padding + tmp.insert( 0, strLen - tmp.size(), paddingChar ); + else if( strLen < tmp.size() ) // Cutting + tmp.resize( strLen ); + + lineToPrint += tmp + " |"; + hLine += tmpLine; + } + log->info( hLine ); +#ifndef BUILD_TESTING + log->info( "| The volume output files have been stored at " + _settings->GetOutputFile() ); + log->info( "| The log files have been stored at " + _settings->GetLogDir() + _settings->GetLogFile() ); +#endif + log->info( "--------------------------- Solver Finished ----------------------------" ); +} + +unsigned SNSolverHPC::Idx2D( unsigned idx1, unsigned idx2, unsigned len2 ) { return idx1 * len2 + idx2; } + +unsigned SNSolverHPC::Idx3D( unsigned idx1, unsigned idx2, unsigned idx3, unsigned len2, unsigned len3 ) { + return ( idx1 * len2 + idx2 ) * len3 + idx3; +} + +void SNSolverHPC::WriteVolumeOutput( unsigned idx_iter ) { + unsigned nGroups = (unsigned)_settings->GetNVolumeOutput(); + if( ( _settings->GetVolumeOutputFrequency() != 0 && idx_iter % (unsigned)_settings->GetVolumeOutputFrequency() == 0 ) || + ( idx_iter == _nIter - 1 ) /* need sol at last iteration */ ) { + for( unsigned idx_group = 0; idx_group < nGroups; idx_group++ ) { + switch( _settings->GetVolumeOutput()[idx_group] ) { + case MINIMAL: + // for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { + _outputFields[idx_group][0] = _scalarFlux; //[idx_cell]; + //} + break; + + case MOMENTS: +#pragma omp parallel for + for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { + _outputFields[idx_group][0][idx_cell] = 0.0; + _outputFields[idx_group][1][idx_cell] = 0.0; + for( unsigned idx_moments = 0; idx_moments < _nOutputMoments; idx_moments++ ) { + _outputFields[idx_group][0][idx_cell] = 0.0; + _outputFields[idx_group][1][idx_cell] = 0.0; + _outputFields[idx_group][2][idx_cell] = 0.0; + // for( unsigned idx_sys = _startSysIdx; idx_sys < _endSysIdx; idx_sys++ ) { // TODO + // _outputFields[idx_group][0][idx_cell] += + // _quadPts[Idx2D( idx_sys, 0, _nDim )] * _sol[Idx2D( idx_cell, idx_sys, _localNSys )] * _quadWeights[idx_sys]; + // _outputFields[idx_group][1][idx_cell] += + // _quadPts[Idx2D( idx_sys, 1, _nDim )] * _sol[Idx2D( idx_cell, idx_sys, _localNSys )] * _quadWeights[idx_sys]; + // } + } + } + break; + + default: ErrorMessages::Error( "Volume Output Group not defined for HPC SN Solver!", CURRENT_FUNCTION ); break; + } + } + } +} + +void SNSolverHPC::PrepareVolumeOutput() { + unsigned nGroups = (unsigned)_settings->GetNVolumeOutput(); + + _outputFieldNames.resize( nGroups ); + _outputFields.resize( nGroups ); + + // Prepare all OutputGroups ==> Specified in option VOLUME_OUTPUT + for( unsigned idx_group = 0; idx_group < nGroups; idx_group++ ) { + // Prepare all Output Fields per group + + // Different procedure, depending on the Group... + switch( _settings->GetVolumeOutput()[idx_group] ) { + case MINIMAL: + // Currently only one entry ==> rad flux + _outputFields[idx_group].resize( 1 ); + _outputFieldNames[idx_group].resize( 1 ); + + _outputFields[idx_group][0].resize( _nCells ); + _outputFieldNames[idx_group][0] = "scalar flux"; + break; + case MOMENTS: + // As many entries as there are moments in the system + _outputFields[idx_group].resize( _nOutputMoments ); + _outputFieldNames[idx_group].resize( _nOutputMoments ); + + for( unsigned idx_moment = 0; idx_moment < _nOutputMoments; idx_moment++ ) { + _outputFieldNames[idx_group][idx_moment] = std::string( "u_" + std::to_string( idx_moment ) ); + _outputFields[idx_group][idx_moment].resize( _nCells ); + } + break; + + default: ErrorMessages::Error( "Volume Output Group not defined for HPC SN Solver!", CURRENT_FUNCTION ); break; + } + } +} + +void SNSolverHPC::SetGhostCells() { + if( _settings->GetProblemName() == PROBLEM_Lattice ) { + // #pragma omp parallel for + for( unsigned idx_cell = 0; idx_cell < _nCells; idx_cell++ ) { + if( _cellBoundaryTypes[idx_cell] == BOUNDARY_TYPE::NEUMANN || _cellBoundaryTypes[idx_cell] == BOUNDARY_TYPE::DIRICHLET ) { + _ghostCells[idx_cell] = std::vector( _localNSys, 0.0 ); + } + } + } + else if( _settings->GetProblemName() == PROBLEM_HalfLattice ) { // HALF LATTICE NOT WORKING + ErrorMessages::Error( "Test case does not work with MPI", CURRENT_FUNCTION ); + } + else if( _settings->GetProblemName() == PROBLEM_SymmetricHohlraum ) { + + auto nodes = _mesh->GetNodes(); + double tol = 1e-12; // For distance to boundary + + // #pragma omp parallel for + for( unsigned idx_cell = 0; idx_cell < _nCells; idx_cell++ ) { + + if( _cellBoundaryTypes[idx_cell] == BOUNDARY_TYPE::NEUMANN || _cellBoundaryTypes[idx_cell] == BOUNDARY_TYPE::DIRICHLET ) { + _ghostCells[idx_cell] = std::vector( _localNSys, 0.0 ); + + auto localCellNodes = _mesh->GetCells()[idx_cell]; + + for( unsigned idx_node = 0; idx_node < _mesh->GetNumNodesPerCell(); idx_node++ ) { // Check if corner node is in this cell + if( nodes[localCellNodes[idx_node]][0] < -0.65 + tol ) { // close to 0 => left boundary + for( unsigned idx_sys = 0; idx_sys < _localNSys; idx_sys++ ) { + if( _quadPts[Idx2D( idx_sys, 0, _nDim )] > 0.0 ) _ghostCells[idx_cell][idx_sys] = 1.0; + } + break; + } + else if( nodes[localCellNodes[idx_node]][0] > 0.65 - tol ) { // right boundary + for( unsigned idx_sys = 0; idx_sys < _localNSys; idx_sys++ ) { + if( _quadPts[Idx2D( idx_sys, 0, _nDim )] < 0.0 ) _ghostCells[idx_cell][idx_sys] = 1.0; + } + break; + } + else if( nodes[localCellNodes[idx_node]][1] < -0.65 + tol ) { // lower boundary + break; + } + else if( nodes[localCellNodes[idx_node]][1] > 0.65 - tol ) { // upper boundary + break; + } + else if( idx_node == _mesh->GetNumNodesPerCell() - 1 ) { + ErrorMessages::Error( " Problem with ghost cell setup and boundary of this mesh ", CURRENT_FUNCTION ); + } + } + } + } + } + else if( _settings->GetProblemName() == PROBLEM_QuarterHohlraum ) { + ErrorMessages::Error( "Test case does not work with MPI", CURRENT_FUNCTION ); + } +} + +void SNSolverHPC::SetProbingCellsLineGreen() { + + if( _settings->GetProblemName() == PROBLEM_QuarterHohlraum ) { + double verticalLineWidth = std::abs( _cornerUpperLeftGreen[1] - _cornerLowerLeftGreen[1] ); + double horizontalLineWidth = std::abs( _cornerUpperLeftGreen[0] - _cornerUpperRightGreen[0] ); + + // double dx = 2 * ( horizontalLineWidth + verticalLineWidth ) / ( (double)_nProbingCellsLineGreen ); + + unsigned nHorizontalProbingCells = + (unsigned)std::ceil( _nProbingCellsLineGreen * ( horizontalLineWidth / ( horizontalLineWidth + verticalLineWidth ) ) ); + unsigned nVerticalProbingCells = _nProbingCellsLineGreen - nHorizontalProbingCells; + + _probingCellsLineGreen = std::vector( _nProbingCellsLineGreen ); + + // Sample points on each side of the rectangle + std::vector side3 = linspace2D( _cornerLowerRightGreen, _cornerUpperRightGreen, nVerticalProbingCells ); + std::vector side4 = linspace2D( _cornerUpperRightGreen, _cornerUpperLeftGreen, nHorizontalProbingCells ); + + // Combine the points from each side + _probingCellsLineGreen.insert( _probingCellsLineGreen.end(), side3.begin(), side3.end() ); + _probingCellsLineGreen.insert( _probingCellsLineGreen.end(), side4.begin(), side4.end() ); + } + else if( _settings->GetProblemName() == PROBLEM_SymmetricHohlraum ) { + double verticalLineWidth = std::abs( _cornerUpperLeftGreen[1] - _cornerLowerLeftGreen[1] ); + double horizontalLineWidth = std::abs( _cornerUpperLeftGreen[0] - _cornerUpperRightGreen[0] ); + + // double dx = 2 * ( horizontalLineWidth + verticalLineWidth ) / ( (double)_nProbingCellsLineGreen ); + + unsigned nHorizontalProbingCells = + (unsigned)std::ceil( _nProbingCellsLineGreen / 2 * ( horizontalLineWidth / ( horizontalLineWidth + verticalLineWidth ) ) ); + unsigned nVerticalProbingCells = _nProbingCellsLineGreen - nHorizontalProbingCells; + + _probingCellsLineGreen = std::vector( _nProbingCellsLineGreen ); + + std::vector p1 = { _cornerUpperLeftGreen[0] + _thicknessGreen / 2.0, _cornerUpperLeftGreen[1] - _thicknessGreen / 2.0 }; + std::vector p2 = { _cornerLowerLeftGreen[0] + _thicknessGreen / 2.0, _cornerLowerLeftGreen[1] + _thicknessGreen / 2.0 }; + std::vector p3 = { _cornerUpperRightGreen[0] - _thicknessGreen / 2.0, _cornerUpperRightGreen[1] - _thicknessGreen / 2.0 }; + std::vector p4 = { _cornerLowerRightGreen[0] - _thicknessGreen / 2.0, _cornerLowerRightGreen[1] + _thicknessGreen / 2.0 }; + + // Sample points on each side of the rectangle + std::vector side1 = linspace2D( p1, p2, nVerticalProbingCells ); + std::vector side2 = linspace2D( p2, p3, nHorizontalProbingCells ); + std::vector side3 = linspace2D( p3, p4, nVerticalProbingCells ); + std::vector side4 = linspace2D( p4, p1, nHorizontalProbingCells ); + + // Combine the points from each side + _probingCellsLineGreen.insert( _probingCellsLineGreen.end(), side1.begin(), side1.end() ); + _probingCellsLineGreen.insert( _probingCellsLineGreen.end(), side2.begin(), side2.end() ); + _probingCellsLineGreen.insert( _probingCellsLineGreen.end(), side3.begin(), side3.end() ); + _probingCellsLineGreen.insert( _probingCellsLineGreen.end(), side4.begin(), side4.end() ); + } +} + +void SNSolverHPC::ComputeQOIsGreenProbingLine() { + double verticalLineWidth = std::abs( _cornerUpperLeftGreen[1] - _cornerLowerLeftGreen[1] - _thicknessGreen ); + double horizontalLineWidth = std::abs( _cornerUpperLeftGreen[0] - _cornerUpperRightGreen[0] - _thicknessGreen ); + + double dl = 2 * ( horizontalLineWidth + verticalLineWidth ) / ( (double)_nProbingCellsLineGreen ); + double area = dl * _thicknessGreen; + double a_g = 0; + double l_max = _nProbingCellsLineGreen * dl; + + for( unsigned i = 0; i < _nProbingCellsLineGreen; i++ ) { // Loop over probing cells + _absorptionValsIntegrated[i] = + ( _sigmaT[_probingCellsLineGreen[i]] - _sigmaS[_probingCellsLineGreen[i]] ) * _scalarFlux[_probingCellsLineGreen[i]] * area; + a_g += _absorptionValsIntegrated[i] / (double)_nProbingCellsLineGreen; + } + for( unsigned i = 0; i < _nProbingCellsLineGreen; i++ ) { // Loop over probing cells + _varAbsorptionValsIntegrated[i] = dl / l_max * ( a_g - _absorptionValsIntegrated[i] ) * ( a_g - _absorptionValsIntegrated[i] ); + } +} + +std::vector SNSolverHPC::linspace2D( const std::vector& start, const std::vector& end, unsigned num_points ) { + /** + * Generate a 2D linspace based on the start and end points with a specified number of points. + * + * @param start vector of starting x and y coordinates + * @param end vector of ending x and y coordinates + * @param num_points number of points to generate + * + * @return vector of unsigned integers representing the result + */ + + std::vector result; + result.resize( num_points ); + double stepX = ( end[0] - start[0] ) / ( num_points - 1 ); + double stepY = ( end[1] - start[1] ) / ( num_points - 1 ); + + for( unsigned i = 0; i < num_points; ++i ) { + double x = start[0] + i * stepX; + double y = start[1] + i * stepY; + + result[i] = _mesh->GetCellOfKoordinate( x, y ); + } + + return result; +} + +void SNSolverHPC::ComputeCellsPerimeterLattice() { + double l_1 = 1.5; // perimeter 1 + double l_2 = 2.5; // perimeter 2 + auto nodes = _mesh->GetNodes(); + auto cells = _mesh->GetCells(); + auto cellMids = _mesh->GetCellMidPoints(); + auto normals = _mesh->GetNormals(); + auto neigbors = _mesh->GetNeighbours(); + + _isPerimeterLatticeCell1.resize( _mesh->GetNumCells(), false ); + _isPerimeterLatticeCell2.resize( _mesh->GetNumCells(), false ); + + for( unsigned idx_cell = 0; idx_cell < _mesh->GetNumCells(); ++idx_cell ) { + if( abs( cellMids[idx_cell][0] ) < l_1 && abs( cellMids[idx_cell][1] ) < l_1 ) { + // Cell is within perimeter + for( unsigned idx_nbr = 0; idx_nbr < _mesh->GetNumNodesPerCell(); ++idx_nbr ) { + if( neigbors[idx_cell][idx_nbr] == _mesh->GetNumCells() ) { + continue; // Skip boundary - ghost cells + } + + if( abs( ( cellMids[neigbors[idx_cell][idx_nbr]][0] ) > l_1 && abs( cellMids[idx_cell][0] ) < l_1 ) || + abs( ( cellMids[neigbors[idx_cell][idx_nbr]][1] ) > l_1 && abs( cellMids[idx_cell][1] ) < l_1 ) ) { + // neighbor is outside perimeter + _cellsLatticePerimeter1[idx_cell].push_back( idx_nbr ); + _isPerimeterLatticeCell1[idx_cell] = true; + } + } + } + if( abs( cellMids[idx_cell][0] ) < l_2 && abs( cellMids[idx_cell][1] ) < l_2 && abs( cellMids[idx_cell][0] ) > l_1 && + abs( cellMids[idx_cell][1] ) > l_1 ) { + // Cell is within perimeter + for( unsigned idx_nbr = 0; idx_nbr < _mesh->GetNumNodesPerCell(); ++idx_nbr ) { + if( neigbors[idx_cell][idx_nbr] == _mesh->GetNumCells() ) { + continue; // Skip boundary - ghost cells + } + if( abs( ( cellMids[neigbors[idx_cell][idx_nbr]][0] ) > l_2 && abs( cellMids[idx_cell][0] ) < l_2 ) || + abs( ( cellMids[neigbors[idx_cell][idx_nbr]][1] ) > l_2 && abs( cellMids[idx_cell][1] ) < l_2 ) ) { + // neighbor is outside perimeter + _cellsLatticePerimeter2[idx_cell].push_back( idx_nbr ); + _isPerimeterLatticeCell2[idx_cell] = true; + } + } + } + } +} \ No newline at end of file diff --git a/src/solvers/solverbase.cpp b/src/solvers/solverbase.cpp index ea804c15..fbae12f6 100644 --- a/src/solvers/solverbase.cpp +++ b/src/solvers/solverbase.cpp @@ -14,16 +14,16 @@ #include "solvers/pnsolver.hpp" #include "solvers/snsolver.hpp" #include "toolboxes/textprocessingtoolbox.hpp" - -#include +#include +#include +#include SolverBase::SolverBase( Config* settings ) { + _currTime = 0.0; _settings = settings; - // @TODO save parameters from settings class + _mesh = LoadSU2MeshFromFile( settings ); - // build mesh and store and store frequently used params - _mesh = LoadSU2MeshFromFile( settings ); _areas = _mesh->GetCellAreas(); _neighbors = _mesh->GetNeighbours(); _normals = _mesh->GetNormals(); @@ -36,31 +36,42 @@ SolverBase::SolverBase( Config* settings ) { _settings->SetNQuadPoints( _nq ); // build slope related params - _reconstructor = new Reconstructor( settings ); - _reconsOrder = _reconstructor->GetReconsOrder(); - + _reconstructor = new Reconstructor( settings ); // Not used! + _reconsOrder = _reconstructor->GetSpatialOrder(); _interfaceMidPoints = _mesh->GetInterfaceMidPoints(); _cellMidPoints = _mesh->GetCellMidPoints(); // set time step or energy step - _dE = ComputeTimeStep( _settings->GetCFL() ); - + _dT = ComputeTimeStep( _settings->GetCFL() ); if( _settings->GetIsCSD() ) { // carefull: This gets overwritten by almost all subsolvers double minE = 5e-5; // 2.231461e-01; // 5e-5; double maxE = _settings->GetMaxEnergyCSD(); - _nEnergies = std::ceil( ( maxE - minE ) / _dE ); + _nEnergies = std::ceil( ( maxE - minE ) / _dT ); _energies = blaze::linspace( _nEnergies, minE, maxE ); } - else { // Not CSD Solver - _nEnergies = unsigned( settings->GetTEnd() / _dE ); - _energies = blaze::linspace( _nEnergies, 0.0, settings->GetTEnd() ); // go upward from 0 to T_end + else { // Not CSD Solver + _nEnergies = unsigned( settings->GetTEnd() / _dT ); // redundancy with nIter (<-Better) ? + _energies = 0; // blaze::linspace( _nEnergies, 0.0, settings->GetTEnd() ); // go upward from 0 to T_end =>Not needed + } + + // Adjust maxIter, depending if we have a normal run or a csd Run + _nIter = _nEnergies; + if( _settings->GetIsCSD() ) { + _nIter = _nEnergies - 1; // Since CSD does not go the last energy step + } + else { + _nIter++; } + // setup problem and store frequently used params - _problem = ProblemBase::Create( _settings, _mesh ); - _sol = _problem->SetupIC(); - _solNew = _sol; // setup temporary sol variable + + _problem = ProblemBase::Create( _settings, _mesh, _quadrature ); + + _sol = _problem->SetupIC(); + + _solNew = _sol; // setup temporary sol variable if( !_settings->GetIsCSD() ) { _sigmaT = _problem->GetTotalXS( _energies ); _sigmaS = _problem->GetScatteringXS( _energies ); @@ -73,16 +84,12 @@ SolverBase::SolverBase( Config* settings ) { // boundary type _boundaryCells = _mesh->GetBoundaryTypes(); - // Solver Output - _solverOutput.resize( _nCells ); // LEGACY! Only used for CSD SN - - PrepareScreenOutput(); // Screen Output - PrepareHistoryOutput(); // History Output + PrepareScreenOutput(); // Screen Output + PrepareHistoryOutput(); // History Output // initialize Helper Variables - _fluxNew = Vector( _nCells, 0 ); - _flux = Vector( _nCells, 0 ); - + _scalarFluxNew = Vector( _nCells, 0 ); + _scalarFlux = Vector( _nCells, 0 ); // write density _density = _problem->GetDensity( _mesh->GetCellMidPoints() ); } @@ -114,26 +121,26 @@ SolverBase* SolverBase::Create( Config* settings ) { void SolverBase::Solve() { // --- Preprocessing --- - PrepareVolumeOutput(); DrawPreSolverOutput(); - // Adjust maxIter, depending if we have a normal run or a csd Run - _maxIter = _nEnergies; - if( _settings->GetIsCSD() ) { - _maxIter = _nEnergies - 1; // Since CSD does not go the last energy step - } - // Preprocessing before first pseudo time step SolverPreprocessing(); - unsigned rkStages = _settings->GetRKStages(); + unsigned rkStages = _settings->GetTemporalOrder(); // Create Backup solution for Runge Kutta VectorVector solRK0 = _sol; + auto start = std::chrono::high_resolution_clock::now(); // Start timing + std::chrono::duration duration; // Loop over energies (pseudo-time of continuous slowing down approach) - for( unsigned iter = 0; iter < _maxIter; iter++ ) { + for( unsigned iter = 0; iter < _nIter; iter++ ) { + if( iter == _nIter - 1 ) { // last iteration + _dT = _settings->GetTEnd() - iter * _dT; + } + if( rkStages == 2 ) solRK0 = _sol; + for( unsigned rkStep = 0; rkStep < rkStages; ++rkStep ) { // --- Prepare Boundaries and temp variables IterPreprocessing( iter + rkStep ); @@ -150,12 +157,21 @@ void SolverBase::Solve() { // --- Iter Postprocessing --- IterPostprocessing( iter ); + // --- Wall time measurement + duration = std::chrono::high_resolution_clock::now() - start; + _currTime = std::chrono::duration_cast>( duration ).count(); + // --- Runge Kutta Timestep --- if( rkStages == 2 ) RKUpdate( solRK0, _sol ); - // --- Solver Output --- + // --- Write Output --- WriteVolumeOutput( iter ); WriteScalarOutput( iter ); + + // --- Update Scalar Fluxes + _scalarFlux = _scalarFluxNew; + + // --- Print Output --- PrintScreenOutput( iter ); PrintHistoryOutput( iter ); PrintVolumeOutput( iter ); @@ -166,7 +182,7 @@ void SolverBase::Solve() { DrawPostSolverOutput(); } -void SolverBase::RKUpdate( VectorVector sol_0, VectorVector sol_rk ) { +void SolverBase::RKUpdate( VectorVector& sol_0, VectorVector& sol_rk ) { #pragma omp parallel for for( unsigned i = 0; i < _nCells; ++i ) { _sol[i] = 0.5 * ( sol_0[i] + sol_rk[i] ); @@ -179,7 +195,7 @@ void SolverBase::PrintVolumeOutput( int currEnergy ) const { if( _settings->GetVolumeOutputFrequency() != 0 && currEnergy % (unsigned)_settings->GetVolumeOutputFrequency() == 0 ) { ExportVTK( _settings->GetOutputFile() + "_" + std::to_string( currEnergy ), _outputFields, _outputFieldNames, _mesh ); } - if( currEnergy == (int)_maxIter - 1 ) { // Last iteration write without suffix. + if( currEnergy == (int)_nIter - 1 ) { // Last iteration write without suffix. ExportVTK( _settings->GetOutputFile(), _outputFields, _outputFieldNames, _mesh ); } } @@ -204,14 +220,19 @@ double SolverBase::ComputeTimeStep( double cfl ) const { default: break; // 2d as normal } // 2D case - double maxEdge = -1.0; + double charSize = __DBL_MAX__; // minimum char size of all mesh cells in the mesh for( unsigned j = 0; j < _nCells; j++ ) { - for( unsigned l = 0; l < _normals[j].size(); l++ ) { - double currentEdge = _areas[j] / norm( _normals[j][l] ); - if( currentEdge > maxEdge ) maxEdge = currentEdge; + double currCharSize = sqrt( _areas[j] ); + if( currCharSize < charSize ) { + charSize = currCharSize; } } - return cfl * maxEdge; + auto log = spdlog::get( "event" ); + std::string line = "| Smallest characteristic length of a grid cell in this mesh: " + std::to_string( charSize ); + log->info( line ); + line = "| Corresponding maximal time-step: " + std::to_string( cfl * charSize ); + log->info( line ); + return cfl * charSize; } // --- IO ---- @@ -228,56 +249,84 @@ void SolverBase::PrepareScreenOutput() { // Different procedure, depending on the Group... switch( _settings->GetScreenOutput()[idx_field] ) { case MASS: _screenOutputFieldNames[idx_field] = "Mass"; break; - case ITER: _screenOutputFieldNames[idx_field] = "Iter"; break; - + case WALL_TIME: _screenOutputFieldNames[idx_field] = "Wall time [s]"; break; case RMS_FLUX: _screenOutputFieldNames[idx_field] = "RMS flux"; break; - case VTK_OUTPUT: _screenOutputFieldNames[idx_field] = "VTK out"; break; - case CSV_OUTPUT: _screenOutputFieldNames[idx_field] = "CSV out"; break; - + case CUR_OUTFLOW: _screenOutputFieldNames[idx_field] = "Cur. outflow"; break; + case TOTAL_OUTFLOW: _screenOutputFieldNames[idx_field] = "Tot. outflow"; break; + case MAX_OUTFLOW: _screenOutputFieldNames[idx_field] = "Max outflow"; break; + case CUR_PARTICLE_ABSORPTION: _screenOutputFieldNames[idx_field] = "Cur. absorption"; break; + case TOTAL_PARTICLE_ABSORPTION: _screenOutputFieldNames[idx_field] = "Tot. absorption"; break; + case MAX_PARTICLE_ABSORPTION: _screenOutputFieldNames[idx_field] = "Max absorption"; break; + case TOTAL_PARTICLE_ABSORPTION_CENTER: _screenOutputFieldNames[idx_field] = "Tot. abs. center"; break; + case TOTAL_PARTICLE_ABSORPTION_VERTICAL: _screenOutputFieldNames[idx_field] = "Tot. abs. vertical wall"; break; + case TOTAL_PARTICLE_ABSORPTION_HORIZONTAL: _screenOutputFieldNames[idx_field] = "Tot. abs. horizontal wall"; break; + case PROBE_MOMENT_TIME_TRACE: + _screenOutputFieldNames[idx_field] = "Probe 1 u_0"; + idx_field++; + _screenOutputFieldNames[idx_field] = "Probe 2 u_0"; + if( _settings->GetProblemName() == PROBLEM_SymmetricHohlraum ) { + idx_field++; + _screenOutputFieldNames[idx_field] = "Probe 3 u_0"; + idx_field++; + _screenOutputFieldNames[idx_field] = "Probe 4 u_0"; + } + break; + case VAR_ABSORPTION_GREEN: _screenOutputFieldNames[idx_field] = "Var. absorption green"; break; default: ErrorMessages::Error( "Screen output field not defined!", CURRENT_FUNCTION ); break; } } } -void SolverBase::WriteScalarOutput( unsigned iteration ) { - - unsigned nFields = (unsigned)_settings->GetNScreenOutput(); - double mass = 0.0; +void SolverBase::WriteScalarOutput( unsigned idx_iter ) { + unsigned n_probes = 4; + unsigned nFields = (unsigned)_settings->GetNScreenOutput(); + const VectorVector probingMoments = _problem->GetCurrentProbeMoment(); // -- Screen Output for( unsigned idx_field = 0; idx_field < nFields; idx_field++ ) { // Prepare all Output Fields per group // Different procedure, depending on the Group... switch( _settings->GetScreenOutput()[idx_field] ) { - case MASS: - for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { - mass += _fluxNew[idx_cell] * _areas[idx_cell]; - } - _screenOutputFields[idx_field] = mass; - break; - - case ITER: _screenOutputFields[idx_field] = iteration; break; - - case RMS_FLUX: _screenOutputFields[idx_field] = blaze::l2Norm( _fluxNew - _flux ); break; - + case MASS: _screenOutputFields[idx_field] = _problem->GetMass(); break; + case ITER: _screenOutputFields[idx_field] = idx_iter; break; + case WALL_TIME: _screenOutputFields[idx_field] = _currTime; break; + case RMS_FLUX: _screenOutputFields[idx_field] = _problem->GetChangeRateFlux(); break; case VTK_OUTPUT: _screenOutputFields[idx_field] = 0; - if( ( _settings->GetVolumeOutputFrequency() != 0 && iteration % (unsigned)_settings->GetVolumeOutputFrequency() == 0 ) || - ( iteration == _maxIter - 1 ) /* need sol at last iteration */ ) { + if( ( _settings->GetVolumeOutputFrequency() != 0 && idx_iter % (unsigned)_settings->GetVolumeOutputFrequency() == 0 ) || + ( idx_iter == _nIter - 1 ) /* need sol at last iteration */ ) { _screenOutputFields[idx_field] = 1; } break; - case CSV_OUTPUT: _screenOutputFields[idx_field] = 0; - if( ( _settings->GetHistoryOutputFrequency() != 0 && iteration % (unsigned)_settings->GetHistoryOutputFrequency() == 0 ) || - ( iteration == _maxIter - 1 ) /* need sol at last iteration */ ) { + if( ( _settings->GetHistoryOutputFrequency() != 0 && idx_iter % (unsigned)_settings->GetHistoryOutputFrequency() == 0 ) || + ( idx_iter == _nIter - 1 ) /* need sol at last iteration */ ) { _screenOutputFields[idx_field] = 1; } break; + case CUR_OUTFLOW: _screenOutputFields[idx_field] = _problem->GetCurrentOutflow(); break; + case TOTAL_OUTFLOW: _screenOutputFields[idx_field] = _problem->GetTotalOutflow(); break; + case MAX_OUTFLOW: _screenOutputFields[idx_field] = _problem->GetMaxOrdinatewiseOutflow(); break; + case CUR_PARTICLE_ABSORPTION: _screenOutputFields[idx_field] = _problem->GetCurAbsorptionLattice(); break; + case TOTAL_PARTICLE_ABSORPTION: _screenOutputFields[idx_field] = _problem->GetTotalAbsorptionLattice(); break; + case MAX_PARTICLE_ABSORPTION: _screenOutputFields[idx_field] = _problem->GetMaxAbsorptionLattice(); break; + case TOTAL_PARTICLE_ABSORPTION_CENTER: _screenOutputFields[idx_field] = _problem->GetTotalAbsorptionHohlraumCenter(); break; + case TOTAL_PARTICLE_ABSORPTION_VERTICAL: _screenOutputFields[idx_field] = _problem->GetTotalAbsorptionHohlraumVertical(); break; + case TOTAL_PARTICLE_ABSORPTION_HORIZONTAL: _screenOutputFields[idx_field] = _problem->GetTotalAbsorptionHohlraumHorizontal(); break; + case PROBE_MOMENT_TIME_TRACE: + if( _settings->GetProblemName() == PROBLEM_SymmetricHohlraum ) n_probes = 4; + if( _settings->GetProblemName() == PROBLEM_QuarterHohlraum ) n_probes = 2; + for( unsigned i = 0; i < n_probes; i++ ) { + _screenOutputFields[idx_field] = probingMoments[i][0]; + idx_field++; + } + idx_field--; + break; + case VAR_ABSORPTION_GREEN: _screenOutputFields[idx_field] = _problem->GetVarAbsorptionHohlraumGreen(); break; default: ErrorMessages::Error( "Screen output group not defined!", CURRENT_FUNCTION ); break; } } @@ -288,64 +337,65 @@ void SolverBase::WriteScalarOutput( unsigned iteration ) { std::vector screenOutputFields = _settings->GetScreenOutput(); for( unsigned idx_field = 0; idx_field < nFields; idx_field++ ) { - // Check first, if the field was already filled by screenoutput writer! - std::vector::iterator itScreenOutput = - std::find( screenOutputFields.begin(), screenOutputFields.end(), _settings->GetHistoryOutput()[idx_field] ); - // Prepare all Output Fields per group // Different procedure, depending on the Group... switch( _settings->GetHistoryOutput()[idx_field] ) { - case MASS: - if( screenOutputFields.end() == itScreenOutput ) { - for( unsigned idx_cell = 0; idx_cell < _nCells; ++idx_cell ) { - mass += _fluxNew[idx_cell] * _areas[idx_cell]; - } - _historyOutputFields[idx_field] = mass; - } - else { - _historyOutputFields[idx_field] = *itScreenOutput; - } - break; - - case ITER: _historyOutputFields[idx_field] = iteration; break; - - case RMS_FLUX: - if( screenOutputFields.end() == itScreenOutput ) { - _screenOutputFields[idx_field] = blaze::l2Norm( _fluxNew - _flux ); - } - else { - _historyOutputFields[idx_field] = *itScreenOutput; - } - break; - + case MASS: _historyOutputFields[idx_field] = _problem->GetMass(); break; + case ITER: _historyOutputFields[idx_field] = idx_iter; break; + case WALL_TIME: _historyOutputFields[idx_field] = _currTime; break; + case RMS_FLUX: _historyOutputFields[idx_field] = _problem->GetChangeRateFlux(); break; case VTK_OUTPUT: _historyOutputFields[idx_field] = 0; - if( ( _settings->GetVolumeOutputFrequency() != 0 && iteration % (unsigned)_settings->GetVolumeOutputFrequency() == 0 ) || - ( iteration == _maxIter - 1 ) /* need sol at last iteration */ ) { + if( ( _settings->GetVolumeOutputFrequency() != 0 && idx_iter % (unsigned)_settings->GetVolumeOutputFrequency() == 0 ) || + ( idx_iter == _nIter - 1 ) /* need sol at last iteration */ ) { _historyOutputFields[idx_field] = 1; } break; case CSV_OUTPUT: _historyOutputFields[idx_field] = 0; - if( ( _settings->GetHistoryOutputFrequency() != 0 && iteration % (unsigned)_settings->GetHistoryOutputFrequency() == 0 ) || - ( iteration == _maxIter - 1 ) /* need sol at last iteration */ ) { + if( ( _settings->GetHistoryOutputFrequency() != 0 && idx_iter % (unsigned)_settings->GetHistoryOutputFrequency() == 0 ) || + ( idx_iter == _nIter - 1 ) /* need sol at last iteration */ ) { _historyOutputFields[idx_field] = 1; } break; - + case CUR_OUTFLOW: _historyOutputFields[idx_field] = _problem->GetCurrentOutflow(); break; + case TOTAL_OUTFLOW: _historyOutputFields[idx_field] = _problem->GetTotalOutflow(); break; + case MAX_OUTFLOW: _historyOutputFields[idx_field] = _problem->GetMaxOrdinatewiseOutflow(); break; + case CUR_PARTICLE_ABSORPTION: _historyOutputFields[idx_field] = _problem->GetCurAbsorptionLattice(); break; + case TOTAL_PARTICLE_ABSORPTION: _historyOutputFields[idx_field] = _problem->GetTotalAbsorptionLattice(); break; + case MAX_PARTICLE_ABSORPTION: _historyOutputFields[idx_field] = _problem->GetMaxAbsorptionLattice(); break; + case TOTAL_PARTICLE_ABSORPTION_CENTER: _historyOutputFields[idx_field] = _problem->GetTotalAbsorptionHohlraumCenter(); break; + case TOTAL_PARTICLE_ABSORPTION_VERTICAL: _historyOutputFields[idx_field] = _problem->GetTotalAbsorptionHohlraumVertical(); break; + case TOTAL_PARTICLE_ABSORPTION_HORIZONTAL: _historyOutputFields[idx_field] = _problem->GetTotalAbsorptionHohlraumHorizontal(); break; + case PROBE_MOMENT_TIME_TRACE: + if( _settings->GetProblemName() == PROBLEM_SymmetricHohlraum ) n_probes = 4; + if( _settings->GetProblemName() == PROBLEM_QuarterHohlraum ) n_probes = 2; + for( unsigned i = 0; i < n_probes; i++ ) { + for( unsigned j = 0; j < 3; j++ ) { + _historyOutputFields[idx_field] = probingMoments[i][j]; + idx_field++; + } + } + idx_field--; + break; + case VAR_ABSORPTION_GREEN: _historyOutputFields[idx_field] = _problem->GetVarAbsorptionHohlraumGreen(); break; + case VAR_ABSORPTION_GREEN_LINE: + for( unsigned i = 0; i < _settings->GetNumProbingCellsLineHohlraum(); i++ ) { + _historyOutputFieldNames[idx_field] = _problem->GetCurrentVarProbeValuesGreenLine()[i]; + idx_field++; + } + idx_field--; + break; default: ErrorMessages::Error( "History output group not defined!", CURRENT_FUNCTION ); break; } } - _flux = _fluxNew; } -void SolverBase::PrintScreenOutput( unsigned iteration ) { - int rank; - MPI_Comm_rank( MPI_COMM_WORLD, &rank ); +void SolverBase::PrintScreenOutput( unsigned idx_iter ) { auto log = spdlog::get( "event" ); - unsigned strLen = 10; // max width of one column + unsigned strLen = 15; // max width of one column char paddingChar = ' '; // assemble the line to print @@ -356,7 +406,21 @@ void SolverBase::PrintScreenOutput( unsigned iteration ) { // Format outputs correctly std::vector integerFields = { ITER }; - std::vector scientificFields = { RMS_FLUX, MASS }; + std::vector scientificFields = { RMS_FLUX, + MASS, + WALL_TIME, + CUR_OUTFLOW, + TOTAL_OUTFLOW, + MAX_OUTFLOW, + CUR_PARTICLE_ABSORPTION, + TOTAL_PARTICLE_ABSORPTION, + MAX_PARTICLE_ABSORPTION, + TOTAL_PARTICLE_ABSORPTION_CENTER, + TOTAL_PARTICLE_ABSORPTION_VERTICAL, + TOTAL_PARTICLE_ABSORPTION_HORIZONTAL, + PROBE_MOMENT_TIME_TRACE, + VAR_ABSORPTION_GREEN, + VAR_ABSORPTION_GREEN_LINE }; std::vector booleanFields = { VTK_OUTPUT, CSV_OUTPUT }; if( !( integerFields.end() == std::find( integerFields.begin(), integerFields.end(), _settings->GetScreenOutput()[idx_field] ) ) ) { @@ -370,29 +434,29 @@ void SolverBase::PrintScreenOutput( unsigned iteration ) { std::find( scientificFields.begin(), scientificFields.end(), _settings->GetScreenOutput()[idx_field] ) ) ) { std::stringstream ss; - ss << _screenOutputFields[idx_field]; + ss << TextProcessingToolbox::DoubleToScientificNotation( _screenOutputFields[idx_field] ); tmp = ss.str(); tmp.erase( std::remove( tmp.begin(), tmp.end(), '+' ), tmp.end() ); // removing the '+' sign } - if( strLen > tmp.size() ) // Padding + if( strLen > tmp.size() ) // Padding tmp.insert( 0, strLen - tmp.size(), paddingChar ); else if( strLen < tmp.size() ) // Cutting tmp.resize( strLen ); lineToPrint += tmp + " |"; } - if( rank == 0 ) { - if( _settings->GetScreenOutputFrequency() != 0 && iteration % (unsigned)_settings->GetScreenOutputFrequency() == 0 ) { - log->info( lineToPrint ); - } - else if( iteration == _maxIter - 1 ) { // Always print last iteration - log->info( lineToPrint ); - } + if( _settings->GetScreenOutputFrequency() != 0 && idx_iter % (unsigned)_settings->GetScreenOutputFrequency() == 0 ) { + log->info( lineToPrint ); + } + else if( idx_iter == _nIter - 1 ) { // Always print last iteration + log->info( lineToPrint ); } } void SolverBase::PrepareHistoryOutput() { + unsigned n_probes = 4; + unsigned nFields = (unsigned)_settings->GetNHistoryOutput(); _historyOutputFieldNames.resize( nFields ); @@ -405,49 +469,72 @@ void SolverBase::PrepareHistoryOutput() { // Different procedure, depending on the Group... switch( _settings->GetHistoryOutput()[idx_field] ) { case MASS: _historyOutputFieldNames[idx_field] = "Mass"; break; - case ITER: _historyOutputFieldNames[idx_field] = "Iter"; break; - + case WALL_TIME: _historyOutputFieldNames[idx_field] = "Wall_time_[s]"; break; case RMS_FLUX: _historyOutputFieldNames[idx_field] = "RMS_flux"; break; - case VTK_OUTPUT: _historyOutputFieldNames[idx_field] = "VTK_out"; break; - case CSV_OUTPUT: _historyOutputFieldNames[idx_field] = "CSV_out"; break; - + case CUR_OUTFLOW: _historyOutputFieldNames[idx_field] = "Cur_outflow"; break; + case TOTAL_OUTFLOW: _historyOutputFieldNames[idx_field] = "Total_outflow"; break; + case MAX_OUTFLOW: _historyOutputFieldNames[idx_field] = "Max_outflow"; break; + case CUR_PARTICLE_ABSORPTION: _historyOutputFieldNames[idx_field] = "Cur_absorption"; break; + case TOTAL_PARTICLE_ABSORPTION: _historyOutputFieldNames[idx_field] = "Total_absorption"; break; + case MAX_PARTICLE_ABSORPTION: _historyOutputFieldNames[idx_field] = "Max_absorption"; break; + case TOTAL_PARTICLE_ABSORPTION_CENTER: _historyOutputFieldNames[idx_field] = "Cumulated_absorption_center"; break; + case TOTAL_PARTICLE_ABSORPTION_VERTICAL: _historyOutputFieldNames[idx_field] = "Cumulated_absorption_vertical_wall"; break; + case TOTAL_PARTICLE_ABSORPTION_HORIZONTAL: _historyOutputFieldNames[idx_field] = "Cumulated_absorption_horizontal_wall"; break; + case PROBE_MOMENT_TIME_TRACE: + if( _settings->GetProblemName() == PROBLEM_SymmetricHohlraum ) n_probes = 4; + if( _settings->GetProblemName() == PROBLEM_QuarterHohlraum ) n_probes = 2; + for( unsigned i = 0; i < n_probes; i++ ) { + for( unsigned j = 0; j < 3; j++ ) { + _historyOutputFieldNames[idx_field] = "Probe " + std::to_string( i ) + " u_" + std::to_string( j ); + idx_field++; + } + } + idx_field--; + break; + case VAR_ABSORPTION_GREEN: _historyOutputFieldNames[idx_field] = "Var. absorption green"; break; + case VAR_ABSORPTION_GREEN_LINE: + for( unsigned i = 0; i < _settings->GetNumProbingCellsLineHohlraum(); i++ ) { + _historyOutputFieldNames[idx_field] = "Probe Green Line " + std::to_string( i ); + idx_field++; + } + idx_field--; + break; default: ErrorMessages::Error( "History output field not defined!", CURRENT_FUNCTION ); break; } } } -void SolverBase::PrintHistoryOutput( unsigned iteration ) { - int rank; - MPI_Comm_rank( MPI_COMM_WORLD, &rank ); +void SolverBase::PrintHistoryOutput( unsigned idx_iter ) { + auto log = spdlog::get( "tabular" ); // assemble the line to print std::string lineToPrint = ""; std::string tmp; - for( int idx_field = 0; idx_field < _settings->GetNScreenOutput() - 1; idx_field++ ) { - tmp = std::to_string( _screenOutputFields[idx_field] ); + for( int idx_field = 0; idx_field < _settings->GetNHistoryOutput() - 1; idx_field++ ) { + if( idx_field == 0 ) { + tmp = std::to_string( _historyOutputFields[idx_field] ); // Iteration count + } + else { + tmp = TextProcessingToolbox::DoubleToScientificNotation( _historyOutputFields[idx_field] ); + } lineToPrint += tmp + ","; } - tmp = std::to_string( _screenOutputFields[_settings->GetNScreenOutput() - 1] ); + tmp = TextProcessingToolbox::DoubleToScientificNotation( _historyOutputFields[_settings->GetNScreenOutput() - 1] ); lineToPrint += tmp; // Last element without comma - if( rank == 0 ) { - if( _settings->GetHistoryOutputFrequency() != 0 && iteration % (unsigned)_settings->GetHistoryOutputFrequency() == 0 ) { - log->info( lineToPrint ); - } - else if( iteration == _nEnergies - 1 ) { // Always print last iteration - log->info( lineToPrint ); - } + if( _settings->GetHistoryOutputFrequency() != 0 && idx_iter % (unsigned)_settings->GetHistoryOutputFrequency() == 0 ) { + log->info( lineToPrint ); + } + else if( idx_iter == _nEnergies - 1 ) { // Always print last iteration + log->info( lineToPrint ); } } void SolverBase::DrawPreSolverOutput() { - // MPI - int rank; - MPI_Comm_rank( MPI_COMM_WORLD, &rank ); // Logger auto log = spdlog::get( "event" ); @@ -455,76 +542,97 @@ void SolverBase::DrawPreSolverOutput() { std::string hLine = "--"; - if( rank == 0 ) { - unsigned strLen = 10; // max width of one column - char paddingChar = ' '; - - // Assemble Header for Screen Output - std::string lineToPrint = "| "; - std::string tmpLine = "------------"; - for( unsigned idxFields = 0; idxFields < _settings->GetNScreenOutput(); idxFields++ ) { - std::string tmp = _screenOutputFieldNames[idxFields]; + unsigned strLen = 15; // max width of one column + char paddingChar = ' '; - if( strLen > tmp.size() ) // Padding - tmp.insert( 0, strLen - tmp.size(), paddingChar ); - else if( strLen < tmp.size() ) // Cutting - tmp.resize( strLen ); + // Assemble Header for Screen Output + std::string lineToPrint = "| "; + std::string tmpLine = "-----------------"; + for( unsigned idxFields = 0; idxFields < _settings->GetNScreenOutput(); idxFields++ ) { + std::string tmp = _screenOutputFieldNames[idxFields]; - lineToPrint += tmp + " |"; - hLine += tmpLine; - } - log->info( "---------------------------- Solver Starts -----------------------------" ); - log->info( "| The simulation will run for {} iterations.", _nEnergies ); - log->info( "| The spatial grid contains {} cells.", _nCells ); - log->info( hLine ); - log->info( lineToPrint ); - log->info( hLine ); + if( strLen > tmp.size() ) // Padding + tmp.insert( 0, strLen - tmp.size(), paddingChar ); + else if( strLen < tmp.size() ) // Cutting + tmp.resize( strLen ); - std::string lineToPrintCSV = ""; - for( int idxFields = 0; idxFields < _settings->GetNHistoryOutput() - 1; idxFields++ ) { - std::string tmp = _historyOutputFieldNames[idxFields]; - lineToPrintCSV += tmp + ","; - } - lineToPrintCSV += _historyOutputFieldNames[_settings->GetNHistoryOutput() - 1]; - logCSV->info( lineToPrintCSV ); + lineToPrint += tmp + " |"; + hLine += tmpLine; + } + log->info( "---------------------------- Solver Starts -----------------------------" ); + log->info( "| The simulation will run for {} iterations.", _nEnergies ); + log->info( "| The spatial grid contains {} cells.", _nCells ); + if( _settings->GetSolverName() != PN_SOLVER && _settings->GetSolverName() != CSD_PN_SOLVER ) { + log->info( "| The velocity grid contains {} points.", _quadrature->GetNq() ); + } + log->info( hLine ); + log->info( lineToPrint ); + log->info( hLine ); + + std::string lineToPrintCSV = ""; + for( int idxFields = 0; idxFields < _settings->GetNHistoryOutput() - 1; idxFields++ ) { + std::string tmp = _historyOutputFieldNames[idxFields]; + lineToPrintCSV += tmp + ","; } + lineToPrintCSV += _historyOutputFieldNames[_settings->GetNHistoryOutput() - 1]; + logCSV->info( lineToPrintCSV ); } void SolverBase::DrawPostSolverOutput() { - // MPI - int rank; - MPI_Comm_rank( MPI_COMM_WORLD, &rank ); // Logger auto log = spdlog::get( "event" ); std::string hLine = "--"; - if( rank == 0 ) { - unsigned strLen = 10; // max width of one column - char paddingChar = ' '; + unsigned strLen = 10; // max width of one column + char paddingChar = ' '; - // Assemble Header for Screen Output - std::string lineToPrint = "| "; - std::string tmpLine = "------------"; - for( unsigned idxFields = 0; idxFields < _settings->GetNScreenOutput(); idxFields++ ) { - std::string tmp = _screenOutputFieldNames[idxFields]; + // Assemble Header for Screen Output + std::string lineToPrint = "| "; + std::string tmpLine = "------------"; + for( unsigned idxFields = 0; idxFields < _settings->GetNScreenOutput(); idxFields++ ) { + std::string tmp = _screenOutputFieldNames[idxFields]; - if( strLen > tmp.size() ) // Padding - tmp.insert( 0, strLen - tmp.size(), paddingChar ); - else if( strLen < tmp.size() ) // Cutting - tmp.resize( strLen ); + if( strLen > tmp.size() ) // Padding + tmp.insert( 0, strLen - tmp.size(), paddingChar ); + else if( strLen < tmp.size() ) // Cutting + tmp.resize( strLen ); - lineToPrint += tmp + " |"; - hLine += tmpLine; - } - log->info( hLine ); + lineToPrint += tmp + " |"; + hLine += tmpLine; + } + log->info( hLine ); #ifndef BUILD_TESTING - log->info( "| The volume output files have been stored at " + _settings->GetOutputFile() ); - log->info( "| The log files have been stored at " + _settings->GetLogDir() + _settings->GetLogFile() ); + log->info( "| The volume output files have been stored at " + _settings->GetOutputFile() ); + log->info( "| The log files have been stored at " + _settings->GetLogDir() + _settings->GetLogFile() ); #endif - log->info( "--------------------------- Solver Finished ----------------------------" ); - } + log->info( "--------------------------- Solver Finished ----------------------------" ); } void SolverBase::SolverPreprocessing() {} + +void SolverBase::IterPostprocessing( unsigned /*idx_iter*/ ) { + // --- Compute Quantities of interest for Volume and Screen Output --- + ComputeScalarFlux(); // Needs to be called first is a solver function + + _problem->ComputeMass( _scalarFluxNew ); + _problem->ComputeChangeRateFlux( _scalarFlux, _scalarFluxNew ); + + _problem->ComputeCurrentOutflow( _sol ); + _problem->ComputeTotalOutflow( _dT ); + _problem->ComputeMaxOrdinatewiseOutflow( _sol ); + + if( _settings->GetProblemName() == PROBLEM_Lattice || _settings->GetProblemName() == PROBLEM_HalfLattice ) { + _problem->ComputeCurrentAbsorptionLattice( _scalarFlux ); + _problem->ComputeTotalAbsorptionLattice( _dT ); + _problem->ComputeMaxAbsorptionLattice( _scalarFlux ); + } + if( _settings->GetProblemName() == PROBLEM_SymmetricHohlraum || _settings->GetProblemName() == PROBLEM_QuarterHohlraum ) { + _problem->ComputeCurrentAbsorptionHohlraum( _scalarFlux ); // Unify + _problem->ComputeTotalAbsorptionHohlraum( _dT ); // Unify and parallelize + _problem->ComputeCurrentProbeMoment( _sol ); + _problem->ComputeVarAbsorptionGreen( _scalarFlux ); + _problem->ComputeQOIsGreenProbingLine( _scalarFlux ); + } +} diff --git a/src/toolboxes/reconstructor.cpp b/src/toolboxes/reconstructor.cpp index 196e3443..f1d556b8 100644 --- a/src/toolboxes/reconstructor.cpp +++ b/src/toolboxes/reconstructor.cpp @@ -1,7 +1,7 @@ #include "toolboxes/reconstructor.hpp" #include "common/config.hpp" -Reconstructor::Reconstructor( Config* settings ) { _reconsOrder = settings->GetReconsOrder(); } +Reconstructor::Reconstructor( Config* settings ) { _reconsOrder = settings->GetSpatialOrder(); } double FortSign( double a, double b ) { if( b > 0.0 ) return std::fabs( a ); diff --git a/tests/catch2_main.cpp b/tests/catch2_main.cpp index 40dbb5b0..72bfe4a4 100644 --- a/tests/catch2_main.cpp +++ b/tests/catch2_main.cpp @@ -1,21 +1,20 @@ #define CATCH_CONFIG_RUNNER #include "catch.hpp" -#include -#define PY_ARRAY_UNIQUE_SYMBOL KITRT_ARRAY_API +// #include +// #define PY_ARRAY_UNIQUE_SYMBOL KITRT_ARRAY_API #include -#include int main( int argc, char** argv ) { - MPI_Init( &argc, &argv ); + // MPI_Init( &argc, &argv ); - wchar_t* program = Py_DecodeLocale( argv[0], NULL ); - Py_SetProgramName( program ); + // wchar_t* program = Py_DecodeLocale( argv[0], NULL ); + // Py_SetProgramName( program ); const int result = Catch::Session().run( argc, argv ); - if( Py_IsInitialized() ) Py_Finalize(); + // if( Py_IsInitialized() ) Py_Finalize(); std::filesystem::remove_all( std::string( TESTS_PATH ) + "result" ); - MPI_Finalize(); + // MPI_Finalize(); return result; } diff --git a/tests/input/validation_tests/CSD_PN_solver/starmap_validation_reference_2nd.vtk b/tests/input/validation_tests/CSD_PN_solver/starmap_validation_2nd_reference.vtk similarity index 99% rename from tests/input/validation_tests/CSD_PN_solver/starmap_validation_reference_2nd.vtk rename to tests/input/validation_tests/CSD_PN_solver/starmap_validation_2nd_reference.vtk index b6b83503..4d20ea98 100644 --- a/tests/input/validation_tests/CSD_PN_solver/starmap_validation_reference_2nd.vtk +++ b/tests/input/validation_tests/CSD_PN_solver/starmap_validation_2nd_reference.vtk @@ -1925,7 +1925,7 @@ dose 1 900 double -3.9634787121e-09 4.331063791e-10 1.6652105023e-10 -2.0492406838e-11 -5.9173391617e-12 0 0 1.3265954696e-13 5.079133602e-12 2.1203835901e-11 -1.1691765796e-10 -5.8096319529e-10 6.0720365018e-10 3.2728975977e-10 -5.8860185939e-10 9.2353820645e-08 2.5753439354e-07 -1.6663292795e-07 -2.4760119714e-07 8.7623563261e-08 8.3256198552e-08 8.3256198549e-08 8.7623563251e-08 -2.4760119717e-07 -1.6663292797e-07 2.5753439357e-07 9.2353820632e-08 --5.8860185847e-10 3.2728976089e-10 6.0720365169e-10 -5.8096319603e-10 -1.169176583e-10 2.1203835843e-11 5.0791335999e-12 1.3265954902e-13 0 +-5.8860185847e-10 3.2728976088e-10 6.0720365169e-10 -5.8096319603e-10 -1.169176583e-10 2.1203835843e-11 5.0791335999e-12 1.3265954902e-13 0 0 6.9441170589e-14 3.9891641787e-13 -3.5678908874e-12 -2.1005283549e-11 3.6252131435e-11 1.107500315e-10 -1.2748303781e-10 7.1340977782e-10 9.4888121401e-09 -1.8871834322e-08 -2.7575879855e-08 -1.0388633299e-09 1.0202926784e-08 -1.9102382917e-11 -1.9102380785e-11 1.0202926784e-08 -1.0388633308e-09 -2.7575879858e-08 -1.8871834324e-08 9.4888121361e-09 7.1340977786e-10 -1.2748303781e-10 1.1075003176e-10 3.6252131672e-11 -2.1005283568e-11 -3.5678908917e-12 @@ -2022,7 +2022,7 @@ normalized%20dose 1 900 double -3.4567509024e-10 -1.0889844861e-09 1.2110385905e-09 -3.0182967736e-10 -7.390008904e-09 -4.7442370924e-09 -4.7442370937e-09 -7.3900089055e-09 -3.0182967739e-10 1.2110385907e-09 -1.0889844861e-09 -3.4567509017e-10 -3.5939167838e-11 -4.0255534701e-11 -1.170396769e-11 -6.9702849384e-14 4.0797157254e-13 4.7359416102e-15 6.1729045164e-15 5.6452767021e-15 0 0 -4.5101994154e-16 -1.5619324661e-15 1.2692244232e-14 3.3011393694e-14 -3.0209657976e-13 --1.2567561116e-12 -8.0400300792e-14 -4.373654662e-12 -7.8525825823e-12 1.9651367757e-10 1.7376379668e-10 -1.0744571563e-10 -2.6965662874e-10 2.4410848437e-11 +-1.2567561116e-12 -8.0400300793e-14 -4.373654662e-12 -7.8525825823e-12 1.9651367757e-10 1.7376379668e-10 -1.0744571563e-10 -2.6965662874e-10 2.4410848437e-11 2.4410848394e-11 -2.6965662893e-10 -1.0744571564e-10 1.737637967e-10 1.9651367759e-10 -7.8525825685e-12 -4.3736546618e-12 -8.0400300902e-14 -1.2567561152e-12 -3.0209658064e-13 3.3011393698e-14 1.2692244246e-14 -1.5619324549e-15 -4.5101993907e-16 0 0 1.0111318475e-17 3.8713186199e-16 1.61615762e-15 -8.9114707686e-15 -4.4281048929e-14 4.6281097944e-14 2.4946044747e-14 -4.4863268356e-14 7.0392136436e-12 1.9629286629e-11 -1.2700771573e-11 @@ -2033,7 +2033,7 @@ normalized%20dose 1 900 double -2.1018351853e-12 -1.4384123226e-12 7.2323781932e-13 5.4376135244e-14 -9.7167646432e-15 8.4413739369e-15 2.7631396091e-15 -1.6010239495e-15 -2.719448537e-16 3.0405432735e-17 5.2928100992e-18 0 0 -1.6629620433e-19 -6.395920313e-18 -2.9772695882e-17 1.2495492765e-16 6.4461140354e-16 -8.4719259575e-16 -2.0180411121e-15 6.8727585395e-17 -6.6637638887e-14 -1.367625225e-13 4.5612385135e-15 4.4229975117e-14 -7.0250022969e-15 -6.4925500628e-15 --6.4925500625e-15 -7.0250022969e-15 4.4229975119e-14 4.5612385103e-15 -1.3676252251e-13 -6.6637638879e-14 6.8727582574e-17 -2.0180411164e-15 -8.4719259784e-16 +-6.4925500625e-15 -7.0250022969e-15 4.4229975119e-14 4.5612385103e-15 -1.3676252251e-13 -6.6637638879e-14 6.8727582575e-17 -2.0180411164e-15 -8.4719259784e-16 6.4461140554e-16 1.2495492813e-16 -2.9772695839e-17 -6.3959203182e-18 -1.6629620506e-19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 @@ -2055,10 +2055,10 @@ radiation%20flux%20density 1 961 double 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 6.3670769248e-07 -1.5928558811e-06 3.8601826839e-05 -0.00013660676997 -0.00033614994135 0.00076983687416 +0 0 0 6.3670769249e-07 -1.5928558811e-06 3.8601826839e-05 -0.00013660676997 -0.00033614994135 0.00076983687416 0.0021287452393 -0.011699730527 -0.066665202341 -0.35154372707 -1.0513442603 -1.7328535824 1.9671176049 46.815739358 87.738667952 46.815739347 1.9671175983 -1.7328535864 -1.0513442625 -0.35154372763 -0.066665202454 -0.011699730519 0.002128745232 0.00076983687618 --0.00033614993342 -0.00013660676586 3.8601827699e-05 -1.5928558916e-06 6.3670761297e-07 -2.1671147642e-06 4.1894898921e-05 -0.00015850687519 -0.00044322186669 +-0.00033614993342 -0.00013660676586 3.8601827699e-05 -1.5928558916e-06 6.3670761297e-07 -2.1671147642e-06 4.1894898921e-05 -0.00015850687519 -0.0004432218667 0.0012866211416 0.0066807365462 0.0074831058501 -0.068904790319 -0.32967518287 -1.1107705095 -0.84220288427 64.874060241 895.04695233 2789.9263581 3919.4866787 2789.9263587 895.04695247 64.87406021 -0.84220289339 -1.1107705126 -0.32967518338 -0.068904790267 0.0074831059019 0.0066807365892 0.0012866211594 -0.00044322185435 -0.00015850687033 4.1894899606e-05 -2.1671148181e-06 4.0640078612e-05 -0.00023907435623 @@ -2123,7 +2123,7 @@ radiation%20flux%20density 1 961 double 0.001451179502 0.0053389152492 0.022647588376 0.15715081211 1.5475081322 9.9372748216 45.229445791 163.61028554 505.89220082 1367.8207313 3200.9085255 6396.7658394 8369.3926906 6396.7658391 3200.9085252 1367.8207312 505.89220082 163.61028555 45.229445796 9.9372748224 1.5475081322 0.15715081211 0.022647588402 0.0053389152656 0.0014511795096 0.0014531841339 -5.034898642e-05 --6.5176273396e-06 -6.1757454883e-05 -3.7769574871e-06 0.0011637783966 0.0022880059276 0.0042319792805 0.0075969484627 0.023719494791 0.24905967172 +-6.5176273396e-06 -6.1757454883e-05 -3.776957487e-06 0.0011637783966 0.0022880059276 0.0042319792805 0.0075969484627 0.023719494791 0.24905967172 1.7942709481 8.2131691268 27.878256231 67.64883867 85.776122801 78.713522696 85.776122804 67.648838668 27.878256227 8.213169126 1.794270948 0.24905967169 0.023719494774 0.0075969484585 0.0042319792764 0.0022880059267 0.0011637783964 -3.7769575706e-06 -6.1757454854e-05 -6.517627332e-06 3.0159420234e-07 6.0908066537e-06 3.8766915768e-05 8.5029092236e-05 0.000142390364 0.00024113729878 -0.00063512457221 @@ -2136,7 +2136,7 @@ radiation%20flux%20density 1 961 double 3.6928752493e-07 -5.0756977304e-07 -1.3269686585e-05 -5.0960987965e-05 -8.6393961865e-05 -0.00036592940495 -0.0016053967673 -0.00055485527609 0.00018595821152 -0.0065725190536 -0.011068781554 -0.010085531992 -0.011068781557 -0.0065725190555 0.00018595821162 -0.00055485527588 -0.0016053967671 -0.00036592940493 -8.6393961945e-05 -5.0960988039e-05 -1.3269686603e-05 -5.0756977386e-07 3.6928752582e-07 4.7778868973e-08 3.4994177223e-08 1.1031909006e-08 -6.7047683799e-10 --2.4640242809e-09 1.0398566266e-08 2.873257865e-08 -3.1715416494e-07 -1.4593003685e-06 -1.6658510952e-06 -5.279867837e-06 -4.7585451391e-07 0.00019246333044 +-2.4640242809e-09 1.0398566266e-08 2.873257865e-08 -3.1715416494e-07 -1.4593003685e-06 -1.6658510952e-06 -5.279867837e-06 -4.758545139e-07 0.00019246333044 0.00035134947122 0.0001125012089 -0.00037182566479 -0.00032598829806 -9.6226662954e-06 -0.00032598829836 -0.00037182566504 0.0001125012089 0.00035134947125 0.00019246333047 -4.7585450333e-07 -5.2798678369e-06 -1.6658510983e-06 -1.4593003721e-06 -3.1715416585e-07 2.8732578652e-08 1.0398566299e-08 -2.4640242625e-09 -6.7047683366e-10 1.3057785445e-11 4.8011764821e-10 2.2409097424e-09 -8.078170968e-09 -5.0874765211e-08 -8.1084340078e-09 1.2406554738e-08 1.2896351958e-07 @@ -2146,7 +2146,7 @@ radiation%20flux%20density 1 961 double 4.3490979562e-09 9.1450362549e-08 8.6325411649e-07 -8.0152577467e-07 -3.8930661815e-06 -2.6311716376e-06 5.7428827485e-07 9.5099970168e-07 1.3691999009e-07 9.50999702e-07 5.7428827476e-07 -2.6311716379e-06 -3.893066182e-06 -8.0152577528e-07 8.6325411611e-07 9.1450362566e-08 4.3490979773e-09 1.0467567814e-08 1.0617949021e-09 -2.218684691e-09 -2.9320069248e-10 6.1324220515e-11 8.9624264549e-12 -3.3136485162e-13 -1.099368491e-11 -6.3502850803e-11 6.5478021252e-11 -9.2722322111e-10 2.6090594677e-10 -2.1584225188e-09 -1.3532337122e-09 -7.9564834605e-08 -2.6198053986e-07 -1.8787058714e-07 5.3135286877e-08 5.0890806199e-08 +9.2722322111e-10 2.6090594677e-10 -2.1584225188e-09 -1.3532337121e-09 -7.9564834605e-08 -2.6198053986e-07 -1.8787058714e-07 5.3135286877e-08 5.0890806199e-08 -1.5931883906e-08 -1.5950662523e-08 -1.5931883905e-08 5.0890806202e-08 5.3135286875e-08 -1.8787058717e-07 -2.6198053988e-07 -7.95648346e-08 -1.3532337156e-09 -2.1584225227e-09 2.6090594763e-10 9.2722322404e-10 6.5478021935e-11 -6.3502850727e-11 -1.0993684918e-11 -3.3136485311e-13 dose 1 961 double @@ -2246,7 +2246,7 @@ dose 1 961 double -2.6452602744e-07 -1.7481178714e-07 -4.3730362578e-08 2.269203713e-10 1.5035777953e-09 7.2287919524e-11 3.2160919887e-11 1.7037039994e-11 -1.4461699118e-12 -5.2994882575e-12 4.307790314e-11 1.2597840176e-10 -1.0570632937e-09 -5.1064400436e-09 -4.152218225e-09 -1.4674523526e-08 -1.7160465856e-08 7.0627600705e-07 1.2372267716e-06 1.1396321454e-07 -1.2768812271e-06 -7.6168044982e-07 2.017621164e-07 -7.6168045058e-07 -1.2768812278e-06 1.1396321454e-07 1.2372267717e-06 -7.0627600718e-07 -1.7160465813e-08 -1.4674523525e-08 -4.1522182365e-09 -5.1064400581e-09 -1.0570632968e-09 1.2597840172e-10 4.3077903208e-11 -5.2994882127e-12 +7.0627600718e-07 -1.7160465813e-08 -1.4674523525e-08 -4.1522182365e-09 -5.1064400581e-09 -1.0570632968e-09 1.2597840172e-10 4.3077903208e-11 -5.2994882126e-12 -1.4461699032e-12 5.0525179387e-14 1.4200376844e-12 5.7784987584e-12 -3.0071749123e-11 -1.7065850134e-10 4.3310654456e-11 2.2944010091e-10 8.1153660096e-11 2.5491860176e-08 8.5126298001e-08 1.1113437853e-08 -1.1071221707e-07 -3.7703392606e-08 4.5265896553e-08 4.1618548084e-08 4.5265896551e-08 -3.7703392615e-08 -1.1071221708e-07 1.1113437856e-08 8.5126298005e-08 2.5491860172e-08 8.1153660615e-11 2.2944010163e-10 4.3310654772e-11 -1.7065850156e-10 -3.0071749229e-11 @@ -2343,9 +2343,9 @@ normalized%20dose 1 961 double 3.5062150171e-07 1.6550839729e-06 6.1178864286e-06 1.6144679536e-05 2.0553135565e-05 1.8370331825e-05 2.0553135566e-05 1.6144679536e-05 6.1178864279e-06 1.6550839727e-06 3.5062150167e-07 3.8640546268e-08 3.9265636485e-09 3.0851918992e-09 1.416645882e-09 6.2320984952e-10 3.1120753272e-10 1.1328644977e-11 -9.6700264931e-12 -1.4556280299e-12 -5.970594255e-15 9.685498113e-13 7.2603566551e-12 2.0195677771e-11 3.9272342068e-11 1.0104490946e-10 -1.2288258897e-10 --1.3966831326e-09 -2.1155885461e-09 -1.7399848373e-08 -8.7039209307e-08 -1.0761766174e-07 2.4029742247e-08 7.3924249628e-08 2.5667353972e-08 7.3924249632e-08 +-1.3966831326e-09 -2.1155885461e-09 -1.7399848374e-08 -8.7039209307e-08 -1.0761766174e-07 2.4029742247e-08 7.3924249628e-08 2.5667353972e-08 7.3924249632e-08 2.4029742256e-08 -1.0761766174e-07 -8.7039209305e-08 -1.7399848375e-08 -2.1155885496e-09 -1.3966831347e-09 -1.2288258934e-10 1.010449095e-10 3.9272342066e-11 -2.0195677743e-11 7.2603566406e-12 9.6854980775e-13 -5.970594874e-15 1.477243652e-14 1.4755758972e-13 2.7582866685e-13 7.0002746549e-13 3.5240014763e-12 +2.0195677743e-11 7.2603566406e-12 9.6854980774e-13 -5.970594874e-15 1.477243652e-14 1.4755758972e-13 2.7582866685e-13 7.0002746549e-13 3.5240014763e-12 -5.0674900679e-12 -1.110811231e-10 -2.7034622388e-10 -9.2455908813e-10 -7.1051943963e-09 -1.3844572224e-08 -1.2007147435e-08 -1.1455873467e-08 -1.8453192372e-08 -2.3015658071e-08 -1.8453192378e-08 -1.1455873466e-08 -1.2007147434e-08 -1.3844572224e-08 -7.1051943963e-09 -9.2455908852e-10 -2.7034622431e-10 -1.1108112327e-10 -5.0674900813e-12 3.5240014812e-12 7.0002746702e-13 2.7582866682e-13 1.4755758953e-13 1.4772436465e-14 1.2985641926e-15 2.4513071816e-15 5.5097893956e-15 diff --git a/tests/input/validation_tests/CSD_PN_solver/starmap_validation_reference.vtk b/tests/input/validation_tests/CSD_PN_solver/starmap_validation_reference.vtk index 2478d5c8..b2292337 100644 --- a/tests/input/validation_tests/CSD_PN_solver/starmap_validation_reference.vtk +++ b/tests/input/validation_tests/CSD_PN_solver/starmap_validation_reference.vtk @@ -2024,7 +2024,7 @@ normalized%20dose 1 900 double 9.4356442028e-32 4.8531242251e-46 0 0 1.2225609397e-60 2.5568710282e-46 1.7909945946e-32 8.018319536e-23 2.3437875329e-17 1.209636093e-12 2.4908160697e-11 2.619671225e-10 1.904399385e-09 1.0908882917e-08 5.3018635109e-08 2.2766483092e-07 8.6934895637e-07 2.8453559737e-06 2.8453559736e-06 8.6934895632e-07 2.276648309e-07 5.3018635106e-08 1.0908882917e-08 1.9043993849e-09 2.6196712248e-10 2.4908160696e-11 1.2096360929e-12 -2.3437875324e-17 8.0183195341e-23 1.7909945939e-32 2.5568710271e-46 1.2225609392e-60 0 0 2.1831372626e-75 1.3398773371e-60 +2.3437875324e-17 8.0183195341e-23 1.7909945939e-32 2.5568710271e-46 1.2225609392e-60 0 0 2.1831372627e-75 1.3398773371e-60 2.1707301387e-46 3.4750402845e-33 1.5554457767e-23 4.4920798205e-18 2.3100654027e-13 5.0690064537e-12 5.7345918125e-11 4.5256875655e-10 2.8323478669e-09 1.4994417147e-08 6.8330753063e-08 2.5731078051e-07 2.5731078049e-07 6.8330753058e-08 1.4994417146e-08 2.8323478667e-09 4.5256875652e-10 5.7345918122e-11 5.0690064534e-12 2.3100654025e-13 4.4920798195e-18 1.5554457763e-23 3.4750402831e-33 2.1707301378e-46 1.3398773365e-60 2.1831372617e-75 0 @@ -2330,7 +2330,7 @@ normalized%20dose 1 961 double 0.034661069494 0.051809204347 0.076639586738 0.11316423905 0.16773343294 0.27113799327 0.3417699678 0.27113799326 0.16773343294 0.11316423905 0.076639586737 0.051809204346 0.034661069494 0.022660004579 0.014253914124 0.0084792878758 0.0046804477078 0.0023460406938 0.001040371255 0.00039410481668 9.706847303e-05 4.5534072694e-06 2.4549011014e-05 8.7004048988e-05 0.00025143637435 0.00062130946995 0.0013583835302 -0.002699701984 0.004991469539 0.0087651794141 0.014890277528 0.024833882959 0.041024874619 0.067300987643 0.1154580288 0.14737280095 +0.0026997019841 0.004991469539 0.0087651794141 0.014890277528 0.024833882959 0.041024874619 0.067300987643 0.1154580288 0.14737280095 0.1154580288 0.067300987641 0.041024874618 0.024833882959 0.014890277528 0.0087651794139 0.0049914695389 0.002699701984 0.0013583835302 0.00062130946993 0.00025143637434 8.7004048985e-05 2.4549011013e-05 4.5534072691e-06 1.2547131187e-07 1.0151155904e-06 5.1338059752e-06 1.9723356416e-05 6.1863241261e-05 0.00016613314407 0.00039566448587 0.0008599017286 0.0017479799863 0.0033954561293 0.0064107470337 0.011882215924 0.02164239726 diff --git a/tests/input/validation_tests/CSD_SN_FP_2D_solver/waterphantom_2D.cfg b/tests/input/validation_tests/CSD_SN_FP_2D_solver/waterphantom_2D.cfg index d03e7b9d..e495cbfd 100644 --- a/tests/input/validation_tests/CSD_SN_FP_2D_solver/waterphantom_2D.cfg +++ b/tests/input/validation_tests/CSD_SN_FP_2D_solver/waterphantom_2D.cfg @@ -7,7 +7,7 @@ % ---- File specifications ---- % OUTPUT_DIR = ../../../result -OUTPUT_FILE = rtsn_test_waterphantom_2D_CSD_FP +OUTPUT_FILE = waterphantom_2D_CSD_FP LOG_DIR = ../../../result/logs MESH_FILE = ../../mesh_files/waterphantom2D.su2 DATA_DIR = ../../../../data/ diff --git a/tests/input/validation_tests/CSD_SN_FP_solver/waterphantom_1D.cfg b/tests/input/validation_tests/CSD_SN_FP_solver/waterphantom_1D.cfg index c068e95e..b0e0e8c8 100644 --- a/tests/input/validation_tests/CSD_SN_FP_solver/waterphantom_1D.cfg +++ b/tests/input/validation_tests/CSD_SN_FP_solver/waterphantom_1D.cfg @@ -7,7 +7,7 @@ % ---- File specifications ---- % OUTPUT_DIR = ../../../result -OUTPUT_FILE = rtsn_test_waterphantom_1D_CSD_FP +OUTPUT_FILE = waterphantom_1D_CSD_FP LOG_DIR = ../../../result/logs MESH_FILE = ../../mesh_files/waterphantom1D.su2 DATA_DIR = ../../../../data/ diff --git a/tests/input/validation_tests/MN_solver/checkerboard_MN.cfg b/tests/input/validation_tests/MN_solver/checkerboard_MN.cfg index 4977913f..dcbf25a7 100644 --- a/tests/input/validation_tests/MN_solver/checkerboard_MN.cfg +++ b/tests/input/validation_tests/MN_solver/checkerboard_MN.cfg @@ -7,7 +7,7 @@ % ---- File specifications ---- % OUTPUT_DIR = ../../../result -OUTPUT_FILE = rtsn_test_checkerboard_MN +OUTPUT_FILE = checkerboard_MN LOG_DIR = ../../../result/logs MESH_FILE = ../../mesh_files/checkerboard.su2 % diff --git a/tests/input/validation_tests/MN_solver/checkerboard_MN_neural.cfg b/tests/input/validation_tests/MN_solver/checkerboard_MN_neural.cfg index 4c8b1aaf..b1c5e4b9 100644 --- a/tests/input/validation_tests/MN_solver/checkerboard_MN_neural.cfg +++ b/tests/input/validation_tests/MN_solver/checkerboard_MN_neural.cfg @@ -7,7 +7,7 @@ % ---- File specifications ---- % OUTPUT_DIR = ../../../result -OUTPUT_FILE = rtsn_test_checkerboard_MN_neural +OUTPUT_FILE = checkerboard_MN_neural LOG_DIR = ../../../result/logs MESH_FILE = ../../mesh_files/checkerboard.su2 % diff --git a/tests/input/validation_tests/MN_solver/checkerboard_MN_reference.vtk b/tests/input/validation_tests/MN_solver/checkerboard_MN_reference.vtk index 701cdc0d..7c57091d 100644 --- a/tests/input/validation_tests/MN_solver/checkerboard_MN_reference.vtk +++ b/tests/input/validation_tests/MN_solver/checkerboard_MN_reference.vtk @@ -1727,71 +1727,76 @@ CELL_TYPES 1056 CELL_DATA 1056 FIELD FieldData 1 radiation%20flux%20density 1 1056 double --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 0.18696358634 0.18696358634 0.18696358634 0.18696358634 0.18696358634 0.18696358634 -0.18696358634 0.18696358634 0.18696358634 0.18696358634 0.18696358634 0.18696358634 0.18696358634 0.18696358634 0.18696358634 -0.18696358634 0.18696358634 0.18696358634 0.18696358634 0.18696358634 0.18696358634 0.18696358634 0.18696358634 0.18696358634 -0.18696358634 0.18696358634 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 0.081870111779 0.081870111779 0.081870111779 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.16533650084 0.16533650084 0.16533650084 0.16533650084 0.16533650084 0.16533650084 +0.16533650084 0.16533650084 0.16533650084 0.16533650084 0.16533650084 0.16533650084 0.16533650084 0.16533650084 0.16533650084 +0.16533650084 0.16533650084 0.16533650084 0.16533650084 0.16533650084 0.16533650084 0.16533650084 0.16533650084 0.16533650084 +0.16533650084 0.16533650084 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.0001 0.0001 0.0001 0.081870111779 0.081870111779 0.081870111779 0.0001 0.0001 0.0001 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.081870111779 0.081870111779 0.0001 0.0001 0.0001 0.0001 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.0001 -0.0001 0.0001 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.0001 0.0001 0.0001 0.0001 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.0001 0.081870111779 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.081870111779 -0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.0001 0.081870111779 0.081870111779 -0.081870111779 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 @@ -1815,8 +1820,6 @@ radiation%20flux%20density 1 1056 double 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 @@ -1824,12 +1827,9 @@ radiation%20flux%20density 1 1056 double 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.081870111779 0.0001 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.0001 0.0001 0.0001 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.0001 0.0001 0.0001 0.0001 0.081870111779 0.0001 0.0001 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 @@ -1848,66 +1848,66 @@ radiation%20flux%20density 1 1056 double POINT_DATA 565 FIELD FieldData 1 radiation%20flux%20density 1 565 double -0.0001 0.0001 0.0001 0.0001 0.05728721318 0.053190063413 0.03885003923 0.05728721318 0.03885003923 -0.05728721318 0.05728721318 0.053190063413 0.03885003923 0.05728721318 0.053190063413 0.03885003923 0.03885003923 0.05728721318 -0.053190063413 0.03885003923 0.03885003923 0.05728721318 0.086633444145 0.086633444145 0.05728721318 0.03885003923 0.03885003923 -0.05728721318 0.053190063413 0.03885003923 0.053190063413 0.05728721318 0.053190063413 0.05728721318 0.05728721318 0.053190063413 -0.086633444145 0.086633444145 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.040985055889 -0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 -0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.040985055889 0.027356703926 -0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 -0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.040985055889 0.027356703926 0.027356703926 -0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 -0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 -0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.027356703926 0.03885003923 0.03885003923 -0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 -0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 -0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 -0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 -0.03885003923 0.03885003923 0.13441684906 0.13441684906 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 -0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 -0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 -0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 -0.13441684906 0.13441684906 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 0.03885003923 -0.03885003923 0.13441684906 0.13441684906 0.03885003923 0.03885003923 0.13441684906 0.13441684906 0.03885003923 0.03885003923 -0.03885003923 0.03885003923 0.03885003923 0.03885003923 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 0.18696358634 0.18696358634 -0.18696358634 0.18696358634 0.18696358634 0.18696358634 0.18696358634 0.18696358634 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 -0.0041700333184 --0.0041700333184 0.070188667239 0.081870111779 0.081870111779 0.071648847807 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.081870111779 0.081870111779 0.068241759816 0.068241759816 0.068241759816 0.068241759816 0.070188667239 0.068241759816 -0.081870111779 0.081870111779 0.081870111779 0.070188667239 0.070188667239 0.070188667239 0.070188667239 0.081870111779 0.081870111779 -0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.081870111779 0.068241759816 0.068241759816 0.068241759816 0.068241759816 0.068241759816 0.068241759816 0.068241759816 -0.068241759816 0.081870111779 0.068241759816 0.068241759816 0.068241759816 0.068241759816 0.068241759816 0.068241759816 0.081870111779 -0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.070188667239 0.070188667239 0.070188667239 0.068241759816 0.068241759816 -0.070188667239 0.070188667239 0.068241759816 0.068241759816 0.068241759816 0.068241759816 0.068241759816 0.070188667239 0.070188667239 -0.070188667239 0.068241759816 0.068241759816 0.068241759816 0.068241759816 0.068241759816 0.068241759816 0.068241759816 0.068241759816 -0.068241759816 0.081870111779 0.070188667239 0.070188667239 0.070188667239 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.070188667239 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.068241759816 0.049162067067 0.049162067067 -0.049162067067 0.049162067067 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 -0.081870111779 0.065516089423 0.065516089423 0.065516089423 0.081870111779 0.081870111779 0.065516089423 0.065516089423 0.065516089423 -0.065516089423 0.065516089423 0.081870111779 0.081870111779 0.065516089423 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.062346104343 0.059092103104 0.047703098766 0.062346104343 0.047703098766 +0.062346104343 0.062346104343 0.059092103104 0.047703098766 0.062346104343 0.059092103104 0.047703098766 0.047703098766 0.062346104343 +0.059092103104 0.047703098766 0.047703098766 0.062346104343 0.085653202539 0.085653202539 0.062346104343 0.047703098766 0.047703098766 +0.062346104343 0.059092103104 0.047703098766 0.059092103104 0.062346104343 0.059092103104 0.062346104343 0.062346104343 0.059092103104 +0.085653202539 0.085653202539 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.047703098766 0.047703098766 +0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 +0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 +0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 +0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 +0.047703098766 0.047703098766 0.12360330631 0.12360330631 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 +0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 +0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 +0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 +0.12360330631 0.12360330631 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.047703098766 +0.047703098766 0.12360330631 0.12360330631 0.047703098766 0.047703098766 0.12360330631 0.12360330631 0.047703098766 0.047703098766 +0.047703098766 0.047703098766 0.047703098766 0.047703098766 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.16533650084 0.16533650084 +0.16533650084 0.16533650084 0.16533650084 0.16533650084 0.16533650084 0.16533650084 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 0.013536085754 +0.013536085754 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 +0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 0.081870111779 diff --git a/tests/input/validation_tests/MN_solver/checkerboard_MN_reference_neural.vtk b/tests/input/validation_tests/MN_solver/checkerboard_MN_reference_neural.vtk deleted file mode 100644 index e14fd81f..00000000 --- a/tests/input/validation_tests/MN_solver/checkerboard_MN_reference_neural.vtk +++ /dev/null @@ -1,1913 +0,0 @@ -# vtk DataFile Version 5.1 -vtk output -ASCII -DATASET UNSTRUCTURED_GRID -POINTS 565 double -0 0 0 7 0 0 0 7 0 -7 7 0 1 1 0 2 1 0 -2 2 0 1 2 0 5 2 0 -5 1 0 6 1 0 6 2 0 -3 2 0 3 1 0 4 1 0 -4 2 0 5 3 0 6 3 0 -6 4 0 5 4 0 5 5 0 -4 5 0 4 4 0 3 4 0 -3 5 0 2 5 0 2 4 0 -1 4 0 1 3 0 2 3 0 -2 6 0 1 6 0 1 5 0 -6 5 0 6 6 0 5 6 0 -3 3 0 4 3 0 0.38888888889 0 0 -0.77777777778 0 0 1.1666666667 0 0 1.5555555556 0 0 -1.9444444444 0 0 2.3333333333 0 0 2.7222222222 0 0 -3.1111111111 0 0 3.5 0 0 3.8888888889 0 0 -4.2777777778 0 0 4.6666666667 0 0 5.0555555556 0 0 -5.4444444444 0 0 5.8333333333 0 0 6.2222222222 0 0 -6.6111111111 0 0 0 6.6111111111 0 0 6.2222222222 0 -0 5.8333333333 0 0 5.4444444444 0 0 5.0555555556 0 -0 4.6666666667 0 0 4.2777777778 0 0 3.8888888889 0 -0 3.5 0 0 3.1111111111 0 0 2.7222222222 0 -0 2.3333333333 0 0 1.9444444444 0 0 1.5555555556 0 -0 1.1666666667 0 0 0.77777777778 0 0 0.38888888889 0 -7 0.38888888889 0 7 0.77777777778 0 7 1.1666666667 0 -7 1.5555555556 0 7 1.9444444444 0 7 2.3333333333 0 -7 2.7222222222 0 7 3.1111111111 0 7 3.5 0 -7 3.8888888889 0 7 4.2777777778 0 7 4.6666666667 0 -7 5.0555555556 0 7 5.4444444444 0 7 5.8333333333 0 -7 6.2222222222 0 7 6.6111111111 0 6.6111111111 7 0 -6.2222222222 7 0 5.8333333333 7 0 5.4444444444 7 0 -5.0555555556 7 0 4.6666666667 7 0 4.2777777778 7 0 -3.8888888889 7 0 3.5 7 0 3.1111111111 7 0 -2.7222222222 7 0 2.3333333333 7 0 1.9444444444 7 0 -1.5555555556 7 0 1.1666666667 7 0 0.77777777778 7 0 -0.38888888889 7 0 1.3333333333 1 0 1.6666666667 1 0 -2 1.3333333333 0 2 1.6666666667 0 1.6666666667 2 0 -1.3333333333 2 0 1 1.6666666667 0 1 1.3333333333 0 -5 1.6666666667 0 5 1.3333333333 0 5.3333333333 1 0 -5.6666666667 1 0 6 1.3333333333 0 6 1.6666666667 0 -5.6666666667 2 0 5.3333333333 2 0 2.3333333333 2 0 -2.6666666667 2 0 3 1.6666666667 0 3 1.3333333333 0 -3.3333333333 1 0 3.6666666667 1 0 4 1.3333333333 0 -4 1.6666666667 0 4.3333333333 2 0 4.6666666667 2 0 -5 2.3333333333 0 5 2.6666666667 0 5.3333333333 3 0 -5.6666666667 3 0 6 3.3333333333 0 6 3.6666666667 0 -5.6666666667 4 0 5.3333333333 4 0 5 4.3333333333 0 -5 4.6666666667 0 4.6666666667 5 0 4.3333333333 5 0 -4 4.6666666667 0 4 4.3333333333 0 3.6666666667 4 0 -3.3333333333 4 0 3 4.3333333333 0 3 4.6666666667 0 -2.6666666667 5 0 2.3333333333 5 0 2 4.6666666667 0 -2 4.3333333333 0 1.6666666667 4 0 1.3333333333 4 0 -1 3.6666666667 0 1 3.3333333333 0 1.3333333333 3 0 -1.6666666667 3 0 2 2.6666666667 0 2 2.3333333333 0 -2 5.3333333333 0 2 5.6666666667 0 1.6666666667 6 0 -1.3333333333 6 0 1 5.6666666667 0 1 5.3333333333 0 -1.3333333333 5 0 1.6666666667 5 0 5.3333333333 5 0 -5.6666666667 5 0 6 5.3333333333 0 6 5.6666666667 0 -5.6666666667 6 0 5.3333333333 6 0 5 5.6666666667 0 -5 5.3333333333 0 3 2.3333333333 0 3 2.6666666667 0 -3.3333333333 3 0 3.6666666667 3 0 4 2.6666666667 0 -4 2.3333333333 0 3.6666666667 2 0 3.3333333333 2 0 -2 3.3333333333 0 2 3.6666666667 0 2.3333333333 4 0 -2.6666666667 4 0 3 3.6666666667 0 3 3.3333333333 0 -2.6666666667 3 0 2.3333333333 3 0 4 3.3333333333 0 -4 3.6666666667 0 4.3333333333 4 0 4.6666666667 4 0 -5 3.6666666667 0 5 3.3333333333 0 4.6666666667 3 0 -4.3333333333 3 0 1.2951917063 1.5 0 1.7050506247 1.5 0 -1.5000403885 1.2474399183 0 1.5000403885 1.7525600817 0 1.7576802451 1.7576802451 0 -1.2423197549 1.2423197549 0 1.7576802451 1.2423197549 0 1.2423197549 1.7576802451 0 -1.5 3.7048082937 0 1.5 3.2949493753 0 1.2474399183 3.4999596115 0 -1.7525600817 3.4999596115 0 1.2423197549 3.7576802451 0 1.7576802451 3.2423197549 0 -1.7576802451 3.7576802451 0 1.2423197549 3.2423197549 0 1.7048082937 5.5 0 -1.2949493753 5.5 0 1.4999596115 5.2474399183 0 1.4999596115 5.7525600817 0 -1.2423197549 5.2423197549 0 1.7576802451 5.7576802451 0 1.7576802451 5.2423197549 0 -1.2423197549 5.7576802451 0 2.5 2.297798335 0 2.5 2.7026766338 0 -2.2474399183 2.5000791615 0 2.7525600817 2.5000791615 0 2.2423197549 2.7576802451 0 -2.7576802451 2.7576802451 0 2.2423197549 2.2423197549 0 2.7576802451 2.2423197549 0 -2.5 4.6985523849 0 2.5 4.2971333787 0 2.2474399183 4.4992809606 0 -2.7525600817 4.4992809606 0 2.7576802451 4.2423197549 0 2.2423197549 4.7576802451 0 -2.7576802451 4.7576802451 0 2.2423197549 4.2423197549 0 3.5 1.7048082937 0 -3.5 1.2949493753 0 3.2474399183 1.4999596115 0 3.7525600817 1.4999596115 0 -3.2423197549 1.2423197549 0 3.2423197549 1.7576802451 0 3.7576802451 1.2423197549 0 -3.7576802451 1.7576802451 0 3.5 3.2951917063 0 3.5 3.7050506247 0 -3.2474399183 3.5000403885 0 3.7525600817 3.5000403885 0 3.2423197549 3.2423197549 0 -3.7576802451 3.7576802451 0 3.2423197549 3.7576802451 0 3.7576802451 3.2423197549 0 -4.5 2.2951917063 0 4.5 2.7050506247 0 4.2474399183 2.5000403885 0 -4.7525600817 2.5000403885 0 4.7576802451 2.2423197549 0 4.2423197549 2.2423197549 0 -4.7576802451 2.7576802451 0 4.2423197549 2.7576802451 0 4.6985523849 4.5 0 -4.2971333787 4.5 0 4.4992809606 4.7525600817 0 4.4992809606 4.2474399183 0 -4.7576802451 4.7576802451 0 4.2423197549 4.7576802451 0 4.7576802451 4.2423197549 0 -4.2423197549 4.2423197549 0 5.2951917063 1.5 0 5.7050506247 1.5 0 -5.5000403885 1.2474399183 0 5.5000403885 1.7525600817 0 5.2423197549 1.7576802451 0 -5.7576802451 1.2423197549 0 5.2423197549 1.2423197549 0 5.7576802451 1.7576802451 0 -5.5 3.2951917063 0 5.5 3.7050506247 0 5.7525600817 3.5000403885 0 -5.2474399183 3.5000403885 0 5.7576802451 3.2423197549 0 5.2423197549 3.7576802451 0 -5.7576802451 3.7576802451 0 5.2423197549 3.2423197549 0 5.6985523849 5.5 0 -5.2971333787 5.5 0 5.4992809606 5.2474399183 0 5.4992809606 5.7525600817 0 -5.2423197549 5.2423197549 0 5.7576802451 5.2423197549 0 5.7576802451 5.7576802451 0 -5.2423197549 5.7576802451 0 3.7485855544 6.6942501976 0 2.2872656985 5.8378913721 0 -4.7119339728 5.8373697827 0 2.8759754619 6.5951459244 0 2.8162186717 5.3084308736 0 -3.186129153 5.2921568433 0 2.9979032054 5.5850721589 0 3.3402908331 5.6008010525 0 -4.1834772538 5.3076746294 0 4.7107049802 6.1677403394 0 4.4211946596 6.0016838939 0 -0.27665997492 2.5838218441 0 6.7053237048 2.42793991 0 0.29467629521 4.57206009 0 -4.4161781559 0.27665997492 0 6.663212343 4.4722222222 0 2.42793991 0.29467629521 0 -2.2918240758 6.1960938346 0 3.1734987121 5.8836777691 0 3.5136330362 5.8882723168 0 -6.6167962299 6.3741865029 0 6.3741865029 0.38320377014 0 0.38357251857 6.3760800284 0 -0.38320377014 0.6258134971 0 5.5 4.7113248654 0 2.5 1.6872666359 0 -5.8514999722 2.3378951476 0 3.6772759043 4.8414452564 0 4.3378951476 1.1485000278 0 -1.1485000278 4.6621048524 0 1.1485000278 2.6621048524 0 2.3378951476 1.1485000278 0 -5.1103344757 6.2741611014 0 0.71132486541 5.1666666667 0 6.2886751346 1.8333333333 0 -1.8333333333 0.71132486541 0 1.8899895413 6.2784546756 0 5.1666666667 0.71132486541 0 -6.2886751346 5.1666666667 0 0.71132486541 1.8333333333 0 3.8333333333 0.71132486541 0 -6.2886751346 3.8333333333 0 0.71132486541 3.1666666667 0 6.2939163714 3.1693263045 0 -3.1693263045 0.70608362863 0 0.70608362863 3.8306736955 0 6.3007298331 5.8302758913 0 -5.8302758913 0.69927016685 0 0.68791714935 5.8284678454 0 0.69927016685 1.1697241087 0 -1.1703128001 0.69343635082 0 1.1703128001 6.3065636492 0 5.8296871999 6.3065636492 0 -6.3065636492 1.1703128001 0 4.4127643558 6.3484393703 0 4.0729408297 6.1740044985 0 -5.3127333641 2.5 0 4.5 1.6872666359 0 1.6872666359 4.5 0 -1.6872666359 2.5 0 3.5 4.3127333641 0 2.5448645473 5.9628839255 0 -5.8438027206 4.298242306 0 3.341591884 6.1882059124 0 3.8079455038 5.2924572466 0 -4.0000028322 5.5805606494 0 0.80895730489 4.7699760833 0 2.2300239167 0.80895730489 0 -6.1910426951 2.2300239167 0 0.81140688702 2.7706116978 0 4.2293883022 0.81140688702 0 -6.1530370913 4.2585353481 0 2.1540193915 6.522253769 0 4.8162223334 6.4882902395 0 -4.8222111689 0.70955465736 0 6.2921473568 4.827319268 0 0.70955465736 2.1777888311 0 -6.3389745166 0.79855227087 0 0.79855227087 0.66102548337 0 6.2014477291 6.3389745166 0 -0.79902978757 6.339184919 0 2.827319268 0.70785264318 0 6.2921473568 2.827319268 0 -0.70785264318 4.172680732 0 2.984286409 6.1874521762 0 2.6004296679 5.6380503952 0 -4.3907348225 5.6293300039 0 2.4954354469 6.464014563 0 0.49511543862 4.857146981 0 -2.142853019 0.49511543862 0 6.5048845614 2.142853019 0 5.8109523545 2.6966506386 0 -3.3095189699 4.8399570492 0 1.1890476455 2.3033493614 0 2.6966506386 1.1890476455 0 -4.6966506386 1.1890476455 0 1.1890476455 4.3033493614 0 3.5 5.1333820886 0 -6.0092788027 4.6114103291 0 4.1180693191 6.5205687606 0 1.3559386168 0.35702514778 0 -5.6476385745 0.34601141574 0 0.34413339402 5.6496515319 0 0.34601141574 1.3523614255 0 -6.6539885843 5.6476385745 0 5.6440613832 6.6429748522 0 1.3559386168 6.6429748522 0 -6.6429748522 1.3559386168 0 3.691651827 6.1657024845 0 0.38131474442 4.0107495165 0 -0.35859789556 3.6542298248 0 2.9892504835 0.38131474442 0 3.3457701752 0.35859789556 0 -6.6186852556 2.9892504835 0 6.6414021044 3.3457701752 0 2.485711609 5.2962123554 0 -4.5142724884 5.301683263 0 4.1386885406 0.49621789734 0 0.49621789734 2.8613114594 0 -6.4653693356 4.1675183045 0 1.7815734083 0.35375209722 0 0.35191041811 5.2192251844 0 -5.2045327576 6.6420335985 0 5.2715908019 0.34496760504 0 0.34496760504 1.7284091981 0 -1.7912623484 6.6472833477 0 6.6462479028 1.7815734083 0 6.655032395 5.2715908019 0 -6.0018111307 0.33962155199 0 6.660378448 6.0018111307 0 0.33962155199 0.99818886931 0 -0.33789389548 6.0020556849 0 4.8431738401 0.36643899333 0 0.36643899333 2.1568261599 0 -6.6695014189 4.8502181121 0 3.3194031049 6.6880752893 0 0.98302760942 6.6572105079 0 -6.0170519767 6.6571754409 0 6.6571754409 0.9829480233 0 0.9829480233 0.34282455914 0 -0.60283050123 6.6812981717 0 6.6809416725 0.60267619269 0 0.60267619269 0.31905832746 0 -6.3973238073 6.6809416725 0 5.508864916 4.3176715804 0 3.7798225257 0.35426223421 0 -0.35426223421 3.2201774743 0 6.6429380014 3.7819238204 0 0.71132486541 5.5 0 -5.4647693027 6.3109555335 0 1.5 0.71132486541 0 3.5 0.71132486541 0 -0.71132486541 3.5 0 6.2886751346 1.5 0 6.2886751346 3.5 0 -1.5345838844 6.3125460874 0 0.68359567551 1.5139713443 0 5.4860286557 0.68359567551 0 -6.3164043245 5.4860286557 0 3.8562774257 5.8821749764 0 3.6699225845 5.605196088 0 -1.4889231782 2.2683482754 0 4.2792377468 1.4836539648 0 1.4836539648 4.7207622532 0 -2.7316517246 1.4889231782 0 2.2792377468 1.4836539648 0 4.7316517246 1.4889231782 0 -1.4889231782 4.2683482754 0 1.4836539648 2.7207622532 0 5.5110768218 2.7316517246 0 -3.7254775389 4.5149805864 0 5.5163460352 2.2792377468 0 3.268872902 4.5135432074 0 -5.2577156165 4.5024656842 0 4.4622778425 6.7091394296 0 4.7298690047 5.5101886931 0 -2.2688375943 5.5108306574 0 2.8342620517 5.9200874307 0 6.1011617565 2.5896524196 0 -0.89883824353 4.4103475804 0 2.5896524196 0.89883824353 0 4.5905860622 0.90250087777 0 -0.90250087777 2.4094139378 0 4.1482301139 5.8535508044 0 5.7304233372 4.5457335678 0 -0.61150415012 4.5053171973 0 2.4946828027 0.61150415012 0 6.3884958499 2.4946828027 0 -2.6875072329 6.241734154 0 0.62319900485 2.5163760965 0 4.4836239035 0.62319900485 0 -6.344872009 4.4992776743 0 6.1032102599 0.60924395918 0 6.3907560408 6.1032102599 0 -0.60924395918 0.89678974009 0 3.4973064736 4.6227820967 0 5.6337719449 2.5046362508 0 -4.5046362508 1.3662280551 0 1.3662280551 4.4953637492 0 1.3662280551 2.4953637492 0 -2.5046362508 1.3662280551 0 3.5182835002 6.4255120262 0 0.61953455275 6.1042915982 0 -2.5006402704 6.7530746008 0 0.28468642517 6.7153135748 0 6.7153135748 6.7153135748 0 -6.7153135748 0.28468642517 0 0.28468642517 0.28468642517 0 3.1742927262 6.4144116318 0 -5.2440169359 2.7559830641 0 3.2440169359 4.2440169359 0 1.7559830641 2.7559830641 0 -2.2440169359 1.7559830641 0 1.7559830641 2.2440169359 0 4.7559830641 1.7559830641 0 -1.7559830641 4.2440169359 0 2.7559830641 1.7559830641 0 4.2440169359 1.7559830641 0 -1.7559830641 4.7559830641 0 5.2440169359 2.2440169359 0 3.7559830641 4.2440169359 0 -5.2423197549 4.2423197549 0 5.2423197549 4.7576802451 0 4.7613986112 5.2386013888 0 -2.2384259709 5.2384259709 0 6.7639984277 4.1078568115 0 4.0833333333 0.211765343 0 -0.211765343 2.9166666667 0 3.8374896999 6.4117612101 0 3.5013858762 5.3869102862 0 -2.134202276 0.21139943727 0 6.7886005627 2.134202276 0 0.2112652041 4.8658559305 0 -2.1388888889 6.7986250028 0 4.8538005863 6.7883841504 0 5.7838156143 4.7783580398 0 -6.4924332819 4.6622593191 0 4.0833333333 6.8065437748 0 3.2489120307 5.0663739953 0 -3.7314939424 5.0719810643 0 6.6009304334 2.6922829373 0 2.6922829373 0.39906956659 0 -0.39906956659 4.3077170627 0 3.5 2.702201665 0 3.5 2.2973233662 0 -3.2474399183 2.4999208385 0 3.7525600817 2.4999208385 0 3.2423197549 2.7576802451 0 -3.7576802451 2.2423197549 0 3.2423197549 2.2423197549 0 3.7576802451 2.7576802451 0 -2.5 3.7048082937 0 2.5 3.2949493753 0 2.2474399183 3.4999596115 0 -2.7525600817 3.4999596115 0 2.7576802451 3.2423197549 0 2.2423197549 3.7576802451 0 -2.7576802451 3.7576802451 0 2.2423197549 3.2423197549 0 4.6985523849 3.5 0 -4.2971333787 3.5 0 4.4992809606 3.7525600817 0 4.4992809606 3.2474399183 0 -4.7576802451 3.2423197549 0 4.2423197549 3.2423197549 0 4.7576802451 3.7576802451 0 -4.2423197549 3.7576802451 0 -CELLS 1057 3168 -OFFSETS vtktypeint64 -0 3 6 9 12 15 18 21 24 -27 30 33 36 39 42 45 48 51 -54 57 60 63 66 69 72 75 78 -81 84 87 90 93 96 99 102 105 -108 111 114 117 120 123 126 129 132 -135 138 141 144 147 150 153 156 159 -162 165 168 171 174 177 180 183 186 -189 192 195 198 201 204 207 210 213 -216 219 222 225 228 231 234 237 240 -243 246 249 252 255 258 261 264 267 -270 273 276 279 282 285 288 291 294 -297 300 303 306 309 312 315 318 321 -324 327 330 333 336 339 342 345 348 -351 354 357 360 363 366 369 372 375 -378 381 384 387 390 393 396 399 402 -405 408 411 414 417 420 423 426 429 -432 435 438 441 444 447 450 453 456 -459 462 465 468 471 474 477 480 483 -486 489 492 495 498 501 504 507 510 -513 516 519 522 525 528 531 534 537 -540 543 546 549 552 555 558 561 564 -567 570 573 576 579 582 585 588 591 -594 597 600 603 606 609 612 615 618 -621 624 627 630 633 636 639 642 645 -648 651 654 657 660 663 666 669 672 -675 678 681 684 687 690 693 696 699 -702 705 708 711 714 717 720 723 726 -729 732 735 738 741 744 747 750 753 -756 759 762 765 768 771 774 777 780 -783 786 789 792 795 798 801 804 807 -810 813 816 819 822 825 828 831 834 -837 840 843 846 849 852 855 858 861 -864 867 870 873 876 879 882 885 888 -891 894 897 900 903 906 909 912 915 -918 921 924 927 930 933 936 939 942 -945 948 951 954 957 960 963 966 969 -972 975 978 981 984 987 990 993 996 -999 1002 1005 1008 1011 1014 1017 1020 1023 -1026 1029 1032 1035 1038 1041 1044 1047 1050 -1053 1056 1059 1062 1065 1068 1071 1074 1077 -1080 1083 1086 1089 1092 1095 1098 1101 1104 -1107 1110 1113 1116 1119 1122 1125 1128 1131 -1134 1137 1140 1143 1146 1149 1152 1155 1158 -1161 1164 1167 1170 1173 1176 1179 1182 1185 -1188 1191 1194 1197 1200 1203 1206 1209 1212 -1215 1218 1221 1224 1227 1230 1233 1236 1239 -1242 1245 1248 1251 1254 1257 1260 1263 1266 -1269 1272 1275 1278 1281 1284 1287 1290 1293 -1296 1299 1302 1305 1308 1311 1314 1317 1320 -1323 1326 1329 1332 1335 1338 1341 1344 1347 -1350 1353 1356 1359 1362 1365 1368 1371 1374 -1377 1380 1383 1386 1389 1392 1395 1398 1401 -1404 1407 1410 1413 1416 1419 1422 1425 1428 -1431 1434 1437 1440 1443 1446 1449 1452 1455 -1458 1461 1464 1467 1470 1473 1476 1479 1482 -1485 1488 1491 1494 1497 1500 1503 1506 1509 -1512 1515 1518 1521 1524 1527 1530 1533 1536 -1539 1542 1545 1548 1551 1554 1557 1560 1563 -1566 1569 1572 1575 1578 1581 1584 1587 1590 -1593 1596 1599 1602 1605 1608 1611 1614 1617 -1620 1623 1626 1629 1632 1635 1638 1641 1644 -1647 1650 1653 1656 1659 1662 1665 1668 1671 -1674 1677 1680 1683 1686 1689 1692 1695 1698 -1701 1704 1707 1710 1713 1716 1719 1722 1725 -1728 1731 1734 1737 1740 1743 1746 1749 1752 -1755 1758 1761 1764 1767 1770 1773 1776 1779 -1782 1785 1788 1791 1794 1797 1800 1803 1806 -1809 1812 1815 1818 1821 1824 1827 1830 1833 -1836 1839 1842 1845 1848 1851 1854 1857 1860 -1863 1866 1869 1872 1875 1878 1881 1884 1887 -1890 1893 1896 1899 1902 1905 1908 1911 1914 -1917 1920 1923 1926 1929 1932 1935 1938 1941 -1944 1947 1950 1953 1956 1959 1962 1965 1968 -1971 1974 1977 1980 1983 1986 1989 1992 1995 -1998 2001 2004 2007 2010 2013 2016 2019 2022 -2025 2028 2031 2034 2037 2040 2043 2046 2049 -2052 2055 2058 2061 2064 2067 2070 2073 2076 -2079 2082 2085 2088 2091 2094 2097 2100 2103 -2106 2109 2112 2115 2118 2121 2124 2127 2130 -2133 2136 2139 2142 2145 2148 2151 2154 2157 -2160 2163 2166 2169 2172 2175 2178 2181 2184 -2187 2190 2193 2196 2199 2202 2205 2208 2211 -2214 2217 2220 2223 2226 2229 2232 2235 2238 -2241 2244 2247 2250 2253 2256 2259 2262 2265 -2268 2271 2274 2277 2280 2283 2286 2289 2292 -2295 2298 2301 2304 2307 2310 2313 2316 2319 -2322 2325 2328 2331 2334 2337 2340 2343 2346 -2349 2352 2355 2358 2361 2364 2367 2370 2373 -2376 2379 2382 2385 2388 2391 2394 2397 2400 -2403 2406 2409 2412 2415 2418 2421 2424 2427 -2430 2433 2436 2439 2442 2445 2448 2451 2454 -2457 2460 2463 2466 2469 2472 2475 2478 2481 -2484 2487 2490 2493 2496 2499 2502 2505 2508 -2511 2514 2517 2520 2523 2526 2529 2532 2535 -2538 2541 2544 2547 2550 2553 2556 2559 2562 -2565 2568 2571 2574 2577 2580 2583 2586 2589 -2592 2595 2598 2601 2604 2607 2610 2613 2616 -2619 2622 2625 2628 2631 2634 2637 2640 2643 -2646 2649 2652 2655 2658 2661 2664 2667 2670 -2673 2676 2679 2682 2685 2688 2691 2694 2697 -2700 2703 2706 2709 2712 2715 2718 2721 2724 -2727 2730 2733 2736 2739 2742 2745 2748 2751 -2754 2757 2760 2763 2766 2769 2772 2775 2778 -2781 2784 2787 2790 2793 2796 2799 2802 2805 -2808 2811 2814 2817 2820 2823 2826 2829 2832 -2835 2838 2841 2844 2847 2850 2853 2856 2859 -2862 2865 2868 2871 2874 2877 2880 2883 2886 -2889 2892 2895 2898 2901 2904 2907 2910 2913 -2916 2919 2922 2925 2928 2931 2934 2937 2940 -2943 2946 2949 2952 2955 2958 2961 2964 2967 -2970 2973 2976 2979 2982 2985 2988 2991 2994 -2997 3000 3003 3006 3009 3012 3015 3018 3021 -3024 3027 3030 3033 3036 3039 3042 3045 3048 -3051 3054 3057 3060 3063 3066 3069 3072 3075 -3078 3081 3084 3087 3090 3093 3096 3099 3102 -3105 3108 3111 3114 3117 3120 3123 3126 3129 -3132 3135 3138 3141 3144 3147 3150 3153 3156 -3159 3162 3165 3168 -CONNECTIVITY vtktypeint64 -202 204 203 203 205 202 109 203 108 -113 202 112 111 205 110 107 204 106 -106 207 4 108 208 5 110 206 6 -112 209 7 4 207 113 5 208 107 -6 206 109 7 209 111 113 207 202 -202 209 112 203 208 108 109 206 203 -204 208 203 203 206 205 202 207 204 -205 209 202 205 206 110 204 207 106 -111 209 205 107 208 204 210 212 211 -211 213 210 155 210 154 159 211 158 -157 212 156 187 213 186 28 217 157 -154 216 26 158 217 28 26 216 187 -27 214 155 156 214 27 29 215 159 -186 215 29 159 215 211 155 214 210 -211 217 158 210 216 154 211 215 213 -213 216 210 212 217 211 210 214 212 -187 216 213 212 214 156 213 215 186 -157 217 212 218 221 219 219 220 218 -163 218 162 167 219 166 169 220 168 -165 221 164 162 224 25 164 223 30 -168 222 32 166 225 31 30 223 163 -32 222 167 25 224 169 31 225 165 -163 223 218 219 225 166 218 224 162 -167 222 219 219 222 220 221 225 219 -218 223 221 220 224 218 220 222 168 -165 225 221 221 223 164 169 224 220 -227 228 226 226 229 227 123 226 122 -193 227 192 179 229 178 161 228 160 -12 233 123 29 230 193 36 231 179 -178 233 12 160 230 29 192 231 36 -6 232 161 122 232 6 123 233 226 -226 232 122 193 230 227 227 231 192 -226 233 229 227 230 228 228 232 226 -229 231 227 161 232 228 179 231 229 -228 230 160 229 233 178 234 236 235 -235 237 234 151 234 150 189 235 188 -149 237 148 153 236 152 148 238 23 -23 238 189 25 239 151 152 239 25 -150 240 24 188 241 26 24 240 149 -26 241 153 151 239 234 189 238 235 -234 240 150 235 241 188 237 240 234 -236 241 235 234 239 236 235 238 237 -149 240 237 153 241 236 237 238 148 -236 239 152 242 244 243 243 245 242 -185 242 184 127 243 126 129 245 128 -125 244 124 12 247 185 124 247 12 -128 248 14 14 248 127 13 246 125 -15 249 129 184 249 15 126 246 13 -185 247 242 127 248 243 243 246 126 -242 249 184 244 246 243 243 248 245 -245 249 242 242 247 244 245 248 128 -125 246 244 129 249 245 244 247 124 -251 252 250 250 253 251 181 250 180 -147 251 146 191 252 190 195 253 194 -23 256 147 37 257 181 22 255 195 -36 254 191 190 256 23 146 255 22 -180 254 36 194 257 37 147 256 251 -181 257 250 250 254 180 251 255 146 -252 254 250 251 256 252 250 257 253 -253 255 251 191 254 252 195 255 253 -252 256 190 253 257 194 258 261 259 -259 260 258 201 259 200 131 258 130 -133 261 132 183 260 182 130 263 15 -200 264 16 15 263 183 16 264 133 -37 265 201 132 262 8 182 265 37 -8 262 131 131 262 258 201 265 259 -258 263 130 259 264 200 260 263 258 -261 264 259 258 262 261 259 265 260 -183 263 260 133 264 261 261 262 132 -260 265 182 267 269 266 266 268 267 -141 266 140 145 267 144 143 268 142 -197 269 196 140 272 19 142 270 20 -144 271 21 196 273 22 19 272 197 -20 270 141 21 271 143 22 273 145 -266 272 140 267 271 144 141 270 266 -145 273 267 266 270 268 269 272 266 -267 273 269 268 271 267 268 270 142 -143 271 268 197 272 269 269 273 196 -274 276 275 275 277 274 115 274 114 -119 275 118 117 276 116 121 277 120 -120 281 11 116 280 9 11 281 119 -114 278 8 118 279 10 9 280 115 -8 278 121 10 279 117 119 281 275 -115 280 274 274 278 114 275 279 118 -274 280 276 277 278 274 276 279 275 -275 281 277 276 280 116 277 281 120 -117 279 276 121 278 277 282 284 283 -283 285 282 135 282 134 139 283 138 -137 284 136 199 285 198 134 289 16 -16 289 199 18 288 137 136 286 17 -17 286 135 138 288 18 198 287 19 -19 287 139 139 287 283 135 286 282 -283 288 138 282 289 134 284 288 283 -282 286 284 285 289 282 283 287 285 -137 288 284 199 289 285 285 287 198 -284 286 136 291 292 290 290 293 291 -173 290 172 177 291 176 171 292 170 -175 293 174 170 294 20 172 295 33 -174 296 34 176 297 35 20 294 177 -33 295 171 34 296 173 35 297 175 -290 295 172 173 296 290 291 297 176 -177 294 291 290 296 293 292 295 290 -293 297 291 291 294 292 175 297 293 -171 295 292 292 294 170 293 296 174 -319 439 375 321 440 376 378 438 320 -318 441 377 335 430 421 337 431 422 -336 432 425 320 500 378 375 490 319 -376 492 321 377 491 318 313 489 417 -304 383 302 417 489 369 80 445 412 -63 444 408 46 443 410 374 431 337 -373 432 336 372 430 335 306 384 363 -315 370 334 332 388 366 333 387 365 -331 386 364 315 334 30 332 366 11 -333 365 5 331 364 32 338 368 14 -340 367 28 339 369 18 444 450 408 -443 449 410 445 452 412 330 371 307 -35 330 307 338 415 368 340 416 367 -339 417 369 383 413 302 301 486 382 -307 371 352 306 414 384 325 395 390 -407 540 61 411 538 78 409 539 44 -45 409 44 62 407 61 79 411 78 -385 486 301 372 488 430 374 487 431 -80 412 79 63 408 62 46 410 45 -339 452 445 338 449 443 340 450 444 -324 476 389 327 477 394 329 478 392 -328 480 391 326 479 393 346 429 400 -382 506 301 79 412 411 62 408 407 -45 410 409 404 453 423 399 455 421 -402 456 425 401 454 422 424 451 405 -418 448 398 420 447 403 419 446 400 -369 396 360 472 535 397 371 472 352 -390 493 325 389 494 324 391 497 328 -394 496 327 393 495 326 392 498 329 -104 434 103 91 435 90 74 436 73 -40 437 39 401 428 347 399 426 345 -402 427 344 421 455 335 425 456 336 -331 446 419 332 451 424 423 453 334 -422 454 337 333 448 418 330 447 420 -430 488 312 431 487 309 332 424 388 -333 418 387 331 419 386 370 423 334 -442 482 322 394 477 27 389 476 17 -392 478 13 393 479 9 391 480 7 -330 420 371 322 471 442 301 501 385 -95 535 472 345 455 399 344 456 402 -349 453 404 400 446 346 347 454 401 -403 447 350 398 448 348 405 451 351 -352 472 397 104 438 434 436 439 73 -435 441 90 437 440 39 13 478 379 -27 477 381 17 476 380 9 479 372 -7 480 374 385 501 370 64 444 63 -47 443 46 81 445 80 304 475 383 -501 531 370 61 540 311 44 539 314 -78 538 310 475 486 359 103 434 404 -403 435 91 398 437 40 405 436 74 -313 534 489 384 481 363 382 486 475 -359 486 315 351 436 405 348 437 398 -404 434 349 350 435 403 150 413 151 -315 486 385 142 414 143 302 413 150 -406 457 353 143 414 306 422 431 67 -421 430 50 425 432 84 366 476 324 -364 477 327 365 478 329 367 480 328 -368 479 326 396 482 360 377 441 435 -375 439 436 376 440 437 434 438 378 -419 530 386 424 529 388 418 528 387 -370 531 423 400 429 57 319 426 53 -318 427 87 321 428 70 420 532 371 -346 500 429 315 385 370 105 438 104 -39 440 38 90 441 89 73 439 72 -369 489 396 386 530 311 388 529 310 -387 528 314 319 490 426 321 492 428 -318 491 427 397 535 298 97 433 298 -402 425 85 404 423 102 41 418 398 -399 421 51 58 419 400 401 422 68 -75 424 405 92 420 403 52 426 399 -86 427 402 69 428 401 56 429 320 -347 492 4 344 491 34 345 490 10 -426 490 345 428 492 347 427 491 344 -34 491 377 10 490 375 4 492 376 -311 483 386 314 484 387 310 485 388 -95 472 94 429 500 320 83 313 82 -49 312 48 61 311 60 78 310 77 -44 314 43 86 402 85 92 403 91 -103 404 102 52 399 51 58 400 57 -69 401 68 75 405 74 41 398 40 -66 309 65 88 318 87 56 320 55 -54 319 53 71 321 70 31 500 346 -301 433 98 83 432 313 49 430 312 -66 431 309 298 526 397 378 500 31 -99 301 98 338 443 415 340 444 416 -339 445 417 93 420 92 59 419 58 -42 418 41 76 424 75 51 421 50 -68 422 67 85 425 84 102 423 101 -57 429 56 87 427 86 70 428 69 -53 426 52 97 298 96 50 430 49 -67 431 66 84 432 83 98 433 97 -33 396 373 308 384 300 356 496 465 -460 495 355 461 496 356 355 495 464 -357 497 459 463 498 323 468 493 358 -466 497 357 323 498 462 358 493 470 -354 494 467 469 494 354 170 322 171 -115 393 9 14 326 128 32 327 168 -160 357 161 111 391 7 125 392 13 -155 394 27 122 323 123 130 355 131 -152 356 153 138 442 139 28 328 158 -132 354 133 146 358 147 5 329 108 -18 360 138 360 442 138 11 324 120 -135 389 17 21 325 144 149 390 24 -317 458 457 299 383 359 143 306 21 -163 299 30 35 300 176 24 302 150 -386 483 364 387 484 365 388 485 366 -457 458 363 24 303 302 306 362 21 -457 481 353 353 526 406 361 382 316 -305 317 316 415 524 312 416 525 309 -417 523 313 303 304 302 306 363 362 -317 406 361 299 315 30 5 365 329 -11 366 324 32 364 327 303 305 304 -383 474 413 28 367 328 14 368 326 -18 369 360 352 353 308 59 530 419 -42 528 418 76 529 424 423 531 101 -299 359 315 414 473 384 93 532 420 -120 469 121 134 467 135 144 468 145 -128 460 129 114 464 115 154 465 155 -168 461 169 148 470 149 110 459 111 -108 463 109 124 462 125 158 466 159 -317 361 316 174 447 175 166 446 167 -172 456 173 116 455 117 118 451 119 -17 341 136 106 448 107 10 351 118 -119 332 11 165 349 31 30 334 164 -13 342 126 27 343 156 137 339 18 -112 454 113 136 452 137 164 453 165 -126 449 127 4 348 106 113 347 4 -107 333 5 127 338 14 157 340 28 -7 337 112 33 336 172 173 344 34 -34 350 174 175 330 35 156 450 157 -9 335 116 117 345 10 31 346 166 -167 331 32 305 316 304 416 487 367 -415 488 368 35 307 300 352 397 353 -33 373 336 17 380 341 13 379 342 -27 381 343 7 374 337 9 372 335 -307 308 300 309 525 65 312 524 48 -313 523 82 311 530 60 310 529 77 -314 528 43 395 527 303 360 482 442 -305 458 317 409 410 342 407 408 343 -411 412 341 99 501 301 362 527 395 -34 377 350 10 375 351 4 376 348 -349 378 31 307 352 308 384 473 300 -317 457 406 299 474 383 176 473 177 -162 474 163 380 411 341 379 409 342 -381 407 343 350 447 174 346 446 166 -175 447 330 119 451 332 167 446 331 -341 452 136 336 456 172 348 448 106 -117 455 345 351 451 118 113 454 347 -334 453 164 107 448 333 335 455 116 -127 449 338 157 450 340 337 454 112 -342 449 126 137 452 339 343 450 156 -173 456 344 165 453 349 363 458 362 -135 467 389 155 465 394 324 469 120 -326 460 128 325 468 144 149 470 390 -111 459 391 125 462 392 327 461 168 -329 463 108 328 466 158 115 464 393 -298 535 96 376 437 348 375 436 351 -349 434 378 377 435 350 382 475 316 -105 502 438 439 504 72 441 503 89 -440 505 38 140 471 141 395 536 390 -383 475 359 325 537 395 312 488 415 -309 487 416 410 449 342 408 450 343 -412 452 341 55 502 2 2 502 105 -72 504 1 89 503 3 38 505 0 -0 505 71 1 504 54 3 503 88 -353 481 308 395 537 362 303 536 395 -121 517 8 145 518 22 153 513 26 -169 516 25 6 510 122 131 512 8 -159 509 29 29 509 160 109 510 6 -8 517 132 22 518 146 6 511 110 -8 512 114 12 514 124 129 515 15 -26 513 154 161 511 6 123 514 12 -133 507 16 147 508 23 25 516 152 -16 507 134 23 508 148 15 515 130 -139 519 19 141 520 20 19 519 140 -20 520 170 177 521 20 20 521 142 -151 522 25 25 522 162 303 527 305 -300 473 176 163 474 299 301 506 433 -433 499 298 316 475 304 397 526 353 -458 527 362 319 504 439 318 503 441 -321 505 440 438 502 320 363 481 457 -413 522 151 476 485 380 477 483 381 -478 484 379 142 521 414 479 488 372 -480 487 374 308 481 384 373 534 432 -162 522 474 33 533 396 473 521 177 -320 502 55 88 503 318 71 505 321 -54 504 319 322 533 171 171 533 33 -432 534 313 100 531 501 100 501 99 -469 517 121 460 515 129 110 511 459 -463 510 109 124 514 462 461 516 169 -148 508 470 114 512 464 154 513 465 -134 507 467 466 509 159 468 518 145 -485 538 380 483 540 381 484 539 379 -396 489 373 442 519 139 170 520 322 -354 507 133 358 508 147 152 516 356 -355 512 131 357 511 161 323 514 123 -130 515 355 132 517 354 146 518 358 -356 513 153 160 509 357 122 510 323 -445 523 417 443 524 415 444 525 416 -433 506 499 65 525 64 48 524 47 -82 523 81 406 499 361 390 536 24 -21 537 325 371 532 472 24 536 303 -361 506 382 43 528 42 77 529 76 -60 530 59 101 531 100 362 537 21 -94 532 93 96 535 95 499 506 361 -325 493 468 328 497 466 324 494 469 -326 495 460 465 496 394 467 494 389 -464 495 393 459 497 391 462 498 392 -327 496 461 329 498 463 470 493 390 -354 517 469 464 512 355 356 516 461 -459 511 357 462 514 323 323 510 463 -358 518 468 465 513 356 355 515 460 -470 508 358 357 509 466 467 507 354 -64 525 444 47 524 443 81 523 445 -472 532 94 474 522 413 414 521 473 -471 519 442 322 520 471 471 520 141 -140 519 471 364 483 477 365 484 478 -366 485 476 305 527 458 380 538 411 -381 540 407 379 539 409 367 487 480 -368 488 479 482 533 322 406 526 499 -499 526 298 310 538 485 311 540 483 -314 539 484 396 533 482 489 534 373 -541 543 542 542 544 541 180 541 181 -184 542 185 178 543 179 182 544 183 -15 546 184 183 546 15 12 547 178 -36 545 180 37 548 182 185 547 12 -179 545 36 181 548 37 184 546 542 -180 545 541 541 548 181 542 547 185 -541 545 543 542 546 544 544 548 541 -543 547 542 543 545 179 544 546 183 -178 547 543 182 548 544 550 552 549 -549 551 550 188 549 189 192 550 193 -190 552 191 186 551 187 26 554 188 -29 556 186 23 555 190 36 553 192 -189 555 23 187 554 26 193 556 29 -191 553 36 188 554 549 550 556 193 -549 555 189 192 553 550 552 555 549 -550 553 552 549 554 551 551 556 550 -552 553 191 190 555 552 186 556 551 -551 554 187 557 559 558 558 560 557 -198 557 199 194 558 195 200 560 201 -196 559 197 197 563 19 201 562 37 -199 561 16 195 564 22 19 563 198 -37 562 194 16 561 200 22 564 196 -194 562 558 198 563 557 557 561 199 -558 564 195 559 564 558 558 562 560 -560 561 557 557 563 559 200 561 560 -560 562 201 196 564 559 559 563 197 - -CELL_TYPES 1056 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 - -CELL_DATA 1056 -FIELD FieldData 1 -radiation%20flux%20density 1 1056 double --4.6843286457e-07 -4.6843286457e-07 0.00024192540469 0.00023509158538 0.00022805486433 0.0002218924653 0.00057288578851 0.00056175797025 0.0005891913164 -0.00058520183726 0.00056936837607 0.00058144710502 0.00059484116999 0.00057035507005 0.0004981200305 0.00049769682723 0.00050432544649 0.00050386041792 --4.6843286457e-07 -4.6843286457e-07 -4.6843286457e-07 -4.6843286457e-07 0.00058641393226 0.000566864448 0.00058670740336 0.00056668975337 -4.6843286457e-07 --4.6843286457e-07 0.00024551663576 0.00024055869932 0.00022245152336 0.00023332359398 0.0005719228804 0.0005891913164 0.00056749197144 0.00059544595569 -0.00057035507005 0.00058405372399 0.00059504005396 0.00058296483157 0.00049269349866 0.00050990468748 0.00049284036177 0.00050968161764 -4.6843286457e-07 --4.6843286457e-07 -4.6843286457e-07 -4.6843286457e-07 0.00057924611213 0.00057256499738 0.00058001303308 0.00057326711723 -4.6843286457e-07 -4.6843286457e-07 -0.00024406743684 0.00023955149485 0.00022417441834 0.00021928895745 0.00058440397762 0.00057973611033 0.00056749197144 0.00058049772689 0.00058291638563 -0.0005719228804 0.00059504005396 0.00056979398655 0.0005035342089 0.00049801949977 0.00050399802131 0.00049844358151 -4.6843286457e-07 -4.6843286457e-07 --4.6843286457e-07 -4.6843286457e-07 0.00056691518858 0.00058676045512 0.00058636072159 0.00056663890982 -4.6843286457e-07 -4.6843286457e-07 0.00023482187274 -0.00024097587617 0.00023332297392 0.00021773016344 0.00059504005396 0.00058536243937 0.00059544595569 0.00058296483157 0.00059817838966 0.00058976325253 -0.00058489943281 0.0005903306375 0.00048896129661 0.00048910409653 0.00050701424435 0.00050679576635 -4.6843286457e-07 -4.6843286457e-07 -4.6843286457e-07 --4.6843286457e-07 0.00057319071943 0.00057932401795 0.00057264185839 0.00057993563442 -4.6843286457e-07 -4.6843286457e-07 0.00024118425925 0.00023765125047 -0.00022708494459 0.00021773393075 0.00058236004587 0.00059571677161 0.00058672168668 0.00059817838966 0.00057387627672 0.00059100735516 0.00057860819211 -0.00058489943281 0.00050152597541 0.00048982674211 0.00050131620898 0.000489970543 -4.6843286457e-07 -4.6843286457e-07 -4.6843286457e-07 -4.6843286457e-07 -0.00057880521913 0.00057370214282 0.00058045375777 0.0005721300173 -4.6843286457e-07 -4.6843286457e-07 0.00024035291624 0.00023864442641 0.00022456757877 -0.0002274422444 0.00058536243937 0.00059817838966 0.00056175797025 0.00058144710502 0.00056885208163 0.00059484116999 0.00058976325253 0.00057553799449 -0.00050990468748 0.00049269349866 0.00049284036177 0.00050968161764 -4.6843286457e-07 -4.6843286457e-07 -4.6843286457e-07 -4.6843286457e-07 0.00058001303308 -0.00057326711723 0.00057924611213 0.00057256499738 1.1211849099 1.1211849099 0.96106098001 0.95502678391 0.93184676192 0.9294522499 -0.89188956157 0.89712851193 0.89264126428 0.89645764841 0.89450473881 0.89131043916 0.8978304169 0.89447098363 1.0682906994 -1.0706711111 1.0706580027 1.0683051311 1.1211849099 1.1211849099 1.1211849099 1.1211849099 1.063362228 1.062511898 -1.0634292178 1.0624448943 -4.6843286457e-07 -4.6843286457e-07 0.00025036084758 0.00023453633939 0.0002180427077 0.00023392888657 0.0005903306375 -0.00058976325253 0.00058554326558 0.00059484116999 0.00058536243937 0.00058236004587 0.00059882222243 0.00059504005396 0.00049237357468 0.00051023561452 -0.00049252007603 0.00051001206234 -4.6843286457e-07 -4.6843286457e-07 -4.6843286457e-07 -4.6843286457e-07 0.00057321548938 0.00057929874334 0.00057996072888 -0.00057261692274 -4.6843286457e-07 -4.6843286457e-07 0.0002470845315 0.00024257300446 0.0002211124482 0.00023391334962 0.00058296483157 0.0005910597501 -0.00057867469333 0.00059100735516 0.00059571677161 0.00059544595569 0.00056960389865 0.00058489943281 0.00049571107105 0.00049512886697 0.00049527395898 -0.00049554429265 -4.6843286457e-07 -4.6843286457e-07 -4.6843286457e-07 -4.6843286457e-07 0.00058591497434 0.00058720747894 0.00056621299203 0.00056734273793 --4.6843286457e-07 -4.6843286457e-07 0.00024376152511 0.00024019630632 0.00021630197845 0.00022552399434 0.00056947749604 0.00057673768857 0.00058261479794 -0.00059817838966 0.0005666481785 0.00056885208163 0.00058479050324 0.00057877837974 0.00050386041792 0.0004981200305 0.00049769682723 0.00050432544649 --4.6843286457e-07 -4.6843286457e-07 -4.6843286457e-07 -4.6843286457e-07 0.000566864448 0.00058641393226 0.00056668975337 0.00058670740336 -4.6843286457e-07 --4.6843286457e-07 0.00024304518108 0.00023746426204 0.00022250606761 0.00021980987692 0.0005903306375 0.00058554326558 0.00058261479794 0.00056904919549 -0.00057823911688 0.00057568244184 0.00059882222243 0.00058536243937 0.00051023561452 0.00049237357468 0.00051001206234 0.00049252007603 -4.6843286457e-07 --4.6843286457e-07 -4.6843286457e-07 -4.6843286457e-07 0.00057929874334 0.00057321548938 0.00057261692274 0.00057996072888 -4.6843286457e-07 -4.6843286457e-07 -0.00023667016358 0.00024353058942 0.00022189370674 0.00021954647923 0.00059100735516 0.00057013367382 0.00057419479971 0.00058533909767 0.00058700477537 -0.00060537932788 0.00058020109301 0.00057632686648 0.00049571107105 0.00049527395898 0.00049512886697 0.00049554429265 -4.6843286457e-07 -4.6843286457e-07 --4.6843286457e-07 -4.6843286457e-07 0.00058720747894 0.00056621299203 0.00056734273793 0.00058591497434 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0033908007557 0.0033539717175 0.0033451892269 0.0033426746811 0.0033439789627 -0.0033414491791 0.0033575873645 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0033795021582 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0033629628609 0.0033563611253 -0.0033542322337 0.0033519372475 0.0033607729572 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0026297515412 0.0035449077018 0.0026452312654 0.0031782486674 0.0035449077018 0.0031825029873 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0033433266969 0.0033546147921 0.0033459013984 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0033554895943 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0025771670056 0.0026282093234 0.0027182178872 0.0026979239311 -0.0026508389717 0.0026498138692 0.0026282093234 0.0026498138692 0.0026385837058 0.0026386371344 0.0026508389717 0.0026823824208 0.0026979239311 -0.0026614287878 0.15621663065 0.0027182178872 0.002636663071 0.0031906404745 0.0027283003984 0.0026167912717 0.0026746193047 0.0026538964811 -0.0035449077018 0.0035449077018 0.0026603104834 0.0025964812399 0.0025873936407 0.0026621032032 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0033736856816 0.0033741827979 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0033660053894 0.0033710235322 0.0033780309665 0.003367755932 0.0035449077018 -0.0035449077018 0.0033660854965 0.0033693839082 0.0033374864609 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.002585311037 0.0025158272906 0.0025469932949 0.002573678592 0.0025280573007 0.0025517936313 -0.0025501904952 0.0025431947403 0.002553274665 0.0025722794633 0.0025294931197 0.0025488755544 0.0035449077018 0.002668460474 0.0025875504906 -0.0026688763805 0.0026488813923 0.0025987813941 0.0026143864529 0.0025771670056 0.0026466614565 0.0026003123867 0.0026574059624 0.0025856302594 -0.0025917093677 0.0026032553349 0.0026003123867 0.0026586634068 0.0026001347824 0.0026723379532 0.0025758950529 0.0026246959746 0.002621140216 -0.0025773339223 0.0025773339223 0.0025890539576 0.0025890539576 0.0026003123867 0.0026320267321 0.0026573948775 0.00257308284 0.0025888795287 -0.0025773339223 0.0026097587951 0.00264941 0.0025890539576 0.0035449077018 0.0035449077018 0.0035449077018 0.0033476386183 0.0035449077018 -0.0033470000445 0.0033506040183 0.0033463164124 0.0033552885292 0.0033540705343 0.0033450410073 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0033912556617 0.0033849806632 0.0033815264421 0.0033893052427 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0025335666969 0.0025415219696 0.0035449077018 0.0035449077018 0.0035449077018 0.0032066400728 0.0031615448212 -0.0031727778524 0.0031472997099 0.003140644521 0.0031511693359 0.003166432583 0.0031503879433 0.0031791999804 0.0031631139972 0.0031851794839 -0.0031787031799 0.0031338532942 0.0031538480232 0.0031338532942 0.003140644521 0.0031600572981 0.0031379304568 0.0031472997099 0.0031446491442 -0.0031910285818 0.0032075784845 0.0035449077018 0.0031045218881 0.0031247672963 0.0031883659719 0.0031830324705 0.0031546385242 0.0031423874783 -0.0031247672963 0.0031114896572 0.0031710482978 0.0031830324705 0.0031710482978 0.0031114896572 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0025059267094 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0021470040078 0.038274159274 0.002133992936 0.0021123767977 0.0021184081503 0.0021123767977 0.0021123767977 0.0021154460802 0.0021240695086 -0.0021437411865 0.19021362819 0.0021398703931 0.0021154460802 0.0021154460802 0.0021240695086 0.0021398703931 0.002133992936 0.0021123767977 -0.0021240695086 0.19019000656 0.0021154460802 0.0021184081503 0.038449298795 0.0021184081503 0.0021384243663 0.0021153590237 0.0021351626597 -0.0021096935404 0.0021062268726 0.0021120917483 0.0021184717324 0.0021152181628 0.0035449077018 0.0031147441438 0.0031193133008 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0030191846537 0.0035449077018 0.0035449077018 0.0035449077018 0.0030258311435 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0030011637431 0.0032294885953 0.0029934856132 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0029957467343 0.0023509725929 -0.0035449077018 0.0035449077018 0.0035449077018 0.0030314521827 0.0030241063597 0.0030124133951 0.0030241063597 0.0029956996807 0.0030067225194 -0.0030072474532 0.0029956996807 0.0030124133951 0.0029863466122 0.0030067225194 0.0030075301209 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0030671369135 0.0030015027553 0.0030471008452 0.050693494941 0.0030392382978 0.0030311732248 0.0030390890023 0.0030311732248 -0.0030311163298 0.0030470139666 0.050678612258 0.0030390890023 0.0030392382978 0.0030311163298 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0032513928049 0.0032785641257 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0029738617905 0.0029788765462 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.16803250513 -0.0026327835945 0.0024731004495 0.0024604704072 0.0021312434859 0.0021253670351 0.0021351626597 0.19753015133 0.039627432067 0.0021384243663 -0.039890602076 0.19756926156 0.0030365624456 0.054327366106 0.054304705446 0.0030365237424 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0029606345376 0.002950076816 0.0029598341575 0.0029508531239 0.0035449077018 0.0035449077018 0.002593683453 0.0026265904595 -0.19338214521 0.0024731006508 0.0021096935404 0.0021351626597 0.19539913475 0.039625635882 0.039065217757 0.0021153590237 0.0021384243663 -0.19532219588 0.0030097921345 0.0030337401592 0.003009870454 0.0030337855246 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.061671080668 0.061591641292 0.0029598776686 0.0029605908956 0.0035449077018 0.0035449077018 0.0026228016562 0.16535715002 0.0024840631737 -0.0024473423737 0.0021036194965 0.039191900967 0.0021253670351 0.19336610717 0.0021066932556 0.19329831666 0.0021312434859 0.038677906362 -0.053273975097 0.0030258967848 0.0030257153474 0.053226879355 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0029698682484 -0.0029680507746 0.002939720074 0.0029415484529 -POINT_DATA 565 -FIELD FieldData 1 -radiation%20flux%20density 1 565 double -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.002379693028 0.0021924949406 0.0013594504431 0.0023791679896 0.0013598671331 -0.0023704312818 0.0023825195105 0.0022021179605 0.0013578694523 0.0023728235879 0.0021920199593 0.0013574458132 0.0013574458132 0.0023757626975 -0.0021817244205 0.0013558457554 0.0013509861277 0.0023829804293 0.2807074264 0.28133450438 0.0023769243345 0.0013532321101 0.0013574324942 -0.0023815195843 0.0021889879027 0.0013578694523 0.0021835950234 0.0023924014592 0.0021894705589 0.0023211706176 0.0023906565226 0.0021748805369 -0.28348023246 0.28280882393 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0016189822709 0.001609730591 -0.0016302564404 0.0015101803874 0.0015182030944 0.0016188288614 0.0016209608187 0.0016279271831 0.0014964733006 0.0015964149864 0.0016233279088 -0.0016332683799 0.0016199544632 0.0016121775022 0.0016472321383 0.0015267981881 0.0015170607988 0.0015168261586 0.001506470752 0.0016064589239 -0.0016020929434 0.0015999778833 0.0016402112553 0.0015200848869 0.0015175914446 0.0015173561875 0.0015387579039 0.0015374636271 0.001491079658 -0.0015917997205 0.0016228677605 0.001622027748 0.0016388074554 0.0015368343361 0.0014909543916 0.0014888253283 0.0015302068883 0.0016443280936 -0.0016154379481 0.0075252832367 0.55195853754 0.55205119618 0.0075649399561 0.0016206628426 0.0016310800261 0.0015161399748 0.0015322609479 -0.0015333760694 0.0015080778316 0.001608691865 0.0016193090421 0.0016143699214 0.0016197898026 0.0014993778539 0.0015323456269 0.0015332902043 -0.0014983955519 0.0015979724236 0.0016370095303 0.0016521942999 0.0016194290056 0.001604527821 0.0016296240504 0.0015091905324 0.0015114345169 -0.0015528953933 0.0016230227098 0.0016340128183 0.0016520252796 0.0016329003318 0.0015932838392 0.0014932264733 0.0014940534511 0.0077887383351 -0.55823990369 0.55812784587 0.0077406872717 0.0014881003166 0.0015233978854 0.0015238919577 0.0014940737396 0.001492844372 0.0015052997128 -0.007665327738 0.55669227329 0.55700701001 0.0077705911269 0.0015220179241 0.5497162616 0.54942592479 0.0075762053754 0.0014813922394 -0.0015244401198 0.0015254087784 0.0014892185117 0.0076649956361 0.00017557638738 0.00017831964823 0.00022567356135 0.00023329515023 0.00045476768074 -0.00044135404204 0.00044275036845 0.000447898541 0.00018046131563 0.00017488840404 0.00022781305656 0.00023186290677 0.00044728200921 0.00045004859688 -0.0004546193138 0.0004410107796 0.00017853227651 0.00017630583495 0.00022605386969 0.00023183413926 0.00044086103781 0.00045041579872 0.00044992250597 -0.00044692064709 0.00017300193349 0.00017898745077 0.00022702624044 0.00023186288795 0.00045254569978 0.00045417211193 0.00044741129068 0.00044928667674 -0.00017745038746 0.00017365354345 0.00022702679871 0.00023082310382 0.0004495777769 0.00045161752724 0.00044642749282 0.00044782220819 0.00017972364141 -0.00017461493648 0.0002286448434 0.0002304035709 0.00044200582445 0.00045310841621 0.00044308863483 0.00045461274389 1.0838756762 1.0823374648 -1.0703654895 1.0696606286 1.0098986412 1.0071907285 1.0078598255 1.0091800822 0.00017393660838 0.00018124782757 0.00022972600002 -0.00022931614689 0.0004498531941 0.00044822820713 0.00045468935907 0.00045331375324 0.00017659940429 0.00017591034752 0.00023213826715 0.00022767729683 -0.00045344524125 0.00044602930101 0.00044802744668 0.00044766507714 0.0001768149502 0.00017807263418 0.00022474181354 0.00023287333856 0.00045338093812 -0.00044319466505 0.00044202116317 0.00044837964226 0.00017515215719 0.00017940545821 0.00023006004021 0.00022737283174 0.00044383083661 0.00045331375324 -0.00044942792252 0.00044822820713 0.00017511163745 0.00017604714537 0.00022567402302 0.00023187727232 0.00044808614565 0.00044739372638 0.00044702327863 -0.00044870677544 0.0035449077018 0.0032860871726 0.0032807499181 0.0035449077018 0.0033081267763 0.0035204474132 0.0035449077018 0.0035449077018 -0.0033086198957 0.0034844619306 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0034973349506 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0032505781861 0.0032686434382 -0.0033534754491 0.003326778966 0.0033500378676 0.0033451941383 0.0033449555046 0.0033502720996 0.0032933476594 0.0032845160442 0.0032893844866 -0.0032818499248 0.0032983095501 0.0032851576764 0.0032914113533 0.0032896508159 0.0032816482141 0.0032899870944 0.0032843117939 0.0032918138188 -0.0032851132237 0.0032896526856 0.0033020655352 0.0032949305466 0.0033001945868 0.003297394917 0.0032985555776 0.0033148354658 0.0033150022862 -0.0033049132037 0.0035449077018 0.0035449077018 0.0032764534867 0.0032686510709 0.003272685297 0.003272685297 0.038824052665 0.0035449077018 -0.003299918852 0.0035449077018 0.0035205184298 0.0035449077018 0.0034816769034 0.0034826405944 0.0034852722485 0.0034811942471 0.003482165613 -0.0034791174388 0.0035449077018 0.0035449077018 0.0035049343629 0.0035119230923 0.0035067402683 0.0035182531954 0.0035176774919 0.0035192990285 -0.0035189739586 0.0035118091536 0.0035125237546 0.0035133045064 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0032853995651 0.0033181867959 0.0032950128714 0.0032881090533 0.0032877265556 0.0032953778553 0.0035449077018 -0.0034998478294 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0032436513279 -0.0032480480836 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0033028272309 0.0035449077018 0.0035449077018 0.0035449077018 0.0032540771564 0.0032804335841 0.0032493552248 0.0032470669849 -0.0032514827166 0.0032573197011 0.0032555544889 0.0032822237872 0.0032731038824 0.0032694420836 0.0032768434418 0.0035449077018 0.0035449077018 -0.003220863077 0.0032359234213 0.0032271140696 0.0032119009272 0.0032356902332 0.003211661624 0.003220616238 0.0032268949128 0.0032069031494 -0.0032239808409 0.0032399753829 0.0032212587962 0.0031822313586 0.0035449077018 0.0032127532599 0.0032161203532 0.0035449077018 0.0035134832724 -0.0035145835617 0.0035131284571 0.0035127459594 0.0035142185777 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035051064411 0.0035068491199 0.0035045915008 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035070240803 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0035449077018 0.0027641665636 0.057176991091 0.0027637382794 0.00276852161 0.0027740546857 0.002759920697 -0.0027740546857 0.002759920697 0.00276852161 0.0027637382794 0.0027828238091 0.05714376751 0.0027729016375 0.0027490649623 0.0027565086159 -0.0027597891987 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 0.0035449077018 -0.0035449077018 0.0035449077018 0.0031332046652 0.0035449077018 0.0035449077018 0.0034715289776 0.0034783218078 0.0035449077018 0.0035449077018 -0.0035449077018 0.041549172498 0.0032693572271 0.0031713820417 0.0031660205754 0.05965073235 0.0027576314969 0.0027629705255 0.059599431979 -0.0032561395498 0.0032676781358 0.0031713820534 0.05454659838 0.060639521132 0.0027480686592 0.060522154391 0.0027624225111 0.0032648635137 -0.040862519326 0.0031605556677 0.0031761175503 0.0027594203637 0.058455430239 0.0027445331383 0.058351104132 diff --git a/tests/input/validation_tests/MN_solver/linesource_MN_MB.cfg b/tests/input/validation_tests/MN_solver/linesource_MN_MB.cfg index f3fde8aa..33bc0258 100644 --- a/tests/input/validation_tests/MN_solver/linesource_MN_MB.cfg +++ b/tests/input/validation_tests/MN_solver/linesource_MN_MB.cfg @@ -7,7 +7,7 @@ % ---- File specifications ---- % OUTPUT_DIR = ../../../result -OUTPUT_FILE = rtsn_test_linesource_MN_MB +OUTPUT_FILE = linesource_MN_MB LOG_DIR = ../../../result/logs MESH_FILE = ../../mesh_files/linesource.su2 % diff --git a/tests/input/validation_tests/MN_solver/linesource_MN_MB_reference.vtk b/tests/input/validation_tests/MN_solver/linesource_MN_MB_reference.vtk index c6ae5536..caab14c8 100644 --- a/tests/input/validation_tests/MN_solver/linesource_MN_MB_reference.vtk +++ b/tests/input/validation_tests/MN_solver/linesource_MN_MB_reference.vtk @@ -172,24 +172,24 @@ CELL_TYPES 96 CELL_DATA 96 FIELD FieldData 1 radiation%20flux%20density 1 96 double -0.08266884102 0.08266884102 0.08266884102 0.08266884102 11.553409168 0.08266884102 0.08266884102 10.282226617 0.08266884102 -0.08266884102 14.371356938 11.183445944 14.048992753 9.9123486414 0.08266884102 0.08266884102 0.0012566370614 0.08266884102 -0.0012566370614 0.0012566370614 0.0012566370614 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.0012566370614 -0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 -0.08266884102 0.08266884102 0.0012566370614 0.08266884102 0.0012566370614 0.0012566370614 0.08266884102 0.08266884102 14.044151291 -13.903440476 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.08266884102 0.08266884102 0.08266884102 0.08266884102 -0.08266884102 0.08266884102 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 -0.0012566370614 0.08266884102 0.08266884102 2.7117483912 2.8350896209 0.08266884102 0.08266884102 5.2353326683 4.4941253122 -2.3257709834 2.8793876145 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 +0.08266884102 0.08266884102 0.08266884102 0.08266884102 11.719363475 0.08266884102 0.08266884102 10.690273292 0.08266884102 +0.08266884102 12.624793806 11.587658541 12.354440242 10.35588009 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 -0.08266884102 0.08266884102 4.4679528395 3.3545817532 0.08266884102 0.08266884102 +0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 +0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 12.386680048 +12.466624649 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 +0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 +0.08266884102 0.08266884102 0.08266884102 3.1279023943 3.2706989767 0.08266884102 0.08266884102 6.0674483534 5.2059857009 +2.6801550659 3.332908504 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 +0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 +0.08266884102 0.08266884102 5.1707818682 3.8718949535 0.08266884102 0.08266884102 POINT_DATA 61 FIELD FieldData 1 radiation%20flux%20density 1 61 double -0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 14.091985364 0.028394038381 0.028394038381 0.028394038381 0.028394038381 -0.028394038381 0.028394038381 0.028394038381 0.028394038381 0.028394038381 0.028394038381 0.028394038381 0.028394038381 0.028394038381 -0.028394038381 0.028394038381 0.028394038381 0.028394038381 0.028394038381 0.028394038381 0.028394038381 0.069100140361 0.069100140361 -0.071038526169 0.069100140361 0.069100140361 0.069100140361 0.071038526169 0.069100140361 0.069100140361 0.52084876606 2.5329790899 -0.45651919808 0.069100140361 0.54140563766 2.7866507523 0.069100140361 3.1341608989 0.5487886366 0.069100140361 3.5841168665 -0.069100140361 0.069100140361 0.071038526169 0.071038526169 7.992278784 8.4785360663 8.234528111 7.756572496 0.050103959437 -0.050103959437 0.050103959437 0.050103959437 1.1132016065 0.96496013525 0.73705142346 0.95972564071 +0.08266884102 0.08266884102 0.08266884102 0.08266884102 12.458134686 0.08266884102 0.08266884102 0.08266884102 0.08266884102 +0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 +0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 +0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.08266884102 0.59020776657 2.7353240122 +0.51558321183 0.08266884102 0.61400719696 3.0134789576 0.08266884102 3.3957598782 0.62437545151 0.08266884102 3.8676000366 +0.08266884102 0.08266884102 0.08266884102 0.08266884102 7.8236647051 8.2573602241 7.9875743573 7.5642406374 0.08266884102 +0.08266884102 0.08266884102 0.08266884102 1.2796247435 1.107332213 0.84051406352 1.1002914465 diff --git a/tests/input/validation_tests/MN_solver/linesource_MN_MB_regularized.cfg b/tests/input/validation_tests/MN_solver/linesource_MN_MB_regularized.cfg index ca0e0fdd..22c9f93d 100644 --- a/tests/input/validation_tests/MN_solver/linesource_MN_MB_regularized.cfg +++ b/tests/input/validation_tests/MN_solver/linesource_MN_MB_regularized.cfg @@ -7,7 +7,7 @@ % ---- File specifications ---- % OUTPUT_DIR = ../../../result -OUTPUT_FILE = rtsn_test_linesource_MN_MB_regularized +OUTPUT_FILE = linesource_MN_MB_regularized LOG_DIR = ../../../result/logs MESH_FILE = ../../mesh_files/linesource.su2 % diff --git a/tests/input/validation_tests/MN_solver/linesource_MN_MB_regularized_reference.vtk b/tests/input/validation_tests/MN_solver/linesource_MN_MB_regularized_reference.vtk index 16f009c0..9f61e411 100644 --- a/tests/input/validation_tests/MN_solver/linesource_MN_MB_regularized_reference.vtk +++ b/tests/input/validation_tests/MN_solver/linesource_MN_MB_regularized_reference.vtk @@ -172,24 +172,24 @@ CELL_TYPES 96 CELL_DATA 96 FIELD FieldData 1 radiation%20flux%20density 1 96 double -0.11046737879 0.11046737879 0.11046737879 0.11046737879 12.083826665 0.11046737879 0.11046737879 9.9450417419 0.11046737879 -0.11046737879 18.636248722 11.146551455 18.675165937 9.1116823417 0.11046737879 0.11046737879 0.0012566370614 0.11046737879 -0.0012566370614 0.0012566370614 0.0012566370614 0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.0012566370614 -0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.11046737879 -0.11046737879 0.11046737879 0.0012566370614 0.11046737879 0.0012566370614 0.0012566370614 0.11046737879 0.11046737879 18.538008753 -17.63739462 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.11046737879 0.11046737879 0.11046737879 0.11046737879 -0.11046737879 0.11046737879 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 -0.0012566370614 0.11046737879 0.11046737879 1.1521662635 1.2076820477 0.11046737879 0.11046737879 2.903492959 1.8788889355 -0.99059224008 1.2177533116 0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.11046737879 -0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.11046737879 -0.11046737879 0.11046737879 2.4325913084 1.4095050957 0.11046737879 0.11046737879 +0.11046737879 0.11046737879 0.11046737879 0.11046737879 12.544927279 0.1104673788 0.11046737879 10.586595377 0.11046737879 +0.11046737879 16.931619852 11.83485416 17.294799352 9.7425659218 0.11046737879 0.11046737879 0.11046737879 0.11046737879 +0.11046737879 0.11046737879 0.11046737879 0.1104673788 0.1104673788 0.11046737879 0.11046737879 0.11046737879 0.11046737879 +0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.1104673788 0.11046737879 0.11046737879 0.11046737879 +0.11046737879 0.1104673788 0.11046737879 0.1104673788 0.1104673788 0.11046737879 0.1104673788 0.11046737879 17.190896458 +16.558005479 0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.1104673788 0.11046737879 0.11046737879 0.11046737879 +0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.1104673788 0.11046737879 +0.11046737879 0.11046737879 0.11046737878 1.3342623197 1.4127050777 0.11046737877 0.11046737879 3.4519360793 2.2314017638 +1.1431732275 1.4432975056 0.11046737879 0.11046737879 0.1104673788 0.1104673788 0.11046737879 0.11046737879 0.1104673788 +0.11046737879 0.1104673788 0.11046737879 0.11046737879 0.11046737878 0.1104673788 0.1104673788 0.1104673788 0.1104673788 +0.1104673788 0.11046737879 2.8657703139 1.6461753789 0.11046737879 0.1104673788 POINT_DATA 61 FIELD FieldData 1 radiation%20flux%20density 1 61 double -0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 18.371704508 0.037660217639 0.037660217639 0.037660217639 0.037660217639 -0.037660217639 0.037660217639 0.037660217639 0.037660217639 0.037660217639 0.037660217639 0.037660217639 0.037660217639 0.037660217639 -0.037660217639 0.037660217639 0.037660217639 0.037660217639 0.037660217639 0.037660217639 0.037660217639 0.092265588505 0.092265588505 -0.094865844261 0.092265588505 0.092265588505 0.092265588505 0.094865844261 0.092265588505 0.092265588505 0.28408385958 1.9309738303 -0.25715485567 0.092265588505 0.29333649029 2.1489385036 0.092265588505 2.4290993064 0.29501503426 0.092265588505 2.9585521781 -0.092265588505 0.092265588505 0.094865844261 0.094865844261 8.4876551035 9.2337641777 9.0130034001 8.2916319113 0.066783082101 -0.066783082101 0.066783082101 0.066783082101 0.66907249484 0.46415169014 0.37027492218 0.57489216472 +0.11046737879 0.11046737879 0.11046737879 0.11046737879 16.993830285 0.11046737879 0.11046737879 0.11046737879 0.11046737879 +0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.1104673788 0.11046737879 +0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.11046737879 +0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.11046737879 0.1104673788 0.11046737879 0.31443320228 2.0919006009 +0.28258502025 0.1104673788 0.32750699527 2.3294796617 0.11046737879 2.640159261 0.33260573325 0.11046737879 3.199005968 +0.11046737879 0.11046737879 0.11046737879 0.11046737879 8.4016234841 9.0725712446 8.8209835185 8.1818387439 0.1104673788 +0.1104673788 0.1104673788 0.1104673788 0.77876111888 0.53465425579 0.41760897881 0.66152796581 diff --git a/tests/input/validation_tests/MN_solver/linesource_MN_Quad.cfg b/tests/input/validation_tests/MN_solver/linesource_MN_Quad.cfg index 2e12362d..247da659 100644 --- a/tests/input/validation_tests/MN_solver/linesource_MN_Quad.cfg +++ b/tests/input/validation_tests/MN_solver/linesource_MN_Quad.cfg @@ -7,7 +7,7 @@ % ---- File specifications ---- % OUTPUT_DIR = ../../../result -OUTPUT_FILE = rtsn_test_linesource_MN_Quad +OUTPUT_FILE = linesource_MN_Quad LOG_DIR = ../../../result/logs MESH_FILE = ../../mesh_files/linesource.su2 % diff --git a/tests/input/validation_tests/MN_solver/linesource_MN_Quad_reference.vtk b/tests/input/validation_tests/MN_solver/linesource_MN_Quad_reference.vtk index 8db1bd9c..0696ac51 100644 --- a/tests/input/validation_tests/MN_solver/linesource_MN_Quad_reference.vtk +++ b/tests/input/validation_tests/MN_solver/linesource_MN_Quad_reference.vtk @@ -172,24 +172,24 @@ CELL_TYPES 96 CELL_DATA 96 FIELD FieldData 1 radiation%20flux%20density 1 96 double -0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 11.487578064 0.0012566370614 0.0012566370614 10.179038978 0.0012566370614 -0.0012566370614 14.151697856 11.103676592 13.868392577 9.8020123353 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 +0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 11.665344318 0.0012566370614 0.0012566370614 10.591478338 0.0012566370614 +0.0012566370614 12.394674075 11.492544789 12.17707979 10.246485257 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 -0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 13.855952468 -13.741722476 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 +0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 12.197642701 +12.287454579 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 -0.0012566370614 0.0012566370614 0.0012566370614 2.6292358748 2.7507355034 0.0012566370614 0.0012566370614 5.1943460217 4.4157088882 -2.2362083711 2.7970979508 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 +0.0012566370614 0.0012566370614 0.0012566370614 3.0503016031 3.1912684059 0.0012566370614 0.0012566370614 6.0264043319 5.1230107289 +2.5943016034 3.2450592369 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 -0.0012566370614 0.0012566370614 4.4159193231 3.2642409843 0.0012566370614 0.0012566370614 +0.0012566370614 0.0012566370614 5.1232548806 3.7870498638 0.0012566370614 0.0012566370614 POINT_DATA 61 FIELD FieldData 1 radiation%20flux%20density 1 61 double -0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 13.904441344 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 +0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 12.264212786 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 -0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.43925317668 2.4452044154 -0.37374859274 0.0012566370614 0.45950311478 2.6996308962 0.0012566370614 3.053375557 0.46723018936 0.0012566370614 3.5169355533 -0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 7.8795053954 8.3702293699 8.1220884198 7.6408428376 0.0012566370614 -0.0012566370614 0.0012566370614 0.0012566370614 1.039874514 0.88414708728 0.65385350651 0.88418917427 +0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.50943079806 2.6491430624 +0.43343079812 0.0012566370614 0.5329252652 2.9289277532 0.0012566370614 3.3107307776 0.5418904037 0.0012566370614 3.8031289069 +0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 7.7060994707 8.1461322984 7.8777652064 7.4487294383 0.0012566370614 +0.0012566370614 0.0012566370614 0.0012566370614 1.206286176 1.0256074554 0.75841528241 1.0256562858 diff --git a/tests/input/validation_tests/PN_solver/checkerboard_PN.cfg b/tests/input/validation_tests/PN_solver/checkerboard_PN.cfg index fed5dc26..d7fad182 100644 --- a/tests/input/validation_tests/PN_solver/checkerboard_PN.cfg +++ b/tests/input/validation_tests/PN_solver/checkerboard_PN.cfg @@ -7,7 +7,7 @@ % ---- File specifications ---- % OUTPUT_DIR = ../../../result -OUTPUT_FILE = rtsn_test_checkerboard_PN +OUTPUT_FILE = checkerboard_PN LOG_DIR = ../../../result/logs MESH_FILE = ../../mesh_files/checkerboard.su2 % diff --git a/tests/input/validation_tests/PN_solver/checkerboard_PN_reference.vtk b/tests/input/validation_tests/PN_solver/checkerboard_PN_reference.vtk index 8669fe0d..4cf1e62c 100644 --- a/tests/input/validation_tests/PN_solver/checkerboard_PN_reference.vtk +++ b/tests/input/validation_tests/PN_solver/checkerboard_PN_reference.vtk @@ -1727,187 +1727,187 @@ CELL_TYPES 1056 CELL_DATA 1056 FIELD FieldData 1 radiation%20flux%20density 1 1056 double --1.3214247139e-08 -1.3214247139e-08 2.9409426012e-06 2.9458135259e-06 1.4723809641e-06 1.4723809641e-06 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 -1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.4640015676e-05 1.4640015676e-05 1.4650161881e-05 1.4650161881e-05 --1.3214247139e-08 -1.3214247139e-08 -1.3214247139e-08 -1.3214247139e-08 1.6993300291e-05 1.699202446e-05 1.699202446e-05 1.6993300291e-05 -1.3214247139e-08 --1.3214247139e-08 2.9458135259e-06 2.9409426012e-06 1.4723809641e-06 1.4723809641e-06 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 -1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.4650161881e-05 1.4640015676e-05 1.4650161881e-05 1.4640015676e-05 -1.3214247139e-08 --1.3214247139e-08 -1.3214247139e-08 -1.3214247139e-08 1.699202446e-05 1.699202446e-05 1.6993300291e-05 1.6993300291e-05 -1.3214247139e-08 -1.3214247139e-08 -2.9458135259e-06 2.9409426012e-06 1.4723809641e-06 1.4723809641e-06 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 -1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.4640015676e-05 1.4650161881e-05 1.4640015676e-05 1.4650161881e-05 -1.3214247139e-08 -1.3214247139e-08 --1.3214247139e-08 -1.3214247139e-08 1.6993300291e-05 1.6993300291e-05 1.699202446e-05 1.699202446e-05 -1.3214247139e-08 -1.3214247139e-08 2.996962064e-06 -2.9878096325e-06 1.4723809641e-06 1.4723809641e-06 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 -1.2407821017e-05 1.2407821017e-05 1.4531844834e-05 1.4531844834e-05 1.4551424497e-05 1.4551424497e-05 -1.3214247139e-08 -1.3214247139e-08 -1.3214247139e-08 --1.3214247139e-08 1.6991412343e-05 1.6993912972e-05 1.6993912972e-05 1.6991412343e-05 -1.3214247139e-08 -1.3214247139e-08 3.0648724631e-06 2.9841279616e-06 -1.4723809641e-06 1.4723809641e-06 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 -1.2407821017e-05 1.4383315209e-05 1.4559272576e-05 1.4383315209e-05 1.4559272576e-05 -1.3214247139e-08 -1.3214247139e-08 -1.3214247139e-08 -1.3214247139e-08 -1.6981336791e-05 1.7004050674e-05 1.7004050674e-05 1.6981336791e-05 -1.3214247139e-08 -1.3214247139e-08 2.9458135259e-06 2.9409426012e-06 1.4723809641e-06 -1.4723809641e-06 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 -1.4640015676e-05 1.4650161881e-05 1.4650161881e-05 1.4640015676e-05 -1.3214247139e-08 -1.3214247139e-08 -1.3214247139e-08 -1.3214247139e-08 1.6993300291e-05 -1.6993300291e-05 1.699202446e-05 1.699202446e-05 0.31538042369 0.31538042369 0.27857938068 0.27855644694 0.27352186727 0.27352186727 -0.26173335538 0.26173335538 0.26173335538 0.26173335538 0.26173335538 0.26173335538 0.26173335538 0.26173335538 0.30071704756 -0.30072719377 0.30072719377 0.30071704756 0.31538042369 0.31538042369 0.31538042369 0.31538042369 0.29837518498 0.29837390915 -0.29837390915 0.29837518498 -1.3214247139e-08 -1.3214247139e-08 2.9409426012e-06 2.9458135259e-06 1.4723809641e-06 1.4723809641e-06 1.2407821017e-05 -1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.4640015676e-05 1.4650161881e-05 -1.4640015676e-05 1.4650161881e-05 -1.3214247139e-08 -1.3214247139e-08 -1.3214247139e-08 -1.3214247139e-08 1.699202446e-05 1.6993300291e-05 1.699202446e-05 -1.6993300291e-05 -1.3214247139e-08 -1.3214247139e-08 3.0648724631e-06 2.9841279616e-06 1.4723809641e-06 1.4723809641e-06 1.2407821017e-05 1.2407821017e-05 -1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.4383315209e-05 1.4559272576e-05 1.4383315209e-05 -1.4559272576e-05 -1.3214247139e-08 -1.3214247139e-08 -1.3214247139e-08 -1.3214247139e-08 1.6981336791e-05 1.7004050674e-05 1.6981336791e-05 1.7004050674e-05 --1.3214247139e-08 -1.3214247139e-08 2.9458135259e-06 2.9409426012e-06 1.4723809641e-06 1.4723809641e-06 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 -1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.4650161881e-05 1.4640015676e-05 1.4640015676e-05 1.4650161881e-05 --1.3214247139e-08 -1.3214247139e-08 -1.3214247139e-08 -1.3214247139e-08 1.699202446e-05 1.6993300291e-05 1.6993300291e-05 1.699202446e-05 -1.3214247139e-08 --1.3214247139e-08 2.9458135259e-06 2.9409426012e-06 1.4723809641e-06 1.4723809641e-06 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 -1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.4650161881e-05 1.4640015676e-05 1.4650161881e-05 1.4640015676e-05 -1.3214247139e-08 --1.3214247139e-08 -1.3214247139e-08 -1.3214247139e-08 1.6993300291e-05 1.699202446e-05 1.6993300291e-05 1.699202446e-05 -1.3214247139e-08 -1.3214247139e-08 -3.0648724631e-06 2.9841279616e-06 1.4723809641e-06 1.4723809641e-06 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 -1.2407821017e-05 1.2407821017e-05 1.2407821017e-05 1.4383315209e-05 1.4383315209e-05 1.4559272576e-05 1.4559272576e-05 -1.3214247139e-08 -1.3214247139e-08 --1.3214247139e-08 -1.3214247139e-08 1.7004050674e-05 1.6981336791e-05 1.7004050674e-05 1.6981336791e-05 0.0001 0.0001 0.0001 +7.4725848459e-08 7.4725848459e-08 9.3556821132e-06 9.4130228664e-06 1.0601781951e-05 1.0648488286e-05 1.1863538721e-05 1.1839052213e-05 1.0863908034e-05 +1.1746990328e-05 1.1772228919e-05 1.1826857586e-05 1.0784386677e-05 1.1857256465e-05 3.7160844621e-06 3.7160844621e-06 3.7164603116e-06 3.7164603116e-06 +8.3477006179e-06 8.3477006179e-06 8.3444757591e-06 8.3444757591e-06 3.6944450241e-06 3.6942591494e-06 3.6942591494e-06 3.6944450241e-06 7.4725848459e-08 +7.4725848459e-08 9.3285754918e-06 9.3556821132e-06 1.0648488286e-05 1.0545733317e-05 1.1826857586e-05 1.0784040776e-05 1.1839052213e-05 1.0852694941e-05 +1.1777448049e-05 1.1838026559e-05 1.0784386677e-05 1.0852753783e-05 3.7164603116e-06 3.7160844621e-06 3.7164603116e-06 3.7160844621e-06 8.3477006179e-06 +8.3444757591e-06 8.3477006179e-06 8.3444757591e-06 3.6942591494e-06 3.6942591494e-06 3.6944450241e-06 3.6944450241e-06 7.4725848459e-08 7.4725848459e-08 +9.3295874966e-06 9.3731646431e-06 1.062764904e-05 1.0695581682e-05 1.0746695619e-05 1.180368868e-05 1.191857357e-05 1.1794561493e-05 1.1743901122e-05 +1.1747336228e-05 1.0863849192e-05 1.1863597563e-05 3.7160844621e-06 3.7164603116e-06 3.7160844621e-06 3.7164603116e-06 8.3477006179e-06 8.3477006179e-06 +8.3444757591e-06 8.3444757591e-06 3.6944450241e-06 3.6944450241e-06 3.6942591494e-06 3.6942591494e-06 7.4725848459e-08 7.4725848459e-08 9.3491745691e-06 +9.331167647e-06 1.05457334e-05 1.0695922808e-05 1.0780352129e-05 1.0769865675e-05 0.00086536307613 1.085266671e-05 1.0863936291e-05 0.00086528015976 +1.0863820961e-05 1.0780352129e-05 3.7118275884e-06 3.7118275884e-06 3.7126319568e-06 3.7126319568e-06 8.32624801e-06 8.3324996845e-06 8.32624801e-06 +8.3324996845e-06 3.694169899e-06 3.6945342133e-06 3.6945342133e-06 3.694169899e-06 7.4725848459e-08 7.4725848459e-08 9.2430792749e-06 9.3357922126e-06 +1.0603085496e-05 1.069593202e-05 0.0008594314275 0.00086528042742 1.0737939279e-05 1.0863356275e-05 1.1778563289e-05 1.0770133331e-05 1.186870678e-05 +1.0864403843e-05 3.7052392485e-06 3.7129501721e-06 3.7052392485e-06 3.7129501721e-06 8.2899518888e-06 8.3463130943e-06 8.2899518888e-06 8.3463130943e-06 +3.6926941477e-06 3.6960032244e-06 3.6960032244e-06 3.6926941477e-06 7.4725848459e-08 7.4725848459e-08 9.3827601409e-06 9.3731646431e-06 1.062764904e-05 +1.0601781951e-05 1.0772886525e-05 1.0863849192e-05 1.191857357e-05 1.1747336228e-05 1.1857315307e-05 1.0863849192e-05 1.0772886525e-05 1.1758564044e-05 +3.7160844621e-06 3.7164603116e-06 3.7164603116e-06 3.7160844621e-06 8.3477006179e-06 8.3477006179e-06 8.3444757591e-06 8.3444757591e-06 3.6944450241e-06 +3.6944450241e-06 3.6942591494e-06 3.6942591494e-06 0.33396555626 0.33396555626 0.29240386735 0.29235699446 0.28754405254 0.28742374531 +0.27225875591 0.27226431279 0.27218444553 0.27218450438 0.27218444553 0.27225875591 0.27226431279 0.27218450438 0.31214990222 +0.31216277226 0.31216277226 0.31214990222 0.32569580635 0.32569258149 0.32569580635 0.32569258149 0.30928988428 0.30928806242 +0.30928806242 0.30928988428 7.4725848459e-08 7.4725848459e-08 9.2869611001e-06 9.407487551e-06 1.0695922725e-05 1.0545733317e-05 1.0784040776e-05 +1.0773232425e-05 1.0852694941e-05 1.0863908034e-05 0.00086528352651 1.0863849192e-05 0.00086536304787 1.0784040776e-05 3.7160844621e-06 3.7164603116e-06 +3.7160844621e-06 3.7164603116e-06 8.3444757591e-06 8.3477006179e-06 8.3444757591e-06 8.3477006179e-06 3.6942591494e-06 3.6944450241e-06 3.6942591494e-06 +3.6944450241e-06 7.4725848459e-08 7.4725848459e-08 9.1693989312e-06 9.297985005e-06 1.0675084494e-05 1.0545742612e-05 1.0764130185e-05 1.0827209426e-05 +1.1810666137e-05 0.00086536354368 1.0852202024e-05 1.0764130185e-05 1.1866234234e-05 0.00085934831124 3.7052392485e-06 3.7129501721e-06 3.7052392485e-06 +3.7129501721e-06 8.2899518888e-06 8.2899518888e-06 8.3463130943e-06 8.3463130943e-06 3.6926941477e-06 3.6960032244e-06 3.6926941477e-06 3.6960032244e-06 +7.4725848459e-08 7.4725848459e-08 9.3285754918e-06 9.3731646431e-06 1.0702526264e-05 1.062764904e-05 1.191857357e-05 1.1826798744e-05 1.1747336228e-05 +1.0784040776e-05 1.1784076206e-05 1.1777448049e-05 1.0863849192e-05 1.1852096176e-05 3.7164603116e-06 3.7160844621e-06 3.7160844621e-06 3.7164603116e-06 +8.3444757591e-06 8.3444757591e-06 8.3477006179e-06 8.3477006179e-06 3.6942591494e-06 3.6944450241e-06 3.6944450241e-06 3.6942591494e-06 7.4725848459e-08 +7.4725848459e-08 9.3285754918e-06 9.420381058e-06 1.0648488286e-05 1.0674613973e-05 1.0784040776e-05 1.0852694941e-05 1.1826857586e-05 1.1838026559e-05 +1.1777448049e-05 1.1767533819e-05 1.0852753783e-05 1.0773232425e-05 3.7164603116e-06 3.7160844621e-06 3.7164603116e-06 3.7160844621e-06 8.3477006179e-06 +8.3444757591e-06 8.3444757591e-06 8.3477006179e-06 3.6944450241e-06 3.6942591494e-06 3.6944450241e-06 3.6942591494e-06 7.4725848459e-08 7.4725848459e-08 +9.2745570988e-06 9.2892071334e-06 1.0648497581e-05 1.0692677915e-05 1.0853249592e-05 1.1738233988e-05 1.1863045804e-05 1.17429058e-05 1.0745140734e-05 +1.1635881221e-05 1.1763472579e-05 1.1794020922e-05 3.7052392485e-06 3.7052392485e-06 3.7129501721e-06 3.7129501721e-06 8.2899518888e-06 8.2899518888e-06 +8.3463130943e-06 8.3463130943e-06 3.6960032244e-06 3.6926941477e-06 3.6960032244e-06 3.6926941477e-06 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 +0.0001 0.0001 0.0001 0.0001 0.0001 9.8901770826e-05 9.8988997579e-05 9.8901770826e-05 0.0001 +9.8993981444e-05 9.8579255909e-05 9.8579255909e-05 9.8579255909e-05 9.5779585048e-05 9.4354463142e-05 9.4354463142e-05 9.4354463142e-05 9.4327056793e-05 +9.4327056793e-05 9.4406026264e-05 0.0001 0.0001 0.0001 9.888421145e-05 9.5543940602e-05 9.8567030311e-05 9.8567030311e-05 +9.8527586134e-05 9.7845130128e-05 0.0001 0.0001 9.7805212352e-05 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 9.5772889026e-05 9.4139713947e-05 9.4139713947e-05 9.4139713947e-05 9.4104201487e-05 -9.4104201487e-05 9.4250686876e-05 0.0001 0.0001 0.0001 0.0001 9.5498050152e-05 0.0001 0.0001 +9.7795912579e-05 9.7813195052e-05 9.7813195052e-05 9.8877379964e-05 9.8877379964e-05 9.8877379964e-05 9.8863467188e-05 9.8863467188e-05 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 +0.0001 0.0001 0.0001 9.8730738849e-05 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 +0.0001 9.7921730927e-05 9.7921730927e-05 9.7827504335e-05 9.7816314893e-05 9.7900186583e-05 9.7921730927e-05 9.7816314893e-05 9.7849393498e-05 +0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 9.4383423849e-05 9.4383423849e-05 +9.4383423849e-05 9.4321666612e-05 9.4321666612e-05 0.0001 0.0001 0.0001 0.0001 9.7979311164e-05 9.7979311164e-05 +9.7963253803e-05 9.7913721407e-05 9.7979311164e-05 9.7962063111e-05 9.7829782205e-05 9.7829782205e-05 0.0001 0.0001 0.0001 +0.0001 0.0001 9.9274943638e-05 9.9274943638e-05 9.9274943638e-05 9.9266221571e-05 9.9266221571e-05 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 +0.0001 0.0001 8.046970811e-05 0.0001 8.0732740409e-05 8.9179500811e-05 0.0001 8.9285005471e-05 0.0001 +0.0001 0.0001 9.8945015814e-05 9.8945015814e-05 9.8945015814e-05 9.8936086632e-05 9.8936086632e-05 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 +0.0001 0.0001 0.0001 9.875719777e-05 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 9.4354376388e-05 9.4354376388e-05 -9.4354376388e-05 9.428642518e-05 9.428642518e-05 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 +0.0001 0.0001 0.0001 9.432190862e-05 9.432190862e-05 9.432190862e-05 9.8696141194e-05 9.8696141194e-05 9.8696141194e-05 +9.9343777829e-05 9.9343777829e-05 9.9343777829e-05 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 +0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 9.4403808744e-05 +0.0001 0.0001 0.0001 0.0001 0.0001 9.9341127527e-05 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 +9.9082290788e-05 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 +0.0001 0.0001 0.0001 0.0001 0.0001 8.0197302342e-05 8.1799278773e-05 8.287645929e-05 8.2876775622e-05 +8.1008001827e-05 8.1799278773e-05 8.1799800826e-05 8.1799800826e-05 8.0931395139e-05 8.0934718973e-05 8.1008001827e-05 8.1187817568e-05 8.287645929e-05 +8.1008001827e-05 0.040051587315 8.2876775622e-05 8.174705808e-05 8.9477885243e-05 8.2876775622e-05 8.1799800826e-05 8.2406457207e-05 8.2005214493e-05 +0.0001 0.0001 8.1986028911e-05 8.1361286784e-05 8.1382895556e-05 8.2001803369e-05 0.0001 0.0001 0.0001 +0.0001 9.4725965201e-05 9.4795160983e-05 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 +0.0001 9.8764138491e-05 9.8764173766e-05 0.0001 9.4657223043e-05 9.5216042853e-05 9.5216042853e-05 9.5216042853e-05 0.0001 +0.0001 9.5180239585e-05 9.5180239585e-05 9.4052052751e-05 0.0001 0.0001 0.0001 0.0001 0.0001 +9.8606443885e-05 0.0001 0.0001 8.0057106931e-05 7.9564714702e-05 7.9797314093e-05 8.0057106931e-05 7.9564714702e-05 7.9564714702e-05 +8.0057106931e-05 7.9680111431e-05 7.9650118617e-05 7.9975382941e-05 7.9650118617e-05 7.9975382941e-05 0.0001 8.1120997109e-05 8.0330842188e-05 +8.1214708351e-05 8.1294930169e-05 8.0325551026e-05 8.1574761603e-05 8.040460329e-05 8.1959037146e-05 8.1419614417e-05 8.1989051959e-05 8.1220735761e-05 +8.1574761603e-05 8.1574761603e-05 8.1420452944e-05 8.1222497551e-05 8.0391486917e-05 8.1177230435e-05 8.0312434653e-05 8.1959037146e-05 8.1808242564e-05 +8.1419614417e-05 8.141934608e-05 8.141934608e-05 8.1446937445e-05 8.1446410267e-05 8.1808242564e-05 8.1987715547e-05 8.1087831331e-05 8.0391486917e-05 +8.1446937445e-05 8.1808242564e-05 8.2112764095e-05 8.1419614417e-05 0.0001 0.0001 0.0001 9.426114203e-05 0.0001 +9.4354672883e-05 9.4420240976e-05 9.4420240976e-05 9.4420240976e-05 9.4415826404e-05 9.4415826404e-05 9.8664793738e-05 0.0001 0.0001 +0.0001 0.0001 0.0001 0.0001 0.0001 9.7070095922e-05 0.0001 0.0001 0.0001 +0.0001 0.0001 0.0001 9.5316967962e-05 9.5316967962e-05 9.5316967962e-05 9.5312992503e-05 0.0001 9.7461569174e-05 +0.0001 9.7378805852e-05 7.9600084105e-05 7.9558114822e-05 9.8848943554e-05 9.8848943554e-05 9.8848943554e-05 8.9605862566e-05 8.908911524e-05 +8.8817635256e-05 8.8464333007e-05 8.8464333007e-05 8.8603778872e-05 8.9165933458e-05 8.8948023815e-05 8.953441152e-05 8.8948023815e-05 8.953441152e-05 +8.8969749688e-05 8.8464333007e-05 8.9165933458e-05 8.8464333007e-05 8.8464333007e-05 8.9165933458e-05 8.8603778872e-05 8.8464333007e-05 8.8603778872e-05 +8.953441152e-05 8.964267886e-05 0.0001 8.8233393496e-05 8.8233393496e-05 8.9525589781e-05 8.9525589781e-05 8.9011702114e-05 8.8519677505e-05 +8.8233393496e-05 8.8233393496e-05 8.9525589781e-05 8.9525589781e-05 8.9525589781e-05 8.8233393496e-05 0.0001 9.9076674315e-05 9.9076674315e-05 +9.9075504845e-05 9.9076674315e-05 0.0001 0.0001 0.0001 0.0001 0.0001 7.9095492913e-05 9.7664442801e-05 +0.0001 9.7764080861e-05 0.0001 0.0001 9.7793670576e-05 9.7793670576e-05 9.7793670576e-05 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 8.015797146e-05 0.0001 8.0360766283e-05 8.8953655014e-05 0.0001 8.9106431079e-05 0.0001 +6.9590870014e-05 0.014972473519 6.9627711755e-05 6.9590870014e-05 6.9627711755e-05 6.9627711755e-05 6.9590870014e-05 6.9627711755e-05 6.9590870014e-05 +6.9627711755e-05 0.045757591953 6.9570050071e-05 6.9570050071e-05 6.9570050071e-05 6.9590870014e-05 6.9570050071e-05 6.9627711755e-05 6.9627711755e-05 +6.9627711755e-05 0.045757591953 6.9627711755e-05 6.9570050071e-05 0.014972463422 6.9627711755e-05 6.9549748932e-05 6.9452409405e-05 6.9455897464e-05 +6.9505087623e-05 6.9285730468e-05 6.9319190727e-05 6.9302169038e-05 6.9274650406e-05 0.0001 8.7936462608e-05 8.7876268974e-05 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 9.4189668817e-05 9.4189668817e-05 9.4189668817e-05 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 9.4333027633e-05 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 7.9876181173e-05 8.0422190914e-05 8.1651956251e-05 8.1651956251e-05 -8.0764894926e-05 8.0422190914e-05 8.0422190914e-05 8.0422190914e-05 8.0764894926e-05 8.0764894926e-05 8.0764894926e-05 8.094282457e-05 8.1651956251e-05 -8.0764894926e-05 0.035306989382 8.1651956251e-05 8.0233405529e-05 8.9336365631e-05 8.1651956251e-05 8.0422190914e-05 8.1123011862e-05 8.0648156586e-05 -0.0001 0.0001 8.0580861598e-05 7.9823228996e-05 7.9853305914e-05 8.0608481961e-05 0.0001 0.0001 0.0001 -0.0001 9.4689043825e-05 9.4763430636e-05 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 9.4542131489e-05 9.5248263925e-05 9.5248263925e-05 9.5248263925e-05 0.0001 -0.0001 9.5203457888e-05 9.5203457888e-05 9.378974697e-05 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 7.9520494055e-05 7.9108498482e-05 7.9342117537e-05 7.9520494055e-05 7.9108498482e-05 7.9108498482e-05 -7.9520494055e-05 7.9128335771e-05 7.9108498482e-05 7.9520494055e-05 7.9108498482e-05 7.9520494055e-05 0.0001 8.0700415932e-05 7.9876181173e-05 -8.0897331688e-05 8.0897331688e-05 7.9876181173e-05 8.0072402769e-05 7.9876181173e-05 8.0540218037e-05 7.9876181173e-05 8.0540218037e-05 7.9490888372e-05 -8.0072402769e-05 8.0072402769e-05 7.9876181173e-05 8.0897331688e-05 7.9876181173e-05 8.0758113009e-05 7.9876181173e-05 8.0540218037e-05 8.0325543177e-05 -7.9876181173e-05 7.9876181173e-05 7.9876181173e-05 7.9876181173e-05 7.9876181173e-05 8.0325543177e-05 8.0540218037e-05 7.9328440753e-05 7.9876181173e-05 -7.9876181173e-05 8.0325543177e-05 8.074132718e-05 7.9876181173e-05 0.0001 0.0001 0.0001 9.40668846e-05 0.0001 -9.4157390304e-05 9.4265074154e-05 9.4265074154e-05 9.4265074154e-05 9.4227158489e-05 9.4227158489e-05 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 9.5322853471e-05 9.5322853471e-05 9.5322853471e-05 9.531852199e-05 0.0001 0.0001 -0.0001 0.0001 7.917592275e-05 7.9127000578e-05 0.0001 0.0001 0.0001 8.9591581171e-05 8.8797947612e-05 -8.8475466698e-05 8.8033677917e-05 8.8033677917e-05 8.8202208477e-05 8.8863757556e-05 8.8628194805e-05 8.9436319219e-05 8.8628194805e-05 8.9436319219e-05 -8.8688473309e-05 8.8033677917e-05 8.8863757556e-05 8.8033677917e-05 8.8033677917e-05 8.8863757556e-05 8.8202208477e-05 8.8033677917e-05 8.8202208477e-05 -8.9436319219e-05 8.9634131495e-05 0.0001 8.7491905117e-05 8.7491905117e-05 8.9279954397e-05 8.9279954397e-05 8.8604749901e-05 8.7957363411e-05 -8.7491905117e-05 8.7491905117e-05 8.9279954397e-05 8.9279954397e-05 8.9279954397e-05 8.7491905117e-05 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 7.8708204653e-05 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -6.7104686192e-05 0.011177209234 6.7104686192e-05 6.7104686192e-05 6.7104686192e-05 6.7104686192e-05 6.7104686192e-05 6.7104686192e-05 6.7104686192e-05 -6.7104686192e-05 0.042354858605 6.7104686192e-05 6.7104686192e-05 6.7104686192e-05 6.7104686192e-05 6.7104686192e-05 6.7104686192e-05 6.7104686192e-05 -6.7104686192e-05 0.042354858605 6.7104686192e-05 6.7104686192e-05 0.011177209234 6.7104686192e-05 6.6965948211e-05 6.6965948211e-05 6.6965948211e-05 -6.6965948211e-05 6.6659716012e-05 6.6659716012e-05 6.6645194048e-05 6.6645194048e-05 0.0001 8.7227177329e-05 8.7139340622e-05 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -8.5040784013e-05 0.0001 0.0001 0.0001 8.5278010133e-05 0.0001 0.0001 0.0001 0.0001 -8.4125185447e-05 8.973168712e-05 8.4189203706e-05 0.0001 0.0001 0.0001 0.0001 8.4260536546e-05 7.7447690067e-05 -0.0001 0.0001 0.0001 8.4937498656e-05 8.4937498656e-05 8.4352368871e-05 8.4937498656e-05 8.4352368871e-05 8.4937498656e-05 -8.4411973079e-05 8.4352368871e-05 8.4352368871e-05 8.4352368871e-05 8.4937498656e-05 8.4701828613e-05 0.0001 0.0001 0.0001 -0.0001 8.6337436364e-05 8.5068441829e-05 8.6099979554e-05 0.014000020446 8.6099979554e-05 8.6099979554e-05 8.6099979554e-05 8.6099979554e-05 -8.6099979554e-05 8.6099979554e-05 0.014000020446 8.6099979554e-05 8.6099979554e-05 8.6099979554e-05 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 9.1237516736e-05 9.2262592989e-05 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 8.3530594394e-05 8.3606224154e-05 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.036655972405 -8.0199283668e-05 7.8327924185e-05 7.8327924185e-05 6.6965948211e-05 6.6965948211e-05 6.6965948211e-05 0.042559149812 0.01125488445 6.6965948211e-05 -0.01125488445 0.042559149812 8.5435361256e-05 0.014645059081 0.014645059081 8.5435361256e-05 0.0001 0.0001 0.0001 -0.0001 8.2995373409e-05 8.2992872781e-05 8.2992872781e-05 8.2995373409e-05 0.0001 0.0001 8.0119964609e-05 8.0110933199e-05 -0.041958556419 7.8327924185e-05 6.6965948211e-05 6.6965948211e-05 0.042559149812 0.01125488445 0.01125488445 6.6965948211e-05 6.6965948211e-05 -0.042559149812 8.5346770077e-05 8.5336623872e-05 8.5346770077e-05 8.5336623872e-05 0.0001 0.0001 0.0001 0.0001 -0.017106514538 0.017105238707 8.2993485462e-05 8.2994761293e-05 0.0001 0.0001 8.0352065461e-05 0.03671821061 7.8327924185e-05 -7.8327924185e-05 6.6965948211e-05 0.01125488445 6.6965948211e-05 0.042559149812 6.6965948211e-05 0.042559149812 6.6965948211e-05 0.01125488445 -0.014672486823 8.5603470544e-05 8.5603470544e-05 0.014672486823 0.0001 0.0001 0.0001 0.0001 8.3005448962e-05 -8.2982735079e-05 8.2982735079e-05 8.3005448962e-05 +8.4084065623e-05 0.0001 0.0001 0.0001 8.428484702e-05 0.0001 0.0001 0.0001 0.0001 +8.3389018466e-05 9.0685554795e-05 8.3436137948e-05 0.0001 0.0001 0.0001 0.0001 8.635733978e-05 7.9271865489e-05 +0.0001 0.0001 0.0001 8.4001363587e-05 8.4001363587e-05 8.3512460439e-05 8.4001363587e-05 8.3512460439e-05 8.4001363587e-05 +0.0028136931554 8.3512460439e-05 8.3512460439e-05 8.3512460439e-05 8.4001363587e-05 0.0027800110266 0.0001 0.0001 0.0001 +0.0001 8.5196546545e-05 8.4089097351e-05 8.4957802172e-05 0.01824857685 8.4957802172e-05 8.4957802172e-05 8.4957802172e-05 8.4957802172e-05 +8.4957802172e-05 8.4957802172e-05 0.01824857685 8.4957802172e-05 8.4957802172e-05 8.4957802172e-05 0.0001 0.0001 0.0001 +0.0001 0.0001 0.0001 0.0001 0.0001 9.2163204519e-05 9.2864790205e-05 0.0001 9.8822280863e-05 +0.0001 0.0001 0.0001 0.0001 0.0001 9.8932239698e-05 0.0001 0.0001 0.0001 +9.6370205544e-05 9.6438672918e-05 9.6438672918e-05 9.6438672918e-05 9.6051004839e-05 9.6051004839e-05 9.6051004839e-05 9.6051004839e-05 9.6051004839e-05 +9.6438672918e-05 9.6438672918e-05 9.6232040074e-05 9.2200824749e-05 9.2091804416e-05 9.2200824749e-05 9.2091804416e-05 9.2091804416e-05 9.2200824749e-05 +0.0037889550782 9.2091804416e-05 9.2200824749e-05 0.0037878084792 9.2200824749e-05 9.2091804416e-05 0.0001 0.0001 0.0001 +0.0001 9.1676266609e-05 9.1685445642e-05 9.2117264974e-05 9.1679234322e-05 8.2837022519e-05 8.2912971268e-05 0.0001 0.0001 +0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 9.5063906691e-05 0.0001 +0.0001 0.0001 0.0001 0.0001 9.7286746178e-05 0.0001 0.0001 0.0001 0.041412109966 +8.0432293526e-05 7.8849601182e-05 7.8849601182e-05 6.9517591765e-05 6.94346754e-05 6.94346754e-05 0.04596549177 0.015046987545 6.9517591765e-05 +0.015046987545 0.04596549177 8.4399787238e-05 0.019011464394 0.019011464394 8.4399787238e-05 0.0039991646964 9.1742226164e-05 0.0039991646964 +9.1742226164e-05 0.0030360316328 8.2432951143e-05 8.2432951143e-05 0.0030360316328 0.0001 0.0001 8.0359710947e-05 8.0351486551e-05 +0.04652150372 7.8849601266e-05 6.9514570915e-05 6.9434703657e-05 0.046048988833 0.01504706698 0.015047067325 6.9434762499e-05 6.9514225015e-05 +0.046049047674 8.4324282779e-05 8.4315655243e-05 0.0028478941611 0.002848792134 0.0044433766778 0.0044436400857 9.1730250089e-05 9.1727025231e-05 +0.021822537308 0.021821634757 8.2433569781e-05 8.2434858166e-05 0.0001 0.0001 8.0643007065e-05 0.041377499545 7.8757365853e-05 +7.8849591971e-05 6.9435255416e-05 0.015046986962 6.9523327255e-05 0.045966427223 6.9523327255e-05 0.045966427223 6.9435255416e-05 0.015046986962 +0.019043891954 8.4543918061e-05 8.4543918061e-05 0.019043891954 0.004016000898 0.004016000898 9.178477396e-05 9.178477396e-05 8.2445658929e-05 +0.003045125506 0.003045125506 8.2445658929e-05 POINT_DATA 565 FIELD FieldData 1 radiation%20flux%20density 1 565 double -0.0001 0.0001 0.0001 0.0001 6.7884846505e-05 6.2621959555e-05 3.9756253605e-05 6.7661085399e-05 3.9756253605e-05 -6.7661085399e-05 6.7884846505e-05 6.2621959555e-05 3.9721569109e-05 6.7704240894e-05 6.2608573139e-05 3.9721569109e-05 3.9721569109e-05 6.7704240894e-05 -6.2160943764e-05 3.9686884614e-05 3.9610326564e-05 6.7649362731e-05 0.078854703562 0.078854703562 6.7428405877e-05 3.9641380569e-05 3.9721569109e-05 -6.7704240894e-05 6.2608573139e-05 3.9721569109e-05 6.240746332e-05 6.7964105268e-05 6.2621959555e-05 6.6575512957e-05 6.7884846505e-05 6.2260387242e-05 -0.078889949365 0.078889949365 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 +0.0001 0.0001 0.0001 0.0001 6.8055100252e-05 6.2922134305e-05 4.0213601425e-05 6.7836311085e-05 4.0214015442e-05 +6.7836311085e-05 6.8055158072e-05 6.2922134305e-05 4.0177472944e-05 6.7867007177e-05 6.2911501924e-05 4.0180540046e-05 4.0178777584e-05 6.7866949357e-05 +6.2536663574e-05 4.0150818436e-05 4.009401852e-05 6.7808796768e-05 0.08348892412 0.083499253104 6.7623676931e-05 4.0125905197e-05 4.0177296017e-05 +6.7866949357e-05 6.2911501924e-05 4.0179806608e-05 6.2761070073e-05 6.8116843412e-05 6.2922134305e-05 6.6887844204e-05 6.8057875843e-05 6.263545604e-05 +0.083536006797 0.083525669655 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 4.6652803409e-05 4.6443257089e-05 -4.6741888367e-05 4.3593600734e-05 4.357317597e-05 4.6315803493e-05 4.660515344e-05 4.6775474051e-05 4.3426533961e-05 4.6169374122e-05 4.675158281e-05 -4.6922116059e-05 4.6507253252e-05 4.6297494294e-05 4.6887651163e-05 4.3739150891e-05 4.3984364765e-05 4.3984364765e-05 4.3572963331e-05 4.6316016131e-05 -4.635828632e-05 4.6297494294e-05 4.6887651163e-05 4.3739150891e-05 4.3993868482e-05 4.3993868482e-05 4.4140297852e-05 4.4140510491e-05 4.3426533961e-05 -4.6169374122e-05 4.6503836477e-05 4.6443257089e-05 4.6751920205e-05 4.4040855774e-05 4.3189397618e-05 4.3176792658e-05 4.38600052e-05 4.6822051936e-05 -4.6503516809e-05 0.0018952007336 0.15544478638 0.15544478638 0.0018952722992 4.6432565757e-05 4.6596019521e-05 4.3616659702e-05 4.4138516574e-05 -4.4142302221e-05 4.3426533961e-05 4.6169374122e-05 4.6503836477e-05 4.6443257089e-05 4.6741888367e-05 4.3593600734e-05 4.4140612604e-05 4.4140195833e-05 -4.3315171715e-05 4.6013870069e-05 4.6634950189e-05 4.6967660802e-05 4.6569063578e-05 4.6297494294e-05 4.6887651163e-05 4.3739150891e-05 4.3799137311e-05 -4.540765776e-05 4.6582213185e-05 4.6752533796e-05 4.6948958985e-05 4.6564762673e-05 4.6034604591e-05 4.3329344004e-05 4.3193059917e-05 0.0019078469771 -0.15581668519 0.15581668519 0.001907846875 4.3193161936e-05 4.3765707226e-05 4.3765707226e-05 4.3193476688e-05 4.3193476688e-05 4.3730650742e-05 -0.0019083837344 0.15587534612 0.1558757714 0.0019083798437 4.3726760071e-05 0.15459670915 0.15459649651 0.0019078465604 4.3193476688e-05 -4.3965831081e-05 4.3965618443e-05 4.3049707809e-05 0.0019076990058 4.5961411271e-06 4.5983441965e-06 5.9030104957e-06 5.9030104957e-06 1.1289177992e-05 -1.1286893585e-05 1.1289177992e-05 1.1286893585e-05 4.5961411271e-06 4.5983441965e-06 5.9030104957e-06 5.9030104957e-06 1.1286893585e-05 1.1289177992e-05 -1.1286893585e-05 1.1289177992e-05 4.5961411271e-06 4.5983441965e-06 5.9030104957e-06 5.9030104957e-06 1.1289177992e-05 1.1286893585e-05 1.1286893585e-05 -1.1289177992e-05 4.5725421063e-06 4.5768288054e-06 5.9030105897e-06 5.9030105897e-06 1.1269553051e-05 1.1269553051e-05 1.1265136993e-05 1.1265136993e-05 -4.539806556e-06 4.5785451606e-06 5.903020948e-06 5.903020948e-06 1.1273150207e-05 1.1233415958e-05 1.1233415958e-05 1.1273150207e-05 4.5961411271e-06 -4.5983441965e-06 5.9030104957e-06 5.9030104957e-06 1.1289177992e-05 1.1286893585e-05 1.1289177992e-05 1.1286893585e-05 0.30593649471 0.30593031955 -0.30273537208 0.30273537208 0.28758990264 0.28758761823 0.28758761823 0.28758990264 4.5961411271e-06 4.5983441965e-06 5.9030104957e-06 -5.9030104957e-06 1.1286893585e-05 1.1286893585e-05 1.1289177992e-05 1.1289177992e-05 4.539806556e-06 4.5785451606e-06 5.903020948e-06 5.903020948e-06 -1.1233415958e-05 1.1273150207e-05 1.1233415958e-05 1.1273150207e-05 4.5961411271e-06 4.5983441965e-06 5.9030104957e-06 5.9030104957e-06 1.1286893585e-05 -1.1289177992e-05 1.1286893585e-05 1.1289177992e-05 4.5961411271e-06 4.5983441965e-06 5.9030104957e-06 5.9030104957e-06 1.1286893585e-05 1.1289177992e-05 -1.1289177992e-05 1.1286893585e-05 4.539806556e-06 4.5785451606e-06 5.903020948e-06 5.903020948e-06 1.1273150207e-05 1.1233415958e-05 1.1233415958e-05 -1.1273150207e-05 0.0001 9.3584116851e-05 9.3524561307e-05 0.0001 9.4041863467e-05 9.9241291975e-05 0.0001 0.0001 -9.4075120552e-05 9.8260822459e-05 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -9.8616431502e-05 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 9.2743594221e-05 9.3280693433e-05 -9.5168596368e-05 9.4570050679e-05 9.5162195505e-05 9.5168596368e-05 9.5162195505e-05 9.5168596368e-05 9.3883659601e-05 9.367492884e-05 9.367492884e-05 -9.367492884e-05 9.3992041785e-05 9.3827849536e-05 9.3816221506e-05 9.3827849536e-05 9.3669010096e-05 9.3693424328e-05 9.3669010096e-05 9.3756614233e-05 -9.3756614233e-05 9.3756614233e-05 9.3991921869e-05 9.3991921869e-05 9.3978717071e-05 9.3991921869e-05 9.4081877719e-05 9.424881192e-05 9.4242442113e-05 -9.4081877719e-05 0.0001 0.0001 9.3280693433e-05 9.3280693433e-05 9.3280693433e-05 9.3280693433e-05 0.0091010043249 0.0001 -9.3893253021e-05 0.0001 9.9251918662e-05 0.0001 9.8231329645e-05 9.8231329645e-05 9.8231329645e-05 9.8217943229e-05 9.8217943229e-05 -9.8006738974e-05 0.0001 0.0001 9.8845431698e-05 9.9026231717e-05 9.8845431698e-05 9.9220475578e-05 9.9220475578e-05 9.9220475578e-05 -9.9219753665e-05 9.9044179026e-05 9.9044179026e-05 9.9044179026e-05 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 9.371141207e-05 9.4263290962e-05 9.3700086868e-05 9.371141207e-05 9.3700086868e-05 9.371141207e-05 0.0001 -9.853309816e-05 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 9.2358735081e-05 -9.2457534583e-05 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 9.3802375223e-05 0.0001 0.0001 0.0001 9.278463445e-05 9.3127910634e-05 9.2756342316e-05 9.2685344595e-05 -9.2685344595e-05 9.2756342316e-05 9.2685344595e-05 9.3180119636e-05 9.3199568077e-05 9.3199568077e-05 9.3199568077e-05 0.0001 0.0001 -9.1825462078e-05 9.2289657851e-05 9.2289657851e-05 9.1825462078e-05 9.2289657851e-05 9.1825462078e-05 9.1825462078e-05 9.2289657851e-05 9.1825462078e-05 -9.2108116009e-05 9.2289657851e-05 9.191627871e-05 9.0974170533e-05 0.0001 9.1765383964e-05 9.1731921108e-05 0.0001 9.9059062731e-05 -9.9059062731e-05 9.9059062731e-05 9.904773753e-05 9.904773753e-05 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 9.8837933763e-05 9.8837933763e-05 9.8837933763e-05 0.0001 0.0001 -0.0001 0.0001 0.0001 0.0001 0.0001 9.8866605527e-05 0.0001 0.0001 0.0001 -0.0001 0.0001 0.0001 8.0932344162e-05 0.013543300052 8.1049370119e-05 8.1049370119e-05 8.0932344162e-05 8.0932344162e-05 -8.0932344162e-05 8.0932344162e-05 8.1049370119e-05 8.1049370119e-05 8.1049370119e-05 0.013543358023 8.0775111388e-05 8.0506186529e-05 8.0557329173e-05 -8.0491271511e-05 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 -0.0001 0.0001 9.0287982747e-05 0.0001 0.0001 9.7809379184e-05 9.8065648247e-05 0.0001 0.0001 -0.0001 0.0094780129382 9.3010000883e-05 9.0719361729e-05 9.0719361729e-05 0.013728417743 8.0472026092e-05 8.0472026092e-05 0.013728417743 -9.2973357823e-05 9.2969168706e-05 9.0719361823e-05 0.012745051611 0.014221177085 8.0454685558e-05 0.014220923948 8.0452401151e-05 9.3079858078e-05 -0.0094947406079 9.0719351371e-05 9.0719351371e-05 8.0508163185e-05 0.013733900764 8.0508163185e-05 0.013733900764 +0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 4.6252991735e-05 4.6076390268e-05 +4.621482383e-05 4.2904024274e-05 4.2982127356e-05 4.5972681409e-05 4.6118577685e-05 4.6244414647e-05 4.2745987657e-05 4.5736582496e-05 4.6355230872e-05 +4.648110862e-05 4.6017718858e-05 4.5841076605e-05 4.6450023328e-05 4.3139182986e-05 4.3226377225e-05 4.3226377225e-05 4.298208657e-05 4.5972809204e-05 +4.5889860688e-05 4.5838845821e-05 4.6449970606e-05 4.3139182986e-05 4.3237974282e-05 4.3237974282e-05 4.3474591137e-05 4.3474631923e-05 4.2745987657e-05 +4.5736669505e-05 4.6125133564e-05 4.6074343961e-05 4.621952268e-05 4.3307364473e-05 4.2517188335e-05 4.2503948867e-05 4.3255294371e-05 4.6373516124e-05 +4.6006179121e-05 0.0031174401843 0.16347056812 0.16347056812 0.0031232612009 4.6061581642e-05 4.606298235e-05 4.2923700096e-05 4.3474249699e-05 +4.3474975807e-05 4.2745987657e-05 4.5736669505e-05 4.6125133564e-05 4.6074159483e-05 4.6214771108e-05 4.2904024274e-05 4.3474651511e-05 4.347457157e-05 +4.2669025212e-05 4.559754061e-05 4.6260207566e-05 4.651043092e-05 4.6069484662e-05 4.5841958466e-05 4.6450023328e-05 4.3139182986e-05 4.3164872952e-05 +4.530059676e-05 4.6090847069e-05 4.6216771893e-05 4.6493832181e-05 4.6201527626e-05 4.5610750896e-05 4.2678208427e-05 4.2634966289e-05 0.0031735786872 +0.16387000309 0.16387000309 0.0031735786676 4.2634985855e-05 4.303690061e-05 4.303690061e-05 4.2635134471e-05 4.2635318223e-05 4.3002906726e-05 +0.0031422750612 0.16390144797 0.16390192165 0.0031424224266 4.2999172015e-05 0.16254765878 0.16254734533 0.0031750945583 4.2636857516e-05 +4.332201086e-05 4.3321970074e-05 4.2402489006e-05 0.0031748594637 4.8119421437e-06 4.8047793813e-06 5.8006824475e-06 5.7928980583e-06 7.4813801327e-06 +7.8781174022e-06 7.8849031504e-06 7.8718132328e-06 4.799878233e-06 4.8047793813e-06 5.8006824475e-06 5.7835566193e-06 7.8740587959e-06 7.4791492825e-06 +7.4783110176e-06 7.8849031504e-06 4.8000228051e-06 4.8072768856e-06 5.7972092398e-06 5.8085313468e-06 7.8849031504e-06 7.8604818346e-06 7.4730728364e-06 +7.8833530019e-06 4.7963967804e-06 4.7958403752e-06 5.8030167439e-06 5.7779851759e-06 7.4746935641e-06 0.00034927658035 7.4752837176e-06 7.4730528673e-06 +4.7689876066e-06 4.8005386346e-06 5.7992700372e-06 5.7837956166e-06 0.00034809342428 7.4578361677e-06 7.8670310709e-06 7.4779607331e-06 4.8076188972e-06 +4.8072768856e-06 5.7928980583e-06 5.7972092398e-06 7.8748970608e-06 7.4783110176e-06 7.8849031504e-06 7.4783110176e-06 0.31943601958 0.31942472491 +0.31524599056 0.31522593935 0.29831945601 0.29831474951 0.29831474951 0.29831945601 4.8111513843e-06 4.7949620937e-06 5.7835566193e-06 +5.8085881873e-06 7.4805418678e-06 7.4783110176e-06 7.4791492825e-06 0.00034928103607 4.7584618433e-06 4.795137605e-06 5.7957954496e-06 5.7742384692e-06 +7.4558449792e-06 7.8864333725e-06 7.4608434987e-06 0.00034809342428 4.799878233e-06 4.8072768856e-06 5.8096887771e-06 5.7972092398e-06 7.4805418678e-06 +7.8789556672e-06 7.8718132328e-06 7.8849031504e-06 4.799878233e-06 4.8140220877e-06 5.8006824475e-06 5.8050367286e-06 7.8740587959e-06 7.4769184323e-06 +7.8705994717e-06 7.4783110176e-06 4.7734844386e-06 4.7938836233e-06 5.7913642974e-06 5.7987276864e-06 7.4707313634e-06 7.8124000987e-06 7.8628807335e-06 +7.8584386426e-06 0.0001 9.331333809e-05 9.3284477184e-05 0.0001 9.3752756333e-05 9.8901769222e-05 9.9794023082e-05 0.0001 +9.3772596914e-05 9.789234797e-05 9.9777465623e-05 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 +9.8291033346e-05 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 9.1055268641e-05 9.0734232664e-05 +9.4554210993e-05 9.4059605133e-05 9.4545787913e-05 9.4554210993e-05 9.4545787913e-05 9.4554210993e-05 9.3697168689e-05 9.3440861802e-05 9.3438996895e-05 +9.3438996895e-05 9.3810706421e-05 9.3642033177e-05 9.3646290852e-05 9.3642033177e-05 9.3431826874e-05 9.3435718488e-05 9.3431826874e-05 9.3540232597e-05 +9.3540232597e-05 9.3540232597e-05 9.3723335844e-05 9.3723335844e-05 9.3712767876e-05 9.3723335844e-05 9.3855080907e-05 9.3997246995e-05 9.399154725e-05 +9.3855080907e-05 0.0001 0.0001 9.0745176477e-05 9.0734707497e-05 9.0745176477e-05 9.0745176477e-05 0.012046500653 9.9721288777e-05 +9.3512971808e-05 0.0001 9.8927367778e-05 9.9794028961e-05 9.784912962e-05 9.784912962e-05 9.784912962e-05 9.7835068887e-05 9.7835068887e-05 +9.7619400666e-05 9.9832330241e-05 9.9814035242e-05 9.851676376e-05 9.8737660208e-05 9.851676376e-05 9.8956236684e-05 9.8956236684e-05 9.8956236684e-05 +9.8954937479e-05 9.8757354695e-05 9.8757354695e-05 9.8757354695e-05 0.0001 9.931770514e-05 9.9323825932e-05 0.0001 9.9763209318e-05 +9.9763209318e-05 9.9763209318e-05 9.3224167162e-05 9.3797797056e-05 9.3211468485e-05 9.3224167162e-05 9.3211468485e-05 9.3224167162e-05 9.9346931952e-05 +9.7969332944e-05 0.0001 9.9638297034e-05 9.9663218527e-05 9.9652286901e-05 9.9663218527e-05 9.9663218527e-05 9.9660343852e-05 9.96605423e-05 +9.9638297034e-05 0.0001 9.9808157259e-05 9.9632278429e-05 9.9808157259e-05 9.9632278429e-05 9.9808157259e-05 9.9632278429e-05 9.0542445213e-05 +9.0632208482e-05 9.9761171719e-05 9.9761171719e-05 9.9754597689e-05 9.9688044985e-05 9.9689643476e-05 9.96927705e-05 9.9653621821e-05 9.9653621821e-05 +9.9700026655e-05 9.9688044985e-05 9.9653621821e-05 9.9782690199e-05 9.9782690199e-05 9.9782690199e-05 9.9792866295e-05 9.9843110118e-05 9.9843110118e-05 +9.9855571083e-05 0.0001 9.9845917474e-05 9.9846112386e-05 9.9846112386e-05 9.9846112386e-05 0.0001 0.0001 0.0001 +0.0001 9.2149944322e-05 9.9687599293e-05 9.9687599293e-05 9.9685130368e-05 9.2270919363e-05 9.2559325257e-05 9.2243842868e-05 9.2164568693e-05 +9.2177744071e-05 9.2230667491e-05 9.2174863658e-05 9.2608849895e-05 9.2637314103e-05 9.2649386206e-05 9.2636015903e-05 0.0001 0.0001 +8.9923130301e-05 9.0370592994e-05 9.0370592994e-05 8.9923130301e-05 9.0356972329e-05 8.9908896315e-05 8.9908896315e-05 9.0356972329e-05 8.9908896315e-05 +0.0011556908878 9.0370592994e-05 0.0011609889106 8.8106997666e-05 0.0001 9.0019949913e-05 8.9979745787e-05 0.0001 9.8580127211e-05 +9.8580127211e-05 9.8580127211e-05 9.8564573667e-05 9.8564573667e-05 0.0001 9.7884149758e-05 0.0001 0.0001 0.0001 +0.0001 0.0001 0.0001 0.0001 9.8472365529e-05 9.8472365529e-05 9.8472365529e-05 9.8520449124e-05 9.8497935551e-05 +9.8497935551e-05 9.8497935551e-05 9.8497935551e-05 9.8497935551e-05 0.0001 9.8500426808e-05 0.0001 0.0001 0.0001 +0.0001 0.0001 0.0001 7.9951965771e-05 0.017116026772 8.0075714455e-05 8.0075714455e-05 7.9951965771e-05 7.9951965771e-05 +7.9951965771e-05 7.9951965771e-05 8.0075714455e-05 8.0075714455e-05 8.0075714455e-05 0.017109521685 7.9846485837e-05 7.9512570244e-05 7.9602270361e-05 +7.9545234029e-05 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 +0.0001 0.0001 8.9733082587e-05 0.0001 0.0001 9.7162482046e-05 9.7390277691e-05 0.0001 0.0001 +0.0001 0.012519052593 9.0388045761e-05 0.0012313701846 0.0012313701846 0.017411828008 7.9505446342e-05 7.9505446342e-05 0.017411828008 +0.0011068121547 0.0011069751981 8.7862550755e-05 0.016525448758 0.018042216836 7.948774489e-05 0.018041792351 7.9485035785e-05 9.0471484444e-05 +0.012528183607 0.0012357010715 0.0012356857004 7.9546586724e-05 0.017423686509 7.9546586724e-05 0.017423686509 diff --git a/tests/input/validation_tests/PN_solver/linesource_PN.cfg b/tests/input/validation_tests/PN_solver/linesource_PN.cfg index 188e07ea..409a9643 100644 --- a/tests/input/validation_tests/PN_solver/linesource_PN.cfg +++ b/tests/input/validation_tests/PN_solver/linesource_PN.cfg @@ -6,7 +6,7 @@ % % ---- File specifications ---- OUTPUT_DIR = ../../../result -OUTPUT_FILE = rtsn_test_linesource_PN +OUTPUT_FILE = linesource_PN LOG_DIR = ../../../result/logs MESH_FILE = ../../mesh_files/linesource.su2 % diff --git a/tests/input/validation_tests/PN_solver/linesource_PN_reference.vtk b/tests/input/validation_tests/PN_solver/linesource_PN_reference.vtk index 7dd3095e..b8fee3db 100644 --- a/tests/input/validation_tests/PN_solver/linesource_PN_reference.vtk +++ b/tests/input/validation_tests/PN_solver/linesource_PN_reference.vtk @@ -172,24 +172,24 @@ CELL_TYPES 96 CELL_DATA 96 FIELD FieldData 1 radiation%20flux%20density 1 96 double -0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 8.4221315969 0.0012566370614 0.0012566370614 8.1719537062 0.0012566370614 -0.0012566370614 16.597102889 8.8566639055 15.596171346 8.0744377655 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 +0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 8.2146471539 0.0012566370614 0.0012566370614 8.352214558 0.0012566370614 +0.0012566370614 15.199389763 8.9475720152 14.040939196 8.3038490336 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 -0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 15.339811235 -15.537845293 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 +0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 13.815003202 +14.230887604 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 -0.0012566370614 0.0012566370614 0.0012566370614 2.9406791564 3.0237371533 0.0012566370614 0.0012566370614 5.7797048686 4.945491139 -2.6847860281 3.3898778102 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 +0.0012566370614 0.0012566370614 0.0012566370614 3.4116456184 3.508011512 0.0012566370614 0.0012566370614 6.7055518 5.7376768882 +3.1147522322 3.9328167428 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 -0.0012566370614 0.0012566370614 5.2303561496 3.8230216479 0.0012566370614 0.0012566370614 +0.0012566370614 0.0012566370614 6.0681841518 4.4353606819 0.0012566370614 0.0012566370614 POINT_DATA 61 FIELD FieldData 1 radiation%20flux%20density 1 61 double -0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 15.767732691 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 +0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 14.321554941 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 -0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.49116039028 2.2839454769 -0.44851153557 0.0012566370614 0.50500338977 2.5037470698 0.0012566370614 2.8659671276 0.56602683258 0.0012566370614 3.2393270877 -0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 7.9200417146 8.3409355632 8.1489584968 7.7350522216 0.0012566370614 -0.0012566370614 0.0012566370614 0.0012566370614 1.1569462834 0.99010353744 0.76560963923 1.0470765396 +0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 0.56965480062 2.4723361326 +0.52017256959 0.0012566370614 0.58571578288 2.7165594438 0.0012566370614 3.1036392596 0.65651665468 0.0012566370614 3.4986921695 +0.0012566370614 0.0012566370614 0.0012566370614 0.0012566370614 7.7358568018 8.1166053306 7.9120918531 7.5394504756 0.0012566370614 +0.0012566370614 0.0012566370614 0.0012566370614 1.3421156697 1.1485406873 0.88807744602 1.21464214 diff --git a/tests/input/validation_tests/SN_solver/checkerboard_SN.cfg b/tests/input/validation_tests/SN_solver/checkerboard_SN.cfg index 27232f6f..aee51280 100644 --- a/tests/input/validation_tests/SN_solver/checkerboard_SN.cfg +++ b/tests/input/validation_tests/SN_solver/checkerboard_SN.cfg @@ -7,7 +7,7 @@ % ---- File specifications ---- % OUTPUT_DIR = ../../../result -OUTPUT_FILE = rtsn_test_checkerboard_SN +OUTPUT_FILE = checkerboard_SN LOG_DIR = ../../../result/logs MESH_FILE = ../../mesh_files/checkerboard.su2 % diff --git a/tests/input/validation_tests/SN_solver/checkerboard_SN_reference.vtk b/tests/input/validation_tests/SN_solver/checkerboard_SN_reference.vtk index c0bf62a6..ca1f73fb 100644 --- a/tests/input/validation_tests/SN_solver/checkerboard_SN_reference.vtk +++ b/tests/input/validation_tests/SN_solver/checkerboard_SN_reference.vtk @@ -1727,187 +1727,187 @@ CELL_TYPES 1056 CELL_DATA 1056 FIELD FieldData 1 radiation%20flux%20density 1 1056 double --1.3214247139e-14 -1.3214247139e-14 5.6903521406e-12 5.691740735e-12 5.0915649622e-12 5.0915649622e-12 1.498141513e-11 1.498141513e-11 1.498141513e-11 -1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.4135238753e-11 1.4135238753e-11 1.4144322735e-11 1.4144322735e-11 --1.3214247139e-14 -1.3214247139e-14 -1.3214247139e-14 -1.3214247139e-14 1.6228785446e-11 1.6227073201e-11 1.6227073201e-11 1.6228785446e-11 -1.3214247139e-14 --1.3214247139e-14 5.691740735e-12 5.6903521406e-12 5.0915649622e-12 5.0915649622e-12 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 -1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.4144322735e-11 1.4135238753e-11 1.4144322735e-11 1.4135238753e-11 -1.3214247139e-14 --1.3214247139e-14 -1.3214247139e-14 -1.3214247139e-14 1.6227073201e-11 1.6227073201e-11 1.6228785446e-11 1.6228785446e-11 -1.3214247139e-14 -1.3214247139e-14 -5.691740735e-12 5.6903521406e-12 5.0915649622e-12 5.0915649622e-12 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 -1.498141513e-11 1.498141513e-11 1.498141513e-11 1.4135238753e-11 1.4144322735e-11 1.4135238753e-11 1.4144322735e-11 -1.3214247139e-14 -1.3214247139e-14 --1.3214247139e-14 -1.3214247139e-14 1.6228785446e-11 1.6228785446e-11 1.6227073201e-11 1.6227073201e-11 -1.3214247139e-14 -1.3214247139e-14 5.7059149846e-12 -5.7034346168e-12 5.0915649622e-12 5.0915649622e-12 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 -1.498141513e-11 1.498141513e-11 1.4038357887e-11 1.4038357887e-11 1.4055898695e-11 1.4055898695e-11 -1.3214247139e-14 -1.3214247139e-14 -1.3214247139e-14 --1.3214247139e-14 1.6226251701e-11 1.6229607703e-11 1.6229607703e-11 1.6226251701e-11 -1.3214247139e-14 -1.3214247139e-14 5.7235070171e-12 5.702429844e-12 -5.0915649622e-12 5.0915649622e-12 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 -1.498141513e-11 1.3905226423e-11 1.4062928958e-11 1.3905226423e-11 1.4062928958e-11 -1.3214247139e-14 -1.3214247139e-14 -1.3214247139e-14 -1.3214247139e-14 -1.6212729673e-11 1.6243213139e-11 1.6243213139e-11 1.6212729673e-11 -1.3214247139e-14 -1.3214247139e-14 5.691740735e-12 5.6903521406e-12 5.0915649622e-12 -5.0915649622e-12 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 -1.4135238753e-11 1.4144322735e-11 1.4144322735e-11 1.4135238753e-11 -1.3214247139e-14 -1.3214247139e-14 -1.3214247139e-14 -1.3214247139e-14 1.6228785446e-11 -1.6228785446e-11 1.6227073201e-11 1.6227073201e-11 0.31528042379 0.31528042379 0.27083356076 0.27080311893 0.26395719276 0.26395719276 -0.25309075682 0.25309075682 0.25309075682 0.25309075682 0.25309075682 0.25309075682 0.25309075682 0.25309075682 0.30112288681 -0.30113197079 0.30113197079 0.30112288681 0.31528042379 0.31528042379 0.31528042379 0.31528042379 0.29904013634 0.2990384241 -0.2990384241 0.29904013634 -1.3214247139e-14 -1.3214247139e-14 5.6903521406e-12 5.691740735e-12 5.0915649622e-12 5.0915649622e-12 1.498141513e-11 -1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.4135238753e-11 1.4144322735e-11 -1.4135238753e-11 1.4144322735e-11 -1.3214247139e-14 -1.3214247139e-14 -1.3214247139e-14 -1.3214247139e-14 1.6227073201e-11 1.6228785446e-11 1.6227073201e-11 -1.6228785446e-11 -1.3214247139e-14 -1.3214247139e-14 5.7235070171e-12 5.702429844e-12 5.0915649622e-12 5.0915649622e-12 1.498141513e-11 1.498141513e-11 -1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.3905226423e-11 1.4062928958e-11 1.3905226423e-11 -1.4062928958e-11 -1.3214247139e-14 -1.3214247139e-14 -1.3214247139e-14 -1.3214247139e-14 1.6212729673e-11 1.6243213139e-11 1.6212729673e-11 1.6243213139e-11 --1.3214247139e-14 -1.3214247139e-14 5.691740735e-12 5.6903521406e-12 5.0915649622e-12 5.0915649622e-12 1.498141513e-11 1.498141513e-11 1.498141513e-11 -1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.4144322735e-11 1.4135238753e-11 1.4135238753e-11 1.4144322735e-11 --1.3214247139e-14 -1.3214247139e-14 -1.3214247139e-14 -1.3214247139e-14 1.6227073201e-11 1.6228785446e-11 1.6228785446e-11 1.6227073201e-11 -1.3214247139e-14 --1.3214247139e-14 5.691740735e-12 5.6903521406e-12 5.0915649622e-12 5.0915649622e-12 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 -1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.4144322735e-11 1.4135238753e-11 1.4144322735e-11 1.4135238753e-11 -1.3214247139e-14 --1.3214247139e-14 -1.3214247139e-14 -1.3214247139e-14 1.6228785446e-11 1.6227073201e-11 1.6228785446e-11 1.6227073201e-11 -1.3214247139e-14 -1.3214247139e-14 -5.7235070171e-12 5.702429844e-12 5.0915649622e-12 5.0915649622e-12 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 1.498141513e-11 -1.498141513e-11 1.498141513e-11 1.498141513e-11 1.3905226423e-11 1.3905226423e-11 1.4062928958e-11 1.4062928958e-11 -1.3214247139e-14 -1.3214247139e-14 --1.3214247139e-14 -1.3214247139e-14 1.6243213139e-11 1.6212729673e-11 1.6243213139e-11 1.6212729673e-11 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 9.5838742167e-11 9.448318564e-11 9.448318564e-11 9.448318564e-11 9.4449754567e-11 -9.4449754567e-11 9.4587654439e-11 1e-10 1e-10 1e-10 1e-10 9.5586267539e-11 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 9.4721094716e-11 9.4721094716e-11 -9.4721094716e-11 9.4657557361e-11 9.4657557361e-11 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 7.4985121953e-11 1e-10 7.5308095601e-11 8.9551289452e-11 1e-10 8.9687984233e-11 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 9.4518937398e-11 9.4518937398e-11 9.4518937398e-11 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 9.464119928e-11 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 7.4528590652e-11 7.540507024e-11 7.7277394686e-11 7.7277394686e-11 -7.5939422955e-11 7.540507024e-11 7.540507024e-11 7.540507024e-11 7.5939422955e-11 7.5939422955e-11 7.5939422955e-11 7.6212698406e-11 7.7277394686e-11 -7.5939422955e-11 0.042344986888 7.7277394686e-11 7.5105776393e-11 8.9908948616e-11 7.7277394686e-11 7.540507024e-11 7.6486784405e-11 7.5758629408e-11 -1e-10 1e-10 7.5653844508e-11 7.4441712577e-11 7.4491103783e-11 7.5696903083e-11 1e-10 1e-10 1e-10 -1e-10 9.5014412618e-11 9.5084590903e-11 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 9.4851377968e-11 9.5408611162e-11 9.5408611162e-11 9.5408611162e-11 1e-10 -1e-10 9.5365317103e-11 9.5365317103e-11 9.41009961e-11 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 7.3937686993e-11 7.3228769324e-11 7.3634300854e-11 7.3937686993e-11 7.3228769324e-11 7.3228769324e-11 -7.3937686993e-11 7.326359344e-11 7.3228769324e-11 7.3937686993e-11 7.3228769324e-11 7.3937686993e-11 1e-10 7.5847570142e-11 7.4528590652e-11 -7.6143082335e-11 7.6143082335e-11 7.4528590652e-11 7.484748466e-11 7.4528590652e-11 7.5590352675e-11 7.4528590652e-11 7.5590352675e-11 7.3923073616e-11 -7.484748466e-11 7.484748466e-11 7.4528590652e-11 7.6143082335e-11 7.4528590652e-11 7.593682669e-11 7.4528590652e-11 7.5590352675e-11 7.5252312473e-11 -7.4528590652e-11 7.4528590652e-11 7.4528590652e-11 7.4528590652e-11 7.4528590652e-11 7.5252312473e-11 7.5590352675e-11 7.3636922452e-11 7.4528590652e-11 -7.4528590652e-11 7.5252312473e-11 7.5903021515e-11 7.4528590652e-11 1e-10 1e-10 1e-10 9.4403278129e-11 1e-10 -9.4499825984e-11 9.4600146242e-11 9.4600146242e-11 9.4600146242e-11 9.4565505053e-11 9.4565505053e-11 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 9.558155e-11 9.558155e-11 9.558155e-11 9.5577458097e-11 1e-10 1e-10 -1e-10 1e-10 7.3346827397e-11 7.3261251892e-11 1e-10 1e-10 1e-10 9.0221416381e-11 8.9404032606e-11 -8.9208517502e-11 8.8735024723e-11 8.8735024723e-11 8.8876689523e-11 8.9433655393e-11 8.9255409934e-11 9.0023759248e-11 8.9255409934e-11 9.0023759248e-11 -8.9399237408e-11 8.8735024723e-11 8.9433655393e-11 8.8735024723e-11 8.8735024723e-11 8.9433655393e-11 8.8876689523e-11 8.8735024723e-11 8.8876689523e-11 -9.0023759248e-11 9.0257426528e-11 1e-10 8.812727726e-11 8.812727726e-11 8.9850957007e-11 8.9850957007e-11 8.9219753869e-11 8.8640384526e-11 -8.812727726e-11 8.812727726e-11 8.9850957007e-11 8.9850957007e-11 8.9850957007e-11 8.812727726e-11 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 7.2508369198e-11 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -6.1614899957e-11 0.010008914075 6.1614899957e-11 6.1614899957e-11 6.1614899957e-11 6.1614899957e-11 6.1614899957e-11 6.1614899957e-11 6.1614899957e-11 -6.1614899957e-11 0.051809580005 6.1614899957e-11 6.1614899957e-11 6.1614899957e-11 6.1614899957e-11 6.1614899957e-11 6.1614899957e-11 6.1614899957e-11 -6.1614899957e-11 0.051809580005 6.1614899957e-11 6.1614899957e-11 0.010008914075 6.1614899957e-11 6.1407851825e-11 6.1407851825e-11 6.1407851825e-11 -6.1407851825e-11 6.0947053554e-11 6.0947053554e-11 6.0925068293e-11 6.0925068293e-11 1e-10 8.7991703315e-11 8.7912684723e-11 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -8.555425444e-11 1e-10 1e-10 1e-10 8.576500006e-11 1e-10 1e-10 1e-10 1e-10 -8.4892329245e-11 9.0724756553e-11 8.4942437328e-11 1e-10 1e-10 1e-10 1e-10 8.5124683485e-11 6.9868518479e-11 -1e-10 1e-10 1e-10 8.5560137507e-11 8.5560137507e-11 8.5009320551e-11 8.5560137507e-11 8.5009320551e-11 8.5560137507e-11 -8.5077719241e-11 8.5009320551e-11 8.5009320551e-11 8.5009320551e-11 8.5560137507e-11 8.5343150508e-11 1e-10 1e-10 1e-10 -1e-10 8.6790668341e-11 8.5602556455e-11 8.6499684439e-11 0.013500315661 8.6499684439e-11 8.6499684439e-11 8.6499684439e-11 8.6499684439e-11 -8.6499684439e-11 8.6499684439e-11 0.013500315661 8.6499684439e-11 8.6499684439e-11 8.6499684439e-11 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 9.1666630008e-11 9.2605457392e-11 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 8.4216402646e-11 8.4317902563e-11 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 0.044121929473 -7.5051277171e-11 7.1785994883e-11 7.1785994883e-11 6.1407851825e-11 6.1407851825e-11 6.1407851825e-11 0.052110651722 0.010079015412 6.1407851825e-11 -0.010079015412 0.052110651722 8.5930887058e-11 0.014051572235 0.014051572235 8.5930887058e-11 1e-10 1e-10 1e-10 -1e-10 8.3760534052e-11 8.375717805e-11 8.375717805e-11 8.3760534052e-11 1e-10 1e-10 7.4924090996e-11 7.4909564375e-11 -0.051323231125 7.1785994883e-11 6.1407851825e-11 6.1407851825e-11 0.052110651722 0.010079015412 0.010079015412 6.1407851825e-11 6.1407851825e-11 -0.052110651722 8.5851547e-11 8.5842463018e-11 8.5851547e-11 8.5842463018e-11 1e-10 1e-10 1e-10 1e-10 -0.016241999794 0.016240287548 8.3758000306e-11 8.3759712552e-11 1e-10 1e-10 7.5294327969e-11 0.044204386154 7.1785994883e-11 -7.1785994883e-11 6.1407851825e-11 0.010079015412 6.1407851825e-11 0.052110651722 6.1407851825e-11 0.052110651722 6.1407851825e-11 0.010079015412 -0.014076143305 8.608155933e-11 8.608155933e-11 0.014076143305 1e-10 1e-10 1e-10 1e-10 8.3774056079e-11 -8.3743572614e-11 8.3743572614e-11 8.3774056079e-11 +9.3903270621e-13 9.3903270621e-13 1.4472838896e-10 1.4485060545e-10 1.6517960882e-10 1.6533657443e-10 1.9015128801e-10 1.8959172751e-10 1.7463116553e-10 +1.8928020959e-10 1.8936502872e-10 1.9002883338e-10 1.7388583047e-10 1.9013017528e-10 6.1215555569e-11 6.1215555569e-11 6.1226341693e-11 6.1226341693e-11 +8.7172057488e-11 8.7172057488e-11 8.7130534878e-11 8.7130534878e-11 6.2603577538e-11 6.2595627293e-11 6.2595627293e-11 6.2603577538e-11 9.3903270621e-13 +9.3903270621e-13 1.4456680383e-10 1.4472838896e-10 1.6533657443e-10 1.6499124662e-10 1.9002883338e-10 1.7388254174e-10 1.8959172751e-10 1.7450748465e-10 +1.8938256861e-10 1.9006554949e-10 1.7388583047e-10 1.7450850178e-10 6.1226341693e-11 6.1215555569e-11 6.1226341693e-11 6.1215555569e-11 8.7172057488e-11 +8.7130534878e-11 8.7172057488e-11 8.7130534878e-11 6.2595627293e-11 6.2595627293e-11 6.2603577538e-11 6.2603577538e-11 9.3903270621e-13 9.3903270621e-13 +1.4457020487e-10 1.4478714236e-10 1.6526654014e-10 1.6549484083e-10 1.7347185553e-10 1.8995015045e-10 1.9033706256e-10 1.894422079e-10 1.8926982772e-10 +1.8928349833e-10 1.746301484e-10 1.9015230513e-10 6.1215555569e-11 6.1226341693e-11 6.1215555569e-11 6.1226341693e-11 8.7172057488e-11 8.7172057488e-11 +8.7130534878e-11 8.7130534878e-11 6.2603577538e-11 6.2603577538e-11 6.2595627293e-11 6.2595627293e-11 9.3903270621e-13 9.3903270621e-13 1.4388433025e-10 +1.4395990719e-10 1.6499124837e-10 1.6549598872e-10 1.738474432e-10 1.7373113751e-10 0.015115545956 1.7450699666e-10 1.7463165397e-10 0.015115545956 +1.7462966041e-10 1.738474432e-10 6.1097964446e-11 6.1097964446e-11 6.1119601373e-11 6.1119601373e-11 8.6852785309e-11 8.6933288181e-11 8.6852785309e-11 +8.6933288181e-11 6.2591811509e-11 6.2607393989e-11 6.2607393989e-11 6.2591811509e-11 9.3903270621e-13 9.3903270621e-13 1.424949267e-10 1.4402999491e-10 +1.6518415301e-10 1.6549618159e-10 0.015010414659 0.015115545956 1.7338845284e-10 1.7462162793e-10 1.8933234126e-10 1.7373368538e-10 1.9016179233e-10 +1.74639736e-10 6.092875881e-11 6.112823036e-11 6.092875881e-11 6.112823036e-11 8.6355331327e-11 8.7081127508e-11 8.6355331327e-11 8.7081127508e-11 +6.2528870315e-11 6.2670408598e-11 6.2670408598e-11 6.2528870315e-11 9.3903270621e-13 9.3903270621e-13 1.4474890175e-10 1.4478714236e-10 1.6526654014e-10 +1.6517960882e-10 1.7375987799e-10 1.746301484e-10 1.9033706256e-10 1.8928349833e-10 1.901311924e-10 1.746301484e-10 1.7375987799e-10 1.8932123156e-10 +6.1215555569e-11 6.1226341693e-11 6.1226341693e-11 6.1215555569e-11 8.7172057488e-11 8.7172057488e-11 8.7130534878e-11 8.7130534878e-11 6.2603577538e-11 +6.2603577538e-11 6.2595627293e-11 6.2595627293e-11 4.1954783166 4.1954783166 3.5519927165 3.5515076439 3.4618518812 3.4614475657 +3.2743733339 3.2743941551 3.2736455313 3.2736465484 3.2736455313 3.2743733339 3.2743941551 3.2736465484 3.9145071118 +3.9146585032 3.9146585032 3.9145071118 4.1092868144 4.1092452918 4.1092868144 4.1092452918 3.880921213 3.8808859026 +3.8808859026 3.880921213 9.3903270621e-13 9.3903270621e-13 1.444974388e-10 1.4483200296e-10 1.6549598697e-10 1.6499124662e-10 1.7388254174e-10 +1.7376316672e-10 1.7450748465e-10 1.7463116553e-10 0.015115545956 1.746301484e-10 0.015115545956 1.7388254174e-10 6.1215555569e-11 6.1226341693e-11 +6.1215555569e-11 6.1226341693e-11 8.7130534878e-11 8.7172057488e-11 8.7130534878e-11 8.7172057488e-11 6.2595627293e-11 6.2603577538e-11 6.2595627293e-11 +6.2603577538e-11 9.3903270621e-13 9.3903270621e-13 1.4224730976e-10 1.4390293653e-10 1.6542611948e-10 1.6499144124e-10 1.736764753e-10 1.7422411957e-10 +1.8947726441e-10 0.015115545957 1.7449896418e-10 1.736764753e-10 1.9016807038e-10 0.015010414658 6.092875881e-11 6.112823036e-11 6.092875881e-11 +6.112823036e-11 8.6355331327e-11 8.6355331327e-11 8.7081127508e-11 8.7081127508e-11 6.2528870315e-11 6.2670408598e-11 6.2528870315e-11 6.2670408598e-11 +9.3903270621e-13 9.3903270621e-13 1.4456680383e-10 1.4478714236e-10 1.6551817944e-10 1.6526654014e-10 1.9033706256e-10 1.9002781626e-10 1.8928349833e-10 +1.7388254174e-10 1.8940697008e-10 1.8938256861e-10 1.746301484e-10 1.9011365251e-10 6.1226341693e-11 6.1215555569e-11 6.1215555569e-11 6.1226341693e-11 +8.7130534878e-11 8.7130534878e-11 8.7172057488e-11 8.7172057488e-11 6.2595627293e-11 6.2603577538e-11 6.2603577538e-11 6.2595627293e-11 9.3903270621e-13 +9.3903270621e-13 1.4456680383e-10 1.4494582219e-10 1.6533657443e-10 1.6542437482e-10 1.7388254174e-10 1.7450748465e-10 1.9002883338e-10 1.9006554949e-10 +1.8938256861e-10 1.8935137621e-10 1.7450850178e-10 1.7376316672e-10 6.1226341693e-11 6.1215555569e-11 6.1226341693e-11 6.1215555569e-11 8.7172057488e-11 +8.7130534878e-11 8.7130534878e-11 8.7172057488e-11 6.2603577538e-11 6.2595627293e-11 6.2603577538e-11 6.2595627293e-11 9.3903270621e-13 9.3903270621e-13 +1.4260071398e-10 1.438734368e-10 1.6533676905e-10 1.6548524555e-10 1.7451707224e-10 1.891968069e-10 1.9014276754e-10 1.8924954278e-10 1.7345884077e-10 +1.8937933732e-10 1.8928162603e-10 1.8992538367e-10 6.092875881e-11 6.092875881e-11 6.112823036e-11 6.112823036e-11 8.6355331327e-11 8.6355331327e-11 +8.7081127508e-11 8.7081127508e-11 6.2670408598e-11 6.2528870315e-11 6.2670408598e-11 6.2528870315e-11 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2450409828e-09 1.2459994543e-09 1.2450409828e-09 1.2566370614e-09 +1.2453519057e-09 1.2408706931e-09 1.2408706931e-09 1.2408706931e-09 1.1981087281e-09 1.182787863e-09 1.182787863e-09 1.182787863e-09 1.1824379201e-09 +1.1824379201e-09 1.1840377201e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2439945717e-09 1.1951578878e-09 1.2407173938e-09 1.2407173938e-09 +1.2401008667e-09 1.2340238907e-09 1.2566370614e-09 1.2566370614e-09 1.2334940802e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2332818467e-09 1.2334649773e-09 1.2334649773e-09 1.2474988725e-09 1.2474988725e-09 1.2474988725e-09 1.2473957798e-09 1.2473957798e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2428226649e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2351023854e-09 1.2351023854e-09 1.233616603e-09 1.2334980361e-09 1.2349413673e-09 1.2351023854e-09 1.2334980361e-09 1.2344646073e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.1829722605e-09 1.1829722605e-09 +1.1829722605e-09 1.182216668e-09 1.182216668e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2354584006e-09 1.2354584006e-09 +1.2351332092e-09 1.2349215329e-09 1.2354584006e-09 1.235098726e-09 1.233949158e-09 1.233949158e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2476144837e-09 1.2476144837e-09 1.2476144837e-09 1.2474690751e-09 1.2474690751e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 9.4202246594e-10 1.2566370614e-09 9.4575890602e-10 1.113277069e-09 1.2566370614e-09 1.1148182567e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2446648012e-09 1.2446648012e-09 1.2446648012e-09 1.2445539247e-09 1.2445539247e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2456907052e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.1807716408e-09 1.1807716408e-09 1.1807716408e-09 1.2458334963e-09 1.2458334963e-09 1.2458334963e-09 +1.2484963244e-09 1.2484963244e-09 1.2484963244e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.1823370393e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2485407551e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2426152745e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 9.3583574208e-10 9.6236909539e-10 9.8397984624e-10 9.8397984624e-10 +9.5219299846e-10 9.6236909539e-10 9.6236909539e-10 9.6236909539e-10 9.5219299846e-10 9.5219299846e-10 9.5219299846e-10 9.5655394282e-10 9.8397984624e-10 +9.5219299846e-10 0.61543387648 9.8397984624e-10 9.6033237353e-10 1.1173676758e-09 9.8397984624e-10 9.6236909539e-10 9.7505666586e-10 9.6699391102e-10 +1.2566370614e-09 1.2566370614e-09 9.6571650493e-10 9.525516124e-10 9.5309365405e-10 9.6613740508e-10 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.187991485e-09 1.1888702345e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2434241351e-09 1.2434335276e-09 1.2566370614e-09 1.1857969373e-09 1.1929461592e-09 1.1929461592e-09 1.1929461592e-09 1.2566370614e-09 +1.2566370614e-09 1.1924527572e-09 1.1924527572e-09 1.1774408837e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.242002179e-09 1.2566370614e-09 1.2566370614e-09 9.3058312102e-10 9.2190147756e-10 9.2691236784e-10 9.3058312102e-10 9.2190147756e-10 9.2190147756e-10 +9.3058312102e-10 9.2249984921e-10 9.2190147756e-10 9.3058312102e-10 9.2190147756e-10 9.3058312102e-10 1.2566370614e-09 9.5321768774e-10 9.3798055066e-10 +9.5660694709e-10 9.5660694709e-10 9.3794486848e-10 9.5704022669e-10 9.3794486848e-10 9.6515640895e-10 9.5361389749e-10 9.6548471345e-10 9.4810213763e-10 +9.5704022669e-10 9.5704022669e-10 9.5361389749e-10 9.5660694709e-10 9.3785101269e-10 9.5430670385e-10 9.3785101269e-10 9.6515640895e-10 9.6173746348e-10 +9.5361389749e-10 9.5361389749e-10 9.5361389749e-10 9.537673184e-10 9.537673184e-10 9.6173746348e-10 9.6547608351e-10 9.4494595452e-10 9.3785101269e-10 +9.537673184e-10 9.6173746348e-10 9.6855929338e-10 9.5361389749e-10 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.1804654744e-09 1.2566370614e-09 +1.181958488e-09 1.1830963358e-09 1.1830963358e-09 1.1830963358e-09 1.1827960485e-09 1.1827960485e-09 1.2425266791e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2260501267e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.1944948964e-09 1.1944948964e-09 1.1944948964e-09 1.194439123e-09 1.2566370614e-09 1.2300826774e-09 +1.2566370614e-09 1.2292255138e-09 9.2323501761e-10 9.2223889762e-10 1.2444270516e-09 1.2444270516e-09 1.2444270516e-09 1.1212445876e-09 1.1115991704e-09 +1.1100997753e-09 1.1042042671e-09 1.1042042671e-09 1.1057286672e-09 1.1118674723e-09 1.109934765e-09 1.1187504217e-09 1.109934765e-09 1.1187504217e-09 +1.1122227283e-09 1.1042042671e-09 1.1118674723e-09 1.1042042671e-09 1.1042042671e-09 1.1118674723e-09 1.1057286672e-09 1.1042042671e-09 1.1057286672e-09 +1.1187504217e-09 1.1216489e-09 1.2566370614e-09 1.0972808173e-09 1.0972808173e-09 1.116882393e-09 1.116882393e-09 1.1096350075e-09 1.1032029839e-09 +1.0972808173e-09 1.0972808173e-09 1.116882393e-09 1.116882393e-09 1.116882393e-09 1.0972808173e-09 1.2566370614e-09 1.2474440084e-09 1.2474440084e-09 +1.2474369068e-09 1.2474440084e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 9.1254154114e-10 1.2305322026e-09 +1.2566370614e-09 1.2317547684e-09 1.2566370614e-09 1.2566370614e-09 1.2333494145e-09 1.2333494145e-09 1.2333494145e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +7.9330269668e-10 0.17746064528 7.935802823e-10 7.9330269668e-10 7.935802823e-10 7.935802823e-10 7.9330269668e-10 7.935802823e-10 7.9330269668e-10 +7.935802823e-10 0.7233813132 7.9308000597e-10 7.9308000597e-10 7.9308000597e-10 7.9330269668e-10 7.9308000597e-10 7.935802823e-10 7.935802823e-10 +7.935802823e-10 0.7233813132 7.935802823e-10 7.9308000597e-10 0.17746064528 7.935802823e-10 7.9157146616e-10 7.9059678333e-10 7.9065707723e-10 +7.9110510734e-10 7.8615615119e-10 7.8633166153e-10 7.8603079326e-10 7.8591505448e-10 1.2566370614e-09 1.0961075402e-09 1.0952650847e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.0461981491e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.048603673e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.0408531023e-09 1.1391590396e-09 1.0413163e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.0665603074e-09 9.0008667808e-10 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.0479746252e-09 1.0479746252e-09 1.0415124306e-09 1.0479746252e-09 1.0415124306e-09 1.0479746252e-09 +0.023373012723 1.0415124306e-09 1.0415124306e-09 1.0415124306e-09 1.0479746252e-09 0.023082619391 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.0616494149e-09 1.0473338147e-09 1.057473732e-09 0.2469361002 1.057473732e-09 1.057473732e-09 1.057473732e-09 1.057473732e-09 +1.057473732e-09 1.057473732e-09 0.2469361002 1.057473732e-09 1.057473732e-09 1.057473732e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.1534717223e-09 1.1625781999e-09 1.2566370614e-09 1.2421267006e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2435197743e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2195208076e-09 1.2204436633e-09 1.2204436633e-09 1.2204436633e-09 1.2160303586e-09 1.2160303586e-09 1.2160303586e-09 1.2160303586e-09 1.2160303586e-09 +1.2204436633e-09 1.2204436633e-09 1.2178821495e-09 1.1767192507e-09 1.17525638e-09 1.1767192507e-09 1.17525638e-09 1.17525638e-09 1.1767192507e-09 +0.037197333989 1.17525638e-09 1.1767192507e-09 0.037186126702 1.1767192507e-09 1.17525638e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.1714130969e-09 1.1717391013e-09 1.1754663001e-09 1.170102652e-09 1.0319402014e-09 1.0334990643e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.207103933e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2375519722e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 0.63914997856 +9.4192772247e-10 9.0413715007e-10 9.0413715007e-10 7.9122385278e-10 7.9044600007e-10 7.9044600007e-10 0.72735292234 0.17858059688 7.9122385278e-10 +0.17858059688 0.72735292234 1.0510670578e-09 0.25576200913 0.25576200913 1.0510670578e-09 0.039727186822 1.170642806e-09 0.039727186822 +1.170642806e-09 0.025140782435 1.0273751514e-09 1.0273751514e-09 0.025140782435 1.2566370614e-09 1.2566370614e-09 9.4046022896e-10 9.4029262629e-10 +0.73362643658 9.0413715182e-10 7.9119511231e-10 7.9044648852e-10 0.72813562755 0.17858059688 0.17858059688 7.9044750564e-10 7.9119182357e-10 +0.72813664467 1.0501599035e-09 1.0500562437e-09 0.023523293517 0.023531010429 0.04617897798 0.04618171403 1.1704455593e-09 1.1704040367e-09 +0.28944005439 0.28941256906 1.0273877863e-09 1.0274140997e-09 1.2566370614e-09 1.2566370614e-09 9.4473254411e-10 0.63992115861 9.041369572e-10 +9.041369572e-10 7.9045602611e-10 0.17858059688 7.91278515e-10 0.72736182827 7.91278515e-10 0.72736182827 7.9045602611e-10 0.17858059688 +0.2561515788 1.0527986027e-09 1.0527986027e-09 0.2561515788 0.039922191612 0.039922191612 1.1712207628e-09 1.1712207628e-09 1.0276346859e-09 +0.025218297346 0.025218297346 1.0276346859e-09 POINT_DATA 565 FIELD FieldData 1 radiation%20flux%20density 1 565 double -1e-10 1e-10 1e-10 1e-10 6.7272283258e-11 6.19434354e-11 3.8298157543e-11 6.7017079081e-11 3.8298157543e-11 -6.7017079081e-11 6.7272283258e-11 6.19434354e-11 3.824639551e-11 6.7076660874e-11 6.1930647878e-11 3.824639551e-11 3.824639551e-11 6.7076660874e-11 -6.1380974641e-11 3.8194633477e-11 3.807943391e-11 6.711335821e-11 0.07877370936 0.07877370936 6.6871343625e-11 3.8125699628e-11 3.824639551e-11 -6.7076660874e-11 6.1930647878e-11 3.824639551e-11 6.1502956098e-11 6.7382123118e-11 6.19434354e-11 6.5654931704e-11 6.7272283258e-11 6.1346733694e-11 -0.078820105992 0.078820105992 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 4.5945734426e-11 4.5682328594e-11 -4.5980354782e-11 4.265480241e-11 4.2692459228e-11 4.5510195019e-11 4.5818953833e-11 4.6037924779e-11 4.2443564075e-11 4.526158524e-11 4.6067563612e-11 -4.6286819933e-11 4.5698407211e-11 4.5434716005e-11 4.6227967371e-11 4.2902129625e-11 4.3129949226e-11 4.3129949226e-11 4.2692173854e-11 4.5510480394e-11 -4.5511475807e-11 4.5434716005e-11 4.6227967371e-11 4.2902129625e-11 4.3143733662e-11 4.3143733662e-11 4.3392343441e-11 4.3392628815e-11 4.2443564075e-11 -4.526158524e-11 4.5758803021e-11 4.5682328594e-11 4.6007252237e-11 4.320455143e-11 4.2140712026e-11 4.2123795373e-11 4.3050976497e-11 4.6161019596e-11 -4.5681268843e-11 0.0016681523782 0.15544527418 0.15544527418 0.0016681523784 4.5658052857e-11 4.5807243843e-11 4.2679098876e-11 4.3389952853e-11 -4.339503343e-11 4.2443564075e-11 4.526158524e-11 4.5758803021e-11 4.5682328594e-11 4.5980354782e-11 4.265480241e-11 4.3392765858e-11 4.3392206524e-11 -4.2314507341e-11 4.5070673968e-11 4.5926531835e-11 4.6347728572e-11 4.577528913e-11 4.5434716005e-11 4.6227967371e-11 4.2902129625e-11 4.2975865361e-11 -4.4301250397e-11 4.5785912825e-11 4.6004883771e-11 4.6324174827e-11 4.5834867221e-11 4.5096068071e-11 4.2330515369e-11 4.2208376092e-11 0.001679835934 -0.15589007363 0.15589007363 0.001679835934 4.2208513008e-11 4.2866401779e-11 4.2866401779e-11 4.2208935425e-11 4.2208935425e-11 4.2821710625e-11 -0.0016798359346 0.15596009068 0.15596066143 0.0016798359346 4.2816771277e-11 0.15441321118 0.15441292581 0.001679835934 4.2208935425e-11 -4.3180917444e-11 4.3180632069e-11 4.1963998799e-11 0.0016798359337 4.8441944647e-12 4.8465915174e-12 6.2512968113e-12 6.2512968113e-12 1.2064544839e-11 -1.2062385593e-11 1.2064544839e-11 1.2062385593e-11 4.8441944647e-12 4.8465915174e-12 6.2512968113e-12 6.2512968113e-12 1.2062385593e-11 1.2064544839e-11 -1.2062385593e-11 1.2064544839e-11 4.8441944647e-12 4.8465915174e-12 6.2512968113e-12 6.2512968113e-12 1.2064544839e-11 1.2062385593e-11 1.2062385593e-11 -1.2064544839e-11 4.8185391101e-12 4.8231964313e-12 6.2512969375e-12 6.2512969375e-12 1.2047024482e-11 1.2047024482e-11 1.204284512e-11 1.204284512e-11 -4.7830146964e-12 4.8250615387e-12 6.2513108389e-12 6.2513108389e-12 1.2051151622e-11 1.2013514422e-11 1.2013514422e-11 1.2051151622e-11 4.8441944647e-12 -4.8465915174e-12 6.2512968113e-12 6.2512968113e-12 1.2064544839e-11 1.2062385593e-11 1.2064544839e-11 1.2062385593e-11 0.30488845679 0.30488151253 -0.30131283743 0.30131283743 0.28432680891 0.28432464967 0.28432464967 0.28432680891 4.8441944647e-12 4.8465915174e-12 6.2512968113e-12 -6.2512968113e-12 1.2062385593e-11 1.2062385593e-11 1.2064544839e-11 1.2064544839e-11 4.7830146964e-12 4.8250615387e-12 6.2513108389e-12 6.2513108389e-12 -1.2013514422e-11 1.2051151622e-11 1.2013514422e-11 1.2051151622e-11 4.8441944647e-12 4.8465915174e-12 6.2512968113e-12 6.2512968113e-12 1.2062385593e-11 -1.2064544839e-11 1.2062385593e-11 1.2064544839e-11 4.8441944647e-12 4.8465915174e-12 6.2512968113e-12 6.2512968113e-12 1.2062385593e-11 1.2064544839e-11 -1.2064544839e-11 1.2062385593e-11 4.7830146964e-12 4.8250615387e-12 6.2513108389e-12 6.2513108389e-12 1.2051151622e-11 1.2013514422e-11 1.2013514422e-11 -1.2051151622e-11 1e-10 9.2867629211e-11 9.2814347538e-11 1e-10 9.3377100859e-11 9.9287773231e-11 1e-10 1e-10 -9.3404403274e-11 9.8331590945e-11 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -9.8670017162e-11 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 9.217940437e-11 9.270554169e-11 -9.4648137551e-11 9.4044570809e-11 9.4641952685e-11 9.4648137551e-11 9.4641952685e-11 9.4648137551e-11 9.3071951249e-11 9.2957800169e-11 9.2957800169e-11 -9.2957800169e-11 9.3193508865e-11 9.3087958516e-11 9.3077012005e-11 9.3087958516e-11 9.2952228324e-11 9.2975211636e-11 9.2952228324e-11 9.3054053404e-11 -9.3054053404e-11 9.3054053404e-11 9.3299168187e-11 9.3299168187e-11 9.33247089e-11 9.3299168187e-11 9.3404552102e-11 9.3570872883e-11 9.3565553176e-11 -9.3404552102e-11 1e-10 1e-10 9.270554169e-11 9.270554169e-11 9.270554169e-11 9.270554169e-11 0.0099065169443 1e-10 -9.3185953518e-11 1e-10 9.92977987e-11 1e-10 9.8315299467e-11 9.8315299467e-11 9.8315299467e-11 9.8302511945e-11 9.8302511945e-11 -9.811477509e-11 1e-10 1e-10 9.8913101011e-11 9.9083304331e-11 9.8913101011e-11 9.9263591667e-11 9.9263591667e-11 9.9263591667e-11 -9.9262909683e-11 9.9100024374e-11 9.9100024374e-11 9.9100024374e-11 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 9.3042240369e-11 9.372366342e-11 9.303165081e-11 9.3042240369e-11 9.303165081e-11 9.3042240369e-11 1e-10 -9.8674965222e-11 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 9.1681777641e-11 -9.1793513316e-11 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 9.3273187909e-11 1e-10 1e-10 1e-10 9.2111274663e-11 9.2546250671e-11 9.2086504218e-11 9.202338415e-11 -9.202338415e-11 9.2086504218e-11 9.202338415e-11 9.2598915104e-11 9.2600082829e-11 9.2600082829e-11 9.2600082829e-11 1e-10 1e-10 -9.1060894522e-11 9.1558130251e-11 9.1558130251e-11 9.1060894522e-11 9.1558130251e-11 9.1060894522e-11 9.1060894522e-11 9.1558130251e-11 9.1060894522e-11 -9.1366200872e-11 9.1558130251e-11 9.1163616201e-11 9.0173779068e-11 1e-10 9.1046828007e-11 9.101104431e-11 1e-10 9.9120182453e-11 -9.9120182453e-11 9.9120182453e-11 9.9109592893e-11 9.9109592893e-11 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 9.890378748e-11 9.890378748e-11 9.890378748e-11 1e-10 1e-10 -1e-10 1e-10 1e-10 1e-10 1e-10 9.8928239856e-11 1e-10 1e-10 1e-10 -1e-10 1e-10 1e-10 7.8947760981e-11 0.015063761985 7.9057924372e-11 7.9057924372e-11 7.8947760981e-11 7.8947760981e-11 -7.8947760981e-11 7.8947760981e-11 7.9057924372e-11 7.9057924372e-11 7.9057924372e-11 0.015063761985 7.8784854911e-11 7.852693255e-11 7.8520308899e-11 -7.8459344054e-11 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 -1e-10 1e-10 8.9143591703e-11 1e-10 1e-10 9.7916657502e-11 9.8151364348e-11 1e-10 1e-10 -1e-10 0.010317867763 9.2416150184e-11 8.9883951164e-11 8.9883951164e-11 0.015248247911 7.8500753751e-11 7.8500753751e-11 0.015248247911 -9.2375312142e-11 9.2370641487e-11 8.988395129e-11 0.013967586461 0.015686333423 7.848539264e-11 0.015685990974 7.8483233395e-11 9.2493920947e-11 -0.010336667595 8.9883937263e-11 8.9883937263e-11 7.8534263812e-11 0.015253162125 7.8534263812e-11 0.015253162125 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 8.4716757868e-10 7.8215805448e-10 4.8381717086e-10 8.4400408432e-10 4.8382108094e-10 +8.4400408432e-10 8.471681938e-10 7.8215805448e-10 4.8313432592e-10 8.4464926087e-10 7.8201749699e-10 4.8316661058e-10 4.831473985e-10 8.4464864574e-10 +7.7580084741e-10 4.8255127406e-10 4.8125827641e-10 8.4505524489e-10 1.0481161512 1.0482128761 8.4231647966e-10 4.8186761393e-10 4.8313329425e-10 +8.4464864574e-10 7.8201749699e-10 4.8315980185e-10 7.7729656559e-10 8.4842220533e-10 7.8215805448e-10 8.2802327753e-10 8.4720011459e-10 7.7547298288e-10 +1.0488653195 1.0487684675 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 5.7185325536e-10 5.689553364e-10 +5.7116530308e-10 5.2528350067e-10 5.26484711e-10 5.665761336e-10 5.6959801807e-10 5.7208767034e-10 5.2269313587e-10 5.6278605304e-10 5.733972268e-10 +5.7588837363e-10 5.6807608276e-10 5.6517666924e-10 5.7494209009e-10 5.2905879313e-10 5.3034612511e-10 5.3034612511e-10 5.2648321644e-10 5.6657762816e-10 +5.6599243703e-10 5.6516102661e-10 5.7494209009e-10 5.2905879313e-10 5.3052951883e-10 5.3052951883e-10 5.3432812923e-10 5.3432962379e-10 5.2269313587e-10 +5.6278605304e-10 5.6976960963e-10 5.6893969377e-10 5.7162958871e-10 5.3161835908e-10 5.1892503775e-10 5.1865517829e-10 5.3047889165e-10 5.7409304434e-10 +5.6768541208e-10 0.03592561341 2.0543565632 2.0543565632 0.035974012302 5.684285933e-10 5.6903216113e-10 5.2517725778e-10 5.3431561543e-10 +5.3434222315e-10 5.2269313587e-10 5.6278605304e-10 5.6976960963e-10 5.6893969377e-10 5.7116530308e-10 5.2528350067e-10 5.3433034157e-10 5.3432741223e-10 +5.2137744506e-10 5.6085186381e-10 5.7211203139e-10 5.7661517347e-10 5.6893245106e-10 5.6518261627e-10 5.7494209009e-10 5.2905879313e-10 5.2946648566e-10 +5.532879507e-10 5.6916133625e-10 5.7165098852e-10 5.7634920704e-10 5.7105740924e-10 5.6111457029e-10 5.2152799612e-10 5.2067472634e-10 0.036472821067 +2.0605517141 2.0605517141 0.036472821067 5.2067544335e-10 5.2732382806e-10 5.2732382806e-10 5.2067912542e-10 5.2068218596e-10 5.267845259e-10 +0.036203239583 2.0612596581 2.0612704631 0.036204525735 5.2672522327e-10 2.0399083155 2.0399022609 0.036485740219 5.2070782415e-10 +5.3189101933e-10 5.3188952477e-10 5.1695243607e-10 0.036485740215 6.3345835966e-11 6.334332182e-11 7.7629567389e-11 7.7603406454e-11 1.1190379454e-10 +1.1809160689e-10 1.1812450752e-10 1.1807042052e-10 6.3305292876e-11 6.334332182e-11 7.7629567389e-11 7.7572012753e-11 1.1807796717e-10 1.1187926179e-10 +1.1186634883e-10 1.1812450752e-10 6.3305778739e-11 6.3351715163e-11 7.7617895007e-11 7.7655945123e-11 1.1812450752e-10 1.1803233918e-10 1.1180874433e-10 +1.1811929795e-10 6.3094842168e-11 6.3134821673e-11 7.757005007e-11 7.7485926677e-11 1.1180461501e-10 0.0060462184246 1.1180393298e-10 1.1177940022e-10 +6.270588177e-11 6.3189539437e-11 7.7511825341e-11 7.7459820578e-11 0.0060251921651 1.1156460824e-10 1.1786141881e-10 1.1185063757e-10 6.3331306865e-11 +6.3351715163e-11 7.7603406454e-11 7.7617895007e-11 1.1809088014e-10 1.1186634883e-10 1.1812450752e-10 1.1186634883e-10 3.9986914264 3.998567012 +3.9396115699 3.939544184 3.6905814468 3.6905314343 3.6905314343 3.6905814468 6.3343178467e-11 6.3310328939e-11 7.7572012753e-11 +7.7656136146e-11 1.1189088158e-10 1.1186634883e-10 1.1187926179e-10 0.0060462184246 6.267050792e-11 6.3171388239e-11 7.7500148322e-11 7.7427701949e-11 +1.1154271106e-10 1.1810502025e-10 1.1159767999e-10 0.0060251921651 6.3305292876e-11 6.3351715163e-11 7.765983489e-11 7.7617895007e-11 1.1189088158e-10 +1.1810451986e-10 1.1807042052e-10 1.1812450752e-10 6.3305292876e-11 6.337438371e-11 7.7629567389e-11 7.7644200787e-11 1.1807796717e-10 1.1185472904e-10 +1.1807643726e-10 1.1186634883e-10 6.2720994238e-11 6.3167173993e-11 7.7485256584e-11 7.7510002667e-11 1.117711359e-10 1.1767782093e-10 1.178474708e-10 +1.1801093858e-10 1.2566370614e-09 1.1602463981e-09 1.1598188478e-09 1.2566370614e-09 1.1669151744e-09 1.2428700809e-09 1.254434907e-09 1.2566370614e-09 +1.1671616109e-09 1.229236456e-09 1.254285331e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2344529906e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.134315796e-09 1.1331986023e-09 +1.1804361139e-09 1.1731170817e-09 1.1803350608e-09 1.1804361139e-09 1.1803350608e-09 1.1804361139e-09 1.164216643e-09 1.1619550642e-09 1.1619353031e-09 +1.1619353031e-09 1.1658939881e-09 1.1642018781e-09 1.16422203e-09 1.1642018781e-09 1.1618459195e-09 1.1619792766e-09 1.1618459195e-09 1.1633797929e-09 +1.1633797929e-09 1.1633797929e-09 1.1665314141e-09 1.1665314141e-09 1.1666241338e-09 1.1665314141e-09 1.1679360497e-09 1.1701299857e-09 1.1700658939e-09 +1.1679360497e-09 1.2566370614e-09 1.2566370614e-09 1.1331986023e-09 1.1331986023e-09 1.1331986023e-09 1.1331986023e-09 0.16909850573 1.253710085e-09 +1.1634417977e-09 1.2566370614e-09 1.2431959689e-09 1.2544364725e-09 1.2290906066e-09 1.2290906066e-09 1.2290906066e-09 1.2289060198e-09 1.2289060198e-09 +1.2262793764e-09 1.2547562022e-09 1.2545299798e-09 1.2377160459e-09 1.2400807335e-09 1.2377160459e-09 1.2433910689e-09 1.2433910689e-09 1.2433910689e-09 +1.2433879949e-09 1.2408415092e-09 1.2408415092e-09 1.2408415092e-09 1.2566370614e-09 1.2494906731e-09 1.2495374378e-09 1.2566370614e-09 1.2540093334e-09 +1.2540093334e-09 1.2540093334e-09 1.1604647443e-09 1.1693367274e-09 1.1603216301e-09 1.1604647443e-09 1.1603216301e-09 1.1604647443e-09 1.2493531826e-09 +1.2331514479e-09 1.2566370614e-09 1.2528557442e-09 1.2531072846e-09 1.2530178067e-09 1.2531072846e-09 1.2531072846e-09 1.2530473389e-09 1.2530530861e-09 +1.2528557442e-09 1.2566370614e-09 1.2546020598e-09 1.2527557869e-09 1.2546020598e-09 1.2527557869e-09 1.2546020598e-09 1.2527557869e-09 1.1272619555e-09 +1.1285085131e-09 1.2539837835e-09 1.2539837835e-09 1.253881029e-09 1.2533314864e-09 1.2533484245e-09 1.253469568e-09 1.2530479488e-09 1.2530479488e-09 +1.2535376766e-09 1.2533314864e-09 1.2530479488e-09 1.2548364673e-09 1.2548364673e-09 1.2548364673e-09 1.2548126687e-09 1.2549804788e-09 1.2549804788e-09 +1.2551174033e-09 1.2566370614e-09 1.2551037023e-09 1.2551048859e-09 1.2551048859e-09 1.2551048859e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.1500516547e-09 1.2533267637e-09 1.2533267637e-09 1.2533006022e-09 1.1464931976e-09 1.1517937409e-09 1.146028026e-09 1.1452059e-09 +1.1452059e-09 1.146028026e-09 1.1451753783e-09 1.1524816617e-09 1.1524037814e-09 1.1524037814e-09 1.1524037814e-09 1.2566370614e-09 1.2566370614e-09 +1.1181030876e-09 1.1248733525e-09 1.1248733525e-09 1.1181030876e-09 1.1248733525e-09 1.1181030876e-09 1.1181030876e-09 1.1248733525e-09 1.1181030876e-09 +0.010046659649 1.1248733525e-09 0.010093190654 1.0966978034e-09 1.2566370614e-09 1.1198529497e-09 1.1192721261e-09 1.2566370614e-09 1.2393374235e-09 +1.2393374235e-09 1.2393374235e-09 1.2391515951e-09 1.2391515951e-09 1.2566370614e-09 1.236796031e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2376751169e-09 1.2376751169e-09 1.2376751169e-09 1.2414628283e-09 1.2412770412e-09 +1.2412770412e-09 1.2412770412e-09 1.2412770412e-09 1.2412770412e-09 1.2566370614e-09 1.2379685245e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 9.7218056615e-10 0.24166743962 9.7381011738e-10 9.7381011738e-10 9.7218056615e-10 9.7218056615e-10 +9.7218056615e-10 9.7218056615e-10 9.7381011738e-10 9.7381011738e-10 9.7381011738e-10 0.24161160241 9.7056866454e-10 9.6621571174e-10 9.6682937739e-10 +9.6608203921e-10 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 1.2566370614e-09 1.110092386e-09 1.2566370614e-09 1.2566370614e-09 1.2206919217e-09 1.223622451e-09 1.2566370614e-09 1.2566370614e-09 +1.2566370614e-09 0.17573262471 1.1283745104e-09 0.010811328936 0.010811328936 0.24531269952 9.661509736e-10 9.661509736e-10 0.24531269952 +0.0099574681673 0.0099589614476 1.0927376159e-09 0.23413995888 0.25317400408 9.6593243609e-10 0.253166213 9.6589727574e-10 1.1294350569e-09 +0.17600981456 0.010856748886 0.010856748886 9.6667771851e-10 0.24544689858 9.6667771851e-10 0.24544689858 diff --git a/tests/input/validation_tests/SN_solver/linesource_SN.cfg b/tests/input/validation_tests/SN_solver/linesource_SN.cfg index 34e079cb..0d2850a6 100644 --- a/tests/input/validation_tests/SN_solver/linesource_SN.cfg +++ b/tests/input/validation_tests/SN_solver/linesource_SN.cfg @@ -6,7 +6,7 @@ % % ---- File specifications ---- OUTPUT_DIR = ../../../result -OUTPUT_FILE = rtsn_test_linesource_SN +OUTPUT_FILE = linesource_SN LOG_DIR = ../../../result/logs MESH_FILE = ../../mesh_files/linesource.su2 % diff --git a/tests/input/validation_tests/SN_solver/linesource_SN_reference.vtk b/tests/input/validation_tests/SN_solver/linesource_SN_reference.vtk index 1720ae78..d2562891 100644 --- a/tests/input/validation_tests/SN_solver/linesource_SN_reference.vtk +++ b/tests/input/validation_tests/SN_solver/linesource_SN_reference.vtk @@ -172,24 +172,24 @@ CELL_TYPES 96 CELL_DATA 96 FIELD FieldData 1 radiation%20flux%20density 1 96 double -3.5871354167e-25 3.6859094624e-25 8.8320204494e-25 7.7787910048e-25 0.071466975029 1.5515437272e-19 3.402372749e-20 0.063255213965 1.0913773958e-18 -1.123062978e-18 0.091527813667 0.069469946529 0.089331699384 0.061053733683 7.144932172e-40 5.6435755095e-10 2.5420436305e-48 6.1488092089e-38 -3.641863894e-47 9.4235419472e-48 1.5183044136e-49 3.1083364021e-21 4.7515354105e-38 8.8569952594e-41 1.3521779703e-20 3.9924736456e-10 3.6296022351e-58 -6.6739082868e-63 2.575286603e-48 2.5327327527e-58 4.3805949783e-63 1.5300683111e-18 3.6238035512e-20 1.6850133101e-39 7.2093650332e-38 9.7543630571e-40 -1.915020051e-20 1.2929886847e-18 3.3209808689e-47 8.1049351259e-38 9.6701796529e-48 1.722212318e-49 5.7458765061e-10 2.6328379678e-09 0.088749071879 -0.087962909012 3.8023429893e-63 2.3326595524e-63 1.4362606377e-59 1.4462843141e-59 5.7571690825e-21 2.986584599e-20 1.5379399095e-38 6.13863787e-40 -1.0117277203e-39 1.555092646e-38 5.2170617408e-104 2.390050697e-103 2.526562115e-103 5.1697320939e-104 4.7352363541e-104 3.1373410023e-103 3.3037109571e-103 -4.6933402585e-104 7.3539642868e-19 7.1136280174e-19 0.016748569967 0.01745117874 1.1156510671e-19 1.8974964477e-20 0.032749199809 0.027899004116 -0.014279291332 0.017797842892 1.2325500616e-68 8.7271744678e-69 1.0768514923e-69 1.1662248527e-69 1.0500979395e-69 9.4053734556e-69 1.3310462407e-68 -9.6977667625e-70 4.7471357802e-09 5.2721507346e-10 3.3089986657e-09 4.9410087194e-09 3.3790207953e-49 2.236982031e-50 3.8579533289e-49 2.0877782043e-50 -9.4003824098e-09 5.0836262312e-09 0.028004133799 0.020677090286 1.1891242505e-09 6.6906992142e-09 +5.2299740662e-24 5.3739847147e-24 1.2876915013e-23 1.1341326851e-23 0.91042977226 2.2621186235e-18 4.9605718503e-19 0.82604315306 1.5912066839e-17 +1.6374035825e-17 1.0131078624 0.90246740872 0.99001569041 0.80091882348 1.0417172931e-38 8.228223952e-09 3.7062504529e-47 8.9648449152e-37 +5.3097671277e-46 1.3739341918e-46 2.2136584726e-48 4.5318943624e-20 6.927646739e-37 1.2913327803e-39 1.971449331e-19 5.8209493651e-09 5.2918898662e-57 +9.730429216e-62 3.7547180639e-47 3.6926753731e-57 6.3868227624e-62 2.2308100077e-17 5.2834354972e-19 2.4567168182e-38 1.0511114796e-36 1.4221672697e-38 +2.7920621999e-19 1.8851524972e-17 4.8419258827e-46 1.181683867e-36 1.4098934923e-46 2.5109522538e-48 8.3773768268e-09 3.8386268408e-08 0.98504244154 +0.99114860472 5.5437425452e-62 3.4009725163e-62 2.094040234e-58 2.1086545604e-58 8.3938411849e-20 4.354382588e-19 2.2422866459e-37 8.9500152998e-39 +1.4750794505e-38 2.267295004e-37 7.6063751257e-103 3.4846476952e-102 3.6836787027e-102 7.5373694159e-103 6.9038830299e-103 4.5741825085e-102 4.8167466853e-102 +6.8427993328e-103 1.0721937712e-17 1.0371532079e-17 0.24419090799 0.25443480891 1.6265976804e-18 2.7665131253e-19 0.47747697006 0.40676206476 +0.20818930303 0.25948909188 1.7970341537e-67 1.27240516e-67 1.5700286506e-68 1.7003332817e-68 1.531022488e-68 1.3712852608e-67 1.9406396779e-67 +1.4139156395e-68 6.9212321629e-08 7.6866938132e-09 4.8244560614e-08 7.2038951583e-08 4.9265469729e-48 3.2614765403e-49 5.6248213449e-48 3.0439402464e-49 +1.3705575759e-07 7.4118287325e-08 0.4082948249 0.30146797487 1.7337201608e-08 9.7549100633e-08 POINT_DATA 61 FIELD FieldData 1 radiation%20flux%20density 1 61 double -4.9761490475e-104 2.7636958496e-103 2.9151365361e-103 4.9315361762e-104 0.089392873485 2.2246364456e-63 2.3816440659e-40 5.6167110509e-40 3.372425743e-40 -7.775560932e-64 1.2098674117e-58 2.0496030707e-38 2.7016450443e-38 5.126466377e-39 1.2674517716e-63 8.4424425094e-59 1.5838451372e-38 2.4031216784e-38 -5.1836421563e-39 4.7875354593e-60 1.4601986494e-63 2.9523317589e-41 3.2514543534e-40 2.0462126238e-40 4.8209477142e-60 7.9118929698e-10 8.786917892e-11 -2.6096780034e-19 9.5764608439e-11 4.3880632819e-10 2.2536913823e-21 2.6206095184e-19 5.1811585261e-22 9.405959183e-11 0.0027914286201 0.015346932687 -0.0023798828317 6.6541227433e-11 0.0029085309717 0.01689724732 5.5149977795e-10 0.01919446658 0.0029663091541 8.235014536e-10 0.022036719721 -4.9777881986e-21 9.5965782694e-22 7.5712943655e-21 3.810283402e-20 0.049916280233 0.053108694172 0.051576717325 0.048432745355 6.7580415906e-50 -4.473964062e-51 7.7159066578e-50 4.1755564085e-51 0.0065498428301 0.0055798025017 0.0041354184005 0.0056008290475 +7.2551290778e-103 4.0294151019e-102 4.250212694e-102 7.1900843743e-103 0.99482864976 3.2434769157e-62 3.4723909896e-39 8.1890560855e-39 4.9169315141e-39 +1.1336617468e-62 1.7639632888e-57 2.98828164e-37 3.9389462269e-37 7.4742888374e-38 1.8479201719e-62 1.2308917911e-57 2.3092155801e-37 3.5037049331e-37 +7.5576500178e-38 6.9801341139e-59 2.1289413921e-62 4.3044426095e-40 4.7405575673e-39 2.983338434e-39 7.0288485353e-59 1.1535386942e-08 1.2811156357e-09 +3.8048594132e-18 1.3962294712e-09 6.3977114045e-09 3.2858384514e-20 3.8207972545e-18 7.554028933e-21 1.3713706588e-09 0.040698488925 0.20888317518 +0.034698230921 9.7015822762e-10 0.042405818713 0.23032432506 8.0407601073e-09 0.26145310867 0.04324821122 1.2006491936e-08 0.29936695141 +7.2575189285e-20 1.3991625529e-20 1.1038769593e-19 5.5553164769e-19 0.61350410291 0.64971624055 0.62890374421 0.59339788169 9.8530939458e-49 +6.5229530807e-50 1.124964269e-48 6.0878804929e-50 0.095495435831 0.081352437424 0.060293599978 0.081658998331 diff --git a/tests/input/validation_tests/output/validate_logger_csv_reference b/tests/input/validation_tests/output/validate_logger_csv_reference index c0e2848c..83464ca2 100644 --- a/tests/input/validation_tests/output/validate_logger_csv_reference +++ b/tests/input/validation_tests/output/validate_logger_csv_reference @@ -1,3 +1,4 @@ -2022-02-17 12:51:48.163176 ,Iter,Mass,RMS_flux,VTK_out,CSV_out -2022-02-17 12:51:48.168293 ,0.000000,0.011500,0.328352,0.000000,1.000000 -2022-02-17 12:51:48.170259 ,1.000000,0.011500,0.151072,1.000000,1.000000 +2024-04-08 09:19:48.003397 ,Iter,Mass,RMS_flux,VTK_out,CSV_out +2024-04-08 09:19:48.006116 ,0.000000,1.445122E-01,4.036831E+00,0.000000E+00,1.000000E+00 +2024-04-08 09:19:48.008803 ,1.000000,1.445122E-01,2.060778E+00,0.000000E+00,1.000000E+00 +2024-04-08 09:19:48.011360 ,2.000000,1.445122E-01,9.482228E-01,1.000000E+00,1.000000E+00 diff --git a/tests/input/validation_tests/output/validate_logger_reference b/tests/input/validation_tests/output/validate_logger_reference index 57c3f103..fc643f99 100644 --- a/tests/input/validation_tests/output/validate_logger_reference +++ b/tests/input/validation_tests/output/validate_logger_reference @@ -1,11 +1,21 @@ -2022-02-17 12:51:48.155800 | | Importing mesh. This may take a while for large meshes. -2022-02-17 12:51:48.163151 | ---------------------------- Solver Starts ----------------------------- -2022-02-17 12:51:48.163162 | | The simulation will run for 2 iterations. -2022-02-17 12:51:48.163166 | | The spatial grid contains 96 cells. -2022-02-17 12:51:48.163169 | -------------------------------------------------------------- -2022-02-17 12:51:48.163171 | | Iter | Mass | RMS flux | VTK out | CSV out | -2022-02-17 12:51:48.163173 | -------------------------------------------------------------- -2022-02-17 12:51:48.168285 | | 0 | 0.0114999 | 0.328352 | no | yes | -2022-02-17 12:51:48.170251 | | 1 | 0.0114999 | 0.151072 | yes | yes | -2022-02-17 12:51:48.171081 | -------------------------------------------------------------- -2022-02-17 12:51:48.171086 | --------------------------- Solver Finished ---------------------------- +2024-04-08 09:19:47.996656 | | Compute cell areas... +2024-04-08 09:19:47.997087 | | Compute cell midpoints... +2024-04-08 09:19:47.997145 | | Compute mesh connectivity... +2024-09-10 13:35:36.114942 | | ...map edges to cells... +2024-09-10 13:35:36.115192 | | ...determine neighbors of cells... +2024-04-08 09:19:48.000973 | | Compute boundary... +2024-09-10 13:35:36.141905 | | Mesh created. +2024-09-10 13:35:36.142396 | | Smallest characteristic length of a grid cell in this mesh: 0.104859 +2024-04-08 09:19:48.001495 | | Corresponding maximal time-step: 0.073401 +2024-04-08 09:19:48.003357 | ---------------------------- Solver Starts ----------------------------- +2024-04-08 09:19:48.003368 | | The simulation will run for 2 iterations. +2024-04-08 09:19:48.003374 | | The spatial grid contains 96 cells. +2024-04-08 09:19:48.003380 | | The velocity grid contains 86 points. +2024-04-08 09:19:48.003384 | --------------------------------------------------------------------------------------- +2024-04-08 09:19:48.003388 | | Iter | Mass | RMS flux | VTK out | CSV out | +2024-04-08 09:19:48.003392 | --------------------------------------------------------------------------------------- +2024-04-08 09:19:48.006008 | | 0 | 1.445122E-01 | 4.036831E00 | no | yes | +2024-04-08 09:19:48.008673 | | 1 | 1.445122E-01 | 2.060778E00 | no | yes | +2024-04-08 09:19:48.011253 | | 2 | 1.445122E-01 | 9.482228E-01 | yes | yes | +2024-04-08 09:19:48.012887 | -------------------------------------------------------------- +2024-04-08 09:19:48.012894 | --------------------------- Solver Finished ---------------------------- diff --git a/tests/test_cases.cpp b/tests/test_cases.cpp index 7822e268..37329c85 100644 --- a/tests/test_cases.cpp +++ b/tests/test_cases.cpp @@ -31,26 +31,29 @@ std::vector readVTKFile( std::string filename ) { return data; } - TEST_CASE( "SN_SOLVER", "[validation_tests]" ) { std::string sn_fileDir = "input/validation_tests/SN_solver/"; SECTION( "checkerboard" ) { std::string config_file_name = std::string( TESTS_PATH ) + sn_fileDir + "checkerboard_SN.cfg"; - Config* config = new Config( config_file_name ); - SolverBase* solver = SolverBase::Create( config ); + Config* config = new Config( config_file_name ); + // config->SetForcedConnectivity( true ); + SolverBase* solver = SolverBase::Create( config ); solver->Solve(); solver->PrintVolumeOutput(); - auto test = readVTKFile( std::string( TESTS_PATH ) + "result/rtsn_test_checkerboard_SN.vtk" ); + auto test = readVTKFile( std::string( TESTS_PATH ) + "result/checkerboard_SN.vtk" ); auto reference = readVTKFile( std::string( TESTS_PATH ) + sn_fileDir + "checkerboard_SN_reference.vtk" ); double eps = 1e-3; REQUIRE( test.size() == reference.size() ); bool errorWithinBounds = true; for( unsigned i = 0; i < test.size(); ++i ) { - if( std::fabs( test[i] - reference[i] ) > eps ) errorWithinBounds = false; + if( std::fabs( test[i] - reference[i] ) > eps ) { + errorWithinBounds = false; + // std::cout << std::fabs( test[i] - reference[i] ) << "here\n"; + } } REQUIRE( errorWithinBounds ); delete solver; @@ -65,7 +68,7 @@ TEST_CASE( "SN_SOLVER", "[validation_tests]" ) { solver->Solve(); solver->PrintVolumeOutput(); - auto test = readVTKFile( std::string( TESTS_PATH ) + "result/rtsn_test_linesource_SN.vtk" ); + auto test = readVTKFile( std::string( TESTS_PATH ) + "result/linesource_SN.vtk" ); auto reference = readVTKFile( std::string( TESTS_PATH ) + sn_fileDir + "linesource_SN_reference.vtk" ); double eps = 1e-3; @@ -90,7 +93,7 @@ TEST_CASE( "PN_SOLVER", "[validation_tests]" ) { solver->Solve(); solver->PrintVolumeOutput(); - auto test = readVTKFile( std::string( TESTS_PATH ) + "result/rtsn_test_checkerboard_PN.vtk" ); + auto test = readVTKFile( std::string( TESTS_PATH ) + "result/checkerboard_PN.vtk" ); auto reference = readVTKFile( std::string( TESTS_PATH ) + pn_fileDir + "checkerboard_PN_reference.vtk" ); double eps = 1e-3; @@ -112,7 +115,7 @@ TEST_CASE( "PN_SOLVER", "[validation_tests]" ) { solver->Solve(); solver->PrintVolumeOutput(); - auto test = readVTKFile( std::string( TESTS_PATH ) + "result/rtsn_test_linesource_PN.vtk" ); + auto test = readVTKFile( std::string( TESTS_PATH ) + "result/linesource_PN.vtk" ); auto reference = readVTKFile( std::string( TESTS_PATH ) + pn_fileDir + "linesource_PN_reference.vtk" ); double eps = 1e-3; @@ -134,12 +137,14 @@ TEST_CASE( "MN_SOLVER", "[validation_tests]" ) { SECTION( "checkerboard" ) { std::string config_file_name = std::string( TESTS_PATH ) + mn_fileDir + "checkerboard_MN.cfg"; - Config* config = new Config( config_file_name ); + Config* config = new Config( config_file_name ); + // config->SetForcedConnectivity( true ); + SolverBase* solver = SolverBase::Create( config ); solver->Solve(); solver->PrintVolumeOutput(); - auto test = readVTKFile( std::string( TESTS_PATH ) + "result/rtsn_test_checkerboard_MN.vtk" ); + auto test = readVTKFile( std::string( TESTS_PATH ) + "result/checkerboard_MN.vtk" ); auto reference = readVTKFile( std::string( TESTS_PATH ) + mn_fileDir + "checkerboard_MN_reference.vtk" ); double eps = 1e-3; @@ -160,10 +165,12 @@ TEST_CASE( "MN_SOLVER", "[validation_tests]" ) { Config* config = new Config( config_file_name ); SolverBase* solver = SolverBase::Create( config ); + // config->SetForcedConnectivity( true ); + solver->Solve(); solver->PrintVolumeOutput(); - auto test = readVTKFile( std::string( TESTS_PATH ) + "result/rtsn_test_linesource_MN_Quad.vtk" ); + auto test = readVTKFile( std::string( TESTS_PATH ) + "result/linesource_MN_Quad.vtk" ); auto reference = readVTKFile( std::string( TESTS_PATH ) + mn_fileDir + "linesource_MN_Quad_reference.vtk" ); double eps = 1e-3; @@ -186,12 +193,15 @@ TEST_CASE( "MN_SOLVER", "[validation_tests]" ) { { // --- Maxwell Boltzmann Entropy --- std::string config_file_name = std::string( TESTS_PATH ) + mn_fileDir + "linesource_MN_MB.cfg"; - Config* config = new Config( config_file_name ); + Config* config = new Config( config_file_name ); + // config->SetForcedConnectivity( true ); + SolverBase* solver = SolverBase::Create( config ); + solver->Solve(); solver->PrintVolumeOutput(); - auto test = readVTKFile( std::string( TESTS_PATH ) + "result/rtsn_test_linesource_MN_MB.vtk" ); + auto test = readVTKFile( std::string( TESTS_PATH ) + "result/linesource_MN_MB.vtk" ); auto reference = readVTKFile( std::string( TESTS_PATH ) + mn_fileDir + "linesource_MN_MB_reference.vtk" ); double eps = 1e-3; @@ -214,12 +224,14 @@ TEST_CASE( "MN_SOLVER", "[validation_tests]" ) { { // --- Regularized Maxwell Boltzmann Entropy --- std::string config_file_name = std::string( TESTS_PATH ) + mn_fileDir + "linesource_MN_MB_regularized.cfg"; - Config* config = new Config( config_file_name ); + Config* config = new Config( config_file_name ); + // config->SetForcedConnectivity( true ); + SolverBase* solver = SolverBase::Create( config ); solver->Solve(); solver->PrintVolumeOutput(); - auto test = readVTKFile( std::string( TESTS_PATH ) + "result/rtsn_test_linesource_MN_MB_regularized.vtk" ); + auto test = readVTKFile( std::string( TESTS_PATH ) + "result/linesource_MN_MB_regularized.vtk" ); auto reference = readVTKFile( std::string( TESTS_PATH ) + mn_fileDir + "linesource_MN_MB_regularized_reference.vtk" ); double eps = 1e-3; @@ -245,7 +257,7 @@ TEST_CASE( "MN_SOLVER", "[validation_tests]" ) { // solver->Solve(); // solver->PrintVolumeOutput(); // - // auto test = readVTKFile( std::string( TESTS_PATH ) + "result/rtsn_test_checkerboard_MN_neural.vtk" ); + // auto test = readVTKFile( std::string( TESTS_PATH ) + "result/checkerboard_MN_neural.vtk" ); // auto reference = readVTKFile( std::string( TESTS_PATH ) + mn_fileDir + "checkerboard_MN_reference_neural.vtk" ); // // double eps = 1e-3; @@ -267,7 +279,8 @@ TEST_CASE( "CSD_PN_SOLVER", "[validation_tests]" ) { std::string config_file_name = std::string( TESTS_PATH ) + csd_sn_fileDir + "starmap_validation.cfg"; - Config* config = new Config( config_file_name ); + Config* config = new Config( config_file_name ); + config->SetForcedConnectivity( true ); SolverBase* solver = SolverBase::Create( config ); solver->Solve(); solver->PrintVolumeOutput(); @@ -286,12 +299,14 @@ TEST_CASE( "CSD_PN_SOLVER", "[validation_tests]" ) { std::string config_file_name = std::string( TESTS_PATH ) + csd_sn_fileDir + "starmap_validation_2nd_order.cfg"; - Config* config = new Config( config_file_name ); + Config* config = new Config( config_file_name ); + config->SetForcedConnectivity( true ); + SolverBase* solver = SolverBase::Create( config ); solver->Solve(); solver->PrintVolumeOutput(); auto test = readVTKFile( std::string( TESTS_PATH ) + "result/starmap_validation_2nd.vtk" ); - auto reference = readVTKFile( std::string( TESTS_PATH ) + csd_sn_fileDir + "starmap_validation_reference_2nd.vtk" ); + auto reference = readVTKFile( std::string( TESTS_PATH ) + csd_sn_fileDir + "starmap_validation_2nd_reference.vtk" ); double eps = 1e-3; REQUIRE( test.size() == reference.size() ); @@ -312,7 +327,7 @@ TEST_CASE( "CSD_MN_SOLVER", "[validation_tests]" ) { SolverBase* solver = SolverBase::Create( config ); solver->Solve(); solver->PrintVolumeOutput(); - auto test = readVTKFile( std::string( TESTS_PATH ) + "result/test_pointsource_dual_density_MN.vtk" ); + auto test = readVTKFile( std::string( TESTS_PATH ) + "result/pointsource_dual_density_MN.vtk" ); auto reference = readVTKFile( std::string( TESTS_PATH ) + csd_mn_fileDir + "point_source_dual_density_reference_MN.vtk" ); double eps = 1e-3; @@ -332,7 +347,7 @@ TEST_CASE( "CSD_MN_SOLVER", "[validation_tests]" ) { SolverBase* solver = SolverBase::Create( config ); solver->Solve(); solver->PrintVolumeOutput(); - auto test = readVTKFile( std::string( TESTS_PATH ) + "result/test_pointsource_dual_density_MN_2nd.vtk" ); + auto test = readVTKFile( std::string( TESTS_PATH ) + "result/pointsource_dual_density_MN_2nd.vtk" ); auto reference = readVTKFile( std::string( TESTS_PATH ) + csd_mn_fileDir + "point_source_dual_density_reference_2nd_MN.vtk" ); double eps = 1e-3; @@ -366,7 +381,9 @@ TEST_CASE( "screen_output", "[output]" ) { std::string historyLoggerReference = std::string( TESTS_PATH ) + out_fileDir + "validate_logger_csv_reference"; std::string historyLogger = std::string( TESTS_PATH ) + "result/logs/validate_logger_output.csv"; - Config* config = new Config( config_file_name ); + Config* config = new Config( config_file_name ); + config->SetForcedConnectivity( true ); + SolverBase* solver = SolverBase::Create( config ); solver->Solve(); diff --git a/tests/test_image_conversion.cpp b/tests/test_image_conversion.cpp index 83212c0f..a738ab7c 100644 --- a/tests/test_image_conversion.cpp +++ b/tests/test_image_conversion.cpp @@ -8,6 +8,7 @@ #include "toolboxes/interpolation.hpp" #include "toolboxes/textprocessingtoolbox.hpp" +/* DEPRECATED TEST_CASE( "convert image data to grayscale matrix", "[image I/O]" ) { std::string config_file_name = std::string( TESTS_PATH ) + "input/unit_tests/common/image_conversion.cfg"; @@ -97,3 +98,4 @@ TEST_CASE( "convert image data to grayscale matrix", "[image I/O]" ) { std::remove( testMesh.c_str() ); } +*/ \ No newline at end of file diff --git a/tests/test_mesh.cpp b/tests/test_mesh.cpp index e2ba6726..b561bfc1 100644 --- a/tests/test_mesh.cpp +++ b/tests/test_mesh.cpp @@ -5,12 +5,15 @@ #include "common/globalconstants.hpp" #include "common/io.hpp" #include "common/mesh.hpp" +#include +#include TEST_CASE( "unit mesh tests", "[mesh]" ) { std::string config_file_name = std::string( TESTS_PATH ) + "input/unit_tests/common/unit_mesh.cfg"; Config* config = new Config( config_file_name ); - Mesh* mesh = LoadSU2MeshFromFile( config ); + config->SetForcedConnectivity( true ); + Mesh* mesh = LoadSU2MeshFromFile( config ); SECTION( "sum of all cell areas is equal to total domain volume" ) { double domainArea = 1.0; @@ -33,21 +36,26 @@ TEST_CASE( "unit mesh tests", "[mesh]" ) { for( unsigned k = 0; k < neighbors[nID].size(); ++k ) { if( neighbors[nID][k] == i ) pos = k; } - if( blaze::l2Norm( n[i][j] + n[nID][pos] ) > eps ) errorWithinBounds = false; + if( blaze::l2Norm( n[i][j] + n[nID][pos] ) > eps ) { + errorWithinBounds = false; + std::cout << "neighbor coordinate error: " << blaze::l2Norm( n[i][j] + n[nID][pos] ) << "\n"; + } } } REQUIRE( errorWithinBounds ); } SECTION( "neighbor and faces are indexed consistently" ) { + auto neighbors = mesh->GetNeighbours(); auto cellMidPoints = mesh->GetCellMidPoints(); auto faceMidPoints = mesh->GetInterfaceMidPoints(); + bool isConsistent = true; - bool isConsistent = true; for( unsigned i = 0; i < mesh->GetNumCells(); ++i ) { for( unsigned j = 0; j < mesh->GetNumNodesPerCell(); ++j ) { unsigned nID = neighbors[i][j]; + if( nID == mesh->GetNumCells() ) continue; auto fx = faceMidPoints[i][j][0]; @@ -59,7 +67,6 @@ TEST_CASE( "unit mesh tests", "[mesh]" ) { if( fy > std::max( cellMidPoints[i][1], cellMidPoints[nID][1] ) ) isConsistent = false; } } - REQUIRE( isConsistent ); } @@ -72,7 +79,11 @@ TEST_CASE( "unit mesh tests", "[mesh]" ) { for( unsigned j = 0; j < mesh->GetNumNodesPerCell(); ++j ) { sum += n[i][j]; } - if( blaze::l2Norm( sum ) > eps ) errorWithinBounds = false; + if( blaze::l2Norm( sum ) > eps ) { + errorWithinBounds = false; + + std::cout << blaze::l2Norm( sum ) << "\n"; + } } REQUIRE( errorWithinBounds ); } @@ -88,6 +99,65 @@ TEST_CASE( "unit mesh tests", "[mesh]" ) { } REQUIRE( noUnassignedFaces ); } + /* + SECTION( "connectivity file is consistent with su2 file" ) { + // Connectivity + std::string connectivityFile = config->GetMeshFile(); + size_t lastDotIndex = connectivityFile.find_last_of( '.' ); + connectivityFile = connectivityFile.substr( 0, lastDotIndex ); + connectivityFile += ".con"; + + if( !std::filesystem::exists( connectivityFile ) ) { + REQUIRE( false ); // File should be written by the mesh creation + } + else { + config->SetForcedConnectivity( false ); + Mesh* mesh2 = LoadSU2MeshFromFile( config ); + + // Check cell number + REQUIRE( mesh2->GetNumCells() == mesh->GetNumCells() ); + REQUIRE( mesh2->GetNumNodes() == mesh->GetNumNodes() ); + + // Resize the outer vector to have nCells elements + bool neighborOK = true; + bool midpointsOK = true; + bool normalsOK = true; + bool boundaryOK = true; + double eps = 1e-10; + + for( unsigned i = 0; i < mesh2->GetNumCells(); ++i ) { + for( unsigned j = 0; j < mesh2->GetNumNodesPerCell(); ++j ) { + if( mesh2->GetNeighbours()[i][j] != mesh2->GetNeighbours()[i][j] ) { + neighborOK = false; + std::cout << "neighbor ID missmatch at index " << i << " " << j << "\n"; + } + if( mesh->GetInterfaceMidPoints()[i][j].size() != mesh2->GetInterfaceMidPoints()[i][j].size() ) { + std::cout << "Vector size missmatch at index " << i << " " << j << " with error \n"; + std::cout << mesh->GetInterfaceMidPoints()[i][j].size() << "\n" << mesh2->GetInterfaceMidPoints()[i][j].size() << "\n"; + } + if( blaze::l2Norm( mesh->GetInterfaceMidPoints()[i][j] - mesh2->GetInterfaceMidPoints()[i][j] ) > eps ) { + midpointsOK = false; + std::cout << "midpoint missmatch at index " << i << " " << j << " with error " + << blaze::l2Norm( mesh->GetInterfaceMidPoints()[i][j] - mesh2->GetInterfaceMidPoints()[i][j] ) << "\n"; + } + if( blaze::l2Norm( mesh->GetNormals()[i][j] - mesh2->GetNormals()[i][j] ) > eps ) { + normalsOK = false; + std::cout << "normal missmatch at index " << i << " " << j << " with error " + << blaze::l2Norm( mesh->GetInterfaceMidPoints()[i][j] - mesh2->GetInterfaceMidPoints()[i][j] ) << "\n"; + } + } + if( mesh2->GetBoundaryTypes()[i] != mesh2->GetBoundaryTypes()[i] ) { + boundaryOK = false; + std::cout << "Boundary ID missmatch at index " << i << "\n"; + } + } + REQUIRE( neighborOK ); + REQUIRE( midpointsOK ); + REQUIRE( normalsOK ); + REQUIRE( boundaryOK ); + } + } + */ } TEST_CASE( "reconstruction tests", "[mesh]" ) { diff --git a/tests/test_quadrature.cpp b/tests/test_quadrature.cpp index b99c5727..89994ca0 100644 --- a/tests/test_quadrature.cpp +++ b/tests/test_quadrature.cpp @@ -399,8 +399,7 @@ TEST_CASE( "Quadrature Tests", "[quadrature]" ) { points = Q->GetPoints(); pointsSphere = Q->GetPointsSphere(); for( unsigned idx_nq = 0; idx_nq < Q->GetNq(); idx_nq++ ) { - result = Omega_x( pointsSphere[idx_nq][0], pointsSphere[idx_nq][1] ); - double y = Omega_y( pointsSphere[idx_nq][0], pointsSphere[idx_nq][1] ); + result = Omega_x( pointsSphere[idx_nq][0], pointsSphere[idx_nq][1] ); if( !approxequal( points[idx_nq][0], result, lowAccuracyTesting ) ) { testPassed = false; diff --git a/tools/CI/docker_run_interactive_specify_cores.sh b/tools/CI/docker_run_interactive_specify_cores.sh deleted file mode 100644 index f05ed205..00000000 --- a/tools/CI/docker_run_interactive_specify_cores.sh +++ /dev/null @@ -1 +0,0 @@ -docker run -i -t --rm --cpuset-cpus=0-29 -v $(pwd)/../..:/mnt kitrt/test_ml:latest /bin/bash diff --git a/tools/cluster/CPU_run_job.sh b/tools/cluster/CPU_run_job.sh deleted file mode 100644 index 56f2e39c..00000000 --- a/tools/cluster/CPU_run_job.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -#BATCH --ntasks=24 -#SBATCH --time=24:00:00 -#SBATCH --mem=20gb -#SBATCH --partition=single -#SBATCH --job-name=EntropyTrainerCPU -#SBATCH --output=0_CPU_training_out_%j -#SBATCH --error=0_CPU_training_err_%j - -python3 trainNNMK2.py diff --git a/tools/cluster/GPU_run_job.sh b/tools/cluster/GPU_run_job.sh deleted file mode 100644 index 0215e0a7..00000000 --- a/tools/cluster/GPU_run_job.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -#SBATCH --ntasks=20 -#SBATCH --partition=gpu_4 -#SBATCH --time=24:00:00 -#SBATCH --mem=20gb -#SBATCH --gres=gpu:1 -#SBATCH --job-name=EntropyTrainer -#SBATCH --output=0_GPU_out_%j -#SBATCH --error=0_GPU_err_%j - -python3 trainNNMK2.py diff --git a/tools/docker/install_kitrt.sh b/tools/docker/install_kitrt.sh index 6b96e342..fc6f2d28 100755 --- a/tools/docker/install_kitrt.sh +++ b/tools/docker/install_kitrt.sh @@ -5,7 +5,7 @@ git submodule update --init --recursive mkdir build cd build rm -rf * -cmake -G Ninja -DCMAKE_BUILD_UNITY=True -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=False -DBUILD_ML=True ../ +cmake -G Ninja -DCMAKE_BUILD_UNITY=True -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=False -DBUILD_ML=False ../ ninja cd ../examples ../build/KiT-RT checkerboard_MN.cfg diff --git a/python/extract_grayscale_image.py b/tools/python/extract_grayscale_image.py similarity index 100% rename from python/extract_grayscale_image.py rename to tools/python/extract_grayscale_image.py diff --git a/python/linesource_Pseudo_1D.py b/tools/python/linesource_Pseudo_1D.py similarity index 100% rename from python/linesource_Pseudo_1D.py rename to tools/python/linesource_Pseudo_1D.py diff --git a/python/mesh_from_image.py b/tools/python/mesh_from_image.py similarity index 100% rename from python/mesh_from_image.py rename to tools/python/mesh_from_image.py diff --git a/tools/singularity/build_container.sh b/tools/singularity/build_container.sh new file mode 100644 index 00000000..699aef11 --- /dev/null +++ b/tools/singularity/build_container.sh @@ -0,0 +1 @@ +singularity build kit_rt.sif kit_rt.def diff --git a/tools/singularity/install_kitrt_singularity.sh b/tools/singularity/install_kitrt_singularity.sh new file mode 100755 index 00000000..6c8299d1 --- /dev/null +++ b/tools/singularity/install_kitrt_singularity.sh @@ -0,0 +1,4 @@ +cd ../../ +cd build_singularity +cmake ../ +make -j \ No newline at end of file diff --git a/tools/singularity/kit_rt.def b/tools/singularity/kit_rt.def new file mode 100644 index 00000000..4fc1dabf --- /dev/null +++ b/tools/singularity/kit_rt.def @@ -0,0 +1,70 @@ +Bootstrap: docker +From: ubuntu:20.04 + +%post + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib" + export PYTHONPATH=/usr/local/gmsh/lib:$PYTHONPATH + export PATH=/usr/local/gmsh/bin:$PATH + + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get install -qq \ + gcc \ + g++ \ + libblas-dev \ + liblapack-dev \ + git \ + make \ + ninja-build \ + cmake \ + wget \ + ssh \ + libssl-dev \ + libxt-dev \ + libgl1-mesa-dev \ + libglu1 \ + libxrender1 \ + libxcursor-dev \ + libxft-dev \ + libxinerama-dev \ + python3 \ + python3-pip \ + doxygen + + apt-get clean + apt-get autoremove --purge + rm -rf /var/lib/apt/lists/* + + cd /usr/local + wget -nc --quiet http://gmsh.info/bin/Linux/gmsh-4.7.0-Linux64-sdk.tgz + tar xzf gmsh-4.7.0-Linux64-sdk.tgz + mv gmsh-4.7.0-Linux64-sdk gmsh + rm gmsh-4.7.0-Linux64-sdk.tgz + + wget -nc --no-check-certificate --quiet https://www.vtk.org/files/release/9.1/VTK-9.1.0.tar.gz + tar xzf VTK-9.1.0.tar.gz + mkdir VTK-9.1.0/build + cd VTK-9.1.0/build + cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_DOCUMENTATION=OFF -DBUILD_TESTING=OFF ../ + ninja + ninja install > /dev/null + cd - + rm -rf VTK-* + + FILENAME=libtensorflow-gpu-linux-x86_64-2.7.0.tar.gz + wget -q --no-check-certificate https://storage.googleapis.com/tensorflow/libtensorflow/${FILENAME} + tar -C /usr/local -xzf ${FILENAME} + ldconfig /usr/local/lib + rm ${FILENAME} + + pip3 install numpy pygmsh==6.1.1 Pillow pydicom gcovr sphinx_rtd_theme breathe cpp-coveralls coveralls pandas + +%environment + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib" + export PYTHONPATH=/usr/local/gmsh/lib:$PYTHONPATH + export PATH=/usr/local/gmsh/bin:$PATH + +%post + cd /home + +%runscript + exec /bin/bash \ No newline at end of file diff --git a/tools/singularity/kit_rt_MPI.def b/tools/singularity/kit_rt_MPI.def new file mode 100644 index 00000000..376b5cb9 --- /dev/null +++ b/tools/singularity/kit_rt_MPI.def @@ -0,0 +1,72 @@ +Bootstrap: docker +From: ubuntu:20.04 + +%post + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib" + export PYTHONPATH=/usr/local/gmsh/lib:$PYTHONPATH + export PATH=/usr/local/gmsh/bin:$PATH + + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get install -qq \ + gcc \ + g++ \ + libopenmpi-dev \ + openmpi-bin \ + libblas-dev \ + liblapack-dev \ + git \ + make \ + ninja-build \ + cmake \ + wget \ + ssh \ + libssl-dev \ + libxt-dev \ + libgl1-mesa-dev \ + libglu1 \ + libxrender1 \ + libxcursor-dev \ + libxft-dev \ + libxinerama-dev \ + python3 \ + python3-pip \ + doxygen + + apt-get clean + apt-get autoremove --purge + rm -rf /var/lib/apt/lists/* + + cd /usr/local + wget -nc --quiet http://gmsh.info/bin/Linux/gmsh-4.7.0-Linux64-sdk.tgz + tar xzf gmsh-4.7.0-Linux64-sdk.tgz + mv gmsh-4.7.0-Linux64-sdk gmsh + rm gmsh-4.7.0-Linux64-sdk.tgz + + wget -nc --no-check-certificate --quiet https://www.vtk.org/files/release/9.1/VTK-9.1.0.tar.gz + tar xzf VTK-9.1.0.tar.gz + mkdir VTK-9.1.0/build + cd VTK-9.1.0/build + cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_DOCUMENTATION=OFF -DBUILD_TESTING=OFF ../ + ninja + ninja install > /dev/null + cd - + rm -rf VTK-* + + FILENAME=libtensorflow-gpu-linux-x86_64-2.7.0.tar.gz + wget -q --no-check-certificate https://storage.googleapis.com/tensorflow/libtensorflow/${FILENAME} + tar -C /usr/local -xzf ${FILENAME} + ldconfig /usr/local/lib + rm ${FILENAME} + + pip3 install numpy pygmsh==6.1.1 Pillow pydicom gcovr sphinx_rtd_theme breathe cpp-coveralls coveralls + +%environment + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib" + export PYTHONPATH=/usr/local/gmsh/lib:$PYTHONPATH + export PATH=/usr/local/gmsh/bin:$PATH + +%post + cd /home + +%runscript + exec /bin/bash \ No newline at end of file diff --git a/tools/singularity/singularity_run_interactive.sh b/tools/singularity/singularity_run_interactive.sh new file mode 100644 index 00000000..99b8b8a8 --- /dev/null +++ b/tools/singularity/singularity_run_interactive.sh @@ -0,0 +1 @@ +singularity shell --bind $(pwd)/../..:/mnt kit_rt.sif diff --git a/tools/umbridge_uq/Dockerfile b/tools/umbridge_uq/Dockerfile new file mode 100644 index 00000000..819447c6 --- /dev/null +++ b/tools/umbridge_uq/Dockerfile @@ -0,0 +1,68 @@ +FROM ubuntu:20.04 + +ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib" \ + PYTHONPATH=/usr/local/gmsh/lib:$PYTHONPATH \ + PATH=/usr/local/gmsh/bin:$PATH + +RUN apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq \ + gcc \ + g++ \ + libopenmpi-dev \ + openmpi-bin \ + libblas-dev \ + liblapack-dev \ + git \ + make \ + ninja-build \ + cmake \ + wget \ + ssh \ + libssl-dev \ + libxt-dev \ + libgl1-mesa-dev \ + libglu1 \ + libxrender1 \ + libxcursor-dev \ + libxft-dev \ + libxinerama-dev \ + python3 \ + python3-pip \ + doxygen \ + && apt-get clean \ + && apt-get autoremove --purge \ + && rm -rf /var/lib/apt/lists/* + +RUN cd /usr/local \ + && wget -nc --quiet http://gmsh.info/bin/Linux/gmsh-4.7.0-Linux64-sdk.tgz \ + && tar xzf gmsh-4.7.0-Linux64-sdk.tgz \ + && mv gmsh-4.7.0-Linux64-sdk gmsh \ + && rm gmsh-4.7.0-Linux64-sdk.tgz + +RUN wget -nc --no-check-certificate --quiet https://www.vtk.org/files/release/9.1/VTK-9.1.0.tar.gz \ + && tar xzf VTK-9.1.0.tar.gz \ + && mkdir VTK-9.1.0/build \ + && cd VTK-9.1.0/build \ + && cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_DOCUMENTATION=OFF -DBUILD_TESTING=OFF ../ \ + && ninja \ + && ninja install > /dev/null \ + && cd - \ + && rm -rf VTK-* + +RUN FILENAME=libtensorflow-gpu-linux-x86_64-2.7.0.tar.gz \ + && wget -q --no-check-certificate https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-2.7.0.tar.gz \ + && tar -C /usr/local -xzf ${FILENAME} \ + && ldconfig /usr/local/lib \ + && rm ${FILENAME} + +RUN pip3 install numpy pygmsh==6.1.1 Pillow pydicom gcovr sphinx_rtd_theme breathe cpp-coveralls coveralls + +RUN pip3 install pandas subprocess datetime + +RUN pip3 install umbridge + +COPY minimal_server.py / + +CMD python3 minimal_server.py + +WORKDIR /home \ No newline at end of file diff --git a/tools/umbridge_uq/minimal_server.py b/tools/umbridge_uq/minimal_server.py new file mode 100644 index 00000000..83264e82 --- /dev/null +++ b/tools/umbridge_uq/minimal_server.py @@ -0,0 +1,139 @@ +import subprocess +import os +import pandas as pd +import umbridge +import datetime + + +class KiTRT(umbridge.Model): + def __init__(self): + super().__init__("KiT-RT") + # self._model = GenzFunction() + + def get_input_sizes(self, config): + return [config.get("nvars", 5)] + + def get_output_sizes(self, config): + return [1] + + def __call__(self, parameters, config): + # CFG needs to be created here + quad_order_value = 20 # Replace with the desired value + self.write_lattice_script("lattice.cfg", quad_order_value) + + # KiT-RT needs to be called here + + # Step 1: Run the C++ application + cpp_application_path = "../../build/KiT-RT" + cfg_file_path = "lattice.cfg" + log_file_folder = "result/logs/" + + # Run the C++ application + subprocess.run([cpp_application_path, cfg_file_path]) + + # Step 2: Read in the logfile.csv as a DataFrame + log_file_path = os.path.join(log_file_folder, "lattice_log.csv") + + # Check if the logfile exists + if os.path.exists(log_file_path): + # Read the CSV file into a DataFrame + logfile_df = pd.read_csv(log_file_path) + + # Step 3: Identify columns with names in the 'qois' list + qois = [ + "TOTAL_OUTFLOW", + "MAX_OUTFLOW", + "CUR_PARTICLE_ABSORPTION", + ] # Add your desired column names here + + # Filter columns based on 'qois' + selected_columns_df = logfile_df[qois] + + # Display the selected columns DataFrame + print("Selected Columns DataFrame:") + print(selected_columns_df) + else: + print(f"Error: Log file not found at {log_file_path}") + + """ ============== + sample = np.asarray(parameters).T + assert sample.shape[0] == config.get("nvars", 5) + self._model.set_coefficients( + sample.shape[0], + config.get("c_factor", 1), + config.get("coef_type", "sqexp"), + config.get("w_factor", 0.5), + ) + name = config.get("name", "oscillatory") + val = self._model(name, sample)[0, 0] + """ + return [[0]] + + def supports_evaluate(self): + return True + + def write_lattice_script(filename, quad_order_value): + current_date = datetime.datetime.now().strftime("%d. %b. %Y") + + script_content = f"""\ + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % Lattice Benchmarking File SN % + % Author UM-Bridge bechmarking tool % + % Date {current_date} % + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % + % + % ----IO specification ---- + % + OUTPUT_DIR = result + OUTPUT_FILE = lattice + LOG_DIR = result/logs + LOG_FILE = lattice_log + MESH_FILE = meshes/lattice_unstructured.su2 + % + % --- Problem definition --- + % + PROBLEM = LATTICE + TIME_FINAL = 10 + SPATIAL_DIM = 3 + SOURCE_MAGNITUDE = 10.0 + % + % ---- Solver specifications ---- + % + % Solver type + SOLVER = SN_SOLVER + % CFL number + CFL_NUMBER = 0.45 + % Reconstruction order + RECONS_ORDER = 1 + % + % ---- Boundary Conditions ---- + % + BC_NEUMANN = ( void ) + % + % ----- Quadrature Specification --- + % + QUAD_TYPE = GAUSS_LEGENDRE_TENSORIZED + QUAD_ORDER = {quad_order_value} + % + % ----- Output ---- + % + VOLUME_OUTPUT = (MINIMAL) + VOLUME_OUTPUT_FREQUENCY = 1 + SCREEN_OUTPUT = (ITER, CUR_OUTFLOW) + % (ITER, MASS,RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT, CUR_OUTFLOW, TOTAL_OUTFLOW, MAX_OUTFLOW, CUR_PARTICLE_ABSORPTION, TOTAL_PARTICLE_ABSORPTION, MAX_PARTICLE_ABSORPTION ) + SCREEN_OUTPUT_FREQUENCY = 1 + HISTORY_OUTPUT = (ITER, MASS, RMS_FLUX, VTK_OUTPUT, CSV_OUTPUT, TOTAL_OUTFLOW, MAX_OUTFLOW, CUR_PARTICLE_ABSORPTION, TOTAL_PARTICLE_ABSORPTION, MAX_PARTICLE_ABSORPTION) + HISTORY_OUTPUT_FREQUENCY = 1 + """ + + with open(filename, "w") as f: + f.write(script_content) + + +print("here") +print(umbridge.supported_models("http://0.0.0.0:80")) + +models = [KiTRT()] +print("here") +umbridge.serve_models(models, 80)