Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
IFOS2D
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Environments
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
GPIAG-Software
IFOS2D
Commits
15f93d09
Commit
15f93d09
authored
Jul 18, 2016
by
niklas.thiel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUGFIX in calculating receiver positions
parent
a74b6a37
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
26 deletions
+28
-26
src/Makefile
src/Makefile
+1
-1
src/receiver.c
src/receiver.c
+27
-25
No files found.
src/Makefile
View file @
15f93d09
...
...
@@ -19,7 +19,7 @@ EXEC= ../bin
# LINUX with OpenMPI / IntelMPI and INTEL Compiler
# Use icc whenever possible, this will be much faster than gcc
CC
=
mpi
i
cc
CC
=
mpicc
LFLAGS
=
-lm
-lcseife
-lstfinv
-laff
-lfourierxx
-lfftw3
-lstdc
++
CFLAGS
=
-O3
SFLAGS
=
-L
./../contrib/libcseife
-L
./../contrib/bin
...
...
src/receiver.c
View file @
15f93d09
...
...
@@ -33,7 +33,7 @@ int **receiver(int *ntr, float **srcpos, int shotno){
extern
int
MYID
,
VERBOSE
,
TRKILL
;
extern
FILE
*
FP
;
int
**
recpos1
,
**
recpos
=
NULL
,
nxrec
=
0
,
nyrec
=
0
,
nzrec
=
0
;
int
**
recpos1
,
**
recpos
=
NULL
,
nxrec
=
0
,
nyrec
=
0
,
nzrec
=
0
,
recdist
;
int
itr
=
1
,
itr1
=
0
,
itr2
=
0
,
recflag
=
0
,
c
,
ifw
,
n
,
i
,
j
,
ntr1
=
0
;
int
nxrec1
,
nxrec2
,
nxrec3
,
nyrec1
,
nyrec2
,
nzrec1
=
1
,
nzrec2
=
1
,
offset
,
shotdist
;
extern
float
XREC1
,
YREC1
,
XREC2
,
YREC2
;
...
...
@@ -100,12 +100,22 @@ int **receiver(int *ntr, float **srcpos, int shotno){
else
if
(
READREC
==
2
){
fprintf
(
FP
,
"
\n
Moving streamer acquisition geometry choosen.
\n
"
);
nxrec1
=
iround
(
XREC1
/
DH
);
/* (nxrec1,nyrec1) and (nxrec2,nyrec2) are */
nyrec1
=
iround
(
YREC1
/
DH
);
/* the positions of the first and last receiver*/
nxrec2
=
iround
(
XREC2
/
DH
);
/* in gridpoints */
nyrec2
=
iround
(
YREC2
/
DH
);
offset
=
iround
((
XREC1
-
srcpos
[
1
][
1
])
/
DH
);
shotdist
=
iround
((
srcpos
[
1
][
2
]
-
srcpos
[
1
][
1
])
/
DH
);
/* decide if XREC1 or XREC2 is the nearest receiver to shot 1 */
if
(
abs
(
XREC1
-
srcpos
[
1
][
1
])
<
abs
(
XREC2
-
srcpos
[
1
][
1
])){
nxrec1
=
iround
(
XREC1
/
DH
);
/* (nxrec1,nyrec1) and (nxrec2,nyrec2) are */
nyrec1
=
iround
(
YREC1
/
DH
);
/* the positions of the first and last receiver*/
nxrec2
=
iround
(
XREC2
/
DH
);
/* in gridpoints */
nyrec2
=
iround
(
YREC2
/
DH
);
offset
=
iround
((
XREC1
-
srcpos
[
1
][
1
])
/
DH
);
}
else
{
nxrec1
=
iround
(
XREC2
/
DH
);
/* (nxrec1,nyrec1) and (nxrec2,nyrec2) are */
nyrec1
=
iround
(
YREC2
/
DH
);
/* the positions of the first and last receiver*/
nxrec2
=
iround
(
XREC1
/
DH
);
/* in gridpoints */
nyrec2
=
iround
(
YREC1
/
DH
);
offset
=
iround
((
XREC2
-
srcpos
[
1
][
1
])
/
DH
);
shotdist
=
iround
((
srcpos
[
1
][
2
]
-
srcpos
[
1
][
1
])
/
DH
);
}
if
(
nyrec1
!=
nyrec2
){
fprintf
(
FP
,
"
\n\n
"
);
fprintf
(
FP
,
" Warning:
\n
"
);
...
...
@@ -113,29 +123,21 @@ int **receiver(int *ntr, float **srcpos, int shotno){
fprintf
(
FP
,
" Depth of all receivers is seth to %i m
\n
"
,
YREC1
);
fprintf
(
FP
,
"
\n\n
"
);
}
*
ntr
=
iround
((
nxrec2
-
nxrec1
)
/
NGEOPH
)
+
1
;
if
(
offset
<
0
)
recdist
=-
NGEOPH
;
else
recdist
=
NGEOPH
;
*
ntr
=
iround
((
nxrec2
-
nxrec1
)
/
recdist
)
+
1
;
if
(
shotno
>
0
)
nxrec1
=
nxrec1
+
(
shotdist
*
(
shotno
-
1
));
recpos
=
imatrix
(
1
,
3
,
1
,
*
ntr
);
n
=
0
;
if
(
offset
<
0
){
for
(
itr
=
1
;
itr
<=*
ntr
;
itr
++
){
nxrec
=
nxrec1
-
(
itr
-
1
)
*
NGEOPH
;
if
(
nxrec
>
FW
&&
nxrec
<
(
NXG
-
FW
)
&&
nyrec1
>
0
&&
nyrec1
<
(
NYG
-
FW
)){
recpos
[
1
][
itr
]
=
nxrec
;
recpos
[
2
][
itr
]
=
nyrec1
;
}
else
declare_error
(
" Receiver positions of current shot are out of model boundaries !"
);
}
}
else
if
(
offset
>
0
){
for
(
itr
=
1
;
itr
<=*
ntr
;
itr
++
){
nxrec
=
nxrec1
+
(
itr
-
1
)
*
NGEOPH
;
if
(
nxrec
>
FW
&&
nxrec
<
(
NXG
-
FW
)
&&
nyrec1
>
0
&&
nyrec1
<
(
NYG
-
FW
)){
recpos
[
1
][
itr
]
=
nxrec
;
recpos
[
2
][
itr
]
=
nyrec1
;
}
else
declare_error
(
" Receiver positions of current shot are out of model boundaries !"
);
}
for
(
itr
=
1
;
itr
<=*
ntr
;
itr
++
){
nxrec
=
nxrec1
+
(
itr
-
1
)
*
recdist
;
if
(
nxrec
>
FW
&&
nxrec
<
(
NXG
-
FW
)
&&
nyrec1
>
0
&&
nyrec1
<
(
NYG
-
FW
)){
recpos
[
1
][
itr
]
=
nxrec
;
recpos
[
2
][
itr
]
=
nyrec1
;
}
else
declare_error
(
" Receiver positions of current shot are out of model boundaries !"
);
}
if
(
shotno
>
0
){
/* write receiver positions to file */
sprintf
(
filename
,
"%s.shot%i"
,
REC_FILE
,
shotno
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment