Skip to content

Commit 0337ee1

Browse files
authored
Rename Bold to B_old (#5312)
For consistency of naming with other fields, this might be a better spelling of the bold name :)
1 parent 31734d3 commit 0337ee1

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

Source/FieldSolver/ImplicitSolvers/ThetaImplicitEM.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ void ThetaImplicitEM::Define ( WarpX* const a_WarpX )
2424
m_E.Define( m_WarpX, "Efield_fp" );
2525
m_Eold.Define( m_E );
2626

27-
// Define Bold MultiFabs
27+
// Define B_old MultiFabs
2828
using ablastr::fields::Direction;
2929
const int num_levels = 1;
3030
for (int lev = 0; lev < num_levels; ++lev) {
@@ -33,9 +33,9 @@ void ThetaImplicitEM::Define ( WarpX* const a_WarpX )
3333
const auto& ba_Bz = m_WarpX->m_fields.get(FieldType::Bfield_fp, Direction{2}, lev)->boxArray();
3434
const auto& dm = m_WarpX->m_fields.get(FieldType::Bfield_fp, Direction{0}, lev)->DistributionMap();
3535
const amrex::IntVect ngb = m_WarpX->m_fields.get(FieldType::Bfield_fp, Direction{0}, lev)->nGrowVect();
36-
m_WarpX->m_fields.alloc_init(FieldType::Bold, Direction{0}, lev, ba_Bx, dm, 1, ngb, 0.0_rt);
37-
m_WarpX->m_fields.alloc_init(FieldType::Bold, Direction{1}, lev, ba_By, dm, 1, ngb, 0.0_rt);
38-
m_WarpX->m_fields.alloc_init(FieldType::Bold, Direction{2}, lev, ba_Bz, dm, 1, ngb, 0.0_rt);
36+
m_WarpX->m_fields.alloc_init(FieldType::B_old, Direction{0}, lev, ba_Bx, dm, 1, ngb, 0.0_rt);
37+
m_WarpX->m_fields.alloc_init(FieldType::B_old, Direction{1}, lev, ba_By, dm, 1, ngb, 0.0_rt);
38+
m_WarpX->m_fields.alloc_init(FieldType::B_old, Direction{2}, lev, ba_Bz, dm, 1, ngb, 0.0_rt);
3939
}
4040

4141
// Parse theta-implicit solver specific parameters
@@ -92,10 +92,10 @@ void ThetaImplicitEM::OneStep ( const amrex::Real a_time,
9292
const int num_levels = 1;
9393
for (int lev = 0; lev < num_levels; ++lev) {
9494
const ablastr::fields::VectorField Bfp = m_WarpX->m_fields.get_alldirs(FieldType::Bfield_fp, lev);
95-
ablastr::fields::VectorField Bold = m_WarpX->m_fields.get_alldirs(FieldType::Bold, lev);
95+
ablastr::fields::VectorField B_old = m_WarpX->m_fields.get_alldirs(FieldType::B_old, lev);
9696
for (int n = 0; n < 3; ++n) {
97-
amrex::MultiFab::Copy( *Bold[n], *Bfp[n], 0, 0, Bold[n]->nComp(),
98-
Bold[n]->nGrowVect() );
97+
amrex::MultiFab::Copy(*B_old[n], *Bfp[n], 0, 0, B_old[n]->nComp(),
98+
B_old[n]->nGrowVect() );
9999
}
100100
}
101101

@@ -147,8 +147,8 @@ void ThetaImplicitEM::UpdateWarpXFields ( const WarpXSolverVec& a_E,
147147
m_WarpX->SetElectricFieldAndApplyBCs( a_E );
148148

149149
// Update Bfield_fp owned by WarpX
150-
ablastr::fields::MultiLevelVectorField const& Bold = m_WarpX->m_fields.get_mr_levels_alldirs(FieldType::Bold, 0);
151-
m_WarpX->UpdateMagneticFieldAndApplyBCs( Bold, m_theta*a_dt );
150+
ablastr::fields::MultiLevelVectorField const& B_old = m_WarpX->m_fields.get_mr_levels_alldirs(FieldType::B_old, 0);
151+
m_WarpX->UpdateMagneticFieldAndApplyBCs(B_old, m_theta * a_dt );
152152

153153
}
154154

@@ -163,7 +163,7 @@ void ThetaImplicitEM::FinishFieldUpdate ( amrex::Real a_new_time )
163163
const amrex::Real c1 = 1._rt - c0;
164164
m_E.linComb( c0, m_E, c1, m_Eold );
165165
m_WarpX->SetElectricFieldAndApplyBCs( m_E );
166-
ablastr::fields::MultiLevelVectorField const & Bold = m_WarpX->m_fields.get_mr_levels_alldirs(FieldType::Bold, 0);
167-
m_WarpX->FinishMagneticFieldAndApplyBCs( Bold, m_theta );
166+
ablastr::fields::MultiLevelVectorField const & B_old = m_WarpX->m_fields.get_mr_levels_alldirs(FieldType::B_old, 0);
167+
m_WarpX->FinishMagneticFieldAndApplyBCs(B_old, m_theta );
168168

169169
}

Source/Fields.H

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ namespace warpx::fields
7474
Bfield_avg_fp,
7575
Efield_avg_cp,
7676
Bfield_avg_cp,
77-
Bold, //!< Stores the value of B at the beginning of the timestep, for the implicit solver
77+
B_old, //!< Stores the value of B at the beginning of the timestep, for the implicit solver
7878
ECTRhofield,
7979
Venl
8080
);
@@ -114,7 +114,7 @@ namespace warpx::fields
114114
FieldType::Bfield_avg_fp,
115115
FieldType::Efield_avg_cp,
116116
FieldType::Bfield_avg_cp,
117-
FieldType::Bold,
117+
FieldType::B_old,
118118
FieldType::ECTRhofield,
119119
FieldType::Venl
120120
};

0 commit comments

Comments
 (0)