From 4f368b6d072c70b1d1f0600aa7e74dc285f9f229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-No=C3=ABl=20Grad?= Date: Tue, 17 Dec 2024 21:56:32 +0100 Subject: [PATCH] wip --- .clang-tidy | 6 +- .github/workflows/push_pull.yml | 3 +- .gitlab-ci.yml | 8 +- CMakeLists.txt | 41 +- cmake/espresso_cmake_config.cmakein | 2 + .../espresso_override_clang_tidy_checks.cmake | 64 + doc/bibliography.bib | 37 + doc/sphinx/running.rst | 71 +- maintainer/CI/build_cmake.sh | 2 + maintainer/benchmarks/CMakeLists.txt | 3 +- maintainer/walberla_kernels/Readme.md | 11 +- .../code_generation_context.py | 29 +- .../custom_additional_extensions.py | 4 +- .../walberla_kernels/generate_ek_kernels.py | 58 +- .../walberla_kernels/generate_lb_kernels.py | 233 +-- maintainer/walberla_kernels/lbmpy_espresso.py | 10 +- maintainer/walberla_kernels/lees_edwards.py | 14 +- .../walberla_kernels/pystencils_espresso.py | 90 +- .../walberla_lbm_generation.py | 14 +- requirements.txt | 8 +- samples/lj_liquid_structurefactor.py | 46 +- src/config/features.def | 1 + src/core/electrostatics/actor.hpp | 4 + src/core/electrostatics/elc.cpp | 9 +- src/core/electrostatics/p3m.cpp | 5 +- src/core/field_coupling/couplings/Direct.hpp | 6 +- src/core/integrate.cpp | 1 + src/core/magnetostatics/actor.hpp | 4 + src/core/magnetostatics/dp3m.cpp | 6 +- .../reaction_methods/ReactionAlgorithm.cpp | 9 +- src/core/system/Leaf.hpp | 4 + .../EspressoSystemStandAlone_test.cpp | 5 + src/core/unit_tests/RuntimeError_test.cpp | 3 +- src/core/unit_tests/ek_interface_test.cpp | 1 + src/instrumentation/CMakeLists.txt | 17 + .../include/instrumentation/fe_trap.hpp | 147 ++ src/instrumentation/src/fe_trap.cpp | 139 ++ src/instrumentation/tests/CMakeLists.txt | 24 + src/instrumentation/tests/fe_trap_test.cpp | 178 ++ src/script_interface/ObjectHandle.cpp | 10 + .../accumulators/MeanVarianceCalculator.hpp | 24 +- .../auto_parameters/AutoParameters.hpp | 2 + src/script_interface/electrostatics/Actor.hpp | 4 +- src/script_interface/magnetostatics/Actor.hpp | 4 +- src/script_interface/walberla/EKSpecies.cpp | 1 + src/utils/include/utils/Accumulator.hpp | 17 +- src/utils/include/utils/Array.hpp | 10 + src/utils/include/utils/Vector.hpp | 8 +- .../include/utils/mpi/scatter_buffer.hpp | 2 +- .../utils/serialization/memcpy_archive.hpp | 4 +- src/walberla_bridge/CMakeLists.txt | 65 +- .../lattice_boltzmann/LBWalberlaBase.hpp | 5 +- .../src/electrokinetics/EKinWalberlaImpl.hpp | 90 +- .../AdvectiveFluxKernel_double_precision.h | 15 +- .../AdvectiveFluxKernel_single_precision.h | 15 +- .../ContinuityKernel_double_precision.h | 15 +- .../ContinuityKernel_single_precision.h | 15 +- ...FluxKernelThermalized_double_precision.cpp | 1388 ++++++++-------- ...veFluxKernelThermalized_double_precision.h | 39 +- ...FluxKernelThermalized_single_precision.cpp | 794 ++++----- ...veFluxKernelThermalized_single_precision.h | 39 +- ...ctrostaticThermalized_double_precision.cpp | 1436 ++++++++--------- ...lectrostaticThermalized_double_precision.h | 54 +- ...ctrostaticThermalized_single_precision.cpp | 842 +++++----- ...lectrostaticThermalized_single_precision.h | 54 +- ...KernelWithElectrostatic_double_precision.h | 35 +- ...KernelWithElectrostatic_single_precision.h | 35 +- .../DiffusiveFluxKernel_double_precision.h | 18 +- .../DiffusiveFluxKernel_single_precision.h | 18 +- .../Dirichlet_double_precision.h | 14 +- .../Dirichlet_single_precision.h | 14 +- .../FixedFlux_double_precision.h | 14 +- .../FixedFlux_single_precision.h | 14 +- .../FrictionCouplingKernel_double_precision.h | 20 +- .../FrictionCouplingKernel_single_precision.h | 20 +- .../ReactionKernelBulk_1_double_precision.h | 24 +- .../ReactionKernelBulk_1_single_precision.h | 24 +- .../ReactionKernelBulk_2_double_precision.h | 28 +- .../ReactionKernelBulk_2_single_precision.h | 28 +- .../ReactionKernelBulk_3_double_precision.h | 32 +- .../ReactionKernelBulk_3_single_precision.h | 32 +- .../ReactionKernelBulk_4_double_precision.h | 36 +- .../ReactionKernelBulk_4_single_precision.h | 36 +- .../ReactionKernelBulk_5_double_precision.h | 40 +- .../ReactionKernelBulk_5_single_precision.h | 40 +- .../ReactionKernelBulk_all.h | 4 +- ...ReactionKernelIndexed_1_double_precision.h | 4 +- ...ReactionKernelIndexed_1_single_precision.h | 4 +- ...ReactionKernelIndexed_2_double_precision.h | 4 +- ...ReactionKernelIndexed_2_single_precision.h | 4 +- ...ReactionKernelIndexed_3_double_precision.h | 4 +- ...ReactionKernelIndexed_3_single_precision.h | 4 +- ...ReactionKernelIndexed_4_double_precision.h | 4 +- ...ReactionKernelIndexed_4_single_precision.h | 4 +- ...ReactionKernelIndexed_5_double_precision.h | 4 +- ...ReactionKernelIndexed_5_single_precision.h | 4 +- .../ReactionKernelIndexed_all.h | 4 +- .../src/lattice_boltzmann/LBWalberlaImpl.hpp | 39 +- .../src/lattice_boltzmann/ResetForce.hpp | 4 +- .../generated_kernels/CMakeLists.txt | 13 +- .../CollideSweepDoublePrecisionLeesEdwards.h | 22 +- ...ollideSweepDoublePrecisionLeesEdwardsAVX.h | 22 +- ...llideSweepDoublePrecisionLeesEdwardsCUDA.h | 22 +- .../CollideSweepDoublePrecisionThermalized.h | 40 +- ...ollideSweepDoublePrecisionThermalizedAVX.h | 40 +- ...llideSweepDoublePrecisionThermalizedCUDA.h | 40 +- .../CollideSweepSinglePrecisionLeesEdwards.h | 22 +- ...ollideSweepSinglePrecisionLeesEdwardsAVX.h | 22 +- ...llideSweepSinglePrecisionLeesEdwardsCUDA.h | 22 +- .../CollideSweepSinglePrecisionThermalized.h | 40 +- ...ollideSweepSinglePrecisionThermalizedAVX.h | 40 +- ...llideSweepSinglePrecisionThermalizedCUDA.h | 40 +- ...sion.cpp => DynamicUBBDoublePrecision.cpp} | 24 +- ...recision.h => DynamicUBBDoublePrecision.h} | 30 +- ...DA.cu => DynamicUBBDoublePrecisionCUDA.cu} | 30 +- ...CUDA.h => DynamicUBBDoublePrecisionCUDA.h} | 30 +- ...sion.cpp => DynamicUBBSinglePrecision.cpp} | 24 +- ...recision.h => DynamicUBBSinglePrecision.h} | 30 +- ...DA.cu => DynamicUBBSinglePrecisionCUDA.cu} | 30 +- ...CUDA.h => DynamicUBBSinglePrecisionCUDA.h} | 30 +- .../FieldAccessorsDoublePrecision.h | 4 +- .../FieldAccessorsDoublePrecisionCUDA.cu | 2 +- .../FieldAccessorsDoublePrecisionCUDA.cuh | 4 +- .../FieldAccessorsSinglePrecision.h | 4 +- .../FieldAccessorsSinglePrecisionCUDA.cu | 2 +- .../FieldAccessorsSinglePrecisionCUDA.cuh | 4 +- .../InitialPDFsSetterDoublePrecision.cpp | 2 +- .../InitialPDFsSetterDoublePrecision.h | 18 +- .../InitialPDFsSetterDoublePrecisionCUDA.cu | 2 +- .../InitialPDFsSetterDoublePrecisionCUDA.h | 18 +- .../InitialPDFsSetterSinglePrecision.cpp | 2 +- .../InitialPDFsSetterSinglePrecision.h | 18 +- .../InitialPDFsSetterSinglePrecisionCUDA.cu | 2 +- .../InitialPDFsSetterSinglePrecisionCUDA.h | 18 +- .../PackInfoPdfDoublePrecision.cpp | 44 +- .../PackInfoPdfDoublePrecision.h | 30 +- .../PackInfoPdfDoublePrecisionCUDA.cu | 9 +- .../PackInfoPdfDoublePrecisionCUDA.h | 16 +- .../PackInfoPdfSinglePrecision.cpp | 44 +- .../PackInfoPdfSinglePrecision.h | 30 +- .../PackInfoPdfSinglePrecisionCUDA.cu | 9 +- .../PackInfoPdfSinglePrecisionCUDA.h | 16 +- .../PackInfoVecDoublePrecision.cpp | 10 +- .../PackInfoVecDoublePrecision.h | 30 +- .../PackInfoVecDoublePrecisionCUDA.cu | 9 +- .../PackInfoVecDoublePrecisionCUDA.h | 16 +- .../PackInfoVecSinglePrecision.cpp | 10 +- .../PackInfoVecSinglePrecision.h | 30 +- .../PackInfoVecSinglePrecisionCUDA.cu | 9 +- .../PackInfoVecSinglePrecisionCUDA.h | 16 +- .../StreamSweepDoublePrecision.cpp | 22 +- .../StreamSweepDoublePrecision.h | 22 +- .../StreamSweepDoublePrecisionAVX.cpp | 22 +- .../StreamSweepDoublePrecisionAVX.h | 22 +- .../StreamSweepDoublePrecisionCUDA.cu | 22 +- .../StreamSweepDoublePrecisionCUDA.h | 23 +- .../StreamSweepSinglePrecision.cpp | 22 +- .../StreamSweepSinglePrecision.h | 23 +- .../StreamSweepSinglePrecisionAVX.cpp | 22 +- .../StreamSweepSinglePrecisionAVX.h | 23 +- .../StreamSweepSinglePrecisionCUDA.cu | 22 +- .../StreamSweepSinglePrecisionCUDA.h | 23 +- .../src/lattice_boltzmann/lb_kernels.cuh | 8 +- .../src/lattice_boltzmann/lb_kernels.hpp | 8 +- src/walberla_bridge/src/utils/boundary.hpp | 2 +- .../src/utils/types_conversion.hpp | 41 +- src/walberla_bridge/tests/CMakeLists.txt | 9 +- .../tests/LBWalberlaImpl_bspline_tests.cpp | 12 +- .../LBWalberlaImpl_lees_edwards_tests.cpp | 1 - .../tests/lb_kernels_unit_tests.cpp | 36 +- src/walberla_bridge/tests/tests_common_ek.hpp | 4 +- src/walberla_bridge/tests/tests_common_lb.hpp | 4 +- .../constraint_homogeneous_magnetic_field.py | 35 +- testsuite/python/ibm.py | 6 +- .../python/interactions_bonded_interface.py | 4 +- 175 files changed, 5009 insertions(+), 3352 deletions(-) create mode 100644 cmake/espresso_override_clang_tidy_checks.cmake create mode 100644 src/instrumentation/include/instrumentation/fe_trap.hpp create mode 100644 src/instrumentation/src/fe_trap.cpp create mode 100644 src/instrumentation/tests/CMakeLists.txt create mode 100644 src/instrumentation/tests/fe_trap_test.cpp rename src/walberla_bridge/src/lattice_boltzmann/generated_kernels/{Dynamic_UBB_double_precision.cpp => DynamicUBBDoublePrecision.cpp} (78%) rename src/walberla_bridge/src/lattice_boltzmann/generated_kernels/{Dynamic_UBB_double_precision.h => DynamicUBBDoublePrecision.h} (96%) rename src/walberla_bridge/src/lattice_boltzmann/generated_kernels/{Dynamic_UBB_double_precisionCUDA.cu => DynamicUBBDoublePrecisionCUDA.cu} (81%) rename src/walberla_bridge/src/lattice_boltzmann/generated_kernels/{Dynamic_UBB_double_precisionCUDA.h => DynamicUBBDoublePrecisionCUDA.h} (96%) rename src/walberla_bridge/src/lattice_boltzmann/generated_kernels/{Dynamic_UBB_single_precision.cpp => DynamicUBBSinglePrecision.cpp} (78%) rename src/walberla_bridge/src/lattice_boltzmann/generated_kernels/{Dynamic_UBB_single_precision.h => DynamicUBBSinglePrecision.h} (96%) rename src/walberla_bridge/src/lattice_boltzmann/generated_kernels/{Dynamic_UBB_single_precisionCUDA.cu => DynamicUBBSinglePrecisionCUDA.cu} (81%) rename src/walberla_bridge/src/lattice_boltzmann/generated_kernels/{Dynamic_UBB_single_precisionCUDA.h => DynamicUBBSinglePrecisionCUDA.h} (96%) diff --git a/.clang-tidy b/.clang-tidy index 8d269d52fa9..96856b845b1 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -109,11 +109,13 @@ CheckOptions: - key: modernize-use-noexcept.ReplacementString value: '' - key: modernize-use-noexcept.UseNoexceptFalse - value: '1' + value: 'true' - key: modernize-use-nullptr.NullMacros value: 'NULL' - key: modernize-use-transparent-functors.SafeMode - value: '1' + value: 'true' + - key: modernize-use-using.IgnoreExternC + value: 'true' - key: readability-simplify-boolean-expr.ChainedConditionalAssignment value: '0' - key: readability-simplify-boolean-expr.ChainedConditionalReturn diff --git a/.github/workflows/push_pull.yml b/.github/workflows/push_pull.yml index 7e0fce60c4e..7893f3a7817 100644 --- a/.github/workflows/push_pull.yml +++ b/.github/workflows/push_pull.yml @@ -9,7 +9,7 @@ permissions: jobs: macos: - runs-on: macos-13 + runs-on: macos-14 if: ${{ github.repository == 'espressomd/espresso' }} steps: - name: Checkout @@ -31,6 +31,7 @@ jobs: build_procs: 4 check_procs: 4 with_ccache: 'true' + with_fpe: 'true' debian: runs-on: ubuntu-latest diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 33d049e5211..d1b4c6e6641 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -69,7 +69,7 @@ style_doxygen: - mkdir build - cd build - cp ../maintainer/configs/maxset.hpp myconfig.hpp - - cmake .. -D ESPRESSO_BUILD_WITH_CUDA=ON -D ESPRESSO_BUILD_WITH_GSL=ON -D ESPRESSO_BUILD_WITH_HDF5=ON -D ESPRESSO_BUILD_WITH_SCAFACOS=ON -D ESPRESSO_BUILD_WITH_WALBERLA=ON -D ESPRESSO_BUILD_WITH_WALBERLA_FFT=ON -D ESPRESSO_BUILD_WITH_STOKESIAN_DYNAMICS=ON -D ESPRESSO_BUILD_WITH_CALIPER=ON + - cmake .. -D ESPRESSO_BUILD_WITH_CUDA=ON -D ESPRESSO_BUILD_WITH_GSL=ON -D ESPRESSO_BUILD_WITH_HDF5=ON -D ESPRESSO_BUILD_WITH_SCAFACOS=ON -D ESPRESSO_BUILD_WITH_WALBERLA=ON -D ESPRESSO_BUILD_WITH_WALBERLA_FFT=ON -D ESPRESSO_BUILD_WITH_STOKESIAN_DYNAMICS=ON -D ESPRESSO_BUILD_WITH_CALIPER=ON -D ESPRESSO_BUILD_WITH_FPE=ON - sh ../maintainer/CI/dox_warnings.sh tags: - espresso @@ -132,7 +132,8 @@ no_rotation: with_cuda: 'false' myconfig: 'no_rotation' with_coverage: 'true' - with_scafacos: 'true' + with_scafacos: 'false' + with_fpe: 'true' check_skip_long: 'true' script: - bash maintainer/CI/build_cmake.sh @@ -148,6 +149,8 @@ fedora:40: variables: with_cuda: 'false' with_gsl: 'false' + with_scafacos: 'false' + with_fpe: 'true' myconfig: 'maxset' make_check_python: 'true' with_stokesian_dynamics: 'true' @@ -422,6 +425,7 @@ empty: with_scafacos: 'false' with_walberla: 'false' with_stokesian_dynamics: 'false' + with_fpe: 'true' with_coverage: 'false' with_coverage_python: 'true' script: diff --git a/CMakeLists.txt b/CMakeLists.txt index 613fd8ce826..0bd12bb8af0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,6 +59,7 @@ include(GNUInstallDirs) include(FetchContent) include(espresso_option_enum) include(espresso_enable_avx2_support) +include(espresso_override_clang_tidy_checks) if(EXISTS "${PROJECT_BINARY_DIR}/CMakeLists.txt") message( @@ -93,7 +94,7 @@ set(FETCHCONTENT_UPDATES_DISCONNECTED ON) FetchContent_Declare( walberla GIT_REPOSITORY https://i10git.cs.fau.de/walberla/walberla.git - GIT_TAG b0842e1a493ce19ef1bbb8d2cf382fc343970a7f + GIT_TAG f36fa0a68bae59f0b516f6587ea8fa7c24a41141 ) FetchContent_Declare( stokesian_dynamics @@ -103,7 +104,7 @@ FetchContent_Declare( FetchContent_Declare( caliper GIT_REPOSITORY https://github.com/LLNL/Caliper.git - GIT_TAG v2.10.0 + GIT_TAG v2.12.0 ) # cmake-format: on @@ -129,6 +130,8 @@ option(ESPRESSO_BUILD_BENCHMARKS "Enable benchmarks" OFF) option(ESPRESSO_BUILD_WITH_VALGRIND "Build with Valgrind instrumentation" OFF) option(ESPRESSO_BUILD_WITH_CALIPER "Build with Caliper instrumentation" OFF) option(ESPRESSO_BUILD_WITH_CPPCHECK "Run Cppcheck during compilation" OFF) +option(ESPRESSO_BUILD_WITH_FPE + "Build with floating-point exceptions instrumentation" OFF) if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") option(ESPRESSO_BUILD_WITH_CLANG_TIDY "Run Clang-Tidy during compilation" OFF) endif() @@ -258,7 +261,7 @@ endif() # Python interpreter and Cython interface library if(ESPRESSO_BUILD_WITH_PYTHON) find_package(Python 3.10 REQUIRED COMPONENTS Interpreter Development NumPy) - find_package(Cython 0.29.28...<3.0.10 REQUIRED) + find_package(Cython 0.29.28...<3.0.12 REQUIRED) find_program(IPYTHON_EXECUTABLE NAMES jupyter ipython3 ipython) endif() @@ -581,6 +584,33 @@ if(ESPRESSO_BUILD_WITH_CLANG_TIDY) find_package(ClangTidy "${CMAKE_CXX_COMPILER_VERSION}" EXACT REQUIRED) set(ESPRESSO_CXX_CLANG_TIDY "${CLANG_TIDY_EXE}") set(ESPRESSO_CUDA_CLANG_TIDY "${CLANG_TIDY_EXE};--extra-arg=--cuda-host-only") + set(SKIP_CLANG_TIDY_CHECKS "") + set(SKIP_CLANG_TIDY_CHECKS_CXX "") + set(SKIP_CLANG_TIDY_CHECKS_CUDA "") + if(ESPRESSO_BUILD_WITH_CALIPER) + # Clang-Tidy sometimes emits diagnostics in code enclosed in `extern "C"` + # that are not always actionable, since they may rely on keywords only + # available in the C++ language. While some checks have an extra flag + # 'IgnoreExternC' to disable them inside C code, not all affected checks + # have been fixed yet. For an in-depth discussion on this topic, see + # https://github.com/llvm/llvm-project/issues/35272 + list(APPEND SKIP_CLANG_TIDY_CHECKS "-modernize-use-auto") + list(APPEND SKIP_CLANG_TIDY_CHECKS "-modernize-use-nullptr") + list(APPEND SKIP_CLANG_TIDY_CHECKS "-modernize-deprecated-headers") + endif() + if(ESPRESSO_BUILD_WITH_CUDA) + # silence casts in cuda_runtime.h (for both C++ and CUDA source files) + list(APPEND SKIP_CLANG_TIDY_CHECKS "-bugprone-casting-through-void") + # silence nullptr dereference in cuda::thrust + list(APPEND SKIP_CLANG_TIDY_CHECKS_CUDA + "-clang-analyzer-core.NonNullParamChecker") + endif() + espresso_override_clang_tidy_checks( + ESPRESSO_CXX_CLANG_TIDY "${SKIP_CLANG_TIDY_CHECKS}" + "${SKIP_CLANG_TIDY_CHECKS_CXX}") + espresso_override_clang_tidy_checks( + ESPRESSO_CUDA_CLANG_TIDY "${SKIP_CLANG_TIDY_CHECKS}" + "${SKIP_CLANG_TIDY_CHECKS_CUDA}") endif() if(ESPRESSO_BUILD_WITH_CPPCHECK) @@ -684,9 +714,13 @@ if(ESPRESSO_BUILD_WITH_CALIPER) set(CALIPER_WITH_NVTX off CACHE BOOL "") set(CALIPER_WITH_CUPTI off CACHE BOOL "") set(CALIPER_BUILD_SHARED_LIBS on CACHE BOOL "") + set(CALIPER_INSTALL_CONFIG off CACHE BOOL "") + set(CALIPER_INSTALL_HEADERS off CACHE BOOL "") if(NOT caliper_POPULATED) FetchContent_MakeAvailable(caliper) endif() + target_compile_options( + caliper-common PRIVATE $<$:-Wno-restrict>) target_compile_options( caliper-services PRIVATE @@ -696,6 +730,7 @@ if(ESPRESSO_BUILD_WITH_CALIPER) PRIVATE $<$:-Wno-maybe-uninitialized> $<$:-Wno-volatile> $<$:-Wno-deprecated-volatile>) + set_target_properties(caliper-runtime PROPERTIES CXX_CLANG_TIDY "") endif() # diff --git a/cmake/espresso_cmake_config.cmakein b/cmake/espresso_cmake_config.cmakein index ffdeb999129..f2c57978c27 100644 --- a/cmake/espresso_cmake_config.cmakein +++ b/cmake/espresso_cmake_config.cmakein @@ -21,6 +21,8 @@ #cmakedefine ESPRESSO_BUILD_WITH_CALIPER +#cmakedefine ESPRESSO_BUILD_WITH_FPE + #define PACKAGE_NAME "${PROJECT_NAME}" /** diff --git a/cmake/espresso_override_clang_tidy_checks.cmake b/cmake/espresso_override_clang_tidy_checks.cmake new file mode 100644 index 00000000000..f55ab605cde --- /dev/null +++ b/cmake/espresso_override_clang_tidy_checks.cmake @@ -0,0 +1,64 @@ +# +# Copyright (C) 2024 The ESPResSo project +# +# This file is part of ESPResSo. +# +# ESPResSo is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# ESPResSo is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# Override Clang-Tidy checks. +# +# This function appends an extra flag "--checks=..." in the parent scope +# variable whose name is passed as first argument. The second and third +# arguments are the general and the language-specific overrides, respectively. +# This way you can append a common set of overrides plus language-specific +# overrides in two variables named MYPROJECT_CXX_CLANG_TIDY and +# MYPROJECT_CUDA_CLANG_TIDY, which are used to set the CXX_CLANG_TIDY and +# CUDA_CLANG_TIDY properties of CMake targets. +# +# Example: +# ```cmake +# include(espresso_override_clang_tidy_checks) +# if(MYPROJECT_BUILD_WITH_CLANG_TIDY) +# find_package(ClangTidy "${CMAKE_CXX_COMPILER_VERSION}" EXACT REQUIRED) +# set(MYPROJECT_CXX_CLANG_TIDY "${CLANG_TIDY_EXE}") +# set(MYPROJECT_CUDA_CLANG_TIDY "${CLANG_TIDY_EXE};--extra-arg=--cuda-host-only") +# set(SKIP_CLANG_TIDY_CHECKS "") +# set(SKIP_CLANG_TIDY_CHECKS_CXX "") +# set(SKIP_CLANG_TIDY_CHECKS_CUDA "") +# # silence false positives in code enclosed in `extern "C" { /* ... */ }` +# list(APPEND SKIP_CLANG_TIDY_CHECKS "-modernize-use-auto") +# if (MYPROJECT_BUILD_WITH_CUDA) +# # silence casts in cuda_runtime.h (for both C++ and CUDA source files) +# list(APPEND SKIP_CLANG_TIDY_CHECKS "-bugprone-casting-through-void") +# # silence nullptr dereference in cuda::thrust (only for CUDA files) +# list(APPEND SKIP_CLANG_TIDY_CHECKS_CUDA "-clang-analyzer-core.NonNullParamChecker") +# endif() +# espresso_override_clang_tidy_checks(MYPROJECT_CXX_CLANG_TIDY "${SKIP_CLANG_TIDY_CHECKS}" "${SKIP_CLANG_TIDY_CHECKS_CXX}") +# espresso_override_clang_tidy_checks(MYPROJECT_CUDA_CLANG_TIDY "${SKIP_CLANG_TIDY_CHECKS}" "${SKIP_CLANG_TIDY_CHECKS_CUDA}") +# set_target_properties(myproject_core PROPERTIES CXX_CLANG_TIDY "${MYPROJECT_CXX_CLANG_TIDY}") +# set_target_properties(myproject_cuda PROPERTIES CUDA_CLANG_TIDY "${MYPROJECT_CUDA_CLANG_TIDY}") +# endif() +# ``` + +function(espresso_override_clang_tidy_checks) + set(VARNAME "${ARGV0}") + set(CHECKS "${ARGV1}") + set(CHECKS_LANG "${ARGV2}") + list(APPEND CHECKS ${CHECKS_LANG}) + if(CHECKS) + list(JOIN CHECKS "," CHECKS_STRING) + set(${VARNAME} "${${VARNAME}};--checks=${CHECKS_STRING}" PARENT_SCOPE) + endif() +endfunction() diff --git a/doc/bibliography.bib b/doc/bibliography.bib index 7c4c65a6161..7254e400922 100644 --- a/doc/bibliography.bib +++ b/doc/bibliography.bib @@ -45,6 +45,18 @@ @Article{andersen83a doi = {10.1016/0021-9991(83)90014-1}, } +@TechReport{ARM-DDI-0487-2024, +author = {{Arm Limited}}, +title = {Arm Architecture Reference Manual for {A}-profile architecture}, +type = {Manual}, +number = {ARM DDI 0487}, +month = nov, +year = {2024}, +address = {Cambridge, England}, +institution = {Arm Limited}, +url = {https://developer.arm.com/documentation/ddi0487/latest/}, +} + @Article{arnold02a, author = {Arnold, Axel and Holm, Christian}, title = {{MMM2D}: {A} fast and accurate summation method for electrostatic interactions in {2D} slab geometries}, @@ -598,6 +610,31 @@ @Article{humphrey96a doi = {10.1016/0263-7855(96)00018-5}, } +@TechReport{ISO-EIC-60559-2020, +author = {{International Organization for Standardization} and {International Electrotechnical Commission} and {Institute of Electrical and Electronics Engineers}}, +title = {International Standard -- Floating-point arithmetic}, +type = {Standard}, +number = {{ISO}/{IEC} 60559:2020({E}), {IEEE} Std 754-2019}, +month = may, +year = {2020}, +edition = {2nd}, +isbn = {978-1-5044-6641-7}, +doi = {10.1109/IEEESTD.2020.9091348}, +} + +@TechReport{ISO-EIC-9899-1999, +author = {{International Organization for Standardization} and {International Electrotechnical Commission}}, +title = {Information technology --- Programming languages --- {C}}, +type = {Standard}, +number = {{ISO}/{IEC} 9899:1999}, +month = dec, +year = {1999}, +edition = {2nd}, +address = {Geneva, Switzerland}, +institution = {International Organization for Standardization}, +url = {https://www.iso.org/standard/29237.html}, +} + @Article{jancigova16a, author = {Jan\v{c}igov\'{a}, Iveta and Cimr\'{a}k, Ivan}, title = {Non-uniform force allocation for area preservation in spring network models}, diff --git a/doc/sphinx/running.rst b/doc/sphinx/running.rst index 164e102cc71..2ab5ebaf66b 100644 --- a/doc/sphinx/running.rst +++ b/doc/sphinx/running.rst @@ -516,6 +516,11 @@ you can as a last resort activate sanitizers: The resulting build will be around 5 times slower that a debug build, but it will generate valuable reports when detecting fatal exceptions. +If you are dealing with non-finite math errors (infinity, NaN, etc.), +you can interrupt code execution at the first occurence of a non-finite +value using :ref:`floating-point exceptions ` and investigate +the failing mathematical operation in GDB. + It is possible to attach an external debugger to ``pypresso``, albeit with a custom syntax. The ``pypresso`` executable file is actually not a program but a script which sets the Python path appropriately and starts the Python @@ -734,6 +739,12 @@ tool. It detects memory leaks and bugs caused by dangling references. For more details, please consult the tool online documentation [5]_. +On some releases of the Linux kernel, ASAN fails to initialize when running +the executable due to address space layout randomization (ASLR) [10]_. +On affected environments, one can temporarily reduce the entropy via +``sudo sysctl vm.mmap_rnd_bits=28`` (default is usually 32 bits) +for the time of the ASAN analysis, and then revert back to the default value. + .. _UBSAN: UBSAN @@ -750,6 +761,59 @@ array accesses out of bounds, signed integer overflows, etc. For more details, please consult the tool online documentation [6]_. +.. _FPE: + +FPE +~~~ + +.. note:: + + Requires specific compiler and linker flags, enabled with the CMake option + ``-D ESPRESSO_BUILD_WITH_FPE=ON -D CMAKE_BUILD_TYPE=RelWithDebInfo``. + +When abnormal mathematical operations take place at runtime, +for example divisions by zero, multiplication of infinity with zero, +square roots and logarithms of negative numbers, overflows, underflows, +or conversion of NaN values to integers, CPU flags may be raised. +The flags are known as *CPU exceptions*, and can be queried to detect +if a past operation yielded an abnormal result. They can be unmasked +to automatically *trap*, i.e. leave the user space and enter kernel space, +where the operating system will run a callback function, which may send +a POSIX signal such as ``SIGFPE`` or ``SIGILL``. Those signals can be +captured by a user-defined *signal handler*, which takes the form of a +C++ function with strict restrictions on which operations it can execute, +and are typically assigning an integer into a global variable for debugging. +Execution then resumes in user space on the exact same instruction that +originally trapped, potentially entering an infinite loop. + +C libraries like GNU libc provide support for floating-point exceptions +(FPE or FE). These can be unmasked to interrupt |es| on the first occurrence +of an abnormal floating-point operation. This is achieved by sending a signal +that can be caught in GDB to allow inspection of the failing code. + +When FPE instrumentation is enabled, most script interface calls will be +monitored for abnormal mathematical operations. One can select which subset +of CPU exceptions will trap by explicitly providing a bitmask to the FPE +handler constructor, like so: + +.. code-block:: c++ + + Variant ObjectHandle::call_method(const std::string &name, + const VariantMap ¶ms) { + if (m_context) + m_context->notify_call_method(this, name, params); + + #ifdef FPE + auto const trap = fe_trap::make_shared_scoped(FE_DIVBYZERO | FE_INVALID); + #endif + return this->do_call_method(name, params); + } + +For more details, see annex F IEC 60559 "floating-point arithmetic" +in ISO/EIC 9899 :cite:`ISO-EIC-9899-1999` and chapter 7 +"Exceptions and default exception handling" in +ISO/IEC 60559:2020(E) :cite:`ISO-EIC-60559-2020`. + .. _Caliper: Caliper @@ -871,8 +935,8 @@ graph that can be converted to a static graph using ``gprof2dot`` and ``dot``: dot -Tpdf ${callgrind_out}.dot -o ${callgrind_out}.pdf The Valgrind output file generally follows the pattern ``callgrind.out.pid``, -where ``pid`` is the actualy process id. The ``${callgrind_out}`` variable -is populated with the return value of a subshell commands that finds the most +where ``pid`` is the actual process id. The ``${callgrind_out}`` variable +is populated with the return value of a subshell command that finds the most recent output file that matches that pattern. It is also possible to open the output file in KCachegrind [4]_ to browse @@ -1087,3 +1151,6 @@ ____ .. [9] https://docs.nvidia.com/compute-sanitizer/ComputeSanitizer/index.html + +.. [10] + https://github.com/google/sanitizers/issues/1614 diff --git a/maintainer/CI/build_cmake.sh b/maintainer/CI/build_cmake.sh index b155ed8c626..9b371153904 100755 --- a/maintainer/CI/build_cmake.sh +++ b/maintainer/CI/build_cmake.sh @@ -100,6 +100,7 @@ set_default_value with_ubsan false set_default_value with_asan false set_default_value with_static_analysis false set_default_value with_caliper false +set_default_value with_fpe false set_default_value myconfig "default" set_default_value build_procs ${ci_procs} set_default_value check_procs ${build_procs} @@ -147,6 +148,7 @@ cmake_params="${cmake_params} -D ESPRESSO_CTEST_ARGS:STRING=-j${check_procs} -D cmake_params="${cmake_params} -D ESPRESSO_BUILD_BENCHMARKS=${make_check_benchmarks}" cmake_params="${cmake_params} -D ESPRESSO_BUILD_WITH_CCACHE=${with_ccache}" cmake_params="${cmake_params} -D ESPRESSO_BUILD_WITH_CALIPER=${with_caliper}" +cmake_params="${cmake_params} -D ESPRESSO_BUILD_WITH_FPE=${with_fpe}" cmake_params="${cmake_params} -D ESPRESSO_BUILD_WITH_HDF5=${with_hdf5}" cmake_params="${cmake_params} -D ESPRESSO_BUILD_WITH_FFTW=${with_fftw}" cmake_params="${cmake_params} -D ESPRESSO_BUILD_WITH_GSL=${with_gsl}" diff --git a/maintainer/benchmarks/CMakeLists.txt b/maintainer/benchmarks/CMakeLists.txt index 63c04f57fb1..0456ae9aa3c 100644 --- a/maintainer/benchmarks/CMakeLists.txt +++ b/maintainer/benchmarks/CMakeLists.txt @@ -50,8 +50,7 @@ function(PYTHON_BENCHMARK) string(REGEX REPLACE "^[-_]+" "" argument ${argument}) set(BENCHMARK_NAME "${BENCHMARK_NAME}__${argument}") endforeach(argument) - configure_file(${BENCHMARK_FILE} - ${CMAKE_CURRENT_BINARY_DIR}/${BENCHMARK_FILE}) + list(APPEND BENCHMARK_DEPENDENCIES ${BENCHMARK_FILE} benchmarks.py) foreach(dependency IN LISTS BENCHMARK_DEPENDENCIES) configure_file(${dependency} ${CMAKE_CURRENT_BINARY_DIR}/${dependency}) endforeach(dependency) diff --git a/maintainer/walberla_kernels/Readme.md b/maintainer/walberla_kernels/Readme.md index 39f1a7e41a6..eef7cec3c86 100644 --- a/maintainer/walberla_kernels/Readme.md +++ b/maintainer/walberla_kernels/Readme.md @@ -13,16 +13,19 @@ The following dependencies need to be in the Python path: The Python dependencies can be pip installed locally with the following command: ```sh -python3 -m pip install --user -c requirements.txt numpy sympy lbmpy pystencils islpy +python3 -m venv codegen +source codegen/bin/activate +python3 -m pip install -c "$(git rev-parse --show-toplevel)/requirements.txt" \ + numpy cython lbmpy pystencils sympy islpy jinja2 setuptools packaging +deactivate ``` The kernels can be regenerated with this shell script: ```sh # adapt these paths to the build environment -export VERSION=1.3.3 -export DEPS="${HOME}/walberla_deps" -export PYTHONPATH="${DEPS}/${VERSION}/lbmpy:${DEPS}/${VERSION}/pystencils:${DEPS}/devel/walberla/python/" +source codegen/bin/activate +export PYTHONPATH="$(realpath build/_deps/walberla-src/python/)" # convenience functions function generate_lb_kernels { diff --git a/maintainer/walberla_kernels/code_generation_context.py b/maintainer/walberla_kernels/code_generation_context.py index 77f86183e0e..c340a7d8de9 100644 --- a/maintainer/walberla_kernels/code_generation_context.py +++ b/maintainer/walberla_kernels/code_generation_context.py @@ -20,16 +20,17 @@ import os import re import hashlib +import sympy import lbmpy import lbmpy_walberla import pystencils import pystencils_walberla -def earmark_generated_kernels(): +def add_metadata_codegen_toolchain(): """ - Add an earmark at the beginning of generated kernels to document the - pystencils/lbmpy toolchain that was used to create them. + Add metadata at the beginning of generated kernels to document the + pystencils/lbmpy/sympy toolchain that was used to create them. """ walberla_root = lbmpy_walberla.__file__.split("/python/lbmpy_walberla/")[0] with open(os.path.join(walberla_root, ".git/HEAD")) as f: @@ -39,9 +40,10 @@ def earmark_generated_kernels(): with open(os.path.join(walberla_root, f".git/{ref}")) as f: walberla_commit = f.read() token = "// kernel generated with" - earmark = ( + metadata = ( f"{token} pystencils v{pystencils.__version__}, " f"lbmpy v{lbmpy.__version__}, " + f"sympy v{sympy.__version__}, " f"lbmpy_walberla/pystencils_walberla from " f"waLBerla commit {walberla_commit}" ) @@ -58,7 +60,7 @@ def earmark_generated_kernels(): pos = content.find("//=====", 5) pos = content.find("\n", pos) + 1 f.seek(pos) - f.write(f"\n{earmark}\n{content[pos:].rstrip()}\n") + f.write(f"\n{metadata}\n{content[pos:].rstrip()}\n") def guard_generated_kernels_clang_format(): @@ -82,12 +84,22 @@ def guard_generated_kernels_clang_format(): f.write(content) +def patch_file(class_name, extension, patch, *args, **kwargs): + with open(f"{class_name}.{extension}", "r+") as f: + old_content = f.read() + new_content = patch(old_content, *args, **kwargs) + if new_content != old_content: + f.seek(0) + f.truncate() + f.write(new_content) + + class CodeGeneration(pystencils_walberla.CodeGeneration): """ This is a patched version of ``CodeGeneration`` that elides parameters passed to the command line when running the argument parser, and then - restores them. It also patches the Jinja templates and earmarks the - generated kernels. + restores them. It also patches the Jinja templates and adds metadata + to the generated kernels. """ def __init__(self): @@ -96,8 +108,9 @@ def __init__(self): sys.argv = sys.argv[:1] super().__init__() sys.argv = old_sys_argv + self.context.patch_file = patch_file def __exit__(self, *args, **kwargs): super().__exit__(*args, **kwargs) - earmark_generated_kernels() + add_metadata_codegen_toolchain() guard_generated_kernels_clang_format() diff --git a/maintainer/walberla_kernels/custom_additional_extensions.py b/maintainer/walberla_kernels/custom_additional_extensions.py index 3115f7ffe7e..e1d0bff9656 100644 --- a/maintainer/walberla_kernels/custom_additional_extensions.py +++ b/maintainer/walberla_kernels/custom_additional_extensions.py @@ -247,8 +247,7 @@ def generate_boundary( index_struct_dtype, layout=[0], shape=( - ps.typing.TypedSymbol("indexVectorSize", - ps.typing.BasicType(np.int32)), + ps.TypedSymbol("indexVectorSize", ps.typing.BasicType(np.int32)), 1, ), strides=(1, 1), @@ -298,6 +297,7 @@ def generate_boundary( "namespace": namespace, "inner_or_boundary": False, "single_link": False, + "calculate_force": False, "additional_data_handler": additional_data_handler, } diff --git a/maintainer/walberla_kernels/generate_ek_kernels.py b/maintainer/walberla_kernels/generate_ek_kernels.py index e5f0d5cd0ec..78f0a7a0f8d 100644 --- a/maintainer/walberla_kernels/generate_ek_kernels.py +++ b/maintainer/walberla_kernels/generate_ek_kernels.py @@ -32,13 +32,13 @@ import custom_additional_extensions -parser = argparse.ArgumentParser(description='Generate the waLBerla kernels.') -parser.add_argument('--single-precision', action='store_true', required=False, - help='Use single-precision') +parser = argparse.ArgumentParser(description="Generate the waLBerla kernels.") +parser.add_argument("--single-precision", action="store_true", required=False, + help="Use single-precision") args = parser.parse_args() # Make sure we have the correct versions of the required dependencies -for module, requirement in [(ps, "==1.3.3"), (lbmpy, "==1.3.3")]: +for module, requirement in [(ps, "==1.3.7"), (lbmpy, "==1.3.7")]: assert packaging.specifiers.SpecifierSet(requirement).contains(module.__version__), \ f"{module.__name__} version {module.__version__} " \ f"doesn't match requirement {requirement}" @@ -46,23 +46,29 @@ double_precision: bool = not args.single_precision data_type_cpp = "double" if double_precision else "float" -data_type_np = pystencils_espresso.data_type_np[data_type_cpp] +data_type_np = "float64" if double_precision else "float32" precision_suffix = pystencils_espresso.precision_suffix[double_precision] precision_rng = pystencils_espresso.precision_rng_modulo[double_precision] -def replace_macros(filename: str) -> None: - with open(filename, "r+") as f: - content = f.read() - f.seek(0) - f.truncate(0) - # replace getData with uncheckedFastGetData - content = content.replace("block->getData(indexVectorID);", - "block->uncheckedFastGetData(indexVectorID);") - # remove dummy assignment - content = content.replace( - r"const int32_t dummy = *((int32_t * )(& _data_indexVector[12*ctr_0]));", "") - f.write(content) +def patch_reaction_indexed_kernel(content: str) -> str: + # replace getData with uncheckedFastGetData + access_slow = "block->getData(indexVectorID);" + access_fast = "block->uncheckedFastGetData(indexVectorID);" + assert access_slow in content + content = content.replace(access_slow, access_fast) + # remove dummy assignment + token = "const int32_t dummy = *((int32_t * )(& _data_indexVector[12*ctr_0]));" + assert token in content + content = content.replace(token, "") + return content + + +def patch_diffusive_flux_elec_kernel(content): + token = "BlockDataID phiID;\n" + assert token in content + content = content.replace(token, "BlockDataID phiID;\npublic:\n inline void setPhiID(BlockDataID phiID_) { phiID = phiID_; }\nprivate:\n") # nopep8 + return content dim: int = 3 @@ -130,6 +136,7 @@ def replace_macros(filename: str) -> None: "target": target, "cpu_vectorize_info": {"assume_inner_stride_one": False}, } + with code_generation_context.CodeGeneration() as ctx: ctx.double_accuracy = double_precision @@ -145,14 +152,15 @@ def replace_macros(filename: str) -> None: staggered=True, block_offset=block_offsets if fluctuation else None, **params) + class_name = f"DiffusiveFluxKernelWithElectrostatic{midfix}_{precision_suffix}" pystencils_walberla.generate_sweep( - ctx, - f"DiffusiveFluxKernelWithElectrostatic{midfix}_{precision_suffix}", + ctx, class_name, ek_electrostatic.flux(include_vof=False, include_fluctuations=fluctuation, rng_node=precision_rng), staggered=True, block_offset=block_offsets if fluctuation else None, **params) + ctx.patch_file(class_name, "h", patch_diffusive_flux_elec_kernel) # the substitution for field reads is necessary, because otherwise there are # "ResolvedFieldAccess" nodes that fail in the code generation @@ -184,7 +192,7 @@ def replace_macros(filename: str) -> None: dynamic_flux_additional_data = custom_additional_extensions.FluxAdditionalDataHandler( stencil=stencil, boundary_object=dynamic_flux) - pystencils_espresso.generate_staggered_flux_boundary( + pystencils_walberla.boundary.generate_staggered_flux_boundary( generation_context=ctx, class_name=f"FixedFlux_{precision_suffix}", boundary_object=dynamic_flux, @@ -214,21 +222,21 @@ def replace_macros(filename: str) -> None: # ek reactions for i in range(1, max_num_reactants + 1): assignments = list(reaction_obj.generate_reaction(num_reactants=i)) - filename_stem: str = f"ReactionKernelBulk_{i}_{precision_suffix}" + class_name: str = f"ReactionKernelBulk_{i}_{precision_suffix}" pystencils_walberla.generate_sweep( ctx, - filename_stem, + class_name, assignments) - filename_stem: str = f"ReactionKernelIndexed_{i}_{precision_suffix}" + class_name: str = f"ReactionKernelIndexed_{i}_{precision_suffix}" custom_additional_extensions.generate_boundary( generation_context=ctx, stencil=dirichlet_stencil, - class_name=filename_stem, + class_name=class_name, dim=dim, target=target, assignment=assignments) - replace_macros(filename=f"{filename_stem}.cpp") + ctx.patch_file(class_name, "cpp", patch_reaction_indexed_kernel) # ek reactions helper functions custom_additional_extensions.generate_kernel_selector( diff --git a/maintainer/walberla_kernels/generate_lb_kernels.py b/maintainer/walberla_kernels/generate_lb_kernels.py index f9e93f16a1e..8a90287da68 100644 --- a/maintainer/walberla_kernels/generate_lb_kernels.py +++ b/maintainer/walberla_kernels/generate_lb_kernels.py @@ -25,10 +25,27 @@ import numpy as np import pystencils as ps -import pystencils_walberla -import pystencils_espresso import lbmpy + +kernel_codes = "packinfo boundary collide stream init accessors".split() +parser = argparse.ArgumentParser(description="Generate the waLBerla kernels.") +parser.add_argument("--single-precision", action="store_true", required=False, + help="Use single-precision") +parser.add_argument("--gpu", action="store_true") +parser.add_argument("--kernels", nargs="+", type=str, default="all", + choices=["all"] + kernel_codes, + help="Which kernels to generate") +args = parser.parse_args() + +# Make sure we have the correct versions of the required dependencies +for module, requirement in [(ps, "==1.3.7"), (lbmpy, "==1.3.7")]: + assert packaging.specifiers.SpecifierSet(requirement).contains(module.__version__), \ + f"{module.__name__} version {module.__version__} " \ + f"doesn't match requirement {requirement}" + +import pystencils_walberla +import pystencils_espresso import lbmpy.creationfunctions import lbmpy.forcemodels import lbmpy.stencils @@ -43,22 +60,33 @@ import code_generation_context import custom_additional_extensions -parser = argparse.ArgumentParser(description="Generate the waLBerla kernels.") -parser.add_argument("--single-precision", action="store_true", required=False, - help="Use single-precision") -parser.add_argument("--gpu", action="store_true") -args = parser.parse_args() - if args.gpu: target = ps.Target.GPU else: target = ps.Target.CPU - -# Make sure we have the correct versions of the required dependencies -for module, requirement in [(ps, "==1.3.3"), (lbmpy, "==1.3.3")]: - assert packaging.specifiers.SpecifierSet(requirement).contains(module.__version__), \ - f"{module.__name__} version {module.__version__} " \ - f"doesn't match requirement {requirement}" +if args.kernels == "all": + args.kernels = kernel_codes + +# vectorization parameters +parameters = {} +if target == ps.Target.GPU: + default_key = "GPU" + parameters["GPU"] = ({"target": target}, "CUDA") +else: + default_key = "CPU" + cpu_vectorize_info = { + "instruction_set": "avx", + "assume_inner_stride_one": True, + "assume_aligned": True, + "assume_sufficient_line_padding": False} + parameters["CPU"] = ({"target": target}, "") + parameters["AVX"] = ({"target": target, + "cpu_vectorize_info": cpu_vectorize_info}, "AVX") + +# global parameters +stencil = lbmpy.stencils.LBStencil(lbmpy.enums.Stencil.D3Q19) +kT = sp.symbols("kT") +streaming_pattern = "push" def paramlist(parameters, keys): @@ -75,106 +103,63 @@ def get_ext_source(target_suffix): return {"CUDA": "cu"}.get(target_suffix, "cpp") -def patch_file(class_name, extension, target_suffix, patch): - with open(f"{class_name}.{extension}", "r+") as f: - old_content = f.read() - new_content = patch(old_content, target_suffix) - if new_content != old_content: - f.seek(0) - f.truncate() - f.write(new_content) - - -with code_generation_context.CodeGeneration() as ctx: - ctx.double_accuracy = not args.single_precision - if target == ps.Target.GPU: - ctx.gpu = True - ctx.cuda = True - - # vectorization parameters - parameters = {} - if target == ps.Target.GPU: - default_key = "GPU" - parameters["GPU"] = ({"target": target}, "CUDA") - else: - default_key = "CPU" - cpu_vectorize_info = { - "instruction_set": "avx", - "assume_inner_stride_one": True, - "assume_aligned": True, - "assume_sufficient_line_padding": False} - parameters["CPU"] = ({"target": target}, "") - parameters["AVX"] = ({"target": target, - "cpu_vectorize_info": cpu_vectorize_info}, "AVX") - - # codegen configuration - config = pystencils_espresso.generate_config( - ctx, parameters[default_key][0]) - +def generate_init_kernels(ctx, method): precision_prefix = pystencils_espresso.precision_prefix[ctx.double_accuracy] - precision_suffix = pystencils_espresso.precision_suffix[ctx.double_accuracy] - precision_rng = pystencils_espresso.precision_rng[ctx.double_accuracy] - kT = sp.symbols("kT") - stencil = lbmpy.stencils.LBStencil(lbmpy.enums.Stencil.D3Q19) - fields = pystencils_espresso.generate_fields(config, stencil) - force_field = fields["force"] - lbm_opt = lbmpy.LBMOptimisation(symbolic_field=fields["pdfs"]) - streaming_pattern = "push" + for params, target_suffix in paramlist(parameters, (default_key,)): + pystencils_walberla.generate_sweep( + ctx, + f"InitialPDFsSetter{precision_prefix}{target_suffix}", + pystencils_espresso.generate_setters(method, data_type), + **params) - # LB Method definition - method = lbmpy.creationfunctions.create_mrt_orthogonal( - stencil=stencil, - compressible=True, - weighted=True, - relaxation_rates=relaxation_rates.rr_getter, - force_model=lbmpy.forcemodels.Schiller(force_field.center_vector) - ) - # generate stream kernels +def generate_stream_kernels(ctx, method): + precision_prefix = pystencils_espresso.precision_prefix[ctx.double_accuracy] for params, target_suffix in paramlist(parameters, ("GPU", "CPU", "AVX")): pystencils_espresso.generate_stream_sweep( ctx, method, + data_type, f"StreamSweep{precision_prefix}{target_suffix}", params) - # generate initial densities - for params, target_suffix in paramlist(parameters, (default_key,)): - pystencils_walberla.generate_sweep( - ctx, - f"InitialPDFsSetter{precision_prefix}{target_suffix}", - pystencils_espresso.generate_setters(ctx, method, params), - **params) - # generate unthermalized Lees-Edwards collision rule +def generate_collide_lees_edwards_kernels(ctx, data_type, fields): + precision_prefix = pystencils_espresso.precision_prefix[ctx.double_accuracy] + lbm_opt = lbmpy.LBMOptimisation(symbolic_field=fields["pdfs"]) + shear_dir_normal = 1 # y-axis le_config = lbmpy.LBMConfig(stencil=stencil, method=lbmpy.Method.TRT, relaxation_rate=sp.Symbol("omega_shear"), compressible=True, zero_centered=False, force_model=lbmpy.ForceModel.GUO, - force=force_field.center_vector, + force=fields["force"].center_vector, kernel_type="collide_only") le_update_rule_unthermalized = lbmpy.create_lb_update_rule( lbm_config=le_config, lbm_optimisation=lbm_opt) le_collision_rule_unthermalized = lees_edwards.add_lees_edwards_to_collision( - config, le_update_rule_unthermalized, - fields["pdfs"], stencil, 1) # shear_dir_normal y + config, le_update_rule_unthermalized, fields["pdfs"], stencil, + shear_dir_normal) + for params, target_suffix in paramlist(parameters, ("GPU", "CPU", "AVX")): pystencils_espresso.generate_collision_sweep( ctx, le_config, + data_type, le_collision_rule_unthermalized, f"CollideSweep{precision_prefix}LeesEdwards{target_suffix}", params ) + +def generate_collide_kernels(ctx, method, data_type): + precision_prefix = pystencils_espresso.precision_prefix[ctx.double_accuracy] + precision_rng = pystencils_espresso.precision_rng[ctx.double_accuracy] block_offsets = tuple( ps.TypedSymbol(f"block_offset_{i}", np.uint32) for i in range(3)) - - # generate thermalized LB collision rule lb_collision_rule_thermalized = lbmpy.creationfunctions.create_lb_collision_rule( method, zero_centered=False, @@ -186,18 +171,22 @@ def patch_file(class_name, extension, target_suffix, patch): optimization={"cse_global": True, "double_precision": ctx.double_accuracy} ) + for params, target_suffix in paramlist(parameters, ("GPU", "CPU", "AVX")): stem = f"CollideSweep{precision_prefix}Thermalized{target_suffix}" pystencils_espresso.generate_collision_sweep( ctx, method, + data_type, lb_collision_rule_thermalized, stem, params, block_offset=block_offsets, ) - # generate accessors + +def generate_accessors_kernels(ctx, method): + precision_prefix = pystencils_espresso.precision_prefix[ctx.double_accuracy] for _, target_suffix in paramlist(parameters, ("GPU", "CPU")): stem = f"FieldAccessors{precision_prefix}{target_suffix}" if target == ps.Target.GPU: @@ -213,25 +202,20 @@ def patch_file(class_name, extension, target_suffix, patch): ctx, config, method, templates ) - # generate PackInfo + +def generate_packinfo_kernels(ctx, data_type, fields): + precision_prefix = pystencils_espresso.precision_prefix[ctx.double_accuracy] assignments = pystencils_espresso.generate_pack_info_pdfs_field_assignments( fields, streaming_pattern="pull") spec = pystencils_espresso.generate_pack_info_field_specifications( - config, stencil, force_field.layout) + stencil, data_type, fields["force"].layout) def patch_packinfo_header(content, target_suffix): if target_suffix in ["", "AVX"]: - # fix MPI buffer memory alignment + # remove todo comment token = "\n //TODO: optimize by generating kernel for this case\n" assert token in content content = content.replace(token, "\n") - ft = "float" if "SinglePrecision" in content else "double" - token = " pack(dir, outBuffer.forward(dataSize)" - assert token in content - content = content.replace(token, f"{token[:-1]} + sizeof({ft}))") - token = " unpack(dir, buffer.skip(dataSize)" - assert token in content - content = content.replace(token, f"{token[:-1]} + sizeof({ft}))") elif target_suffix in ["CUDA"]: # replace preprocessor macros and pragmas token = "#define FUNC_PREFIX __global__" @@ -241,11 +225,6 @@ def patch_packinfo_header(content, target_suffix): return content def patch_packinfo_kernel(content, target_suffix): - if target_suffix in ["", "AVX"]: - # fix MPI buffer memory alignment - m = re.search("(float|double) *\* *buffer = reinterpret_cast<(?:float|double) *\*>\(byte_buffer\);\n", content) # nopep8 - assert m is not None - content = content.replace(m.group(0), f"byte_buffer += sizeof({m.group(1)}) - (reinterpret_cast(byte_buffer) - (reinterpret_cast(byte_buffer) / sizeof({m.group(1)})) * sizeof({m.group(1)}));\n {m.group(0)}") # nopep8 if target_suffix in ["CUDA"]: # replace preprocessor macros and pragmas token = "#define FUNC_PREFIX __global__" @@ -267,21 +246,23 @@ def patch_packinfo_kernel(content, target_suffix): ctx, f"PackInfoVec{precision_prefix}{target_suffix}", spec, **params) for suffix in ["Pdf", "Vec"]: class_name = f"PackInfo{suffix}{precision_prefix}{target_suffix}" - patch_file(class_name, get_ext_header(target_suffix), - target_suffix, patch_packinfo_header) - patch_file(class_name, get_ext_source(target_suffix), - target_suffix, patch_packinfo_kernel) + ctx.patch_file(class_name, get_ext_header(target_suffix), + patch_packinfo_header, target_suffix) + ctx.patch_file(class_name, get_ext_source(target_suffix), + patch_packinfo_kernel, target_suffix) + - # boundary conditions +def generate_boundary_kernels(ctx, method, data_type): + precision_prefix = pystencils_espresso.precision_prefix[ctx.double_accuracy] ubb_dynamic = lbmpy_espresso.UBB( - lambda *args: None, dim=3, data_type=config.data_type.default_factory()) + lambda *args: None, dim=3, data_type=data_type) ubb_data_handler = lbmpy_espresso.BounceBackSlipVelocityUBB( method.stencil, ubb_dynamic) # pylint: disable=unused-argument def patch_boundary_header(content, target_suffix): # replace real_t by actual floating-point type - return content.replace("real_t", config.data_type.default_factory().c_name) # nopep8 + return content.replace("real_t", data_type) def patch_boundary_kernel(content, target_suffix): if target_suffix in ["CUDA"]: @@ -296,12 +277,48 @@ def patch_boundary_kernel(content, target_suffix): return content for _, target_suffix in paramlist(parameters, ("CPU", "GPU")): - class_name = f"Dynamic_UBB_{precision_suffix}{target_suffix}" + class_name = f"DynamicUBB{precision_prefix}{target_suffix}" lbmpy_walberla.generate_boundary( ctx, class_name, ubb_dynamic, method, additional_data_handler=ubb_data_handler, streaming_pattern=streaming_pattern, target=target) - patch_file(class_name, get_ext_header(target_suffix), - target_suffix, patch_boundary_header) - patch_file(class_name, get_ext_source(target_suffix), - target_suffix, patch_boundary_kernel) + ctx.patch_file(class_name, get_ext_header(target_suffix), + patch_boundary_header, target_suffix) + ctx.patch_file(class_name, get_ext_source(target_suffix), + patch_boundary_kernel, target_suffix) + + +with code_generation_context.CodeGeneration() as ctx: + ctx.double_accuracy = not args.single_precision + if target == ps.Target.GPU: + ctx.gpu = True + ctx.cuda = True + + # codegen configuration + config = pystencils_espresso.generate_config( + ctx, parameters[default_key][0]) + data_type = "float64" if ctx.double_accuracy else "float32" + fields = pystencils_espresso.generate_fields(stencil, data_type) + + # LB Method definition + method = lbmpy.creationfunctions.create_mrt_orthogonal( + stencil=stencil, + compressible=True, + weighted=True, + relaxation_rates=relaxation_rates.rr_getter, + force_model=lbmpy.forcemodels.Schiller(fields["force"].center_vector) + ) + + if "stream" in args.kernels: + generate_stream_kernels(ctx, method) + if "init" in args.kernels: + generate_init_kernels(ctx, method) + if "collide" in args.kernels: + generate_collide_kernels(ctx, method, data_type) + generate_collide_lees_edwards_kernels(ctx, data_type, fields) + if "accessors" in args.kernels: + generate_accessors_kernels(ctx, method) + if "packinfo" in args.kernels: + generate_packinfo_kernels(ctx, data_type, fields) + if "boundary" in args.kernels: + generate_boundary_kernels(ctx, method, data_type) diff --git a/maintainer/walberla_kernels/lbmpy_espresso.py b/maintainer/walberla_kernels/lbmpy_espresso.py index 8a755d347b0..b891a23ce04 100644 --- a/maintainer/walberla_kernels/lbmpy_espresso.py +++ b/maintainer/walberla_kernels/lbmpy_espresso.py @@ -20,7 +20,7 @@ import pystencils as ps import lbmpy.boundaries -import lbmpy.custom_code_nodes +import lbmpy.boundaries.boundaryconditions import lbmpy_walberla.additional_data_handler @@ -62,13 +62,11 @@ class UBB(lbmpy.boundaries.UBB): currently doesn't support the bounce back scheme we need. ''' - def __call__(self, f_out, f_in, dir_symbol, - inv_dir, lb_method, index_field): + def __call__(self, f_out, f_in, dir_symbol, inv_dir, lb_method, *args): ''' Modify the assignments such that the source and target pdfs are swapped. ''' - assignments = super().__call__( - f_out, f_in, dir_symbol, inv_dir, lb_method, index_field) + assignments = super().__call__(f_out, f_in, dir_symbol, inv_dir, lb_method, *args) assert len(assignments) > 0 @@ -76,7 +74,7 @@ def __call__(self, f_out, f_in, dir_symbol, if len(assignments) > 1: out.extend(assignments[:-1]) - neighbor_offset = lbmpy.custom_code_nodes.NeighbourOffsetArrays.neighbour_offset( + neighbor_offset = lbmpy.boundaries.boundaryconditions.NeighbourOffsetArrays.neighbour_offset( dir_symbol, lb_method.stencil) assignment = assignments[-1] diff --git a/maintainer/walberla_kernels/lees_edwards.py b/maintainer/walberla_kernels/lees_edwards.py index 041162e7068..d8709fcafc5 100644 --- a/maintainer/walberla_kernels/lees_edwards.py +++ b/maintainer/walberla_kernels/lees_edwards.py @@ -17,9 +17,14 @@ # along with this program. If not, see . # -from pystencils.astnodes import LoopOverCoordinate -from pystencils.typing.typed_sympy import TypedSymbol -from pystencils.typing import CastFunc +from pystencils_espresso import get_loop_counter_symbol + +try: + from pystencils.typing import CastFunc +except ImportError: + from pystencils.sympyextensions import CastFunc + +from pystencils import TypedSymbol from pystencils import Assignment from lbmpy.macroscopic_value_kernels import macroscopic_values_setter @@ -50,8 +55,7 @@ def velocity_offset_eqs(config, method, pdfs, shear_dir_normal, stencil): # Symbol for the coordinate index within the field, # used to identify boundary layers - counters = [LoopOverCoordinate.get_loop_counter_symbol( - i) for i in range(dim)] + counters = [get_loop_counter_symbol(i) for i in range(dim)] grid_size = TypedSymbol("grid_size", dtype=default_dtype) diff --git a/maintainer/walberla_kernels/pystencils_espresso.py b/maintainer/walberla_kernels/pystencils_espresso.py index 1fd3321aeb9..f5196218dc0 100644 --- a/maintainer/walberla_kernels/pystencils_espresso.py +++ b/maintainer/walberla_kernels/pystencils_espresso.py @@ -25,9 +25,20 @@ import pystencils as ps import pystencils_walberla import pystencils_walberla.utility +from pystencils import TypedSymbol -from pystencils.astnodes import LoopOverCoordinate -from pystencils.backends.cbackend import CustomCodeNode +try: + # pystencils < 2.0 + from pystencils.backends.cbackend import CustomCodeNode + from pystencils.astnodes import LoopOverCoordinate + get_loop_counter_symbol = LoopOverCoordinate.get_loop_counter_symbol +except ImportError: + # pystencils >= 2.0 + CustomCodeNode = None + from pystencils.defaults import DEFAULTS + + def get_loop_counter_symbol(i): + return TypedSymbol(DEFAULTS.spatial_counters[i], np.uint32) def skip_philox_unthermalized(code, result_symbols, rng_name): @@ -50,7 +61,7 @@ def get_code(self, *args, **kwargs): class PhiloxTwoDoublesModulo(ps.rng.PhiloxTwoDoubles): - def __init__(self, dim, time_step=ps.typing.TypedSymbol( + def __init__(self, dim, time_step=TypedSymbol( "time_step", np.uint32), *args, **kwargs): super().__init__(dim, time_step=time_step, *args, **kwargs) @@ -65,16 +76,13 @@ def __init__(self, dim, time_step=ps.typing.TypedSymbol( offsets = kwargs.get("offsets") coordinates = [ - LoopOverCoordinate.get_loop_counter_symbol(i) + - offsets[i] for i in range(dim)] + get_loop_counter_symbol(i) + offsets[i] for i in range(dim)] if dim < 3: coordinates.append(0) # add folding to coordinates with symbols field_sizes = [ - ps.typing.TypedSymbol( - f"field_size_{i}", - np.uint32) for i in range(dim)] + TypedSymbol(f"field_size_{i}", np.uint32) for i in range(dim)] new_coordinates = [ (coord) % @@ -88,11 +96,12 @@ def __init__(self, dim, time_step=ps.typing.TypedSymbol( headers = self.headers # set headers again, since the constructor of CustomCodeNode resets the # header-list - CustomCodeNode.__init__( - self, - "", - symbols_read=symbols_read, - symbols_defined=self.result_symbols) + if CustomCodeNode is not None: + CustomCodeNode.__init__( + self, + "", + symbols_read=symbols_read, + symbols_defined=self.result_symbols) self.headers = headers @@ -103,7 +112,7 @@ def get_code(self, *args, **kwargs): class PhiloxFourFloatsModulo(ps.rng.PhiloxFourFloats): - def __init__(self, dim, time_step=ps.typing.TypedSymbol( + def __init__(self, dim, time_step=TypedSymbol( "time_step", np.uint32), *args, **kwargs): super().__init__(dim, time_step=time_step, *args, **kwargs) @@ -118,16 +127,13 @@ def __init__(self, dim, time_step=ps.typing.TypedSymbol( offsets = kwargs.get("offsets") coordinates = [ - LoopOverCoordinate.get_loop_counter_symbol(i) + - offsets[i] for i in range(dim)] + get_loop_counter_symbol(i) + offsets[i] for i in range(dim)] if dim < 3: coordinates.append(0) # add folding to coordinates with symbols field_sizes = [ - ps.typing.TypedSymbol( - f"field_size_{i}", - np.uint32) for i in range(dim)] + TypedSymbol(f"field_size_{i}", np.uint32) for i in range(dim)] new_coordinates = [ (coord) % @@ -161,11 +167,9 @@ def __init__(self, dim, time_step=ps.typing.TypedSymbol( precision_rng_modulo = { True: PhiloxTwoDoublesModulo, False: PhiloxFourFloatsModulo} -data_type_np = {'double': 'float64', 'float': 'float32'} -def generate_fields(config, stencil, field_layout='fzyx'): - dtype = data_type_np[config.data_type.default_factory().c_name] +def generate_fields(stencil, data_type, field_layout='fzyx'): q = len(stencil) dim = len(stencil[0]) @@ -174,7 +178,7 @@ def generate_fields(config, stencil, field_layout='fzyx'): fields['pdfs'] = ps.Field.create_generic( 'pdfs', dim, - dtype, + data_type, index_dimensions=1, layout=field_layout, index_shape=(q,) @@ -182,7 +186,7 @@ def generate_fields(config, stencil, field_layout='fzyx'): fields['pdfs_tmp'] = ps.Field.create_generic( 'pdfs_tmp', dim, - dtype, + data_type, index_dimensions=1, layout=field_layout, index_shape=(q,) @@ -190,7 +194,7 @@ def generate_fields(config, stencil, field_layout='fzyx'): fields['velocity'] = ps.Field.create_generic( 'velocity', dim, - dtype, + data_type, index_dimensions=1, layout=field_layout, index_shape=(dim,) @@ -198,7 +202,7 @@ def generate_fields(config, stencil, field_layout='fzyx'): fields['force'] = ps.Field.create_generic( 'force', dim, - dtype, + data_type, index_dimensions=1, layout=field_layout, index_shape=(dim,) @@ -240,13 +244,13 @@ def generate_pack_info_pdfs_field_assignments(fields, streaming_pattern): def generate_pack_info_field_specifications( - config, stencil, layout, vec_len=3): + stencil, data_type, layout, vec_len=3): import collections import itertools field = ps.Field.create_generic( "field", 3, - data_type_np[config.data_type.default_factory().c_name], + data_type, index_dimensions=1, layout=layout, index_shape=(vec_len,) @@ -267,11 +271,11 @@ def generate_config(ctx, params): def generate_collision_sweep( - ctx, lb_method, collision_rule, class_name, params, **kwargs): + ctx, lb_method, data_type, collision_rule, class_name, params, **kwargs): config = generate_config(ctx, params) # Symbols for PDF (twice, due to double buffering) - fields = generate_fields(config, lb_method.stencil) + fields = generate_fields(lb_method.stencil, data_type) # Generate collision kernel collide_update_rule = lbmpy.updatekernels.create_lbm_kernel( @@ -287,11 +291,11 @@ def generate_collision_sweep( ctx, class_name, collide_ast, **params, **kwargs) -def generate_stream_sweep(ctx, lb_method, class_name, params): +def generate_stream_sweep(ctx, lb_method, data_type, class_name, params): config = generate_config(ctx, params) # Symbols for PDF (twice, due to double buffering) - fields = generate_fields(config, lb_method.stencil) + fields = generate_fields(lb_method.stencil, data_type) # Generate stream kernel stream_update_rule = lbmpy.updatekernels.create_stream_pull_with_output_kernel( @@ -305,9 +309,8 @@ def generate_stream_sweep(ctx, lb_method, class_name, params): field_swaps=[(fields['pdfs'], fields['pdfs_tmp'])], **params) -def generate_setters(ctx, lb_method, params): - config = generate_config(ctx, params) - fields = generate_fields(config, lb_method.stencil) +def generate_setters(lb_method, data_type): + fields = generate_fields(lb_method.stencil, data_type) initial_rho = sp.Symbol('rho_0') pdfs_setter = lbmpy.macroscopic_value_kernels.macroscopic_values_setter( @@ -316,20 +319,3 @@ def generate_setters(ctx, lb_method, params): fields['velocity'].center_vector, fields['pdfs'].center_vector) return pdfs_setter - - -# this can be removed when https://i10git.cs.fau.de/walberla/walberla/-/issues/247 is fixed -def generate_staggered_flux_boundary(generation_context, class_name, boundary_object, - dim, neighbor_stencil, index_shape, target=ps.Target.CPU, **kwargs): - assert dim == len(neighbor_stencil[0]) - pystencils_walberla.boundary.generate_boundary( - generation_context=generation_context, - class_name=class_name, - boundary_object=boundary_object, - field_name='flux', - neighbor_stencil=neighbor_stencil, - index_shape=index_shape, - field_type=ps.FieldType.STAGGERED_FLUX, - kernel_creation_function=None, - target=target, - **kwargs) diff --git a/maintainer/walberla_kernels/walberla_lbm_generation.py b/maintainer/walberla_kernels/walberla_lbm_generation.py index 6aec095662d..360f7d92a55 100644 --- a/maintainer/walberla_kernels/walberla_lbm_generation.py +++ b/maintainer/walberla_kernels/walberla_lbm_generation.py @@ -23,8 +23,16 @@ import sympy as sp import pystencils as ps import lbmpy_walberla -from pystencils.typing.typed_sympy import TypedSymbol -from pystencils.typing import BasicType, CastFunc, TypedSymbol +from pystencils import TypedSymbol +try: + from pystencils.typing import CastFunc +except ImportError: + from pystencils.sympyextensions import CastFunc +try: + from pystencils.typing import BasicType as PsScalarType +except ImportError: + from pystencils.types import PsScalarType + # File derived from lbmpy_walberla.walberla_lbm_generation in the # walberla project, commit 3455bf3eebc64efa9beaecd74ebde3459b98991d @@ -82,7 +90,7 @@ def make_velocity_getters(cqc, rho_sym, vel_arr_symbols): def equations_to_code(equations, variable_prefix="", variables_without_prefix=None, dtype=None, backend=None): if dtype is None: - dtype = BasicType("float64") + dtype = PsScalarType("float64") if variables_without_prefix is None: variables_without_prefix = [] diff --git a/requirements.txt b/requirements.txt index aa15ed26176..937dc09a81b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,10 +16,10 @@ vtk>=9.1.0 PyOpenGL>=3.1.5 pygame>=2.1.2 # waLBerla dependencies -pystencils==1.3.3 -lbmpy==1.3.3 -sympy==1.9 -islpy==2022.2.1 +pystencils==1.3.7 +lbmpy==1.3.7 +sympy>=1.9 +islpy>=2024 jinja2>=3.1.2 # CI-related requests>=2.32.0 diff --git a/samples/lj_liquid_structurefactor.py b/samples/lj_liquid_structurefactor.py index 3791883259b..af54546bae9 100644 --- a/samples/lj_liquid_structurefactor.py +++ b/samples/lj_liquid_structurefactor.py @@ -26,8 +26,10 @@ with :meth:`~espressomd.analyze.Analysis.structure_factor()`. See :ref:`Structure factor`. """ +import matplotlib.pyplot as plt import numpy as np import espressomd +import tqdm required_features = ["LENNARD_JONES"] espressomd.assert_features(required_features) @@ -74,15 +76,6 @@ # Setup System # ############################################################# -# structure factor file -structurefactor_type_list = [0, 1] -structurefactor_order = 20 -structurefactor_bins = len(system.analysis.structure_factor( - sf_types=[0], sf_order=structurefactor_order)[0]) -structurefactor_k = np.zeros(structurefactor_bins) -structurefactor_Sk = np.zeros(structurefactor_bins) - - # Interaction setup ############################################################# system.non_bonded_inter[0, 0].lennard_jones.set_params( @@ -139,7 +132,6 @@ # Just to see what else we may get from the C++ core import pprint pprint.pprint(system.cell_system.get_state(), width=1) -pprint.pprint(system.__getstate__()) ############################################################# @@ -147,26 +139,16 @@ ############################################################# print(f"\nStart integration: run {int_n_times} times {int_steps} steps") -for i in range(int_n_times): - print(f"run {i} at time={system.time:.2f}") - +types = [0, 1] +sf_Sk_avg = None +for i in tqdm.trange(int_n_times): system.integrator.run(int_steps) - - structurefactor_k, structurefactor_Sk = system.analysis.structure_factor( - sf_types=structurefactor_type_list, sf_order=structurefactor_order) - - energies = system.analysis.energy() - print(energies['total']) - linear_momentum = system.analysis.linear_momentum() - print(linear_momentum) - - -# rescale structure factor values and write out data -structurefactor_Sk /= int_n_times -table = np.column_stack([structurefactor_k, structurefactor_Sk]) -np.savetxt("pylj_liquid_structurefactor.tsv", table, delimiter='\t', - fmt='%.5e', header="k,S(k)") -# reload: sf_k, sf_Sk = np.loadtxt("pylj_liquid_structurefactor.tsv").T - -# terminate program -print("\nFinished.") + sf_k, sf_Sk = system.analysis.structure_factor(sf_types=types, sf_order=20) + if sf_Sk_avg is None: + sf_Sk_avg = np.zeros(sf_Sk.shape, dtype=float) + sf_Sk_avg += np.copy(sf_Sk) / int_n_times + +plt.plot(sf_k, sf_Sk_avg) +plt.xlabel("Wavevector $q$") +plt.ylabel("Structure factor $S(q)$") +plt.show() diff --git a/src/config/features.def b/src/config/features.def index ff8eb2a0413..e028f87a2b4 100644 --- a/src/config/features.def +++ b/src/config/features.def @@ -115,3 +115,4 @@ WALBERLA external WALBERLA_FFT external VALGRIND external CALIPER external +FPE external diff --git a/src/core/electrostatics/actor.hpp b/src/core/electrostatics/actor.hpp index f178eab90cf..ed5d64d07d9 100644 --- a/src/core/electrostatics/actor.hpp +++ b/src/core/electrostatics/actor.hpp @@ -34,6 +34,10 @@ void check_charge_neutrality(System::System const &system, double relative_tolerance); template class Actor : public System::Leaf> { +private: + Actor() = default; + friend Class; + public: static auto constexpr charge_neutrality_tolerance_default = 2e-12; /** diff --git a/src/core/electrostatics/elc.cpp b/src/core/electrostatics/elc.cpp index 4e28654ae1c..0b47c54ad29 100644 --- a/src/core/electrostatics/elc.cpp +++ b/src/core/electrostatics/elc.cpp @@ -444,10 +444,6 @@ void ElectrostaticLayerCorrection::add_z_force( auto const &box_geo = *get_system().box_geo; auto const xy_area_inv = box_geo.length_inv()[0] * box_geo.length_inv()[1]; auto const pref = prefactor * 2. * std::numbers::pi * xy_area_inv; - auto const delta = elc.delta_mid_top * elc.delta_mid_bot; - auto const fac_delta_mid_bot = elc.delta_mid_bot / (1. - delta); - auto const fac_delta_mid_top = elc.delta_mid_top / (1. - delta); - auto const fac_delta = delta / (1. - delta); if (elc.dielectric_contrast_on) { if (elc.const_pot) { @@ -462,6 +458,11 @@ void ElectrostaticLayerCorrection::add_z_force( gblcblk[0] += elc.delta_mid_top * q; } } else { + // metallic boundaries + auto const delta = elc.delta_mid_top * elc.delta_mid_bot; + auto const fac_delta_mid_bot = elc.delta_mid_bot / (1. - delta); + auto const fac_delta_mid_top = elc.delta_mid_top / (1. - delta); + auto const fac_delta = delta / (1. - delta); clear_vec(gblcblk, size); for (auto const &p : particles) { auto const z = p.pos()[2]; diff --git a/src/core/electrostatics/p3m.cpp b/src/core/electrostatics/p3m.cpp index 99edb97c4cc..5add3db6b65 100644 --- a/src/core/electrostatics/p3m.cpp +++ b/src/core/electrostatics/p3m.cpp @@ -151,6 +151,7 @@ static auto p3m_tune_aliasing_sums(Utils::Vector3i const &shift, auto constexpr mesh_start = Utils::Vector3i::broadcast(-P3M_BRILLOUIN); auto constexpr mesh_stop = Utils::Vector3i::broadcast(P3M_BRILLOUIN + 1); + auto constexpr exp_min = -708.4; // for IEEE-compatible double auto const factor1 = Utils::sqr(std::numbers::pi * alpha_L_i); auto alias1 = 0.; auto alias2 = 0.; @@ -162,7 +163,9 @@ static auto p3m_tune_aliasing_sums(Utils::Vector3i const &shift, mesh_start, mesh_stop, indices, [&]() { auto const norm_sq = nm.norm2(); - auto const ex = exp(-factor1 * norm_sq); + auto const exponent = -factor1 * norm_sq; + auto const exp_limit = (exp_min + std::log(norm_sq)) / 2.; + auto const ex = (exponent < exp_limit) ? 0. : std::exp(exponent); auto const energy = std::pow(Utils::product(fnm), 2 * cao); alias1 += Utils::sqr(ex) / norm_sq; alias2 += energy * ex * (shift * nm) / norm_sq; diff --git a/src/core/field_coupling/couplings/Direct.hpp b/src/core/field_coupling/couplings/Direct.hpp index fdd0592f169..a32552bda51 100644 --- a/src/core/field_coupling/couplings/Direct.hpp +++ b/src/core/field_coupling/couplings/Direct.hpp @@ -19,14 +19,16 @@ #ifndef EXTERNAL_FIELD_COUPLING_DIRECT_HPP #define EXTERNAL_FIELD_COUPLING_DIRECT_HPP +#include + namespace FieldCoupling { namespace Coupling { class Direct { public: static constexpr bool is_linear = true; template - const T &operator()(const Particle &, const T &x) const { - return x; + T &&operator()(const Particle &, T &&x) const { + return std::forward(x); } }; } // namespace Coupling diff --git a/src/core/integrate.cpp b/src/core/integrate.cpp index 9ed1d628a49..a5be8e9b7c4 100644 --- a/src/core/integrate.cpp +++ b/src/core/integrate.cpp @@ -620,6 +620,7 @@ int System::System::integrate(int n_steps, int reuse_forces) { << "LB and EK are active but with different time steps."; } + assert(not lb.is_gpu()); assert(propagation.lb_skipped_md_steps == propagation.ek_skipped_md_steps); diff --git a/src/core/magnetostatics/actor.hpp b/src/core/magnetostatics/actor.hpp index 7578ed1112b..4cdf9d32541 100644 --- a/src/core/magnetostatics/actor.hpp +++ b/src/core/magnetostatics/actor.hpp @@ -30,6 +30,10 @@ namespace Dipoles { template class Actor : public System::Leaf> { +private: + Actor() = default; + friend Class; + public: /** * @brief Magnetostatics prefactor. diff --git a/src/core/magnetostatics/dp3m.cpp b/src/core/magnetostatics/dp3m.cpp index 1310ff24a75..5d6f167caa1 100644 --- a/src/core/magnetostatics/dp3m.cpp +++ b/src/core/magnetostatics/dp3m.cpp @@ -768,6 +768,7 @@ static double dp3m_k_space_error(double box_size, int mesh, int cao, static double dp3m_real_space_error(double box_size, double r_cut_iL, int n_c_part, double sum_q2, double alpha_L) { + auto constexpr exp_min = -708.4; // for IEEE-compatible double double d_error_f, d_cc, d_dc, d_con; auto const d_rcut = r_cut_iL * box_size; @@ -775,8 +776,9 @@ static double dp3m_real_space_error(double box_size, double r_cut_iL, auto const d_rcut4 = Utils::sqr(d_rcut2); auto const d_a2 = Utils::sqr(alpha_L) / Utils::sqr(box_size); - - auto const d_c = sum_q2 * exp(-d_a2 * d_rcut2); + auto const exponent = -d_a2 * d_rcut2; + auto const exp_term = (exponent < exp_min) ? 0. : std::exp(exponent); + auto const d_c = sum_q2 * exp_term; d_cc = 4. * Utils::sqr(d_a2) * Utils::sqr(d_rcut2) + 6. * d_a2 * d_rcut2 + 3.; diff --git a/src/core/reaction_methods/ReactionAlgorithm.cpp b/src/core/reaction_methods/ReactionAlgorithm.cpp index 341fc0a191b..af2642acae3 100644 --- a/src/core/reaction_methods/ReactionAlgorithm.cpp +++ b/src/core/reaction_methods/ReactionAlgorithm.cpp @@ -274,7 +274,9 @@ double ReactionAlgorithm::make_reaction_mc_move_attempt(int reaction_id, double bf, double E_pot_old, double E_pot_new) { - auto const exponential = std::exp(-(E_pot_new - E_pot_old) / kT); + auto constexpr exp_min = -708.4; // for IEEE-compatible double + auto const exponent = -(E_pot_new - E_pot_old) / kT; + auto const exponential = (exponent < exp_min) ? 0. : std::exp(exponent); auto &reaction = *reactions[reaction_id]; reaction.accumulator_potential_energy_difference_exponential( std::vector{exponential}); @@ -579,9 +581,12 @@ bool ReactionAlgorithm::make_displacement_mc_move_attempt(int type, auto const E_pot_new = (particle_inside_exclusion_range_touched) ? std::numeric_limits::max() : calculate_potential_energy(); + auto constexpr exp_min = -708.4; // for IEEE-compatible double + auto const exponent = -(E_pot_new - E_pot_old) / kT; + auto const exponential = (exponent < exp_min) ? 0. : std::exp(exponent); // Metropolis algorithm since proposal density is symmetric - auto const bf = std::min(1., std::exp(-(E_pot_new - E_pot_old) / kT)); + auto const bf = std::min(1., exponential); // // correct for enhanced proposal of small radii by using the // // Metropolis-Hastings algorithm for asymmetric proposal densities diff --git a/src/core/system/Leaf.hpp b/src/core/system/Leaf.hpp index d6c911457c2..5ee8ec8894d 100644 --- a/src/core/system/Leaf.hpp +++ b/src/core/system/Leaf.hpp @@ -32,6 +32,10 @@ class System; * See @ref SystemClassDesign for more details. */ template class Leaf { +private: + Leaf() = default; + friend Class; + protected: std::weak_ptr m_system; diff --git a/src/core/unit_tests/EspressoSystemStandAlone_test.cpp b/src/core/unit_tests/EspressoSystemStandAlone_test.cpp index 47d9a3d5158..bbc0e4bbe48 100644 --- a/src/core/unit_tests/EspressoSystemStandAlone_test.cpp +++ b/src/core/unit_tests/EspressoSystemStandAlone_test.cpp @@ -58,6 +58,8 @@ namespace utf = boost::unit_test; #include "particle_node.hpp" #include "system/System.hpp" +#include + #include #include #include @@ -95,6 +97,9 @@ BOOST_FIXTURE_TEST_CASE(espresso_system_stand_alone, ParticleFactory) { auto const comm = boost::mpi::communicator(); auto const rank = comm.rank(); auto const n_nodes = comm.size(); +#ifdef FPE + auto const trap = fe_trap::make_unique_scoped(); +#endif auto const box_l = 12.; auto const box_center = box_l / 2.; diff --git a/src/core/unit_tests/RuntimeError_test.cpp b/src/core/unit_tests/RuntimeError_test.cpp index 54e5f5eca19..f2a14ae9d44 100644 --- a/src/core/unit_tests/RuntimeError_test.cpp +++ b/src/core/unit_tests/RuntimeError_test.cpp @@ -65,8 +65,7 @@ BOOST_AUTO_TEST_CASE(def_ctor_and_assignment) { RuntimeError err(level, who, what, function, file, line); /* Copy ctor */ - RuntimeError err2(err); // NOLINT (local copy 'err2' of the variable 'err' is - // never modified; consider avoiding the copy) + RuntimeError err2(err); // NOLINT(performance-unnecessary-copy-initialization) BOOST_CHECK(level == err2.level()); BOOST_CHECK(what == err2.what()); diff --git a/src/core/unit_tests/ek_interface_test.cpp b/src/core/unit_tests/ek_interface_test.cpp index 0abe8917bdb..18264623c9f 100644 --- a/src/core/unit_tests/ek_interface_test.cpp +++ b/src/core/unit_tests/ek_interface_test.cpp @@ -150,6 +150,7 @@ BOOST_AUTO_TEST_CASE(ek_interface_walberla) { espresso::ek_lattice, params.diffusion, params.kT, params.valency, params.ext_efield, params.density, false, false, single_precision, false, 0u); + ek_species->ghost_communication(); auto ek_reactant = std::make_shared(ek_species, stoich, order); auto ek_reaction = std::make_shared( espresso::ek_lattice, diff --git a/src/instrumentation/CMakeLists.txt b/src/instrumentation/CMakeLists.txt index ecf8fda7f4f..190c3008183 100644 --- a/src/instrumentation/CMakeLists.txt +++ b/src/instrumentation/CMakeLists.txt @@ -19,6 +19,10 @@ add_library(espresso_instrumentation INTERFACE) add_library(espresso::instrumentation ALIAS espresso_instrumentation) +target_include_directories( + espresso_instrumentation + INTERFACE $ + $) if(ESPRESSO_BUILD_WITH_VALGRIND) target_include_directories(espresso_instrumentation @@ -31,3 +35,16 @@ if(ESPRESSO_BUILD_WITH_CALIPER) espresso_instrumentation INTERFACE "${caliper_SOURCE_DIR}/include" "${caliper_BINARY_DIR}/include") endif() + +if(ESPRESSO_BUILD_WITH_FPE) + add_library(espresso_fpe SHARED src/fe_trap.cpp) + add_library(espresso::fpe ALIAS espresso_fpe) + target_link_libraries(espresso_fpe PRIVATE espresso::config + espresso::cpp_flags) + target_include_directories( + espresso_fpe PUBLIC $ + $) + target_link_libraries(espresso_instrumentation INTERFACE espresso::fpe) +endif() + +add_subdirectory(tests) diff --git a/src/instrumentation/include/instrumentation/fe_trap.hpp b/src/instrumentation/include/instrumentation/fe_trap.hpp new file mode 100644 index 00000000000..0f551c89037 --- /dev/null +++ b/src/instrumentation/include/instrumentation/fe_trap.hpp @@ -0,0 +1,147 @@ +/* + * Copyright (C) 2024 The ESPResSo project + * + * This file is part of ESPResSo. + * + * ESPResSo is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * ESPResSo is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include + +#ifdef FPE + +#include +#include +#include +#include + +/** + * @brief Floating-point exception trap. + * + * Thread-safe RAII-style mechanism to trap floating-point exceptions + * (on platforms that support floating-point environment management) for + * the duration of a scoped block. Exception traps are set when the object + * is created; when getting out-of-scope, either normally or during stack + * unwinding, the exception traps are automatically reset. + * + * Please note "exception" and "exception handling" have a specific meaning + * in this context and are completely unrelated to C++ exceptions. + * For more details, see annex F IEC 60559 "floating-point arithmetic" + * in ISO/EIC 9899 @cite ISO-EIC-9899-1999 and chapter 7 + * "Exceptions and default exception handling" in + * ISO/IEC 60559:2020(E) @cite ISO-EIC-60559-2020. + * + * The exception handling behavior is implementation-defined. For example, + * GNU libc sends the @c SIGFPE signal on x86 architectures; it can be caught + * by a signal handler that leverages stack environments and long jumps via + * [`sigsetjmp()`](https://www.man7.org/linux/man-pages/man3/sigsetjmp.3.html). + * On Armv8, trapping is controlled by FPCR flags; for more details, + * see section C5.2.8 "FPCR, Floating-point Control Register" in the Armv8 + * manual @cite ARM-DDI-0487-2024. AppleClang sends the @c SIGILL signal + * on Apple Silicon architectures. + * + * A modified singleton pattern is leveraged to guarantee only one trap is + * active at any time; once expired, a new trap can be instantiated. + * The @ref make_unique_scoped function returns a wrapper object whose + * lifetime determines the trap duration. To set a trap in a recursive + * function, use @ref make_shared_scoped instead. + * + * Usage: + * @code{.cpp} + * #include + * #include + * int main() { + * auto volatile zero = 0.; + * auto value = 1. / zero; // generate NaN + * { + * auto trap = fe_trap::make_unique_scoped(); + * value = 1. / zero; // execution flow should be interrupted here + * } + * value = 1. / zero; // generate NaN + * return std::isnan(value) ? 0 : 1; + * } + * @endcode + * Build the code without fast-math and without any optimization + * (optimizations always assume divisions by zero cannot happen): + * @code{.sh} + * g++ -std=c++20 -O0 -fno-fast-math -I../src/instrumentation/include \ + * -I../src/config/include -Isrc/config/include \ + * main.cpp ../src/instrumentation/src/fe_trap.cpp + * ./a.out + * } + * @endcode + */ +class fe_trap { + struct global_state_params { + std::weak_ptr observer; + std::mutex mutex; + }; + static global_state_params global_state; + + struct scoped_instance { + explicit scoped_instance(std::shared_ptr ptr) + : m_resource{std::move(ptr)} {} + scoped_instance(scoped_instance const &) = delete; + scoped_instance(scoped_instance &&) noexcept = default; + scoped_instance &operator=(scoped_instance const &) = delete; + scoped_instance &operator=(scoped_instance &&) noexcept = default; + bool is_unique() const { return m_resource->is_unique(); } + int get_flags() const { return m_resource->get_flags(); } + + private: + std::shared_ptr m_resource; + }; + + struct deleter { + void operator()(fe_trap *ptr) { delete ptr; } + }; + friend deleter; + + int m_flags; + bool m_unique; + + fe_trap(std::optional excepts, bool unique); + ~fe_trap(); + + static int parse_excepts(std::optional excepts); + +public: + fe_trap(fe_trap const &) = delete; + fe_trap(fe_trap &&) noexcept = delete; + fe_trap &operator=(fe_trap const &) = delete; + fe_trap &operator=(fe_trap &&) noexcept = delete; + /** @brief Get floating-point exception flags. */ + int get_flags() const { return m_flags; } + /** @brief Check if this handle is a unique handle. */ + bool is_unique() const { return m_unique; } + + /** + * @brief Generate a unique trap with the lifetime of the current scope. + * @param excepts Combination of floating-point exception flags. + */ + static scoped_instance + make_unique_scoped(std::optional excepts = std::nullopt); + /** + * @brief Generate a shared trap with the lifetime of the current scope. + * Subsequent calls to this function will yield the same trap handle, + * as long as they have the same parameter @c excepts. + * @param excepts Combination of floating-point exception flags. + */ + static scoped_instance + make_shared_scoped(std::optional excepts = std::nullopt); +}; + +#endif // FPE diff --git a/src/instrumentation/src/fe_trap.cpp b/src/instrumentation/src/fe_trap.cpp new file mode 100644 index 00000000000..038d37e49bb --- /dev/null +++ b/src/instrumentation/src/fe_trap.cpp @@ -0,0 +1,139 @@ +/* + * Copyright (C) 2024 The ESPResSo project + * + * This file is part of ESPResSo. + * + * ESPResSo is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * ESPResSo is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include + +#ifdef FPE + +#include + +#include +#include +#include +#include +#include +#include +#include + +#if defined(__STDC_IEC_559__) and defined(__GLIBC__) and defined(__x86_64__) +#define ESPRESSO_FPE_USING_GLIBC_X86_64 +#elif defined(__arm64__) and defined(__APPLE__) +#define ESPRESSO_FPE_USING_APPLE_ARM_64 +#endif + +fe_trap::global_state_params fe_trap::global_state{{}, {}}; + +fe_trap::fe_trap(std::optional excepts, bool unique) { +#if defined(ESPRESSO_FPE_USING_GLIBC_X86_64) + { + m_flags = parse_excepts(excepts); + [[maybe_unused]] auto const status = feenableexcept(m_flags); + // note: status should be 0 since we use the singleton pattern + assert(status == 0); + } +#elif defined(ESPRESSO_FPE_USING_APPLE_ARM_64) + { + using fpcr_t = decltype(std::fenv_t::__fpcr); + m_flags = parse_excepts(excepts); + std::fenv_t env; + { + [[maybe_unused]] auto const status = std::fegetenv(&env); + assert(status == 0u); + } + env.__fpcr |= static_cast(m_flags); + { + [[maybe_unused]] auto const status = std::fesetenv(&env); + assert(status == 0u); + } + } +#else +#error "FE not supported" +#endif + m_unique = unique; +} + +fe_trap::~fe_trap() { +#if defined(ESPRESSO_FPE_USING_GLIBC_X86_64) + { + [[maybe_unused]] auto const status = fedisableexcept(m_flags); + // note: status can become 0 in a signal handler that calls @c siglongjmp() + assert(status == 0 or status == m_flags); + } +#elif defined(ESPRESSO_FPE_USING_APPLE_ARM_64) + { + using fpcr_t = decltype(std::fenv_t::__fpcr); + std::fenv_t env; + { + [[maybe_unused]] auto const status = std::fegetenv(&env); + assert(status == 0u); + } + assert((env.__fpcr & static_cast(m_flags)) == + static_cast(m_flags)); + env.__fpcr &= static_cast(~m_flags); + { + [[maybe_unused]] auto const status = std::fesetenv(&env); + assert(status == 0u); + } + } +#else +#error "FE not supported" +#endif +} + +int fe_trap::parse_excepts(std::optional excepts) { + auto const fallback = FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW; + int retval = excepts ? *excepts : fallback; +#if defined(ESPRESSO_FPE_USING_APPLE_ARM_64) + retval <<= 8; +#endif + return retval; +} + +fe_trap::scoped_instance +fe_trap::make_unique_scoped(std::optional excepts) { + std::lock_guard lock(fe_trap::global_state.mutex); + if (fe_trap::global_state.observer.lock()) { + throw std::runtime_error("Cannot create more than 1 instance of fe_trap"); + } + auto raw_ptr = new fe_trap(excepts, true); + auto watched = std::shared_ptr(raw_ptr, deleter{}); + fe_trap::global_state.observer = watched; + return fe_trap::scoped_instance(watched); +} + +fe_trap::scoped_instance +fe_trap::make_shared_scoped(std::optional excepts) { + std::lock_guard lock(fe_trap::global_state.mutex); + if (auto watched = fe_trap::global_state.observer.lock()) { + if (watched->is_unique()) { + throw std::runtime_error("Cannot create more than 1 instance of fe_trap"); + } + if (watched->get_flags() != parse_excepts(excepts)) { + throw std::invalid_argument( + "Cannot mix different exceptions with fe_trap"); + } + return fe_trap::scoped_instance(watched); + } + auto raw_ptr = new fe_trap(excepts, false); + auto watched = std::shared_ptr(raw_ptr, deleter{}); + fe_trap::global_state.observer = watched; + return fe_trap::scoped_instance(watched); +} + +#endif // FPE diff --git a/src/instrumentation/tests/CMakeLists.txt b/src/instrumentation/tests/CMakeLists.txt new file mode 100644 index 00000000000..7dd237b4c77 --- /dev/null +++ b/src/instrumentation/tests/CMakeLists.txt @@ -0,0 +1,24 @@ +# +# Copyright (C) 2024 The ESPResSo project +# +# This file is part of ESPResSo. +# +# ESPResSo is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# ESPResSo is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +include(espresso_unit_test) + +if(ESPRESSO_BUILD_WITH_FPE) + espresso_unit_test(SRC fe_trap_test.cpp DEPENDS espresso::fpe) +endif() diff --git a/src/instrumentation/tests/fe_trap_test.cpp b/src/instrumentation/tests/fe_trap_test.cpp new file mode 100644 index 00000000000..90576b963c5 --- /dev/null +++ b/src/instrumentation/tests/fe_trap_test.cpp @@ -0,0 +1,178 @@ +/* + * Copyright (C) 2024 The ESPResSo project + * + * This file is part of ESPResSo. + * + * ESPResSo is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * ESPResSo is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#define BOOST_TEST_MODULE "floating-point exceptions test" +#define BOOST_TEST_DYN_LINK + +#include + +#if defined(__STDC_IEC_559__) and defined(__GLIBC__) and defined(__x86_64__) +#define ESPRESSO_FPE_IS_SUPPORTED +#define ESPRESSO_FPE_USING_GLIBC_X86_64 +#elif defined(__arm64__) and defined(__APPLE__) +#define ESPRESSO_FPE_IS_SUPPORTED +#define ESPRESSO_FPE_USING_APPLE_ARM_64 +#endif + +#if defined(ESPRESSO_FPE_IS_SUPPORTED) and not defined(__FAST_MATH__) +#include + +#include + +#include + +#if defined(ESPRESSO_FPE_USING_GLIBC_X86_64) +#include +#include +#include +#include +#include + +static volatile std::sig_atomic_t last_signal_status = 0; +static volatile std::sig_atomic_t last_signal_code = 0; +static std::jmp_buf jmp_env; + +static void fpe_signal_handler(int signum, siginfo_t *sip, void *) { + /* Signal handlers always return to the instruction that failed, + * which leads to an infinite loop if the signal was sent by the + * instruction itself. + * + * In the case of @c SIGFPE, we cannot design an abnormal mathematical + * operation that relies on a volatile-qualified variable that can be + * changed from within the signal handler (undefined behavior). + * But we can long jump out of the signal handler, + * as long as the signal wasn't sent by an operation that isn't + * async-signal-safe, see POSIX.1-2008 Technical Corrigendum 2: + * https://www.man7.org/linux/man-pages/man3/sigsetjmp.3.html#:~:text=Undefined%20Behavior + * and the GNU libc relevant page: + * https://www.gnu.org/savannah-checkouts/gnu/libc/manual/html_node/Longjmp-in-Handler.html + * A call to @c siglongjmp is needed to preserve the signal mask, otherwise + * the signal handler won't be able to catch any more signals, see: + * https://pubs.opengroup.org/onlinepubs/9699919799/functions/sigaction.html#tag_16_540_07 + */ + ::last_signal_status = signum; + ::last_signal_code = sip->si_code; + siglongjmp(::jmp_env, 1); +} + +static void set_sigaction(int signum, struct sigaction const *new_action, + struct sigaction *old_action) { + [[maybe_unused]] auto const ret = sigaction(signum, new_action, old_action); + assert(ret == 0); +} + +BOOST_AUTO_TEST_CASE(trap_by_signal) { + // declare local variables volatile to avoid compiler optimizations + double volatile bad_denominator = 0.; + double volatile bad_exponent = 10000.; + double volatile value = 1.; + // without instrumentation, abnormal operations are allowed + value = std::exp(bad_exponent); + value = 0. / bad_denominator; + BOOST_REQUIRE(std::isnan(value)); + BOOST_REQUIRE_EQUAL(::last_signal_status, 0); + BOOST_REQUIRE_EQUAL(::last_signal_code, 0); + + // catch signals sent by FPE traps + struct sigaction old_action; + struct sigaction fpe_action; + fpe_action.sa_sigaction = &fpe_signal_handler; + sigemptyset(&fpe_action.sa_mask); + fpe_action.sa_flags = SA_SIGINFO; + set_sigaction(SIGFPE, &fpe_action, &old_action); + + { + auto const trap = fe_trap::make_unique_scoped(); + BOOST_REQUIRE(trap.is_unique()); + value = 0.; + while (sigsetjmp(::jmp_env, 1) == 0) { + value = 2.; + value = 0. / bad_denominator; + } + BOOST_CHECK_EQUAL(::last_signal_status, SIGFPE); + BOOST_CHECK_EQUAL(::last_signal_code, FPE_FLTINV); + BOOST_REQUIRE(not std::isnan(value)); + BOOST_REQUIRE_EQUAL(value, 2.); + ::last_signal_status = 0; + ::last_signal_code = 0; + } + { + auto const trap = fe_trap::make_shared_scoped(); + BOOST_REQUIRE(not trap.is_unique()); + value = 0.; + while (sigsetjmp(::jmp_env, 1) == 0) { + value = 2.; + value = std::exp(bad_exponent); + } + BOOST_CHECK_EQUAL(::last_signal_status, SIGFPE); + BOOST_CHECK_EQUAL(::last_signal_code, FPE_FLTOVF); + BOOST_REQUIRE(not std::isnan(value)); + BOOST_REQUIRE_EQUAL(value, 2.); + ::last_signal_status = 0; + ::last_signal_code = 0; + } + { + auto const trap1 = fe_trap::make_shared_scoped(FE_UNDERFLOW); + { + auto const trap2 = fe_trap::make_shared_scoped(FE_UNDERFLOW); + BOOST_REQUIRE_EQUAL(trap1.get_flags(), trap2.get_flags()); + value = 0.; + while (sigsetjmp(::jmp_env, 1) == 0) { + value = 2.; + value = std::exp(-bad_exponent); + } + BOOST_CHECK_EQUAL(::last_signal_status, SIGFPE); + BOOST_CHECK_EQUAL(::last_signal_code, FPE_FLTUND); + BOOST_REQUIRE(not std::isnan(value)); + BOOST_REQUIRE_EQUAL(value, 2.); + ::last_signal_status = 0; + ::last_signal_code = 0; + } + } + + // reset default signal handler + set_sigaction(SIGFPE, &old_action, nullptr); + // without instrumentation, abnormal operations are allowed + value = 1. / bad_denominator; + value = std::exp(bad_exponent); +} +#endif // defined(ESPRESSO_FPE_USING_GLIBC_X86_64) + +BOOST_AUTO_TEST_CASE(exceptions) { + { + auto const trap = fe_trap::make_unique_scoped(); + BOOST_REQUIRE_THROW(fe_trap::make_unique_scoped(), std::runtime_error); + BOOST_REQUIRE_THROW(fe_trap::make_shared_scoped(), std::runtime_error); + } + { + auto const trap = fe_trap::make_shared_scoped(); + // cannot instantiate a unique object when a shared object already exists + BOOST_REQUIRE_THROW(fe_trap::make_unique_scoped(), std::runtime_error); + // cannot instantiate a shared object with mismatched flags (singleton) + for (int other_excepts : {FE_INEXACT, FE_ALL_EXCEPT}) { + if (trap.get_flags() != other_excepts) { + BOOST_REQUIRE_THROW(fe_trap::make_shared_scoped(FE_ALL_EXCEPT), + std::invalid_argument); + } + } + } +} +#else +int main() {} +#endif // defined(ESPRESSO_FPE_IS_SUPPORTED) and not defined(__FAST_MATH__) diff --git a/src/script_interface/ObjectHandle.cpp b/src/script_interface/ObjectHandle.cpp index 224a174b6c4..71bc15084c6 100644 --- a/src/script_interface/ObjectHandle.cpp +++ b/src/script_interface/ObjectHandle.cpp @@ -24,6 +24,10 @@ #include "ObjectState.hpp" #include "packed_variant.hpp" +#include + +#include + #include #include @@ -39,6 +43,9 @@ void ObjectHandle::set_parameter(const std::string &name, if (m_context) m_context->notify_set_parameter(this, name, value); +#ifdef FPE + auto const trap = fe_trap::make_shared_scoped(); +#endif this->do_set_parameter(name, value); } @@ -47,6 +54,9 @@ Variant ObjectHandle::call_method(const std::string &name, if (m_context) m_context->notify_call_method(this, name, params); +#ifdef FPE + auto const trap = fe_trap::make_shared_scoped(); +#endif return this->do_call_method(name, params); } diff --git a/src/script_interface/accumulators/MeanVarianceCalculator.hpp b/src/script_interface/accumulators/MeanVarianceCalculator.hpp index d46a79e6431..045bc1a2200 100644 --- a/src/script_interface/accumulators/MeanVarianceCalculator.hpp +++ b/src/script_interface/accumulators/MeanVarianceCalculator.hpp @@ -66,12 +66,24 @@ class MeanVarianceCalculator : public AccumulatorBase { [&]() { mean_variance_calculator()->update(context()->get_comm()); }); return {}; } - if (method == "mean") - return mean_variance_calculator()->mean(); - if (method == "variance") - return mean_variance_calculator()->variance(); - if (method == "std_error") - return mean_variance_calculator()->std_error(); + if (method == "mean") { + if (context()->is_head_node()) { + return mean_variance_calculator()->mean(); + } + return {}; + } + if (method == "variance") { + if (context()->is_head_node()) { + return mean_variance_calculator()->variance(); + } + return {}; + } + if (method == "std_error") { + if (context()->is_head_node()) { + return mean_variance_calculator()->std_error(); + } + return {}; + } return AccumulatorBase::do_call_method(method, parameters); } diff --git a/src/script_interface/auto_parameters/AutoParameters.hpp b/src/script_interface/auto_parameters/AutoParameters.hpp index 0769698faac..0569823baa8 100644 --- a/src/script_interface/auto_parameters/AutoParameters.hpp +++ b/src/script_interface/auto_parameters/AutoParameters.hpp @@ -107,7 +107,9 @@ class AutoParameters : public Base { }; protected: + // NOLINTNEXTLINE(bugprone-crtp-constructor-accessibility) AutoParameters() = default; + // NOLINTNEXTLINE(bugprone-crtp-constructor-accessibility) explicit AutoParameters(std::vector &¶ms) { add_parameters(std::move(params)); } diff --git a/src/script_interface/electrostatics/Actor.hpp b/src/script_interface/electrostatics/Actor.hpp index 1839673b300..c5e08c7a4fc 100644 --- a/src/script_interface/electrostatics/Actor.hpp +++ b/src/script_interface/electrostatics/Actor.hpp @@ -58,9 +58,11 @@ class Actor : public AutoParameters, System::Leaf> { m_actor->bind_system(m_system.lock()); } -public: +private: + friend SIClass; Actor(); +public: Variant do_call_method(std::string const &name, VariantMap const ¶ms) override; diff --git a/src/script_interface/magnetostatics/Actor.hpp b/src/script_interface/magnetostatics/Actor.hpp index 393bd290360..00bffa49b05 100644 --- a/src/script_interface/magnetostatics/Actor.hpp +++ b/src/script_interface/magnetostatics/Actor.hpp @@ -57,7 +57,8 @@ class Actor : public AutoParameters, System::Leaf> { m_actor->bind_system(m_system.lock()); } -public: +private: + friend SIClass; Actor() { add_parameters({ {"prefactor", AutoParameter::read_only, @@ -65,6 +66,7 @@ class Actor : public AutoParameters, System::Leaf> { }); } +public: Variant do_call_method(std::string const &name, VariantMap const ¶ms) override; diff --git a/src/script_interface/walberla/EKSpecies.cpp b/src/script_interface/walberla/EKSpecies.cpp index 3638dd6ee6f..9c9946ceaaf 100644 --- a/src/script_interface/walberla/EKSpecies.cpp +++ b/src/script_interface/walberla/EKSpecies.cpp @@ -105,6 +105,7 @@ void EKSpecies::make_instance(VariantMap const ¶ms) { get_value(params, "single_precision"), get_value_or(params, "thermalized", false), static_cast(get_value_or(params, "seed", 0))); + m_instance->ghost_communication(); } void EKSpecies::do_construct(VariantMap const ¶ms) { diff --git a/src/utils/include/utils/Accumulator.hpp b/src/utils/include/utils/Accumulator.hpp index 3b1c78e77cc..fda93807b41 100644 --- a/src/utils/include/utils/Accumulator.hpp +++ b/src/utils/include/utils/Accumulator.hpp @@ -47,7 +47,7 @@ template struct AccumulatorData { class Accumulator { public: - explicit Accumulator(std::size_t N) : m_n(0), m_acc_data(N) {} + explicit Accumulator(std::size_t N) : m_n(0u), m_acc_data(N) {} void operator()(const std::vector &); std::vector mean() const; std::vector variance() const; @@ -70,7 +70,7 @@ inline void Accumulator::operator()(const std::vector &data) { throw std::runtime_error( "The given data size does not fit the initialized size!"); ++m_n; - if (m_n == 1) { + if (m_n == 1u) { std::transform( data.begin(), data.end(), m_acc_data.begin(), [](double d) -> AccumulatorData { return {d, 0.0}; }); @@ -88,6 +88,9 @@ inline void Accumulator::operator()(const std::vector &data) { } } +/** + * @brief Compute the sample mean. + */ inline std::vector Accumulator::mean() const { std::vector res; std::transform( @@ -96,23 +99,27 @@ inline std::vector Accumulator::mean() const { return res; } +/** + * @brief Compute the Bessel-corrected sample variance, + * assuming uncorrelated data. + */ inline std::vector Accumulator::variance() const { std::vector res; - if (m_n == 1) { + if (m_n == 1u) { res = std::vector(m_acc_data.size(), std::numeric_limits::max()); } else { std::transform(m_acc_data.begin(), m_acc_data.end(), std::back_inserter(res), [this](const AccumulatorData &acc_data) { - return acc_data.m / (static_cast(m_n) - 1); + return acc_data.m / (static_cast(m_n) - 1.); }); } return res; } /** - * Returns the standard error of the mean assuming uncorrelated samples. + * @brief Compute the standard error of the mean, assuming uncorrelated data. */ inline std::vector Accumulator::std_error() const { auto const var = variance(); diff --git a/src/utils/include/utils/Array.hpp b/src/utils/include/utils/Array.hpp index df18195b83a..d2881998a28 100644 --- a/src/utils/include/utils/Array.hpp +++ b/src/utils/include/utils/Array.hpp @@ -68,6 +68,16 @@ struct ArrayFormatter { } }; +/** + * @brief Alias to create prvalue C-style arrays. + * + * This type is necessary when converting arrays from one type to another type + * within functions marked as @c noexcept. The @c std::initializer_list + * type doesn't include the backing array length as part of the type, + * and is therefore not strictly equivalent. + */ +template using carray_alias = T const[N]; + } // namespace detail template struct Array { diff --git a/src/utils/include/utils/Vector.hpp b/src/utils/include/utils/Vector.hpp index 06167c901dc..510584f32f3 100644 --- a/src/utils/include/utils/Vector.hpp +++ b/src/utils/include/utils/Vector.hpp @@ -64,14 +64,14 @@ template class Vector : public Array { using Array::max_size; using Array::fill; using Array::broadcast; - Vector() = default; + Vector() noexcept = default; Vector(Vector const &) = default; Vector &operator=(Vector const &) = default; void swap(Vector &rhs) { std::swap_ranges(begin(), end(), rhs.begin()); } private: - constexpr void copy_init(T const *first, T const *last) { + constexpr void copy_init(T const *first, T const *last) noexcept { auto it = begin(); while (first != last) { *it++ = *first++; @@ -82,7 +82,7 @@ template class Vector : public Array { template explicit constexpr Vector(Range const &rng) : Vector(std::begin(rng), std::end(rng)) {} - explicit constexpr Vector(T const (&v)[N]) : Base() { + explicit constexpr Vector(T const (&v)[N]) noexcept : Base() { copy_init(std::begin(v), std::end(v)); } @@ -107,7 +107,7 @@ template class Vector : public Array { /** @brief Create a vector that has all entries set to the same value. */ DEVICE_QUALIFIER static constexpr Vector - broadcast(typename Base::value_type const &value) { + broadcast(typename Base::value_type const &value) noexcept { Vector ret{}; for (std::size_t i = 0u; i != N; ++i) { ret[i] = value; diff --git a/src/utils/include/utils/mpi/scatter_buffer.hpp b/src/utils/include/utils/mpi/scatter_buffer.hpp index b2628ed1fd3..2a7416dad1b 100644 --- a/src/utils/include/utils/mpi/scatter_buffer.hpp +++ b/src/utils/include/utils/mpi/scatter_buffer.hpp @@ -43,7 +43,7 @@ namespace Mpi { template void scatter_buffer(T *buffer, int n_elem, boost::mpi::communicator comm, int root = 0) { - static_assert(std::is_trivial_v); + static_assert(std::is_trivially_copy_assignable_v); if (comm.rank() == root) { static std::vector sizes; static std::vector displ; diff --git a/src/utils/include/utils/serialization/memcpy_archive.hpp b/src/utils/include/utils/serialization/memcpy_archive.hpp index 55368db0e10..5cfc0e90cac 100644 --- a/src/utils/include/utils/serialization/memcpy_archive.hpp +++ b/src/utils/include/utils/serialization/memcpy_archive.hpp @@ -66,10 +66,12 @@ template class BasicMemcpyArchive { /** Current position in the buffer */ char *insert; -public: +protected: + // NOLINTNEXTLINE(bugprone-crtp-constructor-accessibility) explicit BasicMemcpyArchive(std::span buf) : buf(buf), insert(buf.data()) {} +public: auto get_library_version() const { return std::size_t{4}; } auto bytes_processed() const { diff --git a/src/walberla_bridge/CMakeLists.txt b/src/walberla_bridge/CMakeLists.txt index e7b652c79d0..3ac9bbefcd7 100644 --- a/src/walberla_bridge/CMakeLists.txt +++ b/src/walberla_bridge/CMakeLists.txt @@ -17,9 +17,72 @@ # along with this program. If not, see . # +set(WALBERLA_CXX_CLANG_TIDY "${ESPRESSO_CXX_CLANG_TIDY}") +set(WALBERLA_CUDA_CLANG_TIDY "${ESPRESSO_CUDA_CLANG_TIDY}") +set(WALBERLA_CXX_CLANG_TIDY_CODEGEN "${ESPRESSO_CXX_CLANG_TIDY}") +set(WALBERLA_CUDA_CLANG_TIDY_CODEGEN "${ESPRESSO_CUDA_CLANG_TIDY}") +set(SKIP_CLANG_TIDY_CHECKS "") +set(SKIP_CLANG_TIDY_CHECKS_CXX "") +set(SKIP_CLANG_TIDY_CHECKS_CUDA "") +# silence waLBerla diagnostics +list(APPEND SKIP_CLANG_TIDY_CHECKS "-clang-analyzer-deadcode.DeadStores") +list(APPEND SKIP_CLANG_TIDY_CHECKS "-readability-non-const-parameter") +list(APPEND SKIP_CLANG_TIDY_CHECKS "-readability-avoid-const-params-in-decls") +list(APPEND SKIP_CLANG_TIDY_CHECKS "-readability-else-after-return") +list(APPEND SKIP_CLANG_TIDY_CHECKS "-readability-simplify-boolean-expr") +list(APPEND SKIP_CLANG_TIDY_CHECKS "-modernize-use-auto") +list(APPEND SKIP_CLANG_TIDY_CHECKS "-modernize-loop-convert") +list(APPEND SKIP_CLANG_TIDY_CHECKS "-modernize-pass-by-value") +list(APPEND SKIP_CLANG_TIDY_CHECKS "-modernize-use-equals-delete") +list(APPEND SKIP_CLANG_TIDY_CHECKS "-modernize-return-braced-init-list") +list(APPEND SKIP_CLANG_TIDY_CHECKS "-bugprone-crtp-constructor-accessibility") +list(APPEND SKIP_CLANG_TIDY_CHECKS "-bugprone-narrowing-conversions") +list(APPEND SKIP_CLANG_TIDY_CHECKS "-bugprone-assert-side-effect") +list(APPEND SKIP_CLANG_TIDY_CHECKS "-bugprone-exception-escape") +list(APPEND SKIP_CLANG_TIDY_CHECKS "-bugprone-branch-clone") +if(WALBERLA_BUILD_WITH_CUDA) + # silence diagnostics from cuda header files + list(APPEND SKIP_CLANG_TIDY_CHECKS "-bugprone-casting-through-void") + list(APPEND SKIP_CLANG_TIDY_CHECKS "-modernize-redundant-void-arg") + list(APPEND SKIP_CLANG_TIDY_CHECKS "-modernize-use-nullptr") + # silence nullptr dereference in cuda::thrust + list(APPEND SKIP_CLANG_TIDY_CHECKS_CUDA + "-clang-analyzer-core.NonNullParamChecker") +endif() + +espresso_override_clang_tidy_checks( + WALBERLA_CXX_CLANG_TIDY "${SKIP_CLANG_TIDY_CHECKS}" + "${SKIP_CLANG_TIDY_CHECKS_CXX}") +espresso_override_clang_tidy_checks( + WALBERLA_CUDA_CLANG_TIDY "${SKIP_CLANG_TIDY_CHECKS}" + "${SKIP_CLANG_TIDY_CHECKS_CUDA}") + +# codegen-specific Clang-Tidy overrides +list(APPEND SKIP_CLANG_TIDY_CHECKS_CUDA + "-bugprone-multi-level-implicit-pointer-conversion") +espresso_override_clang_tidy_checks( + WALBERLA_CXX_CLANG_TIDY_CODEGEN "${SKIP_CLANG_TIDY_CHECKS}" + "${SKIP_CLANG_TIDY_CHECKS_CXX}") +espresso_override_clang_tidy_checks( + WALBERLA_CUDA_CLANG_TIDY_CODEGEN "${SKIP_CLANG_TIDY_CHECKS}" + "${SKIP_CLANG_TIDY_CHECKS_CUDA}") + function(espresso_configure_walberla_target) set(TARGET_NAME ${ARGV0}) - set_target_properties(${TARGET_NAME} PROPERTIES CXX_CLANG_TIDY "") + if(ESPRESSO_BUILD_WITH_CLANG_TIDY) + set(TARGET_LANG "CXX") + if(TARGET_NAME MATCHES "_cuda") + set(TARGET_LANG "CUDA") + endif() + set(TARGET_SUFFIX "") + if(TARGET_NAME MATCHES "_codegen") + set(TARGET_SUFFIX "_CODEGEN") + endif() + set_target_properties( + ${TARGET_NAME} + PROPERTIES ${TARGET_LANG}_CLANG_TIDY + "${WALBERLA_${TARGET_LANG}_CLANG_TIDY${TARGET_SUFFIX}}") + endif() target_link_libraries(${TARGET_NAME} PRIVATE ${WALBERLA_LIBS}) target_include_directories( ${TARGET_NAME} PUBLIC include PRIVATE ${WALBERLA_INCLUDE_DIRS} diff --git a/src/walberla_bridge/include/walberla_bridge/lattice_boltzmann/LBWalberlaBase.hpp b/src/walberla_bridge/include/walberla_bridge/lattice_boltzmann/LBWalberlaBase.hpp index e2d15671bf8..3c9abcfd650 100644 --- a/src/walberla_bridge/include/walberla_bridge/lattice_boltzmann/LBWalberlaBase.hpp +++ b/src/walberla_bridge/include/walberla_bridge/lattice_boltzmann/LBWalberlaBase.hpp @@ -277,11 +277,12 @@ class LBWalberlaBase : public LatticeModel { /** @brief Set the RNG counter (if thermalized). */ virtual void set_rng_state(uint64_t counter) = 0; - /** @brief get the velocity field id */ + /** @brief Get the velocity field id */ [[nodiscard]] virtual std::size_t get_velocity_field_id() const noexcept = 0; - /** @brief get the force field id */ + /** @brief Get the force field id */ [[nodiscard]] virtual std::size_t get_force_field_id() const noexcept = 0; + /** @brief Get whether the kernels run on GPUs. */ [[nodiscard]] virtual bool is_gpu() const noexcept = 0; }; diff --git a/src/walberla_bridge/src/electrokinetics/EKinWalberlaImpl.hpp b/src/walberla_bridge/src/electrokinetics/EKinWalberlaImpl.hpp index af616157847..69c65f47dcd 100644 --- a/src/walberla_bridge/src/electrokinetics/EKinWalberlaImpl.hpp +++ b/src/walberla_bridge/src/electrokinetics/EKinWalberlaImpl.hpp @@ -89,6 +89,8 @@ class EKinWalberlaImpl : public EKinWalberlaBase { using BoundaryModelDensity = BoundaryHandling; using BoundaryModelFlux = BoundaryHandling, FixedFlux>; + using BlockStorage = LatticeWalberla::Lattice_T; + public: template FloatType FloatType_c(T t) { return numeric_cast(t); @@ -157,14 +159,14 @@ class EKinWalberlaImpl : public EKinWalberlaBase { return {CellInterval(lower_bc->cell, upper_bc->cell)}; } - void reset_density_boundary_handling() { - auto const &blocks = get_lattice().get_blocks(); + void + reset_density_boundary_handling(std::shared_ptr const &blocks) { m_boundary_density = std::make_unique( blocks, m_density_field_id, m_flag_field_density_id); } - void reset_flux_boundary_handling() { - auto const &blocks = get_lattice().get_blocks(); + void + reset_flux_boundary_handling(std::shared_ptr const &blocks) { m_boundary_flux = std::make_unique( blocks, m_flux_field_id, m_flag_field_flux_id); } @@ -182,48 +184,44 @@ class EKinWalberlaImpl : public EKinWalberlaBase { m_valency(FloatType_c(valency)), m_ext_efield(ext_efield), m_advection(advection), m_friction_coupling(friction_coupling), m_seed(seed), m_lattice(std::move(lattice)) { + + auto const &blocks = m_lattice->get_blocks(); + auto const n_ghost_layers = m_lattice->get_ghost_layers(); + m_density_field_id = field::addToStorage( - m_lattice->get_blocks(), "density field", FloatType_c(density), - field::fzyx, m_lattice->get_ghost_layers()); + blocks, "density field", FloatType_c(density), field::fzyx, + n_ghost_layers); m_density_field_flattened_id = field::addFlattenedShallowCopyToStorage( - m_lattice->get_blocks(), m_density_field_id, - "flattened density field"); + blocks, m_density_field_id, "flattened density field"); m_flux_field_id = field::addToStorage( - m_lattice->get_blocks(), "flux field", FloatType{0}, field::fzyx, - m_lattice->get_ghost_layers()); + blocks, "flux field", FloatType{0}, field::fzyx, n_ghost_layers); m_flux_field_flattened_id = field::addFlattenedShallowCopyToStorage( - m_lattice->get_blocks(), m_flux_field_id, "flattened flux field"); + blocks, m_flux_field_id, "flattened flux field"); m_continuity = std::make_unique( m_flux_field_flattened_id, m_density_field_flattened_id); if (thermalized) { - set_diffusion_kernels(seed); + set_diffusion_kernels(*m_lattice, seed); } else { set_diffusion_kernels(); } // Init boundary related stuff m_flag_field_density_id = field::addFlagFieldToStorage( - m_lattice->get_blocks(), "flag field density", - m_lattice->get_ghost_layers()); - reset_density_boundary_handling(); + blocks, "flag field density", n_ghost_layers); + reset_density_boundary_handling(blocks); m_flag_field_flux_id = field::addFlagFieldToStorage( - m_lattice->get_blocks(), "flag field flux", - m_lattice->get_ghost_layers()); - reset_flux_boundary_handling(); + blocks, "flag field flux", n_ghost_layers); + reset_flux_boundary_handling(blocks); - m_full_communication = - std::make_shared(m_lattice->get_blocks()); + m_full_communication = std::make_shared(blocks); m_full_communication->addPackInfo( std::make_shared>( m_density_field_id)); - - // Synchronize ghost layers - ghost_communication(); } // Global parameters @@ -256,13 +254,13 @@ class EKinWalberlaImpl : public EKinWalberlaBase { if (!kernel) { return std::nullopt; } - return {static_cast(kernel->time_step_)}; + return {static_cast(kernel->getTime_step())}; } void set_diffusion(double diffusion) override { m_diffusion = FloatType_c(diffusion); auto visitor = [m_diffusion = m_diffusion](auto &kernel) { - kernel.D_ = m_diffusion; + kernel.setD(m_diffusion); }; std::visit(visitor, *m_diffusive_flux); std::visit(visitor, *m_diffusive_flux_electrostatic); @@ -270,14 +268,15 @@ class EKinWalberlaImpl : public EKinWalberlaBase { void set_kT(double kT) override { m_kT = FloatType_c(kT); - std::visit([m_kT = m_kT](auto &kernel) { kernel.kT_ = m_kT; }, + std::visit([m_kT = m_kT](auto &kernel) { kernel.setKt(m_kT); }, *m_diffusive_flux_electrostatic); } void set_valency(double valency) override { m_valency = FloatType_c(valency); - std::visit([m_valency = m_valency](auto &kernel) { kernel.z_ = m_valency; }, - *m_diffusive_flux_electrostatic); + std::visit( + [m_valency = m_valency](auto &kernel) { kernel.setZ(m_valency); }, + *m_diffusive_flux_electrostatic); } void set_advection(bool advection) override { m_advection = advection; } @@ -298,8 +297,8 @@ class EKinWalberlaImpl : public EKinWalberlaBase { } assert(counter <= static_cast(std::numeric_limits::max())); - kernel->time_step_ = static_cast(counter); - kernel_electrostatic->time_step_ = static_cast(counter); + kernel->setTime_step(static_cast(counter)); + kernel_electrostatic->setTime_step(static_cast(counter)); } void set_ext_efield(Utils::Vector3d const &field) override { @@ -307,9 +306,9 @@ class EKinWalberlaImpl : public EKinWalberlaBase { std::visit( [this](auto &kernel) { - kernel.f_ext_0_ = FloatType_c(m_ext_efield[0]); - kernel.f_ext_1_ = FloatType_c(m_ext_efield[1]); - kernel.f_ext_2_ = FloatType_c(m_ext_efield[2]); + kernel.setF_ext_0(FloatType_c(m_ext_efield[0])); + kernel.setF_ext_1(FloatType_c(m_ext_efield[1])); + kernel.setF_ext_2(FloatType_c(m_ext_efield[2])); }, *m_diffusive_flux_electrostatic); } @@ -334,8 +333,9 @@ class EKinWalberlaImpl : public EKinWalberlaBase { std::move(kernel_electrostatic)); } - void set_diffusion_kernels(unsigned int seed) { - auto const grid_dim = get_lattice().get_grid_dimensions(); + void set_diffusion_kernels(LatticeWalberla const &lattice, + unsigned int seed) { + auto const grid_dim = lattice.get_grid_dimensions(); auto kernel = DiffusiveFluxKernelThermalized( m_flux_field_flattened_id, m_density_field_flattened_id, @@ -349,7 +349,7 @@ class EKinWalberlaImpl : public EKinWalberlaBase { grid_dim[1], grid_dim[2], FloatType_c(m_kT), seed, 0, FloatType_c(m_valency)); - auto const blocks = get_lattice().get_blocks(); + auto const blocks = lattice.get_blocks(); for (auto b = blocks->begin(); b != blocks->end(); ++b) { kernel.configure(blocks, &*b); @@ -388,12 +388,13 @@ class EKinWalberlaImpl : public EKinWalberlaBase { if (auto *kernel = std::get_if(&*m_diffusive_flux)) { - kernel->time_step_++; + kernel->setTime_step(kernel->getTime_step() + 1u); auto *kernel_electrostatic = std::get_if( &*m_diffusive_flux_electrostatic); - kernel_electrostatic->time_step_++; + kernel_electrostatic->setTime_step(kernel_electrostatic->getTime_step() + + 1u); } } @@ -417,7 +418,7 @@ class EKinWalberlaImpl : public EKinWalberlaBase { void kernel_diffusion_electrostatic(const std::size_t &potential_id) { auto const phiID = BlockDataID(potential_id); - std::visit([phiID](auto &kernel) { kernel.phiID = phiID; }, + std::visit([phiID](auto &kernel) { kernel.setPhiID(phiID); }, *m_diffusive_flux_electrostatic); for (auto &block : *m_lattice->get_blocks()) { @@ -428,11 +429,12 @@ class EKinWalberlaImpl : public EKinWalberlaBase { if (auto *kernel_electrostatic = std::get_if( &*m_diffusive_flux_electrostatic)) { - kernel_electrostatic->time_step_++; + kernel_electrostatic->setTime_step(kernel_electrostatic->getTime_step() + + 1u); auto *kernel = std::get_if(&*m_diffusive_flux); - kernel->time_step_++; + kernel->setTime_step(kernel->getTime_step() + 1u); } } @@ -584,10 +586,12 @@ class EKinWalberlaImpl : public EKinWalberlaBase { } } - void clear_flux_boundaries() override { reset_flux_boundary_handling(); } + void clear_flux_boundaries() override { + reset_flux_boundary_handling(get_lattice().get_blocks()); + } void clear_density_boundaries() override { - reset_density_boundary_handling(); + reset_density_boundary_handling(get_lattice().get_blocks()); } bool set_node_flux_boundary(Utils::Vector3i const &node, diff --git a/src/walberla_bridge/src/electrokinetics/generated_kernels/AdvectiveFluxKernel_double_precision.h b/src/walberla_bridge/src/electrokinetics/generated_kernels/AdvectiveFluxKernel_double_precision.h index edcc2060b73..c36ee804e0c 100644 --- a/src/walberla_bridge/src/electrokinetics/generated_kernels/AdvectiveFluxKernel_double_precision.h +++ b/src/walberla_bridge/src/electrokinetics/generated_kernels/AdvectiveFluxKernel_double_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -54,7 +56,7 @@ class AdvectiveFluxKernel_double_precision { public: AdvectiveFluxKernel_double_precision(BlockDataID jID_, BlockDataID rhoID_, BlockDataID uID_) - : jID(jID_), rhoID(rhoID_), uID(uID_){}; + : jID(jID_), rhoID(rhoID_), uID(uID_) {} void run(IBlock *block); @@ -91,9 +93,10 @@ class AdvectiveFluxKernel_double_precision { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} +private: BlockDataID jID; BlockDataID rhoID; BlockDataID uID; diff --git a/src/walberla_bridge/src/electrokinetics/generated_kernels/AdvectiveFluxKernel_single_precision.h b/src/walberla_bridge/src/electrokinetics/generated_kernels/AdvectiveFluxKernel_single_precision.h index 77abc9b12dc..95db3df4992 100644 --- a/src/walberla_bridge/src/electrokinetics/generated_kernels/AdvectiveFluxKernel_single_precision.h +++ b/src/walberla_bridge/src/electrokinetics/generated_kernels/AdvectiveFluxKernel_single_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -54,7 +56,7 @@ class AdvectiveFluxKernel_single_precision { public: AdvectiveFluxKernel_single_precision(BlockDataID jID_, BlockDataID rhoID_, BlockDataID uID_) - : jID(jID_), rhoID(rhoID_), uID(uID_){}; + : jID(jID_), rhoID(rhoID_), uID(uID_) {} void run(IBlock *block); @@ -91,9 +93,10 @@ class AdvectiveFluxKernel_single_precision { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} +private: BlockDataID jID; BlockDataID rhoID; BlockDataID uID; diff --git a/src/walberla_bridge/src/electrokinetics/generated_kernels/ContinuityKernel_double_precision.h b/src/walberla_bridge/src/electrokinetics/generated_kernels/ContinuityKernel_double_precision.h index a116ce23c3c..817678b98bb 100644 --- a/src/walberla_bridge/src/electrokinetics/generated_kernels/ContinuityKernel_double_precision.h +++ b/src/walberla_bridge/src/electrokinetics/generated_kernels/ContinuityKernel_double_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -53,7 +55,7 @@ namespace pystencils { class ContinuityKernel_double_precision { public: ContinuityKernel_double_precision(BlockDataID jID_, BlockDataID rhoID_) - : jID(jID_), rhoID(rhoID_){}; + : jID(jID_), rhoID(rhoID_) {} void run(IBlock *block); @@ -90,9 +92,10 @@ class ContinuityKernel_double_precision { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} +private: BlockDataID jID; BlockDataID rhoID; }; diff --git a/src/walberla_bridge/src/electrokinetics/generated_kernels/ContinuityKernel_single_precision.h b/src/walberla_bridge/src/electrokinetics/generated_kernels/ContinuityKernel_single_precision.h index f2144c7d0d9..881cfabd407 100644 --- a/src/walberla_bridge/src/electrokinetics/generated_kernels/ContinuityKernel_single_precision.h +++ b/src/walberla_bridge/src/electrokinetics/generated_kernels/ContinuityKernel_single_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -53,7 +55,7 @@ namespace pystencils { class ContinuityKernel_single_precision { public: ContinuityKernel_single_precision(BlockDataID jID_, BlockDataID rhoID_) - : jID(jID_), rhoID(rhoID_){}; + : jID(jID_), rhoID(rhoID_) {} void run(IBlock *block); @@ -90,9 +92,10 @@ class ContinuityKernel_single_precision { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} +private: BlockDataID jID; BlockDataID rhoID; }; diff --git a/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelThermalized_double_precision.cpp b/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelThermalized_double_precision.cpp index 005853abdaa..efa751ac67f 100644 --- a/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelThermalized_double_precision.cpp +++ b/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelThermalized_double_precision.cpp @@ -17,7 +17,7 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #include @@ -56,31 +56,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + 12 * _stride_j_3] = D * (_data_rho[_stride_rho_0] - _data_rho[_stride_rho_1 + _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0] + 0.5 * _data_rho[_stride_rho_1 + _stride_rho_2]), 0.5) * (random_6_0 - 0.5) * 1.5025119784898082; } @@ -89,31 +89,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + 12 * _stride_j_3] = D * (-_data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0]), 0.5) * (random_6_0 - 0.5) * 1.5025119784898082; } @@ -122,31 +122,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + 12 * _stride_j_3] = D * (-_data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1)]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1)]), 0.5) * (random_6_0 - 0.5) * 1.5025119784898082; } @@ -158,31 +158,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + 6 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2]), 0.5) * (random_3_0 - 0.5) * 1.6628028407278295; } @@ -190,31 +190,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + 8 * _stride_j_3] = D * (-_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + 0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1]), 0.5) * (random_4_0 - 0.5) * 1.6628028407278295; } @@ -222,31 +222,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + 10 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]), 0.5) * (random_5_0 - 0.5) * 1.5025119784898082; } @@ -254,31 +254,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + 12 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]), 0.5) * (random_6_0 - 0.5) * 1.5025119784898082; } @@ -288,31 +288,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + 6 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]), 0.5) * (random_3_0 - 0.5) * 1.6628028407278295; } @@ -320,31 +320,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + 8 * _stride_j_3] = D * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1]), 0.5) * (random_4_0 - 0.5) * 1.6628028407278295; } @@ -352,31 +352,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + 10 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]), 0.5) * (random_5_0 - 0.5) * 1.5025119784898082; } @@ -384,31 +384,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + 12 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]), 0.5) * (random_6_0 - 0.5) * 1.5025119784898082; } @@ -418,31 +418,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + 6 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]), 0.5) * (random_3_0 - 0.5) * 1.6628028407278295; } @@ -450,31 +450,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + 10 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]), 0.5) * (random_5_0 - 0.5) * 1.5025119784898082; } @@ -482,31 +482,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + 12 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]), 0.5) * (random_6_0 - 0.5) * 1.5025119784898082; } @@ -519,31 +519,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + 8 * _stride_j_3] = D * (-_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + 0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)]), 0.5) * (random_4_0 - 0.5) * 1.6628028407278295; } @@ -551,31 +551,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + 10 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] - _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] + 0.5 * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]), 0.5) * (random_5_0 - 0.5) * 1.5025119784898082; } @@ -585,31 +585,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + 8 * _stride_j_3] = D * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)]), 0.5) * (random_4_0 - 0.5) * 1.6628028407278295; } @@ -617,31 +617,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + 10 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]), 0.5) * (random_5_0 - 0.5) * 1.5025119784898082; } @@ -650,31 +650,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * (_size_j_1 - 1) + 10 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]), 0.5) * (random_5_0 - 0.5) * 1.5025119784898082; } @@ -688,31 +688,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_2 * ctr_2 + 4 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_2_0 - 0.5) * 1.6628028407278295; } @@ -720,31 +720,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_5_1 - 0.5) * 1.5025119784898082; } @@ -752,31 +752,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_6_0 - 0.5) * 1.5025119784898082; } @@ -786,31 +786,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_2 * ctr_2 + 4 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_2_0 - 0.5) * 1.6628028407278295; } @@ -818,31 +818,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_5_1 - 0.5) * 1.5025119784898082; } @@ -850,31 +850,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_6_0 - 0.5) * 1.5025119784898082; } @@ -884,31 +884,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_2 * ctr_2 + 4 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_2_0 - 0.5) * 1.6628028407278295; } @@ -916,31 +916,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_5_1 - 0.5) * 1.5025119784898082; } @@ -948,31 +948,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_6_0 - 0.5) * 1.5025119784898082; } @@ -985,31 +985,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) * 0.16292407789368385 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_0_0 - 0.5) * 1.977416969040271; } @@ -1017,31 +1017,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.16292407789368385 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_0_1 - 0.5) * 1.977416969040271; } @@ -1049,31 +1049,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 2 * _stride_j_3] = D * (-_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) * 0.16292407789368385 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + 0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_1_0 - 0.5) * 1.977416969040271; } @@ -1081,31 +1081,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 3 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_1_1 - 0.5) * 1.6628028407278295; } @@ -1113,31 +1113,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 4 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_2_0 - 0.5) * 1.6628028407278295; } @@ -1145,31 +1145,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 5 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_2_1 - 0.5) * 1.6628028407278295; } @@ -1177,31 +1177,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 6 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_3_0 - 0.5) * 1.6628028407278295; } @@ -1209,31 +1209,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 7 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_3_1 - 0.5) * 1.6628028407278295; } @@ -1241,31 +1241,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 8 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_4_0 - 0.5) * 1.6628028407278295; } @@ -1273,31 +1273,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_4_1 - 0.5) * 1.5025119784898082; } @@ -1305,31 +1305,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_5_0 - 0.5) * 1.5025119784898082; } @@ -1337,31 +1337,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_5_1 - 0.5) * 1.5025119784898082; } @@ -1369,31 +1369,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_6_0 - 0.5) * 1.5025119784898082; } @@ -1403,31 +1403,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) * 0.16292407789368385 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_0_0 - 0.5) * 1.977416969040271; } @@ -1435,31 +1435,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.16292407789368385 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_0_1 - 0.5) * 1.977416969040271; } @@ -1467,31 +1467,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 2 * _stride_j_3] = D * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) * 0.16292407789368385 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_1_0 - 0.5) * 1.977416969040271; } @@ -1499,31 +1499,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 3 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_1_1 - 0.5) * 1.6628028407278295; } @@ -1531,31 +1531,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 4 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_2_0 - 0.5) * 1.6628028407278295; } @@ -1563,31 +1563,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 5 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_2_1 - 0.5) * 1.6628028407278295; } @@ -1595,31 +1595,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 6 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_3_0 - 0.5) * 1.6628028407278295; } @@ -1627,31 +1627,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 7 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_3_1 - 0.5) * 1.6628028407278295; } @@ -1659,31 +1659,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 8 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_4_0 - 0.5) * 1.6628028407278295; } @@ -1691,31 +1691,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_4_1 - 0.5) * 1.5025119784898082; } @@ -1723,31 +1723,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_5_0 - 0.5) * 1.5025119784898082; } @@ -1755,31 +1755,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_5_1 - 0.5) * 1.5025119784898082; } @@ -1787,31 +1787,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_6_0 - 0.5) * 1.5025119784898082; } @@ -1821,31 +1821,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) * 0.16292407789368385 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_0_0 - 0.5) * 1.977416969040271; } @@ -1853,31 +1853,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 3 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_1_1 - 0.5) * 1.6628028407278295; } @@ -1885,31 +1885,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 4 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_2_0 - 0.5) * 1.6628028407278295; } @@ -1917,31 +1917,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 5 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_2_1 - 0.5) * 1.6628028407278295; } @@ -1949,31 +1949,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 6 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_3_0 - 0.5) * 1.6628028407278295; } @@ -1981,31 +1981,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_4_1 - 0.5) * 1.5025119784898082; } @@ -2013,31 +2013,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_5_0 - 0.5) * 1.5025119784898082; } @@ -2045,31 +2045,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_5_1 - 0.5) * 1.5025119784898082; } @@ -2077,31 +2077,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_6_0 - 0.5) * 1.5025119784898082; } @@ -2114,31 +2114,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.16292407789368385 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_0_1 - 0.5) * 1.977416969040271; } @@ -2146,31 +2146,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 3 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_1_1 - 0.5) * 1.6628028407278295; } @@ -2178,31 +2178,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 7 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_3_1 - 0.5) * 1.6628028407278295; } @@ -2210,31 +2210,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 8 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_4_0 - 0.5) * 1.6628028407278295; } @@ -2242,31 +2242,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_4_1 - 0.5) * 1.5025119784898082; } @@ -2274,31 +2274,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_5_0 - 0.5) * 1.5025119784898082; } @@ -2308,31 +2308,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.16292407789368385 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_0_1 - 0.5) * 1.977416969040271; } @@ -2340,31 +2340,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 3 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_1_1 - 0.5) * 1.6628028407278295; } @@ -2372,31 +2372,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 7 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_3_1 - 0.5) * 1.6628028407278295; } @@ -2404,31 +2404,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 8 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_4_0 - 0.5) * 1.6628028407278295; } @@ -2436,31 +2436,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_4_1 - 0.5) * 1.5025119784898082; } @@ -2468,31 +2468,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_5_0 - 0.5) * 1.5025119784898082; } @@ -2502,31 +2502,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 3 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_1_1 - 0.5) * 1.6628028407278295; } @@ -2534,31 +2534,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_4_1 - 0.5) * 1.5025119784898082; } @@ -2566,31 +2566,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_5_0 - 0.5) * 1.5025119784898082; } @@ -2604,31 +2604,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_5_1 - 0.5) * 1.5025119784898082; } @@ -2637,31 +2637,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_5_1 - 0.5) * 1.5025119784898082; } @@ -2670,31 +2670,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_5_1 - 0.5) * 1.5025119784898082; } @@ -2706,31 +2706,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 2 * _stride_j_3] = D * (-_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)]) * 0.16292407789368385 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + 0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)]), 0.5) * (random_1_0 - 0.5) * 1.977416969040271; } @@ -2738,31 +2738,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 5 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_2_1 - 0.5) * 1.6628028407278295; } @@ -2770,31 +2770,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 7 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_3_1 - 0.5) * 1.6628028407278295; } @@ -2802,31 +2802,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_4_1 - 0.5) * 1.5025119784898082; } @@ -2834,31 +2834,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_5_1 - 0.5) * 1.5025119784898082; } @@ -2868,31 +2868,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 2 * _stride_j_3] = D * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)]) * 0.16292407789368385 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)]), 0.5) * (random_1_0 - 0.5) * 1.977416969040271; } @@ -2900,31 +2900,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 5 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_2_1 - 0.5) * 1.6628028407278295; } @@ -2932,31 +2932,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 7 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_3_1 - 0.5) * 1.6628028407278295; } @@ -2964,31 +2964,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_4_1 - 0.5) * 1.5025119784898082; } @@ -2996,31 +2996,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_5_1 - 0.5) * 1.5025119784898082; } @@ -3030,31 +3030,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 5 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_2_1 - 0.5) * 1.6628028407278295; } @@ -3062,31 +3062,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_4_1 - 0.5) * 1.5025119784898082; } @@ -3094,31 +3094,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_5_1 - 0.5) * 1.5025119784898082; } @@ -3131,31 +3131,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * (_size_j_2 - 1) + 7 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_3_1 - 0.5) * 1.6628028407278295; } @@ -3163,31 +3163,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_4_1 - 0.5) * 1.5025119784898082; } @@ -3197,31 +3197,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * (_size_j_2 - 1) + 7 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.11520472029718914 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_3_1 - 0.5) * 1.6628028407278295; } @@ -3229,31 +3229,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_4_1 - 0.5) * 1.5025119784898082; } @@ -3262,31 +3262,31 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_double_precision_diffusiv double random_6_0; double random_6_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_6_0, random_6_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_6_0, random_6_1); double random_5_0; double random_5_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_5_0, random_5_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_5_0, random_5_1); double random_4_0; double random_4_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_4_0, random_4_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_4_0, random_4_1); double random_3_0; double random_3_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1); double random_2_0; double random_2_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1); double random_1_0; double random_1_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1); double random_0_0; double random_0_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.09406426022938992 + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_4_1 - 0.5) * 1.5025119784898082; } diff --git a/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelThermalized_double_precision.h b/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelThermalized_double_precision.h index e0cb95786a4..40cfe0b1b31 100644 --- a/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelThermalized_double_precision.h +++ b/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelThermalized_double_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -58,7 +60,9 @@ class DiffusiveFluxKernelThermalized_double_precision { uint32_t time_step) : jID(jID_), rhoID(rhoID_), D_(D), field_size_0_(field_size_0), field_size_1_(field_size_1), field_size_2_(field_size_2), seed_(seed), - time_step_(time_step), configured_(false){}; + time_step_(time_step), block_offset_0_(uint32_t(0)), + block_offset_1_(uint32_t(0)), block_offset_2_(uint32_t(0)), + configured_(false) {} void run(IBlock *block); @@ -105,6 +109,32 @@ class DiffusiveFluxKernelThermalized_double_precision { configured_ = true; } + inline double getD() const { return D_; } + inline uint32_t getBlock_offset_0() const { return block_offset_0_; } + inline uint32_t getBlock_offset_1() const { return block_offset_1_; } + inline uint32_t getBlock_offset_2() const { return block_offset_2_; } + inline uint32_t getField_size_0() const { return field_size_0_; } + inline uint32_t getField_size_1() const { return field_size_1_; } + inline uint32_t getField_size_2() const { return field_size_2_; } + inline uint32_t getSeed() const { return seed_; } + inline uint32_t getTime_step() const { return time_step_; } + inline void setD(const double value) { D_ = value; } + inline void setBlock_offset_0(const uint32_t value) { + block_offset_0_ = value; + } + inline void setBlock_offset_1(const uint32_t value) { + block_offset_1_ = value; + } + inline void setBlock_offset_2(const uint32_t value) { + block_offset_2_ = value; + } + inline void setField_size_0(const uint32_t value) { field_size_0_ = value; } + inline void setField_size_1(const uint32_t value) { field_size_1_ = value; } + inline void setField_size_2(const uint32_t value) { field_size_2_ = value; } + inline void setSeed(const uint32_t value) { seed_ = value; } + inline void setTime_step(const uint32_t value) { time_step_ = value; } + +private: BlockDataID jID; BlockDataID rhoID; double D_; @@ -116,6 +146,7 @@ class DiffusiveFluxKernelThermalized_double_precision { uint32_t field_size_2_; uint32_t seed_; uint32_t time_step_; + bool configured_; }; diff --git a/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelThermalized_single_precision.cpp b/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelThermalized_single_precision.cpp index 62694a743a0..96e0fa69728 100644 --- a/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelThermalized_single_precision.cpp +++ b/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelThermalized_single_precision.cpp @@ -17,7 +17,7 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #include @@ -58,25 +58,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + 12 * _stride_j_3] = D * (_data_rho[_stride_rho_0] - _data_rho[_stride_rho_1 + _stride_rho_2]) * 0.09406426022938992f + (random_3_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0] + 0.5f * _data_rho[_stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -87,25 +87,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + 12 * _stride_j_3] = D * (-_data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0]) * 0.09406426022938992f + (random_3_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0]), 0.5f) * 1.5025119784898082f; } @@ -116,25 +116,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + 12 * _stride_j_3] = D * (-_data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1)]) * 0.09406426022938992f + (random_3_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1)]), 0.5f) * 1.5025119784898082f; } @@ -148,25 +148,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + 6 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2]) * 0.11520472029718914f + (random_1_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -176,25 +176,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + 8 * _stride_j_3] = D * (-_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1]) * 0.11520472029718914f + (random_2_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + 0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1]), 0.5f) * 1.6628028407278295f; } @@ -204,25 +204,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + 10 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * 0.09406426022938992f + (random_2_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -232,25 +232,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + 12 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * 0.09406426022938992f + (random_3_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -262,25 +262,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + 6 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]) * 0.11520472029718914f + (random_1_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -290,25 +290,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + 8 * _stride_j_3] = D * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1]) * 0.11520472029718914f + (random_2_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1]), 0.5f) * 1.6628028407278295f; } @@ -318,25 +318,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + 10 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * 0.09406426022938992f + (random_2_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -346,25 +346,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + 12 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * 0.09406426022938992f + (random_3_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -376,25 +376,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + 6 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]) * 0.11520472029718914f + (random_1_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -404,25 +404,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + 10 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * 0.09406426022938992f + (random_2_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -432,25 +432,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + 12 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * 0.09406426022938992f + (random_3_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -465,25 +465,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + 8 * _stride_j_3] = D * (-_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)]) * 0.11520472029718914f + (random_2_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + 0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)]), 0.5f) * 1.6628028407278295f; } @@ -493,25 +493,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + 10 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] - _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * 0.09406426022938992f + (random_2_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] + 0.5f * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -523,25 +523,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + 8 * _stride_j_3] = D * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)]) * 0.11520472029718914f + (random_2_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)]), 0.5f) * 1.6628028407278295f; } @@ -551,25 +551,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + 10 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * 0.09406426022938992f + (random_2_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -580,25 +580,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * (_size_j_1 - 1) + 10 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * 0.09406426022938992f + (random_2_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -614,25 +614,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_2 * ctr_2 + 4 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.11520472029718914f + (random_1_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.6628028407278295f; } @@ -642,25 +642,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.09406426022938992f + (random_2_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -670,25 +670,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.09406426022938992f + (random_3_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -700,25 +700,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_2 * ctr_2 + 4 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.11520472029718914f + (random_1_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.6628028407278295f; } @@ -728,25 +728,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.09406426022938992f + (random_2_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -756,25 +756,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.09406426022938992f + (random_3_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -786,25 +786,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_2 * ctr_2 + 4 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.11520472029718914f + (random_1_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.6628028407278295f; } @@ -814,25 +814,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.09406426022938992f + (random_2_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -842,25 +842,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.09406426022938992f + (random_3_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -875,25 +875,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) * 0.16292407789368385f + (random_0_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.977416969040271f; } @@ -903,25 +903,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.16292407789368385f + (random_0_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.977416969040271f; } @@ -931,25 +931,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 2 * _stride_j_3] = D * (-_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) * 0.16292407789368385f + (random_0_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + 0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.977416969040271f; } @@ -959,25 +959,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 3 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.11520472029718914f + (random_0_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.6628028407278295f; } @@ -987,25 +987,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 4 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.11520472029718914f + (random_1_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.6628028407278295f; } @@ -1015,25 +1015,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 5 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.11520472029718914f + (random_1_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -1043,25 +1043,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 6 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.11520472029718914f + (random_1_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -1071,25 +1071,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 7 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.11520472029718914f + (random_1_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -1099,25 +1099,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 8 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.11520472029718914f + (random_2_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -1127,25 +1127,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.09406426022938992f + (random_2_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -1155,25 +1155,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.09406426022938992f + (random_2_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -1183,25 +1183,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.09406426022938992f + (random_2_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -1211,25 +1211,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.09406426022938992f + (random_3_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -1241,25 +1241,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) * 0.16292407789368385f + (random_0_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.977416969040271f; } @@ -1269,25 +1269,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.16292407789368385f + (random_0_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.977416969040271f; } @@ -1297,25 +1297,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 2 * _stride_j_3] = D * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) * 0.16292407789368385f + (random_0_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.977416969040271f; } @@ -1325,25 +1325,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 3 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.11520472029718914f + (random_0_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.6628028407278295f; } @@ -1353,25 +1353,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 4 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.11520472029718914f + (random_1_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.6628028407278295f; } @@ -1381,25 +1381,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 5 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.11520472029718914f + (random_1_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -1409,25 +1409,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 6 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.11520472029718914f + (random_1_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -1437,25 +1437,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 7 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.11520472029718914f + (random_1_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -1465,25 +1465,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 8 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.11520472029718914f + (random_2_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -1493,25 +1493,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.09406426022938992f + (random_2_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -1521,25 +1521,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.09406426022938992f + (random_2_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -1549,25 +1549,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.09406426022938992f + (random_2_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -1577,25 +1577,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.09406426022938992f + (random_3_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -1607,25 +1607,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) * 0.16292407789368385f + (random_0_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.977416969040271f; } @@ -1635,25 +1635,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 3 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.11520472029718914f + (random_0_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.6628028407278295f; } @@ -1663,25 +1663,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 4 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.11520472029718914f + (random_1_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.6628028407278295f; } @@ -1691,25 +1691,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 5 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.11520472029718914f + (random_1_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -1719,25 +1719,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 6 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.11520472029718914f + (random_1_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -1747,25 +1747,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.09406426022938992f + (random_2_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -1775,25 +1775,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.09406426022938992f + (random_2_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -1803,25 +1803,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.09406426022938992f + (random_2_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -1831,25 +1831,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.09406426022938992f + (random_3_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -1864,25 +1864,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.16292407789368385f + (random_0_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.977416969040271f; } @@ -1892,25 +1892,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 3 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.11520472029718914f + (random_0_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.6628028407278295f; } @@ -1920,25 +1920,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 7 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.11520472029718914f + (random_1_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -1948,25 +1948,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 8 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.11520472029718914f + (random_2_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -1976,25 +1976,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.09406426022938992f + (random_2_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2004,25 +2004,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.09406426022938992f + (random_2_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2034,25 +2034,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.16292407789368385f + (random_0_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.977416969040271f; } @@ -2062,25 +2062,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 3 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.11520472029718914f + (random_0_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.6628028407278295f; } @@ -2090,25 +2090,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 7 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.11520472029718914f + (random_1_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -2118,25 +2118,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 8 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.11520472029718914f + (random_2_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -2146,25 +2146,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.09406426022938992f + (random_2_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2174,25 +2174,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.09406426022938992f + (random_2_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2204,25 +2204,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 3 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 0.11520472029718914f + (random_0_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.6628028407278295f; } @@ -2232,25 +2232,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.09406426022938992f + (random_2_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2260,25 +2260,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.09406426022938992f + (random_2_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2294,25 +2294,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.09406426022938992f + (random_2_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2323,25 +2323,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.09406426022938992f + (random_2_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2352,25 +2352,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.09406426022938992f + (random_2_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2384,25 +2384,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 2 * _stride_j_3] = D * (-_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)]) * 0.16292407789368385f + (random_0_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + 0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)]), 0.5f) * 1.977416969040271f; } @@ -2412,25 +2412,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 5 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.11520472029718914f + (random_1_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -2440,25 +2440,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 7 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.11520472029718914f + (random_1_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -2468,25 +2468,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.09406426022938992f + (random_2_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2496,25 +2496,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.09406426022938992f + (random_2_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2526,25 +2526,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 2 * _stride_j_3] = D * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)]) * 0.16292407789368385f + (random_0_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)]), 0.5f) * 1.977416969040271f; } @@ -2554,25 +2554,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 5 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.11520472029718914f + (random_1_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -2582,25 +2582,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 7 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.11520472029718914f + (random_1_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -2610,25 +2610,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.09406426022938992f + (random_2_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2638,25 +2638,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.09406426022938992f + (random_2_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2668,25 +2668,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 5 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.11520472029718914f + (random_1_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -2696,25 +2696,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.09406426022938992f + (random_2_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2724,25 +2724,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.09406426022938992f + (random_2_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2757,25 +2757,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * (_size_j_2 - 1) + 7 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.11520472029718914f + (random_1_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -2785,25 +2785,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.09406426022938992f + (random_2_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2815,25 +2815,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * (_size_j_2 - 1) + 7 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.11520472029718914f + (random_1_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -2843,25 +2843,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.09406426022938992f + (random_2_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2872,25 +2872,25 @@ static FUNC_PREFIX void diffusivefluxkernelthermalized_single_precision_diffusiv float random_3_1; float random_3_2; float random_3_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3); float random_2_0; float random_2_1; float random_2_2; float random_2_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3); float random_1_0; float random_1_1; float random_1_2; float random_1_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3); float random_0_0; float random_0_1; float random_0_2; float random_0_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.09406426022938992f + (random_2_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } diff --git a/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelThermalized_single_precision.h b/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelThermalized_single_precision.h index 33825ee177c..fbd9d238a24 100644 --- a/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelThermalized_single_precision.h +++ b/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelThermalized_single_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -58,7 +60,9 @@ class DiffusiveFluxKernelThermalized_single_precision { uint32_t time_step) : jID(jID_), rhoID(rhoID_), D_(D), field_size_0_(field_size_0), field_size_1_(field_size_1), field_size_2_(field_size_2), seed_(seed), - time_step_(time_step), configured_(false){}; + time_step_(time_step), block_offset_0_(uint32_t(0)), + block_offset_1_(uint32_t(0)), block_offset_2_(uint32_t(0)), + configured_(false) {} void run(IBlock *block); @@ -105,6 +109,32 @@ class DiffusiveFluxKernelThermalized_single_precision { configured_ = true; } + inline float getD() const { return D_; } + inline uint32_t getBlock_offset_0() const { return block_offset_0_; } + inline uint32_t getBlock_offset_1() const { return block_offset_1_; } + inline uint32_t getBlock_offset_2() const { return block_offset_2_; } + inline uint32_t getField_size_0() const { return field_size_0_; } + inline uint32_t getField_size_1() const { return field_size_1_; } + inline uint32_t getField_size_2() const { return field_size_2_; } + inline uint32_t getSeed() const { return seed_; } + inline uint32_t getTime_step() const { return time_step_; } + inline void setD(const float value) { D_ = value; } + inline void setBlock_offset_0(const uint32_t value) { + block_offset_0_ = value; + } + inline void setBlock_offset_1(const uint32_t value) { + block_offset_1_ = value; + } + inline void setBlock_offset_2(const uint32_t value) { + block_offset_2_ = value; + } + inline void setField_size_0(const uint32_t value) { field_size_0_ = value; } + inline void setField_size_1(const uint32_t value) { field_size_1_ = value; } + inline void setField_size_2(const uint32_t value) { field_size_2_ = value; } + inline void setSeed(const uint32_t value) { seed_ = value; } + inline void setTime_step(const uint32_t value) { time_step_ = value; } + +private: BlockDataID jID; BlockDataID rhoID; float D_; @@ -116,6 +146,7 @@ class DiffusiveFluxKernelThermalized_single_precision { uint32_t field_size_2_; uint32_t seed_; uint32_t time_step_; + bool configured_; }; diff --git a/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostaticThermalized_double_precision.cpp b/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostaticThermalized_double_precision.cpp index 1a7115850e0..b2386b99168 100644 --- a/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostaticThermalized_double_precision.cpp +++ b/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostaticThermalized_double_precision.cpp @@ -17,7 +17,7 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #include @@ -56,99 +56,99 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 0, seed, random_7_0, random_7_1); - _data_j[_stride_j_0 + 12 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0] + _data_rho[_stride_rho_1 + _stride_rho_2]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0] + _data_rho[_stride_rho_1 + _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0] + _data_rho[_stride_rho_1 + _stride_rho_2]) * 2.0 + kT * (_data_rho[_stride_rho_0] - _data_rho[_stride_rho_1 + _stride_rho_2]) * 4.0 - z * (_data_rho[_stride_rho_0] + _data_rho[_stride_rho_1 + _stride_rho_2]) * (-_data_phi[0] + _data_phi[_stride_phi_0 + _stride_phi_1 + _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_2] + _data_phi[_stride_phi_1]) + z * (_data_rho[_stride_rho_0] + _data_rho[_stride_rho_1 + _stride_rho_2]) * (_data_phi[0] - _data_phi[_stride_phi_0 + _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1] - _data_phi[_stride_phi_2]) + z * (_data_rho[_stride_rho_0] + _data_rho[_stride_rho_1 + _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1] + _data_phi[_stride_phi_0 + _stride_phi_2] - _data_phi[_stride_phi_1] - _data_phi[_stride_phi_2])) * 0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0] + 0.5 * _data_rho[_stride_rho_1 + _stride_rho_2]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082; + _data_j[_stride_j_0 + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0] - f_ext_0 * z * _data_rho[_stride_rho_1 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0] + f_ext_1 * z * _data_rho[_stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0] + f_ext_2 * z * _data_rho[_stride_rho_1 + _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_1 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0] + z * _data_phi[_stride_phi_0] * _data_rho[_stride_rho_0] + z * _data_phi[_stride_phi_0] * _data_rho[_stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0] - z * _data_phi[_stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_1 + _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0] + 0.5 * _data_rho[_stride_rho_1 + _stride_rho_2]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082; } for (int64_t ctr_0 = 2; ctr_0 < _size_j_0 - 1; ctr_0 += 1) { if (0 < _size_j_1 - 1 && 0 < _size_j_2 - 1) { double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 0, seed, random_7_0, random_7_1); - _data_j[_stride_j_0 * ctr_0 + 12 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0]) * 2.0 + kT * (-_data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0]) * 4.0 + z * (_data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0]) - z * (_data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0]) + z * (_data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_2])) * 0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082; + _data_j[_stride_j_0 * ctr_0 + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0] + kT * -2.0 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * ctr_0] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0] + z * _data_phi[_stride_phi_0 * ctr_0] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + z * _data_phi[_stride_phi_0 * ctr_0] * _data_rho[_stride_rho_0 * ctr_0]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082; } } if (0 < _size_j_1 - 1 && 0 < _size_j_2 - 1) { double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 0, seed, random_7_0, random_7_1); - _data_j[_stride_j_0 * (_size_j_0 - 1) + 12 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1)]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1)]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1)]) * 2.0 + kT * (-_data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1)]) * 4.0 + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1)]) * (-_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0]) - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1)]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 + _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1)]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_2])) * 0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1)]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082; + _data_j[_stride_j_0 * (_size_j_0 - 1) + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1)] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1)] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1)] + kT * -2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1)] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1)] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1)] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1)] * _data_rho[_stride_rho_0 * (_size_j_0 - 1)]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1)]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082; } } for (int64_t ctr_1 = 1; ctr_1 < _size_j_1 - 1; ctr_1 += 1) { @@ -158,31 +158,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + 6 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2]) * -2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_1 * ctr_1]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2]), 0.5) * (random_10_0 - 0.5) * 1.6628028407278295; } @@ -190,31 +190,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + 8 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1]) * -2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1]) * 2.0 + kT * (-_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1]) * 4.0 + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + 0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1]), 0.5) * (random_11_0 - 0.5) * 1.6628028407278295; } @@ -222,31 +222,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + 10 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] - f_ext_0 * z * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] - f_ext_1 * z * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + f_ext_2 * z * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1] * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] - z * _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]), 0.5) * (random_12_0 - 0.5) * 1.5025119784898082; } @@ -254,33 +254,33 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_7_0, random_7_1); - _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + 12 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_1 * ctr_1]) - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1] - _data_phi[_stride_phi_1 * ctr_1]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2])) * 0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082; + _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] - f_ext_0 * z * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + f_ext_1 * z * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + f_ext_2 * z * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1] * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] - z * _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082; } } for (int64_t ctr_0 = 2; ctr_0 < _size_j_0 - 1; ctr_0 += 1) { @@ -288,31 +288,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + 6 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]) * -2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]), 0.5) * (random_10_0 - 0.5) * 1.6628028407278295; } @@ -320,31 +320,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + 8 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1]) * -2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1]) * 2.0 + kT * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1]) * 4.0 + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1]), 0.5) * (random_11_0 - 0.5) * 1.6628028407278295; } @@ -352,31 +352,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + 10 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]), 0.5) * (random_12_0 - 0.5) * 1.5025119784898082; } @@ -384,33 +384,33 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_7_0, random_7_1); - _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + 12 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_1] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1]) - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_1] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2])) * 0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082; + _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082; } } { @@ -418,31 +418,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + 6 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]) * -2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]), 0.5) * (random_10_0 - 0.5) * 1.6628028407278295; } @@ -450,31 +450,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + 10 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]), 0.5) * (random_12_0 - 0.5) * 1.5025119784898082; } @@ -482,33 +482,33 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_7_0, random_7_1); - _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + 12 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_1] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1]) - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_1] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2])) * 0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082; + _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082; } } } @@ -519,31 +519,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + 8 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)]) * -2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)]) * 2.0 + kT * (-_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)]) * 4.0 + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1)]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1)])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + 0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)]), 0.5) * (random_11_0 - 0.5) * 1.6628028407278295; } @@ -551,31 +551,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + 10 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] - f_ext_1 * z * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] + f_ext_2 * z * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1)] * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1)] * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] - z * _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] + 0.5 * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]), 0.5) * (random_12_0 - 0.5) * 1.5025119784898082; } @@ -585,31 +585,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + 8 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)]) * -2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)]) * 2.0 + kT * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)]) * 4.0 + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1)]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1)])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)]), 0.5) * (random_11_0 - 0.5) * 1.6628028407278295; } @@ -617,31 +617,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + 10 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1)] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1)] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]), 0.5) * (random_12_0 - 0.5) * 1.5025119784898082; } @@ -650,31 +650,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * (_size_j_1 - 1) + 10 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1)] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1)] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]), 0.5) * (random_12_0 - 0.5) * 1.5025119784898082; } @@ -688,31 +688,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_2 * ctr_2 + 4 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2]) * 4.0 + z * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_2 * ctr_2])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_9_0 - 0.5) * 1.6628028407278295; } @@ -720,31 +720,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + f_ext_1 * z * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] - f_ext_2 * z * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - z * _data_phi[_stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_12_1 - 0.5) * 1.5025119784898082; } @@ -752,33 +752,33 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); - _data_j[_stride_j_0 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_2 * ctr_2 + _stride_phi_2])) * 0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082; + _data_j[_stride_j_0 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + f_ext_1 * z * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + f_ext_2 * z * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - z * _data_phi[_stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082; } } for (int64_t ctr_0 = 2; ctr_0 < _size_j_0 - 1; ctr_0 += 1) { @@ -786,31 +786,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_2 * ctr_2 + 4 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_2 * ctr_2])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_9_0 - 0.5) * 1.6628028407278295; } @@ -818,31 +818,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_12_1 - 0.5) * 1.5025119784898082; } @@ -850,33 +850,33 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); - _data_j[_stride_j_0 * ctr_0 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_2 * ctr_2 + _stride_phi_2])) * 0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082; + _data_j[_stride_j_0 * ctr_0 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082; } } { @@ -884,31 +884,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_2 * ctr_2 + 4 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * (-_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_2 * ctr_2])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_9_0 - 0.5) * 1.6628028407278295; } @@ -916,31 +916,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_12_1 - 0.5) * 1.5025119784898082; } @@ -948,33 +948,33 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); - _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_2 * ctr_2 + _stride_phi_2])) * 0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082; + _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082; } } } @@ -985,31 +985,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2] = D * (-f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) * 2.0 + z * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2])) * 0.081462038946841925 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_7_0 - 0.5) * 1.977416969040271; } @@ -1017,31 +1017,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + _stride_j_3] = D * (-f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 2.0 + z * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2])) * 0.081462038946841925 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_7_1 - 0.5) * 1.977416969040271; } @@ -1049,31 +1049,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 2 * _stride_j_3] = D * (f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) * 2.0 + z * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2])) * -0.081462038946841925 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + 0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_8_0 - 0.5) * 1.977416969040271; } @@ -1081,31 +1081,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 3 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0 + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 4.0 + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_8_1 - 0.5) * 1.6628028407278295; } @@ -1113,31 +1113,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 4 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 4.0 + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_9_0 - 0.5) * 1.6628028407278295; } @@ -1145,31 +1145,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 5 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2])) * -0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_9_1 - 0.5) * 1.6628028407278295; } @@ -1177,31 +1177,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 6 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_10_0 - 0.5) * 1.6628028407278295; } @@ -1209,31 +1209,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 7 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2])) * -0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_10_1 - 0.5) * 1.6628028407278295; } @@ -1241,31 +1241,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 8 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_11_0 - 0.5) * 1.6628028407278295; } @@ -1273,63 +1273,63 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); - _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_1 * z * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_2 * z * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - z * _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_11_1 - 0.5) * 1.5025119784898082; + _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0 - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2])) * -0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_11_1 - 0.5) * 1.5025119784898082; } { double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_1 * z * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + f_ext_2 * z * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - z * _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_12_0 - 0.5) * 1.5025119784898082; } @@ -1337,31 +1337,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + f_ext_1 * z * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_2 * z * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - z * _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_12_1 - 0.5) * 1.5025119784898082; } @@ -1369,33 +1369,33 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); - _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2])) * 0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082; + _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + f_ext_1 * z * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + f_ext_2 * z * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - z * _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082; } } for (int64_t ctr_0 = 2; ctr_0 < _size_j_0 - 1; ctr_0 += 1) { @@ -1403,31 +1403,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2] = D * (-f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) * 2.0 + z * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2])) * 0.081462038946841925 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_7_0 - 0.5) * 1.977416969040271; } @@ -1435,31 +1435,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + _stride_j_3] = D * (-f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 2.0 + z * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2])) * 0.081462038946841925 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_7_1 - 0.5) * 1.977416969040271; } @@ -1467,31 +1467,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 2 * _stride_j_3] = D * (f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) * 2.0 + z * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2])) * -0.081462038946841925 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_8_0 - 0.5) * 1.977416969040271; } @@ -1499,31 +1499,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 3 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0 + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_8_1 - 0.5) * 1.6628028407278295; } @@ -1531,31 +1531,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 4 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_9_0 - 0.5) * 1.6628028407278295; } @@ -1563,31 +1563,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 5 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2])) * -0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_9_1 - 0.5) * 1.6628028407278295; } @@ -1595,31 +1595,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 6 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_10_0 - 0.5) * 1.6628028407278295; } @@ -1627,31 +1627,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 7 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2])) * -0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_10_1 - 0.5) * 1.6628028407278295; } @@ -1659,31 +1659,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 8 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_11_0 - 0.5) * 1.6628028407278295; } @@ -1691,63 +1691,63 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); - _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_11_1 - 0.5) * 1.5025119784898082; + _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0 - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2])) * -0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_11_1 - 0.5) * 1.5025119784898082; } { double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_12_0 - 0.5) * 1.5025119784898082; } @@ -1755,31 +1755,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_12_1 - 0.5) * 1.5025119784898082; } @@ -1787,33 +1787,33 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); - _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2])) * 0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082; + _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082; } } { @@ -1821,31 +1821,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2] = D * (-f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) + kT * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) * 2.0 + z * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2])) * 0.081462038946841925 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_7_0 - 0.5) * 1.977416969040271; } @@ -1853,31 +1853,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 3 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0 + kT * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_8_1 - 0.5) * 1.6628028407278295; } @@ -1885,31 +1885,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 4 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * (-_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_9_0 - 0.5) * 1.6628028407278295; } @@ -1917,31 +1917,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 5 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2])) * -0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_9_1 - 0.5) * 1.6628028407278295; } @@ -1949,31 +1949,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 6 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_10_0 - 0.5) * 1.6628028407278295; } @@ -1981,63 +1981,63 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); - _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_11_1 - 0.5) * 1.5025119784898082; + _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0 - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2])) * -0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_11_1 - 0.5) * 1.5025119784898082; } { double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_12_0 - 0.5) * 1.5025119784898082; } @@ -2045,31 +2045,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_12_1 - 0.5) * 1.5025119784898082; } @@ -2077,33 +2077,33 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); - _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2])) * 0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082; + _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082; } } } @@ -2114,31 +2114,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + _stride_j_3] = D * (-f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 2.0 + z * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2])) * 0.081462038946841925 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_7_1 - 0.5) * 1.977416969040271; } @@ -2146,31 +2146,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 3 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0 + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 4.0 + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_8_1 - 0.5) * 1.6628028407278295; } @@ -2178,31 +2178,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 7 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2])) * -0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_10_1 - 0.5) * 1.6628028407278295; } @@ -2210,31 +2210,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 8 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_11_0 - 0.5) * 1.6628028407278295; } @@ -2242,63 +2242,63 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); - _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_1 * z * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_2 * z * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - z * _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_11_1 - 0.5) * 1.5025119784898082; + _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0 - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2])) * -0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_11_1 - 0.5) * 1.5025119784898082; } if (_size_j_1 - 1 > 0 && ctr_2 < _size_j_2 - 1) { double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_1 * z * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + f_ext_2 * z * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - z * _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_12_0 - 0.5) * 1.5025119784898082; } @@ -2308,31 +2308,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + _stride_j_3] = D * (-f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 2.0 + z * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2])) * 0.081462038946841925 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_7_1 - 0.5) * 1.977416969040271; } @@ -2340,31 +2340,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 3 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0 + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_8_1 - 0.5) * 1.6628028407278295; } @@ -2372,31 +2372,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 7 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2])) * -0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_10_1 - 0.5) * 1.6628028407278295; } @@ -2404,31 +2404,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 8 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0 + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_11_0 - 0.5) * 1.6628028407278295; } @@ -2436,63 +2436,63 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); - _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_11_1 - 0.5) * 1.5025119784898082; + _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0 - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2])) * -0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_11_1 - 0.5) * 1.5025119784898082; } if (_size_j_1 - 1 > 0 && ctr_2 < _size_j_2 - 1) { double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_12_0 - 0.5) * 1.5025119784898082; } @@ -2502,31 +2502,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 3 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0 + kT * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5) * (random_8_1 - 0.5) * 1.6628028407278295; } @@ -2534,63 +2534,63 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); - _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_11_1 - 0.5) * 1.5025119784898082; + _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0 - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2])) * -0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5) * (random_11_1 - 0.5) * 1.5025119784898082; } if (_size_j_1 - 1 > 0 && ctr_2 < _size_j_2 - 1) { double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5) * (random_12_0 - 0.5) * 1.5025119784898082; } @@ -2604,31 +2604,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] + f_ext_1 * z * _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_2 * z * _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - z * _data_phi[_stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] - z * _data_phi[_stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_12_1 - 0.5) * 1.5025119784898082; } @@ -2637,31 +2637,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_12_1 - 0.5) * 1.5025119784898082; } @@ -2670,31 +2670,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_12_1 - 0.5) * 1.5025119784898082; } @@ -2706,31 +2706,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 2 * _stride_j_3] = D * (f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)]) + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)]) * 2.0 + z * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)]) * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)])) * -0.081462038946841925 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + 0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)]), 0.5) * (random_8_0 - 0.5) * 1.977416969040271; } @@ -2738,31 +2738,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 5 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)])) * -0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_9_1 - 0.5) * 1.6628028407278295; } @@ -2770,31 +2770,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 7 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)])) * -0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_10_1 - 0.5) * 1.6628028407278295; } @@ -2802,63 +2802,63 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_7_0, random_7_1); - _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_1 * z * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_2 * z * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - z * _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - z * _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_11_1 - 0.5) * 1.5025119784898082; + _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0 - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)])) * -0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_11_1 - 0.5) * 1.5025119784898082; } if (_size_j_2 - 1 > 0 && ctr_1 < _size_j_1 - 1) { double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + f_ext_1 * z * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_2 * z * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - z * _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - z * _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_12_1 - 0.5) * 1.5025119784898082; } @@ -2868,31 +2868,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 2 * _stride_j_3] = D * (f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)]) + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)]) * 2.0 + z * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)]) * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)])) * -0.081462038946841925 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)]), 0.5) * (random_8_0 - 0.5) * 1.977416969040271; } @@ -2900,31 +2900,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 5 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)])) * -0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_9_1 - 0.5) * 1.6628028407278295; } @@ -2932,31 +2932,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 7 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)])) * -0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_10_1 - 0.5) * 1.6628028407278295; } @@ -2964,63 +2964,63 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_7_0, random_7_1); - _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_11_1 - 0.5) * 1.5025119784898082; + _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0 - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)])) * -0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_11_1 - 0.5) * 1.5025119784898082; } if (_size_j_2 - 1 > 0 && ctr_1 < _size_j_1 - 1) { double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_12_1 - 0.5) * 1.5025119784898082; } @@ -3030,31 +3030,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 5 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)])) * -0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_9_1 - 0.5) * 1.6628028407278295; } @@ -3062,63 +3062,63 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_7_0, random_7_1); - _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_11_1 - 0.5) * 1.5025119784898082; + _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0 - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)])) * -0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_11_1 - 0.5) * 1.5025119784898082; } if (_size_j_2 - 1 > 0 && ctr_1 < _size_j_1 - 1) { double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_12_1 - 0.5) * 1.5025119784898082; } @@ -3131,31 +3131,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * (_size_j_2 - 1) + 7 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)])) * -0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_10_1 - 0.5) * 1.6628028407278295; } @@ -3163,33 +3163,33 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_7_0, random_7_1); - _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_1 * z * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_2 * z * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - z * _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - z * _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_11_1 - 0.5) * 1.5025119784898082; + _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0 - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)])) * -0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_11_1 - 0.5) * 1.5025119784898082; } } for (int64_t ctr_0 = 2; ctr_0 < _size_j_0 - 1; ctr_0 += 1) { @@ -3197,31 +3197,31 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_7_0, random_7_1); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * (_size_j_2 - 1) + 7 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0 + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)])) * -0.028801180074297286 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_10_1 - 0.5) * 1.6628028407278295; } @@ -3229,66 +3229,66 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_double_p double random_13_0; double random_13_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_7_0, random_7_1); - _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_11_1 - 0.5) * 1.5025119784898082; + _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0 - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)])) * -0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_11_1 - 0.5) * 1.5025119784898082; } } if (_size_j_1 - 1 > 0 && _size_j_2 - 1 > 0) { double random_13_0; double random_13_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 6, seed, random_13_0, random_13_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 6, seed, random_13_0, random_13_1); double random_12_0; double random_12_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 5, seed, random_12_0, random_12_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 5, seed, random_12_0, random_12_1); double random_11_0; double random_11_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 4, seed, random_11_0, random_11_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 4, seed, random_11_0, random_11_1); double random_10_0; double random_10_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_10_0, random_10_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_10_0, random_10_1); double random_9_0; double random_9_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_9_0, random_9_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_9_0, random_9_1); double random_8_0; double random_8_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_8_0, random_8_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_8_0, random_8_1); double random_7_0; double random_7_1; - philox_double2(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_7_0, random_7_1); + philox_double2(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_7_0, random_7_1); - _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_11_1 - 0.5) * 1.5025119784898082; + _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0 + kT * (-_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0 - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)])) * -0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5 * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5) * (random_11_1 - 0.5) * 1.5025119784898082; } } } diff --git a/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostaticThermalized_double_precision.h b/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostaticThermalized_double_precision.h index c59ba68c9a6..5e6165a1ae7 100644 --- a/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostaticThermalized_double_precision.h +++ b/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostaticThermalized_double_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -60,7 +62,9 @@ class DiffusiveFluxKernelWithElectrostaticThermalized_double_precision { : jID(jID_), phiID(phiID_), rhoID(rhoID_), D_(D), f_ext_0_(f_ext_0), f_ext_1_(f_ext_1), f_ext_2_(f_ext_2), field_size_0_(field_size_0), field_size_1_(field_size_1), field_size_2_(field_size_2), kT_(kT), - seed_(seed), time_step_(time_step), z_(z), configured_(false){}; + seed_(seed), time_step_(time_step), z_(z), block_offset_0_(uint32_t(0)), + block_offset_1_(uint32_t(0)), block_offset_2_(uint32_t(0)), + configured_(false) {} void run(IBlock *block); @@ -110,8 +114,49 @@ class DiffusiveFluxKernelWithElectrostaticThermalized_double_precision { configured_ = true; } + inline double getD() const { return D_; } + inline uint32_t getBlock_offset_0() const { return block_offset_0_; } + inline uint32_t getBlock_offset_1() const { return block_offset_1_; } + inline uint32_t getBlock_offset_2() const { return block_offset_2_; } + inline double getF_ext_0() const { return f_ext_0_; } + inline double getF_ext_1() const { return f_ext_1_; } + inline double getF_ext_2() const { return f_ext_2_; } + inline uint32_t getField_size_0() const { return field_size_0_; } + inline uint32_t getField_size_1() const { return field_size_1_; } + inline uint32_t getField_size_2() const { return field_size_2_; } + inline double getKt() const { return kT_; } + inline uint32_t getSeed() const { return seed_; } + inline uint32_t getTime_step() const { return time_step_; } + inline double getZ() const { return z_; } + inline void setD(const double value) { D_ = value; } + inline void setBlock_offset_0(const uint32_t value) { + block_offset_0_ = value; + } + inline void setBlock_offset_1(const uint32_t value) { + block_offset_1_ = value; + } + inline void setBlock_offset_2(const uint32_t value) { + block_offset_2_ = value; + } + inline void setF_ext_0(const double value) { f_ext_0_ = value; } + inline void setF_ext_1(const double value) { f_ext_1_ = value; } + inline void setF_ext_2(const double value) { f_ext_2_ = value; } + inline void setField_size_0(const uint32_t value) { field_size_0_ = value; } + inline void setField_size_1(const uint32_t value) { field_size_1_ = value; } + inline void setField_size_2(const uint32_t value) { field_size_2_ = value; } + inline void setKt(const double value) { kT_ = value; } + inline void setSeed(const uint32_t value) { seed_ = value; } + inline void setTime_step(const uint32_t value) { time_step_ = value; } + inline void setZ(const double value) { z_ = value; } + +private: BlockDataID jID; BlockDataID phiID; + +public: + inline void setPhiID(BlockDataID phiID_) { phiID = phiID_; } + +private: BlockDataID rhoID; double D_; uint32_t block_offset_0_; @@ -127,6 +172,7 @@ class DiffusiveFluxKernelWithElectrostaticThermalized_double_precision { uint32_t seed_; uint32_t time_step_; double z_; + bool configured_; }; diff --git a/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostaticThermalized_single_precision.cpp b/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostaticThermalized_single_precision.cpp index 2d5dc5bbd5a..3eda18663a3 100644 --- a/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostaticThermalized_single_precision.cpp +++ b/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostaticThermalized_single_precision.cpp @@ -17,7 +17,7 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #include @@ -58,25 +58,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0] - f_ext_0 * z * _data_rho[_stride_rho_1 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0] + f_ext_1 * z * _data_rho[_stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0] + f_ext_2 * z * _data_rho[_stride_rho_1 + _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_1 + _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0] + z * _data_phi[_stride_phi_0] * _data_rho[_stride_rho_0] + z * _data_phi[_stride_phi_0] * _data_rho[_stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0] - z * _data_phi[_stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_1 + _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_7_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0] + 0.5f * _data_rho[_stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -87,25 +87,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0] + kT * -2.0f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * ctr_0] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0] + z * _data_phi[_stride_phi_0 * ctr_0] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + z * _data_phi[_stride_phi_0 * ctr_0] * _data_rho[_stride_rho_0 * ctr_0]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_7_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0]), 0.5f) * 1.5025119784898082f; } @@ -116,25 +116,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, block_offset_2 % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1)] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1)] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1)] + kT * -2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1)] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1)] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1)] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1)] * _data_rho[_stride_rho_0 * (_size_j_0 - 1)]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_7_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1)]), 0.5f) * 1.5025119784898082f; } @@ -148,25 +148,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + 6 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2]) * 4.0f + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_1 * ctr_1]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_5_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -176,25 +176,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + 8 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1]) * 2.0f + kT * (-_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1]) * 4.0f + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_6_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + 0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1]), 0.5f) * 1.6628028407278295f; } @@ -204,27 +204,27 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); - _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + 10 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] - f_ext_0 * z * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] - f_ext_1 * z * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + f_ext_2 * z * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1] * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] - z * _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; + _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + 10 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * -2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * 4.0f - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1] - _data_phi[_stride_phi_1 * ctr_1]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_1 * ctr_1])) * 0.02351606505734748f * ((1.0f) / (kT)) + (random_6_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } if (0 < _size_j_2 - 1 && ctr_1 < _size_j_1 - 1) { @@ -232,25 +232,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] - f_ext_0 * z * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + f_ext_1 * z * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + f_ext_2 * z * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1] * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] - z * _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_7_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -262,25 +262,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + 6 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]) * 4.0f + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_5_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -290,25 +290,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + 8 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1]) * 2.0f + kT * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1]) * 4.0f + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_6_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1]), 0.5f) * 1.6628028407278295f; } @@ -318,27 +318,27 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); - _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + 10 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; + _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + 10 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * -2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * 4.0f - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1])) * 0.02351606505734748f * ((1.0f) / (kT)) + (random_6_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } if (0 < _size_j_2 - 1 && ctr_1 < _size_j_1 - 1) { @@ -346,25 +346,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_7_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -376,25 +376,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + 6 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]) * 4.0f + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_5_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -404,27 +404,27 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); - _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + 10 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; + _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + 10 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * -2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * 4.0f - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 - _stride_phi_1] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 - _stride_phi_1] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1])) * 0.02351606505734748f * ((1.0f) / (kT)) + (random_6_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } if (0 < _size_j_2 - 1 && ctr_1 < _size_j_1 - 1) { @@ -432,25 +432,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_7_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -465,25 +465,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + 8 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)]) * 2.0f + kT * (-_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)]) * 4.0f + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1)]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1)])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_6_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + 0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)]), 0.5f) * 1.6628028407278295f; } @@ -493,27 +493,27 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); - _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + 10 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] - f_ext_1 * z * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] + f_ext_2 * z * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1)] * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1)] * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] - z * _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] + 0.5f * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; + _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + 10 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * -2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] - _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * 4.0f - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1] - _data_phi[_stride_phi_1 * (_size_j_1 - 1)]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1] - _data_phi[_stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2] - _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1] - _data_phi[_stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2] + _data_phi[_stride_phi_1 * (_size_j_1 - 1)])) * 0.02351606505734748f * ((1.0f) / (kT)) + (random_6_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1)] + 0.5f * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } } for (int64_t ctr_0 = 2; ctr_0 < _size_j_0 - 1; ctr_0 += 1) { @@ -523,25 +523,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + 8 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)]) * 2.0f + kT * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)]) * 4.0f + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1)]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1)])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_6_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)]), 0.5f) * 1.6628028407278295f; } @@ -551,27 +551,27 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); - _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + 10 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1)] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1)] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; + _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + 10 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * -2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * 4.0f - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1)]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1)])) * 0.02351606505734748f * ((1.0f) / (kT)) + (random_6_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1)] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } } if (_size_j_1 - 1 > 0 && 0 < _size_j_2 - 1) { @@ -580,27 +580,27 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, block_offset_2 % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); - _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * (_size_j_1 - 1) + 10 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1)] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1)] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; + _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * (_size_j_1 - 1) + 10 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * -2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * 4.0f - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1)]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1)])) * 0.02351606505734748f * ((1.0f) / (kT)) + (random_6_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1)] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } } } @@ -614,25 +614,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_2 * ctr_2 + 4 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2]) * 4.0f + z * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_2 * ctr_2])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_5_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.6628028407278295f; } @@ -642,27 +642,27 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); - _data_j[_stride_j_0 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0f - z * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_2 * ctr_2 - _stride_phi_2])) * -0.02351606505734748f * ((1.0f) / (kT)) + (random_6_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; + _data_j[_stride_j_0 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + f_ext_1 * z * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] - f_ext_2 * z * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - z * _data_phi[_stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } if (0 < _size_j_1 - 1 && ctr_2 < _size_j_2 - 1) { @@ -670,25 +670,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + f_ext_1 * z * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + f_ext_2 * z * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - z * _data_phi[_stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_7_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -700,25 +700,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_2 * ctr_2 + 4 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 4.0f + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_2 * ctr_2])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_5_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.6628028407278295f; } @@ -728,27 +728,27 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); - _data_j[_stride_j_0 * ctr_0 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0f - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_2 * ctr_2 - _stride_phi_2])) * -0.02351606505734748f * ((1.0f) / (kT)) + (random_6_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; + _data_j[_stride_j_0 * ctr_0 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } if (0 < _size_j_1 - 1 && ctr_2 < _size_j_2 - 1) { @@ -756,25 +756,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_7_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -786,25 +786,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_2 * ctr_2 + 4 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 4.0f + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * (-_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_2 * ctr_2])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_5_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.6628028407278295f; } @@ -814,27 +814,27 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); - _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0f - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (-_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_2 * ctr_2 - _stride_phi_2])) * -0.02351606505734748f * ((1.0f) / (kT)) + (random_6_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; + _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } if (0 < _size_j_1 - 1 && ctr_2 < _size_j_2 - 1) { @@ -842,25 +842,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_7_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -875,25 +875,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2] = D * (-f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) * 2.0f + z * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2])) * 0.081462038946841925f * ((1.0f) / (kT)) + (random_4_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.977416969040271f; } @@ -903,25 +903,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + _stride_j_3] = D * (-f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 2.0f + z * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2])) * 0.081462038946841925f * ((1.0f) / (kT)) + (random_4_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.977416969040271f; } @@ -931,25 +931,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 2 * _stride_j_3] = D * (f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) * 2.0f + z * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2])) * -0.081462038946841925f * ((1.0f) / (kT)) + (random_4_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + 0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.977416969040271f; } @@ -959,25 +959,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 3 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0f + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 4.0f + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_4_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.6628028407278295f; } @@ -987,25 +987,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 4 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 4.0f + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_5_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.6628028407278295f; } @@ -1015,25 +1015,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 5 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0f + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2])) * -0.028801180074297286f * ((1.0f) / (kT)) + (random_5_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -1043,25 +1043,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 6 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0f + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_5_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -1071,25 +1071,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 7 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0f + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2])) * -0.028801180074297286f * ((1.0f) / (kT)) + (random_5_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -1099,25 +1099,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 8 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0f + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_6_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -1127,25 +1127,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_1 * z * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_2 * z * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - z * _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -1155,27 +1155,27 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); - _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_1 * z * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + f_ext_2 * z * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - z * _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; + _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0f - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2])) * 0.02351606505734748f * ((1.0f) / (kT)) + (random_6_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } { @@ -1183,27 +1183,27 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); - _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0f - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2])) * -0.02351606505734748f * ((1.0f) / (kT)) + (random_6_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; + _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + f_ext_1 * z * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_2 * z * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - z * _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } { @@ -1211,25 +1211,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + f_ext_1 * z * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + f_ext_2 * z * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - z * _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_7_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -1241,25 +1241,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2] = D * (-f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) * 2.0f + z * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2])) * 0.081462038946841925f * ((1.0f) / (kT)) + (random_4_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.977416969040271f; } @@ -1269,25 +1269,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + _stride_j_3] = D * (-f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 2.0f + z * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2])) * 0.081462038946841925f * ((1.0f) / (kT)) + (random_4_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.977416969040271f; } @@ -1297,25 +1297,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 2 * _stride_j_3] = D * (f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) * 2.0f + z * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2])) * -0.081462038946841925f * ((1.0f) / (kT)) + (random_4_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.977416969040271f; } @@ -1325,25 +1325,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 3 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0f + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 4.0f + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_4_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.6628028407278295f; } @@ -1353,25 +1353,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 4 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 4.0f + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_5_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.6628028407278295f; } @@ -1381,25 +1381,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 5 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0f + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2])) * -0.028801180074297286f * ((1.0f) / (kT)) + (random_5_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -1409,25 +1409,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 6 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0f + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_5_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -1437,25 +1437,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 7 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0f + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2])) * -0.028801180074297286f * ((1.0f) / (kT)) + (random_5_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -1465,25 +1465,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 8 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0f + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_6_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -1493,25 +1493,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -1521,27 +1521,27 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); - _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; + _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0f - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2])) * 0.02351606505734748f * ((1.0f) / (kT)) + (random_6_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } { @@ -1549,27 +1549,27 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); - _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0f - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2])) * -0.02351606505734748f * ((1.0f) / (kT)) + (random_6_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; + _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } { @@ -1577,25 +1577,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_7_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -1607,25 +1607,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2] = D * (-f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) + kT * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]) * 2.0f + z * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2])) * 0.081462038946841925f * ((1.0f) / (kT)) + (random_4_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.977416969040271f; } @@ -1635,25 +1635,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 3 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0f + kT * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 4.0f + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_4_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.6628028407278295f; } @@ -1663,25 +1663,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 4 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * 4.0f + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * (-_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_5_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.6628028407278295f; } @@ -1691,25 +1691,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 5 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0f + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2])) * -0.028801180074297286f * ((1.0f) / (kT)) + (random_5_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -1719,25 +1719,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 6 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0f + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_5_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -1747,25 +1747,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -1775,27 +1775,27 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); - _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; + _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0f - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2])) * 0.02351606505734748f * ((1.0f) / (kT)) + (random_6_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } { @@ -1803,27 +1803,27 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); - _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0f - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (-_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2 - _stride_phi_2])) * -0.02351606505734748f * ((1.0f) / (kT)) + (random_6_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; + _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 11 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } { @@ -1831,25 +1831,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * ctr_2 + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_7_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -1864,25 +1864,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + _stride_j_3] = D * (-f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 2.0f + z * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2])) * 0.081462038946841925f * ((1.0f) / (kT)) + (random_4_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.977416969040271f; } @@ -1892,25 +1892,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 3 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0f + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 4.0f + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_4_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.6628028407278295f; } @@ -1920,25 +1920,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 7 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0f + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2])) * -0.028801180074297286f * ((1.0f) / (kT)) + (random_5_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -1948,25 +1948,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 8 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0f + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_6_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -1976,25 +1976,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_1 * z * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_2 * z * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - z * _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2004,27 +2004,27 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); - _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_1 * z * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + f_ext_2 * z * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - z * _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; + _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0f - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2])) * 0.02351606505734748f * ((1.0f) / (kT)) + (random_6_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } } for (int64_t ctr_0 = 2; ctr_0 < _size_j_0 - 1; ctr_0 += 1) { @@ -2034,25 +2034,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + _stride_j_3] = D * (-f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 2.0f + z * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2])) * 0.081462038946841925f * ((1.0f) / (kT)) + (random_4_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.977416969040271f; } @@ -2062,25 +2062,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 3 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0f + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 4.0f + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_4_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.6628028407278295f; } @@ -2090,25 +2090,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 7 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 4.0f + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 - _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2])) * -0.028801180074297286f * ((1.0f) / (kT)) + (random_5_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -2118,25 +2118,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 8 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0f + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_6_0 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -2146,25 +2146,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2174,27 +2174,27 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); - _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; + _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0f - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2])) * 0.02351606505734748f * ((1.0f) / (kT)) + (random_6_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } } { @@ -2204,25 +2204,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 3 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * -2.0f + kT * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * 4.0f + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2])) * 0.028801180074297286f * ((1.0f) / (kT)) + (random_4_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2]), 0.5f) * 1.6628028407278295f; } @@ -2232,25 +2232,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 9 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2260,27 +2260,27 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((block_offset_2 + ctr_2) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (block_offset_2 + ctr_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); - _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; + _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * ctr_2 + 10 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 2.0f + kT * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] - _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * 4.0f - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 + _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]) * (-_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * ctr_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2 + _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * ctr_2])) * 0.02351606505734748f * ((1.0f) / (kT)) + (random_6_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * ctr_2] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * ctr_2 + _stride_rho_2]), 0.5f) * 1.5025119784898082f; } } } @@ -2294,27 +2294,27 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); - _data_j[_stride_j_0 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0f - z * (_data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_2 * (_size_j_2 - 1)]) + z * (_data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2])) * -0.02351606505734748f * ((1.0f) / (kT)) + (random_6_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; + _data_j[_stride_j_0 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] + f_ext_1 * z * _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_2 * z * _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - z * _data_phi[_stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] - z * _data_phi[_stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } for (int64_t ctr_0 = 2; ctr_0 < _size_j_0 - 1; ctr_0 += 1) { if (_size_j_2 - 1 > 0 && 0 < _size_j_1 - 1) { @@ -2323,27 +2323,27 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); - _data_j[_stride_j_0 * ctr_0 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0f - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_2 * (_size_j_2 - 1)]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2])) * -0.02351606505734748f * ((1.0f) / (kT)) + (random_6_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; + _data_j[_stride_j_0 * ctr_0 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } } if (_size_j_2 - 1 > 0 && 0 < _size_j_1 - 1) { @@ -2352,27 +2352,27 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, block_offset_1 % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); - _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0f - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (-_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_2 * (_size_j_2 - 1)]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2])) * -0.02351606505734748f * ((1.0f) / (kT)) + (random_6_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; + _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } } for (int64_t ctr_1 = 1; ctr_1 < _size_j_1 - 1; ctr_1 += 1) { @@ -2384,25 +2384,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 2 * _stride_j_3] = D * (f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)]) + kT * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)]) * 2.0f + z * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)]) * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)])) * -0.081462038946841925f * ((1.0f) / (kT)) + (random_4_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + 0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)]), 0.5f) * 1.977416969040271f; } @@ -2412,25 +2412,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 5 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0f + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)])) * -0.028801180074297286f * ((1.0f) / (kT)) + (random_5_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -2440,25 +2440,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 7 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0f + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)])) * -0.028801180074297286f * ((1.0f) / (kT)) + (random_5_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -2468,25 +2468,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_1 * z * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_2 * z * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - z * _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - z * _data_phi[_stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2496,27 +2496,27 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); - _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0f - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (-_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)]) + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2])) * -0.02351606505734748f * ((1.0f) / (kT)) + (random_6_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; + _data_j[_stride_j_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + f_ext_1 * z * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_2 * z * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - z * _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - z * _data_phi[_stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } } for (int64_t ctr_0 = 2; ctr_0 < _size_j_0 - 1; ctr_0 += 1) { @@ -2526,25 +2526,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 2 * _stride_j_3] = D * (f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)]) + kT * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)]) * 2.0f + z * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)]) * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)])) * -0.081462038946841925f * ((1.0f) / (kT)) + (random_4_2 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)]), 0.5f) * 1.977416969040271f; } @@ -2554,25 +2554,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 5 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0f + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)])) * -0.028801180074297286f * ((1.0f) / (kT)) + (random_5_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -2582,25 +2582,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 7 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0f + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)])) * -0.028801180074297286f * ((1.0f) / (kT)) + (random_5_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -2610,25 +2610,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2638,27 +2638,27 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); - _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0f - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (-_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)]) + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2])) * -0.02351606505734748f * ((1.0f) / (kT)) + (random_6_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; + _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } } { @@ -2668,25 +2668,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 5 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0f + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)])) * -0.028801180074297286f * ((1.0f) / (kT)) + (random_5_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -2696,25 +2696,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2724,27 +2724,27 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((block_offset_1 + ctr_1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (block_offset_1 + ctr_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); - _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + f_ext_1 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * -2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0f - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (-_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)]) + z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2])) * -0.02351606505734748f * ((1.0f) / (kT)) + (random_6_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; + _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * ctr_1 + _stride_j_2 * (_size_j_2 - 1) + 11 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * ctr_1 + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * ctr_1 + _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * ctr_1 + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * ctr_1 + _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } } } @@ -2757,25 +2757,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * (_size_j_2 - 1) + 7 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0f + z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)])) * -0.028801180074297286f * ((1.0f) / (kT)) + (random_5_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -2785,25 +2785,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + 1) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_1 * z * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_2 * z * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - z * _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - z * _data_phi[_stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2815,25 +2815,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * (_size_j_2 - 1) + 7 * _stride_j_3] = D * (f_ext_1 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + f_ext_2 * z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 2.0f + kT * (-_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 4.0f + z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)]) - z * (_data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * (_data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] + _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] - _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1)])) * -0.028801180074297286f * ((1.0f) / (kT)) + (random_5_3 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.6628028407278295f; } @@ -2843,25 +2843,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((block_offset_0 + ctr_0) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (block_offset_0 + ctr_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * ctr_0 + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_1 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_2 * z * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * ctr_0 + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - z * _data_phi[_stride_phi_0 * ctr_0 - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * ctr_0 + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * ctr_0 - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } @@ -2872,25 +2872,25 @@ static FUNC_PREFIX void diffusivefluxkernelwithelectrostaticthermalized_single_p float random_7_1; float random_7_2; float random_7_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 3, seed, random_7_0, random_7_1, random_7_2, random_7_3); float random_6_0; float random_6_1; float random_6_2; float random_6_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 2, seed, random_6_0, random_6_1, random_6_2, random_6_3); float random_5_0; float random_5_1; float random_5_2; float random_5_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 1, seed, random_5_0, random_5_1, random_5_2, random_5_3); float random_4_0; float random_4_1; float random_4_2; float random_4_3; - philox_float4(time_step, ((_size_j_0 + block_offset_0 - 1) % (field_size_0)), ((_size_j_1 + block_offset_1 - 1) % (field_size_1)), ((_size_j_2 + block_offset_2 - 1) % (field_size_2)), 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); + philox_float4(time_step, (((_size_j_0 + block_offset_0 - 1) % field_size_0) + field_size_0) % field_size_0, (((_size_j_1 + block_offset_1 - 1) % field_size_1) + field_size_1) % field_size_1, (((_size_j_2 + block_offset_2 - 1) % field_size_2) + field_size_2) % field_size_2, 0, seed, random_4_0, random_4_1, random_4_2, random_4_3); _data_j[_stride_j_0 * (_size_j_0 - 1) + _stride_j_1 * (_size_j_1 - 1) + _stride_j_2 * (_size_j_2 - 1) + 9 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_0 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_1 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - f_ext_2 * z * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * -2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] + kT * 2.0f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) + _stride_phi_1 * (_size_j_1 - 1) + _stride_phi_2 * (_size_j_2 - 1)] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] - z * _data_phi[_stride_phi_0 * (_size_j_0 - 1) - _stride_phi_0 + _stride_phi_1 * (_size_j_1 - 1) - _stride_phi_1 + _stride_phi_2 * (_size_j_2 - 1) - _stride_phi_2] * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]) * 0.04703213011469496f * ((1.0f) / (kT)) + (random_6_1 - 0.5f) * powf(D * (0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) + _stride_rho_1 * (_size_j_1 - 1) + _stride_rho_2 * (_size_j_2 - 1)] + 0.5f * _data_rho[_stride_rho_0 * (_size_j_0 - 1) - _stride_rho_0 + _stride_rho_1 * (_size_j_1 - 1) - _stride_rho_1 + _stride_rho_2 * (_size_j_2 - 1) - _stride_rho_2]), 0.5f) * 1.5025119784898082f; } diff --git a/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostaticThermalized_single_precision.h b/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostaticThermalized_single_precision.h index 7149bb91333..9f1c5bae000 100644 --- a/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostaticThermalized_single_precision.h +++ b/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostaticThermalized_single_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -60,7 +62,9 @@ class DiffusiveFluxKernelWithElectrostaticThermalized_single_precision { : jID(jID_), phiID(phiID_), rhoID(rhoID_), D_(D), f_ext_0_(f_ext_0), f_ext_1_(f_ext_1), f_ext_2_(f_ext_2), field_size_0_(field_size_0), field_size_1_(field_size_1), field_size_2_(field_size_2), kT_(kT), - seed_(seed), time_step_(time_step), z_(z), configured_(false){}; + seed_(seed), time_step_(time_step), z_(z), block_offset_0_(uint32_t(0)), + block_offset_1_(uint32_t(0)), block_offset_2_(uint32_t(0)), + configured_(false) {} void run(IBlock *block); @@ -110,8 +114,49 @@ class DiffusiveFluxKernelWithElectrostaticThermalized_single_precision { configured_ = true; } + inline float getD() const { return D_; } + inline uint32_t getBlock_offset_0() const { return block_offset_0_; } + inline uint32_t getBlock_offset_1() const { return block_offset_1_; } + inline uint32_t getBlock_offset_2() const { return block_offset_2_; } + inline float getF_ext_0() const { return f_ext_0_; } + inline float getF_ext_1() const { return f_ext_1_; } + inline float getF_ext_2() const { return f_ext_2_; } + inline uint32_t getField_size_0() const { return field_size_0_; } + inline uint32_t getField_size_1() const { return field_size_1_; } + inline uint32_t getField_size_2() const { return field_size_2_; } + inline float getKt() const { return kT_; } + inline uint32_t getSeed() const { return seed_; } + inline uint32_t getTime_step() const { return time_step_; } + inline float getZ() const { return z_; } + inline void setD(const float value) { D_ = value; } + inline void setBlock_offset_0(const uint32_t value) { + block_offset_0_ = value; + } + inline void setBlock_offset_1(const uint32_t value) { + block_offset_1_ = value; + } + inline void setBlock_offset_2(const uint32_t value) { + block_offset_2_ = value; + } + inline void setF_ext_0(const float value) { f_ext_0_ = value; } + inline void setF_ext_1(const float value) { f_ext_1_ = value; } + inline void setF_ext_2(const float value) { f_ext_2_ = value; } + inline void setField_size_0(const uint32_t value) { field_size_0_ = value; } + inline void setField_size_1(const uint32_t value) { field_size_1_ = value; } + inline void setField_size_2(const uint32_t value) { field_size_2_ = value; } + inline void setKt(const float value) { kT_ = value; } + inline void setSeed(const uint32_t value) { seed_ = value; } + inline void setTime_step(const uint32_t value) { time_step_ = value; } + inline void setZ(const float value) { z_ = value; } + +private: BlockDataID jID; BlockDataID phiID; + +public: + inline void setPhiID(BlockDataID phiID_) { phiID = phiID_; } + +private: BlockDataID rhoID; float D_; uint32_t block_offset_0_; @@ -127,6 +172,7 @@ class DiffusiveFluxKernelWithElectrostaticThermalized_single_precision { uint32_t seed_; uint32_t time_step_; float z_; + bool configured_; }; diff --git a/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostatic_double_precision.h b/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostatic_double_precision.h index d6435a84de6..fe1c890f057 100644 --- a/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostatic_double_precision.h +++ b/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostatic_double_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -56,7 +58,7 @@ class DiffusiveFluxKernelWithElectrostatic_double_precision { BlockDataID jID_, BlockDataID phiID_, BlockDataID rhoID_, double D, double f_ext_0, double f_ext_1, double f_ext_2, double kT, double z) : jID(jID_), phiID(phiID_), rhoID(rhoID_), D_(D), f_ext_0_(f_ext_0), - f_ext_1_(f_ext_1), f_ext_2_(f_ext_2), kT_(kT), z_(z){}; + f_ext_1_(f_ext_1), f_ext_2_(f_ext_2), kT_(kT), z_(z) {} void run(IBlock *block); @@ -95,11 +97,30 @@ class DiffusiveFluxKernelWithElectrostatic_double_precision { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} - + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline double getD() const { return D_; } + inline double getF_ext_0() const { return f_ext_0_; } + inline double getF_ext_1() const { return f_ext_1_; } + inline double getF_ext_2() const { return f_ext_2_; } + inline double getKt() const { return kT_; } + inline double getZ() const { return z_; } + inline void setD(const double value) { D_ = value; } + inline void setF_ext_0(const double value) { f_ext_0_ = value; } + inline void setF_ext_1(const double value) { f_ext_1_ = value; } + inline void setF_ext_2(const double value) { f_ext_2_ = value; } + inline void setKt(const double value) { kT_ = value; } + inline void setZ(const double value) { z_ = value; } + +private: BlockDataID jID; BlockDataID phiID; + +public: + inline void setPhiID(BlockDataID phiID_) { phiID = phiID_; } + +private: BlockDataID rhoID; double D_; double f_ext_0_; diff --git a/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostatic_single_precision.h b/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostatic_single_precision.h index 2fb37dc3b42..5e63a009f52 100644 --- a/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostatic_single_precision.h +++ b/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostatic_single_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -56,7 +58,7 @@ class DiffusiveFluxKernelWithElectrostatic_single_precision { BlockDataID jID_, BlockDataID phiID_, BlockDataID rhoID_, float D, float f_ext_0, float f_ext_1, float f_ext_2, float kT, float z) : jID(jID_), phiID(phiID_), rhoID(rhoID_), D_(D), f_ext_0_(f_ext_0), - f_ext_1_(f_ext_1), f_ext_2_(f_ext_2), kT_(kT), z_(z){}; + f_ext_1_(f_ext_1), f_ext_2_(f_ext_2), kT_(kT), z_(z) {} void run(IBlock *block); @@ -95,11 +97,30 @@ class DiffusiveFluxKernelWithElectrostatic_single_precision { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} - + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline float getD() const { return D_; } + inline float getF_ext_0() const { return f_ext_0_; } + inline float getF_ext_1() const { return f_ext_1_; } + inline float getF_ext_2() const { return f_ext_2_; } + inline float getKt() const { return kT_; } + inline float getZ() const { return z_; } + inline void setD(const float value) { D_ = value; } + inline void setF_ext_0(const float value) { f_ext_0_ = value; } + inline void setF_ext_1(const float value) { f_ext_1_ = value; } + inline void setF_ext_2(const float value) { f_ext_2_ = value; } + inline void setKt(const float value) { kT_ = value; } + inline void setZ(const float value) { z_ = value; } + +private: BlockDataID jID; BlockDataID phiID; + +public: + inline void setPhiID(BlockDataID phiID_) { phiID = phiID_; } + +private: BlockDataID rhoID; float D_; float f_ext_0_; diff --git a/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernel_double_precision.h b/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernel_double_precision.h index f213a9bcfcf..f7f6831ab69 100644 --- a/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernel_double_precision.h +++ b/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernel_double_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -54,7 +56,7 @@ class DiffusiveFluxKernel_double_precision { public: DiffusiveFluxKernel_double_precision(BlockDataID jID_, BlockDataID rhoID_, double D) - : jID(jID_), rhoID(rhoID_), D_(D){}; + : jID(jID_), rhoID(rhoID_), D_(D) {} void run(IBlock *block); @@ -91,9 +93,13 @@ class DiffusiveFluxKernel_double_precision { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline double getD() const { return D_; } + inline void setD(const double value) { D_ = value; } +private: BlockDataID jID; BlockDataID rhoID; double D_; diff --git a/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernel_single_precision.h b/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernel_single_precision.h index 1f53da5451d..8f2dc3cf212 100644 --- a/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernel_single_precision.h +++ b/src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernel_single_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -54,7 +56,7 @@ class DiffusiveFluxKernel_single_precision { public: DiffusiveFluxKernel_single_precision(BlockDataID jID_, BlockDataID rhoID_, float D) - : jID(jID_), rhoID(rhoID_), D_(D){}; + : jID(jID_), rhoID(rhoID_), D_(D) {} void run(IBlock *block); @@ -91,9 +93,13 @@ class DiffusiveFluxKernel_single_precision { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline float getD() const { return D_; } + inline void setD(const float value) { D_ = value; } +private: BlockDataID jID; BlockDataID rhoID; float D_; diff --git a/src/walberla_bridge/src/electrokinetics/generated_kernels/Dirichlet_double_precision.h b/src/walberla_bridge/src/electrokinetics/generated_kernels/Dirichlet_double_precision.h index 0e9541e4b50..246e1f84a7d 100644 --- a/src/walberla_bridge/src/electrokinetics/generated_kernels/Dirichlet_double_precision.h +++ b/src/walberla_bridge/src/electrokinetics/generated_kernels/Dirichlet_double_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -97,7 +97,7 @@ class Dirichlet_double_precision { }; indexVectorID = blocks->addStructuredBlockData( createIdxVector, "IndexField_Dirichlet_double_precision"); - }; + } void run(IBlock *block); @@ -107,6 +107,13 @@ class Dirichlet_double_precision { void outer(IBlock *block); + Vector3 getForce(IBlock * /*block*/) { + + WALBERLA_ABORT( + "Boundary condition was not generated including force calculation.") + return Vector3(double_c(0.0)); + } + std::function getSweep() { return [this](IBlock *b) { this->run(b); }; } @@ -183,6 +190,7 @@ class Dirichlet_double_precision { void run_impl(IBlock *block, IndexVectors::Type type); BlockDataID indexVectorID; + std::function &, IBlock &)> elementInitaliser; diff --git a/src/walberla_bridge/src/electrokinetics/generated_kernels/Dirichlet_single_precision.h b/src/walberla_bridge/src/electrokinetics/generated_kernels/Dirichlet_single_precision.h index 8a8d3104e38..03613031a0e 100644 --- a/src/walberla_bridge/src/electrokinetics/generated_kernels/Dirichlet_single_precision.h +++ b/src/walberla_bridge/src/electrokinetics/generated_kernels/Dirichlet_single_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -97,7 +97,7 @@ class Dirichlet_single_precision { }; indexVectorID = blocks->addStructuredBlockData( createIdxVector, "IndexField_Dirichlet_single_precision"); - }; + } void run(IBlock *block); @@ -107,6 +107,13 @@ class Dirichlet_single_precision { void outer(IBlock *block); + Vector3 getForce(IBlock * /*block*/) { + + WALBERLA_ABORT( + "Boundary condition was not generated including force calculation.") + return Vector3(double_c(0.0)); + } + std::function getSweep() { return [this](IBlock *b) { this->run(b); }; } @@ -183,6 +190,7 @@ class Dirichlet_single_precision { void run_impl(IBlock *block, IndexVectors::Type type); BlockDataID indexVectorID; + std::function &, IBlock &)> elementInitaliser; diff --git a/src/walberla_bridge/src/electrokinetics/generated_kernels/FixedFlux_double_precision.h b/src/walberla_bridge/src/electrokinetics/generated_kernels/FixedFlux_double_precision.h index 8f1b418c929..abf0d070079 100644 --- a/src/walberla_bridge/src/electrokinetics/generated_kernels/FixedFlux_double_precision.h +++ b/src/walberla_bridge/src/electrokinetics/generated_kernels/FixedFlux_double_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -100,7 +100,7 @@ class FixedFlux_double_precision { }; indexVectorID = blocks->addStructuredBlockData( createIdxVector, "IndexField_FixedFlux_double_precision"); - }; + } void run(IBlock *block); @@ -110,6 +110,13 @@ class FixedFlux_double_precision { void outer(IBlock *block); + Vector3 getForce(IBlock * /*block*/) { + + WALBERLA_ABORT( + "Boundary condition was not generated including force calculation.") + return Vector3(double_c(0.0)); + } + std::function getSweep() { return [this](IBlock *b) { this->run(b); }; } @@ -730,6 +737,7 @@ class FixedFlux_double_precision { void run_impl(IBlock *block, IndexVectors::Type type); BlockDataID indexVectorID; + std::function( const Cell &, const shared_ptr &, IBlock &)> elementInitaliser; diff --git a/src/walberla_bridge/src/electrokinetics/generated_kernels/FixedFlux_single_precision.h b/src/walberla_bridge/src/electrokinetics/generated_kernels/FixedFlux_single_precision.h index 0f0de9e06ae..d46e70ab174 100644 --- a/src/walberla_bridge/src/electrokinetics/generated_kernels/FixedFlux_single_precision.h +++ b/src/walberla_bridge/src/electrokinetics/generated_kernels/FixedFlux_single_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -100,7 +100,7 @@ class FixedFlux_single_precision { }; indexVectorID = blocks->addStructuredBlockData( createIdxVector, "IndexField_FixedFlux_single_precision"); - }; + } void run(IBlock *block); @@ -110,6 +110,13 @@ class FixedFlux_single_precision { void outer(IBlock *block); + Vector3 getForce(IBlock * /*block*/) { + + WALBERLA_ABORT( + "Boundary condition was not generated including force calculation.") + return Vector3(double_c(0.0)); + } + std::function getSweep() { return [this](IBlock *b) { this->run(b); }; } @@ -730,6 +737,7 @@ class FixedFlux_single_precision { void run_impl(IBlock *block, IndexVectors::Type type); BlockDataID indexVectorID; + std::function( const Cell &, const shared_ptr &, IBlock &)> elementInitaliser; diff --git a/src/walberla_bridge/src/electrokinetics/generated_kernels/FrictionCouplingKernel_double_precision.h b/src/walberla_bridge/src/electrokinetics/generated_kernels/FrictionCouplingKernel_double_precision.h index 33d75315653..e3c23bceeec 100644 --- a/src/walberla_bridge/src/electrokinetics/generated_kernels/FrictionCouplingKernel_double_precision.h +++ b/src/walberla_bridge/src/electrokinetics/generated_kernels/FrictionCouplingKernel_double_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -54,7 +56,7 @@ class FrictionCouplingKernel_double_precision { public: FrictionCouplingKernel_double_precision(BlockDataID fID_, BlockDataID jID_, double D, double kT) - : fID(fID_), jID(jID_), D_(D), kT_(kT){}; + : fID(fID_), jID(jID_), D_(D), kT_(kT) {} void run(IBlock *block); @@ -91,9 +93,15 @@ class FrictionCouplingKernel_double_precision { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline double getD() const { return D_; } + inline double getKt() const { return kT_; } + inline void setD(const double value) { D_ = value; } + inline void setKt(const double value) { kT_ = value; } +private: BlockDataID fID; BlockDataID jID; double D_; diff --git a/src/walberla_bridge/src/electrokinetics/generated_kernels/FrictionCouplingKernel_single_precision.h b/src/walberla_bridge/src/electrokinetics/generated_kernels/FrictionCouplingKernel_single_precision.h index bd378a465b4..727c36ff911 100644 --- a/src/walberla_bridge/src/electrokinetics/generated_kernels/FrictionCouplingKernel_single_precision.h +++ b/src/walberla_bridge/src/electrokinetics/generated_kernels/FrictionCouplingKernel_single_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -54,7 +56,7 @@ class FrictionCouplingKernel_single_precision { public: FrictionCouplingKernel_single_precision(BlockDataID fID_, BlockDataID jID_, float D, float kT) - : fID(fID_), jID(jID_), D_(D), kT_(kT){}; + : fID(fID_), jID(jID_), D_(D), kT_(kT) {} void run(IBlock *block); @@ -91,9 +93,15 @@ class FrictionCouplingKernel_single_precision { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline float getD() const { return D_; } + inline float getKt() const { return kT_; } + inline void setD(const float value) { D_ = value; } + inline void setKt(const float value) { kT_ = value; } +private: BlockDataID fID; BlockDataID jID; float D_; diff --git a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_1_double_precision.h b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_1_double_precision.h index c549bf53a34..cd11957bb71 100644 --- a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_1_double_precision.h +++ b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_1_double_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -56,7 +58,7 @@ class ReactionKernelBulk_1_double_precision { double rate_coefficient, double stoech_0) : rho_0ID(rho_0ID_), order_0_(order_0), - rate_coefficient_(rate_coefficient), stoech_0_(stoech_0){}; + rate_coefficient_(rate_coefficient), stoech_0_(stoech_0) {} void run(IBlock *block); @@ -93,9 +95,19 @@ class ReactionKernelBulk_1_double_precision { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline double getOrder_0() const { return order_0_; } + inline double getRate_coefficient() const { return rate_coefficient_; } + inline double getStoech_0() const { return stoech_0_; } + inline void setOrder_0(const double value) { order_0_ = value; } + inline void setRate_coefficient(const double value) { + rate_coefficient_ = value; + } + inline void setStoech_0(const double value) { stoech_0_ = value; } +private: BlockDataID rho_0ID; double order_0_; double rate_coefficient_; diff --git a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_1_single_precision.h b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_1_single_precision.h index 42bf55ef94d..ff62578e474 100644 --- a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_1_single_precision.h +++ b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_1_single_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -55,7 +57,7 @@ class ReactionKernelBulk_1_single_precision { ReactionKernelBulk_1_single_precision(BlockDataID rho_0ID_, float order_0, float rate_coefficient, float stoech_0) : rho_0ID(rho_0ID_), order_0_(order_0), - rate_coefficient_(rate_coefficient), stoech_0_(stoech_0){}; + rate_coefficient_(rate_coefficient), stoech_0_(stoech_0) {} void run(IBlock *block); @@ -92,9 +94,19 @@ class ReactionKernelBulk_1_single_precision { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline float getOrder_0() const { return order_0_; } + inline float getRate_coefficient() const { return rate_coefficient_; } + inline float getStoech_0() const { return stoech_0_; } + inline void setOrder_0(const float value) { order_0_ = value; } + inline void setRate_coefficient(const float value) { + rate_coefficient_ = value; + } + inline void setStoech_0(const float value) { stoech_0_ = value; } +private: BlockDataID rho_0ID; float order_0_; float rate_coefficient_; diff --git a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_2_double_precision.h b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_2_double_precision.h index 52a5ed01db1..ed293c3f3bd 100644 --- a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_2_double_precision.h +++ b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_2_double_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -58,7 +60,7 @@ class ReactionKernelBulk_2_double_precision { double stoech_0, double stoech_1) : rho_0ID(rho_0ID_), rho_1ID(rho_1ID_), order_0_(order_0), order_1_(order_1), rate_coefficient_(rate_coefficient), - stoech_0_(stoech_0), stoech_1_(stoech_1){}; + stoech_0_(stoech_0), stoech_1_(stoech_1) {} void run(IBlock *block); @@ -95,9 +97,23 @@ class ReactionKernelBulk_2_double_precision { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline double getOrder_0() const { return order_0_; } + inline double getOrder_1() const { return order_1_; } + inline double getRate_coefficient() const { return rate_coefficient_; } + inline double getStoech_0() const { return stoech_0_; } + inline double getStoech_1() const { return stoech_1_; } + inline void setOrder_0(const double value) { order_0_ = value; } + inline void setOrder_1(const double value) { order_1_ = value; } + inline void setRate_coefficient(const double value) { + rate_coefficient_ = value; + } + inline void setStoech_0(const double value) { stoech_0_ = value; } + inline void setStoech_1(const double value) { stoech_1_ = value; } +private: BlockDataID rho_0ID; BlockDataID rho_1ID; double order_0_; diff --git a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_2_single_precision.h b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_2_single_precision.h index 537af720810..de44289f0c2 100644 --- a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_2_single_precision.h +++ b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_2_single_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -58,7 +60,7 @@ class ReactionKernelBulk_2_single_precision { float stoech_0, float stoech_1) : rho_0ID(rho_0ID_), rho_1ID(rho_1ID_), order_0_(order_0), order_1_(order_1), rate_coefficient_(rate_coefficient), - stoech_0_(stoech_0), stoech_1_(stoech_1){}; + stoech_0_(stoech_0), stoech_1_(stoech_1) {} void run(IBlock *block); @@ -95,9 +97,23 @@ class ReactionKernelBulk_2_single_precision { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline float getOrder_0() const { return order_0_; } + inline float getOrder_1() const { return order_1_; } + inline float getRate_coefficient() const { return rate_coefficient_; } + inline float getStoech_0() const { return stoech_0_; } + inline float getStoech_1() const { return stoech_1_; } + inline void setOrder_0(const float value) { order_0_ = value; } + inline void setOrder_1(const float value) { order_1_ = value; } + inline void setRate_coefficient(const float value) { + rate_coefficient_ = value; + } + inline void setStoech_0(const float value) { stoech_0_ = value; } + inline void setStoech_1(const float value) { stoech_1_ = value; } +private: BlockDataID rho_0ID; BlockDataID rho_1ID; float order_0_; diff --git a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_3_double_precision.h b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_3_double_precision.h index c5bc13058db..f4c7bb12ef6 100644 --- a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_3_double_precision.h +++ b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_3_double_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -59,7 +61,7 @@ class ReactionKernelBulk_3_double_precision { : rho_0ID(rho_0ID_), rho_1ID(rho_1ID_), rho_2ID(rho_2ID_), order_0_(order_0), order_1_(order_1), order_2_(order_2), rate_coefficient_(rate_coefficient), stoech_0_(stoech_0), - stoech_1_(stoech_1), stoech_2_(stoech_2){}; + stoech_1_(stoech_1), stoech_2_(stoech_2) {} void run(IBlock *block); @@ -96,9 +98,27 @@ class ReactionKernelBulk_3_double_precision { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline double getOrder_0() const { return order_0_; } + inline double getOrder_1() const { return order_1_; } + inline double getOrder_2() const { return order_2_; } + inline double getRate_coefficient() const { return rate_coefficient_; } + inline double getStoech_0() const { return stoech_0_; } + inline double getStoech_1() const { return stoech_1_; } + inline double getStoech_2() const { return stoech_2_; } + inline void setOrder_0(const double value) { order_0_ = value; } + inline void setOrder_1(const double value) { order_1_ = value; } + inline void setOrder_2(const double value) { order_2_ = value; } + inline void setRate_coefficient(const double value) { + rate_coefficient_ = value; + } + inline void setStoech_0(const double value) { stoech_0_ = value; } + inline void setStoech_1(const double value) { stoech_1_ = value; } + inline void setStoech_2(const double value) { stoech_2_ = value; } +private: BlockDataID rho_0ID; BlockDataID rho_1ID; BlockDataID rho_2ID; diff --git a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_3_single_precision.h b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_3_single_precision.h index 00ce5b76e0e..470c09bc88b 100644 --- a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_3_single_precision.h +++ b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_3_single_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -61,7 +63,7 @@ class ReactionKernelBulk_3_single_precision { : rho_0ID(rho_0ID_), rho_1ID(rho_1ID_), rho_2ID(rho_2ID_), order_0_(order_0), order_1_(order_1), order_2_(order_2), rate_coefficient_(rate_coefficient), stoech_0_(stoech_0), - stoech_1_(stoech_1), stoech_2_(stoech_2){}; + stoech_1_(stoech_1), stoech_2_(stoech_2) {} void run(IBlock *block); @@ -98,9 +100,27 @@ class ReactionKernelBulk_3_single_precision { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline float getOrder_0() const { return order_0_; } + inline float getOrder_1() const { return order_1_; } + inline float getOrder_2() const { return order_2_; } + inline float getRate_coefficient() const { return rate_coefficient_; } + inline float getStoech_0() const { return stoech_0_; } + inline float getStoech_1() const { return stoech_1_; } + inline float getStoech_2() const { return stoech_2_; } + inline void setOrder_0(const float value) { order_0_ = value; } + inline void setOrder_1(const float value) { order_1_ = value; } + inline void setOrder_2(const float value) { order_2_ = value; } + inline void setRate_coefficient(const float value) { + rate_coefficient_ = value; + } + inline void setStoech_0(const float value) { stoech_0_ = value; } + inline void setStoech_1(const float value) { stoech_1_ = value; } + inline void setStoech_2(const float value) { stoech_2_ = value; } +private: BlockDataID rho_0ID; BlockDataID rho_1ID; BlockDataID rho_2ID; diff --git a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_4_double_precision.h b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_4_double_precision.h index 3ef7639c02e..d74eb3550e2 100644 --- a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_4_double_precision.h +++ b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_4_double_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -61,7 +63,7 @@ class ReactionKernelBulk_4_double_precision { rho_3ID(rho_3ID_), order_0_(order_0), order_1_(order_1), order_2_(order_2), order_3_(order_3), rate_coefficient_(rate_coefficient), stoech_0_(stoech_0), - stoech_1_(stoech_1), stoech_2_(stoech_2), stoech_3_(stoech_3){}; + stoech_1_(stoech_1), stoech_2_(stoech_2), stoech_3_(stoech_3) {} void run(IBlock *block); @@ -98,9 +100,31 @@ class ReactionKernelBulk_4_double_precision { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline double getOrder_0() const { return order_0_; } + inline double getOrder_1() const { return order_1_; } + inline double getOrder_2() const { return order_2_; } + inline double getOrder_3() const { return order_3_; } + inline double getRate_coefficient() const { return rate_coefficient_; } + inline double getStoech_0() const { return stoech_0_; } + inline double getStoech_1() const { return stoech_1_; } + inline double getStoech_2() const { return stoech_2_; } + inline double getStoech_3() const { return stoech_3_; } + inline void setOrder_0(const double value) { order_0_ = value; } + inline void setOrder_1(const double value) { order_1_ = value; } + inline void setOrder_2(const double value) { order_2_ = value; } + inline void setOrder_3(const double value) { order_3_ = value; } + inline void setRate_coefficient(const double value) { + rate_coefficient_ = value; + } + inline void setStoech_0(const double value) { stoech_0_ = value; } + inline void setStoech_1(const double value) { stoech_1_ = value; } + inline void setStoech_2(const double value) { stoech_2_ = value; } + inline void setStoech_3(const double value) { stoech_3_ = value; } +private: BlockDataID rho_0ID; BlockDataID rho_1ID; BlockDataID rho_2ID; diff --git a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_4_single_precision.h b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_4_single_precision.h index a3943f40aa2..e2967fbc077 100644 --- a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_4_single_precision.h +++ b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_4_single_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -61,7 +63,7 @@ class ReactionKernelBulk_4_single_precision { rho_3ID(rho_3ID_), order_0_(order_0), order_1_(order_1), order_2_(order_2), order_3_(order_3), rate_coefficient_(rate_coefficient), stoech_0_(stoech_0), - stoech_1_(stoech_1), stoech_2_(stoech_2), stoech_3_(stoech_3){}; + stoech_1_(stoech_1), stoech_2_(stoech_2), stoech_3_(stoech_3) {} void run(IBlock *block); @@ -98,9 +100,31 @@ class ReactionKernelBulk_4_single_precision { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline float getOrder_0() const { return order_0_; } + inline float getOrder_1() const { return order_1_; } + inline float getOrder_2() const { return order_2_; } + inline float getOrder_3() const { return order_3_; } + inline float getRate_coefficient() const { return rate_coefficient_; } + inline float getStoech_0() const { return stoech_0_; } + inline float getStoech_1() const { return stoech_1_; } + inline float getStoech_2() const { return stoech_2_; } + inline float getStoech_3() const { return stoech_3_; } + inline void setOrder_0(const float value) { order_0_ = value; } + inline void setOrder_1(const float value) { order_1_ = value; } + inline void setOrder_2(const float value) { order_2_ = value; } + inline void setOrder_3(const float value) { order_3_ = value; } + inline void setRate_coefficient(const float value) { + rate_coefficient_ = value; + } + inline void setStoech_0(const float value) { stoech_0_ = value; } + inline void setStoech_1(const float value) { stoech_1_ = value; } + inline void setStoech_2(const float value) { stoech_2_ = value; } + inline void setStoech_3(const float value) { stoech_3_ = value; } +private: BlockDataID rho_0ID; BlockDataID rho_1ID; BlockDataID rho_2ID; diff --git a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_5_double_precision.h b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_5_double_precision.h index 11e4621333b..074872ffd58 100644 --- a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_5_double_precision.h +++ b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_5_double_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -63,7 +65,7 @@ class ReactionKernelBulk_5_double_precision { order_1_(order_1), order_2_(order_2), order_3_(order_3), order_4_(order_4), rate_coefficient_(rate_coefficient), stoech_0_(stoech_0), stoech_1_(stoech_1), stoech_2_(stoech_2), - stoech_3_(stoech_3), stoech_4_(stoech_4){}; + stoech_3_(stoech_3), stoech_4_(stoech_4) {} void run(IBlock *block); @@ -100,9 +102,35 @@ class ReactionKernelBulk_5_double_precision { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline double getOrder_0() const { return order_0_; } + inline double getOrder_1() const { return order_1_; } + inline double getOrder_2() const { return order_2_; } + inline double getOrder_3() const { return order_3_; } + inline double getOrder_4() const { return order_4_; } + inline double getRate_coefficient() const { return rate_coefficient_; } + inline double getStoech_0() const { return stoech_0_; } + inline double getStoech_1() const { return stoech_1_; } + inline double getStoech_2() const { return stoech_2_; } + inline double getStoech_3() const { return stoech_3_; } + inline double getStoech_4() const { return stoech_4_; } + inline void setOrder_0(const double value) { order_0_ = value; } + inline void setOrder_1(const double value) { order_1_ = value; } + inline void setOrder_2(const double value) { order_2_ = value; } + inline void setOrder_3(const double value) { order_3_ = value; } + inline void setOrder_4(const double value) { order_4_ = value; } + inline void setRate_coefficient(const double value) { + rate_coefficient_ = value; + } + inline void setStoech_0(const double value) { stoech_0_ = value; } + inline void setStoech_1(const double value) { stoech_1_ = value; } + inline void setStoech_2(const double value) { stoech_2_ = value; } + inline void setStoech_3(const double value) { stoech_3_ = value; } + inline void setStoech_4(const double value) { stoech_4_ = value; } +private: BlockDataID rho_0ID; BlockDataID rho_1ID; BlockDataID rho_2ID; diff --git a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_5_single_precision.h b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_5_single_precision.h index 9c98fa461aa..182f50ae5f2 100644 --- a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_5_single_precision.h +++ b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_5_single_precision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -63,7 +65,7 @@ class ReactionKernelBulk_5_single_precision { order_1_(order_1), order_2_(order_2), order_3_(order_3), order_4_(order_4), rate_coefficient_(rate_coefficient), stoech_0_(stoech_0), stoech_1_(stoech_1), stoech_2_(stoech_2), - stoech_3_(stoech_3), stoech_4_(stoech_4){}; + stoech_3_(stoech_3), stoech_4_(stoech_4) {} void run(IBlock *block); @@ -100,9 +102,35 @@ class ReactionKernelBulk_5_single_precision { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline float getOrder_0() const { return order_0_; } + inline float getOrder_1() const { return order_1_; } + inline float getOrder_2() const { return order_2_; } + inline float getOrder_3() const { return order_3_; } + inline float getOrder_4() const { return order_4_; } + inline float getRate_coefficient() const { return rate_coefficient_; } + inline float getStoech_0() const { return stoech_0_; } + inline float getStoech_1() const { return stoech_1_; } + inline float getStoech_2() const { return stoech_2_; } + inline float getStoech_3() const { return stoech_3_; } + inline float getStoech_4() const { return stoech_4_; } + inline void setOrder_0(const float value) { order_0_ = value; } + inline void setOrder_1(const float value) { order_1_ = value; } + inline void setOrder_2(const float value) { order_2_ = value; } + inline void setOrder_3(const float value) { order_3_ = value; } + inline void setOrder_4(const float value) { order_4_ = value; } + inline void setRate_coefficient(const float value) { + rate_coefficient_ = value; + } + inline void setStoech_0(const float value) { stoech_0_ = value; } + inline void setStoech_1(const float value) { stoech_1_ = value; } + inline void setStoech_2(const float value) { stoech_2_ = value; } + inline void setStoech_3(const float value) { stoech_3_ = value; } + inline void setStoech_4(const float value) { stoech_4_ = value; } +private: BlockDataID rho_0ID; BlockDataID rho_1ID; BlockDataID rho_2ID; diff --git a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_all.h b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_all.h index a39fe10933b..e3be8fac95c 100644 --- a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_all.h +++ b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelBulk_all.h @@ -17,9 +17,9 @@ * along with this program. If not, see . */ -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once diff --git a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_1_double_precision.h b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_1_double_precision.h index 5f9c90710a4..0d8a012197a 100644 --- a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_1_double_precision.h +++ b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_1_double_precision.h @@ -18,9 +18,9 @@ * along with this program. If not, see . */ -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 /* * Boundary class. diff --git a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_1_single_precision.h b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_1_single_precision.h index a90d1a614df..72a16439980 100644 --- a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_1_single_precision.h +++ b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_1_single_precision.h @@ -18,9 +18,9 @@ * along with this program. If not, see . */ -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 /* * Boundary class. diff --git a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_2_double_precision.h b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_2_double_precision.h index 3e7481a377d..fff5a79f440 100644 --- a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_2_double_precision.h +++ b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_2_double_precision.h @@ -18,9 +18,9 @@ * along with this program. If not, see . */ -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 /* * Boundary class. diff --git a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_2_single_precision.h b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_2_single_precision.h index 95d045d2e7a..621e74d830d 100644 --- a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_2_single_precision.h +++ b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_2_single_precision.h @@ -18,9 +18,9 @@ * along with this program. If not, see . */ -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 /* * Boundary class. diff --git a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_3_double_precision.h b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_3_double_precision.h index b7ae8570eed..585db2e3ab3 100644 --- a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_3_double_precision.h +++ b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_3_double_precision.h @@ -18,9 +18,9 @@ * along with this program. If not, see . */ -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 /* * Boundary class. diff --git a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_3_single_precision.h b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_3_single_precision.h index 346659cf32b..80524cc1d78 100644 --- a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_3_single_precision.h +++ b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_3_single_precision.h @@ -18,9 +18,9 @@ * along with this program. If not, see . */ -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 /* * Boundary class. diff --git a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_4_double_precision.h b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_4_double_precision.h index c7d9619adc6..a1af22d1a0d 100644 --- a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_4_double_precision.h +++ b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_4_double_precision.h @@ -18,9 +18,9 @@ * along with this program. If not, see . */ -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 /* * Boundary class. diff --git a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_4_single_precision.h b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_4_single_precision.h index 9cfee6d0294..654ba307ccb 100644 --- a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_4_single_precision.h +++ b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_4_single_precision.h @@ -18,9 +18,9 @@ * along with this program. If not, see . */ -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 /* * Boundary class. diff --git a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_5_double_precision.h b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_5_double_precision.h index 0c15f80a33e..368e91fac33 100644 --- a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_5_double_precision.h +++ b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_5_double_precision.h @@ -18,9 +18,9 @@ * along with this program. If not, see . */ -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 /* * Boundary class. diff --git a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_5_single_precision.h b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_5_single_precision.h index cb2af1fe5c8..7404fc8d968 100644 --- a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_5_single_precision.h +++ b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_5_single_precision.h @@ -18,9 +18,9 @@ * along with this program. If not, see . */ -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 /* * Boundary class. diff --git a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_all.h b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_all.h index 592ddac484a..f9b41461ab1 100644 --- a/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_all.h +++ b/src/walberla_bridge/src/electrokinetics/reactions/generated_kernels/ReactionKernelIndexed_all.h @@ -17,9 +17,9 @@ * along with this program. If not, see . */ -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once diff --git a/src/walberla_bridge/src/lattice_boltzmann/LBWalberlaImpl.hpp b/src/walberla_bridge/src/lattice_boltzmann/LBWalberlaImpl.hpp index 3c1b11219f7..b1f7ac1641a 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/LBWalberlaImpl.hpp +++ b/src/walberla_bridge/src/lattice_boltzmann/LBWalberlaImpl.hpp @@ -102,7 +102,7 @@ class LBWalberlaImpl : public LBWalberlaBase { using BoundaryModel = BoundaryHandling, typename detail::BoundaryHandlingTrait< - FloatType, Architecture>::Dynamic_UBB>; + FloatType, Architecture>::DynamicUBB>; using CollisionModel = std::variant; @@ -112,7 +112,7 @@ class LBWalberlaImpl : public LBWalberlaBase { /** @brief Stencil for ghost communication (includes domain corners). */ using StencilFull = stencil::D3Q27; /** @brief Lattice model (e.g. blockforest). */ - using Lattice_T = LatticeWalberla::Lattice_T; + using BlockStorage = LatticeWalberla::Lattice_T; protected: template struct FieldTrait { @@ -200,7 +200,7 @@ class LBWalberlaImpl : public LBWalberlaBase { return static_cast(Stencil::Size); } - [[nodiscard]] virtual bool is_double_precision() const noexcept override { + [[nodiscard]] bool is_double_precision() const noexcept override { return std::is_same_v; } @@ -215,8 +215,8 @@ class LBWalberlaImpl : public LBWalberlaBase { } void operator()(CollisionModelLeesEdwards &cm, IBlock *b) { - cm.v_s_ = static_cast( - m_lees_edwards_callbacks->get_shear_velocity()); + cm.setV_s(static_cast( + m_lees_edwards_callbacks->get_shear_velocity())); cm(b); } @@ -248,8 +248,7 @@ class LBWalberlaImpl : public LBWalberlaBase { shear_relaxation); } - void reset_boundary_handling() { - auto const &blocks = get_lattice().get_blocks(); + void reset_boundary_handling(std::shared_ptr const &blocks) { m_boundary = std::make_shared(blocks, m_pdf_field_id, m_flag_field_id); } @@ -506,7 +505,7 @@ class LBWalberlaImpl : public LBWalberlaBase { m_flag_field_id = field::addFlagFieldToStorage( blocks, "flag field", n_ghost_layers); // Initialize boundary sweep - reset_boundary_handling(); + reset_boundary_handling(m_lattice->get_blocks()); // Set up the communication and register fields setup_streaming_communicator(); @@ -556,17 +555,17 @@ class LBWalberlaImpl : public LBWalberlaBase { } private: - void integrate_stream(std::shared_ptr const &blocks) { + void integrate_stream(std::shared_ptr const &blocks) { for (auto b = blocks->begin(); b != blocks->end(); ++b) (*m_stream)(&*b); } - void integrate_collide(std::shared_ptr const &blocks) { + void integrate_collide(std::shared_ptr const &blocks) { auto &cm_variant = *m_collision_model; for (auto b = blocks->begin(); b != blocks->end(); ++b) std::visit(m_run_collide_sweep, cm_variant, std::variant(&*b)); if (auto *cm = std::get_if(&cm_variant)) { - cm->time_step_++; + cm->setTime_step(cm->getTime_step() + 1u); } } @@ -576,29 +575,29 @@ class LBWalberlaImpl : public LBWalberlaBase { } void apply_lees_edwards_pdf_interpolation( - std::shared_ptr const &blocks) { + std::shared_ptr const &blocks) { for (auto b = blocks->begin(); b != blocks->end(); ++b) (*m_lees_edwards_pdf_interpol_sweep)(&*b); } void apply_lees_edwards_vel_interpolation_and_shift( - std::shared_ptr const &blocks) { + std::shared_ptr const &blocks) { for (auto b = blocks->begin(); b != blocks->end(); ++b) (*m_lees_edwards_vel_interpol_sweep)(&*b); } void apply_lees_edwards_last_applied_force_interpolation( - std::shared_ptr const &blocks) { + std::shared_ptr const &blocks) { for (auto b = blocks->begin(); b != blocks->end(); ++b) (*m_lees_edwards_last_applied_force_interpol_sweep)(&*b); } - void integrate_reset_force(std::shared_ptr const &blocks) { + void integrate_reset_force(std::shared_ptr const &blocks) { for (auto b = blocks->begin(); b != blocks->end(); ++b) (*m_reset_force)(&*b); } - void integrate_boundaries(std::shared_ptr const &blocks) { + void integrate_boundaries(std::shared_ptr const &blocks) { for (auto b = blocks->begin(); b != blocks->end(); ++b) (*m_boundary)(&*b); } @@ -673,7 +672,7 @@ class LBWalberlaImpl : public LBWalberlaBase { } } - void ghost_communication_pdf() override { + void ghost_communication_pdf() override { // TODO: is this never traversed??? if (m_pending_ghost_comm.test(GhostComm::PDF)) { m_pdf_communicator->communicate(); if (has_lees_edwards_bc()) { @@ -1463,7 +1462,7 @@ class LBWalberlaImpl : public LBWalberlaBase { } void clear_boundaries() override { - reset_boundary_handling(); + reset_boundary_handling(get_lattice().get_blocks()); m_pending_ghost_comm.set(GhostComm::UBB); ghost_communication(); m_has_boundaries = false; @@ -1569,7 +1568,7 @@ class LBWalberlaImpl : public LBWalberlaBase { if (!cm or m_kT == 0.) { return std::nullopt; } - return {static_cast(cm->time_step_)}; + return {static_cast(cm->getTime_step())}; } void set_rng_state(uint64_t counter) override { @@ -1579,7 +1578,7 @@ class LBWalberlaImpl : public LBWalberlaBase { } assert(counter <= static_cast(std::numeric_limits::max())); - cm->time_step_ = static_cast(counter); + cm->setTime_step(static_cast(counter)); } [[nodiscard]] LatticeWalberla const &get_lattice() const noexcept override { diff --git a/src/walberla_bridge/src/lattice_boltzmann/ResetForce.hpp b/src/walberla_bridge/src/lattice_boltzmann/ResetForce.hpp index d14f846ac54..7c4e31dfb3d 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/ResetForce.hpp +++ b/src/walberla_bridge/src/lattice_boltzmann/ResetForce.hpp @@ -53,7 +53,9 @@ template class ResetForce { m_ext_force = to_vector3(ext_force); } - Utils::Vector3d get_ext_force() const { return to_vector3d(m_ext_force); } + Utils::Vector3d get_ext_force() const noexcept { + return to_vector3d(m_ext_force); + } void operator()(IBlock *block) { auto force_field = diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CMakeLists.txt b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CMakeLists.txt index 5258b73a181..3acdaafe449 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CMakeLists.txt +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CMakeLists.txt @@ -17,19 +17,11 @@ # along with this program. If not, see . # -foreach(precision single_precision double_precision) - target_sources(espresso_walberla_codegen PRIVATE Dynamic_UBB_${precision}.cpp) - if(WALBERLA_BUILD_WITH_CUDA) - target_sources(espresso_walberla_codegen_cuda - PRIVATE Dynamic_UBB_${precision}CUDA.cu) - endif() -endforeach() - foreach(precision DoublePrecision SinglePrecision) target_sources( espresso_walberla_codegen PRIVATE PackInfoPdf${precision}.cpp PackInfoVec${precision}.cpp - InitialPDFsSetter${precision}.cpp) + InitialPDFsSetter${precision}.cpp DynamicUBB${precision}.cpp) if(ESPRESSO_BUILD_WITH_WALBERLA_AVX) target_sources( espresso_walberla_codegen @@ -50,6 +42,7 @@ foreach(precision DoublePrecision SinglePrecision) CollideSweep${precision}ThermalizedCUDA.cu FieldAccessors${precision}CUDA.cu StreamSweep${precision}CUDA.cu InitialPDFsSetter${precision}CUDA.cu - PackInfoPdf${precision}CUDA.cu PackInfoVec${precision}CUDA.cu) + DynamicUBB${precision}CUDA.cu PackInfoPdf${precision}CUDA.cu + PackInfoVec${precision}CUDA.cu) endif() endforeach() diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepDoublePrecisionLeesEdwards.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepDoublePrecisionLeesEdwards.h index fb144478e13..8563bd19c4a 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepDoublePrecisionLeesEdwards.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepDoublePrecisionLeesEdwards.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -56,7 +58,7 @@ class CollideSweepDoublePrecisionLeesEdwards { BlockDataID pdfsID_, double grid_size, double omega_shear, double v_s) : forceID(forceID_), pdfsID(pdfsID_), grid_size_(grid_size), - omega_shear_(omega_shear), v_s_(v_s){}; + omega_shear_(omega_shear), v_s_(v_s) {} void run(IBlock *block); @@ -93,9 +95,17 @@ class CollideSweepDoublePrecisionLeesEdwards { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline double getGrid_size() const { return grid_size_; } + inline double getOmega_shear() const { return omega_shear_; } + inline double getV_s() const { return v_s_; } + inline void setGrid_size(const double value) { grid_size_ = value; } + inline void setOmega_shear(const double value) { omega_shear_ = value; } + inline void setV_s(const double value) { v_s_ = value; } +private: BlockDataID forceID; BlockDataID pdfsID; double grid_size_; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepDoublePrecisionLeesEdwardsAVX.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepDoublePrecisionLeesEdwardsAVX.h index dfd7bcdde63..137a89ce701 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepDoublePrecisionLeesEdwardsAVX.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepDoublePrecisionLeesEdwardsAVX.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -57,7 +59,7 @@ class CollideSweepDoublePrecisionLeesEdwardsAVX { double grid_size, double omega_shear, double v_s) : forceID(forceID_), pdfsID(pdfsID_), grid_size_(grid_size), - omega_shear_(omega_shear), v_s_(v_s){}; + omega_shear_(omega_shear), v_s_(v_s) {} void run(IBlock *block); @@ -94,9 +96,17 @@ class CollideSweepDoublePrecisionLeesEdwardsAVX { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline double getGrid_size() const { return grid_size_; } + inline double getOmega_shear() const { return omega_shear_; } + inline double getV_s() const { return v_s_; } + inline void setGrid_size(const double value) { grid_size_ = value; } + inline void setOmega_shear(const double value) { omega_shear_ = value; } + inline void setV_s(const double value) { v_s_ = value; } +private: BlockDataID forceID; BlockDataID pdfsID; double grid_size_; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepDoublePrecisionLeesEdwardsCUDA.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepDoublePrecisionLeesEdwardsCUDA.h index 276592774e1..bd51ddebba1 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepDoublePrecisionLeesEdwardsCUDA.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepDoublePrecisionLeesEdwardsCUDA.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -32,7 +32,9 @@ #include "domain_decomposition/IBlock.h" #include "domain_decomposition/StructuredBlockStorage.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -59,7 +61,7 @@ class CollideSweepDoublePrecisionLeesEdwardsCUDA { double grid_size, double omega_shear, double v_s) : forceID(forceID_), pdfsID(pdfsID_), grid_size_(grid_size), - omega_shear_(omega_shear), v_s_(v_s){}; + omega_shear_(omega_shear), v_s_(v_s) {} void run(IBlock *block, gpuStream_t stream = nullptr); @@ -103,9 +105,17 @@ class CollideSweepDoublePrecisionLeesEdwardsCUDA { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline double getGrid_size() const { return grid_size_; } + inline double getOmega_shear() const { return omega_shear_; } + inline double getV_s() const { return v_s_; } + inline void setGrid_size(const double value) { grid_size_ = value; } + inline void setOmega_shear(const double value) { omega_shear_ = value; } + inline void setV_s(const double value) { v_s_ = value; } +private: BlockDataID forceID; BlockDataID pdfsID; double grid_size_; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepDoublePrecisionThermalized.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepDoublePrecisionThermalized.h index 192b2fcf077..0ff74101e11 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepDoublePrecisionThermalized.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepDoublePrecisionThermalized.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -60,7 +62,8 @@ class CollideSweepDoublePrecisionThermalized { : forceID(forceID_), pdfsID(pdfsID_), kT_(kT), omega_bulk_(omega_bulk), omega_even_(omega_even), omega_odd_(omega_odd), omega_shear_(omega_shear), seed_(seed), time_step_(time_step), - configured_(false){}; + block_offset_0_(uint32_t(0)), block_offset_1_(uint32_t(0)), + block_offset_2_(uint32_t(0)), configured_(false) {} void run(IBlock *block); @@ -106,6 +109,34 @@ class CollideSweepDoublePrecisionThermalized { configured_ = true; } + inline uint32_t getBlock_offset_0() const { return block_offset_0_; } + inline uint32_t getBlock_offset_1() const { return block_offset_1_; } + inline uint32_t getBlock_offset_2() const { return block_offset_2_; } + inline double getKt() const { return kT_; } + inline double getOmega_bulk() const { return omega_bulk_; } + inline double getOmega_even() const { return omega_even_; } + inline double getOmega_odd() const { return omega_odd_; } + inline double getOmega_shear() const { return omega_shear_; } + inline uint32_t getSeed() const { return seed_; } + inline uint32_t getTime_step() const { return time_step_; } + inline void setBlock_offset_0(const uint32_t value) { + block_offset_0_ = value; + } + inline void setBlock_offset_1(const uint32_t value) { + block_offset_1_ = value; + } + inline void setBlock_offset_2(const uint32_t value) { + block_offset_2_ = value; + } + inline void setKt(const double value) { kT_ = value; } + inline void setOmega_bulk(const double value) { omega_bulk_ = value; } + inline void setOmega_even(const double value) { omega_even_ = value; } + inline void setOmega_odd(const double value) { omega_odd_ = value; } + inline void setOmega_shear(const double value) { omega_shear_ = value; } + inline void setSeed(const uint32_t value) { seed_ = value; } + inline void setTime_step(const uint32_t value) { time_step_ = value; } + +private: BlockDataID forceID; BlockDataID pdfsID; uint32_t block_offset_0_; @@ -118,6 +149,7 @@ class CollideSweepDoublePrecisionThermalized { double omega_shear_; uint32_t seed_; uint32_t time_step_; + bool configured_; }; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepDoublePrecisionThermalizedAVX.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepDoublePrecisionThermalizedAVX.h index 00c0575773c..1553c449c03 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepDoublePrecisionThermalizedAVX.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepDoublePrecisionThermalizedAVX.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -61,7 +63,8 @@ class CollideSweepDoublePrecisionThermalizedAVX { : forceID(forceID_), pdfsID(pdfsID_), kT_(kT), omega_bulk_(omega_bulk), omega_even_(omega_even), omega_odd_(omega_odd), omega_shear_(omega_shear), seed_(seed), time_step_(time_step), - configured_(false){}; + block_offset_0_(uint32_t(0)), block_offset_1_(uint32_t(0)), + block_offset_2_(uint32_t(0)), configured_(false) {} void run(IBlock *block); @@ -107,6 +110,34 @@ class CollideSweepDoublePrecisionThermalizedAVX { configured_ = true; } + inline uint32_t getBlock_offset_0() const { return block_offset_0_; } + inline uint32_t getBlock_offset_1() const { return block_offset_1_; } + inline uint32_t getBlock_offset_2() const { return block_offset_2_; } + inline double getKt() const { return kT_; } + inline double getOmega_bulk() const { return omega_bulk_; } + inline double getOmega_even() const { return omega_even_; } + inline double getOmega_odd() const { return omega_odd_; } + inline double getOmega_shear() const { return omega_shear_; } + inline uint32_t getSeed() const { return seed_; } + inline uint32_t getTime_step() const { return time_step_; } + inline void setBlock_offset_0(const uint32_t value) { + block_offset_0_ = value; + } + inline void setBlock_offset_1(const uint32_t value) { + block_offset_1_ = value; + } + inline void setBlock_offset_2(const uint32_t value) { + block_offset_2_ = value; + } + inline void setKt(const double value) { kT_ = value; } + inline void setOmega_bulk(const double value) { omega_bulk_ = value; } + inline void setOmega_even(const double value) { omega_even_ = value; } + inline void setOmega_odd(const double value) { omega_odd_ = value; } + inline void setOmega_shear(const double value) { omega_shear_ = value; } + inline void setSeed(const uint32_t value) { seed_ = value; } + inline void setTime_step(const uint32_t value) { time_step_ = value; } + +private: BlockDataID forceID; BlockDataID pdfsID; uint32_t block_offset_0_; @@ -119,6 +150,7 @@ class CollideSweepDoublePrecisionThermalizedAVX { double omega_shear_; uint32_t seed_; uint32_t time_step_; + bool configured_; }; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepDoublePrecisionThermalizedCUDA.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepDoublePrecisionThermalizedCUDA.h index bc7ac5f69e7..e1f03126ecb 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepDoublePrecisionThermalizedCUDA.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepDoublePrecisionThermalizedCUDA.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -32,7 +32,9 @@ #include "domain_decomposition/IBlock.h" #include "domain_decomposition/StructuredBlockStorage.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -61,7 +63,8 @@ class CollideSweepDoublePrecisionThermalizedCUDA { : forceID(forceID_), pdfsID(pdfsID_), kT_(kT), omega_bulk_(omega_bulk), omega_even_(omega_even), omega_odd_(omega_odd), omega_shear_(omega_shear), seed_(seed), time_step_(time_step), - configured_(false){}; + block_offset_0_(uint32_t(0)), block_offset_1_(uint32_t(0)), + block_offset_2_(uint32_t(0)), configured_(false) {} void run(IBlock *block, gpuStream_t stream = nullptr); @@ -114,6 +117,34 @@ class CollideSweepDoublePrecisionThermalizedCUDA { configured_ = true; } + inline uint32_t getBlock_offset_0() const { return block_offset_0_; } + inline uint32_t getBlock_offset_1() const { return block_offset_1_; } + inline uint32_t getBlock_offset_2() const { return block_offset_2_; } + inline double getKt() const { return kT_; } + inline double getOmega_bulk() const { return omega_bulk_; } + inline double getOmega_even() const { return omega_even_; } + inline double getOmega_odd() const { return omega_odd_; } + inline double getOmega_shear() const { return omega_shear_; } + inline uint32_t getSeed() const { return seed_; } + inline uint32_t getTime_step() const { return time_step_; } + inline void setBlock_offset_0(const uint32_t value) { + block_offset_0_ = value; + } + inline void setBlock_offset_1(const uint32_t value) { + block_offset_1_ = value; + } + inline void setBlock_offset_2(const uint32_t value) { + block_offset_2_ = value; + } + inline void setKt(const double value) { kT_ = value; } + inline void setOmega_bulk(const double value) { omega_bulk_ = value; } + inline void setOmega_even(const double value) { omega_even_ = value; } + inline void setOmega_odd(const double value) { omega_odd_ = value; } + inline void setOmega_shear(const double value) { omega_shear_ = value; } + inline void setSeed(const uint32_t value) { seed_ = value; } + inline void setTime_step(const uint32_t value) { time_step_ = value; } + +private: BlockDataID forceID; BlockDataID pdfsID; uint32_t block_offset_0_; @@ -126,6 +157,7 @@ class CollideSweepDoublePrecisionThermalizedCUDA { double omega_shear_; uint32_t seed_; uint32_t time_step_; + bool configured_; }; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepSinglePrecisionLeesEdwards.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepSinglePrecisionLeesEdwards.h index 58c30c1bf4e..997c3759374 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepSinglePrecisionLeesEdwards.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepSinglePrecisionLeesEdwards.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -56,7 +58,7 @@ class CollideSweepSinglePrecisionLeesEdwards { BlockDataID pdfsID_, float grid_size, float omega_shear, float v_s) : forceID(forceID_), pdfsID(pdfsID_), grid_size_(grid_size), - omega_shear_(omega_shear), v_s_(v_s){}; + omega_shear_(omega_shear), v_s_(v_s) {} void run(IBlock *block); @@ -93,9 +95,17 @@ class CollideSweepSinglePrecisionLeesEdwards { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline float getGrid_size() const { return grid_size_; } + inline float getOmega_shear() const { return omega_shear_; } + inline float getV_s() const { return v_s_; } + inline void setGrid_size(const float value) { grid_size_ = value; } + inline void setOmega_shear(const float value) { omega_shear_ = value; } + inline void setV_s(const float value) { v_s_ = value; } +private: BlockDataID forceID; BlockDataID pdfsID; float grid_size_; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepSinglePrecisionLeesEdwardsAVX.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepSinglePrecisionLeesEdwardsAVX.h index 2819ac83a73..ebbc73ab620 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepSinglePrecisionLeesEdwardsAVX.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepSinglePrecisionLeesEdwardsAVX.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -57,7 +59,7 @@ class CollideSweepSinglePrecisionLeesEdwardsAVX { float grid_size, float omega_shear, float v_s) : forceID(forceID_), pdfsID(pdfsID_), grid_size_(grid_size), - omega_shear_(omega_shear), v_s_(v_s){}; + omega_shear_(omega_shear), v_s_(v_s) {} void run(IBlock *block); @@ -94,9 +96,17 @@ class CollideSweepSinglePrecisionLeesEdwardsAVX { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline float getGrid_size() const { return grid_size_; } + inline float getOmega_shear() const { return omega_shear_; } + inline float getV_s() const { return v_s_; } + inline void setGrid_size(const float value) { grid_size_ = value; } + inline void setOmega_shear(const float value) { omega_shear_ = value; } + inline void setV_s(const float value) { v_s_ = value; } +private: BlockDataID forceID; BlockDataID pdfsID; float grid_size_; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepSinglePrecisionLeesEdwardsCUDA.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepSinglePrecisionLeesEdwardsCUDA.h index bf9a807a67f..dad7c22d81a 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepSinglePrecisionLeesEdwardsCUDA.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepSinglePrecisionLeesEdwardsCUDA.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -32,7 +32,9 @@ #include "domain_decomposition/IBlock.h" #include "domain_decomposition/StructuredBlockStorage.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -59,7 +61,7 @@ class CollideSweepSinglePrecisionLeesEdwardsCUDA { float grid_size, float omega_shear, float v_s) : forceID(forceID_), pdfsID(pdfsID_), grid_size_(grid_size), - omega_shear_(omega_shear), v_s_(v_s){}; + omega_shear_(omega_shear), v_s_(v_s) {} void run(IBlock *block, gpuStream_t stream = nullptr); @@ -103,9 +105,17 @@ class CollideSweepSinglePrecisionLeesEdwardsCUDA { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline float getGrid_size() const { return grid_size_; } + inline float getOmega_shear() const { return omega_shear_; } + inline float getV_s() const { return v_s_; } + inline void setGrid_size(const float value) { grid_size_ = value; } + inline void setOmega_shear(const float value) { omega_shear_ = value; } + inline void setV_s(const float value) { v_s_ = value; } +private: BlockDataID forceID; BlockDataID pdfsID; float grid_size_; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepSinglePrecisionThermalized.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepSinglePrecisionThermalized.h index 5a9aa9eb3fc..dd73f7d2133 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepSinglePrecisionThermalized.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepSinglePrecisionThermalized.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -60,7 +62,8 @@ class CollideSweepSinglePrecisionThermalized { : forceID(forceID_), pdfsID(pdfsID_), kT_(kT), omega_bulk_(omega_bulk), omega_even_(omega_even), omega_odd_(omega_odd), omega_shear_(omega_shear), seed_(seed), time_step_(time_step), - configured_(false){}; + block_offset_0_(uint32_t(0)), block_offset_1_(uint32_t(0)), + block_offset_2_(uint32_t(0)), configured_(false) {} void run(IBlock *block); @@ -106,6 +109,34 @@ class CollideSweepSinglePrecisionThermalized { configured_ = true; } + inline uint32_t getBlock_offset_0() const { return block_offset_0_; } + inline uint32_t getBlock_offset_1() const { return block_offset_1_; } + inline uint32_t getBlock_offset_2() const { return block_offset_2_; } + inline float getKt() const { return kT_; } + inline float getOmega_bulk() const { return omega_bulk_; } + inline float getOmega_even() const { return omega_even_; } + inline float getOmega_odd() const { return omega_odd_; } + inline float getOmega_shear() const { return omega_shear_; } + inline uint32_t getSeed() const { return seed_; } + inline uint32_t getTime_step() const { return time_step_; } + inline void setBlock_offset_0(const uint32_t value) { + block_offset_0_ = value; + } + inline void setBlock_offset_1(const uint32_t value) { + block_offset_1_ = value; + } + inline void setBlock_offset_2(const uint32_t value) { + block_offset_2_ = value; + } + inline void setKt(const float value) { kT_ = value; } + inline void setOmega_bulk(const float value) { omega_bulk_ = value; } + inline void setOmega_even(const float value) { omega_even_ = value; } + inline void setOmega_odd(const float value) { omega_odd_ = value; } + inline void setOmega_shear(const float value) { omega_shear_ = value; } + inline void setSeed(const uint32_t value) { seed_ = value; } + inline void setTime_step(const uint32_t value) { time_step_ = value; } + +private: BlockDataID forceID; BlockDataID pdfsID; uint32_t block_offset_0_; @@ -118,6 +149,7 @@ class CollideSweepSinglePrecisionThermalized { float omega_shear_; uint32_t seed_; uint32_t time_step_; + bool configured_; }; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepSinglePrecisionThermalizedAVX.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepSinglePrecisionThermalizedAVX.h index b5955f045db..1ce301cb0ff 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepSinglePrecisionThermalizedAVX.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepSinglePrecisionThermalizedAVX.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -60,7 +62,8 @@ class CollideSweepSinglePrecisionThermalizedAVX { : forceID(forceID_), pdfsID(pdfsID_), kT_(kT), omega_bulk_(omega_bulk), omega_even_(omega_even), omega_odd_(omega_odd), omega_shear_(omega_shear), seed_(seed), time_step_(time_step), - configured_(false){}; + block_offset_0_(uint32_t(0)), block_offset_1_(uint32_t(0)), + block_offset_2_(uint32_t(0)), configured_(false) {} void run(IBlock *block); @@ -106,6 +109,34 @@ class CollideSweepSinglePrecisionThermalizedAVX { configured_ = true; } + inline uint32_t getBlock_offset_0() const { return block_offset_0_; } + inline uint32_t getBlock_offset_1() const { return block_offset_1_; } + inline uint32_t getBlock_offset_2() const { return block_offset_2_; } + inline float getKt() const { return kT_; } + inline float getOmega_bulk() const { return omega_bulk_; } + inline float getOmega_even() const { return omega_even_; } + inline float getOmega_odd() const { return omega_odd_; } + inline float getOmega_shear() const { return omega_shear_; } + inline uint32_t getSeed() const { return seed_; } + inline uint32_t getTime_step() const { return time_step_; } + inline void setBlock_offset_0(const uint32_t value) { + block_offset_0_ = value; + } + inline void setBlock_offset_1(const uint32_t value) { + block_offset_1_ = value; + } + inline void setBlock_offset_2(const uint32_t value) { + block_offset_2_ = value; + } + inline void setKt(const float value) { kT_ = value; } + inline void setOmega_bulk(const float value) { omega_bulk_ = value; } + inline void setOmega_even(const float value) { omega_even_ = value; } + inline void setOmega_odd(const float value) { omega_odd_ = value; } + inline void setOmega_shear(const float value) { omega_shear_ = value; } + inline void setSeed(const uint32_t value) { seed_ = value; } + inline void setTime_step(const uint32_t value) { time_step_ = value; } + +private: BlockDataID forceID; BlockDataID pdfsID; uint32_t block_offset_0_; @@ -118,6 +149,7 @@ class CollideSweepSinglePrecisionThermalizedAVX { float omega_shear_; uint32_t seed_; uint32_t time_step_; + bool configured_; }; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepSinglePrecisionThermalizedCUDA.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepSinglePrecisionThermalizedCUDA.h index cf55997b2b5..01ebf915368 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepSinglePrecisionThermalizedCUDA.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/CollideSweepSinglePrecisionThermalizedCUDA.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -32,7 +32,9 @@ #include "domain_decomposition/IBlock.h" #include "domain_decomposition/StructuredBlockStorage.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -62,7 +64,8 @@ class CollideSweepSinglePrecisionThermalizedCUDA { : forceID(forceID_), pdfsID(pdfsID_), kT_(kT), omega_bulk_(omega_bulk), omega_even_(omega_even), omega_odd_(omega_odd), omega_shear_(omega_shear), seed_(seed), time_step_(time_step), - configured_(false){}; + block_offset_0_(uint32_t(0)), block_offset_1_(uint32_t(0)), + block_offset_2_(uint32_t(0)), configured_(false) {} void run(IBlock *block, gpuStream_t stream = nullptr); @@ -115,6 +118,34 @@ class CollideSweepSinglePrecisionThermalizedCUDA { configured_ = true; } + inline uint32_t getBlock_offset_0() const { return block_offset_0_; } + inline uint32_t getBlock_offset_1() const { return block_offset_1_; } + inline uint32_t getBlock_offset_2() const { return block_offset_2_; } + inline float getKt() const { return kT_; } + inline float getOmega_bulk() const { return omega_bulk_; } + inline float getOmega_even() const { return omega_even_; } + inline float getOmega_odd() const { return omega_odd_; } + inline float getOmega_shear() const { return omega_shear_; } + inline uint32_t getSeed() const { return seed_; } + inline uint32_t getTime_step() const { return time_step_; } + inline void setBlock_offset_0(const uint32_t value) { + block_offset_0_ = value; + } + inline void setBlock_offset_1(const uint32_t value) { + block_offset_1_ = value; + } + inline void setBlock_offset_2(const uint32_t value) { + block_offset_2_ = value; + } + inline void setKt(const float value) { kT_ = value; } + inline void setOmega_bulk(const float value) { omega_bulk_ = value; } + inline void setOmega_even(const float value) { omega_even_ = value; } + inline void setOmega_odd(const float value) { omega_odd_ = value; } + inline void setOmega_shear(const float value) { omega_shear_ = value; } + inline void setSeed(const uint32_t value) { seed_ = value; } + inline void setTime_step(const uint32_t value) { time_step_ = value; } + +private: BlockDataID forceID; BlockDataID pdfsID; uint32_t block_offset_0_; @@ -127,6 +158,7 @@ class CollideSweepSinglePrecisionThermalizedCUDA { float omega_shear_; uint32_t seed_; uint32_t time_step_; + bool configured_; }; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/Dynamic_UBB_double_precision.cpp b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/DynamicUBBDoublePrecision.cpp similarity index 78% rename from src/walberla_bridge/src/lattice_boltzmann/generated_kernels/Dynamic_UBB_double_precision.cpp rename to src/walberla_bridge/src/lattice_boltzmann/generated_kernels/DynamicUBBDoublePrecision.cpp index ef39da01ce7..08345d059ce 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/Dynamic_UBB_double_precision.cpp +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/DynamicUBBDoublePrecision.cpp @@ -13,13 +13,13 @@ // You should have received a copy of the GNU General Public License along // with waLBerla (see COPYING.txt). If not, see . // -//! \\file Dynamic_UBB_double_precision.cpp +//! \\file DynamicUBBDoublePrecision.cpp //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 -#include "Dynamic_UBB_double_precision.h" +#include "DynamicUBBDoublePrecision.h" #include "core/DataTypes.h" #include "core/Macros.h" @@ -46,12 +46,12 @@ namespace lbm { #endif #endif // NOLINTBEGIN(readability-non-const-parameter*) -namespace internal_451fd042b8d7665063ea81b98853365b { -static FUNC_PREFIX void dynamic_ubb_double_precision_boundary_Dynamic_UBB_double_precision(uint8_t *RESTRICT const _data_indexVector, double *RESTRICT _data_pdfs, int64_t const _stride_pdfs_0, int64_t const _stride_pdfs_1, int64_t const _stride_pdfs_2, int64_t const _stride_pdfs_3, int32_t indexVectorSize) { +namespace internal_3cfabb7f34e389af9363b890d8729bed { +static FUNC_PREFIX void dynamicubbdoubleprecision_boundary_DynamicUBBDoublePrecision(uint8_t *RESTRICT const _data_indexVector, double *RESTRICT _data_pdfs, int64_t const _stride_pdfs_0, int64_t const _stride_pdfs_1, int64_t const _stride_pdfs_2, int64_t const _stride_pdfs_3, int32_t indexVectorSize) { const int32_t f_in_inv_dir_idx[] = {0, 2, 1, 4, 3, 6, 5, 10, 9, 8, 7, 16, 15, 18, 17, 12, 11, 14, 13}; - const double weights[] = {0.33333333333333333, 0.055555555555555556, 0.055555555555555556, 0.055555555555555556, 0.055555555555555556, 0.055555555555555556, 0.055555555555555556, 0.027777777777777778, 0.027777777777777778, 0.027777777777777778, 0.027777777777777778, 0.027777777777777778, 0.027777777777777778, 0.027777777777777778, 0.027777777777777778, 0.027777777777777778, 0.027777777777777778, 0.027777777777777778, 0.027777777777777778}; + const double weights[] = {((double)(0.33333333333333333)), ((double)(0.055555555555555556)), ((double)(0.055555555555555556)), ((double)(0.055555555555555556)), ((double)(0.055555555555555556)), ((double)(0.055555555555555556)), ((double)(0.055555555555555556)), ((double)(0.027777777777777778)), ((double)(0.027777777777777778)), ((double)(0.027777777777777778)), ((double)(0.027777777777777778)), ((double)(0.027777777777777778)), ((double)(0.027777777777777778)), ((double)(0.027777777777777778)), ((double)(0.027777777777777778)), ((double)(0.027777777777777778)), ((double)(0.027777777777777778)), ((double)(0.027777777777777778)), ((double)(0.027777777777777778))}; const int32_t neighbour_offset_x[] = {0, 0, 0, -1, 1, 0, 0, -1, 1, -1, 1, 0, 0, -1, 1, 0, 0, -1, 1}; const int32_t neighbour_offset_y[] = {0, 1, -1, 0, 0, 0, 0, 1, 1, -1, -1, 1, -1, 0, 0, 1, -1, 0, 0}; @@ -69,7 +69,7 @@ static FUNC_PREFIX void dynamic_ubb_double_precision_boundary_Dynamic_UBB_double _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_0 * neighbour_offset_x[dir] + _stride_pdfs_1 * y + _stride_pdfs_1 * neighbour_offset_y[dir] + _stride_pdfs_2 * z + _stride_pdfs_2 * neighbour_offset_z[dir] + _stride_pdfs_3 * f_in_inv_dir_idx[dir]] = -rho * (6.0 * ((double)(neighbour_offset_x[dir])) * *((double *)(&_data_indexVector[40 * ctr_0 + 16])) + 6.0 * ((double)(neighbour_offset_y[dir])) * *((double *)(&_data_indexVector[40 * ctr_0 + 24])) + 6.0 * ((double)(neighbour_offset_z[dir])) * *((double *)(&_data_indexVector[40 * ctr_0 + 32]))) * weights[dir] + _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y + _stride_pdfs_2 * z + _stride_pdfs_3 * dir]; } } -} // namespace internal_451fd042b8d7665063ea81b98853365b +} // namespace internal_3cfabb7f34e389af9363b890d8729bed // NOLINTEND(readability-non-const-parameter*) #ifdef __GNUC__ @@ -80,7 +80,7 @@ static FUNC_PREFIX void dynamic_ubb_double_precision_boundary_Dynamic_UBB_double #pragma pop #endif -void Dynamic_UBB_double_precision::run_impl(IBlock *block, IndexVectors::Type type) { +void DynamicUBBDoublePrecision::run_impl(IBlock *block, IndexVectors::Type type) { auto *indexVectors = block->getData(indexVectorID); int32_t indexVectorSize = int32_c(indexVectors->indexVector(type).size()); if (indexVectorSize == 0) @@ -98,18 +98,18 @@ void Dynamic_UBB_double_precision::run_impl(IBlock *block, IndexVectors::Type ty const int64_t _stride_pdfs_1 = int64_t(pdfs->yStride()); const int64_t _stride_pdfs_2 = int64_t(pdfs->zStride()); const int64_t _stride_pdfs_3 = int64_t(1 * int64_t(pdfs->fStride())); - internal_451fd042b8d7665063ea81b98853365b::dynamic_ubb_double_precision_boundary_Dynamic_UBB_double_precision(_data_indexVector, _data_pdfs, _stride_pdfs_0, _stride_pdfs_1, _stride_pdfs_2, _stride_pdfs_3, indexVectorSize); + internal_3cfabb7f34e389af9363b890d8729bed::dynamicubbdoubleprecision_boundary_DynamicUBBDoublePrecision(_data_indexVector, _data_pdfs, _stride_pdfs_0, _stride_pdfs_1, _stride_pdfs_2, _stride_pdfs_3, indexVectorSize); } -void Dynamic_UBB_double_precision::run(IBlock *block) { +void DynamicUBBDoublePrecision::run(IBlock *block) { run_impl(block, IndexVectors::ALL); } -void Dynamic_UBB_double_precision::inner(IBlock *block) { +void DynamicUBBDoublePrecision::inner(IBlock *block) { run_impl(block, IndexVectors::INNER); } -void Dynamic_UBB_double_precision::outer(IBlock *block) { +void DynamicUBBDoublePrecision::outer(IBlock *block) { run_impl(block, IndexVectors::OUTER); } diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/Dynamic_UBB_double_precision.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/DynamicUBBDoublePrecision.h similarity index 96% rename from src/walberla_bridge/src/lattice_boltzmann/generated_kernels/Dynamic_UBB_double_precision.h rename to src/walberla_bridge/src/lattice_boltzmann/generated_kernels/DynamicUBBDoublePrecision.h index 7e6642037f1..e138fcf9b94 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/Dynamic_UBB_double_precision.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/DynamicUBBDoublePrecision.h @@ -13,13 +13,13 @@ // You should have received a copy of the GNU General Public License along // with waLBerla (see COPYING.txt). If not, see . // -//! \\file Dynamic_UBB_double_precision.h +//! \\file DynamicUBBDoublePrecision.h //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -50,7 +50,7 @@ using walberla::half; namespace walberla { namespace lbm { -class Dynamic_UBB_double_precision { +class DynamicUBBDoublePrecision { public: struct IndexInfo { int32_t x; @@ -89,18 +89,18 @@ class Dynamic_UBB_double_precision { std::vector cpuVectors_{NUM_TYPES}; }; - Dynamic_UBB_double_precision( + DynamicUBBDoublePrecision( const shared_ptr &blocks, BlockDataID pdfsID_, - std::function(const Cell &, - const shared_ptr &, - IBlock &)> &velocityCallback) + std::function(const Cell &, + const shared_ptr &, + IBlock &)> &velocityCallback) : elementInitialiser(velocityCallback), pdfsID(pdfsID_) { auto createIdxVector = [](IBlock *const, StructuredBlockStorage *const) { return new IndexVectors(); }; indexVectorID = blocks->addStructuredBlockData( - createIdxVector, "IndexField_Dynamic_UBB_double_precision"); - }; + createIdxVector, "IndexField_DynamicUBBDoublePrecision"); + } void run(IBlock *block); @@ -110,6 +110,13 @@ class Dynamic_UBB_double_precision { void outer(IBlock *block); + Vector3 getForce(IBlock * /*block*/) { + + WALBERLA_ABORT( + "Boundary condition was not generated including force calculation.") + return Vector3(double_c(0.0)); + } + std::function getSweep() { return [this](IBlock *b) { this->run(b); }; } @@ -562,7 +569,8 @@ class Dynamic_UBB_double_precision { void run_impl(IBlock *block, IndexVectors::Type type); BlockDataID indexVectorID; - std::function( + + std::function( const Cell &, const shared_ptr &, IBlock &)> elementInitialiser; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/Dynamic_UBB_double_precisionCUDA.cu b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/DynamicUBBDoublePrecisionCUDA.cu similarity index 81% rename from src/walberla_bridge/src/lattice_boltzmann/generated_kernels/Dynamic_UBB_double_precisionCUDA.cu rename to src/walberla_bridge/src/lattice_boltzmann/generated_kernels/DynamicUBBDoublePrecisionCUDA.cu index 0fd77e065cb..5b70833d33e 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/Dynamic_UBB_double_precisionCUDA.cu +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/DynamicUBBDoublePrecisionCUDA.cu @@ -13,13 +13,13 @@ // You should have received a copy of the GNU General Public License along // with waLBerla (see COPYING.txt). If not, see . // -//! \\file Dynamic_UBB_double_precisionCUDA.cpp +//! \\file DynamicUBBDoublePrecisionCUDA.cpp //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 -#include "Dynamic_UBB_double_precisionCUDA.h" +#include "DynamicUBBDoublePrecisionCUDA.h" #include "core/DataTypes.h" #include "core/Macros.h" #include "gpu/ErrorChecking.h" @@ -73,12 +73,12 @@ namespace lbm { #endif // NOLINTBEGIN(readability-non-const-parameter*) -namespace internal_dynamic_ubb_double_precisioncuda_boundary_Dynamic_UBB_double_precisionCUDA { -static FUNC_PREFIX __launch_bounds__(256) void dynamic_ubb_double_precisioncuda_boundary_Dynamic_UBB_double_precisionCUDA(uint8_t *RESTRICT const _data_indexVector, double *RESTRICT _data_pdfs, int64_t const _stride_pdfs_0, int64_t const _stride_pdfs_1, int64_t const _stride_pdfs_2, int64_t const _stride_pdfs_3, int32_t indexVectorSize) { +namespace internal_dynamicubbdoubleprecisioncuda_boundary_DynamicUBBDoublePrecisionCUDA { +static FUNC_PREFIX __launch_bounds__(256) void dynamicubbdoubleprecisioncuda_boundary_DynamicUBBDoublePrecisionCUDA(uint8_t *RESTRICT const _data_indexVector, double *RESTRICT _data_pdfs, int64_t const _stride_pdfs_0, int64_t const _stride_pdfs_1, int64_t const _stride_pdfs_2, int64_t const _stride_pdfs_3, int32_t indexVectorSize) { const int32_t f_in_inv_dir_idx[] = {0, 2, 1, 4, 3, 6, 5, 10, 9, 8, 7, 16, 15, 18, 17, 12, 11, 14, 13}; - const double weights[] = {0.33333333333333333, 0.055555555555555556, 0.055555555555555556, 0.055555555555555556, 0.055555555555555556, 0.055555555555555556, 0.055555555555555556, 0.027777777777777778, 0.027777777777777778, 0.027777777777777778, 0.027777777777777778, 0.027777777777777778, 0.027777777777777778, 0.027777777777777778, 0.027777777777777778, 0.027777777777777778, 0.027777777777777778, 0.027777777777777778, 0.027777777777777778}; + const double weights[] = {((double)(0.33333333333333333)), ((double)(0.055555555555555556)), ((double)(0.055555555555555556)), ((double)(0.055555555555555556)), ((double)(0.055555555555555556)), ((double)(0.055555555555555556)), ((double)(0.055555555555555556)), ((double)(0.027777777777777778)), ((double)(0.027777777777777778)), ((double)(0.027777777777777778)), ((double)(0.027777777777777778)), ((double)(0.027777777777777778)), ((double)(0.027777777777777778)), ((double)(0.027777777777777778)), ((double)(0.027777777777777778)), ((double)(0.027777777777777778)), ((double)(0.027777777777777778)), ((double)(0.027777777777777778)), ((double)(0.027777777777777778))}; const int32_t neighbour_offset_x[] = {0, 0, 0, -1, 1, 0, 0, -1, 1, -1, 1, 0, 0, -1, 1, 0, 0, -1, 1}; const int32_t neighbour_offset_y[] = {0, 1, -1, 0, 0, 0, 0, 1, 1, -1, -1, 1, -1, 0, 0, 1, -1, 0, 0}; @@ -116,15 +116,15 @@ static FUNC_PREFIX __launch_bounds__(256) void dynamic_ubb_double_precisioncuda_ double *RESTRICT _data_pdfs_1m1_20_32 = _data_pdfs + _stride_pdfs_1 * y - _stride_pdfs_1 + _stride_pdfs_2 * z + 2 * _stride_pdfs_3; double *RESTRICT _data_pdfs_10_20_33 = _data_pdfs + _stride_pdfs_1 * y + _stride_pdfs_2 * z + 3 * _stride_pdfs_3; const double rho = vel0Term + vel1Term + vel2Term + _data_pdfs_10_20_30[_stride_pdfs_0 * x] + _data_pdfs_10_20_33[_stride_pdfs_0 * x - _stride_pdfs_0] + _data_pdfs_10_2m1_317[_stride_pdfs_0 * x - _stride_pdfs_0] + _data_pdfs_10_2m1_36[_stride_pdfs_0 * x] + _data_pdfs_1m1_20_32[_stride_pdfs_0 * x] + _data_pdfs_1m1_20_39[_stride_pdfs_0 * x - _stride_pdfs_0] + _data_pdfs_1m1_2m1_316[_stride_pdfs_0 * x]; - double *RESTRICT _data_pdfs760dce667daab9ae = _data_pdfs + _stride_pdfs_1 * y + _stride_pdfs_1 * neighbour_offset_y[dir] + _stride_pdfs_2 * z + _stride_pdfs_2 * neighbour_offset_z[dir] + _stride_pdfs_3 * f_in_inv_dir_idx[dir]; + double *RESTRICT _data_pdfs55fdae022a09c5af = _data_pdfs + _stride_pdfs_1 * y + _stride_pdfs_1 * neighbour_offset_y[dir] + _stride_pdfs_2 * z + _stride_pdfs_2 * neighbour_offset_z[dir] + _stride_pdfs_3 * f_in_inv_dir_idx[dir]; uint8_t *RESTRICT _data_indexVector_116 = _data_indexVector + 16; uint8_t *RESTRICT _data_indexVector_124 = _data_indexVector + 24; uint8_t *RESTRICT _data_indexVector_132 = _data_indexVector + 32; - double *RESTRICT _data_pdfs_10_200a5bfb2297cee9db = _data_pdfs + _stride_pdfs_1 * y + _stride_pdfs_2 * z + _stride_pdfs_3 * dir; - _data_pdfs760dce667daab9ae[_stride_pdfs_0 * x + _stride_pdfs_0 * neighbour_offset_x[dir]] = -rho * (6.0 * ((double)(neighbour_offset_x[dir])) * *((double *)(&_data_indexVector_116[40 * blockDim.x * blockIdx.x + 40 * threadIdx.x])) + 6.0 * ((double)(neighbour_offset_y[dir])) * *((double *)(&_data_indexVector_124[40 * blockDim.x * blockIdx.x + 40 * threadIdx.x])) + 6.0 * ((double)(neighbour_offset_z[dir])) * *((double *)(&_data_indexVector_132[40 * blockDim.x * blockIdx.x + 40 * threadIdx.x]))) * weights[dir] + _data_pdfs_10_200a5bfb2297cee9db[_stride_pdfs_0 * x]; + double *RESTRICT _data_pdfs_10_20d0ff7d40f7d4eade = _data_pdfs + _stride_pdfs_1 * y + _stride_pdfs_2 * z + _stride_pdfs_3 * dir; + _data_pdfs55fdae022a09c5af[_stride_pdfs_0 * x + _stride_pdfs_0 * neighbour_offset_x[dir]] = -rho * (6.0 * ((double)(neighbour_offset_x[dir])) * *((double *)(&_data_indexVector_116[40 * blockDim.x * blockIdx.x + 40 * threadIdx.x])) + 6.0 * ((double)(neighbour_offset_y[dir])) * *((double *)(&_data_indexVector_124[40 * blockDim.x * blockIdx.x + 40 * threadIdx.x])) + 6.0 * ((double)(neighbour_offset_z[dir])) * *((double *)(&_data_indexVector_132[40 * blockDim.x * blockIdx.x + 40 * threadIdx.x]))) * weights[dir] + _data_pdfs_10_20d0ff7d40f7d4eade[_stride_pdfs_0 * x]; } } -} // namespace internal_dynamic_ubb_double_precisioncuda_boundary_Dynamic_UBB_double_precisionCUDA +} // namespace internal_dynamicubbdoubleprecisioncuda_boundary_DynamicUBBDoublePrecisionCUDA // NOLINTEND(readability-non-const-parameter*) @@ -148,7 +148,7 @@ static FUNC_PREFIX __launch_bounds__(256) void dynamic_ubb_double_precisioncuda_ #pragma GCC diagnostic pop #endif -void Dynamic_UBB_double_precisionCUDA::run_impl(IBlock *block, IndexVectors::Type type, gpuStream_t stream) { +void DynamicUBBDoublePrecisionCUDA::run_impl(IBlock *block, IndexVectors::Type type, gpuStream_t stream) { auto *indexVectors = block->getData(indexVectorID); int32_t indexVectorSize = int32_c(indexVectors->indexVector(type).size()); if (indexVectorSize == 0) @@ -168,18 +168,18 @@ void Dynamic_UBB_double_precisionCUDA::run_impl(IBlock *block, IndexVectors::Typ const int64_t _stride_pdfs_3 = int64_t(1 * int64_t(pdfs->fStride())); dim3 _block(uint32_c(((256 < indexVectorSize) ? 256 : indexVectorSize)), uint32_c(1), uint32_c(1)); dim3 _grid(uint32_c(((indexVectorSize) % (((256 < indexVectorSize) ? 256 : indexVectorSize)) == 0 ? (int64_t)(indexVectorSize) / (int64_t)(((256 < indexVectorSize) ? 256 : indexVectorSize)) : ((int64_t)(indexVectorSize) / (int64_t)(((256 < indexVectorSize) ? 256 : indexVectorSize))) + 1)), uint32_c(1), uint32_c(1)); - internal_dynamic_ubb_double_precisioncuda_boundary_Dynamic_UBB_double_precisionCUDA::dynamic_ubb_double_precisioncuda_boundary_Dynamic_UBB_double_precisionCUDA<<<_grid, _block, 0, stream>>>(_data_indexVector, _data_pdfs, _stride_pdfs_0, _stride_pdfs_1, _stride_pdfs_2, _stride_pdfs_3, indexVectorSize); + internal_dynamicubbdoubleprecisioncuda_boundary_DynamicUBBDoublePrecisionCUDA::dynamicubbdoubleprecisioncuda_boundary_DynamicUBBDoublePrecisionCUDA<<<_grid, _block, 0, stream>>>(_data_indexVector, _data_pdfs, _stride_pdfs_0, _stride_pdfs_1, _stride_pdfs_2, _stride_pdfs_3, indexVectorSize); } -void Dynamic_UBB_double_precisionCUDA::run(IBlock *block, gpuStream_t stream) { +void DynamicUBBDoublePrecisionCUDA::run(IBlock *block, gpuStream_t stream) { run_impl(block, IndexVectors::ALL, stream); } -void Dynamic_UBB_double_precisionCUDA::inner(IBlock *block, gpuStream_t stream) { +void DynamicUBBDoublePrecisionCUDA::inner(IBlock *block, gpuStream_t stream) { run_impl(block, IndexVectors::INNER, stream); } -void Dynamic_UBB_double_precisionCUDA::outer(IBlock *block, gpuStream_t stream) { +void DynamicUBBDoublePrecisionCUDA::outer(IBlock *block, gpuStream_t stream) { run_impl(block, IndexVectors::OUTER, stream); } diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/Dynamic_UBB_double_precisionCUDA.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/DynamicUBBDoublePrecisionCUDA.h similarity index 96% rename from src/walberla_bridge/src/lattice_boltzmann/generated_kernels/Dynamic_UBB_double_precisionCUDA.h rename to src/walberla_bridge/src/lattice_boltzmann/generated_kernels/DynamicUBBDoublePrecisionCUDA.h index 2b71cc44d1f..5ad93683fc0 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/Dynamic_UBB_double_precisionCUDA.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/DynamicUBBDoublePrecisionCUDA.h @@ -13,13 +13,13 @@ // You should have received a copy of the GNU General Public License along // with waLBerla (see COPYING.txt). If not, see . // -//! \\file Dynamic_UBB_double_precisionCUDA.h +//! \\file DynamicUBBDoublePrecisionCUDA.h //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -52,7 +52,7 @@ using walberla::half; namespace walberla { namespace lbm { -class Dynamic_UBB_double_precisionCUDA { +class DynamicUBBDoublePrecisionCUDA { public: struct IndexInfo { int32_t x; @@ -114,18 +114,18 @@ class Dynamic_UBB_double_precisionCUDA { std::vector gpuVectors_; }; - Dynamic_UBB_double_precisionCUDA( + DynamicUBBDoublePrecisionCUDA( const shared_ptr &blocks, BlockDataID pdfsID_, - std::function(const Cell &, - const shared_ptr &, - IBlock &)> &velocityCallback) + std::function(const Cell &, + const shared_ptr &, + IBlock &)> &velocityCallback) : elementInitialiser(velocityCallback), pdfsID(pdfsID_) { auto createIdxVector = [](IBlock *const, StructuredBlockStorage *const) { return new IndexVectors(); }; indexVectorID = blocks->addStructuredBlockData( - createIdxVector, "IndexField_Dynamic_UBB_double_precisionCUDA"); - }; + createIdxVector, "IndexField_DynamicUBBDoublePrecisionCUDA"); + } void run(IBlock *block, gpuStream_t stream = nullptr); @@ -137,6 +137,13 @@ class Dynamic_UBB_double_precisionCUDA { void outer(IBlock *block, gpuStream_t stream = nullptr); + Vector3 getForce(IBlock * /*block*/) { + + WALBERLA_ABORT( + "Boundary condition was not generated including force calculation.") + return Vector3(double_c(0.0)); + } + std::function getSweep(gpuStream_t stream = nullptr) { return [this, stream](IBlock *b) { this->run(b, stream); }; } @@ -590,7 +597,8 @@ class Dynamic_UBB_double_precisionCUDA { gpuStream_t stream = nullptr); BlockDataID indexVectorID; - std::function( + + std::function( const Cell &, const shared_ptr &, IBlock &)> elementInitialiser; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/Dynamic_UBB_single_precision.cpp b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/DynamicUBBSinglePrecision.cpp similarity index 78% rename from src/walberla_bridge/src/lattice_boltzmann/generated_kernels/Dynamic_UBB_single_precision.cpp rename to src/walberla_bridge/src/lattice_boltzmann/generated_kernels/DynamicUBBSinglePrecision.cpp index 33dbd780d87..435b03e5982 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/Dynamic_UBB_single_precision.cpp +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/DynamicUBBSinglePrecision.cpp @@ -13,13 +13,13 @@ // You should have received a copy of the GNU General Public License along // with waLBerla (see COPYING.txt). If not, see . // -//! \\file Dynamic_UBB_single_precision.cpp +//! \\file DynamicUBBSinglePrecision.cpp //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 -#include "Dynamic_UBB_single_precision.h" +#include "DynamicUBBSinglePrecision.h" #include "core/DataTypes.h" #include "core/Macros.h" @@ -46,12 +46,12 @@ namespace lbm { #endif #endif // NOLINTBEGIN(readability-non-const-parameter*) -namespace internal_efdc97602c407e557fff6737dd9b4d80 { -static FUNC_PREFIX void dynamic_ubb_single_precision_boundary_Dynamic_UBB_single_precision(uint8_t *RESTRICT const _data_indexVector, float *RESTRICT _data_pdfs, int64_t const _stride_pdfs_0, int64_t const _stride_pdfs_1, int64_t const _stride_pdfs_2, int64_t const _stride_pdfs_3, int32_t indexVectorSize) { +namespace internal_6cb25260a6784120b7639a911a9d03fd { +static FUNC_PREFIX void dynamicubbsingleprecision_boundary_DynamicUBBSinglePrecision(uint8_t *RESTRICT const _data_indexVector, float *RESTRICT _data_pdfs, int64_t const _stride_pdfs_0, int64_t const _stride_pdfs_1, int64_t const _stride_pdfs_2, int64_t const _stride_pdfs_3, int32_t indexVectorSize) { const int32_t f_in_inv_dir_idx[] = {0, 2, 1, 4, 3, 6, 5, 10, 9, 8, 7, 16, 15, 18, 17, 12, 11, 14, 13}; - const float weights[] = {0.33333333333333333f, 0.055555555555555556f, 0.055555555555555556f, 0.055555555555555556f, 0.055555555555555556f, 0.055555555555555556f, 0.055555555555555556f, 0.027777777777777778f, 0.027777777777777778f, 0.027777777777777778f, 0.027777777777777778f, 0.027777777777777778f, 0.027777777777777778f, 0.027777777777777778f, 0.027777777777777778f, 0.027777777777777778f, 0.027777777777777778f, 0.027777777777777778f, 0.027777777777777778f}; + const float weights[] = {((float)(0.33333333333333333)), ((float)(0.055555555555555556)), ((float)(0.055555555555555556)), ((float)(0.055555555555555556)), ((float)(0.055555555555555556)), ((float)(0.055555555555555556)), ((float)(0.055555555555555556)), ((float)(0.027777777777777778)), ((float)(0.027777777777777778)), ((float)(0.027777777777777778)), ((float)(0.027777777777777778)), ((float)(0.027777777777777778)), ((float)(0.027777777777777778)), ((float)(0.027777777777777778)), ((float)(0.027777777777777778)), ((float)(0.027777777777777778)), ((float)(0.027777777777777778)), ((float)(0.027777777777777778)), ((float)(0.027777777777777778))}; const int32_t neighbour_offset_x[] = {0, 0, 0, -1, 1, 0, 0, -1, 1, -1, 1, 0, 0, -1, 1, 0, 0, -1, 1}; const int32_t neighbour_offset_y[] = {0, 1, -1, 0, 0, 0, 0, 1, 1, -1, -1, 1, -1, 0, 0, 1, -1, 0, 0}; @@ -69,7 +69,7 @@ static FUNC_PREFIX void dynamic_ubb_single_precision_boundary_Dynamic_UBB_single _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_0 * neighbour_offset_x[dir] + _stride_pdfs_1 * y + _stride_pdfs_1 * neighbour_offset_y[dir] + _stride_pdfs_2 * z + _stride_pdfs_2 * neighbour_offset_z[dir] + _stride_pdfs_3 * f_in_inv_dir_idx[dir]] = -rho * (6.0f * ((float)(neighbour_offset_x[dir])) * *((float *)(&_data_indexVector[28 * ctr_0 + 16])) + 6.0f * ((float)(neighbour_offset_y[dir])) * *((float *)(&_data_indexVector[28 * ctr_0 + 20])) + 6.0f * ((float)(neighbour_offset_z[dir])) * *((float *)(&_data_indexVector[28 * ctr_0 + 24]))) * weights[dir] + _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y + _stride_pdfs_2 * z + _stride_pdfs_3 * dir]; } } -} // namespace internal_efdc97602c407e557fff6737dd9b4d80 +} // namespace internal_6cb25260a6784120b7639a911a9d03fd // NOLINTEND(readability-non-const-parameter*) #ifdef __GNUC__ @@ -80,7 +80,7 @@ static FUNC_PREFIX void dynamic_ubb_single_precision_boundary_Dynamic_UBB_single #pragma pop #endif -void Dynamic_UBB_single_precision::run_impl(IBlock *block, IndexVectors::Type type) { +void DynamicUBBSinglePrecision::run_impl(IBlock *block, IndexVectors::Type type) { auto *indexVectors = block->getData(indexVectorID); int32_t indexVectorSize = int32_c(indexVectors->indexVector(type).size()); if (indexVectorSize == 0) @@ -98,18 +98,18 @@ void Dynamic_UBB_single_precision::run_impl(IBlock *block, IndexVectors::Type ty const int64_t _stride_pdfs_1 = int64_t(pdfs->yStride()); const int64_t _stride_pdfs_2 = int64_t(pdfs->zStride()); const int64_t _stride_pdfs_3 = int64_t(1 * int64_t(pdfs->fStride())); - internal_efdc97602c407e557fff6737dd9b4d80::dynamic_ubb_single_precision_boundary_Dynamic_UBB_single_precision(_data_indexVector, _data_pdfs, _stride_pdfs_0, _stride_pdfs_1, _stride_pdfs_2, _stride_pdfs_3, indexVectorSize); + internal_6cb25260a6784120b7639a911a9d03fd::dynamicubbsingleprecision_boundary_DynamicUBBSinglePrecision(_data_indexVector, _data_pdfs, _stride_pdfs_0, _stride_pdfs_1, _stride_pdfs_2, _stride_pdfs_3, indexVectorSize); } -void Dynamic_UBB_single_precision::run(IBlock *block) { +void DynamicUBBSinglePrecision::run(IBlock *block) { run_impl(block, IndexVectors::ALL); } -void Dynamic_UBB_single_precision::inner(IBlock *block) { +void DynamicUBBSinglePrecision::inner(IBlock *block) { run_impl(block, IndexVectors::INNER); } -void Dynamic_UBB_single_precision::outer(IBlock *block) { +void DynamicUBBSinglePrecision::outer(IBlock *block) { run_impl(block, IndexVectors::OUTER); } diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/Dynamic_UBB_single_precision.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/DynamicUBBSinglePrecision.h similarity index 96% rename from src/walberla_bridge/src/lattice_boltzmann/generated_kernels/Dynamic_UBB_single_precision.h rename to src/walberla_bridge/src/lattice_boltzmann/generated_kernels/DynamicUBBSinglePrecision.h index ba75a5b49bc..ffb6c15d030 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/Dynamic_UBB_single_precision.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/DynamicUBBSinglePrecision.h @@ -13,13 +13,13 @@ // You should have received a copy of the GNU General Public License along // with waLBerla (see COPYING.txt). If not, see . // -//! \\file Dynamic_UBB_single_precision.h +//! \\file DynamicUBBSinglePrecision.h //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -50,7 +50,7 @@ using walberla::half; namespace walberla { namespace lbm { -class Dynamic_UBB_single_precision { +class DynamicUBBSinglePrecision { public: struct IndexInfo { int32_t x; @@ -89,18 +89,18 @@ class Dynamic_UBB_single_precision { std::vector cpuVectors_{NUM_TYPES}; }; - Dynamic_UBB_single_precision( + DynamicUBBSinglePrecision( const shared_ptr &blocks, BlockDataID pdfsID_, - std::function(const Cell &, - const shared_ptr &, - IBlock &)> &velocityCallback) + std::function(const Cell &, + const shared_ptr &, + IBlock &)> &velocityCallback) : elementInitialiser(velocityCallback), pdfsID(pdfsID_) { auto createIdxVector = [](IBlock *const, StructuredBlockStorage *const) { return new IndexVectors(); }; indexVectorID = blocks->addStructuredBlockData( - createIdxVector, "IndexField_Dynamic_UBB_single_precision"); - }; + createIdxVector, "IndexField_DynamicUBBSinglePrecision"); + } void run(IBlock *block); @@ -110,6 +110,13 @@ class Dynamic_UBB_single_precision { void outer(IBlock *block); + Vector3 getForce(IBlock * /*block*/) { + + WALBERLA_ABORT( + "Boundary condition was not generated including force calculation.") + return Vector3(double_c(0.0)); + } + std::function getSweep() { return [this](IBlock *b) { this->run(b); }; } @@ -562,7 +569,8 @@ class Dynamic_UBB_single_precision { void run_impl(IBlock *block, IndexVectors::Type type); BlockDataID indexVectorID; - std::function( + + std::function( const Cell &, const shared_ptr &, IBlock &)> elementInitialiser; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/Dynamic_UBB_single_precisionCUDA.cu b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/DynamicUBBSinglePrecisionCUDA.cu similarity index 81% rename from src/walberla_bridge/src/lattice_boltzmann/generated_kernels/Dynamic_UBB_single_precisionCUDA.cu rename to src/walberla_bridge/src/lattice_boltzmann/generated_kernels/DynamicUBBSinglePrecisionCUDA.cu index 4ed013d81e4..319460f0420 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/Dynamic_UBB_single_precisionCUDA.cu +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/DynamicUBBSinglePrecisionCUDA.cu @@ -13,13 +13,13 @@ // You should have received a copy of the GNU General Public License along // with waLBerla (see COPYING.txt). If not, see . // -//! \\file Dynamic_UBB_single_precisionCUDA.cpp +//! \\file DynamicUBBSinglePrecisionCUDA.cpp //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 -#include "Dynamic_UBB_single_precisionCUDA.h" +#include "DynamicUBBSinglePrecisionCUDA.h" #include "core/DataTypes.h" #include "core/Macros.h" #include "gpu/ErrorChecking.h" @@ -73,12 +73,12 @@ namespace lbm { #endif // NOLINTBEGIN(readability-non-const-parameter*) -namespace internal_dynamic_ubb_single_precisioncuda_boundary_Dynamic_UBB_single_precisionCUDA { -static FUNC_PREFIX __launch_bounds__(256) void dynamic_ubb_single_precisioncuda_boundary_Dynamic_UBB_single_precisionCUDA(uint8_t *RESTRICT const _data_indexVector, float *RESTRICT _data_pdfs, int64_t const _stride_pdfs_0, int64_t const _stride_pdfs_1, int64_t const _stride_pdfs_2, int64_t const _stride_pdfs_3, int32_t indexVectorSize) { +namespace internal_dynamicubbsingleprecisioncuda_boundary_DynamicUBBSinglePrecisionCUDA { +static FUNC_PREFIX __launch_bounds__(256) void dynamicubbsingleprecisioncuda_boundary_DynamicUBBSinglePrecisionCUDA(uint8_t *RESTRICT const _data_indexVector, float *RESTRICT _data_pdfs, int64_t const _stride_pdfs_0, int64_t const _stride_pdfs_1, int64_t const _stride_pdfs_2, int64_t const _stride_pdfs_3, int32_t indexVectorSize) { const int32_t f_in_inv_dir_idx[] = {0, 2, 1, 4, 3, 6, 5, 10, 9, 8, 7, 16, 15, 18, 17, 12, 11, 14, 13}; - const float weights[] = {0.33333333333333333f, 0.055555555555555556f, 0.055555555555555556f, 0.055555555555555556f, 0.055555555555555556f, 0.055555555555555556f, 0.055555555555555556f, 0.027777777777777778f, 0.027777777777777778f, 0.027777777777777778f, 0.027777777777777778f, 0.027777777777777778f, 0.027777777777777778f, 0.027777777777777778f, 0.027777777777777778f, 0.027777777777777778f, 0.027777777777777778f, 0.027777777777777778f, 0.027777777777777778f}; + const float weights[] = {((float)(0.33333333333333333)), ((float)(0.055555555555555556)), ((float)(0.055555555555555556)), ((float)(0.055555555555555556)), ((float)(0.055555555555555556)), ((float)(0.055555555555555556)), ((float)(0.055555555555555556)), ((float)(0.027777777777777778)), ((float)(0.027777777777777778)), ((float)(0.027777777777777778)), ((float)(0.027777777777777778)), ((float)(0.027777777777777778)), ((float)(0.027777777777777778)), ((float)(0.027777777777777778)), ((float)(0.027777777777777778)), ((float)(0.027777777777777778)), ((float)(0.027777777777777778)), ((float)(0.027777777777777778)), ((float)(0.027777777777777778))}; const int32_t neighbour_offset_x[] = {0, 0, 0, -1, 1, 0, 0, -1, 1, -1, 1, 0, 0, -1, 1, 0, 0, -1, 1}; const int32_t neighbour_offset_y[] = {0, 1, -1, 0, 0, 0, 0, 1, 1, -1, -1, 1, -1, 0, 0, 1, -1, 0, 0}; @@ -116,15 +116,15 @@ static FUNC_PREFIX __launch_bounds__(256) void dynamic_ubb_single_precisioncuda_ float *RESTRICT _data_pdfs_1m1_20_32 = _data_pdfs + _stride_pdfs_1 * y - _stride_pdfs_1 + _stride_pdfs_2 * z + 2 * _stride_pdfs_3; float *RESTRICT _data_pdfs_10_20_33 = _data_pdfs + _stride_pdfs_1 * y + _stride_pdfs_2 * z + 3 * _stride_pdfs_3; const float rho = vel0Term + vel1Term + vel2Term + _data_pdfs_10_20_30[_stride_pdfs_0 * x] + _data_pdfs_10_20_33[_stride_pdfs_0 * x - _stride_pdfs_0] + _data_pdfs_10_2m1_317[_stride_pdfs_0 * x - _stride_pdfs_0] + _data_pdfs_10_2m1_36[_stride_pdfs_0 * x] + _data_pdfs_1m1_20_32[_stride_pdfs_0 * x] + _data_pdfs_1m1_20_39[_stride_pdfs_0 * x - _stride_pdfs_0] + _data_pdfs_1m1_2m1_316[_stride_pdfs_0 * x]; - float *RESTRICT _data_pdfs51aa77f0c2cd7c8d = _data_pdfs + _stride_pdfs_1 * y + _stride_pdfs_1 * neighbour_offset_y[dir] + _stride_pdfs_2 * z + _stride_pdfs_2 * neighbour_offset_z[dir] + _stride_pdfs_3 * f_in_inv_dir_idx[dir]; + float *RESTRICT _data_pdfsb0f6f69d619725c8 = _data_pdfs + _stride_pdfs_1 * y + _stride_pdfs_1 * neighbour_offset_y[dir] + _stride_pdfs_2 * z + _stride_pdfs_2 * neighbour_offset_z[dir] + _stride_pdfs_3 * f_in_inv_dir_idx[dir]; uint8_t *RESTRICT _data_indexVector_116 = _data_indexVector + 16; uint8_t *RESTRICT _data_indexVector_120 = _data_indexVector + 20; uint8_t *RESTRICT _data_indexVector_124 = _data_indexVector + 24; - float *RESTRICT _data_pdfs_10_20cc174ab22360a76a = _data_pdfs + _stride_pdfs_1 * y + _stride_pdfs_2 * z + _stride_pdfs_3 * dir; - _data_pdfs51aa77f0c2cd7c8d[_stride_pdfs_0 * x + _stride_pdfs_0 * neighbour_offset_x[dir]] = -rho * (6.0f * ((float)(neighbour_offset_x[dir])) * *((float *)(&_data_indexVector_116[28 * blockDim.x * blockIdx.x + 28 * threadIdx.x])) + 6.0f * ((float)(neighbour_offset_y[dir])) * *((float *)(&_data_indexVector_120[28 * blockDim.x * blockIdx.x + 28 * threadIdx.x])) + 6.0f * ((float)(neighbour_offset_z[dir])) * *((float *)(&_data_indexVector_124[28 * blockDim.x * blockIdx.x + 28 * threadIdx.x]))) * weights[dir] + _data_pdfs_10_20cc174ab22360a76a[_stride_pdfs_0 * x]; + float *RESTRICT _data_pdfs_10_20b9bbe59f808ba907 = _data_pdfs + _stride_pdfs_1 * y + _stride_pdfs_2 * z + _stride_pdfs_3 * dir; + _data_pdfsb0f6f69d619725c8[_stride_pdfs_0 * x + _stride_pdfs_0 * neighbour_offset_x[dir]] = -rho * (6.0f * ((float)(neighbour_offset_x[dir])) * *((float *)(&_data_indexVector_116[28 * blockDim.x * blockIdx.x + 28 * threadIdx.x])) + 6.0f * ((float)(neighbour_offset_y[dir])) * *((float *)(&_data_indexVector_120[28 * blockDim.x * blockIdx.x + 28 * threadIdx.x])) + 6.0f * ((float)(neighbour_offset_z[dir])) * *((float *)(&_data_indexVector_124[28 * blockDim.x * blockIdx.x + 28 * threadIdx.x]))) * weights[dir] + _data_pdfs_10_20b9bbe59f808ba907[_stride_pdfs_0 * x]; } } -} // namespace internal_dynamic_ubb_single_precisioncuda_boundary_Dynamic_UBB_single_precisionCUDA +} // namespace internal_dynamicubbsingleprecisioncuda_boundary_DynamicUBBSinglePrecisionCUDA // NOLINTEND(readability-non-const-parameter*) @@ -148,7 +148,7 @@ static FUNC_PREFIX __launch_bounds__(256) void dynamic_ubb_single_precisioncuda_ #pragma GCC diagnostic pop #endif -void Dynamic_UBB_single_precisionCUDA::run_impl(IBlock *block, IndexVectors::Type type, gpuStream_t stream) { +void DynamicUBBSinglePrecisionCUDA::run_impl(IBlock *block, IndexVectors::Type type, gpuStream_t stream) { auto *indexVectors = block->getData(indexVectorID); int32_t indexVectorSize = int32_c(indexVectors->indexVector(type).size()); if (indexVectorSize == 0) @@ -168,18 +168,18 @@ void Dynamic_UBB_single_precisionCUDA::run_impl(IBlock *block, IndexVectors::Typ const int64_t _stride_pdfs_3 = int64_t(1 * int64_t(pdfs->fStride())); dim3 _block(uint32_c(((256 < indexVectorSize) ? 256 : indexVectorSize)), uint32_c(1), uint32_c(1)); dim3 _grid(uint32_c(((indexVectorSize) % (((256 < indexVectorSize) ? 256 : indexVectorSize)) == 0 ? (int64_t)(indexVectorSize) / (int64_t)(((256 < indexVectorSize) ? 256 : indexVectorSize)) : ((int64_t)(indexVectorSize) / (int64_t)(((256 < indexVectorSize) ? 256 : indexVectorSize))) + 1)), uint32_c(1), uint32_c(1)); - internal_dynamic_ubb_single_precisioncuda_boundary_Dynamic_UBB_single_precisionCUDA::dynamic_ubb_single_precisioncuda_boundary_Dynamic_UBB_single_precisionCUDA<<<_grid, _block, 0, stream>>>(_data_indexVector, _data_pdfs, _stride_pdfs_0, _stride_pdfs_1, _stride_pdfs_2, _stride_pdfs_3, indexVectorSize); + internal_dynamicubbsingleprecisioncuda_boundary_DynamicUBBSinglePrecisionCUDA::dynamicubbsingleprecisioncuda_boundary_DynamicUBBSinglePrecisionCUDA<<<_grid, _block, 0, stream>>>(_data_indexVector, _data_pdfs, _stride_pdfs_0, _stride_pdfs_1, _stride_pdfs_2, _stride_pdfs_3, indexVectorSize); } -void Dynamic_UBB_single_precisionCUDA::run(IBlock *block, gpuStream_t stream) { +void DynamicUBBSinglePrecisionCUDA::run(IBlock *block, gpuStream_t stream) { run_impl(block, IndexVectors::ALL, stream); } -void Dynamic_UBB_single_precisionCUDA::inner(IBlock *block, gpuStream_t stream) { +void DynamicUBBSinglePrecisionCUDA::inner(IBlock *block, gpuStream_t stream) { run_impl(block, IndexVectors::INNER, stream); } -void Dynamic_UBB_single_precisionCUDA::outer(IBlock *block, gpuStream_t stream) { +void DynamicUBBSinglePrecisionCUDA::outer(IBlock *block, gpuStream_t stream) { run_impl(block, IndexVectors::OUTER, stream); } diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/Dynamic_UBB_single_precisionCUDA.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/DynamicUBBSinglePrecisionCUDA.h similarity index 96% rename from src/walberla_bridge/src/lattice_boltzmann/generated_kernels/Dynamic_UBB_single_precisionCUDA.h rename to src/walberla_bridge/src/lattice_boltzmann/generated_kernels/DynamicUBBSinglePrecisionCUDA.h index 8380a4e33b5..7781ddaaba9 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/Dynamic_UBB_single_precisionCUDA.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/DynamicUBBSinglePrecisionCUDA.h @@ -13,13 +13,13 @@ // You should have received a copy of the GNU General Public License along // with waLBerla (see COPYING.txt). If not, see . // -//! \\file Dynamic_UBB_single_precisionCUDA.h +//! \\file DynamicUBBSinglePrecisionCUDA.h //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -52,7 +52,7 @@ using walberla::half; namespace walberla { namespace lbm { -class Dynamic_UBB_single_precisionCUDA { +class DynamicUBBSinglePrecisionCUDA { public: struct IndexInfo { int32_t x; @@ -114,18 +114,18 @@ class Dynamic_UBB_single_precisionCUDA { std::vector gpuVectors_; }; - Dynamic_UBB_single_precisionCUDA( + DynamicUBBSinglePrecisionCUDA( const shared_ptr &blocks, BlockDataID pdfsID_, - std::function(const Cell &, - const shared_ptr &, - IBlock &)> &velocityCallback) + std::function(const Cell &, + const shared_ptr &, + IBlock &)> &velocityCallback) : elementInitialiser(velocityCallback), pdfsID(pdfsID_) { auto createIdxVector = [](IBlock *const, StructuredBlockStorage *const) { return new IndexVectors(); }; indexVectorID = blocks->addStructuredBlockData( - createIdxVector, "IndexField_Dynamic_UBB_single_precisionCUDA"); - }; + createIdxVector, "IndexField_DynamicUBBSinglePrecisionCUDA"); + } void run(IBlock *block, gpuStream_t stream = nullptr); @@ -137,6 +137,13 @@ class Dynamic_UBB_single_precisionCUDA { void outer(IBlock *block, gpuStream_t stream = nullptr); + Vector3 getForce(IBlock * /*block*/) { + + WALBERLA_ABORT( + "Boundary condition was not generated including force calculation.") + return Vector3(double_c(0.0)); + } + std::function getSweep(gpuStream_t stream = nullptr) { return [this, stream](IBlock *b) { this->run(b, stream); }; } @@ -590,7 +597,8 @@ class Dynamic_UBB_single_precisionCUDA { gpuStream_t stream = nullptr); BlockDataID indexVectorID; - std::function( + + std::function( const Cell &, const shared_ptr &, IBlock &)> elementInitialiser; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/FieldAccessorsDoublePrecision.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/FieldAccessorsDoublePrecision.h index bff4efa0fc5..2d28c0c12c8 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/FieldAccessorsDoublePrecision.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/FieldAccessorsDoublePrecision.h @@ -18,9 +18,9 @@ * along with this program. If not, see . */ -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 /* * Lattice field accessors. diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/FieldAccessorsDoublePrecisionCUDA.cu b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/FieldAccessorsDoublePrecisionCUDA.cu index ee087416d9e..4d34fc66689 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/FieldAccessorsDoublePrecisionCUDA.cu +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/FieldAccessorsDoublePrecisionCUDA.cu @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 /** * @file diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/FieldAccessorsDoublePrecisionCUDA.cuh b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/FieldAccessorsDoublePrecisionCUDA.cuh index 7435c52b711..3623647e83b 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/FieldAccessorsDoublePrecisionCUDA.cuh +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/FieldAccessorsDoublePrecisionCUDA.cuh @@ -18,9 +18,9 @@ * along with this program. If not, see . */ -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 /** * @file diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/FieldAccessorsSinglePrecision.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/FieldAccessorsSinglePrecision.h index 11043cefb80..e3ef98ea3f3 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/FieldAccessorsSinglePrecision.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/FieldAccessorsSinglePrecision.h @@ -18,9 +18,9 @@ * along with this program. If not, see . */ -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 /* * Lattice field accessors. diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/FieldAccessorsSinglePrecisionCUDA.cu b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/FieldAccessorsSinglePrecisionCUDA.cu index 9631c3e8443..4dd4363e787 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/FieldAccessorsSinglePrecisionCUDA.cu +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/FieldAccessorsSinglePrecisionCUDA.cu @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 /** * @file diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/FieldAccessorsSinglePrecisionCUDA.cuh b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/FieldAccessorsSinglePrecisionCUDA.cuh index fd12e2e019f..a28cebc6b45 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/FieldAccessorsSinglePrecisionCUDA.cuh +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/FieldAccessorsSinglePrecisionCUDA.cuh @@ -18,9 +18,9 @@ * along with this program. If not, see . */ -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 /** * @file diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterDoublePrecision.cpp b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterDoublePrecision.cpp index 25017078cd3..b0378ed4e18 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterDoublePrecision.cpp +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterDoublePrecision.cpp @@ -17,7 +17,7 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #include diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterDoublePrecision.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterDoublePrecision.h index c472f1f5112..8bb6689e75d 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterDoublePrecision.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterDoublePrecision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -55,7 +57,7 @@ class InitialPDFsSetterDoublePrecision { InitialPDFsSetterDoublePrecision(BlockDataID forceID_, BlockDataID pdfsID_, BlockDataID velocityID_, double rho_0) : forceID(forceID_), pdfsID(pdfsID_), velocityID(velocityID_), - rho_0_(rho_0){}; + rho_0_(rho_0) {} void run(IBlock *block); @@ -92,9 +94,13 @@ class InitialPDFsSetterDoublePrecision { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline double getRho_0() const { return rho_0_; } + inline void setRho_0(const double value) { rho_0_ = value; } +private: BlockDataID forceID; BlockDataID pdfsID; BlockDataID velocityID; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterDoublePrecisionCUDA.cu b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterDoublePrecisionCUDA.cu index 394d053dd97..a48132ca434 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterDoublePrecisionCUDA.cu +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterDoublePrecisionCUDA.cu @@ -17,7 +17,7 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #include diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterDoublePrecisionCUDA.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterDoublePrecisionCUDA.h index 6f4ab75275a..03c09f01f65 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterDoublePrecisionCUDA.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterDoublePrecisionCUDA.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -32,7 +32,9 @@ #include "domain_decomposition/IBlock.h" #include "domain_decomposition/StructuredBlockStorage.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -58,7 +60,7 @@ class InitialPDFsSetterDoublePrecisionCUDA { BlockDataID pdfsID_, BlockDataID velocityID_, double rho_0) : forceID(forceID_), pdfsID(pdfsID_), velocityID(velocityID_), - rho_0_(rho_0){}; + rho_0_(rho_0) {} void run(IBlock *block, gpuStream_t stream = nullptr); @@ -102,9 +104,13 @@ class InitialPDFsSetterDoublePrecisionCUDA { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline double getRho_0() const { return rho_0_; } + inline void setRho_0(const double value) { rho_0_ = value; } +private: BlockDataID forceID; BlockDataID pdfsID; BlockDataID velocityID; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterSinglePrecision.cpp b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterSinglePrecision.cpp index d319d749f7e..00425464c56 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterSinglePrecision.cpp +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterSinglePrecision.cpp @@ -17,7 +17,7 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #include diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterSinglePrecision.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterSinglePrecision.h index e1c3260bab9..cfea57f0a35 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterSinglePrecision.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterSinglePrecision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -55,7 +57,7 @@ class InitialPDFsSetterSinglePrecision { InitialPDFsSetterSinglePrecision(BlockDataID forceID_, BlockDataID pdfsID_, BlockDataID velocityID_, float rho_0) : forceID(forceID_), pdfsID(pdfsID_), velocityID(velocityID_), - rho_0_(rho_0){}; + rho_0_(rho_0) {} void run(IBlock *block); @@ -92,9 +94,13 @@ class InitialPDFsSetterSinglePrecision { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline float getRho_0() const { return rho_0_; } + inline void setRho_0(const float value) { rho_0_ = value; } +private: BlockDataID forceID; BlockDataID pdfsID; BlockDataID velocityID; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterSinglePrecisionCUDA.cu b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterSinglePrecisionCUDA.cu index 8054d90cd94..834088f9fde 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterSinglePrecisionCUDA.cu +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterSinglePrecisionCUDA.cu @@ -17,7 +17,7 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #include diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterSinglePrecisionCUDA.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterSinglePrecisionCUDA.h index a3faac64d68..e0760ebec40 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterSinglePrecisionCUDA.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/InitialPDFsSetterSinglePrecisionCUDA.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -32,7 +32,9 @@ #include "domain_decomposition/IBlock.h" #include "domain_decomposition/StructuredBlockStorage.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -58,7 +60,7 @@ class InitialPDFsSetterSinglePrecisionCUDA { BlockDataID pdfsID_, BlockDataID velocityID_, float rho_0) : forceID(forceID_), pdfsID(pdfsID_), velocityID(velocityID_), - rho_0_(rho_0){}; + rho_0_(rho_0) {} void run(IBlock *block, gpuStream_t stream = nullptr); @@ -102,9 +104,13 @@ class InitialPDFsSetterSinglePrecisionCUDA { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} + + inline float getRho_0() const { return rho_0_; } + inline void setRho_0(const float value) { rho_0_ = value; } +private: BlockDataID forceID; BlockDataID pdfsID; BlockDataID velocityID; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfDoublePrecision.cpp b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfDoublePrecision.cpp index 6503551664c..39353cbca7e 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfDoublePrecision.cpp +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfDoublePrecision.cpp @@ -17,7 +17,7 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #include "PackInfoPdfDoublePrecision.h" #include "core/DataTypes.h" @@ -519,7 +519,6 @@ static FUNC_PREFIX void unpack_NE(double *RESTRICT const _data_buffer, double *R } // namespace internal_unpack_NE void PackInfoPdfDoublePrecision::pack(Direction dir, unsigned char *byte_buffer, IBlock *block) const { - byte_buffer += sizeof(double) - (reinterpret_cast(byte_buffer) - (reinterpret_cast(byte_buffer) / sizeof(double)) * sizeof(double)); double *buffer = reinterpret_cast(byte_buffer); auto pdfs = block->getData>(pdfsID); @@ -894,7 +893,6 @@ void PackInfoPdfDoublePrecision::pack(Direction dir, unsigned char *byte_buffer, } void PackInfoPdfDoublePrecision::unpack(Direction dir, unsigned char *byte_buffer, IBlock *block) const { - byte_buffer += sizeof(double) - (reinterpret_cast(byte_buffer) - (reinterpret_cast(byte_buffer) / sizeof(double)) * sizeof(double)); double *buffer = reinterpret_cast(byte_buffer); auto pdfs = block->getData>(pdfsID); @@ -1275,83 +1273,83 @@ uint_t PackInfoPdfDoublePrecision::size(stencil::Direction dir, const IBlock *bl CellInterval ci; pdfs->getGhostRegion(dir, ci, 1, false); - uint_t elementsPerCell = 0; + uint_t elementsPerCell = uint_t{0u}; switch (dir) { case stencil::SW: - elementsPerCell = 1; + elementsPerCell = uint_t{1u}; break; case stencil::BW: - elementsPerCell = 1; + elementsPerCell = uint_t{1u}; break; case stencil::W: - elementsPerCell = 5; + elementsPerCell = uint_t{5u}; break; case stencil::TW: - elementsPerCell = 1; + elementsPerCell = uint_t{1u}; break; case stencil::NW: - elementsPerCell = 1; + elementsPerCell = uint_t{1u}; break; case stencil::BS: - elementsPerCell = 1; + elementsPerCell = uint_t{1u}; break; case stencil::S: - elementsPerCell = 5; + elementsPerCell = uint_t{5u}; break; case stencil::TS: - elementsPerCell = 1; + elementsPerCell = uint_t{1u}; break; case stencil::B: - elementsPerCell = 5; + elementsPerCell = uint_t{5u}; break; case stencil::T: - elementsPerCell = 5; + elementsPerCell = uint_t{5u}; break; case stencil::BN: - elementsPerCell = 1; + elementsPerCell = uint_t{1u}; break; case stencil::N: - elementsPerCell = 5; + elementsPerCell = uint_t{5u}; break; case stencil::TN: - elementsPerCell = 1; + elementsPerCell = uint_t{1u}; break; case stencil::SE: - elementsPerCell = 1; + elementsPerCell = uint_t{1u}; break; case stencil::BE: - elementsPerCell = 1; + elementsPerCell = uint_t{1u}; break; case stencil::E: - elementsPerCell = 5; + elementsPerCell = uint_t{5u}; break; case stencil::TE: - elementsPerCell = 1; + elementsPerCell = uint_t{1u}; break; case stencil::NE: - elementsPerCell = 1; + elementsPerCell = uint_t{1u}; break; default: - elementsPerCell = 0; + elementsPerCell = uint_t{0u}; } return ci.numCells() * elementsPerCell * sizeof(double); } diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfDoublePrecision.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfDoublePrecision.h index 6c2b00a8e34..eb71dde8e97 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfDoublePrecision.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfDoublePrecision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "communication/UniformPackInfo.h" @@ -29,6 +29,8 @@ #include "field/GhostLayerField.h" #include "stencil/Directions.h" +#include + #define FUNC_PREFIX #ifdef __GNUC__ @@ -45,20 +47,23 @@ namespace pystencils { class PackInfoPdfDoublePrecision : public ::walberla::communication::UniformPackInfo { public: - PackInfoPdfDoublePrecision(BlockDataID pdfsID_) : pdfsID(pdfsID_){}; - virtual ~PackInfoPdfDoublePrecision() {} + PackInfoPdfDoublePrecision(BlockDataID pdfsID_) : pdfsID(pdfsID_) {} + ~PackInfoPdfDoublePrecision() override = default; - bool constantDataExchange() const { return true; } - bool threadsafeReceiving() const { return true; } + bool constantDataExchange() const override { return true; } + bool threadsafeReceiving() const override { return true; } void unpackData(IBlock *receiver, stencil::Direction dir, - mpi::RecvBuffer &buffer) { + mpi::RecvBuffer &buffer) override { const auto dataSize = size(dir, receiver); - unpack(dir, buffer.skip(dataSize + sizeof(double)), receiver); + auto bufferSize = dataSize + sizeof(double); + auto bufferPtr = reinterpret_cast(buffer.skip(bufferSize)); + std::align(alignof(double), dataSize, bufferPtr, bufferSize); + unpack(dir, reinterpret_cast(bufferPtr), receiver); } void communicateLocal(const IBlock *sender, IBlock *receiver, - stencil::Direction dir) { + stencil::Direction dir) override { mpi::SendBuffer sBuffer; packData(sender, dir, sBuffer); mpi::RecvBuffer rBuffer(sBuffer); @@ -66,9 +71,12 @@ class PackInfoPdfDoublePrecision } void packDataImpl(const IBlock *sender, stencil::Direction dir, - mpi::SendBuffer &outBuffer) const { + mpi::SendBuffer &outBuffer) const override { const auto dataSize = size(dir, sender); - pack(dir, outBuffer.forward(dataSize + sizeof(double)), + auto bufferSize = dataSize + sizeof(double); + auto bufferPtr = reinterpret_cast(outBuffer.forward(bufferSize)); + std::align(alignof(double), dataSize, bufferPtr, bufferSize); + pack(dir, reinterpret_cast(bufferPtr), const_cast(sender)); } diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfDoublePrecisionCUDA.cu b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfDoublePrecisionCUDA.cu index 5636dad6a32..d6f506c0739 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfDoublePrecisionCUDA.cu +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfDoublePrecisionCUDA.cu @@ -17,7 +17,14 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 + +#include "core/DataTypes.h" +#include "core/cell/CellInterval.h" + +#include "domain_decomposition/IBlock.h" + +#include "stencil/Directions.h" #include "core/DataTypes.h" #include "core/cell/CellInterval.h" diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfDoublePrecisionCUDA.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfDoublePrecisionCUDA.h index 256f03be494..e1631230ba4 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfDoublePrecisionCUDA.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfDoublePrecisionCUDA.h @@ -17,14 +17,13 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" -#include "core/cell/CellInterval.h" #include "domain_decomposition/IBlock.h" @@ -40,17 +39,18 @@ namespace pystencils { class PackInfoPdfDoublePrecisionCUDA : public ::walberla::gpu::GeneratedGPUPackInfo { public: - PackInfoPdfDoublePrecisionCUDA(BlockDataID pdfsID_) : pdfsID(pdfsID_){}; - virtual ~PackInfoPdfDoublePrecisionCUDA() {} + PackInfoPdfDoublePrecisionCUDA(BlockDataID pdfsID_) : pdfsID(pdfsID_) {} + ~PackInfoPdfDoublePrecisionCUDA() override = default; void pack(stencil::Direction dir, unsigned char *buffer, IBlock *block, gpuStream_t stream) override; void communicateLocal(stencil::Direction /*dir*/, const IBlock * /* sender */, IBlock * /* receiver */, gpuStream_t /* stream */) override { - WALBERLA_ABORT("Local Communication not implemented yet for standard " - "PackInfos. To run your application turn of local " - "communication in the Communication class") + WALBERLA_ABORT( + "Local Communication not implemented yet for standard PackInfos. To " + "run your application, turn off local communication in the " + "communication class, e.g. with useLocalCommunication=false") } void unpack(stencil::Direction dir, unsigned char *buffer, IBlock *block, gpuStream_t stream) override; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfSinglePrecision.cpp b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfSinglePrecision.cpp index b1ac86db8e2..4ccda000bc9 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfSinglePrecision.cpp +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfSinglePrecision.cpp @@ -17,7 +17,7 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #include "PackInfoPdfSinglePrecision.h" #include "core/DataTypes.h" @@ -519,7 +519,6 @@ static FUNC_PREFIX void unpack_NE(float *RESTRICT const _data_buffer, float *RES } // namespace internal_unpack_NE void PackInfoPdfSinglePrecision::pack(Direction dir, unsigned char *byte_buffer, IBlock *block) const { - byte_buffer += sizeof(float) - (reinterpret_cast(byte_buffer) - (reinterpret_cast(byte_buffer) / sizeof(float)) * sizeof(float)); float *buffer = reinterpret_cast(byte_buffer); auto pdfs = block->getData>(pdfsID); @@ -894,7 +893,6 @@ void PackInfoPdfSinglePrecision::pack(Direction dir, unsigned char *byte_buffer, } void PackInfoPdfSinglePrecision::unpack(Direction dir, unsigned char *byte_buffer, IBlock *block) const { - byte_buffer += sizeof(float) - (reinterpret_cast(byte_buffer) - (reinterpret_cast(byte_buffer) / sizeof(float)) * sizeof(float)); float *buffer = reinterpret_cast(byte_buffer); auto pdfs = block->getData>(pdfsID); @@ -1275,83 +1273,83 @@ uint_t PackInfoPdfSinglePrecision::size(stencil::Direction dir, const IBlock *bl CellInterval ci; pdfs->getGhostRegion(dir, ci, 1, false); - uint_t elementsPerCell = 0; + uint_t elementsPerCell = uint_t{0u}; switch (dir) { case stencil::SW: - elementsPerCell = 1; + elementsPerCell = uint_t{1u}; break; case stencil::BW: - elementsPerCell = 1; + elementsPerCell = uint_t{1u}; break; case stencil::W: - elementsPerCell = 5; + elementsPerCell = uint_t{5u}; break; case stencil::TW: - elementsPerCell = 1; + elementsPerCell = uint_t{1u}; break; case stencil::NW: - elementsPerCell = 1; + elementsPerCell = uint_t{1u}; break; case stencil::BS: - elementsPerCell = 1; + elementsPerCell = uint_t{1u}; break; case stencil::S: - elementsPerCell = 5; + elementsPerCell = uint_t{5u}; break; case stencil::TS: - elementsPerCell = 1; + elementsPerCell = uint_t{1u}; break; case stencil::B: - elementsPerCell = 5; + elementsPerCell = uint_t{5u}; break; case stencil::T: - elementsPerCell = 5; + elementsPerCell = uint_t{5u}; break; case stencil::BN: - elementsPerCell = 1; + elementsPerCell = uint_t{1u}; break; case stencil::N: - elementsPerCell = 5; + elementsPerCell = uint_t{5u}; break; case stencil::TN: - elementsPerCell = 1; + elementsPerCell = uint_t{1u}; break; case stencil::SE: - elementsPerCell = 1; + elementsPerCell = uint_t{1u}; break; case stencil::BE: - elementsPerCell = 1; + elementsPerCell = uint_t{1u}; break; case stencil::E: - elementsPerCell = 5; + elementsPerCell = uint_t{5u}; break; case stencil::TE: - elementsPerCell = 1; + elementsPerCell = uint_t{1u}; break; case stencil::NE: - elementsPerCell = 1; + elementsPerCell = uint_t{1u}; break; default: - elementsPerCell = 0; + elementsPerCell = uint_t{0u}; } return ci.numCells() * elementsPerCell * sizeof(float); } diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfSinglePrecision.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfSinglePrecision.h index 40cb2068903..05db76c7b03 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfSinglePrecision.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfSinglePrecision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "communication/UniformPackInfo.h" @@ -29,6 +29,8 @@ #include "field/GhostLayerField.h" #include "stencil/Directions.h" +#include + #define FUNC_PREFIX #ifdef __GNUC__ @@ -45,20 +47,23 @@ namespace pystencils { class PackInfoPdfSinglePrecision : public ::walberla::communication::UniformPackInfo { public: - PackInfoPdfSinglePrecision(BlockDataID pdfsID_) : pdfsID(pdfsID_){}; - virtual ~PackInfoPdfSinglePrecision() {} + PackInfoPdfSinglePrecision(BlockDataID pdfsID_) : pdfsID(pdfsID_) {} + ~PackInfoPdfSinglePrecision() override = default; - bool constantDataExchange() const { return true; } - bool threadsafeReceiving() const { return true; } + bool constantDataExchange() const override { return true; } + bool threadsafeReceiving() const override { return true; } void unpackData(IBlock *receiver, stencil::Direction dir, - mpi::RecvBuffer &buffer) { + mpi::RecvBuffer &buffer) override { const auto dataSize = size(dir, receiver); - unpack(dir, buffer.skip(dataSize + sizeof(float)), receiver); + auto bufferSize = dataSize + sizeof(float); + auto bufferPtr = reinterpret_cast(buffer.skip(bufferSize)); + std::align(alignof(float), dataSize, bufferPtr, bufferSize); + unpack(dir, reinterpret_cast(bufferPtr), receiver); } void communicateLocal(const IBlock *sender, IBlock *receiver, - stencil::Direction dir) { + stencil::Direction dir) override { mpi::SendBuffer sBuffer; packData(sender, dir, sBuffer); mpi::RecvBuffer rBuffer(sBuffer); @@ -66,9 +71,12 @@ class PackInfoPdfSinglePrecision } void packDataImpl(const IBlock *sender, stencil::Direction dir, - mpi::SendBuffer &outBuffer) const { + mpi::SendBuffer &outBuffer) const override { const auto dataSize = size(dir, sender); - pack(dir, outBuffer.forward(dataSize + sizeof(float)), + auto bufferSize = dataSize + sizeof(float); + auto bufferPtr = reinterpret_cast(outBuffer.forward(bufferSize)); + std::align(alignof(float), dataSize, bufferPtr, bufferSize); + pack(dir, reinterpret_cast(bufferPtr), const_cast(sender)); } diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfSinglePrecisionCUDA.cu b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfSinglePrecisionCUDA.cu index 51b2b40cd92..683669348df 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfSinglePrecisionCUDA.cu +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfSinglePrecisionCUDA.cu @@ -17,7 +17,14 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 + +#include "core/DataTypes.h" +#include "core/cell/CellInterval.h" + +#include "domain_decomposition/IBlock.h" + +#include "stencil/Directions.h" #include "core/DataTypes.h" #include "core/cell/CellInterval.h" diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfSinglePrecisionCUDA.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfSinglePrecisionCUDA.h index c6ee2782b9e..9ad9ad3496e 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfSinglePrecisionCUDA.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoPdfSinglePrecisionCUDA.h @@ -17,14 +17,13 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" -#include "core/cell/CellInterval.h" #include "domain_decomposition/IBlock.h" @@ -40,17 +39,18 @@ namespace pystencils { class PackInfoPdfSinglePrecisionCUDA : public ::walberla::gpu::GeneratedGPUPackInfo { public: - PackInfoPdfSinglePrecisionCUDA(BlockDataID pdfsID_) : pdfsID(pdfsID_){}; - virtual ~PackInfoPdfSinglePrecisionCUDA() {} + PackInfoPdfSinglePrecisionCUDA(BlockDataID pdfsID_) : pdfsID(pdfsID_) {} + ~PackInfoPdfSinglePrecisionCUDA() override = default; void pack(stencil::Direction dir, unsigned char *buffer, IBlock *block, gpuStream_t stream) override; void communicateLocal(stencil::Direction /*dir*/, const IBlock * /* sender */, IBlock * /* receiver */, gpuStream_t /* stream */) override { - WALBERLA_ABORT("Local Communication not implemented yet for standard " - "PackInfos. To run your application turn of local " - "communication in the Communication class") + WALBERLA_ABORT( + "Local Communication not implemented yet for standard PackInfos. To " + "run your application, turn off local communication in the " + "communication class, e.g. with useLocalCommunication=false") } void unpack(stencil::Direction dir, unsigned char *buffer, IBlock *block, gpuStream_t stream) override; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecDoublePrecision.cpp b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecDoublePrecision.cpp index da91325e5e5..ed5f2ace835 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecDoublePrecision.cpp +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecDoublePrecision.cpp @@ -17,7 +17,7 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #include "PackInfoVecDoublePrecision.h" #include "core/DataTypes.h" @@ -67,7 +67,6 @@ static FUNC_PREFIX void unpack_SW_BW_W_TW_NW_BS_S_TS_B_C_T_BN_N_TN_SE_BE_E_TE_NE } // namespace internal_1ccccad4ca561e07a0934cadb07d0fc1 void PackInfoVecDoublePrecision::pack(Direction dir, unsigned char *byte_buffer, IBlock *block) const { - byte_buffer += sizeof(double) - (reinterpret_cast(byte_buffer) - (reinterpret_cast(byte_buffer) / sizeof(double)) * sizeof(double)); double *buffer = reinterpret_cast(byte_buffer); auto field = block->getData>(fieldID); @@ -120,7 +119,6 @@ void PackInfoVecDoublePrecision::pack(Direction dir, unsigned char *byte_buffer, } void PackInfoVecDoublePrecision::unpack(Direction dir, unsigned char *byte_buffer, IBlock *block) const { - byte_buffer += sizeof(double) - (reinterpret_cast(byte_buffer) - (reinterpret_cast(byte_buffer) / sizeof(double)) * sizeof(double)); double *buffer = reinterpret_cast(byte_buffer); auto field = block->getData>(fieldID); @@ -179,7 +177,7 @@ uint_t PackInfoVecDoublePrecision::size(stencil::Direction dir, const IBlock *bl CellInterval ci; field->getGhostRegion(dir, ci, 1, false); - uint_t elementsPerCell = 0; + uint_t elementsPerCell = uint_t{0u}; switch (dir) { case stencil::SW: @@ -201,11 +199,11 @@ uint_t PackInfoVecDoublePrecision::size(stencil::Direction dir, const IBlock *bl case stencil::E: case stencil::TE: case stencil::NE: - elementsPerCell = 3; + elementsPerCell = uint_t{3u}; break; default: - elementsPerCell = 0; + elementsPerCell = uint_t{0u}; } return ci.numCells() * elementsPerCell * sizeof(double); } diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecDoublePrecision.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecDoublePrecision.h index 04452492353..5567216674c 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecDoublePrecision.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecDoublePrecision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "communication/UniformPackInfo.h" @@ -29,6 +29,8 @@ #include "field/GhostLayerField.h" #include "stencil/Directions.h" +#include + #define FUNC_PREFIX #ifdef __GNUC__ @@ -45,20 +47,23 @@ namespace pystencils { class PackInfoVecDoublePrecision : public ::walberla::communication::UniformPackInfo { public: - PackInfoVecDoublePrecision(BlockDataID fieldID_) : fieldID(fieldID_){}; - virtual ~PackInfoVecDoublePrecision() {} + PackInfoVecDoublePrecision(BlockDataID fieldID_) : fieldID(fieldID_) {} + ~PackInfoVecDoublePrecision() override = default; - bool constantDataExchange() const { return true; } - bool threadsafeReceiving() const { return true; } + bool constantDataExchange() const override { return true; } + bool threadsafeReceiving() const override { return true; } void unpackData(IBlock *receiver, stencil::Direction dir, - mpi::RecvBuffer &buffer) { + mpi::RecvBuffer &buffer) override { const auto dataSize = size(dir, receiver); - unpack(dir, buffer.skip(dataSize + sizeof(double)), receiver); + auto bufferSize = dataSize + sizeof(double); + auto bufferPtr = reinterpret_cast(buffer.skip(bufferSize)); + std::align(alignof(double), dataSize, bufferPtr, bufferSize); + unpack(dir, reinterpret_cast(bufferPtr), receiver); } void communicateLocal(const IBlock *sender, IBlock *receiver, - stencil::Direction dir) { + stencil::Direction dir) override { mpi::SendBuffer sBuffer; packData(sender, dir, sBuffer); mpi::RecvBuffer rBuffer(sBuffer); @@ -66,9 +71,12 @@ class PackInfoVecDoublePrecision } void packDataImpl(const IBlock *sender, stencil::Direction dir, - mpi::SendBuffer &outBuffer) const { + mpi::SendBuffer &outBuffer) const override { const auto dataSize = size(dir, sender); - pack(dir, outBuffer.forward(dataSize + sizeof(double)), + auto bufferSize = dataSize + sizeof(double); + auto bufferPtr = reinterpret_cast(outBuffer.forward(bufferSize)); + std::align(alignof(double), dataSize, bufferPtr, bufferSize); + pack(dir, reinterpret_cast(bufferPtr), const_cast(sender)); } diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecDoublePrecisionCUDA.cu b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecDoublePrecisionCUDA.cu index e9bae41971b..d5b09b96d6a 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecDoublePrecisionCUDA.cu +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecDoublePrecisionCUDA.cu @@ -17,7 +17,14 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 + +#include "core/DataTypes.h" +#include "core/cell/CellInterval.h" + +#include "domain_decomposition/IBlock.h" + +#include "stencil/Directions.h" #include "core/DataTypes.h" #include "core/cell/CellInterval.h" diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecDoublePrecisionCUDA.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecDoublePrecisionCUDA.h index 18884f6c9d4..e49b46a755f 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecDoublePrecisionCUDA.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecDoublePrecisionCUDA.h @@ -17,14 +17,13 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" -#include "core/cell/CellInterval.h" #include "domain_decomposition/IBlock.h" @@ -40,17 +39,18 @@ namespace pystencils { class PackInfoVecDoublePrecisionCUDA : public ::walberla::gpu::GeneratedGPUPackInfo { public: - PackInfoVecDoublePrecisionCUDA(BlockDataID fieldID_) : fieldID(fieldID_){}; - virtual ~PackInfoVecDoublePrecisionCUDA() {} + PackInfoVecDoublePrecisionCUDA(BlockDataID fieldID_) : fieldID(fieldID_) {} + ~PackInfoVecDoublePrecisionCUDA() override = default; void pack(stencil::Direction dir, unsigned char *buffer, IBlock *block, gpuStream_t stream) override; void communicateLocal(stencil::Direction /*dir*/, const IBlock * /* sender */, IBlock * /* receiver */, gpuStream_t /* stream */) override { - WALBERLA_ABORT("Local Communication not implemented yet for standard " - "PackInfos. To run your application turn of local " - "communication in the Communication class") + WALBERLA_ABORT( + "Local Communication not implemented yet for standard PackInfos. To " + "run your application, turn off local communication in the " + "communication class, e.g. with useLocalCommunication=false") } void unpack(stencil::Direction dir, unsigned char *buffer, IBlock *block, gpuStream_t stream) override; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecSinglePrecision.cpp b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecSinglePrecision.cpp index c3b718b2d42..9d6fd532703 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecSinglePrecision.cpp +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecSinglePrecision.cpp @@ -17,7 +17,7 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #include "PackInfoVecSinglePrecision.h" #include "core/DataTypes.h" @@ -67,7 +67,6 @@ static FUNC_PREFIX void unpack_SW_BW_W_TW_NW_BS_S_TS_B_C_T_BN_N_TN_SE_BE_E_TE_NE } // namespace internal_1ccccad4ca561e07a0934cadb07d0fc1 void PackInfoVecSinglePrecision::pack(Direction dir, unsigned char *byte_buffer, IBlock *block) const { - byte_buffer += sizeof(float) - (reinterpret_cast(byte_buffer) - (reinterpret_cast(byte_buffer) / sizeof(float)) * sizeof(float)); float *buffer = reinterpret_cast(byte_buffer); auto field = block->getData>(fieldID); @@ -120,7 +119,6 @@ void PackInfoVecSinglePrecision::pack(Direction dir, unsigned char *byte_buffer, } void PackInfoVecSinglePrecision::unpack(Direction dir, unsigned char *byte_buffer, IBlock *block) const { - byte_buffer += sizeof(float) - (reinterpret_cast(byte_buffer) - (reinterpret_cast(byte_buffer) / sizeof(float)) * sizeof(float)); float *buffer = reinterpret_cast(byte_buffer); auto field = block->getData>(fieldID); @@ -179,7 +177,7 @@ uint_t PackInfoVecSinglePrecision::size(stencil::Direction dir, const IBlock *bl CellInterval ci; field->getGhostRegion(dir, ci, 1, false); - uint_t elementsPerCell = 0; + uint_t elementsPerCell = uint_t{0u}; switch (dir) { case stencil::SW: @@ -201,11 +199,11 @@ uint_t PackInfoVecSinglePrecision::size(stencil::Direction dir, const IBlock *bl case stencil::E: case stencil::TE: case stencil::NE: - elementsPerCell = 3; + elementsPerCell = uint_t{3u}; break; default: - elementsPerCell = 0; + elementsPerCell = uint_t{0u}; } return ci.numCells() * elementsPerCell * sizeof(float); } diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecSinglePrecision.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecSinglePrecision.h index 04a360cbedd..e940385b0d6 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecSinglePrecision.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecSinglePrecision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "communication/UniformPackInfo.h" @@ -29,6 +29,8 @@ #include "field/GhostLayerField.h" #include "stencil/Directions.h" +#include + #define FUNC_PREFIX #ifdef __GNUC__ @@ -45,20 +47,23 @@ namespace pystencils { class PackInfoVecSinglePrecision : public ::walberla::communication::UniformPackInfo { public: - PackInfoVecSinglePrecision(BlockDataID fieldID_) : fieldID(fieldID_){}; - virtual ~PackInfoVecSinglePrecision() {} + PackInfoVecSinglePrecision(BlockDataID fieldID_) : fieldID(fieldID_) {} + ~PackInfoVecSinglePrecision() override = default; - bool constantDataExchange() const { return true; } - bool threadsafeReceiving() const { return true; } + bool constantDataExchange() const override { return true; } + bool threadsafeReceiving() const override { return true; } void unpackData(IBlock *receiver, stencil::Direction dir, - mpi::RecvBuffer &buffer) { + mpi::RecvBuffer &buffer) override { const auto dataSize = size(dir, receiver); - unpack(dir, buffer.skip(dataSize + sizeof(float)), receiver); + auto bufferSize = dataSize + sizeof(float); + auto bufferPtr = reinterpret_cast(buffer.skip(bufferSize)); + std::align(alignof(float), dataSize, bufferPtr, bufferSize); + unpack(dir, reinterpret_cast(bufferPtr), receiver); } void communicateLocal(const IBlock *sender, IBlock *receiver, - stencil::Direction dir) { + stencil::Direction dir) override { mpi::SendBuffer sBuffer; packData(sender, dir, sBuffer); mpi::RecvBuffer rBuffer(sBuffer); @@ -66,9 +71,12 @@ class PackInfoVecSinglePrecision } void packDataImpl(const IBlock *sender, stencil::Direction dir, - mpi::SendBuffer &outBuffer) const { + mpi::SendBuffer &outBuffer) const override { const auto dataSize = size(dir, sender); - pack(dir, outBuffer.forward(dataSize + sizeof(float)), + auto bufferSize = dataSize + sizeof(float); + auto bufferPtr = reinterpret_cast(outBuffer.forward(bufferSize)); + std::align(alignof(float), dataSize, bufferPtr, bufferSize); + pack(dir, reinterpret_cast(bufferPtr), const_cast(sender)); } diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecSinglePrecisionCUDA.cu b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecSinglePrecisionCUDA.cu index c38b9e669bb..55ec4aaeb61 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecSinglePrecisionCUDA.cu +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecSinglePrecisionCUDA.cu @@ -17,7 +17,14 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 + +#include "core/DataTypes.h" +#include "core/cell/CellInterval.h" + +#include "domain_decomposition/IBlock.h" + +#include "stencil/Directions.h" #include "core/DataTypes.h" #include "core/cell/CellInterval.h" diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecSinglePrecisionCUDA.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecSinglePrecisionCUDA.h index c1eb6d2be71..d0f85f0dfd4 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecSinglePrecisionCUDA.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/PackInfoVecSinglePrecisionCUDA.h @@ -17,14 +17,13 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" -#include "core/cell/CellInterval.h" #include "domain_decomposition/IBlock.h" @@ -40,17 +39,18 @@ namespace pystencils { class PackInfoVecSinglePrecisionCUDA : public ::walberla::gpu::GeneratedGPUPackInfo { public: - PackInfoVecSinglePrecisionCUDA(BlockDataID fieldID_) : fieldID(fieldID_){}; - virtual ~PackInfoVecSinglePrecisionCUDA() {} + PackInfoVecSinglePrecisionCUDA(BlockDataID fieldID_) : fieldID(fieldID_) {} + ~PackInfoVecSinglePrecisionCUDA() override = default; void pack(stencil::Direction dir, unsigned char *buffer, IBlock *block, gpuStream_t stream) override; void communicateLocal(stencil::Direction /*dir*/, const IBlock * /* sender */, IBlock * /* receiver */, gpuStream_t /* stream */) override { - WALBERLA_ABORT("Local Communication not implemented yet for standard " - "PackInfos. To run your application turn of local " - "communication in the Communication class") + WALBERLA_ABORT( + "Local Communication not implemented yet for standard PackInfos. To " + "run your application, turn off local communication in the " + "communication class, e.g. with useLocalCommunication=false") } void unpack(stencil::Direction dir, unsigned char *buffer, IBlock *block, gpuStream_t stream) override; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepDoublePrecision.cpp b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepDoublePrecision.cpp index 9f6a75e72ce..46b37659290 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepDoublePrecision.cpp +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepDoublePrecision.cpp @@ -17,7 +17,7 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #include @@ -114,13 +114,11 @@ void StreamSweepDoublePrecision::run(IBlock *block) { auto velocity = block->getData>(velocityID); field::GhostLayerField *pdfs_tmp; { - // Getting temporary field pdfs_tmp - auto it = cache_pdfs_.find(pdfs); - if (it != cache_pdfs_.end()) { - pdfs_tmp = *it; - } else { + if (cache_pdfs_.find(block) == cache_pdfs_.end()) { pdfs_tmp = pdfs->cloneUninitialized(); - cache_pdfs_.insert(pdfs_tmp); + cache_pdfs_[block] = pdfs_tmp; + } else { + pdfs_tmp = cache_pdfs_[block]; } } @@ -180,13 +178,11 @@ void StreamSweepDoublePrecision::runOnCellInterval(const shared_ptrgetData>(velocityID); field::GhostLayerField *pdfs_tmp; { - // Getting temporary field pdfs_tmp - auto it = cache_pdfs_.find(pdfs); - if (it != cache_pdfs_.end()) { - pdfs_tmp = *it; - } else { + if (cache_pdfs_.find(block) == cache_pdfs_.end()) { pdfs_tmp = pdfs->cloneUninitialized(); - cache_pdfs_.insert(pdfs_tmp); + cache_pdfs_[block] = pdfs_tmp; + } else { + pdfs_tmp = cache_pdfs_[block]; } } diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepDoublePrecision.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepDoublePrecision.h index 87fa2aa0336..5575db96682 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepDoublePrecision.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepDoublePrecision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -54,11 +56,11 @@ class StreamSweepDoublePrecision { public: StreamSweepDoublePrecision(BlockDataID forceID_, BlockDataID pdfsID_, BlockDataID velocityID_) - : forceID(forceID_), pdfsID(pdfsID_), velocityID(velocityID_){}; + : forceID(forceID_), pdfsID(pdfsID_), velocityID(velocityID_) {} ~StreamSweepDoublePrecision() { for (auto p : cache_pdfs_) { - delete p; + delete p.second; } } @@ -98,16 +100,14 @@ class StreamSweepDoublePrecision { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} +private: BlockDataID forceID; BlockDataID pdfsID; BlockDataID velocityID; - -private: - std::set *, - field::SwapableCompare *>> + std::unordered_map *> cache_pdfs_; }; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepDoublePrecisionAVX.cpp b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepDoublePrecisionAVX.cpp index 8b26558419e..feff455f2e1 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepDoublePrecisionAVX.cpp +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepDoublePrecisionAVX.cpp @@ -17,7 +17,7 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #include @@ -171,13 +171,11 @@ void StreamSweepDoublePrecisionAVX::run(IBlock *block) { auto velocity = block->getData>(velocityID); field::GhostLayerField *pdfs_tmp; { - // Getting temporary field pdfs_tmp - auto it = cache_pdfs_.find(pdfs); - if (it != cache_pdfs_.end()) { - pdfs_tmp = *it; - } else { + if (cache_pdfs_.find(block) == cache_pdfs_.end()) { pdfs_tmp = pdfs->cloneUninitialized(); - cache_pdfs_.insert(pdfs_tmp); + cache_pdfs_[block] = pdfs_tmp; + } else { + pdfs_tmp = cache_pdfs_[block]; } } @@ -240,13 +238,11 @@ void StreamSweepDoublePrecisionAVX::runOnCellInterval(const shared_ptrgetData>(velocityID); field::GhostLayerField *pdfs_tmp; { - // Getting temporary field pdfs_tmp - auto it = cache_pdfs_.find(pdfs); - if (it != cache_pdfs_.end()) { - pdfs_tmp = *it; - } else { + if (cache_pdfs_.find(block) == cache_pdfs_.end()) { pdfs_tmp = pdfs->cloneUninitialized(); - cache_pdfs_.insert(pdfs_tmp); + cache_pdfs_[block] = pdfs_tmp; + } else { + pdfs_tmp = cache_pdfs_[block]; } } diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepDoublePrecisionAVX.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepDoublePrecisionAVX.h index 52288021ad8..0d2cd240a7a 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepDoublePrecisionAVX.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepDoublePrecisionAVX.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -54,11 +56,11 @@ class StreamSweepDoublePrecisionAVX { public: StreamSweepDoublePrecisionAVX(BlockDataID forceID_, BlockDataID pdfsID_, BlockDataID velocityID_) - : forceID(forceID_), pdfsID(pdfsID_), velocityID(velocityID_){}; + : forceID(forceID_), pdfsID(pdfsID_), velocityID(velocityID_) {} ~StreamSweepDoublePrecisionAVX() { for (auto p : cache_pdfs_) { - delete p; + delete p.second; } } @@ -97,16 +99,14 @@ class StreamSweepDoublePrecisionAVX { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} +private: BlockDataID forceID; BlockDataID pdfsID; BlockDataID velocityID; - -private: - std::set *, - field::SwapableCompare *>> + std::unordered_map *> cache_pdfs_; }; diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepDoublePrecisionCUDA.cu b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepDoublePrecisionCUDA.cu index c0351452f9c..467ca357df3 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepDoublePrecisionCUDA.cu +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepDoublePrecisionCUDA.cu @@ -17,7 +17,7 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #include @@ -113,13 +113,11 @@ void StreamSweepDoublePrecisionCUDA::run(IBlock *block, gpuStream_t stream) { auto pdfs = block->getData>(pdfsID); gpu::GPUField *pdfs_tmp; { - // Getting temporary field pdfs_tmp - auto it = cache_pdfs_.find(pdfs); - if (it != cache_pdfs_.end()) { - pdfs_tmp = *it; - } else { + if (cache_pdfs_.find(block) == cache_pdfs_.end()) { pdfs_tmp = pdfs->cloneUninitialized(); - cache_pdfs_.insert(pdfs_tmp); + cache_pdfs_[block] = pdfs_tmp; + } else { + pdfs_tmp = cache_pdfs_[block]; } } @@ -181,13 +179,11 @@ void StreamSweepDoublePrecisionCUDA::runOnCellInterval(const shared_ptrgetData>(pdfsID); gpu::GPUField *pdfs_tmp; { - // Getting temporary field pdfs_tmp - auto it = cache_pdfs_.find(pdfs); - if (it != cache_pdfs_.end()) { - pdfs_tmp = *it; - } else { + if (cache_pdfs_.find(block) == cache_pdfs_.end()) { pdfs_tmp = pdfs->cloneUninitialized(); - cache_pdfs_.insert(pdfs_tmp); + cache_pdfs_[block] = pdfs_tmp; + } else { + pdfs_tmp = cache_pdfs_[block]; } } diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepDoublePrecisionCUDA.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepDoublePrecisionCUDA.h index 217f90854e2..832abfe5873 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepDoublePrecisionCUDA.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepDoublePrecisionCUDA.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -32,7 +32,9 @@ #include "domain_decomposition/IBlock.h" #include "domain_decomposition/StructuredBlockStorage.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -56,11 +58,11 @@ class StreamSweepDoublePrecisionCUDA { public: StreamSweepDoublePrecisionCUDA(BlockDataID forceID_, BlockDataID pdfsID_, BlockDataID velocityID_) - : forceID(forceID_), pdfsID(pdfsID_), velocityID(velocityID_){}; + : forceID(forceID_), pdfsID(pdfsID_), velocityID(velocityID_) {} ~StreamSweepDoublePrecisionCUDA() { for (auto p : cache_pdfs_) { - delete p; + delete p.second; } } @@ -106,17 +108,14 @@ class StreamSweepDoublePrecisionCUDA { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} +private: BlockDataID forceID; BlockDataID pdfsID; BlockDataID velocityID; - -private: - std::set *, - field::SwapableCompare *>> - cache_pdfs_; + std::unordered_map *> cache_pdfs_; }; } // namespace pystencils diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepSinglePrecision.cpp b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepSinglePrecision.cpp index 7a72d3fc836..d5606474ef6 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepSinglePrecision.cpp +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepSinglePrecision.cpp @@ -17,7 +17,7 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #include @@ -114,13 +114,11 @@ void StreamSweepSinglePrecision::run(IBlock *block) { auto force = block->getData>(forceID); field::GhostLayerField *pdfs_tmp; { - // Getting temporary field pdfs_tmp - auto it = cache_pdfs_.find(pdfs); - if (it != cache_pdfs_.end()) { - pdfs_tmp = *it; - } else { + if (cache_pdfs_.find(block) == cache_pdfs_.end()) { pdfs_tmp = pdfs->cloneUninitialized(); - cache_pdfs_.insert(pdfs_tmp); + cache_pdfs_[block] = pdfs_tmp; + } else { + pdfs_tmp = cache_pdfs_[block]; } } @@ -180,13 +178,11 @@ void StreamSweepSinglePrecision::runOnCellInterval(const shared_ptrgetData>(forceID); field::GhostLayerField *pdfs_tmp; { - // Getting temporary field pdfs_tmp - auto it = cache_pdfs_.find(pdfs); - if (it != cache_pdfs_.end()) { - pdfs_tmp = *it; - } else { + if (cache_pdfs_.find(block) == cache_pdfs_.end()) { pdfs_tmp = pdfs->cloneUninitialized(); - cache_pdfs_.insert(pdfs_tmp); + cache_pdfs_[block] = pdfs_tmp; + } else { + pdfs_tmp = cache_pdfs_[block]; } } diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepSinglePrecision.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepSinglePrecision.h index 4425265fc6c..05167db6c04 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepSinglePrecision.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepSinglePrecision.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -54,11 +56,11 @@ class StreamSweepSinglePrecision { public: StreamSweepSinglePrecision(BlockDataID forceID_, BlockDataID pdfsID_, BlockDataID velocityID_) - : forceID(forceID_), pdfsID(pdfsID_), velocityID(velocityID_){}; + : forceID(forceID_), pdfsID(pdfsID_), velocityID(velocityID_) {} ~StreamSweepSinglePrecision() { for (auto p : cache_pdfs_) { - delete p; + delete p.second; } } @@ -98,17 +100,14 @@ class StreamSweepSinglePrecision { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} +private: BlockDataID forceID; BlockDataID pdfsID; BlockDataID velocityID; - -private: - std::set *, - field::SwapableCompare *>> - cache_pdfs_; + std::unordered_map *> cache_pdfs_; }; } // namespace pystencils diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepSinglePrecisionAVX.cpp b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepSinglePrecisionAVX.cpp index cd7cc6d231f..aeb42036ee8 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepSinglePrecisionAVX.cpp +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepSinglePrecisionAVX.cpp @@ -17,7 +17,7 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #include @@ -171,13 +171,11 @@ void StreamSweepSinglePrecisionAVX::run(IBlock *block) { auto force = block->getData>(forceID); field::GhostLayerField *pdfs_tmp; { - // Getting temporary field pdfs_tmp - auto it = cache_pdfs_.find(pdfs); - if (it != cache_pdfs_.end()) { - pdfs_tmp = *it; - } else { + if (cache_pdfs_.find(block) == cache_pdfs_.end()) { pdfs_tmp = pdfs->cloneUninitialized(); - cache_pdfs_.insert(pdfs_tmp); + cache_pdfs_[block] = pdfs_tmp; + } else { + pdfs_tmp = cache_pdfs_[block]; } } @@ -240,13 +238,11 @@ void StreamSweepSinglePrecisionAVX::runOnCellInterval(const shared_ptrgetData>(forceID); field::GhostLayerField *pdfs_tmp; { - // Getting temporary field pdfs_tmp - auto it = cache_pdfs_.find(pdfs); - if (it != cache_pdfs_.end()) { - pdfs_tmp = *it; - } else { + if (cache_pdfs_.find(block) == cache_pdfs_.end()) { pdfs_tmp = pdfs->cloneUninitialized(); - cache_pdfs_.insert(pdfs_tmp); + cache_pdfs_[block] = pdfs_tmp; + } else { + pdfs_tmp = cache_pdfs_[block]; } } diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepSinglePrecisionAVX.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepSinglePrecisionAVX.h index 095c86c6cb9..7f50626ea4e 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepSinglePrecisionAVX.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepSinglePrecisionAVX.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -30,7 +30,9 @@ #include "domain_decomposition/StructuredBlockStorage.h" #include "field/GhostLayerField.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -54,11 +56,11 @@ class StreamSweepSinglePrecisionAVX { public: StreamSweepSinglePrecisionAVX(BlockDataID forceID_, BlockDataID pdfsID_, BlockDataID velocityID_) - : forceID(forceID_), pdfsID(pdfsID_), velocityID(velocityID_){}; + : forceID(forceID_), pdfsID(pdfsID_), velocityID(velocityID_) {} ~StreamSweepSinglePrecisionAVX() { for (auto p : cache_pdfs_) { - delete p; + delete p.second; } } @@ -97,17 +99,14 @@ class StreamSweepSinglePrecisionAVX { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} +private: BlockDataID forceID; BlockDataID pdfsID; BlockDataID velocityID; - -private: - std::set *, - field::SwapableCompare *>> - cache_pdfs_; + std::unordered_map *> cache_pdfs_; }; } // namespace pystencils diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepSinglePrecisionCUDA.cu b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepSinglePrecisionCUDA.cu index f16ecffca6c..b9fffa53fc5 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepSinglePrecisionCUDA.cu +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepSinglePrecisionCUDA.cu @@ -17,7 +17,7 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #include @@ -113,13 +113,11 @@ void StreamSweepSinglePrecisionCUDA::run(IBlock *block, gpuStream_t stream) { auto force = block->getData>(forceID); gpu::GPUField *pdfs_tmp; { - // Getting temporary field pdfs_tmp - auto it = cache_pdfs_.find(pdfs); - if (it != cache_pdfs_.end()) { - pdfs_tmp = *it; - } else { + if (cache_pdfs_.find(block) == cache_pdfs_.end()) { pdfs_tmp = pdfs->cloneUninitialized(); - cache_pdfs_.insert(pdfs_tmp); + cache_pdfs_[block] = pdfs_tmp; + } else { + pdfs_tmp = cache_pdfs_[block]; } } @@ -181,13 +179,11 @@ void StreamSweepSinglePrecisionCUDA::runOnCellInterval(const shared_ptrgetData>(forceID); gpu::GPUField *pdfs_tmp; { - // Getting temporary field pdfs_tmp - auto it = cache_pdfs_.find(pdfs); - if (it != cache_pdfs_.end()) { - pdfs_tmp = *it; - } else { + if (cache_pdfs_.find(block) == cache_pdfs_.end()) { pdfs_tmp = pdfs->cloneUninitialized(); - cache_pdfs_.insert(pdfs_tmp); + cache_pdfs_[block] = pdfs_tmp; + } else { + pdfs_tmp = cache_pdfs_[block]; } } diff --git a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepSinglePrecisionCUDA.h b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepSinglePrecisionCUDA.h index 302b62816b7..337eafba30c 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepSinglePrecisionCUDA.h +++ b/src/walberla_bridge/src/lattice_boltzmann/generated_kernels/StreamSweepSinglePrecisionCUDA.h @@ -17,9 +17,9 @@ //! \\author pystencils //====================================================================================================================== -// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, +// kernel generated with pystencils v1.3.7, lbmpy v1.3.7, sympy v1.12.1, // lbmpy_walberla/pystencils_walberla from waLBerla commit -// b0842e1a493ce19ef1bbb8d2cf382fc343970a7f +// f36fa0a68bae59f0b516f6587ea8fa7c24a41141 #pragma once #include "core/DataTypes.h" @@ -32,7 +32,9 @@ #include "domain_decomposition/IBlock.h" #include "domain_decomposition/StructuredBlockStorage.h" #include "field/SwapableCompare.h" -#include + +#include +#include #ifdef __GNUC__ #define RESTRICT __restrict__ @@ -56,11 +58,11 @@ class StreamSweepSinglePrecisionCUDA { public: StreamSweepSinglePrecisionCUDA(BlockDataID forceID_, BlockDataID pdfsID_, BlockDataID velocityID_) - : forceID(forceID_), pdfsID(pdfsID_), velocityID(velocityID_){}; + : forceID(forceID_), pdfsID(pdfsID_), velocityID(velocityID_) {} ~StreamSweepSinglePrecisionCUDA() { for (auto p : cache_pdfs_) { - delete p; + delete p.second; } } @@ -106,17 +108,14 @@ class StreamSweepSinglePrecisionCUDA { }; } - void configure(const shared_ptr &blocks, - IBlock *block) {} + void configure(const shared_ptr & /*blocks*/, + IBlock * /*block*/) {} +private: BlockDataID forceID; BlockDataID pdfsID; BlockDataID velocityID; - -private: - std::set *, - field::SwapableCompare *>> - cache_pdfs_; + std::unordered_map *> cache_pdfs_; }; } // namespace pystencils diff --git a/src/walberla_bridge/src/lattice_boltzmann/lb_kernels.cuh b/src/walberla_bridge/src/lattice_boltzmann/lb_kernels.cuh index a71202df382..91ca6e887ef 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/lb_kernels.cuh +++ b/src/walberla_bridge/src/lattice_boltzmann/lb_kernels.cuh @@ -23,8 +23,8 @@ #include "lb_kernels.hpp" -#include "generated_kernels/Dynamic_UBB_double_precisionCUDA.h" -#include "generated_kernels/Dynamic_UBB_single_precisionCUDA.h" +#include "generated_kernels/DynamicUBBDoublePrecisionCUDA.h" +#include "generated_kernels/DynamicUBBSinglePrecisionCUDA.h" #include "generated_kernels/FieldAccessorsDoublePrecisionCUDA.cuh" #include "generated_kernels/FieldAccessorsSinglePrecisionCUDA.cuh" #include "generated_kernels/InitialPDFsSetterDoublePrecisionCUDA.h" @@ -69,11 +69,11 @@ template <> struct KernelTrait { }; template <> struct BoundaryHandlingTrait { - using Dynamic_UBB = lbm::Dynamic_UBB_double_precisionCUDA; + using DynamicUBB = lbm::DynamicUBBDoublePrecisionCUDA; }; template <> struct BoundaryHandlingTrait { - using Dynamic_UBB = lbm::Dynamic_UBB_single_precisionCUDA; + using DynamicUBB = lbm::DynamicUBBSinglePrecisionCUDA; }; } // namespace detail diff --git a/src/walberla_bridge/src/lattice_boltzmann/lb_kernels.hpp b/src/walberla_bridge/src/lattice_boltzmann/lb_kernels.hpp index c6df7eb3ce4..160fb9087eb 100644 --- a/src/walberla_bridge/src/lattice_boltzmann/lb_kernels.hpp +++ b/src/walberla_bridge/src/lattice_boltzmann/lb_kernels.hpp @@ -21,8 +21,8 @@ #include -#include "generated_kernels/Dynamic_UBB_double_precision.h" -#include "generated_kernels/Dynamic_UBB_single_precision.h" +#include "generated_kernels/DynamicUBBDoublePrecision.h" +#include "generated_kernels/DynamicUBBSinglePrecision.h" #include "generated_kernels/FieldAccessorsDoublePrecision.h" #include "generated_kernels/FieldAccessorsSinglePrecision.h" #include "generated_kernels/InitialPDFsSetterDoublePrecision.h" @@ -93,11 +93,11 @@ template <> struct KernelTrait { template struct BoundaryHandlingTrait { - using Dynamic_UBB = lbm::Dynamic_UBB_double_precision; + using DynamicUBB = lbm::DynamicUBBDoublePrecision; }; template <> struct BoundaryHandlingTrait { - using Dynamic_UBB = lbm::Dynamic_UBB_single_precision; + using DynamicUBB = lbm::DynamicUBBSinglePrecision; }; } // namespace detail diff --git a/src/walberla_bridge/src/utils/boundary.hpp b/src/walberla_bridge/src/utils/boundary.hpp index 719c028aa43..37d8195e4a2 100644 --- a/src/walberla_bridge/src/utils/boundary.hpp +++ b/src/walberla_bridge/src/utils/boundary.hpp @@ -49,7 +49,7 @@ fill_3D_vector_array(std::vector const &vec_flat, } else { output_vector.reserve(n_grid_points); for (auto it = vec_begin; it < vec_end; it += 3u) { - output_vector.emplace_back(Utils::Vector3d(it, it + 3u)); + output_vector.emplace_back(it, it + 3u); } } diff --git a/src/walberla_bridge/src/utils/types_conversion.hpp b/src/walberla_bridge/src/utils/types_conversion.hpp index 6f196cb57aa..456a76011eb 100644 --- a/src/walberla_bridge/src/utils/types_conversion.hpp +++ b/src/walberla_bridge/src/utils/types_conversion.hpp @@ -39,34 +39,27 @@ template <> inline Vector3 es2walberla(Utils::Vector3d const v) { return Vector3{v[0], v[1], v[2]}; } -template inline T walberla2es(T v) { return v; } -inline Utils::Vector3d walberla2es(Vector3 const v) { - return Utils::Vector3d{double_c(v[0]), double_c(v[1]), double_c(v[2])}; -} -inline Utils::Vector3d walberla2es(Vector3 const v) { - return Utils::Vector3d{v[0], v[1], v[2]}; +template auto to_vector3d(Vector3 const &v) noexcept { + return Utils::Vector3d{Utils::detail::carray_alias{ + double_c(v[0]), double_c(v[1]), double_c(v[2])}}; } -// Vector conversion helpers -inline Utils::Vector3d to_vector3d(Vector3 const &v) { - return {double_c(v[0]), double_c(v[1]), double_c(v[2])}; -} -inline Utils::Vector3d to_vector3d(Vector3 const &v) { - return {v[0], v[1], v[2]}; -} -template -inline Vector3 to_vector3(Utils::Vector3d const &v) { - return Vector3{numeric_cast(v[0]), - numeric_cast(v[1]), - numeric_cast(v[2])}; +template auto to_vector3(Utils::Vector3d const &v) noexcept { + return Vector3{numeric_cast(v[0]), numeric_cast(v[1]), + numeric_cast(v[2])}; } -inline Utils::VectorXd<9> to_vector9d(Matrix3 const &m) { - return {m[0], m[1], m[2], m[3], m[4], m[5], m[6], m[7], m[8]}; + +template auto to_vector9d(Matrix3 const &m) noexcept { + return Utils::VectorXd<9>{Utils::detail::carray_alias{ + double_c(m[0]), double_c(m[1]), double_c(m[2]), double_c(m[3]), + double_c(m[4]), double_c(m[5]), double_c(m[6]), double_c(m[7]), + double_c(m[8])}}; } -inline Utils::VectorXd<9> to_vector9d(Matrix3 const &m) { - return {double_c(m[0]), double_c(m[1]), double_c(m[2]), - double_c(m[3]), double_c(m[4]), double_c(m[5]), - double_c(m[6]), double_c(m[7]), double_c(m[8])}; + +template auto walberla2es(T v) noexcept { return v; } + +template auto walberla2es(Vector3 const &v) noexcept { + return to_vector3d(v); } template diff --git a/src/walberla_bridge/tests/CMakeLists.txt b/src/walberla_bridge/tests/CMakeLists.txt index 7b3a85ab1b9..06c7e55e9b9 100644 --- a/src/walberla_bridge/tests/CMakeLists.txt +++ b/src/walberla_bridge/tests/CMakeLists.txt @@ -31,10 +31,17 @@ function(ESPRESSO_ADD_TEST) endif() if(${TEST_SRC} MATCHES ".*\.cu$") target_link_libraries(${TEST_NAME} PRIVATE espresso::walberla::cuda_flags) + if(ESPRESSO_BUILD_WITH_CLANG_TIDY) + set_target_properties( + ${TEST_NAME} PROPERTIES CUDA_CLANG_TIDY "${WALBERLA_CUDA_CLANG_TIDY}") + endif() else() target_link_libraries(${TEST_NAME} PRIVATE espresso::walberla::cpp_flags) + if(ESPRESSO_BUILD_WITH_CLANG_TIDY) + set_target_properties( + ${TEST_NAME} PROPERTIES CXX_CLANG_TIDY "${WALBERLA_CXX_CLANG_TIDY}") + endif() endif() - set_target_properties(${TEST_NAME} PROPERTIES CXX_CLANG_TIDY "") target_include_directories(${TEST_NAME} PRIVATE ${WALBERLA_INCLUDE_DIRS} ${walberla_BINARY_DIR}/src) target_link_libraries(${TEST_NAME} PRIVATE ${WALBERLA_LIBS}) diff --git a/src/walberla_bridge/tests/LBWalberlaImpl_bspline_tests.cpp b/src/walberla_bridge/tests/LBWalberlaImpl_bspline_tests.cpp index a0123cbe67e..8e842305508 100644 --- a/src/walberla_bridge/tests/LBWalberlaImpl_bspline_tests.cpp +++ b/src/walberla_bridge/tests/LBWalberlaImpl_bspline_tests.cpp @@ -119,9 +119,12 @@ BOOST_DATA_TEST_CASE(velocity_interpolation_bspline, bdata::make(all_lbs()), lb->ghost_communication(); - for (double x = 0.0; x < params.box_dimensions[0]; x += 0.3) { - for (double y = 0.1; y < params.box_dimensions[1]; y += 0.3) { - for (double z = 0.2; z < params.box_dimensions[2]; z += 0.3) { + auto x = 0.0; + while (x < params.box_dimensions[0]) { + auto y = 0.1; + while (y < params.box_dimensions[1]) { + auto z = 0.2; + while (z < params.box_dimensions[2]) { Vector3d const pos{x, y, z}; if (lb->get_lattice().pos_in_local_domain(pos)) { auto const factor = std::accumulate( @@ -133,8 +136,11 @@ BOOST_DATA_TEST_CASE(velocity_interpolation_bspline, bdata::make(all_lbs()), BOOST_CHECK(res); // locally available BOOST_CHECK_SMALL((*res - ref).norm(), 1E-10); } + z += 0.3; } + y += 0.3; } + x += 0.3; } } diff --git a/src/walberla_bridge/tests/LBWalberlaImpl_lees_edwards_tests.cpp b/src/walberla_bridge/tests/LBWalberlaImpl_lees_edwards_tests.cpp index 8e66ed037ec..fa0289c9eef 100644 --- a/src/walberla_bridge/tests/LBWalberlaImpl_lees_edwards_tests.cpp +++ b/src/walberla_bridge/tests/LBWalberlaImpl_lees_edwards_tests.cpp @@ -45,7 +45,6 @@ #include #include #include -#include #include #include diff --git a/src/walberla_bridge/tests/lb_kernels_unit_tests.cpp b/src/walberla_bridge/tests/lb_kernels_unit_tests.cpp index f45cfb542fe..123916ca09f 100644 --- a/src/walberla_bridge/tests/lb_kernels_unit_tests.cpp +++ b/src/walberla_bridge/tests/lb_kernels_unit_tests.cpp @@ -21,44 +21,20 @@ #include -#include "../src/lattice_boltzmann/generated_kernels/Dynamic_UBB_double_precision.h" -#include "../src/lattice_boltzmann/generated_kernels/Dynamic_UBB_single_precision.h" -#include "../src/lattice_boltzmann/generated_kernels/FieldAccessorsDoublePrecision.h" -#include "../src/lattice_boltzmann/generated_kernels/FieldAccessorsSinglePrecision.h" +#include "../src/lattice_boltzmann/lb_kernels.hpp" #include "../src/utils/types_conversion.hpp" +#include + #include #include #include -bool operator!=( - walberla::lbm::Dynamic_UBB_single_precision::IndexInfo const &lhs, - walberla::lbm::Dynamic_UBB_single_precision::IndexInfo const &rhs) { - return not(lhs == rhs); -} - -bool operator!=( - walberla::lbm::Dynamic_UBB_double_precision::IndexInfo const &lhs, - walberla::lbm::Dynamic_UBB_double_precision::IndexInfo const &rhs) { - return not(lhs == rhs); -} - -bool operator!=( - walberla::lbm::Dynamic_UBB_single_precision::IndexVectors const &lhs, - walberla::lbm::Dynamic_UBB_single_precision::IndexVectors const &rhs) { - return not(lhs == rhs); -} - -bool operator!=( - walberla::lbm::Dynamic_UBB_double_precision::IndexVectors const &lhs, - walberla::lbm::Dynamic_UBB_double_precision::IndexVectors const &rhs) { - return not(lhs == rhs); -} - BOOST_AUTO_TEST_CASE(dynamic_ubb) { - using Dynamic_UBB_f = walberla::lbm::Dynamic_UBB_single_precision; - using Dynamic_UBB_d = walberla::lbm::Dynamic_UBB_double_precision; + using namespace walberla::detail; + using Dynamic_UBB_f = BoundaryHandlingTrait::DynamicUBB; + using Dynamic_UBB_d = BoundaryHandlingTrait::DynamicUBB; // check IndexInfo auto vel1_f = Dynamic_UBB_f::IndexInfo(1, 2, 3, 0); diff --git a/src/walberla_bridge/tests/tests_common_ek.hpp b/src/walberla_bridge/tests/tests_common_ek.hpp index 7fc0de133d2..1230d458267 100644 --- a/src/walberla_bridge/tests/tests_common_ek.hpp +++ b/src/walberla_bridge/tests/tests_common_ek.hpp @@ -58,7 +58,7 @@ inline EkGeneratorVector unthermalized_eks() { using EKImplementation = walberla::EKinWalberlaImpl<>; EkGeneratorVector eks; - eks.push_back([](EKTestParameters const ¶ms) { + eks.emplace_back([](EKTestParameters const ¶ms) { auto ptr = std::make_shared( params.lattice, params.diffusion, 0., params.valency, params.ext_efield, params.density, params.advection, params.friction_coupling, false, 0u); @@ -72,7 +72,7 @@ inline EkGeneratorVector thermalized_eks() { using EKImplementation = walberla::EKinWalberlaImpl<>; EkGeneratorVector eks; - eks.push_back([](EKTestParameters const ¶ms) { + eks.emplace_back([](EKTestParameters const ¶ms) { auto ptr = std::make_shared( params.lattice, params.diffusion, params.kT, params.valency, params.ext_efield, params.density, params.advection, diff --git a/src/walberla_bridge/tests/tests_common_lb.hpp b/src/walberla_bridge/tests/tests_common_lb.hpp index 675e6173ea7..ad8be18e0ab 100644 --- a/src/walberla_bridge/tests/tests_common_lb.hpp +++ b/src/walberla_bridge/tests/tests_common_lb.hpp @@ -56,7 +56,7 @@ inline LbGeneratorVector unthermalized_lbs() { LbGeneratorVector lbs; // Unthermalized D3Q19 MRT - lbs.push_back([](LBTestParameters const ¶ms) { + lbs.emplace_back([](LBTestParameters const ¶ms) { auto ptr = std::make_shared( params.lattice, params.viscosity, params.density); ptr->set_collision_model(0.0, params.seed); @@ -71,7 +71,7 @@ inline LbGeneratorVector thermalized_lbs() { LbGeneratorVector lbs; // Thermalized D3Q19 MRT - lbs.push_back([](LBTestParameters const ¶ms) { + lbs.emplace_back([](LBTestParameters const ¶ms) { auto ptr = std::make_shared( params.lattice, params.viscosity, params.density); ptr->set_collision_model(params.kT, params.seed); diff --git a/testsuite/python/constraint_homogeneous_magnetic_field.py b/testsuite/python/constraint_homogeneous_magnetic_field.py index 2d4d1773ffb..a45799dbdf7 100644 --- a/testsuite/python/constraint_homogeneous_magnetic_field.py +++ b/testsuite/python/constraint_homogeneous_magnetic_field.py @@ -72,28 +72,23 @@ def test_add_energy_and_forces(self): # check dipolar energy when adding dipole moments p0 = self.system.part.add( pos=[0, 0, 0], dip=dip_mom0, rotation=(True, True, True)) - self.assertEqual(self.system.analysis.energy()["dipolar"], - -1.0 * np.dot(H_field, dip_mom0)) + self.assertAlmostEqual(self.system.analysis.energy()["dipolar"], + -np.dot(H_field, dip_mom0), delta=1e-7) p1 = self.system.part.add( pos=[1, 1, 1], dip=dip_mom1, rotation=(True, True, True)) - self.assertEqual(self.system.analysis.energy()["dipolar"], - -(np.dot(H_field, dip_mom0) + - np.dot(H_field, dip_mom1))) - - if espressomd.has_features(["ROTATION"]): - # check that running the integrator leads to expected torques - self.system.integrator.run(0) - torque_expected0 = np.cross(dip_mom0, H_field) - torque_expected1 = np.cross(dip_mom1, H_field) - for i in range(3): - self.assertAlmostEqual( - p0.torque_lab[i], - torque_expected0[i], - places=10) - self.assertAlmostEqual( - p1.torque_lab[i], - torque_expected1[i], - places=10) + self.assertAlmostEqual(self.system.analysis.energy()["dipolar"], + -(np.dot(H_field, dip_mom0) + + np.dot(H_field, dip_mom1)), + delta=1e-7) + + # check that running the integrator leads to expected torques + self.system.integrator.run(0, recalc_forces=True) + torque_expected0 = np.cross(dip_mom0, H_field) + torque_expected1 = np.cross(dip_mom1, H_field) + np.testing.assert_allclose(np.copy(p0.torque_lab), torque_expected0, + atol=1e-12, rtol=1e-10) + np.testing.assert_allclose(np.copy(p1.torque_lab), torque_expected1, + atol=1e-12, rtol=1e-10) if __name__ == "__main__": diff --git a/testsuite/python/ibm.py b/testsuite/python/ibm.py index e160a976d7e..887adba31e0 100644 --- a/testsuite/python/ibm.py +++ b/testsuite/python/ibm.py @@ -279,7 +279,8 @@ def test_triel_checkpointing(self): triel_unpickled = pickle.loads(pickle.dumps(triel_original)) for triel in [triel_original, triel_unpickled]: self.assertFalse(triel.is_initialized) - np.testing.assert_allclose(np.copy(triel._cache), 0.) + np.testing.assert_allclose(np.copy(triel._cache), 0., atol=1e-12, + rtol=0.) self.assertEqual(triel.ind1, p1.id) self.assertEqual(triel.ind2, p2.id) self.assertEqual(triel.ind3, p3.id) @@ -292,7 +293,8 @@ def test_triel_checkpointing(self): triel_skip_init = pickle.loads(pickle.dumps(triel_original)) for triel in [triel_original, triel_unpickled, triel_skip_init]: self.assertTrue(triel.is_initialized) - np.testing.assert_allclose(np.copy(triel._cache), cache) + np.testing.assert_allclose(np.copy(triel._cache), cache, + atol=1e-12, rtol=1e-7) self.assertEqual(triel.ind1, p1.id) self.assertEqual(triel.ind2, p2.id) self.assertEqual(triel.ind3, p3.id) diff --git a/testsuite/python/interactions_bonded_interface.py b/testsuite/python/interactions_bonded_interface.py index 38c16218d83..7361707265b 100644 --- a/testsuite/python/interactions_bonded_interface.py +++ b/testsuite/python/interactions_bonded_interface.py @@ -30,7 +30,7 @@ class BondedInteractions(ut.TestCase): system = espressomd.System(box_l=[20.0, 20.0, 20.0]) def setUp(self): - self.system.part.add(pos=4 * [[0, 0, 0]]) + self.system.part.add(pos=[[i, (i + 1) % 2, 0] for i in range(4)]) def tearDown(self): self.system.part.clear() @@ -142,7 +142,7 @@ def func(self): 0, espressomd.interactions.IBM_Tribend, {"ind1": 0, "ind2": 1, "ind3": 2, "ind4": 3, "kb": 1.1, "refShape": "Initial"}, - {"kb": 1.1, "theta0": 0.0}) + {"kb": 1.1, "theta0": np.pi}) test_ibm_tribend_flat = generateTestForBondParams( 0, espressomd.interactions.IBM_Tribend, {"ind1": 0, "ind2": 1, "ind3": 2, "ind4": 3,