Edits to modify doc files
This commit is contained in:
@ -96,7 +96,7 @@ methods that a new variable name or flag needs to be added to.
|
|||||||
In ``Atom::peratom_create()`` when using the ``Atom::add_peratom()``
|
In ``Atom::peratom_create()`` when using the ``Atom::add_peratom()``
|
||||||
method, a cols argument of 0 is for per-atom vectors, a length >
|
method, a cols argument of 0 is for per-atom vectors, a length >
|
||||||
1 is for per-atom arrays. Note the use of the extra per-thread flag and
|
1 is for per-atom arrays. Note the use of the extra per-thread flag and
|
||||||
the add_peratom_vary() method when last dimension of the array is
|
the add_peratom_vary() method when the last dimension of the array is
|
||||||
variable-length.
|
variable-length.
|
||||||
|
|
||||||
Adding the variable name to Atom::extract() enables the per-atom data
|
Adding the variable name to Atom::extract() enables the per-atom data
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
Submitting new features for inclusion in LAMMPS
|
Submitting new features for inclusion in LAMMPS
|
||||||
===============================================
|
===============================================
|
||||||
|
|
||||||
We encourage LAMMPS users to submit new features they wrote for LAMMPS
|
We encourage LAMMPS users to submit new features they write for LAMMPS
|
||||||
to be included in the LAMMPS distribution and thus become easily
|
to be included in the LAMMPS distribution and thus become easily
|
||||||
accessible to all LAMMPS users. The LAMMPS source code is managed
|
accessible to all LAMMPS users. The LAMMPS source code is managed
|
||||||
with git and public development is hosted on `GitHub
|
with git and public development is hosted on `GitHub
|
||||||
|
|||||||
@ -65,37 +65,28 @@ need to be defined
|
|||||||
|
|
||||||
.. list-table::
|
.. list-table::
|
||||||
|
|
||||||
* - ``GranSubMod->mix_coeff()``
|
* - ``mix_coeff()``
|
||||||
- Optional method to define how coefficients are mixed for different atom types. By default, coefficients are mixed using a geometric mean.
|
- Optional method to define how coefficients are mixed for different atom types. By default, coefficients are mixed using a geometric mean.
|
||||||
* - ``GranSubMod->coeffs_to_local()``
|
* - ``coeffs_to_local()``
|
||||||
- Parses coefficients to define local variables. Run once at model construction.
|
- Parses coefficients to define local variables. Run once at model construction.
|
||||||
* - ``GranSubMod->init()``
|
* - ``init()``
|
||||||
- Optional method to define local variables after other GranSubMod types were created. For instance, this method may be used by a tangential model that derives parameters from the normal model.
|
- Optional method to define local variables after other GranSubMod types were created. For instance, this method may be used by a tangential model that derives parameters from the normal model.
|
||||||
|
|
||||||
There are also several type-specific methods
|
The Normal, Damping, Tangential, Twisting, and Rolling sub-models also have a
|
||||||
|
``calculate_forces()`` method which calculate the respective forces/torques.
|
||||||
|
Correspondingly, the Heat sub-model has a ``calculate_heat()`` method. Lastly,
|
||||||
|
the Normal sub-model has a few extra optional methods:
|
||||||
|
|
||||||
.. list-table::
|
.. list-table::
|
||||||
|
|
||||||
* - ``GranSubModNormal->touch()``
|
* - ``touch()``
|
||||||
- Optional method to test when particles are in contact. By default, this is when particles overlap.
|
- Tests whether particles are in contact. By default, when particles overlap.
|
||||||
* - ``GranSubModNormal->pulloff_distance()``
|
* - ``pulloff_distance()``
|
||||||
- Optional method to return the distance at which particles stop interacting. By default, this is when particles no longer overlap.
|
- Returns the distance at which particles stop interacting. By default, when particles no longer overlap.
|
||||||
* - ``GranSubModNormal->calculate_radius()``
|
* - ``calculate_radius()``
|
||||||
- Optional method to return the radius of the contact. By default, this returns the radius of the geometric cross section.
|
- Returns the radius of the contact. By default, the radius of the geometric cross section.
|
||||||
* - ``GranSubModNormal->set_fncrit()``
|
* - ``set_fncrit()``
|
||||||
- Optional method that defines the critical force to break the contact used by some tangential, rolling, and twisting sub-models. By default, this is the current total normal force including damping.
|
- Defines the critical force to break the contact used by some tangential, rolling, and twisting sub-models. By default, the current total normal force including damping.
|
||||||
* - ``GranSubModNormal->calculate_forces()``
|
|
||||||
- Required method that returns the normal contact force
|
|
||||||
* - ``GranSubModDamping->calculate_forces()``
|
|
||||||
- Required method that returns the normal damping force
|
|
||||||
* - ``GranSubModTangential->calculate_forces()``
|
|
||||||
- Required method that calculates tangential forces/torques
|
|
||||||
* - ``GranSubModTwisting->calculate_forces()``
|
|
||||||
- Required method that calculates twisting friction forces/torques
|
|
||||||
* - ``GranSubModRolling->calculate_forces()``
|
|
||||||
- Required method that calculates rolling friction forces/torques
|
|
||||||
* - ``GranSubModHeat->calculate_heat()``
|
|
||||||
- Required method that returns the rate of heat flow
|
|
||||||
|
|
||||||
As an example, say one wanted to create a new normal force option that consisted
|
As an example, say one wanted to create a new normal force option that consisted
|
||||||
of a Hookean force with a piecewise stiffness. This could be done by adding a new
|
of a Hookean force with a piecewise stiffness. This could be done by adding a new
|
||||||
|
|||||||
@ -12,8 +12,8 @@ programming style choices in LAMMPS is :doc:`given elsewhere
|
|||||||
<Developer_code_design>`.
|
<Developer_code_design>`.
|
||||||
|
|
||||||
Most of the new features described on the :doc:`Modify <Modify>` doc
|
Most of the new features described on the :doc:`Modify <Modify>` doc
|
||||||
page require you to write a new C++ derived class (except for
|
page require you to write a new C++ derived class (excluding exceptions
|
||||||
exceptions described below, where you can make small edits to existing
|
described below, this can often be done by making small edits to existing
|
||||||
files). Creating a new class requires 2 files, a source code file
|
files). Creating a new class requires 2 files, a source code file
|
||||||
(\*.cpp) and a header file (\*.h). The derived class must provide
|
(\*.cpp) and a header file (\*.h). The derived class must provide
|
||||||
certain methods to work as a new option. Depending on how different
|
certain methods to work as a new option. Depending on how different
|
||||||
@ -46,7 +46,7 @@ then your ``pair_foo.h`` file should be structured as follows:
|
|||||||
// clang-format off
|
// clang-format off
|
||||||
PairStyle(foo,PairFoo);
|
PairStyle(foo,PairFoo);
|
||||||
#else
|
#else
|
||||||
// clanf-format on
|
// clang-format on
|
||||||
...
|
...
|
||||||
(class definition for PairFoo)
|
(class definition for PairFoo)
|
||||||
...
|
...
|
||||||
|
|||||||
@ -184,7 +184,7 @@ package so that it is optional.
|
|||||||
Included Fortran code has to be compatible with the Fortran 2003
|
Included Fortran code has to be compatible with the Fortran 2003
|
||||||
standard. Since not all platforms supported by LAMMPS provide good
|
standard. Since not all platforms supported by LAMMPS provide good
|
||||||
support for compiling Fortran files, it should be considered to rewrite
|
support for compiling Fortran files, it should be considered to rewrite
|
||||||
these parts as C++ code, if possible and thus allow for a wider adoption
|
these parts as C++ code, if possible, and thus allow for a wider adoption
|
||||||
of the contribution. As of January 2023, all previously included
|
of the contribution. As of January 2023, all previously included
|
||||||
Fortran code for the LAMMPS executable has been replaced by equivalent
|
Fortran code for the LAMMPS executable has been replaced by equivalent
|
||||||
C++ code.
|
C++ code.
|
||||||
|
|||||||
@ -14,7 +14,7 @@ style, but can be adapted using :doc:`thermo_modify line <thermo_modify>`.
|
|||||||
|
|
||||||
The thermo styles (one, multi, etc) are defined by lists of keywords
|
The thermo styles (one, multi, etc) are defined by lists of keywords
|
||||||
with associated formats for integer and floating point numbers and
|
with associated formats for integer and floating point numbers and
|
||||||
identified but an enumerator constant. Adding a new style thus mostly
|
identified by an enumerator constant. Adding a new style thus mostly
|
||||||
requires defining a new list of keywords and the associated formats and
|
requires defining a new list of keywords and the associated formats and
|
||||||
then inserting the required output processing where the enumerators are
|
then inserting the required output processing where the enumerators are
|
||||||
identified. Search for the word "CUSTOMIZATION" with references to
|
identified. Search for the word "CUSTOMIZATION" with references to
|
||||||
|
|||||||
Reference in New Issue
Block a user