Skip to content

Commit 04a6a38

Browse files
committed
Adjust comments: fix spelling and end-of-line punctuation.
1 parent fc9e97d commit 04a6a38

37 files changed

+171
-176
lines changed

palace/drivers/drivensolver.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ ErrorIndicator DrivenSolver::SweepUniform(SpaceOperator &space_op, int n_step, i
130130
// Switch paraview subfolders: one for each excitation, if nr_excitations > 1.
131131
post_op.InitializeParaviewDataCollection(excitation_idx);
132132

133-
// Frequency loop
133+
// Frequency loop.
134134
double omega = omega0;
135135
for (int step = step0; step < n_step; step++, omega += delta_omega)
136136
{
@@ -139,7 +139,7 @@ ErrorIndicator DrivenSolver::SweepUniform(SpaceOperator &space_op, int n_step, i
139139
iodata.units.Dimensionalize<Units::ValueType::FREQUENCY>(omega),
140140
Timer::Duration(Timer::Now() - t0).count());
141141

142-
// Assemble matrices: skip if already done (first excitation & first freq point)
142+
// Assemble matrices: skip if already done (first excitation & first freq point).
143143
if (!first_iter_set)
144144
{
145145
// Update frequency-dependent excitation and operators.
@@ -152,7 +152,7 @@ ErrorIndicator DrivenSolver::SweepUniform(SpaceOperator &space_op, int n_step, i
152152
ksp.SetOperators(*A, *P);
153153
}
154154
first_iter_set = false;
155-
// Solve linear system
155+
// Solve linear system.
156156
space_op.GetExcitationVector(excitation_idx, omega, RHS);
157157
Mpi::Print("\n");
158158
ksp.Mult(RHS, E);
@@ -181,7 +181,7 @@ ErrorIndicator DrivenSolver::SweepUniform(SpaceOperator &space_op, int n_step, i
181181
Mpi::Print(" Updating solution error estimates\n");
182182
estimator.AddErrorIndicator(E, B, total_domain_energy, indicator);
183183
}
184-
// Final postprocessing & printing
184+
// Final postprocessing & printing.
185185
BlockTimer bt0(Timer::POSTPRO);
186186
SaveMetadata(ksp);
187187
}
@@ -206,7 +206,7 @@ ErrorIndicator DrivenSolver::SweepAdaptive(SpaceOperator &space_op, int n_step,
206206
{
207207
max_size_per_excitation = 20; // Default value
208208
}
209-
// Maximum size — no more than nr steps needed
209+
// Maximum size — no more than nr steps needed.
210210
max_size_per_excitation = std::min(max_size_per_excitation, (n_step - step0));
211211

212212
// Allocate negative curl matrix for postprocessing the B-field and vectors for the
@@ -278,13 +278,13 @@ ErrorIndicator DrivenSolver::SweepAdaptive(SpaceOperator &space_op, int n_step,
278278
// B = -1/(iω) ∇ x E + 1/ω kp x E
279279
floquet_corr->AddMult(E, B, 1.0 / omega);
280280
}
281-
// Debug option to print prom samples fields to paraview file
281+
// Debug option to print prom samples fields to paraview file.
282282
std::optional<std::pair<int, double>> debug_print_paraview_opt = {};
283283
if constexpr (debug_prom_paraview)
284284
{
285285
// Paraview times are printed as excitation * padding + freq with padding gives enough
286286
// space for f_max + 1, e.g. if f_max = 102 GHz, then we get time n0fff where n is the
287-
// excitation index and fff is the frequency
287+
// excitation index and fff is the frequency.
288288
double excitation_padding =
289289
std::pow(10.0, 3.0 + static_cast<int>(std::log10(iodata.solver.driven.max_f)));
290290
auto freq = iodata.units.Dimensionalize<Units::ValueType::FREQUENCY>(omega);
@@ -299,7 +299,7 @@ ErrorIndicator DrivenSolver::SweepAdaptive(SpaceOperator &space_op, int n_step,
299299
estimator.AddErrorIndicator(E, B, total_domain_energy, indicator);
300300
};
301301

302-
// Loop excitations to add to PROM
302+
// Loop excitations to add to PROM.
303303
auto print_counter_excitation_prom = 0; // 1 based indexing; will increment at start
304304
for (const auto &[excitation_idx, spec] : excitation_helper.excitations)
305305
{
@@ -386,7 +386,7 @@ ErrorIndicator DrivenSolver::SweepAdaptive(SpaceOperator &space_op, int n_step,
386386
// Switch paraview subfolders: one for each excitation, if nr_excitations > 1.
387387
post_op.InitializeParaviewDataCollection(excitation_idx);
388388

389-
// Frequency loop
389+
// Frequency loop.
390390
double omega = omega0;
391391
for (int step = step0; step < n_step; step++, omega += delta_omega)
392392
{
@@ -414,7 +414,7 @@ ErrorIndicator DrivenSolver::SweepAdaptive(SpaceOperator &space_op, int n_step,
414414
}
415415
post_op.MeasureAndPrintAll(excitation_idx, step, E, B, omega);
416416
}
417-
// Final postprocessing & printing: no change to indicator since prom
417+
// Final postprocessing & printing: no change to indicator since these are in PROM.
418418
BlockTimer bt0(Timer::POSTPRO);
419419
SaveMetadata(prom_op.GetLinearSolver());
420420
}

palace/drivers/electrostaticsolver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ void ElectrostaticSolver::PostprocessTerminals(
159159
for (const auto &[idx2, data2] : terminal_sources)
160160
{
161161
output.table.insert(format("i2{}", idx2), format("{}[i][{}] {}", name, idx2, unit));
162-
// Use the fact that iterator over i and j is the same span
162+
// Use the fact that iterator over i and j is the same span.
163163
output.table["i"] << idx2;
164164

165165
auto &col = output.table[format("i2{}", idx2)];

palace/drivers/magnetostaticsolver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ void MagnetostaticSolver::PostprocessTerminals(
164164
for (const auto &[idx2, data2] : surf_j_op)
165165
{
166166
output.table.insert(format("i2{}", idx2), format("{}[i][{}] {}", name, idx2, unit));
167-
// Use the fact that iterator over i and j is the same span
167+
// Use the fact that iterator over i and j is the same span.
168168
output.table["i"] << idx2;
169169

170170
auto &col = output.table[format("i2{}", idx2)];

palace/drivers/transientsolver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ TransientSolver::Solve(const std::vector<std::unique_ptr<Mesh>> &mesh) const
9393
Mpi::Print(" Updating solution error estimates\n");
9494
estimator.AddErrorIndicator(E, B, total_domain_energy, indicator);
9595
}
96-
// Final postprocessing & printing
96+
// Final postprocessing & printing.
9797
BlockTimer bt1(Timer::POSTPRO);
9898
time_op.PrintStats();
9999
SaveMetadata(time_op.GetLinearSolver());

palace/fem/coefficient.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class BdrGridFunctionCoefficient
3333
{
3434
protected:
3535
// XX TODO: For thread-safety (multiple threads evaluating a coefficient simultaneously),
36-
// the FET, FET.Elem1, and FET.Elem2 objects cannot be shared
36+
// the FET, FET.Elem1, and FET.Elem2 objects cannot be shared.
3737
const mfem::ParMesh &mesh;
3838
mfem::FaceElementTransformations FET;
3939
mfem::IsoparametricTransformation T1, T2;

palace/fem/libceed/basis.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void InitCeedInterpolatorBasis(const mfem::FiniteElement &trial_fe,
9191
const mfem::FiniteElement &test_fe, CeedInt trial_num_comp,
9292
CeedInt test_num_comp, Ceed ceed, CeedBasis *basis)
9393
{
94-
// Basis projection operator using libCEED
94+
// Basis projection operator using libCEED.
9595
CeedBasis trial_basis, test_basis;
9696
const int P = std::max(trial_fe.GetDof(), test_fe.GetDof()), ir_order_max = 100;
9797
int ir_order = std::max(trial_fe.GetOrder(), test_fe.GetOrder());
@@ -128,25 +128,25 @@ void InitMfemInterpolatorBasis(const mfem::FiniteElement &trial_fe,
128128
dummy.SetIdentityTransformation(trial_fe.GetGeomType());
129129
if (trial_fe.GetMapType() == test_fe.GetMapType())
130130
{
131-
// Prolongation
131+
// Prolongation.
132132
test_fe.GetTransferMatrix(trial_fe, dummy, Bt);
133133
}
134134
else if (trial_fe.GetMapType() == mfem::FiniteElement::VALUE &&
135135
test_fe.GetMapType() == mfem::FiniteElement::H_CURL)
136136
{
137-
// Discrete gradient interpolator
137+
// Discrete gradient interpolator.
138138
test_fe.ProjectGrad(trial_fe, dummy, Bt);
139139
}
140140
else if (trial_fe.GetMapType() == mfem::FiniteElement::H_CURL &&
141141
test_fe.GetMapType() == mfem::FiniteElement::H_DIV)
142142
{
143-
// Discrete curl interpolator
143+
// Discrete curl interpolator.
144144
test_fe.ProjectCurl(trial_fe, dummy, Bt);
145145
}
146146
else if (trial_fe.GetMapType() == mfem::FiniteElement::H_DIV &&
147147
test_fe.GetMapType() == mfem::FiniteElement::INTEGRAL)
148148
{
149-
// Discrete divergence interpolator
149+
// Discrete divergence interpolator.
150150
test_fe.ProjectDiv(trial_fe, dummy, Bt);
151151
}
152152
else

palace/fem/libceed/restriction.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ mfem::Array<int> GetFaceDofsFromAdjacentElement(const mfem::FiniteElementSpace &
2525
mfem::DofTransformation &dof_trans,
2626
const int P, const int e)
2727
{
28-
// Get coordinates of face dofs
28+
// Get coordinates of face dofs.
2929
int elem_id, face_info;
3030
fespace.GetMesh()->GetBdrElementAdjacentElement(e, elem_id, face_info);
3131
mfem::Geometry::Type face_geom = fespace.GetMesh()->GetBdrElementGeometry(e);
@@ -48,13 +48,13 @@ mfem::Array<int> GetFaceDofsFromAdjacentElement(const mfem::FiniteElementSpace &
4848
mfem::DenseMatrix face_pm;
4949
fespace.GetMesh()->GetNodes()->GetVectorValues(Loc1.Transf, face_ir, face_pm);
5050

51-
// Get coordinates of element dofs
51+
// Get coordinates of element dofs.
5252
mfem::DenseMatrix elem_pm;
5353
const mfem::FiniteElement *fe_elem = fespace.GetFE(elem_id);
5454
mfem::ElementTransformation *T = fespace.GetMesh()->GetElementTransformation(elem_id);
5555
T->Transform(fe_elem->GetNodes(), elem_pm);
5656

57-
// Find the dofs
57+
// Find the dofs.
5858
double tol = 1E-5;
5959
mfem::Array<int> elem_dofs, dofs(P);
6060
fespace.GetElementDofs(elem_id, elem_dofs, dof_trans);

palace/fem/multigrid.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ inline FiniteElementSpaceHierarchy ConstructFiniteElementSpaceHierarchy(
101101
dbc_tdof_lists->emplace_back());
102102
}
103103

104-
// h-refinement
104+
// h-refinement.
105105
for (std::size_t l = coarse_mesh_l + 1; l < mesh.size(); l++)
106106
{
107107
fespaces.AddLevel(std::make_unique<FiniteElementSpace>(*mesh[l], fecs[0].get()));
@@ -112,7 +112,7 @@ inline FiniteElementSpaceHierarchy ConstructFiniteElementSpaceHierarchy(
112112
}
113113
}
114114

115-
// p-refinement
115+
// p-refinement.
116116
for (std::size_t l = 1; l < fecs.size(); l++)
117117
{
118118
fespaces.AddLevel(std::make_unique<FiniteElementSpace>(*mesh.back(), fecs[l].get()));

palace/linalg/arpack.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ void CheckInfoEUPD(a_int info)
157157
namespace palace::arpack
158158
{
159159

160-
// Base class methods
160+
// Base class methods.
161161

162162
ArpackEigenvalueSolver::ArpackEigenvalueSolver(MPI_Comm comm, int print)
163163
: comm(comm), print(print)
@@ -485,7 +485,7 @@ void ArpackEigenvalueSolver::RescaleEigenvectors(int num_eig)
485485
}
486486
}
487487

488-
// EPS specific methods
488+
// EPS specific methods.
489489

490490
ArpackEPSSolver::ArpackEPSSolver(MPI_Comm comm, int print)
491491
: ArpackEigenvalueSolver(comm, print)
@@ -637,7 +637,7 @@ double ArpackEPSSolver::GetBackwardScaling(std::complex<double> l) const
637637
return normK + std::abs(l) * normM;
638638
}
639639

640-
// PEP specific methods
640+
// PEP specific methods.
641641

642642
ArpackPEPSolver::ArpackPEPSolver(MPI_Comm comm, int print)
643643
: ArpackEigenvalueSolver(comm, print)

palace/linalg/ksp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ std::unique_ptr<IterativeSolver<OperType>> ConfigureKrylovSolver(const IoData &i
8181
gmres->SetPrecSide(GmresSolverBase::PrecSide::RIGHT);
8282
break;
8383
case config::LinearSolverData::SideType::DEFAULT:
84-
// Do nothing
84+
// Do nothing.
8585
break;
8686
}
8787
}

0 commit comments

Comments
 (0)