doc tweaks

This commit is contained in:
Steve Plimpton
2022-11-25 15:03:03 -07:00
parent dd8a14789b
commit 76dbc498a0
3 changed files with 31 additions and 31 deletions

View File

@ -4,40 +4,39 @@ Distributed grids
LAMMPS has internal capabilities to create uniformly spaced grids LAMMPS has internal capabilities to create uniformly spaced grids
which overlay the simulation domain. For 2d and 3d simulations these which overlay the simulation domain. For 2d and 3d simulations these
are 2d and 3d grids respectively. Conceptually a grid can be thought are 2d and 3d grids respectively. Conceptually a grid can be thought
of as a collection of grid cells, each of which has an associated grid of as a collection of grid cells. Each grid cell can store one or
point. Internally, the grid point is typically the center point of more values (data).
the grid cell, though that is a coding option when using grids. Each
grid cell stores one or more values (data).
The grid points and data they store are distributed across processors. The grid cells and data they store are distributed across processors.
Each processor owns the grid cells (and their data) whose grid points Each processor owns the grid cells (and data) whose center points lie
lie within the spatial sub-domain of the processor. If needed for its within the spatial sub-domain of the processor. If needed for its
computations, it may also store ghost grid cells with their data. computations, a processor may also store ghost grid cells with their
data.
These grids can overlay orthogonal or triclinic simulation boxes; see Distributed grids can overlay orthogonal or triclinic simulation
the :doc:`Howto triclinic <Howto_triclinic>` doc page for an boxes; see the :doc:`Howto triclinic <Howto_triclinic>` doc page for
explanation of the latter. For a triclinic box, the grid cells an explanation of the latter. For a triclinic box, the grid cell
conform to the shape of the simulation domain, e.g. parallelograms shape conforms to the shape of the simulation domain,
instead of rectangles in 2d. e.g. parallelograms instead of rectangles in 2d.
If the box size or shape changes during a simulation, the grid changes If the box size or shape changes during a simulation, the grid changes
with it, so that it always overlays the entire simulation domain. For with it, so that it always overlays the entire simulation domain. For
non-periodic dimensions, the grid size in that dimension matches the non-periodic dimensions, the grid size in that dimension matches the
box size, i.e. as set by the :doc:`boundary <boundary>` command for box size, as set by the :doc:`boundary <boundary>` command for fixed
fixed or shrink-wrapped boundaries. or shrink-wrapped boundaries.
If load-balancing is invoked by the :doc:`balance <balance>` or If load-balancing is invoked by the :doc:`balance <balance>` or
:doc:`fix balance <fix_balance>` commands, then the sub-domain owned :doc:`fix balance <fix_balance>` commands, then the sub-domain owned
by a processor will change which may also change which grid points by a processor can change which may also change which grid cells they
they own. own.
Post-processing and visualization of per-grid data can be enabled by Post-processing and visualization of grid cell data can be enabled by
the :doc:`dump grid <dump>`, :doc:`dump grid/vtk <dump>`, and the :doc:`dump grid <dump>`, :doc:`dump grid/vtk <dump>`, and
:doc:`dump image <dump_image>` commands, the latter by using its :doc:`dump image <dump_image>` commands. The latter has an optional
optional *grid* keyword. The `OVITO visualization tool *grid* keyword. The `OVITO visualization tool
<https://www.ovito.org>`_ also plans (as of Nov 2022) to add support <https://www.ovito.org>`_ also plans (as of Nov 2022) to add support
for visualizing per-grid data (along with atoms) using the :doc:`dump for visualizing grid cell data (along with atoms) using :doc:`dump
grid <dump>` output format. grid <dump>` output files as input.
.. note:: .. note::
@ -63,6 +62,7 @@ grids:
* :doc:`dump grid <dump>` - output per-grid values in LAMMPS format * :doc:`dump grid <dump>` - output per-grid values in LAMMPS format
* :doc:`dump grid/vtk <dump>` - output per-grid values in VTK format * :doc:`dump grid/vtk <dump>` - output per-grid values in VTK format
* :doc:`dump image grid <dump_image>` - include colored grid in output images * :doc:`dump image grid <dump_image>` - include colored grid in output images
* :doc:`pair_style amoeba <pair_amoeba>` - FFT grids
* :doc:`kspace_style pppm <kspace_style>` (and variants) - FFT grids * :doc:`kspace_style pppm <kspace_style>` (and variants) - FFT grids
* :doc:`kspace_style msm <kspace_style>` (and variants) - MSM grids * :doc:`kspace_style msm <kspace_style>` (and variants) - MSM grids
@ -75,7 +75,7 @@ sizes). Each grid can store one or more data fields. A data field
can be a single value per grid point (per-grid vector) or multiple can be a single value per grid point (per-grid vector) or multiple
values per grid point (per-grid array). See the :doc:`Howto output values per grid point (per-grid array). See the :doc:`Howto output
<Howto_output>` doc page for an explanation of how per-grid data can <Howto_output>` doc page for an explanation of how per-grid data can
be generated by some commands and used by others. be generated by some commands and used by other commands.
A command accesses grid data from a compute or fix with the following A command accesses grid data from a compute or fix with the following
syntax: syntax:

View File

@ -230,8 +230,8 @@ void Grid2d::set_yfactor(double factor)
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
set IDs of proc neighbors used in uniform local owned/ghost comm set IDs of proc neighbors used in uniform local owned/ghost comm
called AFTER setup_grid() but BEFORE setup_comm() to override must be called BEFORE setup_comm() to override
the processor neighbors stored by extract_comm() the processor neighbors stored by extract_comm_info()
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
void Grid2d::set_proc_neighs(int pxlo, int pxhi, int pylo, int pyhi) void Grid2d::set_proc_neighs(int pxlo, int pxhi, int pylo, int pyhi)
@ -244,8 +244,8 @@ void Grid2d::set_proc_neighs(int pxlo, int pxhi, int pylo, int pyhi)
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
set allocation dimensions of caller grid used by indices() to setup pack/unpack set allocation dimensions of caller grid used by indices() to setup pack/unpack
called AFTER setup_grid() but BEFORE setup_comm() to override must be called BEFORE setup_comm() to override
the caller grid size set by setup_grid() and used in indices() the caller grid size used in indices()
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
void Grid2d::set_caller_grid(int fxlo, int fxhi, int fylo, int fyhi) void Grid2d::set_caller_grid(int fxlo, int fxhi, int fylo, int fyhi)

View File

@ -244,8 +244,8 @@ void Grid3d::set_zfactor(double factor)
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
set IDs of proc neighbors used in uniform local owned/ghost comm set IDs of proc neighbors used in uniform local owned/ghost comm
called AFTER setup_grid() but BEFORE setup_comm() to override must be called BEFORE setup_comm() to override
the processor neighbors stored by extract_comm() the processor neighbors stored by extract_comm_info()
used by MSM to exclude non-participating procs for coarse grid comm used by MSM to exclude non-participating procs for coarse grid comm
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
@ -262,8 +262,8 @@ void Grid3d::set_proc_neighs(int pxlo, int pxhi, int pylo, int pyhi,
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
set allocation dimensions of caller grid used by indices() to setup pack/unpack set allocation dimensions of caller grid used by indices() to setup pack/unpack
called AFTER setup_grid() but BEFORE setup_comm() to override must be called BEFORE setup_comm() to override
the caller grid size set by setup_grid() and used in indices() the caller grid size used in indices()
used by MSM to allow a larger level 0 grid to be allocated used by MSM to allow a larger level 0 grid to be allocated
with more ghost cells for other operations with more ghost cells for other operations
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */