PLUTO  4.4-patch2
Functions
particles_boundary.c File Reference

Set boundary conditions on particles. More...

#include "pluto.h"

Functions

void Particles_Boundary (Data *d, Grid *grid)
 
void Particles_BoundaryExchange (Data *d, Grid *grid)
 
void Particles_ListToArray (Data *d)
 
int Particles_BoundaryCheck (Particle *p, Grid *grid)
 

Detailed Description

Set boundary conditions at physical boundaries and exchange particles between neighbour processors.

The function Particles_Boundary() sets boundary conditions at physical boundaries only. The function Particles_BoundaryExchange() exchanges particles between adjacent processors.

Authors
A. Mignone (migno.nosp@m.ne@t.nosp@m.o.inf.nosp@m.n.it)
B. Vaidya (bvaid.nosp@m.ya@u.nosp@m.nito..nosp@m.it)
Date
Mar 13, 2021

Function Documentation

◆ Particles_Boundary()

void Particles_Boundary ( Data d,
Grid grid 
)

Sets physical boundary conditions on particles.

Parameters
[in]dPointer to PLUTO data structure.
[in]gridPointer to PLUTO grid structure.

◆ Particles_BoundaryCheck()

int Particles_BoundaryCheck ( Particle *  p,
Grid grid 
)

Check if a particle is in the ghost zones or outside the whole computational domain.

 <--------->                               <--------->
| last |      |  .... Active Domain ....    |      | last |

xb2 xb1 xb0 xe0 xe1 xe2

Here 'last' marks the very last (or first) ghost zones. If a particle lies here, then deposition may not be done correctly.

Returns
This function returns:
  • 0 if the particle is in the active domain
  • 1 if the particle is in the ghost zones, but in the last one
  • 2 if the particle is in the last ghost zone
  • 3 if the particle is outside the whole comput. domain

◆ Particles_BoundaryExchange()

void Particles_BoundaryExchange ( Data d,
Grid grid 
)

In parallel mode, exchange/duplicate particles between neighbour processor. The function is done direction-wise: if a particle escapes from the left (right) boundary it is sent to the left (right) processor. The exchange is repeated direction by direction.

Parameters
[in]dPointer to PLUTO data structure.
[in]gridPointer to the PLUTO grid structure.

◆ Particles_ListToArray()

void Particles_ListToArray ( Data d)

Convert a linked list into an array of pointers. This function must be called only after particles have been redistributed.