Skip to content

Is there anyway to slice a plane or line in MultiFab? #3662

Answered by WeiqunZhang
zhazhajust asked this question in Q&A
Discussion options

You must be logged in to vote

There is a function that may help, but probably does not do exactly what you want because it only works on cell centered data.

https://amrex-codes.github.io/amrex/doxygen/namespaceamrex.html#a3a431197f206b148529308a7796d5039

However, it should not be hard to extend it to other index types.

There is also a function called get_line_data

https://amrex-codes.github.io/amrex/doxygen/namespaceamrex.html#a7f08bece47186514a8d7ec979e4b87ca

One can use it to extract a line of data.

Note that both functions return a MultiFab, which is a distributed data container. That is the data might be on multiple processes.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@WeiqunZhang
Comment options

Answer selected by zhazhajust
@zhazhajust
Comment options

@WeiqunZhang
Comment options

@zhazhajust
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants