From 01ab7bb02f025e3df228dc8d33bc8e9520616206 Mon Sep 17 00:00:00 2001
From: JanThorbecke <janth@xs4all.nl>
Date: Wed, 15 Apr 2020 15:49:42 +0200
Subject: [PATCH]  plane-wave adjusment

---
 fdelmodc/applySource.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/fdelmodc/applySource.c b/fdelmodc/applySource.c
index 3aeb972..6a4bc66 100644
--- a/fdelmodc/applySource.c
+++ b/fdelmodc/applySource.c
@@ -89,7 +89,10 @@ int applySource(modPar mod, srcPar src, wavPar wav, bndPar bnd, int itime, int i
 			ix = src.x[isrc] + ibndx;
 			iz = src.z[isrc] + ibndz;
 		}
-		else { /* plane wave and point sources */
+        else if (src.plane) {/* plane wave sources */
+            ix = ixsrc + ibndx + src.x[isrc];
+            iz = izsrc + ibndz + src.z[isrc];
+		else { /* point sources */
             ix = ixsrc + ibndx + is0 + isrc;
             iz = izsrc + ibndz;
 		}
-- 
GitLab