2.2.3 compute
compute is used to compute certain data specified by the user.
Syntax:
compute id group-id style args
- id: user assigned name for this compute
- group-id: only particles in this group are applied with this compute
- style: type of the compute (see the list below)
- args: arguments to the corresponding compute style
Examples:
compute 1 all centroid compute 2 water temp
Description:
A list of current available compute style is given below:
|
|
| centroid | compute centroid of a group of particles |
| pressure | perform time average |
| rdf | compute radial distribution of a group of particles |
| temp | perform time average on spatial average |
|
|
| |
Table 2.2: List of available compute style
Output
The output can be in the form of scalar, vector or array.
- scalar: Results can be accessed by c_id, where id is the compute-id, eg. c_1
- vector: Results can be accessed by c_id[dim], where dim is 0, 1, ... N, eg. c_1[0]
- array: Results can be accessed by c_id[dim1][dim2], c_2[0][2]