Initialize output arrays to zero in fdderivs_c.C and fderivs_c.C
This commit is contained in:
@@ -73,6 +73,10 @@ void fdderivs(const int ex[3],
|
|||||||
|
|
||||||
/* 输出清零:fxx,fyy,fzz,fxy,fxz,fyz = 0 */
|
/* 输出清零:fxx,fyy,fzz,fxy,fxz,fyz = 0 */
|
||||||
const size_t all = (size_t)ex1 * (size_t)ex2 * (size_t)ex3;
|
const size_t all = (size_t)ex1 * (size_t)ex2 * (size_t)ex3;
|
||||||
|
for (size_t p = 0; p < all; ++p) {
|
||||||
|
fxx[p] = ZEO; fyy[p] = ZEO; fzz[p] = ZEO;
|
||||||
|
fxy[p] = ZEO; fxz[p] = ZEO; fyz[p] = ZEO;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fortran:
|
* Fortran:
|
||||||
|
|||||||
@@ -74,6 +74,11 @@ void fderivs(const int ex[3],
|
|||||||
|
|
||||||
// fx = fy = fz = 0
|
// fx = fy = fz = 0
|
||||||
const size_t all = (size_t)ex1 * (size_t)ex2 * (size_t)ex3;
|
const size_t all = (size_t)ex1 * (size_t)ex2 * (size_t)ex3;
|
||||||
|
for (size_t p = 0; p < all; ++p) {
|
||||||
|
fx[p] = ZEO;
|
||||||
|
fy[p] = ZEO;
|
||||||
|
fz[p] = ZEO;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fortran loops:
|
* Fortran loops:
|
||||||
|
|||||||
Reference in New Issue
Block a user