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
Commits
06bc5cb1
There was an error fetching the commit references. Please try again later.
Commit
06bc5cb1
authored
2 years ago
by
Boris Martin
Browse files
Options
Downloads
Patches
Plain Diff
unique ptr to parametrization
parent
436315ad
No related branches found
No related tags found
2 merge requests
!10
Draft: Source estimation
,
!9
Introducing unique_ptrs to simplify memory management
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
inversion.cpp
+3
-4
3 additions, 4 deletions
inversion.cpp
with
3 additions
and
4 deletions
inversion.cpp
+
3
−
4
View file @
06bc5cb1
...
...
@@ -26,9 +26,9 @@ int inversion(const GmshFem& gmshFem)
gmshFem
.
userDefinedParameter
(
suffix
,
"name"
);
name
+=
suffix
;
const
ParametrizationInterface
*
const
parametrization
=
newParametrization
<
T_Physic
>
(
gmshFem
);
const
std
::
unique_ptr
<
const
ParametrizationInterface
>
parametrization
(
newParametrization
<
T_Physic
>
(
gmshFem
)
)
;
auto
configuration
=
newConfiguration
(
name
,
parametrization
,
gmshFem
);
auto
configuration
=
newConfiguration
(
name
,
parametrization
.
get
()
,
gmshFem
);
for
(
unsigned
int
c
=
0
;
c
<
parametrization
->
size
();
c
++
)
{
...
...
@@ -152,7 +152,7 @@ int inversion(const GmshFem& gmshFem)
std
::
string
suffix_f
=
std
::
to_string
(
freq_idx
[
f
]);
wave
::
Discretization
<
T_Physic
>
w_discret
(
gmshFem
,
suffix_f
);
pequation
[
f
]
=
new
ParametrizedEquation
<
T_Physic
>
(
parametrization
,
f
,
2.
*
M_PI
*
frequency
[
freq_idx
[
f
]],
configuration
.
get
(),
w_discret
,
gmshFem
,
suffix_f
);
pequation
[
f
]
=
new
ParametrizedEquation
<
T_Physic
>
(
parametrization
.
get
()
,
f
,
2.
*
M_PI
*
frequency
[
freq_idx
[
f
]],
configuration
.
get
(),
w_discret
,
gmshFem
,
suffix_f
);
}
GlobalMinimumSearchInterface
<
T_Physic
>*
const
globalminimumsearch
=
newGlobalMinimumSearch
<
T_Physic
>
(
name
,
configuration
.
get
(),
gmshFem
,
suffix_g
);
...
...
@@ -170,7 +170,6 @@ int inversion(const GmshFem& gmshFem)
msg
::
unindent
();
}
delete
parametrization
;
return
0
;
}
...
...
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