You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am interested in being able to write effectively 2d slices of my 3d multilevel domain. I have seen some previous discussion of this and have tried to follow that approach but I am having issues.
Here is my implementation:
`void MyLevel::sliceWriter(const Output* out, int slice_dir, Real slice_coord) {
std::unique_ptramrex::MultiFab MyLevel::createSelectedVariableMultiFab(
const std::vectorstd::string& var_names, int lev) const {
MyLevel& amr_level = static_cast<MyLevel&>(parent->getLevel(lev));
const amrex::MultiFab& ref_mf = amr_level.get_new_data(Conserved_Type);
int ncomp = var_names.size();
auto output_mf = std::make_unique<amrex::MultiFab>(ref_mf.boxArray(), ref_mf.DistributionMap(), ncomp, 0);
for (int i = 0; i < ncomp; ++i) {
StateType stateType = varMap[var_names[i]].first;
int comp = varMap[var_names[i]].second;
const amrex::MultiFab& source_mf = amr_level.get_new_data(stateType);
amrex::MultiFab::Copy(*output_mf, source_mf, comp, i, 1, 0);
}
return output_mf;
}
`
The main issue is that when I open the plotfile in paraview all the levels appear at once and overlap and clip into each other. Is there an obvious error in my method?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am interested in being able to write effectively 2d slices of my 3d multilevel domain. I have seen some previous discussion of this and have tried to follow that approach but I am having issues.
Here is my implementation:
`void MyLevel::sliceWriter(const Output* out, int slice_dir, Real slice_coord) {
}
std::unique_ptramrex::MultiFab MyLevel::createSlicedMultiFab(
const amrex::MultiFab& mf, int slice_dir, Real slice_coord, Geometry levG) const {
}
std::unique_ptramrex::MultiFab MyLevel::createSelectedVariableMultiFab(
const std::vectorstd::string& var_names, int lev) const {
}
`
The main issue is that when I open the plotfile in paraview all the levels appear at once and overlap and clip into each other. Is there an obvious error in my method?
Beta Was this translation helpful? Give feedback.
All reactions