Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pugs
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Commits
2a5faa37
Commit
2a5faa37
authored
8 months ago
by
Alexandre Gangloff
Browse files
Options
Downloads
Patches
Plain Diff
Add a space order 2 Fjr computation function
parent
2e51eb99
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/scheme/Order2AcousticSolver.cpp
+13
-8
13 additions, 8 deletions
src/scheme/Order2AcousticSolver.cpp
with
13 additions
and
8 deletions
src/scheme/Order2AcousticSolver.cpp
+
13
−
8
View file @
2a5faa37
...
...
@@ -322,22 +322,27 @@ class Order2AcousticSolverHandler::Order2AcousticSolver final : public Order2Aco
_computeFjr
(
const
MeshType
&
mesh
,
const
NodeValuePerCell
<
const
Rdxd
>&
Ajr
,
const
NodeValue
<
const
Rd
>&
ur
,
const
Discrete
Vector
Function
&
u
,
const
Discrete
Scalar
Function
&
p
)
const
DiscreteFunction
DPk
<
Dimension
,
const
Rd
>
DPk_uh
,
DiscreteFunction
DPk
<
Dimension
,
const
double
>
DPk_ph
)
const
{
MeshDataType
&
mesh_data
=
MeshDataManager
::
instance
().
getMeshData
(
mesh
);
const
NodeValuePerCell
<
const
Rd
>
Cjr
=
mesh_data
.
Cjr
();
const
NodeValue
<
const
Rd
>&
xr
=
mesh
.
xr
();
const
auto
&
cell_to_node_matrix
=
mesh
.
connectivity
().
cellToNodeMatrix
();
const
auto
&
node_to_cell_matrix
=
mesh
.
connectivity
().
nodeToCellMatrix
();
const
auto
&
node_local_numbers_in_their_cells
=
mesh
.
connectivity
().
nodeLocalNumbersInTheirCells
();
NodeValuePerCell
<
Rd
>
F
{
mesh
.
connectivity
()};
parallel_for
(
mesh
.
numberOfCells
(),
PUGS_LAMBDA
(
CellId
j
)
{
const
auto
&
cell_nodes
=
cell_to_node_matrix
[
j
];
mesh
.
numberOfNodes
(),
PUGS_LAMBDA
(
NodeId
r
)
{
const
auto
&
node_to_cell
=
node_to_cell_matrix
[
r
];
const
auto
&
node_local_number_in_its_cells
=
node_local_numbers_in_their_cells
.
itemArray
(
r
);
for
(
size_t
r
=
0
;
r
<
cell_nodes
.
size
();
++
r
)
{
F
(
j
,
r
)
=
Ajr
(
j
,
r
)
*
(
u
[
j
]
-
ur
[
cell_nodes
[
r
]])
+
p
[
j
]
*
Cjr
(
j
,
r
);
for
(
size_t
j
=
0
;
j
<
node_to_cell
.
size
();
++
j
){
const
CellId
J
=
node_to_cell
[
j
];
const
unsigned
int
R
=
node_local_number_in_its_cells
[
j
];
F
(
J
,
R
)
=
Ajr
(
J
,
R
)
*
(
DPk_uh
[
J
](
xr
[
r
])
-
ur
[
r
])
+
DPk_ph
[
J
](
xr
[
r
])
*
Cjr
(
J
,
R
);
}
});
...
...
@@ -400,7 +405,7 @@ class Order2AcousticSolverHandler::Order2AcousticSolver final : public Order2Aco
synchronize
(
br
);
NodeValue
<
const
Rd
>
ur
=
this
->
_computeUr
(
mesh
,
Ar
,
br
);
NodeValuePerCell
<
const
Rd
>
Fjr
=
this
->
_computeFjr
(
mesh
,
Ajr
,
ur
,
u
,
p
);
NodeValuePerCell
<
const
Rd
>
Fjr
=
this
->
_computeFjr
(
mesh
,
Ajr
,
ur
,
DPk_uh
,
DPk_ph
);
return
std
::
make_tuple
(
std
::
make_shared
<
const
ItemValueVariant
>
(
ur
),
std
::
make_shared
<
const
SubItemValuePerItemVariant
>
(
Fjr
));
...
...
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