From 444fae2766a6d1fdde3af05e5b206ff3cc21160f Mon Sep 17 00:00:00 2001 From: Edward Basso Date: Tue, 28 Nov 2023 16:17:47 -0800 Subject: [PATCH] Revert comment changes --- Docs/sphinx_documentation/source/LinearSolvers.rst | 2 +- Src/LinearSolvers/MLMG/AMReX_MLABecLaplacian.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 ++++---- 7 files changed, 23 insertions(+), 19 deletions(-) diff --git a/Docs/sphinx_documentation/source/LinearSolvers.rst b/Docs/sphinx_documentation/source/LinearSolvers.rst index 153d259f04e..e7266f02243 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 // - // (A * alpha - B * (del dot beta grad)) sol + // (alpha * a - beta * (del dot b 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 7e53d96d86b..cc9c361e916 100644 --- a/Src/LinearSolvers/MLMG/AMReX_MLABecLaplacian.H +++ b/Src/LinearSolvers/MLMG/AMReX_MLABecLaplacian.H @@ -7,7 +7,8 @@ namespace amrex { -// (A * alpha - B * (del dot beta grad)) phi +// (alpha * a - beta * (del dot b grad)) phi + template class MLABecLaplacianT : public MLCellABecLapT diff --git a/Src/LinearSolvers/MLMG/AMReX_MLEBTensorOp.H b/Src/LinearSolvers/MLMG/AMReX_MLEBTensorOp.H index 98e09039b64..aa420b5635a 100644 --- a/Src/LinearSolvers/MLMG/AMReX_MLEBTensorOp.H +++ b/Src/LinearSolvers/MLMG/AMReX_MLEBTensorOp.H @@ -9,19 +9,20 @@ namespace amrex { // Tensor solver for high Reynolds flows with small gradient in viscosity. // The system it solves is // -// A alpha v - B div dot tau = rhs +// alpha a v - beta 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 `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 +// 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 // viscosity on EB. Optionally, `setEBBulkViscosity` can be used to set // bulk viscosity on EB. // -// The scalars `A` and `B` can be set with `setScalar(Real, Real)`. If +// The scalars alpha and beta 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 dd4a87dbbdd..70e7e121486 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 ``(A * alpha - B * (del dot beta grad)) phi = rhs``, flux means ``-beta grad phi`` + * \brief For ``(alpha * a - beta * (del dot b grad)) phi = rhs``, flux means ``-b 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 c66be7038dd..6caed940fa9 100644 --- a/Src/LinearSolvers/MLMG/AMReX_MLNodeABecLaplacian.H +++ b/Src/LinearSolvers/MLMG/AMReX_MLNodeABecLaplacian.H @@ -6,8 +6,9 @@ namespace amrex { -// (A * alpha - B * (del dot beta grad)) phi = rhs -// alpha, phi and rhs are nodal. beta is cell-centered. +// (alpha * a - beta * (del dot b grad)) phi = rhs +// a, phi and rhs are nodal. b is cell-centered. + class MLNodeABecLaplacian : public MLNodeLinOp { diff --git a/Src/LinearSolvers/MLMG/AMReX_MLTensorOp.H b/Src/LinearSolvers/MLMG/AMReX_MLTensorOp.H index cdce6181b6b..15e6ba0d7dd 100644 --- a/Src/LinearSolvers/MLMG/AMReX_MLTensorOp.H +++ b/Src/LinearSolvers/MLMG/AMReX_MLTensorOp.H @@ -10,17 +10,18 @@ namespace amrex { // Tensor solver for high Reynolds flows with small gradient in viscosity. // The system it solves is // -// A alpha v - B div dot tau = rhs +// alpha a v - beta 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 `alpha` by `setACoeffs`, `eta` by `setShearViscosity`, -// and `kappa` by `setBulkViscosity`. If `setBulkViscosity` is not called, -// `kappa` is set to zero. +// 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 scalars `A` and `B` can be set with `setScalar(Real, Real)`. If +// The scalars alpha and beta 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 575424b3565..f3f8b566a9e 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 - A * alpha * phi - B * del dot (beta grad phi) = rhs. + alpha * a * phi - beta * del dot (b grad phi) = rhs. -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 +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 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 -beta grad phi). Note that they live on cell faces. This +(defined as -b 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`.