-
Notifications
You must be signed in to change notification settings - Fork 202
supporting nlev>0 in BTD output #4526
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
base: development
Are you sure you want to change the base?
supporting nlev>0 in BTD output #4526
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
@@ -187,10 +187,10 @@ private: | |||
amrex::Vector<amrex::IntVect> m_snapshot_ncells_lab; | |||
/** Vector of Box-dimension in boosted-frame index space | |||
* for each back-transformed snapshot */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* for each back-transformed snapshot */ | |
* for each back-transformed snapshot (inner vector) | |
* and level (outer vector) */ |
@@ -187,10 +187,10 @@ private: | |||
amrex::Vector<amrex::IntVect> m_snapshot_ncells_lab; | |||
/** Vector of Box-dimension in boosted-frame index space | |||
* for each back-transformed snapshot */ | |||
amrex::Vector<amrex::Box> m_snapshot_box; | |||
amrex::Vector< amrex::Vector <amrex::Box> > m_snapshot_box; | |||
/** Vector of Box-dimension in boosted-frame index space corresponding to the | |||
* buffer that covers a part of the full backtransformed snapshot */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* buffer that covers a part of the full backtransformed snapshot */ | |
* buffer that covers a part of the full backtransformed snapshot | |
* (inner vector) and level (outer vector) */ |
@@ -238,7 +238,7 @@ private: | |||
/** Vector of k-indices in the hi-end along the moving window direction for the buffer being filled | |||
* for each snapshot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* for each snapshot. | |
* for each snapshot (inner vector) and level (outer vector) */ |
@@ -307,8 +307,8 @@ private: | |||
* returns bool = true is buffer is full, that is, | |||
when buffer counter is equal to m_buffer_size | |||
*/ | |||
bool buffer_full (int i_buffer) { | |||
return (k_index_zlab(i_buffer,0) == m_buffer_box[i_buffer].smallEnd(m_moving_window_dir)); | |||
bool buffer_full (int i_buffer, const int lev) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bool buffer_full (int i_buffer, const int lev) { | |
bool buffer_full (int i_buffer, int lev) { |
int get_buffer_k_index_hi (int i_buffer, const int lev) override {return m_buffer_k_index_hi[i_buffer][lev]; } | ||
void set_buffer_k_index_hi (int i_buffer, int kindex, const int lev) override {m_buffer_k_index_hi[i_buffer][lev] = kindex;} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int get_buffer_k_index_hi (int i_buffer, const int lev) override {return m_buffer_k_index_hi[i_buffer][lev]; } | |
void set_buffer_k_index_hi (int i_buffer, int kindex, const int lev) override {m_buffer_k_index_hi[i_buffer][lev] = kindex;} | |
int get_buffer_k_index_hi (int i_buffer, int lev) override {return m_buffer_k_index_hi[i_buffer][lev]; } | |
void set_buffer_k_index_hi (int i_buffer, int kindex, int lev) override {m_buffer_k_index_hi[i_buffer][lev] = kindex;} |
@@ -412,8 +412,8 @@ private: | |||
|
|||
amrex::Real gettlab (int i_buffer) override {return m_t_lab[i_buffer];} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add doxygen strings for function use and parameters :)
auto is_buffer_full = false; | ||
//const int nlevels = m_particles_buffer[i_buffer][0]->numLevels(); | ||
for (int lev = 0 ; lev < nmax_lev; ++lev) { | ||
is_buffer_full = buffer_full(i_buffer, lev); | ||
} | ||
|
||
// or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting indent is off here a bit :)
@@ -825,9 +835,12 @@ BTDiagnostics::PrepareFieldDataForOutput () | |||
// and box-indices | |||
DefineSnapshotGeometry(i_buffer, lev); | |||
} | |||
//amrex::Print() << "lev = " << lev << " : DefineFieldBufferMultiFab called -- " << "\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//amrex::Print() << "lev = " << lev << " : DefineFieldBufferMultiFab called -- " << "\n"; |
@@ -801,12 +811,12 @@ BTDiagnostics::PrepareFieldDataForOutput () | |||
warpx.Geom(lev).periodicity()); | |||
} | |||
// Flattening out MF over levels |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused code :)
//amrex::Print() << "buffer_ba = " << buffer_ba << "\n"; | ||
//amrex::Print() << "buffer_dmap = " << buffer_dmap << "\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//amrex::Print() << "buffer_ba = " << buffer_ba << "\n"; | |
//amrex::Print() << "buffer_dmap = " << buffer_dmap << "\n"; |
I have taken @prkkumar 's PR (#4197)
and modified to include some more bug fixes.
Current status :
BTD field output for multiple levels is now working.