| 56 |
|
} |
| 57 |
|
|
| 58 |
|
int CGFamilyMinimizer::checkConvg(){ |
| 59 |
< |
double fTol; |
| 60 |
< |
double relativeFTol; // relative tolerance |
| 61 |
< |
double deltaF; |
| 62 |
< |
double gTol; |
| 63 |
< |
double relativeGTol; |
| 64 |
< |
double gnorm; |
| 59 |
> |
RealType fTol; |
| 60 |
> |
RealType relativeFTol; // relative tolerance |
| 61 |
> |
RealType deltaF; |
| 62 |
> |
RealType gTol; |
| 63 |
> |
RealType relativeGTol; |
| 64 |
> |
RealType gnorm; |
| 65 |
|
|
| 66 |
|
|
| 67 |
|
// test function tolerance test |
| 86 |
|
#ifndef IS_MPI |
| 87 |
|
gnorm = sqrt(dotProduct(curG, curG)); |
| 88 |
|
#else |
| 89 |
< |
double localDP; |
| 90 |
< |
double globalDP; |
| 89 |
> |
RealType localDP; |
| 90 |
> |
RealType globalDP; |
| 91 |
|
|
| 92 |
|
localDP = dotProduct(curG, curG); |
| 93 |
< |
MPI_Allreduce(&localDP, &globalDP, 1, MPI_DOUBLE,MPI_SUM, MPI_COMM_WORLD); |
| 93 |
> |
MPI_Allreduce(&localDP, &globalDP, 1, MPI_REALTYPE,MPI_SUM, MPI_COMM_WORLD); |
| 94 |
|
gnorm = sqrt(globalDP); |
| 95 |
|
#endif |
| 96 |
|
|