doc tweaks
This commit is contained in:
@ -4,40 +4,39 @@ Distributed grids
|
||||
LAMMPS has internal capabilities to create uniformly spaced grids
|
||||
which overlay the simulation domain. For 2d and 3d simulations these
|
||||
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
|
||||
point. Internally, the grid point is typically the center point of
|
||||
the grid cell, though that is a coding option when using grids. Each
|
||||
grid cell stores one or more values (data).
|
||||
of as a collection of grid cells. Each grid cell can store one or
|
||||
more values (data).
|
||||
|
||||
The grid points and data they store are distributed across processors.
|
||||
Each processor owns the grid cells (and their data) whose grid points
|
||||
lie within the spatial sub-domain of the processor. If needed for its
|
||||
computations, it may also store ghost grid cells with their data.
|
||||
The grid cells and data they store are distributed across processors.
|
||||
Each processor owns the grid cells (and data) whose center points lie
|
||||
within the spatial sub-domain of the processor. If needed for its
|
||||
computations, a processor may also store ghost grid cells with their
|
||||
data.
|
||||
|
||||
These grids can overlay orthogonal or triclinic simulation boxes; see
|
||||
the :doc:`Howto triclinic <Howto_triclinic>` doc page for an
|
||||
explanation of the latter. For a triclinic box, the grid cells
|
||||
conform to the shape of the simulation domain, e.g. parallelograms
|
||||
instead of rectangles in 2d.
|
||||
Distributed grids can overlay orthogonal or triclinic simulation
|
||||
boxes; see the :doc:`Howto triclinic <Howto_triclinic>` doc page for
|
||||
an explanation of the latter. For a triclinic box, the grid cell
|
||||
shape conforms to the shape of the simulation domain,
|
||||
e.g. parallelograms instead of rectangles in 2d.
|
||||
|
||||
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
|
||||
non-periodic dimensions, the grid size in that dimension matches the
|
||||
box size, i.e. as set by the :doc:`boundary <boundary>` command for
|
||||
fixed or shrink-wrapped boundaries.
|
||||
box size, as set by the :doc:`boundary <boundary>` command for fixed
|
||||
or shrink-wrapped boundaries.
|
||||
|
||||
If load-balancing is invoked by the :doc:`balance <balance>` or
|
||||
:doc:`fix balance <fix_balance>` commands, then the sub-domain owned
|
||||
by a processor will change which may also change which grid points
|
||||
they own.
|
||||
by a processor can change which may also change which grid cells they
|
||||
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
|
||||
:doc:`dump image <dump_image>` commands, the latter by using its
|
||||
optional *grid* keyword. The `OVITO visualization tool
|
||||
:doc:`dump image <dump_image>` commands. The latter has an optional
|
||||
*grid* keyword. The `OVITO visualization tool
|
||||
<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
|
||||
grid <dump>` output format.
|
||||
for visualizing grid cell data (along with atoms) using :doc:`dump
|
||||
grid <dump>` output files as input.
|
||||
|
||||
.. note::
|
||||
|
||||
@ -63,6 +62,7 @@ grids:
|
||||
* :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 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 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
|
||||
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
|
||||
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
|
||||
syntax:
|
||||
|
||||
@ -230,8 +230,8 @@ void Grid2d::set_yfactor(double factor)
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
set IDs of proc neighbors used in uniform local owned/ghost comm
|
||||
called AFTER setup_grid() but BEFORE setup_comm() to override
|
||||
the processor neighbors stored by extract_comm()
|
||||
must be called BEFORE setup_comm() to override
|
||||
the processor neighbors stored by extract_comm_info()
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
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
|
||||
called AFTER setup_grid() but BEFORE setup_comm() to override
|
||||
the caller grid size set by setup_grid() and used in indices()
|
||||
must be called BEFORE setup_comm() to override
|
||||
the caller grid size used in indices()
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Grid2d::set_caller_grid(int fxlo, int fxhi, int fylo, int fyhi)
|
||||
|
||||
@ -244,8 +244,8 @@ void Grid3d::set_zfactor(double factor)
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
set IDs of proc neighbors used in uniform local owned/ghost comm
|
||||
called AFTER setup_grid() but BEFORE setup_comm() to override
|
||||
the processor neighbors stored by extract_comm()
|
||||
must be called BEFORE setup_comm() to override
|
||||
the processor neighbors stored by extract_comm_info()
|
||||
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
|
||||
called AFTER setup_grid() but BEFORE setup_comm() to override
|
||||
the caller grid size set by setup_grid() and used in indices()
|
||||
must be called BEFORE setup_comm() to override
|
||||
the caller grid size used in indices()
|
||||
used by MSM to allow a larger level 0 grid to be allocated
|
||||
with more ghost cells for other operations
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user