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
73dca34f
Commit
73dca34f
authored
Dec 06, 2015
by
Florian Wittkamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUGFIX: WRITE_FILTERED_DATA
parent
ea06f5d9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
21 deletions
+25
-21
src/denise.c
src/denise.c
+12
-12
src/fd.h
src/fd.h
+1
-3
src/saveseis_glob.c
src/saveseis_glob.c
+12
-6
No files found.
src/denise.c
View file @
73dca34f
...
...
@@ -1394,18 +1394,18 @@ int main(int argc, char **argv){
catseis
(
sectionvz
,
fulldata_vz
,
recswitch
,
ntr_glob
,
MPI_COMM_WORLD
);
}
if
(
MYID
==
0
){
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
fulldata_curl
,
fulldata_div
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
iter
);}
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
fulldata_curl
,
fulldata_div
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
iter
,
1
);}
break
;
case
2
:
/* pressure only */
catseis
(
sectionp
,
fulldata_p
,
recswitch
,
ntr_glob
,
MPI_COMM_WORLD
);
if
(
MYID
==
0
)
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
fulldata_curl
,
fulldata_div
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
iter
);
if
(
MYID
==
0
)
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
fulldata_curl
,
fulldata_div
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
iter
,
1
);
break
;
case
3
:
/* curl and div only */
catseis
(
sectiondiv
,
fulldata_div
,
recswitch
,
ntr_glob
,
MPI_COMM_WORLD
);
catseis
(
sectioncurl
,
fulldata_curl
,
recswitch
,
ntr_glob
,
MPI_COMM_WORLD
);
if
(
MYID
==
0
)
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
fulldata_curl
,
fulldata_div
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
iter
);
if
(
MYID
==
0
)
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
fulldata_curl
,
fulldata_div
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
iter
,
1
);
break
;
case
4
:
/* everything */
...
...
@@ -1417,7 +1417,7 @@ int main(int argc, char **argv){
}
catseis
(
sectiondiv
,
fulldata_div
,
recswitch
,
ntr_glob
,
MPI_COMM_WORLD
);
catseis
(
sectioncurl
,
fulldata_curl
,
recswitch
,
ntr_glob
,
MPI_COMM_WORLD
);
if
(
MYID
==
0
)
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
fulldata_curl
,
fulldata_div
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
iter
);
if
(
MYID
==
0
)
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
fulldata_curl
,
fulldata_div
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
iter
,
1
);
break
;
case
5
:
/* everything except curl and div*/
...
...
@@ -1427,7 +1427,7 @@ int main(int argc, char **argv){
catseis
(
sectionvz
,
fulldata_vz
,
recswitch
,
ntr_glob
,
MPI_COMM_WORLD
);
}
catseis
(
sectionp
,
fulldata_p
,
recswitch
,
ntr_glob
,
MPI_COMM_WORLD
);
if
(
MYID
==
0
)
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
fulldata_curl
,
fulldata_div
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
iter
);
if
(
MYID
==
0
)
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
fulldata_curl
,
fulldata_div
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
iter
,
1
);
break
;
}
/* end of switch (SEISMO) */
...
...
@@ -1916,18 +1916,18 @@ int main(int argc, char **argv){
calc_envelope
(
fulldata_vy
,
fulldata_vy
,
ns
,
ntr_glob
);
calc_envelope
(
fulldata_vx
,
fulldata_vx
,
ns
,
ntr_glob
);}
if
(
MYID
==
0
){
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
fulldata_curl
,
fulldata_div
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
iter
);}
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
fulldata_curl
,
fulldata_div
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
iter
,
1
);}
break
;
case
2
:
/* pressure only */
catseis
(
sectionp
,
fulldata_p
,
recswitch
,
ntr_glob
,
MPI_COMM_WORLD
);
if
(
MYID
==
0
)
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
fulldata_curl
,
fulldata_div
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
iter
);
if
(
MYID
==
0
)
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
fulldata_curl
,
fulldata_div
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
iter
,
1
);
break
;
case
3
:
/* curl and div only */
catseis
(
sectiondiv
,
fulldata_div
,
recswitch
,
ntr_glob
,
MPI_COMM_WORLD
);
catseis
(
sectioncurl
,
fulldata_curl
,
recswitch
,
ntr_glob
,
MPI_COMM_WORLD
);
if
(
MYID
==
0
)
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
fulldata_curl
,
fulldata_div
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
iter
);
if
(
MYID
==
0
)
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
fulldata_curl
,
fulldata_div
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
iter
,
1
);
break
;
case
4
:
/* everything */
...
...
@@ -1941,7 +1941,7 @@ int main(int argc, char **argv){
catseis
(
sectionp
,
fulldata_p
,
recswitch
,
ntr_glob
,
MPI_COMM_WORLD
);
catseis
(
sectiondiv
,
fulldata_div
,
recswitch
,
ntr_glob
,
MPI_COMM_WORLD
);
catseis
(
sectioncurl
,
fulldata_curl
,
recswitch
,
ntr_glob
,
MPI_COMM_WORLD
);
if
(
MYID
==
0
)
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
fulldata_curl
,
fulldata_div
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
iter
);
if
(
MYID
==
0
)
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
fulldata_curl
,
fulldata_div
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
iter
,
1
);
break
;
case
5
:
/* everything except curl and div*/
...
...
@@ -1953,7 +1953,7 @@ int main(int argc, char **argv){
catseis
(
sectionvz
,
fulldata_vz
,
recswitch
,
ntr_glob
,
MPI_COMM_WORLD
);
}
catseis
(
sectionp
,
fulldata_p
,
recswitch
,
ntr_glob
,
MPI_COMM_WORLD
);
if
(
MYID
==
0
)
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
fulldata_curl
,
fulldata_div
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
iter
);
if
(
MYID
==
0
)
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
fulldata_curl
,
fulldata_div
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
iter
,
1
);
break
;
}
/* end of switch (SEISMO) */
...
...
@@ -2087,7 +2087,7 @@ int main(int argc, char **argv){
catseis
(
sectionvzdiff
,
fulldata_vz
,
recswitch
,
ntr_glob
,
MPI_COMM_NTR
);
}
if
(
myid_ntr
==
0
){
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
sectionpdiff
,
sectionpdiff
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
-
1
);
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
sectionpdiff
,
sectionpdiff
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
iter
,
2
);
}
}
...
...
@@ -2103,7 +2103,7 @@ int main(int argc, char **argv){
catseis
(
sectionvzdata
,
fulldata_vz
,
recswitch
,
ntr_glob
,
MPI_COMM_NTR
);
}
if
(
myid_ntr
==
0
){
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
sectionpdiff
,
sectionpdiff
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
-
2
);
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
sectionpdiff
,
sectionpdiff
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
iter
,
3
);
}
}
}
...
...
src/fd.h
View file @
73dca34f
...
...
@@ -239,9 +239,7 @@ void saveseis(FILE *fp, float **sectionvx, float **sectionvy,float **sectionp,
float
**
sectioncurl
,
float
**
sectiondiv
,
int
**
recpos
,
int
**
recpos_loc
,
int
ntr
,
float
**
srcpos_loc
,
int
nsrc
,
int
ns
,
int
iter
);
void
saveseis_glob
(
FILE
*
fp
,
float
**
sectionvx
,
float
**
sectionvy
,
float
**
sectionvz
,
float
**
sectionp
,
float
**
sectioncurl
,
float
**
sectiondiv
,
int
**
recpos
,
int
**
recpos_loc
,
int
ntr
,
float
**
srcpos
,
int
ishot
,
int
ns
,
int
iter
);
void
saveseis_glob
(
FILE
*
fp
,
float
**
sectionvx
,
float
**
sectionvy
,
float
**
sectionvz
,
float
**
sectionp
,
float
**
sectioncurl
,
float
**
sectiondiv
,
int
**
recpos
,
int
**
recpos_loc
,
int
ntr
,
float
**
srcpos
,
int
ishot
,
int
ns
,
int
iter
,
int
type_switch
);
void
snap
(
FILE
*
fp
,
int
nt
,
int
nsnap
,
float
**
vx
,
float
**
vy
,
float
**
sxx
,
float
**
syy
,
float
**
sp
,
float
**
u
,
float
**
pi
,
float
*
hc
,
int
ishot
);
...
...
src/saveseis_glob.c
View file @
73dca34f
...
...
@@ -23,16 +23,22 @@
#include "fd.h"
void
saveseis_glob
(
FILE
*
fp
,
float
**
sectionvx
,
float
**
sectionvy
,
float
**
sectionvz
,
float
**
sectionp
,
float
**
sectioncurl
,
float
**
sectiondiv
,
int
**
recpos
,
int
**
recpos_loc
,
int
ntr
,
float
**
srcpos
,
int
ishot
,
int
ns
,
int
iter
){
void
saveseis_glob
(
FILE
*
fp
,
float
**
sectionvx
,
float
**
sectionvy
,
float
**
sectionvz
,
float
**
sectionp
,
float
**
sectioncurl
,
float
**
sectiondiv
,
int
**
recpos
,
int
**
recpos_loc
,
int
ntr
,
float
**
srcpos
,
int
ishot
,
int
ns
,
int
iter
,
int
type_switch
){
/* type_switch:
* 1== synthetic data
* 2== measured - synthetic data (residuals)
* 3== filtered measured data
*/
extern
int
SEISMO
,
SEIS_FORMAT
,
RUN_MULTIPLE_SHOTS
,
WAVETYPE
,
VERBOSE
;
extern
char
SEIS_FILE_VX
[
STRING_SIZE
],
SEIS_FILE_VY
[
STRING_SIZE
],
SEIS_FILE_VZ
[
STRING_SIZE
];
extern
char
SEIS_FILE_CURL
[
STRING_SIZE
],
SEIS_FILE_DIV
[
STRING_SIZE
],
SEIS_FILE_P
[
STRING_SIZE
];
extern
char
SEIS_FILE_VX
[
STRING_SIZE
],
SEIS_FILE_VY
[
STRING_SIZE
],
SEIS_FILE_VZ
[
STRING_SIZE
];
extern
char
SEIS_FILE_CURL
[
STRING_SIZE
],
SEIS_FILE_DIV
[
STRING_SIZE
],
SEIS_FILE_P
[
STRING_SIZE
];
char
vxf
[
STRING_SIZE
],
vyf
[
STRING_SIZE
],
vzf
[
STRING_SIZE
],
curlf
[
STRING_SIZE
],
divf
[
STRING_SIZE
],
pf
[
STRING_SIZE
];
int
nsrc
=
1
;
if
(
iter
>=
0
){
if
(
type_switch
==
1
){
sprintf
(
vxf
,
"%s.shot%d.it%d"
,
SEIS_FILE_VX
,
ishot
,
iter
);
sprintf
(
vyf
,
"%s.shot%d.it%d"
,
SEIS_FILE_VY
,
ishot
,
iter
);
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
...
...
@@ -43,7 +49,7 @@ void saveseis_glob(FILE *fp, float **sectionvx, float **sectionvy,float **sectio
sprintf
(
curlf
,
"%s.shot%d.it%d"
,
SEIS_FILE_CURL
,
ishot
,
iter
);
}
if
(
iter
==-
1
){
if
(
type_switch
==
2
){
sprintf
(
vxf
,
"%s.shot%d_adjoint_src"
,
SEIS_FILE_VX
,
ishot
);
sprintf
(
vyf
,
"%s.shot%d_adjoint_src"
,
SEIS_FILE_VY
,
ishot
);
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
...
...
@@ -54,7 +60,7 @@ void saveseis_glob(FILE *fp, float **sectionvx, float **sectionvy,float **sectio
sprintf
(
curlf
,
"%s.shot%d_adjoint_src"
,
SEIS_FILE_CURL
,
ishot
);
}
if
(
iter
==-
2
){
if
(
type_switch
==
3
){
sprintf
(
vxf
,
"%s_measured.shot%d.it%d"
,
SEIS_FILE_VX
,
ishot
,
iter
);
sprintf
(
vyf
,
"%s_measured.shot%d.it%d"
,
SEIS_FILE_VY
,
ishot
,
iter
);
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
...
...
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