Lemina
A molecular dynamics package for network, granular material and point particles with a range of interaction potential.
 
Loading...
Searching...
No Matches
ApplyLeesEdwardsBoundaryCond.c File Reference
#include <stdio.h>
#include <math.h>
#include "global.h"
+ Include dependency graph for ApplyLeesEdwardsBoundaryCond.c:

Go to the source code of this file.

Functions

void ApplyLeesEdwardsBoundaryCond ()
 

Function Documentation

◆ ApplyLeesEdwardsBoundaryCond()

void ApplyLeesEdwardsBoundaryCond ( )

Definition at line 25 of file ApplyLeesEdwardsBoundaryCond.c.

25 {
26 int n;
27 for (n = 1; n <= nAtom; n++) {
28//PBC along x-direction
29 if(rx[n] >= regionH[1])
30 rx[n] -= region[1];
31 else if(rx[n] < -regionH[1])
32 rx[n] += region[1];
33
34//LEBC along y-direction
35 if(ry[n] >= regionH[2]){
37 if(rx[n] < -regionH[1]) rx[n] += region[1];
38 //vx[n] -= shearVelocity;
39 ry[n] -= region[2];
40 }else if(ry[n] < -regionH[2]){
42 if(rx[n] >= regionH[1]) rx[n] -= region[1];
43 //vx[n] += shearVelocity;
44 ry[n] += region[2];
45 }
46 }
47}
int nAtom
Definition global.h:24
double region[2+1]
double * rx
double shearDisplacement
double regionH[2+1]
Definition global.h:20
double * ry
Definition global.h:17

References nAtom, region, regionH, rx, ry, and shearDisplacement.