54 |
|
void (*p3)( double* positionArray, |
55 |
|
double* forceArray, |
56 |
|
double* potentialEnergy, |
57 |
< |
short int* doPotentialCalc )), |
57 |
> |
double* tau, |
58 |
> |
short int* doPotentialCalc, |
59 |
> |
int* isError)), |
60 |
|
int forceNameLength ); |
61 |
|
} |
62 |
|
|
65 |
|
double* sigma, int* status ), |
66 |
|
void (*p2)( int *nLocal, int *identArray, int *isError ), |
67 |
|
void (*p3)( double* positionArray,double* forceArray, |
68 |
< |
double* potentialEnergy, |
69 |
< |
short int* doPotentialCalc ) ); |
68 |
> |
double* potentialEnergy, double* tau, |
69 |
> |
short int* doPotentialCalc, int* isError ) ); |
70 |
|
|
71 |
|
void (*newLJtype)( int* ident, double* mass, double* epslon, double* sigma, |
72 |
|
int* status ); |
630 |
|
|
631 |
|
void LJ_FF::doForces( int calcPot ){ |
632 |
|
|
633 |
< |
int i; |
633 |
> |
int i, isError; |
634 |
|
double* frc; |
635 |
|
double* pos; |
636 |
+ |
double* tau; |
637 |
|
short int passedCalcPot = (short int)calcPot; |
638 |
|
|
639 |
|
// forces are zeroed here, before any are acumulated. |
645 |
|
|
646 |
|
frc = Atom::getFrcArray(); |
647 |
|
pos = Atom::getPosArray(); |
648 |
+ |
tau = entry_plug->tau; |
649 |
|
|
650 |
< |
// entry_plug->lrPot = -1; |
651 |
< |
doLJfortran( pos, frc, &(entry_plug->lrPot), &passedCalcPot ); |
650 |
> |
isError = 0; |
651 |
> |
doLJfortran( pos, frc, &(entry_plug->lrPot), tau, &passedCalcPot, &isError ); |
652 |
> |
|
653 |
|
|
654 |
+ |
if( isError ){ |
655 |
+ |
sprintf( painCave.errMsg, |
656 |
+ |
"Error returned from the fortran force calculation.\n" ); |
657 |
+ |
painCave.isFatal = 1; |
658 |
+ |
simError(); |
659 |
+ |
} |
660 |
|
|
661 |
< |
// fprintf( stderr, |
662 |
< |
// "lrPot = %lf\n", entry_plug->lrPot ); |
663 |
< |
|
661 |
> |
#ifdef IS_MPI |
662 |
> |
sprintf( checkPointMsg, |
663 |
> |
"returned from the force calculation.\n" ); |
664 |
> |
MPIcheckPoint(); |
665 |
> |
#endif // is_mpi |
666 |
> |
|
667 |
|
} |
668 |
|
|
669 |
|
void LJ_FF::initFortran( void ){ |