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
0ce7427d
Commit
0ce7427d
authored
Oct 06, 2016
by
Florian Wittkamp
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/write_windowed' into develop
parents
feddac4c
04449613
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
5 deletions
+65
-5
src/IFOS2D.c
src/IFOS2D.c
+24
-0
src/calc_misfit.c
src/calc_misfit.c
+8
-0
src/saveseis_glob.c
src/saveseis_glob.c
+33
-5
No files found.
src/IFOS2D.c
View file @
0ce7427d
...
@@ -2075,6 +2075,30 @@ int main(int argc, char **argv){
...
@@ -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
);
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
...
@@ -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
;
l2
=
L2
;
/* printf("\n MYID = %i IN CALC_MISFIT: L2 = %10.12f \n",MYID,l2); */
/* printf("\n MYID = %i IN CALC_MISFIT: L2 = %10.12f \n",MYID,l2); */
...
...
src/saveseis_glob.c
View file @
0ce7427d
...
@@ -32,6 +32,7 @@ void saveseis_glob(FILE *fp, float **sectionvx, float **sectionvy,float **sectio
...
@@ -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
int
SEISMO
,
SEIS_FORMAT
,
RUN_MULTIPLE_SHOTS
,
WAVETYPE
,
VERBOSE
,
FORWARD_ONLY
;
extern
char
SEIS_FILE
[
STRING_SIZE
];
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
];
char
vxf
[
STRING_SIZE
],
vyf
[
STRING_SIZE
],
vzf
[
STRING_SIZE
],
curlf
[
STRING_SIZE
],
divf
[
STRING_SIZE
],
pf
[
STRING_SIZE
];
int
nsrc
=
1
;
int
nsrc
=
1
;
...
@@ -60,16 +61,43 @@ void saveseis_glob(FILE *fp, float **sectionvx, float **sectionvy,float **sectio
...
@@ -60,16 +61,43 @@ void saveseis_glob(FILE *fp, float **sectionvx, float **sectionvy,float **sectio
break
;
break
;
case
3
:
case
3
:
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
(
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
);
sprintf
(
vyf
,
"%s_vy.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
sprintf
(
vzf
,
"%s_vz.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
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
(
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
(
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
);
sprintf
(
curlf
,
"%s_curl.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
break
;
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:
default:
declare_error
(
"saveseis_glob: Unkown type_switch"
);
declare_error
(
"saveseis_glob: Unkown type_switch"
);
break
;
break
;
...
...
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