Skip to content

Commit

Permalink
Revert comment changes
Browse files Browse the repository at this point in the history
  • Loading branch information
eebasso committed Nov 29, 2023
1 parent 5630815 commit 444fae2
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Docs/sphinx_documentation/source/LinearSolvers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
3 changes: 2 additions & 1 deletion Src/LinearSolvers/MLMG/AMReX_MLABecLaplacian.H
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

namespace amrex {

// (A * alpha - B * (del dot beta grad)) phi
// (alpha * a - beta * (del dot b grad)) phi

template <typename MF>
class MLABecLaplacianT
: public MLCellABecLapT<MF>
Expand Down
11 changes: 6 additions & 5 deletions Src/LinearSolvers/MLMG/AMReX_MLEBTensorOp.H
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion Src/LinearSolvers/MLMG/AMReX_MLMG.H
Original file line number Diff line number Diff line change
Expand Up @@ -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 <typename AMF>
void getFluxes (const Vector<Array<AMF*,AMREX_SPACEDIM> >& a_flux,
Expand Down
5 changes: 3 additions & 2 deletions Src/LinearSolvers/MLMG/AMReX_MLNodeABecLaplacian.H
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
11 changes: 6 additions & 5 deletions Src/LinearSolvers/MLMG/AMReX_MLTensorOp.H
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
8 changes: 4 additions & 4 deletions Tests/LinearSolvers/ABecLaplacian_F/README
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
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
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`.
Expand Down

0 comments on commit 444fae2

Please sign in to comment.