From 0dddfe1c6097a77a2f2787f5b3087de024d484a6 Mon Sep 17 00:00:00 2001 From: Edward Basso Date: Tue, 21 Nov 2023 13:20:20 -0800 Subject: [PATCH] Make all comments match AB convention in LinearSolvers.rst --- Docs/sphinx_documentation/source/LinearSolvers.rst | 2 +- Src/LinearSolvers/MLMG/AMReX_MLABecLaplacian.H | 3 +-- Src/LinearSolvers/MLMG/AMReX_MLEBABecLap.H | 3 +-- Src/LinearSolvers/MLMG/AMReX_MLEBTensorOp.H | 11 +++++------ Src/LinearSolvers/MLMG/AMReX_MLMG.H | 2 +- Src/LinearSolvers/MLMG/AMReX_MLNodeABecLaplacian.H | 5 ++--- Src/LinearSolvers/MLMG/AMReX_MLTensorOp.H | 11 +++++------ Tests/LinearSolvers/ABecLaplacian_F/README | 8 ++++---- 8 files changed, 20 insertions(+), 25 deletions(-) diff --git a/Docs/sphinx_documentation/source/LinearSolvers.rst b/Docs/sphinx_documentation/source/LinearSolvers.rst index e7266f02243..153d259f04e 100644 --- a/Docs/sphinx_documentation/source/LinearSolvers.rst +++ b/Docs/sphinx_documentation/source/LinearSolvers.rst @@ -690,7 +690,7 @@ viscous term `divtau` explicitly: // Note we call LPInfo().setMaxCoarseningLevel(0) because we are only applying the operator, // not doing an implicit solve // - // (alpha * a - beta * (del dot b grad)) sol + // (A * alpha - B * (del dot beta grad)) sol // // LPInfo info; MLEBTensorOp ebtensorop(geom, grids, dmap, LPInfo().setMaxCoarseningLevel(0), diff --git a/Src/LinearSolvers/MLMG/AMReX_MLABecLaplacian.H b/Src/LinearSolvers/MLMG/AMReX_MLABecLaplacian.H index 9498af0e620..ce28df9fc86 100644 --- a/Src/LinearSolvers/MLMG/AMReX_MLABecLaplacian.H +++ b/Src/LinearSolvers/MLMG/AMReX_MLABecLaplacian.H @@ -7,8 +7,7 @@ namespace amrex { -// (alpha * a - beta * (del dot b grad)) phi - +// (A * alpha - B * (del dot beta grad)) phi template class MLABecLaplacianT : public MLCellABecLapT diff --git a/Src/LinearSolvers/MLMG/AMReX_MLEBABecLap.H b/Src/LinearSolvers/MLMG/AMReX_MLEBABecLap.H index 6187c479e4c..b88342ef8f9 100644 --- a/Src/LinearSolvers/MLMG/AMReX_MLEBABecLap.H +++ b/Src/LinearSolvers/MLMG/AMReX_MLEBABecLap.H @@ -9,8 +9,7 @@ namespace amrex { -// (alpha * a - beta * (del dot b grad)) phi - +// (A * alpha - B * (del dot beta grad)) phi class MLEBABecLap : public MLCellABecLap { diff --git a/Src/LinearSolvers/MLMG/AMReX_MLEBTensorOp.H b/Src/LinearSolvers/MLMG/AMReX_MLEBTensorOp.H index aa420b5635a..98e09039b64 100644 --- a/Src/LinearSolvers/MLMG/AMReX_MLEBTensorOp.H +++ b/Src/LinearSolvers/MLMG/AMReX_MLEBTensorOp.H @@ -9,20 +9,19 @@ namespace amrex { // Tensor solver for high Reynolds flows with small gradient in viscosity. // The system it solves is // -// alpha a v - beta div dot tau = rhs +// A alpha v - B div dot tau = rhs // // where tau = eta [grad v + (grad v)^T] + (kappa-(2/3)eta) (div v) I. // Here eta and kappa are shear and bulk viscosity, and I is identity tensor. // -// The user needs to provide `a` by `setACoeffs`, eta by `setShearViscosity`, -// and kappa by `setBulkViscosity`. If `setBulkViscosity` is not called, -// kappa is set to zero. The user must also call `setEBShearViscosity` to set +// The user needs to provide `alpha` by `setACoeffs`, `eta` by `setShearViscosity`, +// and `kappa` by `setBulkViscosity`. If `setBulkViscosity` is not called, +// `kappa` is set to zero. The user must also call `setEBShearViscosity` to set // viscosity on EB. Optionally, `setEBBulkViscosity` can be used to set // bulk viscosity on EB. // -// The scalars alpha and beta can be set with `setScalar(Real, Real)`. If +// The scalars `A` and `B` can be set with `setScalar(Real, Real)`. If // they are not set, their default value is 1. - class MLEBTensorOp : public MLEBABecLap { diff --git a/Src/LinearSolvers/MLMG/AMReX_MLMG.H b/Src/LinearSolvers/MLMG/AMReX_MLMG.H index f1fed2d3db3..af0b3dd8e8d 100644 --- a/Src/LinearSolvers/MLMG/AMReX_MLMG.H +++ b/Src/LinearSolvers/MLMG/AMReX_MLMG.H @@ -57,7 +57,7 @@ public: Location a_loc = Location::FaceCenter); /** - * \brief For ``(alpha * a - beta * (del dot b grad)) phi = rhs``, flux means ``-b grad phi`` + * \brief For ``(A * alpha - B * (del dot beta grad)) phi = rhs``, flux means ``-beta grad phi`` */ template void getFluxes (const Vector >& a_flux, diff --git a/Src/LinearSolvers/MLMG/AMReX_MLNodeABecLaplacian.H b/Src/LinearSolvers/MLMG/AMReX_MLNodeABecLaplacian.H index 6caed940fa9..c66be7038dd 100644 --- a/Src/LinearSolvers/MLMG/AMReX_MLNodeABecLaplacian.H +++ b/Src/LinearSolvers/MLMG/AMReX_MLNodeABecLaplacian.H @@ -6,9 +6,8 @@ namespace amrex { -// (alpha * a - beta * (del dot b grad)) phi = rhs -// a, phi and rhs are nodal. b is cell-centered. - +// (A * alpha - B * (del dot beta grad)) phi = rhs +// alpha, phi and rhs are nodal. beta is cell-centered. class MLNodeABecLaplacian : public MLNodeLinOp { diff --git a/Src/LinearSolvers/MLMG/AMReX_MLTensorOp.H b/Src/LinearSolvers/MLMG/AMReX_MLTensorOp.H index 15e6ba0d7dd..cdce6181b6b 100644 --- a/Src/LinearSolvers/MLMG/AMReX_MLTensorOp.H +++ b/Src/LinearSolvers/MLMG/AMReX_MLTensorOp.H @@ -10,18 +10,17 @@ namespace amrex { // Tensor solver for high Reynolds flows with small gradient in viscosity. // The system it solves is // -// alpha a v - beta div dot tau = rhs +// A alpha v - B div dot tau = rhs // // where tau = eta [grad v + (grad v)^T] + (kappa-(2/3)eta) (div v) I. // Here eta and kappa are shear and bulk viscosity, and I is identity tensor. // -// The user needs to provide `a` by `setACoeffs`, eta by `setShearViscosity`, -// and kappa by `setBulkViscosity`. If `setBulkViscosity` is not called, -// kappa is set to zero. +// The user needs to provide `alpha` by `setACoeffs`, `eta` by `setShearViscosity`, +// and `kappa` by `setBulkViscosity`. If `setBulkViscosity` is not called, +// `kappa` is set to zero. // -// The scalars alpha and beta can be set with `setScalar(Real, Real)`. If +// The scalars `A` and `B` can be set with `setScalar(Real, Real)`. If // they are not set, their default value is 1. - class MLTensorOp : public MLABecLaplacian { diff --git a/Tests/LinearSolvers/ABecLaplacian_F/README b/Tests/LinearSolvers/ABecLaplacian_F/README index f3f8b566a9e..575424b3565 100644 --- a/Tests/LinearSolvers/ABecLaplacian_F/README +++ b/Tests/LinearSolvers/ABecLaplacian_F/README @@ -1,10 +1,10 @@ This tutorial demonstrates how to solve the linear system in a canonical ABecLaplacian form - alpha * a * phi - beta * del dot (b grad phi) = rhs. + A * alpha * phi - B * del dot (beta grad phi) = rhs. -Here phi is the unknown in a cell-centered MultiFab, alpha and beta -are scalar constants, a is a cell-centered MultiFab, and b lives on +Here phi is the unknown in a cell-centered MultiFab, A and B +are scalar constants, alpha is a cell-centered MultiFab, and beta lives on cell faces and is thus represented by D face based MultiFabs, where D is the number of spatial dimensions. The right-hand side, rhs, is also cell-centered. A more specialized version of the ABecLaplacian @@ -12,7 +12,7 @@ form is Poisson's equation. This tutorial is written with AMReX's Fortran interfaces. After the solution is obtained, one can also ask for grad phi, or flux -(defined as -b grad phi). Note that they live on cell faces. This +(defined as -beta grad phi). Note that they live on cell faces. This step is not performed in this tutorial. However, one can look at `amrex/Src/F_Interfaces/LinearSolvers/AMReX_multigrid_mod.F90` for the interface of `get_grad_solution` and `get_fluxes`.