Skip to content

Commit 3a65748

Browse files
committed
expose rho and F to sensei
1 parent 7807bed commit 3a65748

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Source/WarpXIO.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,8 @@ WarpX::UpdateInSitu () const
474474
+ static_cast<int>(plot_proc_number)
475475
+ static_cast<int>(plot_divb)
476476
+ static_cast<int>(plot_dive)
477+
+ static_cast<int>(plot_rho)
478+
+ static_cast<int>(plot_F)
477479
+ static_cast<int>(plot_finepatch)*6
478480
+ static_cast<int>(plot_crsepatch)*6
479481
+ static_cast<int>(costs[0] != nullptr);
@@ -622,6 +624,26 @@ WarpX::UpdateInSitu () const
622624
dcomp += 1;
623625
}
624626

627+
if (plot_rho)
628+
{
629+
amrex::average_node_to_cellcenter(mf[lev], dcomp, *rho_fp[lev], 0, 1);
630+
if (lev == 0)
631+
{
632+
varnames.push_back("rho");
633+
}
634+
dcomp += 1;
635+
}
636+
637+
if (plot_F)
638+
{
639+
amrex::average_node_to_cellcenter(mf[lev], dcomp, *F_fp[lev], 0, 1);
640+
if (lev == 0)
641+
{
642+
varnames.push_back("F");
643+
}
644+
dcomp += 1;
645+
}
646+
625647
if (plot_finepatch)
626648
{
627649
PackPlotDataPtrs(srcmf, Efield_fp[lev]);

0 commit comments

Comments
 (0)