Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cargrid output #627

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Cargrid output #627

wants to merge 7 commits into from

Conversation

dradice
Copy link
Collaborator

@dradice dradice commented Jan 25, 2025

CartesianGridOutput can output any variable in a Cartesian box (within the simulation domain) at a prescribed position and extent.

To use it, add a block to the output file like this:

            <output3>
            file_type  = cart
            variable   = hydro_w
            dt         = 0.1
            center_x   = 0.0
            center_y   = 0.0
            center_z   = 0.0
            extent_x   = 0.1
            extent_y   = 0.1
            extent_z   = 0.2
            chebyshev  = 1      # 0:uniform grid; 1:Chebyshev-Lobatto grid

Note that the extent of the grid is actually twice of the extent variable. This is because we are using the same convention as in CartesianGrid.

This commit also adds vis/python/cartgrid.py to read the data produced by CartesianGridOutput

Fix bug when interpolating on Chebyshev grid in which the indices were
computed with the Chebyshev grids, but the interpolation weights still
used the Cartesian grid
`CartesianGridOutput` can output any variable in a Cartesian box (within
the simulation domain) at a prescribed position and extent.

To use it, add a block to the output file like this:

```
        <output3>
        file_type  = cart
        variable   = hydro_w
        dt         = 0.1
        center_x   = 0.0
        center_y   = 0.0
        center_z   = 0.0
        extent_x   = 0.1
        extent_y   = 0.1
        extent_z   = 0.2
        chebyshev  = 1      # 0:uniform grid; 1:Chebyshev-Lobatto grid
```

Note that the extent of the grid is actually half of the extent
variable. This is because we are using the same convention as in
`CartesianGrid`.

This commit also adds `vis/python/cartgrid.py` to read the data produced
by `CartesianGridOutput`
@dradice dradice requested a review from HengruiZhu99 January 25, 2025 18:08
Reset CartesianGrid interpolation indices and weights before
interpolation if AMR is enabled
@HengruiZhu99
Copy link
Collaborator

Thanks for catching the bug in AMR. I commented those out for debug earlier and forgot to remove those when committing to the repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants