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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Commits
7ded9bd5
Commit
7ded9bd5
authored
2 years ago
by
Emmanuel Labourasse
Browse files
Options
Downloads
Patches
Plain Diff
bug fixed
parent
7d5961dc
No related branches found
No related tags found
1 merge request
!167
Improve fluxing based remapping
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mesh/MeshSmoother.cpp
+9
-4
9 additions, 4 deletions
src/mesh/MeshSmoother.cpp
with
9 additions
and
4 deletions
src/mesh/MeshSmoother.cpp
+
9
−
4
View file @
7ded9bd5
...
...
@@ -172,11 +172,11 @@ class MeshSmootherHandler::MeshSmoother
parallel_for
(
m_given_mesh
.
numberOfNodes
(),
PUGS_LAMBDA
(
const
NodeId
node_id
)
{
const
auto
&
node_cell_list
=
node_to_cell_matrix
[
node_id
];
Rd
mean_position
(
zero
);
size_t
number_of_neighbours
=
0
;
for
(
size_t
i_cell
=
0
;
i_cell
<
node_cell_list
.
size
();
++
i_cell
)
{
const
size_t
i_cell_node
=
node_number_in_their_cells
(
node_id
,
i_cell
);
Rd
mean_position
(
zero
);
size_t
number_of_neighbours
=
0
;
const
CellId
cell_id
=
node_cell_list
[
i_cell
];
const
auto
&
cell_node_list
=
cell_to_node_matrix
[
cell_id
];
...
...
@@ -185,11 +185,16 @@ class MeshSmootherHandler::MeshSmoother
const
NodeId
cell_node_id
=
cell_node_list
[
i_node
];
mean_position
+=
given_xr
[
cell_node_id
];
number_of_neighbours
++
;
// std::cout << node_id << " position " << given_xr[node_id] << " position voisin " <<
// given_xr[cell_node_id]
// << " mean_position " << mean_position << "\n";
}
}
}
mean_position
=
1.
/
number_of_neighbours
*
mean_position
;
shift_r
[
node_id
]
=
mean_position
-
given_xr
[
node_id
];
}
// std::cout << " mean position " << mean_position << given_xr[node_id] << "\n";
// double nshift = sqrt(dot(shift_r[node_id], shift_r[node_id]));
// if (nshift > max_delta_xr[node_id]) {
// shift_r[node_id] = max_delta_xr[node_id] / nshift * shift_r[node_id];
...
...
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