Definition at line 108 of file Controller.C.
◆ PressureProfileReduction()
PressureProfileReduction::PressureProfileReduction |
( |
int |
rtag, |
|
|
int |
numslabs, |
|
|
int |
numpartitions, |
|
|
const char * |
myname, |
|
|
int |
outputfreq |
|
) |
| |
|
inline |
Definition at line 120 of file Controller.C.
References average(), ReductionMgr::Object(), and ReductionMgr::willRequire().
122 : nslabs(numslabs), freq(outputfreq) {
123 name = strdup(myname);
124 nelements = 3*nslabs * numpartitions;
static ReductionMgr * Object(void)
RequireReduction * willRequire(int setID, int size=-1)
int average(CompAtom *qtilde, const HGArrayVector &q, BigReal *lambda, const int n, const int m, const HGArrayBigReal &imass, const HGArrayBigReal &length2, const HGArrayInt &ial, const HGArrayInt &ibl, const HGArrayVector &refab, const BigReal tolf, const int ntrial)
◆ ~PressureProfileReduction()
PressureProfileReduction::~PressureProfileReduction |
( |
| ) |
|
|
inline |
Definition at line 130 of file Controller.C.
References average().
int average(CompAtom *qtilde, const HGArrayVector &q, BigReal *lambda, const int n, const int m, const HGArrayBigReal &imass, const HGArrayBigReal &length2, const HGArrayInt &ial, const HGArrayInt &ibl, const HGArrayVector &refab, const BigReal tolf, const int ntrial)
◆ getData()
void PressureProfileReduction::getData |
( |
int |
firsttimestep, |
|
|
int |
step, |
|
|
const Lattice & |
lattice, |
|
|
BigReal * |
total |
|
) |
| |
|
inline |
Definition at line 136 of file Controller.C.
References average(), endi(), iout, RequireReduction::item(), PRESSUREFACTOR, RequireReduction::require(), and Lattice::volume().
Referenced by Controller::printEnergies().
141 double inv_volume = 1.0 / lattice.
volume();
143 int arraysize = 3*nslabs;
144 for (i=0; i<nelements; i++) {
147 total[i % arraysize] += val;
150 if (!(step % freq)) {
154 iout <<
"PPROFILE" << name <<
": " << step <<
" ";
155 if (step == firsttimestep) {
157 for (i=0; i<nelements; i++)
158 iout << reduction->
item(i)*scalefac*inv_volume <<
" ";
162 for (i=0; i<nelements; i++)
std::ostream & endi(std::ostream &s)
NAMD_HOST_DEVICE BigReal volume(void) const
BigReal item(int i) const
int average(CompAtom *qtilde, const HGArrayVector &q, BigReal *lambda, const int n, const int m, const HGArrayBigReal &imass, const HGArrayBigReal &length2, const HGArrayInt &ial, const HGArrayInt &ibl, const HGArrayVector &refab, const BigReal tolf, const int ntrial)
The documentation for this class was generated from the following file: