Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GPIAG-Software
IFOS2D
Commits
0ce7427d
Commit
0ce7427d
authored
Oct 06, 2016
by
Florian Wittkamp
Browse files
Merge branch 'feature/write_windowed' into develop
parents
feddac4c
04449613
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/IFOS2D.c
View file @
0ce7427d
...
...
@@ -2075,6 +2075,30 @@ int main(int argc, char **argv){
saveseis_glob
(
FP
,
fulldata_vx
,
fulldata_vy
,
fulldata_vz
,
fulldata_p
,
sectionpdiff
,
sectionpdiff
,
recpos
,
recpos_loc
,
ntr_glob
,
srcpos
,
ishot
,
ns
,
iter
,
3
);
}
}
/* Write synthetic filtered seismogramms to disk */
if
(
SEISMO
&&
TIME_FILT
&&
WRITE_FILTERED_DATA
){
if
(
WAVETYPE
==
1
||
WAVETYPE
==
3
){
if
((
ADJOINT_TYPE
==
1
)
||
(
ADJOINT_TYPE
==
3
)){
catseis
(
sectionvx
,
fulldata_vx
,
recswitch
,
ntr_glob
,
MPI_COMM_NTR
);
}
if
((
ADJOINT_TYPE
==
1
)
||
(
ADJOINT_TYPE
==
2
)){
catseis
(
sectionvy
,
fulldata_vy
,
recswitch
,
ntr_glob
,
MPI_COMM_NTR
);
}
if
(
ADJOINT_TYPE
==
4
){
catseis
(
sectionp
,
fulldata_p
,
recswitch
,
ntr_glob
,
MPI_COMM_NTR
);
}
}
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
){
catseis
(
sectionvz
,
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
,
iter
,
4
);
}
}
}
...
...
src/calc_misfit.c
View file @
0ce7427d
...
...
@@ -202,6 +202,14 @@ double calc_misfit(float **sectiondata, float **section, int ntr, int ns, int LN
}
}
for
(
i
=
1
;
i
<=
ntr
;
i
++
){
for
(
j
=
1
;
j
<=
ns
;
j
++
){
sectiondata
[
i
][
j
]
=
intseis_sectiondata
[
i
][
j
];
section
[
i
][
j
]
=
intseis_section
[
i
][
j
];
}
}
l2
=
L2
;
/* printf("\n MYID = %i IN CALC_MISFIT: L2 = %10.12f \n",MYID,l2); */
...
...
src/saveseis_glob.c
View file @
0ce7427d
...
...
@@ -24,7 +24,7 @@
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:
/* type_switch:
* 1== synthetic data
* 2== measured - synthetic data (residuals)
* 3== filtered measured data
...
...
@@ -32,6 +32,7 @@ void saveseis_glob(FILE *fp, float **sectionvx, float **sectionvy,float **sectio
extern
int
SEISMO
,
SEIS_FORMAT
,
RUN_MULTIPLE_SHOTS
,
WAVETYPE
,
VERBOSE
,
FORWARD_ONLY
;
extern
char
SEIS_FILE
[
STRING_SIZE
];
extern
int
VELOCITY
;
char
vxf
[
STRING_SIZE
],
vyf
[
STRING_SIZE
],
vzf
[
STRING_SIZE
],
curlf
[
STRING_SIZE
],
divf
[
STRING_SIZE
],
pf
[
STRING_SIZE
];
int
nsrc
=
1
;
...
...
@@ -60,16 +61,43 @@ void saveseis_glob(FILE *fp, float **sectionvx, float **sectionvy,float **sectio
break
;
case
3
:
sprintf
(
vxf
,
"%s_vx.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
sprintf
(
vyf
,
"%s_vy.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
sprintf
(
vzf
,
"%s_vz.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
if
(
VELOCITY
==
0
){
sprintf
(
vxf
,
"%s_dx.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
sprintf
(
vyf
,
"%s_dy.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
sprintf
(
vzf
,
"%s_dz.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
}
}
else
{
sprintf
(
vxf
,
"%s_vx.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
sprintf
(
vyf
,
"%s_vy.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
sprintf
(
vzf
,
"%s_vz.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
}
}
sprintf
(
pf
,
"%s_p.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
sprintf
(
divf
,
"%s_div.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
sprintf
(
curlf
,
"%s_curl.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
break
;
case
4
:
if
(
VELOCITY
==
0
){
sprintf
(
vxf
,
"%s_dx.su.filtered.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
sprintf
(
vyf
,
"%s_dy.su.filtered.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
sprintf
(
vzf
,
"%s_dz.su.filtered.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
}
}
else
{
sprintf
(
vxf
,
"%s_vx.su.filtered.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
sprintf
(
vyf
,
"%s_vy.su.filtered.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
sprintf
(
vzf
,
"%s_vz.su.filtered.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
}
}
sprintf
(
pf
,
"%s_p.su.filtered.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
sprintf
(
divf
,
"%s_div.su.filtered.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
sprintf
(
curlf
,
"%s_curl.su.filtered.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
break
;
default:
declare_error
(
"saveseis_glob: Unkown type_switch"
);
break
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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