SPARTA WWW Site - SPARTA Documentation - SPARTA Commands

fix adapt command


fix ID adapt Nfreq args ... 


fix 1 adapt 1000 all refine particle 10 50
fix 1 adapt 1000 all coarsen particle 10 50
fix 1 adapt 500 subset refine coarsen particle 10 50
fix 1 adapt 10000 all refine surf 0.15 iterate 1 dir 1 0 0 
fix 10 adapt 1000 all refine coarsen value c_11 5.0 10.0 iterate 2 


This command performs on-the-fly adapatation of grid cells as a simulation runs, either by refinement or coarsening or both. Grid adaptation can also be performed before or between simulations by using the adapt_grid command.

Refinement means splitting one child cell into multiple new child cells; the original child cell becomes a parent cell. Coarsening means combining all the child cells of a parent cell, so that the child cells are deleted and the parent cell becomes a single new child cell. See Section howto 4.8 for a description of the hierarchical grid used by SPARTA and a defintion of child and parent cells.

Grid adaptation can be useful for adjusting the grid cell sizes to the current particle density distribution, or mean-free-path of particles, or to other simulation attributes such as the presence of surface elements. A well-adapted grid can improve accuracy of the simulation and/or reduce a simulation's computational cost.

Adaptation is performed by this command once every Nfreq timesteps.

All of the command arguments which appear after Nfreq, which determine how adapation is done for both refinement and coarsening, are exactly the same as for the adapt_grid command.

This includes a group-ID parameter which can be used to limit adaptation to a subset of current grid cells. See the adapt_grid command doc page for details.

The one exception is that the iterate keyword cannot be used with the fix adapt command. Only a single iteration of the action1 and action2 parameters (described on the adapt_grid doc page) can be performed each time grid adaptation is performed.

Restart, output info:

No information about this fix is written to binary restart files.

This fix computes a global scalar which is a flag for whether any grid cells were adapted on the last timestep it was invoked. The value of the flag is 1 if any cells were refined or coarsened, else it is 0.

Restrictions: none

Related commands:

adapt_grid, balance_grid

Default: none