AMReX-Codes / amrex

AMReX: Software Framework for Block Structured AMR
https://amrex-codes.github.io/amrex
Other
536 stars 343 forks source link

how to assign the nth component of a Multifab to an Array4 #3922

Closed ztdepztdep closed 4 months ago

ztdepztdep commented 5 months ago

I have define a Multifab F with 9 components, and I want to extract the nth components to an Array4. how to resolve this problem?

Array4 statein = F.const_array(mfi); ?

WeiqunZhang commented 5 months ago
auto statein = F.const_array(mfi,n);