From d19c13eb82cc150b5a6322097a98281e453bfff6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 3 Sep 2024 12:59:37 +1000 Subject: [PATCH] Cleanup: spelling & punctuation in comments --- intern/ghost/GHOST_ISystemPaths.hh | 12 +++---- intern/ghost/intern/GHOST_SystemPaths.hh | 12 +++---- intern/ghost/intern/GHOST_SystemPathsCocoa.hh | 14 ++++---- intern/ghost/intern/GHOST_SystemPathsUnix.hh | 14 ++++---- intern/ghost/intern/GHOST_SystemPathsWin32.hh | 14 ++++---- scripts/startup/bl_ui/properties_data_bone.py | 2 +- .../blender/blenkernel/intern/CCGSubSurf.cc | 2 +- .../blenkernel/intern/armature_update.cc | 2 +- .../blenkernel/intern/ocean_spectrum.cc | 2 +- source/blender/blenlib/intern/delaunay_2d.cc | 4 +-- .../tests/blendfile_loading_base_test.h | 4 +-- .../operations/COM_ConstantOperation.h | 2 +- .../engines/eevee_next/eevee_lightprobe.hh | 2 +- source/blender/editors/include/ED_anim_api.hh | 2 +- .../editors/sculpt_paint/paint_image.cc | 2 +- .../blender/makesdna/DNA_constraint_types.h | 36 +++++++++---------- .../shader/nodes/node_shader_tex_gradient.cc | 2 +- source/blender/python/intern/bpy_app_sdl.cc | 2 +- .../intern/ConstrainedConjugateGradient.h | 16 ++++----- 19 files changed, 73 insertions(+), 73 deletions(-) diff --git a/intern/ghost/GHOST_ISystemPaths.hh b/intern/ghost/GHOST_ISystemPaths.hh index ffc53ade5a5..c463a38e64b 100644 --- a/intern/ghost/GHOST_ISystemPaths.hh +++ b/intern/ghost/GHOST_ISystemPaths.hh @@ -45,28 +45,28 @@ class GHOST_ISystemPaths { public: /** - * Determine the base dir in which shared resources are located. It will first try to use + * Determine the base directory in which shared resources are located. It will first try to use * "unpack and run" path, then look for properly installed path, including versioning. - * \return Unsigned char string pointing to system dir (eg /usr/share/blender/). + * \return Unsigned char string pointing to system directory (eg `/usr/share/blender/`). */ virtual const char *getSystemDir(int version, const char *versionstr) const = 0; /** - * Determine the base dir in which user configuration is stored, including versioning. + * Determine the base directory in which user configuration is stored, including versioning. * If needed, it will create the base directory. - * \return Unsigned char string pointing to user dir (eg ~/.blender/). + * \return Unsigned char string pointing to user directory (eg `~/.blender/`). */ virtual const char *getUserDir(int version, const char *versionstr) const = 0; /** * Determine a special ("well known") and easy to reach user directory. - * \return Unsigned char string pointing to user dir (eg `~/Documents/`). + * \return Unsigned char string pointing to user directory (eg `~/Documents/`). */ virtual const char *getUserSpecialDir(GHOST_TUserSpecialDirTypes type) const = 0; /** * Determine the directory of the current binary - * \return Unsigned char string pointing to the binary dir + * \return Unsigned char string pointing to the binary directory. */ virtual const char *getBinaryDir() const = 0; diff --git a/intern/ghost/intern/GHOST_SystemPaths.hh b/intern/ghost/intern/GHOST_SystemPaths.hh index 75ce7a7fd86..f6a5ebb3e8e 100644 --- a/intern/ghost/intern/GHOST_SystemPaths.hh +++ b/intern/ghost/intern/GHOST_SystemPaths.hh @@ -26,22 +26,22 @@ class GHOST_SystemPaths : public GHOST_ISystemPaths { public: /** - * Determine the base dir in which shared resources are located. It will first try to use + * Determine the base directory in which shared resources are located. It will first try to use * "unpack and run" path, then look for properly installed path, including versioning. - * \return Unsigned char string pointing to system dir (eg /usr/share/blender/). + * \return Unsigned char string pointing to system directory (eg `/usr/share/blender/`). */ virtual const char *getSystemDir(int version, const char *versionstr) const = 0; /** - * Determine the base dir in which user configuration is stored, including versioning. + * Determine the base directory in which user configuration is stored, including versioning. * If needed, it will create the base directory. - * \return Unsigned char string pointing to user dir (eg ~/.blender/). + * \return Unsigned char string pointing to user directory (eg `~/.blender/`). */ virtual const char *getUserDir(int version, const char *versionstr) const = 0; /** - * Determine the directory of the current binary - * \return Unsigned char string pointing to the binary dir + * Determine the directory of the current binary. + * \return Unsigned char string pointing to the binary directory. */ virtual const char *getBinaryDir() const = 0; diff --git a/intern/ghost/intern/GHOST_SystemPathsCocoa.hh b/intern/ghost/intern/GHOST_SystemPathsCocoa.hh index 959ba11c3b6..e5e04a8926e 100644 --- a/intern/ghost/intern/GHOST_SystemPathsCocoa.hh +++ b/intern/ghost/intern/GHOST_SystemPathsCocoa.hh @@ -27,28 +27,28 @@ class GHOST_SystemPathsCocoa : public GHOST_SystemPaths { ~GHOST_SystemPathsCocoa(); /** - * Determine the base dir in which shared resources are located. It will first try to use + * Determine the base directory in which shared resources are located. It will first try to use * "unpack and run" path, then look for properly installed path, including versioning. - * \return Unsigned char string pointing to system dir (eg /usr/share/blender/). + * \return Unsigned char string pointing to system directory (eg `/usr/share/blender/`). */ const char *getSystemDir(int version, const char *versionstr) const; /** - * Determine the base dir in which user configuration is stored, including versioning. + * Determine the base directory in which user configuration is stored, including versioning. * If needed, it will create the base directory. - * \return Unsigned char string pointing to user dir (eg ~/.blender/). + * \return Unsigned char string pointing to user directory (eg `~/.blender/`). */ const char *getUserDir(int version, const char *versionstr) const; /** * Determine a special ("well known") and easy to reach user directory. - * \return Unsigned char string pointing to user dir (eg `~/Documents/`). + * \return Unsigned char string pointing to user directory (eg `~/Documents/`). */ const char *getUserSpecialDir(GHOST_TUserSpecialDirTypes type) const; /** - * Determine the directory of the current binary - * \return Unsigned char string pointing to the binary dir + * Determine the directory of the current binary. + * \return Unsigned char string pointing to the binary directory. */ const char *getBinaryDir() const; diff --git a/intern/ghost/intern/GHOST_SystemPathsUnix.hh b/intern/ghost/intern/GHOST_SystemPathsUnix.hh index b691187bc7e..8dcb901d380 100644 --- a/intern/ghost/intern/GHOST_SystemPathsUnix.hh +++ b/intern/ghost/intern/GHOST_SystemPathsUnix.hh @@ -25,28 +25,28 @@ class GHOST_SystemPathsUnix : public GHOST_SystemPaths { ~GHOST_SystemPathsUnix(); /** - * Determine the base dir in which shared resources are located. It will first try to use + * Determine the base directory in which shared resources are located. It will first try to use * "unpack and run" path, then look for properly installed path, including versioning. - * \return Unsigned char string pointing to system dir (eg `/usr/share/blender/`). + * \return Unsigned char string pointing to system directory (eg `/usr/share/blender/`). */ const char *getSystemDir(int version, const char *versionstr) const; /** - * Determine the base dir in which user configuration is stored, including versioning. + * Determine the base directory in which user configuration is stored, including versioning. * If needed, it will create the base directory. - * \return Unsigned char string pointing to user dir (eg `~/.config/.blender/`). + * \return Unsigned char string pointing to user directory (eg `~/.config/.blender/`). */ const char *getUserDir(int version, const char *versionstr) const; /** * Determine a special ("well known") and easy to reach user directory. - * \return Unsigned char string pointing to user dir (eg `~/Documents/`). + * \return Unsigned char string pointing to user directory (eg `~/Documents/`). */ const char *getUserSpecialDir(GHOST_TUserSpecialDirTypes type) const; /** - * Determine the directory of the current binary - * \return Unsigned char string pointing to the binary dir + * Determine the directory of the current binary. + * \return Unsigned char string pointing to the binary directory. */ const char *getBinaryDir() const; diff --git a/intern/ghost/intern/GHOST_SystemPathsWin32.hh b/intern/ghost/intern/GHOST_SystemPathsWin32.hh index 7ad25b5c747..3be553137ea 100644 --- a/intern/ghost/intern/GHOST_SystemPathsWin32.hh +++ b/intern/ghost/intern/GHOST_SystemPathsWin32.hh @@ -34,28 +34,28 @@ class GHOST_SystemPathsWin32 : public GHOST_SystemPaths { ~GHOST_SystemPathsWin32(); /** - * Determine the base dir in which shared resources are located. It will first try to use + * Determine the base directory in which shared resources are located. It will first try to use * "unpack and run" path, then look for properly installed path, including versioning. - * \return Unsigned char string pointing to system dir (eg /usr/share/). + * \return Unsigned char string pointing to system directory (eg `/usr/share/`). */ const char *getSystemDir(int version, const char *versionstr) const; /** - * Determine the base dir in which user configuration is stored, including versioning. + * Determine the base directory in which user configuration is stored, including versioning. * If needed, it will create the base directory. - * \return Unsigned char string pointing to user dir (eg ~/). + * \return Unsigned char string pointing to user directory (eg `~/`). */ const char *getUserDir(int version, const char *versionstr) const; /** * Determine a special ("well known") and easy to reach user directory. - * \return Unsigned char string pointing to user dir (eg `~/Documents/`). + * \return Unsigned char string pointing to user directory (eg `~/Documents/`). */ const char *getUserSpecialDir(GHOST_TUserSpecialDirTypes type) const; /** - * Determine the directory of the current binary - * \return Unsigned char string pointing to the binary dir + * Determine the directory of the current binary. + * \return Unsigned char string pointing to the binary directory. */ const char *getBinaryDir() const; diff --git a/scripts/startup/bl_ui/properties_data_bone.py b/scripts/startup/bl_ui/properties_data_bone.py index 2d0fa43fb20..02141631759 100644 --- a/scripts/startup/bl_ui/properties_data_bone.py +++ b/scripts/startup/bl_ui/properties_data_bone.py @@ -294,7 +294,7 @@ class BONE_PT_collections(BoneButtonsPanel, Panel): row.prop(bcoll, "is_solo", text="", icon='SOLO_ON' if bcoll.is_solo else 'SOLO_OFF') - # Unassignment operator, less safe so with a bit of spacing. + # Unassign operator, less safe so with a bit of spacing. props = bcoll_row.operator("armature.collection_unassign_named", text="", icon='X') props.name = bcoll.name props.bone_name = bone.name diff --git a/source/blender/blenkernel/intern/CCGSubSurf.cc b/source/blender/blenkernel/intern/CCGSubSurf.cc index dc0f1d47cd9..c50fb6c40d3 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf.cc +++ b/source/blender/blenkernel/intern/CCGSubSurf.cc @@ -1516,7 +1516,7 @@ void ccgFaceIterator_next(CCGFaceIterator *fi) ccg_ehashIterator_next((EHashIterator *)fi); } -/*** Extern API final vert/edge/face interface ***/ +/*** External API final vert/edge/face interface. ***/ int ccgSubSurf_getNumFinalVerts(const CCGSubSurf *ss) { diff --git a/source/blender/blenkernel/intern/armature_update.cc b/source/blender/blenkernel/intern/armature_update.cc index fb5462b344c..641c925c8ca 100644 --- a/source/blender/blenkernel/intern/armature_update.cc +++ b/source/blender/blenkernel/intern/armature_update.cc @@ -675,7 +675,7 @@ static void splineik_evaluate_bone( } } - /* Compute scale factor for xz axes from this value. */ + /* Compute scale factor for XZ axes from this value. */ final_scale = sqrtf(bulge); } else { diff --git a/source/blender/blenkernel/intern/ocean_spectrum.cc b/source/blender/blenkernel/intern/ocean_spectrum.cc index 6740aacc992..ee2121587ac 100644 --- a/source/blender/blenkernel/intern/ocean_spectrum.cc +++ b/source/blender/blenkernel/intern/ocean_spectrum.cc @@ -62,7 +62,7 @@ static float ocean_spectrum_wind_and_damp(const Ocean *oc, const float k_mag_inv = 1.0f / k2; const float k_dot_w = (kx * k_mag_inv * oc->_wx) + (kz * k_mag_inv * oc->_wz); - /* Bias towards wind dir. */ + /* Bias towards wind direction. */ float newval = val * pow(fabs(k_dot_w), oc->_wind_alignment); /* Eliminate wavelengths smaller than cutoff. */ diff --git a/source/blender/blenlib/intern/delaunay_2d.cc b/source/blender/blenlib/intern/delaunay_2d.cc index 8bf30ab9ab5..b51de8ca9e8 100644 --- a/source/blender/blenlib/intern/delaunay_2d.cc +++ b/source/blender/blenlib/intern/delaunay_2d.cc @@ -1493,7 +1493,7 @@ template static void re_delaunay_triangulate(CDTArrangement *cdt, if (se->face == cdt->outer_face || sym(se)->face == cdt->outer_face) { return; } - /* 'se' is a diagonal just added, and it is base of area to retriangulate (face on its left) */ + /* `se` is a diagonal just added, and it is base of area to re-triangulate (face on its left). */ int count = 1; for (SymEdge *ss = se->next; ss != se; ss = ss->next) { count++; @@ -2072,7 +2072,7 @@ void add_edge_constraint( if (r_edges != nullptr) { BLI_linklist_append(&edge_list, edge); } - /* Now retriangulate upper and lower gaps. */ + /* Now re-triangulate upper and lower gaps. */ re_delaunay_triangulate(&cdt_state->cdt, &edge->symedges[0]); re_delaunay_triangulate(&cdt_state->cdt, &edge->symedges[1]); } diff --git a/source/blender/blenloader/tests/blendfile_loading_base_test.h b/source/blender/blenloader/tests/blendfile_loading_base_test.h index 58116351446..374ae8a3406 100644 --- a/source/blender/blenloader/tests/blendfile_loading_base_test.h +++ b/source/blender/blenloader/tests/blendfile_loading_base_test.h @@ -26,9 +26,9 @@ class BlendfileLoadingBaseTest : public testing::Test { virtual void TearDown(); /* Loads a blend file from the tests/data directory from SVN. - * Returns 'ok' flag (true=good, false=bad) and sets this->bfile. + * Returns 'ok' flag (true=good, false=bad) and sets `this->bfile`. * Fails the test if the file cannot be loaded (still returns though). - * Requires the CLI argument --test-asset-dir to point to ../tests/data. + * Requires the CLI argument `--test-asset-dir` to point to `../tests/data`. * * WARNING: only files saved with Blender 2.80+ can be loaded. Since Blender * is only partially initialized (most importantly, without window manager), diff --git a/source/blender/compositor/operations/COM_ConstantOperation.h b/source/blender/compositor/operations/COM_ConstantOperation.h index b7a950a81e4..94b97e3d177 100644 --- a/source/blender/compositor/operations/COM_ConstantOperation.h +++ b/source/blender/compositor/operations/COM_ConstantOperation.h @@ -9,7 +9,7 @@ namespace blender::compositor { /* TODO(manzanilla): After removing tiled implementation, implement a default #determine_resolution - * for all constant operations and make all initialization and deinitilization methods final. */ + * for all constant operations and make all initialization and de-initialization methods final. */ /** * Base class for operations that are always constant. Operations that can be constant only when * all their inputs are so, are evaluated into primitive constants (Color/Vector/Value) during diff --git a/source/blender/draw/engines/eevee_next/eevee_lightprobe.hh b/source/blender/draw/engines/eevee_next/eevee_lightprobe.hh index f1212975f53..e11af602459 100644 --- a/source/blender/draw/engines/eevee_next/eevee_lightprobe.hh +++ b/source/blender/draw/engines/eevee_next/eevee_lightprobe.hh @@ -133,7 +133,7 @@ struct VolumeProbe : public LightProbe, VolumeProbeData { const LightProbeObjectCache *cache = nullptr; /** List of associated atlas bricks that are used by this grid. */ Vector bricks; - /** True if the grid needs to be reuploaded & re-composited with other light-grids. */ + /** True if the grid needs to be re-uploaded & re-composited with other light-grids. */ bool do_update; /** Index of the grid inside the grid UBO. */ int grid_index; diff --git a/source/blender/editors/include/ED_anim_api.hh b/source/blender/editors/include/ED_anim_api.hh index 1e63879aad9..285f94fd602 100644 --- a/source/blender/editors/include/ED_anim_api.hh +++ b/source/blender/editors/include/ED_anim_api.hh @@ -910,7 +910,7 @@ bool ANIM_fmodifiers_paste_from_buf(ListBase *modifiers, bool replace, FCurve *c * (check anim_channels_defines.cc for details). * * \return the icon of whatever struct the F-Curve's RNA path resolves to. - * Returns std::nullopt if the path could not be resolved. + * Returns #std::nullopt if the path could not be resolved. */ std::optional getname_anim_fcurve(char *name, ID *id, FCurve *fcu); diff --git a/source/blender/editors/sculpt_paint/paint_image.cc b/source/blender/editors/sculpt_paint/paint_image.cc index ce36272718c..c6ff79ba7d5 100644 --- a/source/blender/editors/sculpt_paint/paint_image.cc +++ b/source/blender/editors/sculpt_paint/paint_image.cc @@ -165,7 +165,7 @@ void imapaint_image_update( /* When buffer is partial updated the planes should be set to a larger value than 8. This will * make sure that partial updating is working but uses more GPU memory as the gpu texture will - * have 4 channels. When so the whole texture needs to be reuploaded to the GPU using the new + * have 4 channels. When so the whole texture needs to be re-uploaded to the GPU using the new * texture format. */ if (ibuf != nullptr && ibuf->planes == 8) { ibuf->planes = 32; diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index 325a8625590..8ba339ebec7 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -982,52 +982,52 @@ typedef enum eKinematic_Flags { CONSTRAINT_IK_TARGETAXIS = (1 << 14), } eKinematic_Flags; -/* bSplineIKConstraint->flag */ +/** #bSplineIKConstraint::flag */ typedef enum eSplineIK_Flags { - /* chain has been attached to spline */ + /** Chain has been attached to spline. */ CONSTRAINT_SPLINEIK_BOUND = (1 << 0), - /* root of chain is not influenced by the constraint */ + /** Root of chain is not influenced by the constraint. */ CONSTRAINT_SPLINEIK_NO_ROOT = (1 << 1), #ifdef DNA_DEPRECATED_ALLOW - /* bones in the chain should not scale to fit the curve */ + /** Bones in the chain should not scale to fit the curve. */ CONSTRAINT_SPLINEIK_SCALE_LIMITED = (1 << 2), #endif - /* evenly distribute the bones along the path regardless of length */ + /** Evenly distribute the bones along the path regardless of length. */ CONSTRAINT_SPLINEIK_EVENSPLITS = (1 << 3), - /* don't adjust the x and z scaling of the bones by the curve radius */ + /** Don't adjust the X and Z scaling of the bones by the curve radius. */ CONSTRAINT_SPLINEIK_NO_CURVERAD = (1 << 4), - /* for "volumetric" xz scale mode, limit the minimum or maximum scale values */ + /** For "volumetric" XZ scale mode, limit the minimum or maximum scale values. */ CONSTRAINT_SPLINEIK_USE_BULGE_MIN = (1 << 5), CONSTRAINT_SPLINEIK_USE_BULGE_MAX = (1 << 6), - /* apply volume preservation over original scaling of the bone */ + /** Apply volume preservation over original scaling of the bone. */ CONSTRAINT_SPLINEIK_USE_ORIGINAL_SCALE = (1 << 7), } eSplineIK_Flags; -/* bSplineIKConstraint->xzScaleMode */ +/** #bSplineIKConstraint::xzScaleMode */ typedef enum eSplineIK_XZScaleModes { - /* no x/z scaling */ + /** No X/Z scaling. */ CONSTRAINT_SPLINEIK_XZS_NONE = 0, - /* bones in the chain should take their x/z scales from the original scaling */ + /** Bones in the chain should take their X/Z scales from the original scaling. */ CONSTRAINT_SPLINEIK_XZS_ORIGINAL = 1, - /* x/z scales are the inverse of the y-scale */ + /** X/Z scales are the inverse of the Y-scale. */ CONSTRAINT_SPLINEIK_XZS_INVERSE = 2, - /* x/z scales are computed using a volume preserving technique (from Stretch To constraint) */ + /** X/Z scales are computed using a volume preserving technique (from Stretch To constraint). */ CONSTRAINT_SPLINEIK_XZS_VOLUMETRIC = 3, } eSplineIK_XZScaleModes; -/* bSplineIKConstraint->yScaleMode */ +/** #bSplineIKConstraint::yScaleMode */ typedef enum eSplineIK_YScaleModes { - /* no y scaling */ + /** No Y scaling. */ CONSTRAINT_SPLINEIK_YS_NONE = 0, - /* bones in the chain should be scaled to fit the length of the curve */ + /** Bones in the chain should be scaled to fit the length of the curve. */ CONSTRAINT_SPLINEIK_YS_FIT_CURVE = 1, - /* bones in the chain should take their y scales from the original scaling */ + /** Bones in the chain should take their y scales from the original scaling. */ CONSTRAINT_SPLINEIK_YS_ORIGINAL = 2, } eSplineIK_YScaleModes; -/* bArmatureConstraint -> flag */ +/** #bArmatureConstraint::flag */ typedef enum eArmature_Flags { /** use dual quaternion blending */ CONSTRAINT_ARMATURE_QUATERNION = (1 << 0), diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_gradient.cc b/source/blender/nodes/shader/nodes/node_shader_tex_gradient.cc index aa44b9a1c81..f884f01b46c 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_gradient.cc +++ b/source/blender/nodes/shader/nodes/node_shader_tex_gradient.cc @@ -1,4 +1,4 @@ -/* SPDX-FileCopyrightText: 2005 Gradienter Foundation. All rights reserved. +/* SPDX-FileCopyrightText: 2005 Blender Foundation. All rights reserved. * * SPDX-License-Identifier: GPL-2.0-or-later */ diff --git a/source/blender/python/intern/bpy_app_sdl.cc b/source/blender/python/intern/bpy_app_sdl.cc index 89ed524bda3..c57be35c560 100644 --- a/source/blender/python/intern/bpy_app_sdl.cc +++ b/source/blender/python/intern/bpy_app_sdl.cc @@ -16,7 +16,7 @@ #ifdef WITH_SDL /* SDL force defines __SSE__ and __SSE2__ flags, which generates warnings * because we pass those defines via command line as well. For until there's - * proper ifndef added to SDL headers we ignore the redefinition warning. + * proper `ifndef` added to SDL headers we ignore the redefinition warning. */ # ifdef _MSC_VER # pragma warning(push) diff --git a/source/blender/simulation/intern/ConstrainedConjugateGradient.h b/source/blender/simulation/intern/ConstrainedConjugateGradient.h index 4a71eb52f6b..465e8fe6cfa 100644 --- a/source/blender/simulation/intern/ConstrainedConjugateGradient.h +++ b/source/blender/simulation/intern/ConstrainedConjugateGradient.h @@ -73,29 +73,29 @@ EIGEN_DONT_INLINE void constrained_conjugate_gradient(const MatrixType &mat, VectorType z(n), tmp(n); RealScalar absNew = numext::real( - residual.dot(p)); /* the square of the absolute value of r scaled by invM */ + residual.dot(p)); /* The square of the absolute value of `r` scaled by `invM`. */ int i = 0; while (i < maxIters) { - tmp.noalias() = filter * (mat * p); /* the bottleneck of the algorithm */ + tmp.noalias() = filter * (mat * p); /* The bottleneck of the algorithm. */ - Scalar alpha = absNew / p.dot(tmp); /* the amount we travel on dir */ - x += alpha * p; /* update solution */ - residual -= alpha * tmp; /* update residue */ + Scalar alpha = absNew / p.dot(tmp); /* The amount we travel on direction. */ + x += alpha * p; /* Update solution. */ + residual -= alpha * tmp; /* Update residue. */ residualNorm2 = residual.squaredNorm(); if (residualNorm2 < threshold) { break; } - z = precond.solve(residual); /* approximately solve for "A z = residual" */ + z = precond.solve(residual); /* Approximately solve for `A z = residual`. */ RealScalar absOld = absNew; - absNew = numext::real(residual.dot(z)); /* update the absolute value of r */ + absNew = numext::real(residual.dot(z)); /* Update the absolute value of `r`. */ /* Calculate the Gram-Schmidt value used to create the new search direction. */ RealScalar beta = absNew / absOld; - p = filter * (z + beta * p); /* update search direction */ + p = filter * (z + beta * p); /* Update search direction. */ i++; } tol_error = sqrt(residualNorm2 / rhsNorm2);