aboutsummaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/Diagnostics/BoostedFrameDiagnostic.H14
-rw-r--r--Source/Diagnostics/BoostedFrameDiagnostic.cpp28
2 files changed, 5 insertions, 37 deletions
diff --git a/Source/Diagnostics/BoostedFrameDiagnostic.H b/Source/Diagnostics/BoostedFrameDiagnostic.H
index d3546448e..16e00996c 100644
--- a/Source/Diagnostics/BoostedFrameDiagnostic.H
+++ b/Source/Diagnostics/BoostedFrameDiagnostic.H
@@ -33,8 +33,6 @@ class BoostedFrameDiagnostic {
std::string file_name;
amrex::Real t_lab;
- // amrex::Real zmin_lab;
- // amrex::Real zmax_lab;
amrex::RealBox prob_domain_;
amrex::IntVect prob_ncells_;
@@ -48,10 +46,6 @@ class BoostedFrameDiagnostic {
int initial_i;
const BoostedFrameDiagnostic& my_bfd;
- //LabSnapShot(amrex::Real t_lab_in, amrex::Real t_boost,
- // amrex::Real zmin_lab_in,
- // amrex::Real zmax_lab_in, int file_num_in,
- // const BoostedFrameDiagnostic& bfd);
LabSnapShot(amrex::Real t_lab_in, amrex::Real t_boost,
const amrex::RealBox prob_domain,
const amrex::IntVect prob_ncells,
@@ -84,10 +78,6 @@ class BoostedFrameDiagnostic {
amrex::Real dt_snapshots_lab_;
amrex::Real dt_boost_;
int N_snapshots_;
- // amrex::IntVect prob_ncells_;
- // unsigned Nx_lab_;
- // unsigned Ny_lab_;
- // unsigned Nz_lab_;
int boost_direction_;
// For back-transformed diagnostics of grid fields, data_buffer_[i]
@@ -152,8 +142,8 @@ private:
// Name of fields to dump. By default, all fields in cell_centered_data.
// Needed for file headers only.
std::vector<std::string> mesh_field_names = {"Ex", "Ey", "Ez",
- "Bx", "By", "Bz",
- "jx", "jy", "jz", "rho"};
+ "Bx", "By", "Bz",
+ "jx", "jy", "jz", "rho"};
int ncomp_to_dump = 10;
};
diff --git a/Source/Diagnostics/BoostedFrameDiagnostic.cpp b/Source/Diagnostics/BoostedFrameDiagnostic.cpp
index c336b8399..e23269793 100644
--- a/Source/Diagnostics/BoostedFrameDiagnostic.cpp
+++ b/Source/Diagnostics/BoostedFrameDiagnostic.cpp
@@ -17,8 +17,6 @@ using namespace amrex;
namespace
{
const std::vector<std::string> particle_field_names = {"w", "x", "y", "z", "ux", "uy", "uz"};
- // const std::vector<std::string> mesh_field_names =
- // {"Ex", "Ey", "Ez", "Bx", "By", "Bz", "jx", "jy", "jz", "rho"};
/*
Creates the HDF5 file in truncate mode and closes it.
@@ -520,8 +518,8 @@ BoostedFrameDiagnostic(Real zmin_lab, Real zmax_lab, Real v_window_lab,
bool do_user_fields;
do_user_fields = pp.queryarr("boosted_frame_diag_fields",
user_fields_to_dump);
- // If user specifies fields to dump, overwrite ncomp_to_dump
- // and map_actual_fields_to_dump.
+ // If user specifies fields to dump, overwrite ncomp_to_dump,
+ // map_actual_fields_to_dump and mesh_field_names.
if (do_user_fields){
ncomp_to_dump = user_fields_to_dump.size();
map_actual_fields_to_dump.resize(ncomp_to_dump);
@@ -543,6 +541,7 @@ BoostedFrameDiagnostic(Real zmin_lab, Real zmax_lab, Real v_window_lab,
prob_domain.setLo(AMREX_SPACEDIM-1, zmin_lab + v_window_lab * t_lab);
prob_domain.setHi(AMREX_SPACEDIM-1, zmax_lab + v_window_lab * t_lab);
Print()<<"after "<<prob_domain<<std::endl;
+ // Construct LabSnapShot
LabSnapShot snapshot(t_lab, t_boost, prob_domain,
prob_ncells, ncomp_to_dump,
mesh_field_names, i, *this);
@@ -592,7 +591,6 @@ void BoostedFrameDiagnostic::Flush(const Geometry& geom)
#ifdef WARPX_USE_HDF5
for (int comp = 0; comp < ncomp; ++comp)
- // output_write_field(snapshots_[i].file_name, mesh_field_names[comp], tmp, comp);
output_write_field(snapshots_[i].file_name, mesh_field_names[comp], tmp, comp);
#else
std::stringstream ss;
@@ -740,8 +738,6 @@ writeLabFrameData(const MultiFab* cell_centered_data,
if (WarpX::do_boosted_frame_fields) {
#ifdef WARPX_USE_HDF5
for (int comp = 0; comp < data_buffer_[i]->nComp(); ++comp)
- // output_write_field(snapshots_[i].file_name, mesh_field_names[comp],
- // *data_buffer_[i], comp);
output_write_field(snapshots_[i].file_name, mesh_field_names[comp],
*data_buffer_[i], comp);
#else
@@ -905,25 +901,9 @@ writeMetaData ()
HeaderFile << dt_snapshots_lab_ << "\n";
HeaderFile << gamma_boost_ << "\n";
HeaderFile << beta_boost_ << "\n";
- /*
- // dx, dy and dz in the lab frame
- Real dx_lab_ = (prob_domain_.hi(0)-prob_domain_.hi(0))/Nx_lab_;
-#if (AMREX_SPACEDIM == 3)
- Real dy_lab_ = (prob_domain_.hi(1)-prob_domain_.hi(1))/Ny_lab_;
- HeaderFile << dx_lab_ << ' ' << dy_lab_ << ' ' << dz_lab_ << '\n';
-#else
- HeaderFile << dx_lab_ << ' ' << dz_lab_ << '\n';
-#endif
- // Number of cells in each direction
- HeaderFile << Nx_lab_ << ' ' << Ny_lab_ << ' ' << Nz_lab_ << "\n";
- */
}
}
-// LabSnapShot(Real t_lab_in, Real t_boost, Real zmin_lab_in,
-// Real zmax_lab_in, int file_num_in, const BoostedFrameDiagnostic& bfd)
- // zmin_lab(zmin_lab_in),
- // zmax_lab(zmax_lab_in),
BoostedFrameDiagnostic::LabSnapShot::
LabSnapShot(Real t_lab_in, Real t_boost, RealBox prob_domain,
IntVect prob_ncells,
@@ -959,8 +939,6 @@ LabSnapShot(Real t_lab_in, Real t_boost, RealBox prob_domain,
{
if (WarpX::do_boosted_frame_fields)
{
- // for (int comp = 0; comp < static_cast<int>(mesh_field_names.size()); ++comp) {
- // output_create_field(file_name, mesh_field_names[comp],
for (int comp = 0; comp ncomp_to_dump; ++comp) {
output_create_field(file_name, mesh_field_names_[comp],
prob_ncells_[0],