From e816d50cc165aaef22cb5b63e0d1907332d1d2f7 Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Sun, 6 Jun 2010 00:53:05 +0200 Subject: [PATCH] operator: split up CalcPEC as preparation for easier multithreading Signed-off-by: Thorsten Liebig --- FDTD/operator.cpp | 32 ++++++++++++++++++++------------ FDTD/operator.h | 2 ++ 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/FDTD/operator.cpp b/FDTD/operator.cpp index 01ca5ff..2156ab4 100644 --- a/FDTD/operator.cpp +++ b/FDTD/operator.cpp @@ -1060,22 +1060,29 @@ bool Operator::CalcFieldExcitation() return true; } - - bool Operator::CalcPEC() { - unsigned int pos[3]; - double coord[3]; - double delta; m_Nr_PEC[0]=0; m_Nr_PEC[1]=0; m_Nr_PEC[2]=0; - for (int n=0;n<3;++n) + CalcPEC_Range(0,numLines[0]-1); + + CalcPEC_Curves(); + + return true; +} + +void Operator::CalcPEC_Range(unsigned int startX, unsigned int stopX) +{ + double coord[3]; + double delta; + unsigned int pos[3]; + for (pos[0]=startX;pos[0]<=stopX;++pos[0]) { - for (pos[2]=0;pos[2]