Skip to content

Commit aa233ae

Browse files
averageNtoCC and write cellcentered plotfile
1 parent ff42ec6 commit aa233ae

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ExampleCodes/EB/NodalPoisson/main.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,13 @@ int main (int argc, char* argv[])
132132
mlmg.solve({&phi}, {&q}, tol_rel, tol_abs);
133133

134134
//// store plotfile variables; q and phi
135-
//MultiFab plotfile_mf(grids, dmap, 2, 0, MFInfo(), factory);
135+
MultiFab plotfile_mf(grids, dmap, 2, 0, MFInfo(), factory);
136+
amrex::average_node_to_cellcenter(plotfile_mf, 0, q, 0, 1);
137+
amrex::average_node_to_cellcenter(plotfile_mf, 1, phi, 0, 1);
136138
//MultiFab::Copy(plotfile_mf, q,0,0,1,0);
137139
//MultiFab::Copy(plotfile_mf,phi,0,1,1,0);
138140

139-
//EB_WriteSingleLevelPlotfile("plt", plotfile_mf, {"q", "phi"}, geom, 0.0, 0);
141+
EB_WriteSingleLevelPlotfile("plt", plotfile_mf, {"q", "phi"}, geom, 0.0, 0);
140142
}
141143

142144
amrex::Finalize();

0 commit comments

Comments
 (0)