From 5900e2726c59a959ce0bbc7fa396311b95f8e8f6 Mon Sep 17 00:00:00 2001 From: Sebastian Held Date: Wed, 3 Nov 2010 15:04:33 +0100 Subject: [PATCH] more logical boundary handling --- FDTD/operator.cpp | 74 ++++++++++++++++++++++++++++++----------------- 1 file changed, 47 insertions(+), 27 deletions(-) diff --git a/FDTD/operator.cpp b/FDTD/operator.cpp index 6bff8b3..ecef166 100644 --- a/FDTD/operator.cpp +++ b/FDTD/operator.cpp @@ -686,7 +686,9 @@ int Operator::CalcECOperator( DebugFlags debugFlags ) void Operator::ApplyElectricBC(bool* dirs) { - if (dirs==NULL) return; + if (!dirs) + return; + unsigned int pos[3]; for (int n=0;n<3;++n) { @@ -696,20 +698,28 @@ void Operator::ApplyElectricBC(bool* dirs) { for (pos[nPP]=0;pos[nPP]