Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
wenqing
ogs
Commits
5fc3d3ca
Commit
5fc3d3ca
authored
6 years ago
by
Dmitri Naumov
Browse files
Options
Downloads
Patches
Plain Diff
NWMP; Rename applyToPropertyVectors().
parent
185aff6d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.cpp
+4
-4
4 additions, 4 deletions
...odelPreparation/PartitionMesh/NodeWiseMeshPartitioner.cpp
with
4 additions
and
4 deletions
Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.cpp
+
4
−
4
View file @
5fc3d3ca
...
@@ -332,8 +332,8 @@ bool copyPropertyVector(MeshLib::Properties const& original_properties,
...
@@ -332,8 +332,8 @@ bool copyPropertyVector(MeshLib::Properties const& original_properties,
/// At least one of the functions must return the 'true' value, but at most one
/// At least one of the functions must return the 'true' value, but at most one
/// is executed.
/// is executed.
template
<
typename
Function
>
template
<
typename
Function
>
void
applyPropertyVectors
(
std
::
vector
<
std
::
string
>
const
&
property_names
,
void
apply
To
PropertyVectors
(
std
::
vector
<
std
::
string
>
const
&
property_names
,
Function
f
)
Function
f
)
{
{
for
(
auto
const
&
name
:
property_names
)
for
(
auto
const
&
name
:
property_names
)
{
{
...
@@ -373,7 +373,7 @@ void NodeWiseMeshPartitioner::processProperties(
...
@@ -373,7 +373,7 @@ void NodeWiseMeshPartitioner::processProperties(
// 3 copy the values according to the partition info
// 3 copy the values according to the partition info
auto
const
&
original_properties
(
_mesh
->
getProperties
());
auto
const
&
original_properties
(
_mesh
->
getProperties
());
applyPropertyVectors
(
apply
To
PropertyVectors
(
original_properties
.
getPropertyVectorNames
(
mesh_item_type
),
original_properties
.
getPropertyVectorNames
(
mesh_item_type
),
[
&
](
auto
type
,
std
::
string
const
&
name
)
{
[
&
](
auto
type
,
std
::
string
const
&
name
)
{
return
copyPropertyVector
<
decltype
(
type
)
>
(
return
copyPropertyVector
<
decltype
(
type
)
>
(
...
@@ -486,7 +486,7 @@ void writePropertiesBinary(const std::string& file_name_base,
...
@@ -486,7 +486,7 @@ void writePropertiesBinary(const std::string& file_name_base,
std
::
size_t
const
number_of_properties
(
property_names
.
size
());
std
::
size_t
const
number_of_properties
(
property_names
.
size
());
BaseLib
::
writeValueBinary
(
out
,
number_of_properties
);
BaseLib
::
writeValueBinary
(
out
,
number_of_properties
);
applyPropertyVectors
(
property_names
,
apply
To
PropertyVectors
(
property_names
,
[
&
](
auto
type
,
std
::
string
const
&
name
)
{
[
&
](
auto
type
,
std
::
string
const
&
name
)
{
return
writePropertyVectorBinary
<
decltype
(
type
)
>
(
return
writePropertyVectorBinary
<
decltype
(
type
)
>
(
partitioned_properties
,
name
,
out_val
,
out
);
partitioned_properties
,
name
,
out_val
,
out
);
...
...
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