Loading src/libnptm/Commons.cpp +12 −12 Original line number Diff line number Diff line Loading @@ -1222,8 +1222,8 @@ ParticleDescriptorInclusion::ParticleDescriptorInclusion(const mixMPI *mpidata) // >>> ParticleDescriptorSphere class implementation. <<< // ParticleDescriptorSphere::ParticleDescriptorSphere(GeometryConfiguration *gconf, ScattererConfiguration *sconf) : ParticleDescriptor(gconf, sconf) { _class_type = SPHERE_TYPE; vec_sas = new dcomplex[4 * (_nsph + 1)](); vec_vints = new dcomplex[16 * (_nsph + 1)](); vec_sas = new dcomplex[4 * _nsph](); vec_vints = new dcomplex[16 * _nsph](); fsas = new dcomplex[_nsph]; sscs = new double[_nsph](); Loading @@ -1236,7 +1236,7 @@ ParticleDescriptorSphere::ParticleDescriptorSphere(GeometryConfiguration *gconf, sas = new dcomplex**[_nsph]; vints = new dcomplex*[_nsph]; for (int vi = 0; vi < _nsph; vi++) { vints[vi] = vec_vints + (16 * _nsph); vints[vi] = vec_vints + (16 * vi); sas[vi] = new dcomplex*[2]; sas[vi][0] = vec_sas + (4 * vi); sas[vi][1] = vec_sas + (4 * vi) + 2; Loading @@ -1249,6 +1249,14 @@ ParticleDescriptorSphere::ParticleDescriptorSphere(const ParticleDescriptorSpher for (int vsi = 0; vsi < 4 * _nsph; vsi++) vec_sas[vsi] = rhs.vec_sas[vsi]; vec_vints = new dcomplex[16 * _nsph]; for (int vvi = 0; vvi < 16 * _nsph; vvi++) vec_vints[vvi] = rhs.vec_vints[vvi]; sas = new dcomplex**[_nsph]; vints = new dcomplex*[_nsph]; for (int vi = 0; vi < _nsph; vi++) { vints[vi] = vec_vints + (16 * vi); sas[vi] = new dcomplex*[2]; sas[vi][0] = vec_sas + (4 * vi); sas[vi][1] = vec_sas + (4 * vi) + 2; } fsas = new dcomplex[_nsph]; sscs = new double[_nsph]; Loading @@ -1268,14 +1276,6 @@ ParticleDescriptorSphere::ParticleDescriptorSphere(const ParticleDescriptorSpher sqabs[gi] = rhs.sqabs[gi]; gcsv[gi] = rhs.gcsv[gi]; } sas = new dcomplex**[_nsph]; vints = new dcomplex*[_nsph]; for (int vi = 0; vi < nsph; vi++) { vints[vi] = vec_vints + (16 * nsph); sas[vi] = new dcomplex*[2]; sas[vi][0] = vec_sas + (4 * vi); sas[vi][1] = vec_sas + (4 * vi) + 2; } } #ifdef MPI_VERSION Loading Loading @@ -1305,7 +1305,7 @@ ParticleDescriptorSphere::ParticleDescriptorSphere(const mixMPI *mpidata) : Part sas = new dcomplex**[_nsph]; vints = new dcomplex*[_nsph]; for (int vi = 0; vi < nsph; vi++) { vints[vi] = vec_vints + (16 * nsph); vints[vi] = vec_vints + (16 * vi); sas[vi] = new dcomplex*[2]; sas[vi][0] = vec_sas + (4 * vi); sas[vi][1] = vec_sas + (4 * vi) + 2; Loading Loading
src/libnptm/Commons.cpp +12 −12 Original line number Diff line number Diff line Loading @@ -1222,8 +1222,8 @@ ParticleDescriptorInclusion::ParticleDescriptorInclusion(const mixMPI *mpidata) // >>> ParticleDescriptorSphere class implementation. <<< // ParticleDescriptorSphere::ParticleDescriptorSphere(GeometryConfiguration *gconf, ScattererConfiguration *sconf) : ParticleDescriptor(gconf, sconf) { _class_type = SPHERE_TYPE; vec_sas = new dcomplex[4 * (_nsph + 1)](); vec_vints = new dcomplex[16 * (_nsph + 1)](); vec_sas = new dcomplex[4 * _nsph](); vec_vints = new dcomplex[16 * _nsph](); fsas = new dcomplex[_nsph]; sscs = new double[_nsph](); Loading @@ -1236,7 +1236,7 @@ ParticleDescriptorSphere::ParticleDescriptorSphere(GeometryConfiguration *gconf, sas = new dcomplex**[_nsph]; vints = new dcomplex*[_nsph]; for (int vi = 0; vi < _nsph; vi++) { vints[vi] = vec_vints + (16 * _nsph); vints[vi] = vec_vints + (16 * vi); sas[vi] = new dcomplex*[2]; sas[vi][0] = vec_sas + (4 * vi); sas[vi][1] = vec_sas + (4 * vi) + 2; Loading @@ -1249,6 +1249,14 @@ ParticleDescriptorSphere::ParticleDescriptorSphere(const ParticleDescriptorSpher for (int vsi = 0; vsi < 4 * _nsph; vsi++) vec_sas[vsi] = rhs.vec_sas[vsi]; vec_vints = new dcomplex[16 * _nsph]; for (int vvi = 0; vvi < 16 * _nsph; vvi++) vec_vints[vvi] = rhs.vec_vints[vvi]; sas = new dcomplex**[_nsph]; vints = new dcomplex*[_nsph]; for (int vi = 0; vi < _nsph; vi++) { vints[vi] = vec_vints + (16 * vi); sas[vi] = new dcomplex*[2]; sas[vi][0] = vec_sas + (4 * vi); sas[vi][1] = vec_sas + (4 * vi) + 2; } fsas = new dcomplex[_nsph]; sscs = new double[_nsph]; Loading @@ -1268,14 +1276,6 @@ ParticleDescriptorSphere::ParticleDescriptorSphere(const ParticleDescriptorSpher sqabs[gi] = rhs.sqabs[gi]; gcsv[gi] = rhs.gcsv[gi]; } sas = new dcomplex**[_nsph]; vints = new dcomplex*[_nsph]; for (int vi = 0; vi < nsph; vi++) { vints[vi] = vec_vints + (16 * nsph); sas[vi] = new dcomplex*[2]; sas[vi][0] = vec_sas + (4 * vi); sas[vi][1] = vec_sas + (4 * vi) + 2; } } #ifdef MPI_VERSION Loading Loading @@ -1305,7 +1305,7 @@ ParticleDescriptorSphere::ParticleDescriptorSphere(const mixMPI *mpidata) : Part sas = new dcomplex**[_nsph]; vints = new dcomplex*[_nsph]; for (int vi = 0; vi < nsph; vi++) { vints[vi] = vec_vints + (16 * nsph); vints[vi] = vec_vints + (16 * vi); sas[vi] = new dcomplex*[2]; sas[vi][0] = vec_sas + (4 * vi); sas[vi][1] = vec_sas + (4 * vi) + 2; Loading