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

Go to the source code of this file.

Functions

void EvalVrms ()
 

Function Documentation

◆ EvalVrms()

void EvalVrms ( )

Definition at line 27 of file EvalVrms.c.

27 {
28 int n;
29 VSqr = 0.0;
30 VMeanSqr = 0.0;
31 VRootMeanSqr = 0.0;
32
33 for(n = 1 ; n <= nAtom ; n ++){
34 VSqr += Sqr(vx[n]) + Sqr(vy[n]);
35 }
37 VRootMeanSqr = sqrt(VMeanSqr);
38 }
int nAtom
Definition global.h:24
double VMeanSqr
Definition global.h:46
double VRootMeanSqr
Definition global.h:46
double * vx
Definition global.h:17
double VSqr
#define Sqr(x)
Definition global.h:14
double * vy
Definition global.h:17

References nAtom, Sqr, VMeanSqr, VRootMeanSqr, VSqr, vx, and vy.

Referenced by main().

+ Here is the caller graph for this function: