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
3ca6679f
Commit
3ca6679f
authored
3 years ago
by
Xavier Adriaens
Browse files
Options
Downloads
Plain Diff
Merge branch 'OptiAntho' into 'MultiParameter'
Opti See merge request
!3
parents
742629ca
840b87bc
Branches
MultiParameter
Branches containing commit
No related tags found
1 merge request
!3
Opti
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
common/wave/element.cpp
+12
-7
12 additions, 7 deletions
common/wave/element.cpp
common/wave/element.h
+2
-1
2 additions, 1 deletion
common/wave/element.h
specific/todata.cpp
+1
-1
1 addition, 1 deletion
specific/todata.cpp
with
15 additions
and
9 deletions
common/wave/element.cpp
+
12
−
7
View file @
3ca6679f
...
@@ -47,13 +47,18 @@ void WaveMultiField<T_Physic>::write(std::string name) const
...
@@ -47,13 +47,18 @@ void WaveMultiField<T_Physic>::write(std::string name) const
template
<
Physic
T_Physic
>
template
<
Physic
T_Physic
>
void
WaveAuxilaryField
<
T_Physic
>::
assignValues
(
const
std
::
vector
<
std
::
complex
<
double
>
>
&
values
)
void
WaveAuxilaryField
<
T_Physic
>::
assignValues
(
const
std
::
vector
<
std
::
complex
<
double
>
>
&
values
)
{
{
unsigned
int
i
=
0
;
if
(
_systemValuesToDofValues
.
size
()
==
0
)
{
for
(
auto
it
=
_wmf
->
_field
.
begin
();
it
!=
_wmf
->
_field
.
end
();
it
++
)
_systemValuesToDofValues
.
reserve
(
values
.
size
());
{
for
(
auto
it
=
_wmf
->
_field
.
begin
();
it
!=
_wmf
->
_field
.
end
();
it
++
)
if
(
it
->
first
->
type
()
==
gmshfem
::
dofs
::
Type
::
Unknown
)
{
{
if
(
it
->
first
->
type
()
==
gmshfem
::
dofs
::
Type
::
Unknown
)
_wmf
->
_dofValues
[
_index
][
i
++
]
=
values
[
it
->
first
->
numDof
()
-
1
];
{
}
_systemValuesToDofValues
.
push_back
(
it
->
first
->
numDof
()
-
1
);
}
}
}
for
(
unsigned
int
i
=
0
;
i
<
values
.
size
();
++
i
)
{
_wmf
->
_dofValues
[
_index
][
i
]
=
values
[
_systemValuesToDofValues
[
i
]];
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
common/wave/element.h
+
2
−
1
View file @
3ca6679f
...
@@ -47,8 +47,9 @@ class WaveAuxilaryField : public WaveField<T_Physic>
...
@@ -47,8 +47,9 @@ class WaveAuxilaryField : public WaveField<T_Physic>
private:
private:
WaveMultiField
<
T_Physic
>*
_wmf
;
WaveMultiField
<
T_Physic
>*
_wmf
;
unsigned
int
_index
;
unsigned
int
_index
;
std
::
vector
<
unsigned
int
>
_systemValuesToDofValues
;
public:
public:
WaveAuxilaryField
(
std
::
string
name
,
gmshfem
::
domain
::
Domain
domain
,
std
::
string
gmodel
,
const
wave
::
Discretization
<
T_Physic
>&
w_discret
)
:
WaveField
<
T_Physic
>
(
name
,
domain
,
gmodel
,
w_discret
),
_wmf
(
nullptr
),
_index
(
0
)
{};
WaveAuxilaryField
(
std
::
string
name
,
gmshfem
::
domain
::
Domain
domain
,
std
::
string
gmodel
,
const
wave
::
Discretization
<
T_Physic
>&
w_discret
)
:
WaveField
<
T_Physic
>
(
name
,
domain
,
gmodel
,
w_discret
),
_wmf
(
nullptr
),
_index
(
0
)
,
_systemValuesToDofValues
()
{};
void
setField
(
WaveMultiField
<
T_Physic
>*
wmf
){
_wmf
=
wmf
;};
void
setField
(
WaveMultiField
<
T_Physic
>*
wmf
){
_wmf
=
wmf
;};
void
setIndex
(
unsigned
int
index
){
_index
=
index
;};
void
setIndex
(
unsigned
int
index
){
_index
=
index
;};
virtual
void
assignValues
(
const
std
::
vector
<
std
::
complex
<
double
>
>
&
values
)
override
;
virtual
void
assignValues
(
const
std
::
vector
<
std
::
complex
<
double
>
>
&
values
)
override
;
...
...
This diff is collapsed.
Click to expand it.
specific/todata.cpp
+
1
−
1
View file @
3ca6679f
...
@@ -19,7 +19,7 @@ Data<Physic::acoustic> wave_to_data(const ConfigurationInterface* const config,
...
@@ -19,7 +19,7 @@ Data<Physic::acoustic> wave_to_data(const ConfigurationInterface* const config,
{
{
for
(
unsigned
int
r
=
0
;
r
<
config
->
nr
(
s
);
r
++
)
for
(
unsigned
int
r
=
0
;
r
<
config
->
nr
(
s
);
r
++
)
{
{
PointData
<
Physic
::
acoustic
>
buffer
(
integrate
(
1.0
*
w
[
s
],
config
->
receiver
(
s
,
r
),
"Gauss1"
));
PointData
<
Physic
::
acoustic
>
buffer
(
integrate
(
ScalarFunction
<
std
::
complex
<
double
>
>
(
w
[
s
]
)
,
config
->
receiver
(
s
,
r
),
"Gauss1"
));
v
.
value
(
s
,
r
,
buffer
);
v
.
value
(
s
,
r
,
buffer
);
}
}
}
}
...
...
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