Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
fwi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gmsh
fwi
Merge requests
!10
Draft: Source estimation
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Draft: Source estimation
source_estimation
into
master
Overview
0
Commits
9
Pipelines
0
Changes
31
Open
Boris Martin
requested to merge
source_estimation
into
master
2 years ago
Overview
0
Commits
9
Pipelines
0
Changes
31
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
39692e64
9 commits,
2 years ago
31 files
+
348
−
149
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
31
Search (e.g. *.vue) (Ctrl+P)
common/data/element.h
+
35
−
0
Options
@@ -182,4 +182,39 @@ Data<T_Physic> arg(const Data<T_Physic>& d)
@@ -182,4 +182,39 @@ Data<T_Physic> arg(const Data<T_Physic>& d)
return
out
;
return
out
;
};
};
/**
* @brief Returns a vector ([f][s]) that tells for each shot what coefficient minimizes the L² misfit for that shot.
* If d0 is the computed value for a unit shot and d the reference data, we look for a complexe number "alpha" such that
* alpha * d0 is the best approximation to d.
* It is given by alpha = <d0, d> / <d0, d0> with < , > the complex inner product
*/
template
<
Physic
T_Physic
>
std
::
vector
<
std
::
vector
<
std
::
complex
<
double
>>>
leastSquareShotIntensity
(
const
Data
<
T_Physic
>&
d0
,
const
Data
<
T_Physic
>&
d
)
{
areCompatible
(
d0
,
d
);
std
::
vector
<
std
::
vector
<
std
::
complex
<
double
>>>
alpha
;
alpha
.
resize
(
d
.
nf
());
for
(
auto
&
shots
:
alpha
)
shots
.
resize
(
d
.
ns
());
for
(
unsigned
int
f
=
0
;
f
<
d
.
nf
();
f
++
)
{
for
(
unsigned
int
s
=
0
;
s
<
d
.
ns
();
s
++
)
{
std
::
complex
<
double
>
num
=
0.
;
std
::
complex
<
double
>
den
=
0.
;
for
(
unsigned
int
r
=
0
;
r
<
d
.
nr
(
s
);
r
++
)
{
num
+=
conj
<
T_Physic
>
(
d0
.
value
(
f
,
s
,
r
))
*
d
.
value
(
f
,
s
,
r
);
den
+=
conj
<
T_Physic
>
(
d0
.
value
(
f
,
s
,
r
))
*
d0
.
value
(
f
,
s
,
r
);
}
alpha
[
f
][
s
]
=
num
/
den
;
}
}
return
alpha
;
};
#endif // H_COMMON_DATA_ELEMENT
#endif // H_COMMON_DATA_ELEMENT
Loading