diff --git a/FDTD/operator.cpp b/FDTD/operator.cpp index 3986167..9ca0926 100644 --- a/FDTD/operator.cpp +++ b/FDTD/operator.cpp @@ -762,7 +762,7 @@ bool Operator::Calc_ECPos(int n, const unsigned int* pos, double* inEC) const if (prop) { CSPropMaterial* mat = prop->ToMaterial(); - inEC[2] += mat->GetMue(n)*fabs(delta); + inEC[2] += fabs(delta)/mat->GetMueWeighted(n,shiftCoord); if (mat->GetSigmaWeighted(n,shiftCoord)) inEC[3] += fabs(delta)/mat->GetSigmaWeighted(n,shiftCoord); else @@ -770,7 +770,7 @@ bool Operator::Calc_ECPos(int n, const unsigned int* pos, double* inEC) const } else { - inEC[2] += 1*fabs(delta); + inEC[2] += fabs(delta); inEC[3] = 0; } diff --git a/FDTD/operator_cylinder.cpp b/FDTD/operator_cylinder.cpp index aa334db..f000030 100644 --- a/FDTD/operator_cylinder.cpp +++ b/FDTD/operator_cylinder.cpp @@ -364,7 +364,7 @@ bool Operator_Cylinder::Calc_ECPos(int n, const unsigned int* pos, double* inEC) if (prop) { CSPropMaterial* mat = prop->ToMaterial(); - inEC[2] += mat->GetMue(n)*delta_n; + inEC[2] += delta_n / mat->GetMueWeighted(n,shiftCoord); if (mat->GetSigmaWeighted(n,shiftCoord)) inEC[3] += delta_n/mat->GetSigmaWeighted(n,shiftCoord); else @@ -372,7 +372,7 @@ bool Operator_Cylinder::Calc_ECPos(int n, const unsigned int* pos, double* inEC) } else { - inEC[2] += 1*delta_n; + inEC[2] += delta_n; inEC[3] = 0; }