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
1d2fee32
Commit
1d2fee32
authored
2 years ago
by
Boris Martin
Browse files
Options
Downloads
Patches
Plain Diff
minor refactoring
parent
5f6b138b
Branches
Branches containing commit
Tags
Tags containing commit
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
+13
-9
13 additions, 9 deletions
inversion.cpp
with
13 additions
and
9 deletions
inversion.cpp
+
13
−
9
View file @
1d2fee32
...
@@ -55,6 +55,18 @@ static unsigned int getNumberOfGroups(const GmshFem &gmshFem)
...
@@ -55,6 +55,18 @@ static unsigned int getNumberOfGroups(const GmshFem &gmshFem)
return
n_group
;
return
n_group
;
}
}
static
std
::
string
getIntegrationType
(
const
GmshFem
&
gmshFem
,
std
::
string
suffix_g
)
{
std
::
string
integrationType
;
if
(
!
(
gmshFem
.
userDefinedParameter
(
integrationType
,
"integration_type"
)
||
gmshFem
.
userDefinedParameter
(
integrationType
,
"integration_type"
+
suffix_g
)))
{
throw
Exception
(
"Integration type could not be found."
);
}
return
integrationType
;
}
template
<
Physic
T_Physic
>
template
<
Physic
T_Physic
>
int
inversion
(
const
GmshFem
&
gmshFem
)
int
inversion
(
const
GmshFem
&
gmshFem
)
{
{
...
@@ -131,15 +143,7 @@ int inversion(const GmshFem& gmshFem)
...
@@ -131,15 +143,7 @@ int inversion(const GmshFem& gmshFem)
}
}
}
}
std
::
string
integrationType
;
std
::
string
integrationType
=
getIntegrationType
(
gmshFem
,
suffix_g
);
if
(
!
(
gmshFem
.
userDefinedParameter
(
integrationType
,
"integration_type"
)
||
gmshFem
.
userDefinedParameter
(
integrationType
,
"integration_type"
+
suffix_g
)
))
{
throw
Exception
(
"Integration type could not be found."
);
}
model
::
Discretization
m_discret
(
gmshFem
,
suffix_g
);
model
::
Discretization
m_discret
(
gmshFem
,
suffix_g
);
if
(
g
==
0
)
if
(
g
==
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