Commit 76d9821a authored by Christophe Geuzaine's avatar Christophe Geuzaine

Merge branch 'master' of https://gitlab.onelab.info/getdp/getdp

parents ec2da042 974778e0
Pipeline #1212 passed with stage
in 12 minutes and 14 seconds
......@@ -13,3 +13,6 @@ benchmarks_kst
*.pre
*.pos
*.db*
*.msh
*~
*#
\ No newline at end of file
......@@ -1684,7 +1684,7 @@ void F_AcousticFieldSoftCylinder(F_ARG)
}
std::complex<double> I(0,1);
std::complex<double> val = 0;
double vr=0, vi=0;
#if defined(_OPENMP)
#pragma omp parallel for reduction(+: vr,vi)
#endif
......@@ -1693,10 +1693,12 @@ void F_AcousticFieldSoftCylinder(F_ARG)
std::complex<double> Hnkr( jn(n,kr), yn(n,kr) );
std::complex<double> tmp1 = std::pow(I,n) * Hnkr/HnkR;
double tmp2 = - (!n ? 1. : 2.) * cos(n*theta) * std::real(HnkR);
val += tmp1 * tmp2;
std::complex<double> val = tmp1 * tmp2;
vr += std::real(val);
vi += std::imag(val);
}
V->Val[0] = std::real(val);
V->Val[MAX_DIM] = std::imag(val);
V->Val[0] = vr;
V->Val[MAX_DIM] = vi;
V->Type = SCALAR;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment