diff --git a/.github/workflows/idefix-ci-doc.yml b/.github/workflows/idefix-ci-doc.yml new file mode 100644 index 00000000..72b5dd0b --- /dev/null +++ b/.github/workflows/idefix-ci-doc.yml @@ -0,0 +1,24 @@ +name: Idefix CIs +on: + workflow_dispatch: + push: + branches: + - master + - develop + pull_request: + paths-ignore: + - '.github/ISSUE_TEMPLATE/*' + + +jobs: + ReadTheDocs: + runs-on: ubuntu-latest + steps: + - name: Check out repo + uses: actions/checkout@v3 + - name: install doxygen + run: sudo apt-get install -y doxygen + - name: install python dependencies + run: python -m pip install --exists-action=w --no-cache-dir -r doc/python_requirements.txt + - name: compile documentation + run: python -m sphinx -T -b html -d _build/doctrees -D language=en doc/source doc/html diff --git a/.github/workflows/idefix-ci-jobs.yml b/.github/workflows/idefix-ci-jobs.yml new file mode 100644 index 00000000..c0e62296 --- /dev/null +++ b/.github/workflows/idefix-ci-jobs.yml @@ -0,0 +1,203 @@ +on: + workflow_call: + inputs: + TESTME_OPTIONS: + required: true + type: string + IDEFIX_COMPILER: + required: true + type: string + +# concurrency: +# # auto-cancel any concurrent job *in the same context* +# # see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency +# # see https://docs.github.com/en/actions/learn-github-actions/contexts#github-context +# group: ${{ github.workflow }}-${{ github.ref }} +# cancel-in-progress: true + +env: + IDEFIX_COMPILER: ${{ inputs.IDEFIX_COMPILER }} + TESTME_OPTIONS: ${{ inputs.TESTME_OPTIONS }} + PYTHONPATH: ${{ github.workspace }} + IDEFIX_DIR: ${{ github.workspace }} + +jobs: + ShocksHydro: + runs-on: self-hosted + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Sod test + run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/sod -all $TESTME_OPTIONS + - name: Isothermal Sod test + run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/sod-iso -all $TESTME_OPTIONS + - name: Mach reflection test + run: scripts/ci/run-tests $IDEFIX_DIR/test/HD//MachReflection -all $TESTME_OPTIONS + + ParabolicHydro: + runs-on: self-hosted + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Viscous flow past cylinder + run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/ViscousFlowPastCylinder -all $TESTME_OPTIONS + - name: Viscous disk + run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/ViscousDisk -all $TESTME_OPTIONS + - name: Thermal diffusion + run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/thermalDiffusion -all $TESTME_OPTIONS + + ShocksMHD: + runs-on: self-hosted + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: MHD Sod test + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/sod -all $TESTME_OPTIONS + - name: MHD Isothermal Sod test + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/sod-iso -all $TESTME_OPTIONS + - name: Orszag Tang + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/OrszagTang -all $TESTME_OPTIONS + - name: Orszag Tang 3D+restart tests + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/OrszagTang3D -all $TESTME_OPTIONS + + ParabolicMHD: + runs-on: self-hosted + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Ambipolar C Shock + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/AmbipolarCshock -all $TESTME_OPTIONS + - name: Ambipolar C Shock 3D + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/AmbipolarCshock3D -all $TESTME_OPTIONS + - name: Resistive Alfvén wave + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/ResistiveAlfvenWave -all $TESTME_OPTIONS + - name: Grid coarsening diffusion + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/Coarsening -all $TESTME_OPTIONS + - name: Hall whistler waves + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/HallWhistler -all $TESTME_OPTIONS + + Fargo: + needs: [ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] + runs-on: self-hosted + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Fargo + planet + run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/FargoPlanet -all $TESTME_OPTIONS + - name: Fargo MHD spherical + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/FargoMHDSpherical -all $TESTME_OPTIONS + + ShearingBox: + needs: [ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] + runs-on: self-hosted + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Hydro shearing box + run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/ShearingBox -all $TESTME_OPTIONS + - name: MHD shearing box + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/ShearingBox -all $TESTME_OPTIONS + + SelfGravity: + needs: [ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] + runs-on: self-hosted + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Jeans Instability + run: scripts/ci/run-tests $IDEFIX_DIR/test/SelfGravity/JeansInstability -all $TESTME_OPTIONS + - name: Random sphere spherical + run: scripts/ci/run-tests $IDEFIX_DIR/test/SelfGravity/RandomSphere -all $TESTME_OPTIONS + - name: Random sphere cartesian + run: scripts/ci/run-tests $IDEFIX_DIR/test/SelfGravity/RandomSphereCartesian -all $TESTME_OPTIONS + - name: Uniform spherical collapse + run: scripts/ci/run-tests $IDEFIX_DIR/test/SelfGravity/UniformCollapse -all $TESTME_OPTIONS + - name: Dusty spherical collapse + run: scripts/ci/run-tests $IDEFIX_DIR/test/SelfGravity/DustyCollapse -all $TESTME_OPTIONS + + Planet: + needs: [ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] + runs-on: self-hosted + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: 3 body + run: scripts/ci/run-tests $IDEFIX_DIR/test/Planet/Planet3Body -all $TESTME_OPTIONS + - name: migration + run: scripts/ci/run-tests $IDEFIX_DIR/test/Planet/PlanetMigration2D -all $TESTME_OPTIONS + - name: planet-planet + run: scripts/ci/run-tests $IDEFIX_DIR/test/Planet/PlanetPlanetRK42D -all $TESTME_OPTIONS + - name: spiral wake + run: scripts/ci/run-tests $IDEFIX_DIR/test/Planet/PlanetSpiral2D -all $TESTME_OPTIONS + - name: torques + run: scripts/ci/run-tests $IDEFIX_DIR/test/Planet/PlanetTorque3D -all $TESTME_OPTIONS + - name: RK5 + run: scripts/ci/run-tests $IDEFIX_DIR/test/Planet/PlanetsIsActiveRK52D -all $TESTME_OPTIONS + + Dust: + needs: [ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] + runs-on: self-hosted + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Energy conservation + run: scripts/ci/run-tests $IDEFIX_DIR/test/Dust/DustEnergy -all $TESTME_OPTIONS + - name: Dusty wave + run: scripts/ci/run-tests $IDEFIX_DIR/test/Dust/DustyWave -all $TESTME_OPTIONS + + Braginskii: + needs: [ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] + runs-on: self-hosted + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: MTI + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/MTI -all $TESTME_OPTIONS + - name: Spherical anisotropic diffusion + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/sphBragTDiffusion -all $TESTME_OPTIONS + - name: Spherical anisotropic viscosity + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/sphBragViscosity -all $TESTME_OPTIONS + + Examples: + needs: [Fargo, Dust, Planet, ShearingBox, SelfGravity] + runs-on: self-hosted + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Run examples test + run: cd test && ./checks_examples.sh $TEST_OPTIONS + + Utils: + needs: [Fargo, Dust, Planet, ShearingBox, SelfGravity] + runs-on: self-hosted + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Lookup table + run: scripts/ci/run-tests $IDEFIX_DIR/test/utils/lookupTable -all $TESTME_OPTIONS + - name: Dump Image + run: scripts/ci/run-tests $IDEFIX_DIR/test/utils/dumpImage -all $TESTME_OPTIONS diff --git a/.github/workflows/idefix-ci.yml b/.github/workflows/idefix-ci.yml index e8201828..cb946143 100644 --- a/.github/workflows/idefix-ci.yml +++ b/.github/workflows/idefix-ci.yml @@ -4,23 +4,11 @@ on: push: branches: - master - - v2.0 + - develop pull_request: paths-ignore: - '.github/ISSUE_TEMPLATE/*' -concurrency: - # auto-cancel any concurrent job *in the same context* - # see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency - # see https://docs.github.com/en/actions/learn-github-actions/contexts#github-context - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - TESTME_OPTIONS: -cuda -Werror - PYTHONPATH: ${{ github.workspace }} - IDEFIX_DIR: ${{ github.workspace }} - jobs: Linter: # Don't do this in forks @@ -35,261 +23,26 @@ jobs: - uses: pre-commit-ci/lite-action@v1.0.0 if: always() - ShocksHydro: + icc-jobs: needs: Linter - runs-on: self-hosted - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Sod test - run: | - cd $IDEFIX_DIR/test/HD/sod - ./testme.py -all $TESTME_OPTIONS - - name: Isothermal Sod test - run: | - cd $IDEFIX_DIR/test/HD/sod-iso - ./testme.py -all $TESTME_OPTIONS - - name: Mach reflection test - run: | - cd $IDEFIX_DIR/test/HD//MachReflection - ./testme.py -all $TESTME_OPTIONS + name: CPU Jobs (intel OneApi) + uses: ./.github/workflows/idefix-ci-jobs.yml + with: + TESTME_OPTIONS: -intel -Werror + IDEFIX_COMPILER: icc - ParabolicHydro: + gcc-jobs: needs: Linter - runs-on: self-hosted - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Viscous flow past cylinder - run: | - cd $IDEFIX_DIR/test/HD/ViscousFlowPastCylinder - ./testme.py -all $TESTME_OPTIONS - - name: Viscous disk - run: | - cd $IDEFIX_DIR/test/HD/ViscousDisk - ./testme.py -all $TESTME_OPTIONS - - name: Thermal diffusion - run: | - cd $IDEFIX_DIR/test/HD/thermalDiffusion - ./testme.py -all $TESTME_OPTIONS + name: CPU Jobs (gcc) + uses: ./.github/workflows/idefix-ci-jobs.yml + with: + TESTME_OPTIONS: -Werror + IDEFIX_COMPILER: gcc - ShocksMHD: + cuda-jobs: needs: Linter - runs-on: self-hosted - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - submodules: recursive - - name: MHD Sod test - run: | - cd $IDEFIX_DIR/test/MHD/sod - ./testme.py -all $TESTME_OPTIONS - - name: MHD Isothermal Sod test - run: | - cd $IDEFIX_DIR/test/MHD/sod-iso - ./testme.py -all $TESTME_OPTIONS - - name: Orszag Tang - run: | - cd $IDEFIX_DIR/test/MHD/OrszagTang - ./testme.py -all $TESTME_OPTIONS - - name: Orszag Tang 3D+restart tests - run: | - cd $IDEFIX_DIR/test/MHD/OrszagTang3D - ./testme.py -all $TESTME_OPTIONS - - - ParabolicMHD: - needs: Linter - runs-on: self-hosted - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Ambipolar C Shock - run: | - cd $IDEFIX_DIR/test/MHD/AmbipolarCshock - ./testme.py -all $TESTME_OPTIONS - - name: Ambipolar C Shock 3D - run: | - cd $IDEFIX_DIR/test/MHD/AmbipolarCshock3D - ./testme.py -all $TESTME_OPTIONS - - name: Resistive Alfvén wave - run: | - cd $IDEFIX_DIR/test/MHD/ResistiveAlfvenWave - ./testme.py -all $TESTME_OPTIONS - - name: Grid coarsening diffusion - run: | - cd $IDEFIX_DIR/test/MHD/Coarsening - ./testme.py -all $TESTME_OPTIONS - - name: Hall whistler waves - run: | - cd $IDEFIX_DIR/test/MHD/HallWhistler - ./testme.py -all $TESTME_OPTIONS - - Fargo: - needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] - runs-on: self-hosted - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Fargo + planet - run: | - cd $IDEFIX_DIR/test/HD/FargoPlanet - ./testme.py -all $TESTME_OPTIONS - - name: Fargo MHD spherical - run: | - cd $IDEFIX_DIR/test/MHD/FargoMHDSpherical - ./testme.py -all $TESTME_OPTIONS - - ShearingBox: - needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] - runs-on: self-hosted - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Hydro shearing box - run: | - cd $IDEFIX_DIR/test/HD/ShearingBox - ./testme.py -all $TESTME_OPTIONS - - name: MHD shearing box - run: | - cd $IDEFIX_DIR/test/MHD/ShearingBox - ./testme.py -all $TESTME_OPTIONS - - SelfGravity: - needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] - runs-on: self-hosted - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Jeans Instability - run: | - cd $IDEFIX_DIR/test/SelfGravity/JeansInstability - ./testme.py -all $TESTME_OPTIONS - - name: Random sphere spherical - run: | - cd $IDEFIX_DIR/test/SelfGravity/RandomSphere - ./testme.py -all $TESTME_OPTIONS - - name: Random sphere cartesian - run: | - cd $IDEFIX_DIR/test/SelfGravity/RandomSphereCartesian - ./testme.py -all $TESTME_OPTIONS - - name: Uniform spherical collapse - run: | - cd $IDEFIX_DIR/test/SelfGravity/UniformCollapse - ./testme.py -all $TESTME_OPTIONS - - name: Dusty spherical collapse - run: | - cd $IDEFIX_DIR/test/SelfGravity/DustyCollapse - ./testme.py -all $TESTME_OPTIONS - - Planet: - needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] - runs-on: self-hosted - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - submodules: recursive - - name: 3 body - run: | - cd $IDEFIX_DIR/test/Planet/Planet3Body - ./testme.py -all $TESTME_OPTIONS - - name: migration - run: | - cd $IDEFIX_DIR/test/Planet/PlanetMigration2D - ./testme.py -all $TESTME_OPTIONS - - name: planet-planet - run: | - cd $IDEFIX_DIR/test/Planet/PlanetPlanetRK42D - ./testme.py -all $TESTME_OPTIONS - - name: spiral wake - run: | - cd $IDEFIX_DIR/test/Planet/PlanetSpiral2D - ./testme.py -all $TESTME_OPTIONS - - name: torques - run: | - cd $IDEFIX_DIR/test/Planet/PlanetTorque3D - ./testme.py -all $TESTME_OPTIONS - - name: RK5 - run: | - cd $IDEFIX_DIR/test/Planet/PlanetsIsActiveRK52D - ./testme.py -all $TESTME_OPTIONS - - Dust: - needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] - runs-on: self-hosted - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Energy conservation - run: | - cd $IDEFIX_DIR/test/Dust/DustEnergy - ./testme.py -all $TESTME_OPTIONS - - name: Dusty wave - run: | - cd $IDEFIX_DIR/test/Dust/DustyWave - ./testme.py -all $TESTME_OPTIONS - - Braginskii: - needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] - runs-on: self-hosted - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - submodules: recursive - - name: MTI - run: | - cd $IDEFIX_DIR/test/MHD/MTI - ./testme.py -all $TESTME_OPTIONS - - name: Spherical anisotropic diffusion - run: | - cd $IDEFIX_DIR/test/MHD/sphBragTDiffusion - ./testme.py -all $TESTME_OPTIONS - - name: Spherical anisotropic viscosity - run: | - cd $IDEFIX_DIR/test/MHD/sphBragViscosity - ./testme.py -all $TESTME_OPTIONS - - Examples: - needs: [Fargo, Dust, Planet, ShearingBox, SelfGravity] - runs-on: self-hosted - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Run examples test - run: cd test && ./checks_examples.sh $TEST_OPTIONS - - Utils: - needs: [Fargo, Dust, Planet, ShearingBox, SelfGravity] - runs-on: self-hosted - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Lookup table - run: | - cd $IDEFIX_DIR/test/utils/lookupTable - ./testme.py -all $TESTME_OPTIONS - - name: Dump Image - run: | - cd $IDEFIX_DIR/test/utils/dumpImage - ./testme.py -all $TESTME_OPTIONS + name: CUDA Jobs + uses: ./.github/workflows/idefix-ci-jobs.yml + with: + TESTME_OPTIONS: -cuda -Werror + IDEFIX_COMPILER: nvcc diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 06fe7210..726f0045 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ exclude: "^(src/kokkos)" repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v5.0.0 hooks: - id: trailing-whitespace # auto-fix trailing whitespaces - id: end-of-file-fixer # add EOF "\n" if missing @@ -23,7 +23,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.278 + rev: v0.6.9 hooks: - id: ruff args: @@ -33,14 +33,15 @@ repos: - F # pyflakes - B # flake8-bugbear - I # isort + - NPY # numpy-specific rules - repo: https://github.com/neutrinoceros/inifix - rev: v4.4.0 + rev: v5.0.2 hooks: - id: inifix-format - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.5.1 + rev: v1.5.5 hooks: - id: remove-tabs # auto-fix tab/space mixing - id: insert-license diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f01898d..8d791f8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,26 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.1.02] 2024-10-24 +### Changed + +- Fix a bug that could lead to corrupted VTK file when using single precision arithmetic (#255) +- Fix a bug that could lead to incorrect central mass gravitational potential upon restart (#287) +- Changed the way magnetic field is reconstructed when using grid coarsening to reduce roundoff errors on div(B). This can have an impact on the results of models using grid coarsening+MHD (#284) +- Ensure that XDMF outputs are precision agnostic (#261) +- Bump up Kokkos version to 4.4.01 (#289) +- Check that writes are successfull in serial, otherwise throw an error (#260) +- Ensure that shock flattening flags can be modified by user (#260) +- Throw an error when user enables Fargo without enough DIMENSIONS (#250) +- Fix linting errors following upgrade to cpplint 2.0 (#278, #279, #281) +- Update idfx_io to numpy 2.0 (#283) + +### Added + +- Allow the user to define the grid and boundary conditions only on active dimensions (#274) +- Configuration for Nvidia H100 on Jean Zay in the documentation + + ## [2.1.01] 2024-06-20 ### Changed - Fix a bug that could result in too restrictive timesteps when resistivity is enabled (#244) diff --git a/CMakeLists.txt b/CMakeLists.txt index ca152646..79f6d30e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,9 +6,9 @@ set (CMAKE_CXX_STANDARD 17) set(Idefix_VERSION_MAJOR 2) set(Idefix_VERSION_MINOR 1) -set(Idefix_VERSION_PATCH 01) +set(Idefix_VERSION_PATCH 02) -project (idefix VERSION 2.1.00) +project (idefix VERSION 2.1.02) option(Idefix_MHD "enable MHD" OFF) option(Idefix_MPI "enable Message Passing Interface parallelisation" OFF) option(Idefix_HIGH_ORDER_FARGO "Force Fargo to use a PPM reconstruction scheme" OFF) @@ -46,10 +46,13 @@ include(SetRequiredBuildSettingsForGCC8) #Idefix requires Cuda Lambdas (experimental) if(Kokkos_ENABLE_CUDA) set(Kokkos_ENABLE_CUDA_LAMBDA ON CACHE BOOL "Idefix requires lambdas on Cuda" FORCE) + # CUDA_MALLOC_ASYNC disbaled by default in Kokkos 4.5, so not required here + #set(Kokkos_ENABLE_IMPL_CUDA_MALLOC_ASYNC OFF CACHE BOOL "Disable Async malloc to avoid bugs on PSM2" FORCE) endif() # Add kokkos CMAKE files (required early since these set compiler options) add_subdirectory(src/kokkos build/kokkos) +include_directories(${Kokkos_INCLUDE_DIRS_RET}) # Add Idefix CXX Flags add_compile_options(${Idefix_CXX_FLAGS}) diff --git a/doc/source/conf.py b/doc/source/conf.py index 9ba65d75..b712d026 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -23,7 +23,7 @@ author = 'Geoffroy Lesur' # The full version, including alpha/beta/rc tags -release = '2.1.01' +release = '2.1.02' diff --git a/doc/source/reference/idefix.ini.rst b/doc/source/reference/idefix.ini.rst index 066db997..a7309f10 100644 --- a/doc/source/reference/idefix.ini.rst +++ b/doc/source/reference/idefix.ini.rst @@ -16,7 +16,7 @@ allows for comments, which should start with ``#``. ``Grid`` section -------------------- -The grid section defines the grid total dimension. It consists of 3 entries ``X1-grid``, ``X2-grid`` and ``X3-grid``. Each entry defines the repartition of the grid points in the corresponding direction (the grid is always rectilinear). +The grid section defines the grid total dimension. It consists of 3 entries ``X1-grid``, ``X2-grid`` (when DIMENSIONS>=2) and ``X3-grid`` (when DIMENSIONS=3). Each entry defines the repartition of the grid points in the corresponding direction (the grid is always rectilinear). Each entry defines a series of grid blocks which are concatenated along the direction. Each block in a direction can have a different spacing rule (uniform, log or stretched). The definition of the Grid entries is as follows +----------------------------+-------------------------+------------------------------+ @@ -332,8 +332,8 @@ this block is simply ignored. ------------------------ This section describes the boundary conditions used by the code. There are 6 entries -which need to be defined: ``X1-beg``, ``X2-beg``, ``X3-beg`` for the left boundaries in the direction X1, X2, X3, -and ``X1-end``, ``X2-end``, ``X3-end`` for the right boundaries. Each boundary can be assigned the following types of conditions +that need to be defined: ``X1-beg``, ``X2-beg``, ``X3-beg`` for the left boundaries in the direction X1, X2, X3, +and ``X1-end``, ``X2-end``, ``X3-end`` for the right boundaries. ``X2`` boundaries are mandatory only when DIMENSIONS>=2 and ``X3`` when DIMENSIONS=3. Each boundary can be assigned the following types of conditions +----------------+------------------------------------------------------------------------------------------------------------------+ | Boundary type | Comment | diff --git a/doc/source/reference/makefile.rst b/doc/source/reference/makefile.rst index bf8ecdad..4f948e5d 100644 --- a/doc/source/reference/makefile.rst +++ b/doc/source/reference/makefile.rst @@ -130,32 +130,56 @@ Finally, *Idefix* can be configured to run on Mi250 by enabling HIP and the desi MPI (multi-GPU) can be enabled by adding ``-DIdefix_MPI=ON`` as usual. -Jean Zay at IDRIS, Nvidia V100 and A100 GPUs --------------------------------------------- +Jean Zay at IDRIS, Nvidia V100/A100/H100 GPUs +--------------------------------------------- -We recommend the following modules and environement variables on Jean Zay: +We recommend the following modules and environement variables on Jean Zay V100/A100: .. code-block:: bash + module load arch/a100 # ONLY forA100 module load cuda/12.1.0 module load gcc/12.2.0 module load openmpi/4.1.1-cuda - module load cmake/3.18.0 + module load cmake/3.25.2 + +While for H100: + +.. code-block:: bash + + module load arch/h100 + module load cmake/3.30.1 + module load cuda/12.1.0 + module load openmpi/4.1.5-cuda *Idefix* can then be configured to run on Nvidia V100 with the following options to ccmake: .. code-block:: bash - -DKokkos_ENABLE_CUDA=ON -DKokkos_ENABLE_VOLTA70=ON -DKokkos_ENABLE_IMPL_CUDA_MALLOC_ASYNC=OFF + -DKokkos_ENABLE_CUDA=ON -DKokkos_ARCH_VOLTA70=ON While Ampere A100 GPUs are enabled with .. code-block:: bash - -DKokkos_ENABLE_CUDA=ON -DKokkos_ENABLE_AMPERE80=ON -DKokkos_ENABLE_IMPL_CUDA_MALLOC_ASYNC=OFF + -DKokkos_ENABLE_CUDA=ON -DKokkos_ARCH_AMPERE80=ON + +And for H100 GPUS: + +.. code-block:: bash + + -DKokkos_ENABLE_CUDA=ON -DKokkos_ARCH_HOPPER90=ON + + +MPI (multi-GPU) can be enabled by adding ``-DIdefix_MPI=ON`` as usual. + + +.. warning:: + + As of *Idefix* 2.1.02, we automatically disable Cuda Malloc async (``-DKokkos_ENABLE_IMPL_CUDA_MALLOC_ASYNC=OFF``). However, earlier versions of + *Idefix* requires this flag when calling cmake to prevent a bug when using PSM2 with async Cuda malloc possibly leading to openmpi crash or hangs on Jean Zay. + -MPI (multi-GPU) can be enabled by adding ``-DIdefix_MPI=ON`` as usual. The malloc async option is here to prevent a bug when using PSM2 with async -Cuda malloc possibly leading to openmpi crash or hangs on Jean Zay. .. _setupSpecificOptions: diff --git a/pytools/idfx_io.py b/pytools/idfx_io.py index 480e713d..17dc6272 100644 --- a/pytools/idfx_io.py +++ b/pytools/idfx_io.py @@ -29,7 +29,7 @@ def __init__(self, fh, byteorder="little"): dims = [] for dim in range(self.ndims): dims.append(int.from_bytes(fh.read(INT_SIZE), byteorder)) - ntot = int(np.product(dims)) + ntot = int(np.prod(dims)) raw = struct.unpack(str(ntot) + "d", fh.read(DOUBLE_SIZE * ntot)) self.array = np.asarray(raw).reshape(dims[::-1]) diff --git a/pytools/idfx_test.py b/pytools/idfx_test.py index dc2da0a0..25bac76b 100644 --- a/pytools/idfx_test.py +++ b/pytools/idfx_test.py @@ -58,6 +58,10 @@ def __init__ (self): help="Test on Nvidia GPU using CUDA", action="store_true") + parser.add_argument("-intel", + help="Test compiling with Intel OneAPI", + action="store_true") + parser.add_argument("-hip", help="Test on AMD GPU using HIP", action="store_true") @@ -119,6 +123,12 @@ def configure(self,definitionFile=""): # disable Async cuda malloc for tests performed on old UCX implementations comm.append("-DKokkos_ENABLE_IMPL_CUDA_MALLOC_ASYNC=OFF") + if self.intel: + # disable fmad operations on Cuda to make it compatible with CPU arithmetics + comm.append("-DIdefix_CXX_FLAGS=-fp-model=strict") + comm.append("-DCMAKE_CXX_COMPILER=icpx") + comm.append("-DCMAKE_C_COMPILER=icx") + if self.hip: comm.append("-DKokkos_ENABLE_HIP=ON") # disable fmad operations on HIP to make it compatible with CPU arithmetics diff --git a/pytools/vtk_io.py b/pytools/vtk_io.py index 1f693318..eb5cf412 100644 --- a/pytools/vtk_io.py +++ b/pytools/vtk_io.py @@ -7,7 +7,7 @@ import warnings import numpy as np import os - +import re # restrict what's included with `import *` to public API __all__ = [ @@ -21,6 +21,8 @@ dt = np.dtype(">f") # Big endian single precision floats dint = np.dtype(">i4") # Big endian integer +NATIVE_COORDINATE_REGEXP = re.compile(r"X(1|2|3)(L|C)_NATIVE_COORDINATES") + KNOWN_GEOMETRIES = { 0: "cartesian", 1: "polar", @@ -33,10 +35,14 @@ class VTKDataset(object): def __init__(self, filename, geometry=None): self.filename = os.path.abspath(filename) self.data = {} + self.native_coordinates = {} with open(filename, "rb") as fh: self._load_header(fh, geometry=geometry) self._load(fh) + if self.native_coordinates: + self._setup_coordinates_from_native() + def _load(self, fh): if self._dataset_type in ("RECTILINEAR_GRID", "STRUCTURED_GRID"): self._load_hydro(fh) @@ -88,6 +94,9 @@ def _load_header(self, fh, geometry=None): self.t = np.fromfile(fh, dt, 1) elif d.startswith("PERIODICITY"): self.periodicity = np.fromfile(fh, dtype=dint, count=3).astype(bool) + elif NATIVE_COORDINATE_REGEXP.match(d): + native_name, _ncomp, native_dim, _dtype = d.split() + self.native_coordinates[native_name] = np.fromfile(fh, dtype=dt, count=int(native_dim)) else: warnings.warn("Found unknown field %s" % d) fh.readline() # skip extra linefeed (empty line) @@ -341,6 +350,29 @@ def _load_hydro(self, fh): def _load_particles(self, fh): raise NotImplementedError("Particles vtk are not supported yet !") + def _setup_coordinates_from_native(self): + if self.geometry == "spherical": + native2attr = { + "X1L_NATIVE_COORDINATES": "rl", + "X1C_NATIVE_COORDINATES": "r", + "X2L_NATIVE_COORDINATES": "thetal", + "X2C_NATIVE_COORDINATES": "theta", + "X3L_NATIVE_COORDINATES": "phil", + "X3C_NATIVE_COORDINATES": "phi", + } + elif self.geometry in ("cartesian", "cylindrical", "polar"): + native2attr = { + "X1L_NATIVE_COORDINATES": "xl", + "X1C_NATIVE_COORDINATES": "x", + "X2L_NATIVE_COORDINATES": "yl", + "X2C_NATIVE_COORDINATES": "y", + "X3L_NATIVE_COORDINATES": "zl", + "X3C_NATIVE_COORDINATES": "z", + } + + for native_field, attr in native2attr.items(): + setattr(self, attr, self.native_coordinates[native_field]) + def __repr__(self): return "VTKDataset('%s')" % self.filename diff --git a/reference b/reference index 99f339c4..b675bcea 160000 --- a/reference +++ b/reference @@ -1 +1 @@ -Subproject commit 99f339c43d98274a925282cc96252c5a0fa9374f +Subproject commit b675bceaa6aabc01dded346e2d631857f698dc76 diff --git a/scripts/ci/run-tests b/scripts/ci/run-tests new file mode 100755 index 00000000..32983102 --- /dev/null +++ b/scripts/ci/run-tests @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +if [ "$IDEFIX_COMPILER" == icc ]; then + source /opt/intel/oneapi/setvars.sh +fi +set -ue +cd "$1" +./testme.py "${@:2}" diff --git a/src/dataBlock/dataBlockHost.cpp b/src/dataBlock/dataBlockHost.cpp index 76f797c7..91f599c2 100644 --- a/src/dataBlock/dataBlockHost.cpp +++ b/src/dataBlock/dataBlockHost.cpp @@ -231,8 +231,8 @@ void DataBlockHost::MakeVsFromAmag(IdefixHostArray4D &Ain) { + 1/(x1m(i)*(cos(x2m(j)) - cos(x2m(j+1)))) * (sin(x2m(j+1))*Ain(KDIR,k,j+1,i) - sin(x2m(j))*Ain(KDIR,k,j,i) ) , - - 1/(x1m(i)*sin(x2(j))*dx3(k)) * (Ain(JDIR,k+1,j,i) - - Ain(JDIR,k,j,i) ) ); + - dx2(j)/(x1m(i)*((cos(x2m(j))- cos(x2m(j+1))))*dx3(k)) + * (Ain(JDIR,k+1,j,i) - Ain(JDIR,k,j,i) ) ); real Ax2m = fabs(sin(x2m(j))); // Regularisation along the axis diff --git a/src/dataBlock/dumpToFile.cpp b/src/dataBlock/dumpToFile.cpp index 98b4a474..35b60b81 100644 --- a/src/dataBlock/dumpToFile.cpp +++ b/src/dataBlock/dumpToFile.cpp @@ -92,6 +92,16 @@ void DataBlock::DumpToFile(std::string filebase) { WriteVariable(fileHdl, 4, dims, fieldName, locVc.data()); + if (this->gravity->haveSelfGravityPotential) { + IdefixArray3D::HostMirror locPot = Kokkos::create_mirror_view(this->gravity->phiP); + Kokkos::deep_copy(locPot, this->gravity->phiP); + + dims[3] = 1; + std::snprintf(fieldName,NAMESIZE,"Pot"); + + WriteVariable(fileHdl, 4, dims, fieldName, locPot.data()); + } + // Write Flux /* nx1=this->np_tot[IDIR]; diff --git a/src/dataBlock/fargo.hpp b/src/dataBlock/fargo.hpp index 3c3a9401..099c9935 100644 --- a/src/dataBlock/fargo.hpp +++ b/src/dataBlock/fargo.hpp @@ -508,7 +508,7 @@ void Fargo::ShiftFluid(const real t, const real dt, Fluid* hydro) { for(int ss = s-m ; ss < s ; ss++) { int sc; if(haveDomainDecomposition) { - sc = ss; + sc = ss + maxShift; } else { sc = sbeg + modPositive(ss-sbeg,n); } @@ -518,7 +518,7 @@ void Fargo::ShiftFluid(const real t, const real dt, Fluid* hydro) { for(int ss = s ; ss < s-m ; ss++) { int sc; if(haveDomainDecomposition) { - sc = ss; + sc = ss + maxShift; } else { sc = sbeg + modPositive(ss-sbeg,n); } @@ -544,7 +544,7 @@ void Fargo::ShiftFluid(const real t, const real dt, Fluid* hydro) { for(int ss = s-m ; ss < s ; ss++) { int sc; if(haveDomainDecomposition) { - sc = ss; + sc = ss + maxShift; } else { sc = sbeg + modPositive(ss-sbeg,n); } @@ -554,7 +554,7 @@ void Fargo::ShiftFluid(const real t, const real dt, Fluid* hydro) { for(int ss = s ; ss < s-m ; ss++) { int sc; if(haveDomainDecomposition) { - sc = ss; + sc = ss + maxShift; } else { sc = sbeg + modPositive(ss-sbeg,n); } @@ -637,7 +637,7 @@ void Fargo::ShiftFluid(const real t, const real dt, Fluid* hydro) { for(int ss = s-m ; ss < s ; ss++) { int sc; if(haveDomainDecomposition) { - sc = ss; + sc = ss + maxShift; } else { sc = sbeg + modPositive(ss-sbeg,n); } @@ -647,7 +647,7 @@ void Fargo::ShiftFluid(const real t, const real dt, Fluid* hydro) { for(int ss = s ; ss < s-m ; ss++) { int sc; if(haveDomainDecomposition) { - sc = ss; + sc = ss + maxShift; } else { sc = sbeg + modPositive(ss-sbeg,n); } @@ -672,7 +672,7 @@ void Fargo::ShiftFluid(const real t, const real dt, Fluid* hydro) { for(int ss = s-m ; ss < s ; ss++) { int sc; if(haveDomainDecomposition) { - sc = ss; + sc = ss + maxShift; } else { sc = sbeg + modPositive(ss-sbeg,n); } @@ -682,7 +682,7 @@ void Fargo::ShiftFluid(const real t, const real dt, Fluid* hydro) { for(int ss = s ; ss < s-m ; ss++) { int sc; if(haveDomainDecomposition) { - sc = ss; + sc = ss + maxShift; } else { sc = sbeg + modPositive(ss-sbeg,n); } diff --git a/src/dataBlock/planetarySystem/planetarySystem.cpp b/src/dataBlock/planetarySystem/planetarySystem.cpp index 3d18e69d..8d01118d 100644 --- a/src/dataBlock/planetarySystem/planetarySystem.cpp +++ b/src/dataBlock/planetarySystem/planetarySystem.cpp @@ -83,12 +83,16 @@ indirect term, with multiple planets that don't feel each others."); IDEFIX_ERROR("need to define a planet-to-primary mass ratio via planetToPrimary"); } #if GEOMETRY == POLAR || GEOMETRY == CARTESIAN - if ((this->data->mygrid->xbeg[KDIR] == 0) - || (this->data->mygrid->xend[KDIR] == 0)) { - this->halfdisk = true; - } else { + #if DIMENSIONS == 3 + if ((this->data->mygrid->xbeg[KDIR] == 0) + || (this->data->mygrid->xend[KDIR] == 0)) { + this->halfdisk = true; + } else { + this->halfdisk = false; + } + #else // DIMENSIONS == 3 this->halfdisk = false; - } + #endif // DIMENSIONS == 3 #elif GEOMETRY == SPHERICAL if ( (this->data->mygrid->xbeg[JDIR] == M_PI/2.0) || (this->data->mygrid->xend[JDIR] == M_PI/2.0)) { diff --git a/src/fluid/coarsenFlow.hpp b/src/fluid/coarsenFlow.hpp index 217c7711..b1bf79ea 100644 --- a/src/fluid/coarsenFlow.hpp +++ b/src/fluid/coarsenFlow.hpp @@ -290,28 +290,52 @@ void Fluid::CoarsenMagField(IdefixArray4D &Vsin) { // We reconstruct the parrallel field component with divB=0 int factor = 1 << (coarsening-1); + + if( (index-begDir)%factor == 0) { + real qt = 0; + real qb = 0; + + // Loop forward for(int shift = 0 ; shift < factor-1 ; shift++) { - real qt = Vsin(BXt,k+kt+shift*koffset, j+jt+shift*joffset, i+it+shift*ioffset) + qt += Vsin(BXt,k+kt+shift*koffset, j+jt+shift*joffset, i+it+shift*ioffset) * At(k+kt+shift*koffset, j+jt+shift*joffset, i+it+shift*ioffset) - Vsin(BXt,k+shift*koffset, j+shift*joffset, i+shift*ioffset) * At(k+shift*koffset, j+shift*joffset, i+shift*ioffset); #if DIMENSIONS == 3 - real qb = Vsin(BXb,k+kb+shift*koffset, j+jb+shift*joffset, i+ib+shift*ioffset) + qb += Vsin(BXb,k+kb+shift*koffset, j+jb+shift*joffset, i+ib+shift*ioffset) * Ab(k+kb+shift*koffset, j+jb+shift*joffset, i+ib+shift*ioffset) - Vsin(BXb,k+shift*koffset, j+shift*joffset, i+shift*ioffset) * Ab(k+shift*koffset, j+shift*joffset, i+shift*ioffset); - #else - real qb = 0.0; #endif Vsin(BXn, k+(shift+1)*koffset, j+(shift+1)*joffset, i+(shift+1)*ioffset) = + ((real) (factor-(shift+1))) / ((real)factor) * 1.0/An(k+(shift+1)*koffset, j+(shift+1)*joffset, i+(shift+1)*ioffset) * - ( - Vsin(BXn, k+shift*koffset, j+shift*joffset, i+shift*ioffset) * - An(k+shift*koffset, j+shift*joffset, i+shift*ioffset) - - qt - qb - ); + (Vsin(BXn, k, j, i) * An(k, j, i) - qt - qb); + } + // Loop backward + qt = 0; + qb = 0; + + // Loop forward + for(int shift = factor-1 ; shift >=1 ; shift--) { + qt += Vsin(BXt,k+kt+shift*koffset, j+jt+shift*joffset, i+it+shift*ioffset) + * At(k+kt+shift*koffset, j+jt+shift*joffset, i+it+shift*ioffset) + - Vsin(BXt,k+shift*koffset, j+shift*joffset, i+shift*ioffset) + * At(k+shift*koffset, j+shift*joffset, i+shift*ioffset); + #if DIMENSIONS == 3 + qb += Vsin(BXb,k+kb+shift*koffset, j+jb+shift*joffset, i+ib+shift*ioffset) + * Ab(k+kb+shift*koffset, j+jb+shift*joffset, i+ib+shift*ioffset) + - Vsin(BXb,k+shift*koffset, j+shift*joffset, i+shift*ioffset) + * Ab(k+shift*koffset, j+shift*joffset, i+shift*ioffset); + #endif + + Vsin(BXn, k+shift*koffset, j+shift*joffset, i+shift*ioffset) += + ((real) shift) / ((real)factor) * + 1.0/An(k+shift*koffset, j+shift*joffset, i+shift*ioffset) * + (Vsin(BXn, k+factor*koffset, j+factor*joffset, i+factor*ioffset) + * An( k+factor*koffset, j+factor*joffset, i+factor*ioffset) + qt + qb); } } } diff --git a/src/fluid/constrainedTransport/calcRiemannEmf.hpp b/src/fluid/constrainedTransport/calcRiemannEmf.hpp index 3c9479c2..2779ffba 100644 --- a/src/fluid/constrainedTransport/calcRiemannEmf.hpp +++ b/src/fluid/constrainedTransport/calcRiemannEmf.hpp @@ -22,8 +22,6 @@ template void ConstrainedTransport::CalcRiemannAverage() { idfx::pushRegion("ConstrainedTransport::calcRiemannAverage"); -#if EMF_AVERAGE == UCT_HLLD || EMF_AVERAGE == UCT_HLL - // Corned EMFs IdefixArray3D ez = this->ez; #if DIMENSIONS == 3 @@ -428,7 +426,6 @@ void ConstrainedTransport::CalcRiemannAverage() { #endif } ); -#endif // EMF_AVERAGE idfx::popRegion(); } diff --git a/src/gravity/gravity.cpp b/src/gravity/gravity.cpp index 2492ce09..c0096c51 100644 --- a/src/gravity/gravity.cpp +++ b/src/gravity/gravity.cpp @@ -10,6 +10,7 @@ #include "gravity.hpp" #include "planetarySystem.hpp" #include "dataBlock.hpp" +#include "output.hpp" #include "input.hpp" Gravity::Gravity(Input &input, DataBlock *datain) { @@ -29,6 +30,7 @@ Gravity::Gravity(Input &input, DataBlock *datain) { } else if (potentialString.compare("central") == 0) { this->haveCentralMassPotential = true; this->centralMass = input.GetOrSet("Gravity","Mcentral",0, 1.0); + data->dump->RegisterVariable(&this->centralMass, "centralMass",1); } else if (potentialString.compare("selfgravity") == 0) { this->haveSelfGravityPotential = true; } else if (potentialString.compare("planet") == 0) { diff --git a/src/gravity/laplacian.hpp b/src/gravity/laplacian.hpp index 4c41842b..28572439 100644 --- a/src/gravity/laplacian.hpp +++ b/src/gravity/laplacian.hpp @@ -19,7 +19,14 @@ class DataBlock; class Laplacian { public: // Types of boundary which can be treated - enum LaplacianBoundaryType {internalgrav, periodic, nullgrad, nullpot, userdef, axis, origin}; + enum LaplacianBoundaryType {internalgrav, + periodic, + nullgrad, + nullpot, + userdef, + axis, + origin, + undefined}; Laplacian() = default; Laplacian(DataBlock *, std::array, diff --git a/src/gravity/selfGravity.cpp b/src/gravity/selfGravity.cpp index 8efef800..43f76471 100644 --- a/src/gravity/selfGravity.cpp +++ b/src/gravity/selfGravity.cpp @@ -42,7 +42,11 @@ void SelfGravity::Init(Input &input, DataBlock *datain) { } // Get the gravity-related boundary conditions - for(int dir = 0 ; dir < 3 ; dir++) { + for (int dir = 0 ; dir < 3 ; dir++) { + this->lbound[dir] = Laplacian::LaplacianBoundaryType::undefined; + this->rbound[dir] = Laplacian::LaplacianBoundaryType::undefined; + } + for(int dir = 0 ; dir < DIMENSIONS ; dir++) { std::string label = std::string("boundary-X")+std::to_string(dir+1)+std::string("-beg"); std::string boundary = input.Get("SelfGravity",label,0); diff --git a/src/grid.cpp b/src/grid.cpp index 14a1e174..ace5eb0c 100644 --- a/src/grid.cpp +++ b/src/grid.cpp @@ -55,7 +55,7 @@ Grid::Grid(Input &input) { npoints[dir] = 1; nghost[dir] = 0; std::string label = std::string("X")+std::to_string(dir+1)+std::string("-grid"); - int numPatch = input.Get("Grid",label,0); + if(dir("Grid",label,0); for(int patch = 0; patch < numPatch ; patch++) { npoints[dir] += input.Get("Grid",label,2+3*patch ); } @@ -73,7 +74,14 @@ Grid::Grid(Input &input) { for(int dir = 0 ; dir < 3 ; dir++) { np_tot[dir] = npoints[dir] + 2*nghost[dir]; np_int[dir] = npoints[dir]; + lbound[dir] = undefined; + rbound[dir] = undefined; + } + + // Default boundary conditions on each axis + + for(int dir = 0 ; dir < DIMENSIONS ; dir++) { std::string label = std::string("X")+std::to_string(dir+1)+std::string("-beg"); std::string boundary = input.Get("Boundary",label,0); @@ -150,8 +158,16 @@ Grid::Grid(Input &input) { for(int i=0 ; i < 3 ; i++) period[i] = 0; - // Check if the dec option has been passed when number of procs > 1 + // Check that number of procs > 1 if(idfx::psize>1) { + int ngridtot=1; + for(int dir=0 ; dir < DIMENSIONS; dir++) { + ngridtot *= np_int[dir]; + } + // Check that the total grid dimension is effectively divisible by number of procs + if(ngridtot % idfx::psize) + IDEFIX_ERROR("Total grid size must be a multiple of the number of mpi process"); + // Check that dec option has been passed if(input.CheckEntry("CommandLine","dec") != DIMENSIONS) { // No command line decomposition, make auto-decomposition if possible // (only when nproc and dimensions are powers of 2, and in 1D) @@ -177,7 +193,7 @@ Grid::Grid(Input &input) { int ntot=1; for(int dir=0 ; dir < DIMENSIONS; dir++) { nproc[dir] = input.Get("CommandLine","dec",dir); - // Check that the dimension is effectively divisible by number of procs + // Check that the dimension is effectively divisible by number of procs along each direction if(np_int[dir] % nproc[dir]) IDEFIX_ERROR("Grid size must be a multiple of the domain decomposition"); // Count the total number of procs we'll need for the specified domain decomposition @@ -337,6 +353,9 @@ void Grid::ShowConfig() { case userdef: lboundString="userdef"; break; + case undefined: + lboundString="undefined"; + break; default: lboundString="unknown"; } @@ -362,6 +381,8 @@ void Grid::ShowConfig() { case userdef: rboundString="userdef"; break; + case undefined: + lboundString="undefined"; default: rboundString="unknown"; } diff --git a/src/gridHost.cpp b/src/gridHost.cpp index 1c48b53c..ad61f043 100644 --- a/src/gridHost.cpp +++ b/src/gridHost.cpp @@ -50,17 +50,17 @@ void GridHost::MakeGrid(Input &input) { // Get grid parameters from input file, block [Grid] for(int dir = 0 ; dir < 3 ; dir++) { - std::string label = std::string("X")+std::to_string(dir+1)+std::string("-grid"); - int numPatch = input.Get("Grid",label,0); + // These are extra dimensions that are not being used. - xstart[dir] = input.Get("Grid",label,1); - xend[dir] = input.Get("Grid",label,4+(numPatch-1)*3); - - this->xbeg[dir] = xstart[dir]; - this->xend[dir] = xend[dir]; + if(dir("Grid",label,0); + xstart[dir] = input.Get("Grid",label,1); + xend[dir] = input.Get("Grid",label,4+(numPatch-1)*3); - if(dirxbeg[dir] = xstart[dir]; + this->xend[dir] = xend[dir]; // First, we fill cells for any non strecthed patch // Loop on all the patches int idxstart = nghost[dir]; @@ -200,10 +200,26 @@ void GridHost::MakeGrid(Input &input) { } else { // dir >= DIMENSIONS/ Init simple uniform grid for(int i = 0 ; i < np_tot[dir] ; i++) { - dx[dir](i) = (xend[dir]-xstart[dir])/(np_int[dir]); - x[dir](i)=xstart[dir] + (i-nghost[dir]+HALF_F)*dx[dir](i); - xl[dir](i)=xstart[dir] + (i-nghost[dir])*dx[dir](i); - xr[dir](i)=xstart[dir] + (i-nghost[dir]+1)*dx[dir](i); + // Initialize to default values + #if GEOMETRY != SPHERICAL + xstart[dir] = -0.5; + xend[dir] = 0.5; + #elif GEOMETRY == SPHERICAL + if(dir == JDIR) { + xstart[dir] = 0; + xend[dir] = M_PI; + } + if(dir == KDIR) { + xstart[dir] = -0.5; + xend[dir] = 0.5; + } + #endif + this->xbeg[dir] = xstart[dir]; + this->xend[dir] = xend[dir]; + dx[dir](i) = xend[dir] - xstart[dir]; + x[dir](i)=0.5*(xstart[dir]+xend[dir]); + xl[dir](i)=xstart[dir]; + xr[dir](i)=xend[dir]; } } } diff --git a/src/idefix.hpp b/src/idefix.hpp index f547c5d7..7485f95f 100644 --- a/src/idefix.hpp +++ b/src/idefix.hpp @@ -217,7 +217,7 @@ using IdfxFileHandler = FILE*; #endif // Types of boundary which can be treated -enum BoundaryType { internal, periodic, reflective, outflow, shearingbox, axis, userdef}; +enum BoundaryType { internal, periodic, reflective, outflow, shearingbox, axis, userdef, undefined}; enum BoundarySide { left, right}; enum class SliceType {Cut, Average}; diff --git a/src/kokkos b/src/kokkos index 6ecdf605..09e775bf 160000 --- a/src/kokkos +++ b/src/kokkos @@ -1 +1 @@ -Subproject commit 6ecdf605e0f7639adec599d25cf0e206d7b8f9f5 +Subproject commit 09e775bfc585840bb9ab1156cbd8d7d1c9e0cc6d diff --git a/src/output/vtk.cpp b/src/output/vtk.cpp index ae4a4c60..98e4c257 100644 --- a/src/output/vtk.cpp +++ b/src/output/vtk.cpp @@ -124,24 +124,51 @@ Vtk::Vtk(Input &input, DataBlock *datain, std::string filebase) { this->xnode = new float[nx1+ioffset]; this->ynode = new float[nx2+joffset]; this->znode = new float[nx3+koffset]; + this->xcenter = new float[nx1]; + this->ycenter = new float[nx2]; + this->zcenter = new float[nx3]; for (int32_t i = 0; i < nx1 + ioffset; i++) { - if(grid.np_tot[IDIR] == 1) // only one dimension in this direction + if(grid.np_tot[IDIR] == 1) { // only one dimension in this direction xnode[i] = bigEndian(static_cast(grid.x[IDIR](i))); - else + } else { xnode[i] = bigEndian(static_cast(grid.xl[IDIR](i + grid.nghost[IDIR]))); + } } for (int32_t j = 0; j < nx2 + joffset; j++) { - if(grid.np_tot[JDIR] == 1) // only one dimension in this direction + if(grid.np_tot[JDIR] == 1) { // only one dimension in this direction ynode[j] = bigEndian(static_cast(grid.x[JDIR](j))); - else + } else { ynode[j] = bigEndian(static_cast(grid.xl[JDIR](j + grid.nghost[JDIR]))); + } } for (int32_t k = 0; k < nx3 + koffset; k++) { - if(grid.np_tot[KDIR] == 1) + if(grid.np_tot[KDIR] == 1) { znode[k] = bigEndian(static_cast(grid.x[KDIR](k))); - else + } else { znode[k] = bigEndian(static_cast(grid.xl[KDIR](k + grid.nghost[KDIR]))); + } + } + for (int32_t i = 0; i < nx1; i++) { + if(grid.np_tot[IDIR] == 1) { // only one dimension in this direction + xcenter[i] = xnode[i]; + } else { + xcenter[i] = bigEndian(static_cast(grid.x[IDIR](i + grid.nghost[IDIR]))); + } + } + for (int32_t j = 0; j < nx2; j++) { + if(grid.np_tot[JDIR] == 1) { // only one dimension in this direction + ycenter[j] = ynode[j]; + } else { + ycenter[j] = bigEndian(static_cast(grid.x[JDIR](j + grid.nghost[JDIR]))); + } + } + for (int32_t k = 0; k < nx3; k++) { + if(grid.np_tot[KDIR] == 1) { + zcenter[k] = znode[k]; + } else { + zcenter[k] = bigEndian(static_cast(grid.x[KDIR](k + grid.nghost[KDIR]))); + } } #if VTK_FORMAT == VTK_STRUCTURED_GRID // VTK_FORMAT /* -- Allocate memory for node_coord which is later used -- */ @@ -375,8 +402,8 @@ void Vtk::WriteHeader(IdfxFileHandler fvtk, real time) { #elif VTK_FORMAT == VTK_STRUCTURED_GRID ssheader << "DATASET STRUCTURED_GRID" << std::endl; #endif - // fields: geometry, periodicity, time - int nfields = 3; + // fields: geometry, periodicity, time, 6 NativeCoordinates (x1l, x2l, x3l, x1c, x2c, x3c) + int nfields = 9; // Write grid geometry in the VTK file ssheader << "FIELD FieldData " << nfields << std::endl; @@ -426,7 +453,71 @@ void Vtk::WriteHeader(IdfxFileHandler fvtk, real time) { // Done, add cariage return for next ascii write ssheader << std::endl; + // write x1l native coordinates + ssheader << "X1L_NATIVE_COORDINATES 1 " << (nx1 + ioffset) << " float" << std::endl; + // Flush the ascii header + header = ssheader.str(); + WriteHeaderString(header.c_str(), fvtk); + // reset the string stream + ssheader.str(std::string()); + WriteHeaderBinary(this->xnode, nx1 + ioffset, fvtk); + // Done, add cariage return for next ascii write + ssheader << std::endl; + + // write x2l native coordinates + ssheader << "X2L_NATIVE_COORDINATES 1 " << (nx2 + joffset) << " float" << std::endl; + // Flush the ascii header + header = ssheader.str(); + WriteHeaderString(header.c_str(), fvtk); + // reset the string stream + ssheader.str(std::string()); + WriteHeaderBinary(this->ynode, nx2 + joffset, fvtk); + // Done, add cariage return for next ascii write + ssheader << std::endl; + + // write x3l native coordinates + ssheader << "X3L_NATIVE_COORDINATES 1 " << (nx3 + koffset) << " float" << std::endl; + // Flush the ascii header + header = ssheader.str(); + WriteHeaderString(header.c_str(), fvtk); + // reset the string stream + ssheader.str(std::string()); + WriteHeaderBinary(this->znode, nx3 + koffset, fvtk); + // Done, add cariage return for next ascii write + ssheader << std::endl; + + // write x1 native coordinates + ssheader << "X1C_NATIVE_COORDINATES 1 " << nx1 << " float" << std::endl; + // Flush the ascii header + header = ssheader.str(); + WriteHeaderString(header.c_str(), fvtk); + // reset the string stream + ssheader.str(std::string()); + WriteHeaderBinary(this->xcenter, nx1, fvtk); + // Done, add cariage return for next ascii write + ssheader << std::endl; + + // write x2 native coordinates + ssheader << "X2C_NATIVE_COORDINATES 1 " << nx2 << " float" << std::endl; + // Flush the ascii header + header = ssheader.str(); + WriteHeaderString(header.c_str(), fvtk); + // reset the string stream + ssheader.str(std::string()); + WriteHeaderBinary(this->ycenter, nx2, fvtk); + // Done, add cariage return for next ascii write + ssheader << std::endl; + // write x3 native coordinates + ssheader << "X3C_NATIVE_COORDINATES 1 " << nx3 << " float" << std::endl; + // Flush the ascii header + header = ssheader.str(); + WriteHeaderString(header.c_str(), fvtk); + // reset the string stream + ssheader.str(std::string()); + WriteHeaderBinary(this->zcenter, nx3, fvtk); + // Done, add cariage return for next ascii write + ssheader << std::endl; ssheader << "DIMENSIONS " << nx1 + ioffset << " " << nx2 + joffset << " " << nx3 + koffset << std::endl; @@ -486,7 +577,6 @@ void Vtk::WriteHeader(IdfxFileHandler fvtk, real time) { #undef VTK_STRUCTURED_GRID #undef VTK_RECTILINEAR_GRID - /* ********************************************************************* */ void Vtk::WriteScalar(IdfxFileHandler fvtk, float* Vin, const std::string &var_name) { /*! diff --git a/src/output/vtk.hpp b/src/output/vtk.hpp index a9503a5a..1a55f67f 100644 --- a/src/output/vtk.hpp +++ b/src/output/vtk.hpp @@ -129,6 +129,7 @@ class Vtk : public BaseVtk { // Coordinates needed by VTK outputs float *xnode, *ynode, *znode; + float *xcenter, *ycenter, *zcenter; IdefixHostArray4D node_coord; diff --git a/test/HD/FargoPlanet/setup.cpp b/test/HD/FargoPlanet/setup.cpp index 125834a4..314858ba 100644 --- a/test/HD/FargoPlanet/setup.cpp +++ b/test/HD/FargoPlanet/setup.cpp @@ -43,7 +43,6 @@ void UserdefBoundary(Hydro *hydro, int dir, BoundarySide side, real t) { IdefixArray4D Vc = hydro->Vc; auto *data = hydro->data; IdefixArray1D x1 = data->x[IDIR]; - IdefixArray1D x3 = data->x[KDIR]; if(dir==IDIR) { int ighost,ibeg,iend; if(side == left) { @@ -56,7 +55,6 @@ void UserdefBoundary(Hydro *hydro, int dir, BoundarySide side, real t) { ibeg, iend, KOKKOS_LAMBDA (int k, int j, int i) { real R=x1(i); - real z=x3(k); real Vk = 1.0/sqrt(R); Vc(RHO,k,j,i) = Vc(RHO,k,j,2*ighost - i +1); @@ -75,7 +73,6 @@ void UserdefBoundary(Hydro *hydro, int dir, BoundarySide side, real t) { ibeg, iend, KOKKOS_LAMBDA (int k, int j, int i) { real R=x1(i); - real z=x3(k); real Vk = 1.0/sqrt(R); Vc(RHO,k,j,i) = Vc(RHO,k,j,ighost); diff --git a/test/HD/VSI/idefix.ini b/test/HD/VSI/idefix.ini index bc728eac..f0ce6a4d 100644 --- a/test/HD/VSI/idefix.ini +++ b/test/HD/VSI/idefix.ini @@ -1,7 +1,6 @@ [Grid] X1-grid 1 1.0 1024 l 3.0 X2-grid 1 1.2707963267948965 512 u 1.8707963267948966 -X3-grid 1 0.0 1 u 6.283185307179586 [TimeIntegrator] CFL 0.8 @@ -22,8 +21,6 @@ X1-beg userdef X1-end outflow X2-beg outflow X2-end outflow -X3-beg periodic -X3-end periodic [Setup] epsilon 0.1 diff --git a/test/HD/ViscousDisk/idefix-rkl.ini b/test/HD/ViscousDisk/idefix-rkl.ini index 63888492..207f3abe 100644 --- a/test/HD/ViscousDisk/idefix-rkl.ini +++ b/test/HD/ViscousDisk/idefix-rkl.ini @@ -1,7 +1,6 @@ [Grid] X1-grid 1 1.0 64 u 3.0 X2-grid 1 1.2707963267948965 64 u 1.8707963267948966 -X3-grid 1 0.0 1 u 6.283185307179586 [TimeIntegrator] CFL 0.5 @@ -23,8 +22,6 @@ X1-beg userdef X1-end userdef X2-beg userdef X2-end userdef -X3-beg periodic -X3-end periodic [Setup] epsilon 0.1 diff --git a/test/HD/ViscousDisk/idefix.ini b/test/HD/ViscousDisk/idefix.ini index 673d4be7..dbe8a499 100644 --- a/test/HD/ViscousDisk/idefix.ini +++ b/test/HD/ViscousDisk/idefix.ini @@ -1,7 +1,6 @@ [Grid] X1-grid 1 1.0 64 u 3.0 X2-grid 1 1.2707963267948965 64 u 1.8707963267948966 -X3-grid 1 0.0 1 u 6.283185307179586 [TimeIntegrator] CFL 0.5 @@ -23,8 +22,6 @@ X1-beg userdef X1-end userdef X2-beg userdef X2-end userdef -X3-beg periodic -X3-end periodic [Setup] epsilon 0.1 diff --git a/test/HD/ViscousFlowPastCylinder/idefix-rkl.ini b/test/HD/ViscousFlowPastCylinder/idefix-rkl.ini index 8b8b33e3..73b8722b 100644 --- a/test/HD/ViscousFlowPastCylinder/idefix-rkl.ini +++ b/test/HD/ViscousFlowPastCylinder/idefix-rkl.ini @@ -1,9 +1,6 @@ [Grid] X1-grid 1 1.0 128 l 10.0 -# X2-grid 3 -3.141592653589793 64 s+ -0.2 128 u 0.2 64 s- 3.141592653589793 -# X2-grid 1 -3.141592653589793 256 u 3.141592653589793 X2-grid 1 0.0 64 u 6.28318530717958 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.4 @@ -21,8 +18,6 @@ X1-beg userdef X1-end userdef X2-beg periodic X2-end periodic -X3-beg outflow -X3-end outflow [Output] vtk 1.0 diff --git a/test/HD/ViscousFlowPastCylinder/idefix.ini b/test/HD/ViscousFlowPastCylinder/idefix.ini index 33793490..de1cd417 100644 --- a/test/HD/ViscousFlowPastCylinder/idefix.ini +++ b/test/HD/ViscousFlowPastCylinder/idefix.ini @@ -1,9 +1,6 @@ [Grid] X1-grid 1 1.0 128 l 10.0 -# X2-grid 3 -3.141592653589793 64 s+ -0.2 128 u 0.2 64 s- 3.141592653589793 -# X2-grid 1 -3.141592653589793 256 u 3.141592653589793 X2-grid 1 0.0 64 u 6.28318530717958 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.4 @@ -21,8 +18,6 @@ X1-beg userdef X1-end userdef X2-beg periodic X2-end periodic -X3-beg outflow -X3-end outflow [Output] vtk 1.0 diff --git a/test/HD/sod-iso/idefix-hll.ini b/test/HD/sod-iso/idefix-hll.ini index cb6ab432..f7b36503 100644 --- a/test/HD/sod-iso/idefix-hll.ini +++ b/test/HD/sod-iso/idefix-hll.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 500 u 1.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.8 @@ -16,10 +14,6 @@ csiso constant 1.0 [Boundary] X1-beg outflow X1-end outflow -X2-beg outflow -X2-end outflow -X3-beg outflow -X3-end outflow [Output] vtk 0.1 diff --git a/test/HD/sod-iso/idefix-hllc-rk3.ini b/test/HD/sod-iso/idefix-hllc-rk3.ini index 7606c7fc..161237da 100644 --- a/test/HD/sod-iso/idefix-hllc-rk3.ini +++ b/test/HD/sod-iso/idefix-hllc-rk3.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 500 u 1.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.8 @@ -16,10 +14,6 @@ csiso constant 1.0 [Boundary] X1-beg outflow X1-end outflow -X2-beg outflow -X2-end outflow -X3-beg outflow -X3-end outflow [Output] vtk 0.1 diff --git a/test/HD/sod-iso/idefix-hllc.ini b/test/HD/sod-iso/idefix-hllc.ini index 751f5e86..a5d3eea8 100644 --- a/test/HD/sod-iso/idefix-hllc.ini +++ b/test/HD/sod-iso/idefix-hllc.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 500 u 1.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.8 @@ -16,10 +14,6 @@ csiso constant 1.0 [Boundary] X1-beg outflow X1-end outflow -X2-beg outflow -X2-end outflow -X3-beg outflow -X3-end outflow [Output] vtk 0.1 diff --git a/test/HD/sod-iso/idefix-rk3.ini b/test/HD/sod-iso/idefix-rk3.ini index e913683d..498a24f3 100644 --- a/test/HD/sod-iso/idefix-rk3.ini +++ b/test/HD/sod-iso/idefix-rk3.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 500 u 1.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.8 @@ -16,10 +14,6 @@ csiso constant 1.0 [Boundary] X1-beg outflow X1-end outflow -X2-beg outflow -X2-end outflow -X3-beg outflow -X3-end outflow [Output] vtk 0.1 diff --git a/test/HD/sod-iso/idefix-tvdlf.ini b/test/HD/sod-iso/idefix-tvdlf.ini index f6c7e57d..ecb0b07d 100644 --- a/test/HD/sod-iso/idefix-tvdlf.ini +++ b/test/HD/sod-iso/idefix-tvdlf.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 500 u 1.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.8 @@ -16,10 +14,6 @@ csiso constant 1.0 [Boundary] X1-beg outflow X1-end outflow -X2-beg outflow -X2-end outflow -X3-beg outflow -X3-end outflow [Output] vtk 0.1 diff --git a/test/HD/sod-iso/idefix.ini b/test/HD/sod-iso/idefix.ini index 564286e3..2477fa6d 100644 --- a/test/HD/sod-iso/idefix.ini +++ b/test/HD/sod-iso/idefix.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 500 u 1.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.8 @@ -16,10 +14,6 @@ csiso constant 1.0 [Boundary] X1-beg outflow X1-end outflow -X2-beg outflow -X2-end outflow -X3-beg outflow -X3-end outflow [Output] vtk 0.1 diff --git a/test/HD/sod/idefix-hll.ini b/test/HD/sod/idefix-hll.ini index 0bfb03ce..e515254d 100644 --- a/test/HD/sod/idefix-hll.ini +++ b/test/HD/sod/idefix-hll.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 500 u 1.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.8 @@ -16,10 +14,6 @@ gamma 1.4 [Boundary] X1-beg outflow X1-end outflow -X2-beg outflow -X2-end outflow -X3-beg outflow -X3-end outflow [Output] vtk 0.1 diff --git a/test/HD/sod/idefix-hllc-rk3.ini b/test/HD/sod/idefix-hllc-rk3.ini index 68a97c55..0c73d838 100644 --- a/test/HD/sod/idefix-hllc-rk3.ini +++ b/test/HD/sod/idefix-hllc-rk3.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 500 u 1.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.8 @@ -16,10 +14,6 @@ gamma 1.4 [Boundary] X1-beg outflow X1-end outflow -X2-beg outflow -X2-end outflow -X3-beg outflow -X3-end outflow [Output] vtk 0.1 diff --git a/test/HD/sod/idefix-hllc.ini b/test/HD/sod/idefix-hllc.ini index 3db50c3c..1acedec1 100644 --- a/test/HD/sod/idefix-hllc.ini +++ b/test/HD/sod/idefix-hllc.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 500 u 1.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.8 @@ -16,10 +14,6 @@ gamma 1.4 [Boundary] X1-beg outflow X1-end outflow -X2-beg outflow -X2-end outflow -X3-beg outflow -X3-end outflow [Output] vtk 0.1 diff --git a/test/HD/sod/idefix-rk3.ini b/test/HD/sod/idefix-rk3.ini index 7fe738ed..96675389 100644 --- a/test/HD/sod/idefix-rk3.ini +++ b/test/HD/sod/idefix-rk3.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 500 u 1.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.8 @@ -16,10 +14,6 @@ gamma 1.4 [Boundary] X1-beg outflow X1-end outflow -X2-beg outflow -X2-end outflow -X3-beg outflow -X3-end outflow [Output] vtk 0.1 diff --git a/test/HD/sod/idefix-tvdlf.ini b/test/HD/sod/idefix-tvdlf.ini index 36133b9b..ef465164 100644 --- a/test/HD/sod/idefix-tvdlf.ini +++ b/test/HD/sod/idefix-tvdlf.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 500 u 1.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.8 @@ -16,10 +14,6 @@ gamma 1.4 [Boundary] X1-beg outflow X1-end outflow -X2-beg outflow -X2-end outflow -X3-beg outflow -X3-end outflow [Output] vtk 0.1 diff --git a/test/HD/sod/idefix.ini b/test/HD/sod/idefix.ini index b34a23c3..8e089ef6 100644 --- a/test/HD/sod/idefix.ini +++ b/test/HD/sod/idefix.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 500 u 1.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.8 @@ -16,10 +14,6 @@ gamma 1.4 [Boundary] X1-beg outflow X1-end outflow -X2-beg outflow -X2-end outflow -X3-beg outflow -X3-end outflow [Output] vtk 0.1 diff --git a/test/MHD/AmbipolarCshock/idefix-rkl.ini b/test/MHD/AmbipolarCshock/idefix-rkl.ini index e02b3415..76a21a44 100644 --- a/test/MHD/AmbipolarCshock/idefix-rkl.ini +++ b/test/MHD/AmbipolarCshock/idefix-rkl.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 100 u 50.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.9 @@ -17,10 +15,6 @@ csiso constant 0.1 [Boundary] X1-beg userdef X1-end userdef -X2-beg periodic -X2-end periodic -X3-beg periodic -X3-end periodic [Output] vtk 100.0 diff --git a/test/MHD/AmbipolarCshock/python/testidefix.py b/test/MHD/AmbipolarCshock/python/testidefix.py index ed622fdf..8c95dbb1 100755 --- a/test/MHD/AmbipolarCshock/python/testidefix.py +++ b/test/MHD/AmbipolarCshock/python/testidefix.py @@ -72,7 +72,7 @@ def f(x,D): Dth=np.zeros(x.shape) for i in range(x.size): r.set_initial_value(DSim[iref],x[iref]) - Dth[i]=r.integrate(x[i]) + Dth[i]=r.integrate(x[i]).item() #print("Dth[%d]=%g"%(i,Dth[i])) bTh=np.sqrt(b0**2+2*A**2*(Dth-1)*(1/Dth-1/M**2)) diff --git a/test/MHD/AmbipolarCshock3D/python/testidefix.py b/test/MHD/AmbipolarCshock3D/python/testidefix.py index 52f10b63..a7354fba 100755 --- a/test/MHD/AmbipolarCshock3D/python/testidefix.py +++ b/test/MHD/AmbipolarCshock3D/python/testidefix.py @@ -75,7 +75,7 @@ def f(x,D): Dth=np.zeros(x.shape) for i in range(x.size): r.set_initial_value(DSim[iref],x[iref]) - Dth[i]=r.integrate(x[i]) + Dth[i]=r.integrate(x[i]).item() #print("Dth[%d]=%g"%(i,Dth[i])) bTh=np.sqrt(b0**2+2*A**2*(Dth-1)*(1/Dth-1/M**2)) diff --git a/test/MHD/AmbipolarWind/idefix.ini b/test/MHD/AmbipolarWind/idefix.ini index 22d8006a..24dd839f 100644 --- a/test/MHD/AmbipolarWind/idefix.ini +++ b/test/MHD/AmbipolarWind/idefix.ini @@ -1,7 +1,6 @@ [Grid] X1-grid 1 1.0 768 l 100.0 X2-grid 3 0.0 64 s+ 1.28 96 u 1.861592653589 64 s- 3.141592653589793 -X3-grid 1 0.0 0 u 1.0 [TimeIntegrator] CFL 0.9 @@ -25,8 +24,6 @@ X1-beg userdef X1-end userdef X2-beg axis X2-end axis -X3-beg periodic -X3-end periodic [Setup] epsilon 0.05 diff --git a/test/MHD/FargoMHDSpherical/idefix.ini b/test/MHD/FargoMHDSpherical/idefix.ini index 4165ebc7..06bfcdf7 100644 --- a/test/MHD/FargoMHDSpherical/idefix.ini +++ b/test/MHD/FargoMHDSpherical/idefix.ini @@ -1,7 +1,7 @@ [Grid] -X1-grid 1 1.0 16 l 2.0 -X2-grid 1 1.2707963267948965 64 u 1.8707963267948966 -X3-grid 1 0.0 64 u 6.283185307179586 +X1-grid 1 1.0 16 l 2.0 +X2-grid 1 1.2707963267948965 16 u 1.8707963267948966 +X3-grid 1 0.0 128 u 6.283185307179586 [TimeIntegrator] CFL 0.5 diff --git a/test/MHD/FargoMHDSpherical/testme.py b/test/MHD/FargoMHDSpherical/testme.py index a09d3eeb..7ee3100b 100755 --- a/test/MHD/FargoMHDSpherical/testme.py +++ b/test/MHD/FargoMHDSpherical/testme.py @@ -53,3 +53,7 @@ def testMe(test): test.vectPot=False test.mpi=True testMe(test) + + test.vectPot=True + test.mpi=True + testMe(test) diff --git a/test/MHD/MTI/idefix-rkl.ini b/test/MHD/MTI/idefix-rkl.ini index 2eeb7615..1b9b11eb 100644 --- a/test/MHD/MTI/idefix-rkl.ini +++ b/test/MHD/MTI/idefix-rkl.ini @@ -1,7 +1,6 @@ [Grid] X1-grid 1 0. 32 u 0.1 X2-grid 1 0. 32 u 0.1 -X3-grid 1 0. 1 u 1. [TimeIntegrator] CFL 0.7 @@ -24,8 +23,6 @@ X1-beg periodic X1-end periodic X2-beg userdef X2-end userdef -X3-beg userdef -X3-end userdef [Setup] ksi 5e-4 diff --git a/test/MHD/MTI/idefix-sl.ini b/test/MHD/MTI/idefix-sl.ini index de020034..f2c9deb2 100644 --- a/test/MHD/MTI/idefix-sl.ini +++ b/test/MHD/MTI/idefix-sl.ini @@ -1,7 +1,6 @@ [Grid] X1-grid 1 0. 32 u 0.1 X2-grid 1 0. 32 u 0.1 -X3-grid 1 0. 1 u 1. [TimeIntegrator] CFL 0.7 @@ -24,8 +23,6 @@ X1-beg periodic X1-end periodic X2-beg userdef X2-end userdef -X3-beg userdef -X3-end userdef [Setup] ksi 5e-4 diff --git a/test/MHD/MTI/idefix.ini b/test/MHD/MTI/idefix.ini index b54bedb0..7a09c406 100644 --- a/test/MHD/MTI/idefix.ini +++ b/test/MHD/MTI/idefix.ini @@ -1,7 +1,6 @@ [Grid] X1-grid 1 0. 32 u 0.1 X2-grid 1 0. 32 u 0.1 -X3-grid 1 0. 1 u 1. [TimeIntegrator] CFL 0.7 @@ -24,8 +23,6 @@ X1-beg periodic X1-end periodic X2-beg userdef X2-end userdef -X3-beg userdef -X3-end userdef [Setup] ksi 5e-4 diff --git a/test/MHD/OrszagTang/idefix-hll.ini b/test/MHD/OrszagTang/idefix-hll.ini index 3dd96a58..4f13fd97 100644 --- a/test/MHD/OrszagTang/idefix-hll.ini +++ b/test/MHD/OrszagTang/idefix-hll.ini @@ -1,7 +1,6 @@ [Grid] X1-grid 1 0.0 128 u 1.0 X2-grid 1 0.0 128 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.6 @@ -17,8 +16,6 @@ X1-beg periodic X1-end periodic X2-beg periodic X2-end periodic -X3-beg outflow -X3-end outflow [Output] vtk 0.5 diff --git a/test/MHD/OrszagTang/idefix-hlld-arithmetic.ini b/test/MHD/OrszagTang/idefix-hlld-arithmetic.ini index b8549db5..8a656d7b 100644 --- a/test/MHD/OrszagTang/idefix-hlld-arithmetic.ini +++ b/test/MHD/OrszagTang/idefix-hlld-arithmetic.ini @@ -1,7 +1,6 @@ [Grid] X1-grid 1 0.0 128 u 1.0 X2-grid 1 0.0 128 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.6 @@ -18,8 +17,6 @@ X1-beg periodic X1-end periodic X2-beg periodic X2-end periodic -X3-beg outflow -X3-end outflow [Output] vtk 0.5 diff --git a/test/MHD/OrszagTang/idefix-hlld-hll.ini b/test/MHD/OrszagTang/idefix-hlld-hll.ini index 8c3e4ef9..b396e991 100644 --- a/test/MHD/OrszagTang/idefix-hlld-hll.ini +++ b/test/MHD/OrszagTang/idefix-hlld-hll.ini @@ -1,7 +1,6 @@ [Grid] X1-grid 1 0.0 128 u 1.0 X2-grid 1 0.0 128 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.6 @@ -18,8 +17,6 @@ X1-beg periodic X1-end periodic X2-beg periodic X2-end periodic -X3-beg outflow -X3-end outflow [Output] vtk 0.5 diff --git a/test/MHD/OrszagTang/idefix-hlld-hlld.ini b/test/MHD/OrszagTang/idefix-hlld-hlld.ini index 50e15897..5e158b93 100644 --- a/test/MHD/OrszagTang/idefix-hlld-hlld.ini +++ b/test/MHD/OrszagTang/idefix-hlld-hlld.ini @@ -1,7 +1,6 @@ [Grid] X1-grid 1 0.0 128 u 1.0 X2-grid 1 0.0 128 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.6 @@ -18,8 +17,6 @@ X1-beg periodic X1-end periodic X2-beg periodic X2-end periodic -X3-beg outflow -X3-end outflow [Output] vtk 0.5 diff --git a/test/MHD/OrszagTang/idefix-hlld-uct0.ini b/test/MHD/OrszagTang/idefix-hlld-uct0.ini index fc32e81b..23646b96 100644 --- a/test/MHD/OrszagTang/idefix-hlld-uct0.ini +++ b/test/MHD/OrszagTang/idefix-hlld-uct0.ini @@ -1,7 +1,6 @@ [Grid] X1-grid 1 0.0 128 u 1.0 X2-grid 1 0.0 128 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.6 @@ -18,8 +17,6 @@ X1-beg periodic X1-end periodic X2-beg periodic X2-end periodic -X3-beg outflow -X3-end outflow [Output] vtk 0.5 diff --git a/test/MHD/OrszagTang/idefix-hlld.ini b/test/MHD/OrszagTang/idefix-hlld.ini index cf0b0c09..cf6d5cbf 100644 --- a/test/MHD/OrszagTang/idefix-hlld.ini +++ b/test/MHD/OrszagTang/idefix-hlld.ini @@ -1,7 +1,6 @@ [Grid] X1-grid 1 0.0 128 u 1.0 X2-grid 1 0.0 128 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.6 @@ -17,8 +16,6 @@ X1-beg periodic X1-end periodic X2-beg periodic X2-end periodic -X3-beg outflow -X3-end outflow [Output] vtk 0.5 diff --git a/test/MHD/OrszagTang/idefix-tvdlf.ini b/test/MHD/OrszagTang/idefix-tvdlf.ini index 47a05bb9..ec9ffe85 100644 --- a/test/MHD/OrszagTang/idefix-tvdlf.ini +++ b/test/MHD/OrszagTang/idefix-tvdlf.ini @@ -1,7 +1,6 @@ [Grid] X1-grid 1 0.0 128 u 1.0 X2-grid 1 0.0 128 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.6 @@ -17,8 +16,6 @@ X1-beg periodic X1-end periodic X2-beg periodic X2-end periodic -X3-beg outflow -X3-end outflow [Output] vtk 0.5 diff --git a/test/MHD/OrszagTang/idefix.ini b/test/MHD/OrszagTang/idefix.ini index e3afb65b..0e742184 100644 --- a/test/MHD/OrszagTang/idefix.ini +++ b/test/MHD/OrszagTang/idefix.ini @@ -1,7 +1,6 @@ [Grid] X1-grid 1 0.0 128 u 1.0 X2-grid 1 0.0 128 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.6 @@ -17,8 +16,6 @@ X1-beg periodic X1-end periodic X2-beg periodic X2-end periodic -X3-beg outflow -X3-end outflow [Output] vtk 0.5 diff --git a/test/MHD/ResistiveAlfvenWave/idefix-rkl.ini b/test/MHD/ResistiveAlfvenWave/idefix-rkl.ini index 29299b06..eed2139f 100644 --- a/test/MHD/ResistiveAlfvenWave/idefix-rkl.ini +++ b/test/MHD/ResistiveAlfvenWave/idefix-rkl.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 128 u 1.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.9 @@ -16,10 +14,6 @@ resistivity rkl constant 0.05 [Boundary] X1-beg periodic X1-end periodic -X2-beg periodic -X2-end periodic -X3-beg periodic -X3-end periodic [Output] # vtk 0.1 diff --git a/test/MHD/ResistiveAlfvenWave/idefix.ini b/test/MHD/ResistiveAlfvenWave/idefix.ini index 60873036..b09cb0a6 100644 --- a/test/MHD/ResistiveAlfvenWave/idefix.ini +++ b/test/MHD/ResistiveAlfvenWave/idefix.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 128 u 1.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.9 @@ -16,10 +14,6 @@ resistivity explicit constant 0.05 [Boundary] X1-beg periodic X1-end periodic -X2-beg periodic -X2-end periodic -X3-beg periodic -X3-end periodic [Output] # vtk 0.1 diff --git a/test/MHD/RotorCartesian/idefix.ini b/test/MHD/RotorCartesian/idefix.ini index ecac9205..54d785ab 100644 --- a/test/MHD/RotorCartesian/idefix.ini +++ b/test/MHD/RotorCartesian/idefix.ini @@ -1,7 +1,6 @@ [Grid] X1-grid 1 -0.5 512 u 0.5 X2-grid 1 -0.5 512 u 0.5 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.2 @@ -19,8 +18,6 @@ X1-beg outflow X1-end outflow X2-beg outflow X2-end outflow -X3-beg outflow -X3-end outflow [Output] vtk 0.01 -1 single_file diff --git a/test/MHD/RotorPolar/idefix.ini b/test/MHD/RotorPolar/idefix.ini index b893ed12..ca88369b 100644 --- a/test/MHD/RotorPolar/idefix.ini +++ b/test/MHD/RotorPolar/idefix.ini @@ -1,7 +1,6 @@ [Grid] X1-grid 1 0.05 256 u 0.5 X2-grid 1 0.0 1024 u 6.283185307179586 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.2 @@ -19,8 +18,6 @@ X1-beg userdef X1-end outflow X2-beg periodic X2-end periodic -X3-beg outflow -X3-end outflow [Output] uservar Vx Vy diff --git a/test/MHD/sod-iso/idefix-hll.ini b/test/MHD/sod-iso/idefix-hll.ini index be20a405..52af4cfe 100644 --- a/test/MHD/sod-iso/idefix-hll.ini +++ b/test/MHD/sod-iso/idefix-hll.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 800 u 100.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.8 @@ -16,10 +14,6 @@ csiso constant 1.0 [Boundary] X1-beg outflow X1-end outflow -X2-beg periodic -X2-end periodic -X3-beg periodic -X3-end periodic [Output] vtk 10.0 diff --git a/test/MHD/sod-iso/idefix-hlld-rk3.ini b/test/MHD/sod-iso/idefix-hlld-rk3.ini index aa0723e7..2390b88f 100644 --- a/test/MHD/sod-iso/idefix-hlld-rk3.ini +++ b/test/MHD/sod-iso/idefix-hlld-rk3.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 800 u 100.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.8 @@ -16,10 +14,6 @@ csiso constant 1.0 [Boundary] X1-beg outflow X1-end outflow -X2-beg periodic -X2-end periodic -X3-beg periodic -X3-end periodic [Output] vtk 10.0 diff --git a/test/MHD/sod-iso/idefix-hlld.ini b/test/MHD/sod-iso/idefix-hlld.ini index f9acb7aa..1a8cfee9 100644 --- a/test/MHD/sod-iso/idefix-hlld.ini +++ b/test/MHD/sod-iso/idefix-hlld.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 800 u 100.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.8 @@ -16,10 +14,6 @@ csiso constant 1.0 [Boundary] X1-beg outflow X1-end outflow -X2-beg periodic -X2-end periodic -X3-beg periodic -X3-end periodic [Output] vtk 10.0 diff --git a/test/MHD/sod-iso/idefix-rk3.ini b/test/MHD/sod-iso/idefix-rk3.ini index 6e6cd525..602f3492 100644 --- a/test/MHD/sod-iso/idefix-rk3.ini +++ b/test/MHD/sod-iso/idefix-rk3.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 800 u 100.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.8 @@ -16,10 +14,6 @@ csiso constant 1.0 [Boundary] X1-beg outflow X1-end outflow -X2-beg periodic -X2-end periodic -X3-beg periodic -X3-end periodic [Output] vtk 10.0 diff --git a/test/MHD/sod-iso/idefix-tvdlf.ini b/test/MHD/sod-iso/idefix-tvdlf.ini index 32a33959..97195411 100644 --- a/test/MHD/sod-iso/idefix-tvdlf.ini +++ b/test/MHD/sod-iso/idefix-tvdlf.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 800 u 100.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.8 @@ -16,10 +14,6 @@ csiso constant 1.0 [Boundary] X1-beg outflow X1-end outflow -X2-beg periodic -X2-end periodic -X3-beg periodic -X3-end periodic [Output] vtk 10.0 diff --git a/test/MHD/sod-iso/idefix.ini b/test/MHD/sod-iso/idefix.ini index 075eb2ae..134359d5 100644 --- a/test/MHD/sod-iso/idefix.ini +++ b/test/MHD/sod-iso/idefix.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 800 u 100.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.8 @@ -16,10 +14,6 @@ csiso constant 1.0 [Boundary] X1-beg outflow X1-end outflow -X2-beg periodic -X2-end periodic -X3-beg periodic -X3-end periodic [Output] vtk 10.0 diff --git a/test/MHD/sod/idefix-hll.ini b/test/MHD/sod/idefix-hll.ini index c6c5dbb1..e353fa75 100644 --- a/test/MHD/sod/idefix-hll.ini +++ b/test/MHD/sod/idefix-hll.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 800 u 100.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.8 @@ -18,10 +16,6 @@ gamma 1.66666666666667 # not used X1-beg outflow X1-end outflow -X2-beg periodic -X2-end periodic -X3-beg periodic -X3-end periodic [Output] vtk 10.0 diff --git a/test/MHD/sod/idefix-hlld-rk3.ini b/test/MHD/sod/idefix-hlld-rk3.ini index 68aeee11..02925c52 100644 --- a/test/MHD/sod/idefix-hlld-rk3.ini +++ b/test/MHD/sod/idefix-hlld-rk3.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 800 u 100.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.8 @@ -18,10 +16,6 @@ gamma 1.66666666666667 # not used X1-beg outflow X1-end outflow -X2-beg periodic -X2-end periodic -X3-beg periodic -X3-end periodic [Output] vtk 10.0 diff --git a/test/MHD/sod/idefix-hlld.ini b/test/MHD/sod/idefix-hlld.ini index cfbd486e..d8111420 100644 --- a/test/MHD/sod/idefix-hlld.ini +++ b/test/MHD/sod/idefix-hlld.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 800 u 100.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.8 @@ -18,10 +16,6 @@ gamma 1.66666666666667 # not used X1-beg outflow X1-end outflow -X2-beg periodic -X2-end periodic -X3-beg periodic -X3-end periodic [Output] vtk 10.0 diff --git a/test/MHD/sod/idefix-rk3.ini b/test/MHD/sod/idefix-rk3.ini index c1926956..b074218e 100644 --- a/test/MHD/sod/idefix-rk3.ini +++ b/test/MHD/sod/idefix-rk3.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 800 u 100.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.8 @@ -16,10 +14,6 @@ gamma 1.66666666666667 [Boundary] X1-beg outflow X1-end outflow -X2-beg periodic -X2-end periodic -X3-beg periodic -X3-end periodic [Output] vtk 10.0 diff --git a/test/MHD/sod/idefix-tvdlf.ini b/test/MHD/sod/idefix-tvdlf.ini index 4bbc10c4..305cc2fc 100644 --- a/test/MHD/sod/idefix-tvdlf.ini +++ b/test/MHD/sod/idefix-tvdlf.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 800 u 100.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.8 @@ -18,10 +16,6 @@ gamma 1.66666666666667 # not used X1-beg outflow X1-end outflow -X2-beg periodic -X2-end periodic -X3-beg periodic -X3-end periodic [Output] vtk 10.0 diff --git a/test/MHD/sod/idefix.ini b/test/MHD/sod/idefix.ini index 67741314..39c846dc 100644 --- a/test/MHD/sod/idefix.ini +++ b/test/MHD/sod/idefix.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 800 u 100.0 -X2-grid 1 0.0 1 u 1.0 -X3-grid 1 0.0 1 u 1.0 [TimeIntegrator] CFL 0.8 @@ -16,10 +14,6 @@ gamma 1.66666666666667 [Boundary] X1-beg outflow X1-end outflow -X2-beg periodic -X2-end periodic -X3-beg periodic -X3-end periodic [Output] vtk 10.0 diff --git a/test/Planet/Planet3Body/idefix.ini b/test/Planet/Planet3Body/idefix.ini index a8b7bea0..4e354bf9 100644 --- a/test/Planet/Planet3Body/idefix.ini +++ b/test/Planet/Planet3Body/idefix.ini @@ -1,7 +1,6 @@ [Grid] -X1-grid 1 0.042 64 u 2.3 -X2-grid 1 0.0 32 u 6.283185307179586 -X3-grid 1 -0.00125 1 u 0.00125 +X1-grid 1 0.042 64 u 2.3 +X2-grid 1 0.0 32 u 6.283185307179586 [TimeIntegrator] CFL 0.5 @@ -26,8 +25,6 @@ X1-beg userdef X1-end userdef X2-beg periodic X2-end periodic -X3-beg outflow -X3-end outflow [Setup] sigma0 0.001 diff --git a/test/Planet/PlanetMigration2D/idefix.ini b/test/Planet/PlanetMigration2D/idefix.ini index 2be56b1a..04259b9e 100644 --- a/test/Planet/PlanetMigration2D/idefix.ini +++ b/test/Planet/PlanetMigration2D/idefix.ini @@ -1,7 +1,6 @@ [Grid] -X1-grid 1 0.42 192 u 2.14 -X2-grid 1 0.0 768 u 6.283185307179586 -X3-grid 1 -0.0125 1 u 0.0125 +X1-grid 1 0.42 192 u 2.14 +X2-grid 1 0.0 768 u 6.283185307179586 [TimeIntegrator] CFL 0.5 @@ -29,8 +28,6 @@ X1-beg userdef X1-end userdef X2-beg periodic X2-end periodic -X3-beg outflow -X3-end outflow [Setup] sigma0 0.001 diff --git a/test/Planet/PlanetPlanetRK42D/idefix.ini b/test/Planet/PlanetPlanetRK42D/idefix.ini index cbcf3c29..bf9a6bda 100644 --- a/test/Planet/PlanetPlanetRK42D/idefix.ini +++ b/test/Planet/PlanetPlanetRK42D/idefix.ini @@ -1,7 +1,6 @@ [Grid] -X1-grid 1 0.42 96 u 2.14 -X2-grid 1 0.0 384 u 6.283185307179586 -X3-grid 1 -0.0125 1 u 0.0125 +X1-grid 1 0.42 96 u 2.14 +X2-grid 1 0.0 384 u 6.283185307179586 [TimeIntegrator] CFL 0.5 @@ -24,8 +23,6 @@ X1-beg userdef X1-end userdef X2-beg periodic X2-end periodic -X3-beg outflow -X3-end outflow [Setup] sigma0 0.001 diff --git a/test/Planet/PlanetSpiral2D/idefix.ini b/test/Planet/PlanetSpiral2D/idefix.ini index 9864a223..b030e4a4 100644 --- a/test/Planet/PlanetSpiral2D/idefix.ini +++ b/test/Planet/PlanetSpiral2D/idefix.ini @@ -1,7 +1,6 @@ [Grid] -X1-grid 1 0.42 128 u 2.14 -X2-grid 1 0.0 512 u 6.283185307179586 -X3-grid 1 -0.0125 1 u 0.0125 +X1-grid 1 0.42 128 u 2.14 +X2-grid 1 0.0 512 u 6.283185307179586 [TimeIntegrator] CFL 0.5 @@ -28,8 +27,6 @@ X1-beg userdef X1-end userdef X2-beg periodic X2-end periodic -X3-beg outflow -X3-end outflow [Setup] sigma0 1.0 diff --git a/test/Planet/PlanetsIsActiveRK52D/idefix-rk4.ini b/test/Planet/PlanetsIsActiveRK52D/idefix-rk4.ini index c714362f..7fbedc65 100644 --- a/test/Planet/PlanetsIsActiveRK52D/idefix-rk4.ini +++ b/test/Planet/PlanetsIsActiveRK52D/idefix-rk4.ini @@ -1,7 +1,6 @@ [Grid] -X1-grid 1 0.42 48 u 2.14 -X2-grid 1 0.0 192 u 6.283185307179586 -X3-grid 1 -0.0125 1 u 0.0125 +X1-grid 1 0.42 48 u 2.14 +X2-grid 1 0.0 192 u 6.283185307179586 [TimeIntegrator] CFL 0.5 @@ -24,8 +23,6 @@ X1-beg userdef X1-end userdef X2-beg periodic X2-end periodic -X3-beg outflow -X3-end outflow [Setup] sigma0 0.001 diff --git a/test/Planet/PlanetsIsActiveRK52D/idefix-rk5.ini b/test/Planet/PlanetsIsActiveRK52D/idefix-rk5.ini index 8f1f8a11..44b22327 100644 --- a/test/Planet/PlanetsIsActiveRK52D/idefix-rk5.ini +++ b/test/Planet/PlanetsIsActiveRK52D/idefix-rk5.ini @@ -1,7 +1,6 @@ [Grid] -X1-grid 1 0.42 48 u 2.14 -X2-grid 1 0.0 192 u 6.283185307179586 -X3-grid 1 -0.0125 1 u 0.0125 +X1-grid 1 0.42 48 u 2.14 +X2-grid 1 0.0 192 u 6.283185307179586 [TimeIntegrator] CFL 0.5 @@ -24,8 +23,6 @@ X1-beg userdef X1-end userdef X2-beg periodic X2-end periodic -X3-beg outflow -X3-end outflow [Setup] sigma0 0.001 diff --git a/test/SelfGravity/DustyCollapse/idefix.ini b/test/SelfGravity/DustyCollapse/idefix.ini index 37976368..d650cc88 100644 --- a/test/SelfGravity/DustyCollapse/idefix.ini +++ b/test/SelfGravity/DustyCollapse/idefix.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.1 4096 l 3e4 -X2-grid 1 0 64 u 3.14159265358979 -X3-grid 1 0 64 u 6.28318530717958 [TimeIntegrator] CFL 0.2 @@ -25,18 +23,10 @@ targetError 1e-7 maxIter 10000 boundary-X1-beg nullgrad boundary-X1-end nullpot -boundary-X2-beg axis -boundary-X2-end axis -boundary-X3-beg periodic -boundary-X3-end periodic [Boundary] X1-beg outflow X1-end outflow -X2-beg periodic -X2-end periodic -X3-beg periodic -X3-end periodic [Output] dmp 1 diff --git a/test/SelfGravity/JeansInstability/idefix-cg.ini b/test/SelfGravity/JeansInstability/idefix-cg.ini index 97f1e6c9..3b40ba82 100644 --- a/test/SelfGravity/JeansInstability/idefix-cg.ini +++ b/test/SelfGravity/JeansInstability/idefix-cg.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 1000 u 10.0 -X2-grid 1 0.0 100 u 10.0 -X3-grid 1 0.0 100 u 10.0 [TimeIntegrator] CFL 0.8 @@ -24,18 +22,10 @@ solver CG targetError 1e-6 boundary-X1-beg periodic boundary-X1-end periodic -boundary-X2-beg periodic -boundary-X2-end periodic -boundary-X3-beg periodic -boundary-X3-end periodic [Boundary] X1-beg periodic X1-end periodic -X2-beg periodic -X2-end periodic -X3-beg periodic -X3-end periodic [Output] vtk 0.1 diff --git a/test/SelfGravity/JeansInstability/idefix.ini b/test/SelfGravity/JeansInstability/idefix.ini index 47101406..c21b52b5 100644 --- a/test/SelfGravity/JeansInstability/idefix.ini +++ b/test/SelfGravity/JeansInstability/idefix.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 0.0 1000 u 10.0 -X2-grid 1 0.0 100 u 10.0 -X3-grid 1 0.0 100 u 10.0 [TimeIntegrator] CFL 0.8 @@ -24,18 +22,10 @@ targetError 1e-6 # skip 2 boundary-X1-beg periodic boundary-X1-end periodic -boundary-X2-beg periodic -boundary-X2-end periodic -boundary-X3-beg periodic -boundary-X3-end periodic [Boundary] X1-beg periodic X1-end periodic -X2-beg periodic -X2-end periodic -X3-beg periodic -X3-end periodic [Output] vtk 0.1 diff --git a/test/SelfGravity/UniformCollapse/idefix.ini b/test/SelfGravity/UniformCollapse/idefix.ini index d5f8e4a4..e0e74a36 100644 --- a/test/SelfGravity/UniformCollapse/idefix.ini +++ b/test/SelfGravity/UniformCollapse/idefix.ini @@ -1,7 +1,5 @@ [Grid] X1-grid 1 .01 100 l 1000. -X2-grid 1 0.0 20 u 3.141592653589793 -X3-grid 1 0.0 20 u 6.283185307179586 [TimeIntegrator] CFL 0.8 @@ -25,18 +23,10 @@ skip 5 targetError 1e-6 boundary-X1-beg origin boundary-X1-end nullpot -boundary-X2-beg periodic -boundary-X2-end periodic -boundary-X3-beg periodic -boundary-X3-end periodic [Boundary] X1-beg userdef X1-end outflow -X2-beg periodic -X2-end periodic -X3-beg periodic -X3-end periodic [Output] analysis 10.