Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OpenSource
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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Jan Willem Thorbecke
OpenSource
Commits
d544f28d
Commit
d544f28d
authored
6 years ago
by
Jan Willem Thorbecke
Browse files
Options
Downloads
Patches
Plain Diff
primaries only application
parent
e3e9222c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
marchenko/marchenko_primaries.c
+23
-52
23 additions, 52 deletions
marchenko/marchenko_primaries.c
with
23 additions
and
52 deletions
marchenko/marchenko_primaries.c
+
23
−
52
View file @
d544f28d
...
...
@@ -425,6 +425,14 @@ int main (int argc, char **argv)
G_d
[
l
*
nxs
*
nts
+
i
*
nts
+
j
]
=
0
.
0
;
}
}
for
(
i
=
0
;
i
<
npos
;
i
++
)
{
j
=
0
;
ix
=
ixpos
[
i
];
f1min
[
l
*
nxs
*
nts
+
i
*
nts
+
j
]
=
-
DD
[
l
*
nxs
*
nts
+
ix
*
nts
+
j
];
for
(
j
=
1
;
j
<
nts
;
j
++
)
{
f1min
[
l
*
nxs
*
nts
+
i
*
nts
+
j
]
=
-
DD
[
l
*
nxs
*
nts
+
ix
*
nts
+
nts
-
j
];
}
}
}
memcpy
(
Ni
,
G_d
,
Nfoc
*
nxs
*
ntfft
*
sizeof
(
float
));
...
...
@@ -455,77 +463,40 @@ int main (int argc, char **argv)
}
/* primaries only scheme */
if
(
iter
==
0
)
{
/* apply muting for the acausal part */
if
(
iter
%
2
==
0
)
{
/* even iterations: => f_1^-(t) */
/* apply muting for the acausal part */
for
(
l
=
0
;
l
<
Nfoc
;
l
++
)
{
for
(
i
=
0
;
i
<
npos
;
i
++
)
{
for
(
j
=
ii
-
shift
;
j
<
nts
;
j
++
)
{
for
(
j
=
ii
-
shift
;
j
<
nts
;
j
++
)
{
Ni
[
l
*
nxs
*
nts
+
i
*
nts
+
j
]
=
0
.
0
;
}
for
(
j
=
0
;
j
<
shift
;
j
++
)
{
Ni
[
l
*
nxs
*
nts
+
i
*
nts
+
j
]
=
0
.
0
;
for
(
j
=
0
;
j
<
shift
;
j
++
)
{
Ni
[
l
*
nxs
*
nts
+
i
*
nts
+
j
]
=
0
.
0
;
}
}
}
}
else
if
(
iter
==
1
)
{
else
{
/* odd iterations: => f_1^+(t) */
for
(
l
=
0
;
l
<
Nfoc
;
l
++
)
{
for
(
i
=
0
;
i
<
npos
;
i
++
)
{
j
=
0
;
ix
=
ixpos
[
i
];
f1min
[
l
*
nxs
*
nts
+
i
*
nts
+
j
]
=
-
DD
[
l
*
nxs
*
nts
+
ix
*
nts
+
j
]
-
Ni
[
l
*
nxs
*
nts
+
i
*
nts
+
j
];
f1min
[
l
*
nxs
*
nts
+
i
*
nts
+
j
]
-=
Ni
[
l
*
nxs
*
nts
+
i
*
nts
+
j
];
for
(
j
=
1
;
j
<
nts
;
j
++
)
{
f1min
[
l
*
nxs
*
nts
+
i
*
nts
+
j
]
=
-
DD
[
l
*
nxs
*
nts
+
ix
*
nts
+
nts
-
j
]
-
Ni
[
l
*
nxs
*
nts
+
i
*
nts
+
nts
-
j
];
f1min
[
l
*
nxs
*
nts
+
i
*
nts
+
j
]
-
=
Ni
[
l
*
nxs
*
nts
+
i
*
nts
+
nts
-
j
];
}
}
}
for
(
l
=
0
;
l
<
Nfoc
;
l
++
)
{
for
(
i
=
0
;
i
<
npos
;
i
++
)
{
for
(
j
=
nts
-
shift
;
j
<
nts
;
j
++
)
{
Ni
[
l
*
nxs
*
nts
+
i
*
nts
+
j
]
=
0
.
0
;
}
for
(
j
=
0
;
j
<
nts
-
ii
+
shift
;
j
++
)
{
Ni
[
l
*
nxs
*
nts
+
i
*
nts
+
j
]
=
0
.
0
;
}
}
}
}
else
{
if
(
iter
%
2
==
0
)
{
/* even iterations: => f_1^-(t) */
/*muting the acausal part */
for
(
l
=
0
;
l
<
Nfoc
;
l
++
)
{
for
(
i
=
0
;
i
<
npos
;
i
++
)
{
for
(
j
=
ii
-
shift
;
j
<
nts
;
j
++
)
{
Ni
[
l
*
nxs
*
nts
+
i
*
nts
+
j
]
=
0
.
0
;
}
for
(
j
=
0
;
j
<
shift
;
j
++
)
{
Ni
[
l
*
nxs
*
nts
+
i
*
nts
+
j
]
=
0
.
0
;
}
}
}
}
else
{
/* odd iterations: => f_1^+(t) */
for
(
l
=
0
;
l
<
Nfoc
;
l
++
)
{
for
(
i
=
0
;
i
<
npos
;
i
++
)
{
j
=
0
;
f1min
[
l
*
nxs
*
nts
+
i
*
nts
+
j
]
-=
Ni
[
l
*
nxs
*
nts
+
i
*
nts
+
j
];
for
(
j
=
1
;
j
<
nts
;
j
++
)
{
f1min
[
l
*
nxs
*
nts
+
i
*
nts
+
j
]
-=
Ni
[
l
*
nxs
*
nts
+
i
*
nts
+
nts
-
j
];
}
for
(
j
=
nts
-
shift
;
j
<
nts
;
j
++
)
{
Ni
[
l
*
nxs
*
nts
+
i
*
nts
+
j
]
=
0
.
0
;
}
}
for
(
l
=
0
;
l
<
Nfoc
;
l
++
)
{
for
(
i
=
0
;
i
<
npos
;
i
++
)
{
for
(
j
=
nts
-
shift
;
j
<
nts
;
j
++
)
{
Ni
[
l
*
nxs
*
nts
+
i
*
nts
+
j
]
=
0
.
0
;
}
for
(
j
=
0
;
j
<
nts
-
ii
+
shift
;
j
++
)
{
Ni
[
l
*
nxs
*
nts
+
i
*
nts
+
j
]
=
0
.
0
;
}
for
(
j
=
0
;
j
<
nts
-
ii
+
shift
;
j
++
)
{
Ni
[
l
*
nxs
*
nts
+
i
*
nts
+
j
]
=
0
.
0
;
}
}
}
}
/* end else (iter
!=0
) branch */
}
}
/* end else (iter) branch */
t2
=
wallclock_time
();
tcopy
+=
t2
-
t3
;
...
...
@@ -543,7 +514,7 @@ int main (int argc, char **argv)
if
(
verbose
)
{
t3
=
wallclock_time
();
tii
=
(
t3
-
t1
)
*
((
float
)(
iend
-
istart
)
/
(
ii
-
istart
+
1
.
0
))
-
(
t3
-
t1
);
vmess
(
"
Estimated
compute time at sample %d = %.2f s."
,
ii
,
tii
);
vmess
(
"
Remaining
compute time at
time-
sample %d = %.2f s."
,
ii
,
tii
);
}
}
/* end of time iterations ii */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment