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
IFOS3D
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
7
Issues
7
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
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
IFOS3D
Commits
8293f938
Commit
8293f938
authored
Mar 16, 2016
by
Simone Butzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change name HESS_FILE, GRAD_FILE
parent
31169932
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
16 deletions
+19
-16
par/in_and_out/ifos3d.inp
par/in_and_out/ifos3d.inp
+2
-2
par/in_and_out/ifos3d_toy.inp
par/in_and_out/ifos3d_toy.inp
+2
-2
src/fd.h
src/fd.h
+1
-1
src/ifos3d.c
src/ifos3d.c
+1
-1
src/outgrad.c
src/outgrad.c
+3
-3
src/readhess.c
src/readhess.c
+10
-7
No files found.
par/in_and_out/ifos3d.inp
View file @
8293f938
...
...
@@ -147,12 +147,12 @@ method_(METHOD) = 0
#-----------------------------------------------------------------------------------
#
#-------------------------In- and Output Files--------------------------------------
gradient_filename_(GRAD_FILE) = ./grad/toy
gradient_filename_(GRAD_FILE) = ./grad/toy
_grad
model_output_filename_(MOD_OUT_FILE) = ./model/toy
observed_data_fileneame_(SEIS_OBS_FILE) = ./su_obs/obs_toy
external_or_internal_observed_data_(EXTOBS) = 0
inversion_parameter_file_(INV_FILE) = ./in_and_out/workflow_toy.dat
hessian_file_(HESS_FILE) = ./hess/toy
hessian_file_(HESS_FILE) = ./hess/toy
_hess
#
#-------------------------General---------------------------------------------------
minimum/maximum_iteration_number_(>0)_(ITMIN,ITMAX) = 1 , 80
...
...
par/in_and_out/ifos3d_toy.inp
View file @
8293f938
...
...
@@ -147,12 +147,12 @@ method_(METHOD) = 0
#-----------------------------------------------------------------------------------
#
#-------------------------In- and Output Files--------------------------------------
gradient_filename_(GRAD_FILE) = ./grad/toy
gradient_filename_(GRAD_FILE) = ./grad/toy
_grad
model_output_filename_(MOD_OUT_FILE) = ./model/toy
observed_data_fileneame_(SEIS_OBS_FILE) = ./su_obs/obs_toy
external_or_internal_observed_data_(EXTOBS) = 0
inversion_parameter_file_(INV_FILE) = ./in_and_out/workflow_toy.dat
hessian_file_(HESS_FILE) = ./hess/toy
hessian_file_(HESS_FILE) = ./hess/toy
_hess
#
#-------------------------General---------------------------------------------------
minimum/maximum_iteration_number_(>0)_(ITMIN,ITMAX) = 1 , 60
...
...
src/fd.h
View file @
8293f938
...
...
@@ -392,7 +392,7 @@ void hess_F(int nx,int ny,int nz,float **** fvx,float **** fvy,float **** fvz,fl
void
hess_apply
(
int
nx1
,
int
nx2
,
int
ny1
,
int
ny2
,
int
nz1
,
int
nz2
,
float
***
grad1
,
float
***
grad2
,
float
***
grad3
,
float
***
hess1
,
float
***
hess2
,
float
***
hess3
,
float
finv
,
int
iteration
);
void
readhess
(
int
nx
,
int
ny
,
int
nz
,
float
***
hess1
,
float
***
hess2
,
float
***
hess3
);
void
readhess
(
int
nx
,
int
ny
,
int
nz
,
float
***
hess1
,
float
***
hess2
,
float
***
hess3
,
float
finv
,
int
iteration
);
void
lbfgs
(
float
***
grad1
,
float
***
grad2
,
float
***
grad3
,
float
*
bfgsscale
,
float
**
bfgsmod
,
float
**
bfgsgrad
,
int
iteration
);
void
lbfgs_savegrad
(
float
***
grad1
,
float
***
grad2
,
float
***
grad3
,
float
**
bfgsgrad1
);
...
...
src/ifos3d.c
View file @
8293f938
...
...
@@ -644,7 +644,7 @@ CPML_coeff(K_x,alpha_prime_x,a_x,b_x,K_x_half,alpha_prime_x_half,a_x_half,b_x_ha
if
(
HESS
&&
READ_HESS
==
0
)
hloop
=
ntr_hess
;
if
(
HESS
&&
READ_HESS
==
1
)
readhess
(
NX
,
NY
,
NZ
,
hess1
,
hess2
,
hess3
);
if
(
HESS
&&
READ_HESS
==
1
)
readhess
(
NX
,
NY
,
NZ
,
hess1
,
hess2
,
hess3
,
finv
[
0
],
iteration
+
100
);
MPI_Barrier
(
MPI_COMM_WORLD
);
if
(
METHOD
==
1
&&
EXTOBS
==
1
){
for
(
ishot
=
1
;
ishot
<=
nshots
;
ishot
++
){
...
...
src/outgrad.c
View file @
8293f938
...
...
@@ -40,9 +40,9 @@ void outgrad(int nx,int ny,int nz,float ***grad1, float ***grad2,float ***grad3,
sprintf
(
gradfile1
,
"%s.
grad
vp_%4.2fHz_it%d.%i.%i.%i"
,
outfile
,
finv
,
iteration
,
POS
[
1
],
POS
[
2
],
POS
[
3
]);
sprintf
(
gradfile2
,
"%s.
grad
vs_%4.2fHz_it%d.%i.%i.%i"
,
outfile
,
finv
,
iteration
,
POS
[
1
],
POS
[
2
],
POS
[
3
]);
sprintf
(
gradfile3
,
"%s.
grad
rho_%4.2fHz_it%d.%i.%i.%i"
,
outfile
,
finv
,
iteration
,
POS
[
1
],
POS
[
2
],
POS
[
3
]);
sprintf
(
gradfile1
,
"%s.vp_%4.2fHz_it%d.%i.%i.%i"
,
outfile
,
finv
,
iteration
,
POS
[
1
],
POS
[
2
],
POS
[
3
]);
sprintf
(
gradfile2
,
"%s.vs_%4.2fHz_it%d.%i.%i.%i"
,
outfile
,
finv
,
iteration
,
POS
[
1
],
POS
[
2
],
POS
[
3
]);
sprintf
(
gradfile3
,
"%s.rho_%4.2fHz_it%d.%i.%i.%i"
,
outfile
,
finv
,
iteration
,
POS
[
1
],
POS
[
2
],
POS
[
3
]);
fpmod1
=
fopen
(
gradfile1
,
"w"
);
...
...
src/readhess.c
View file @
8293f938
...
...
@@ -23,11 +23,12 @@
#include "fd.h"
void
readhess
(
int
nx
,
int
ny
,
int
nz
,
float
***
hess1
,
float
***
hess2
,
float
***
hess3
){
void
readhess
(
int
nx
,
int
ny
,
int
nz
,
float
***
hess1
,
float
***
hess2
,
float
***
hess3
,
float
finv
,
int
iteration
){
extern
int
NX
,
NY
,
NZ
,
NXG
,
NYG
,
NZG
,
POS
[
4
];
extern
float
VP0
,
VS0
,
RHO0
;
extern
FILE
*
FP
;
extern
char
HESS_FILE
[
STRING_SIZE
];
/* local variables */
float
rhov
,
vp
,
vs
;
/*qp, qs;*/
...
...
@@ -43,19 +44,21 @@ void readhess(int nx, int ny, int nz, float *** hess1, float *** hess2, float
fprintf
(
FP
,
"
\n
...reading hess information from hess-files...
\n
"
);
sprintf
(
filename
,
"hess/hess.vp"
);
/*sprintf(filename,"hess/hess.vp");*/
sprintf
(
filename
,
"%s.vp_%4.2fHz_it%d.%i.%i.%i"
,
HESS_FILE
,
finv
,
iteration
,
POS
[
1
],
POS
[
2
],
POS
[
3
]);
fp_vp
=
fopen
(
filename
,
"r"
);
if
(
fp_vp
==
NULL
)
err
(
" Could not open hess
.
vp ! "
);
if
(
fp_vp
==
NULL
)
err
(
" Could not open hess
_
vp ! "
);
sprintf
(
filename
,
"
hess/hess.vs"
);
sprintf
(
filename
,
"
%s.vs_%4.2fHz_it%d.%i.%i.%i"
,
HESS_FILE
,
finv
,
iteration
,
POS
[
1
],
POS
[
2
],
POS
[
3
]
);
fp_vs
=
fopen
(
filename
,
"r"
);
if
(
fp_vs
==
NULL
)
err
(
" Could not open hess
.
vs! "
);
if
(
fp_vs
==
NULL
)
err
(
" Could not open hess
_
vs! "
);
sprintf
(
filename
,
"
hess/hess.rho"
);
sprintf
(
filename
,
"
%s.rho_%4.2fHz_it%d.%i.%i.%i"
,
HESS_FILE
,
finv
,
iteration
,
POS
[
1
],
POS
[
2
],
POS
[
3
]
);
fp_rho
=
fopen
(
filename
,
"r"
);
if
(
fp_rho
==
NULL
)
err
(
" Could not open hess
.
rho ! "
);
if
(
fp_rho
==
NULL
)
err
(
" Could not open hess
_
rho ! "
);
/* loop over global grid */
for
(
j
=
1
;
j
<=
NYG
;
j
++
){
for
(
i
=
1
;
i
<=
NXG
;
i
++
){
...
...
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