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
Özgür Ozan Sen
ogs
Commits
da723ce0
Commit
da723ce0
authored
1 year ago
by
Julian Heinze
Committed by
Dmitri Naumov
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
std::any_of instead of for-loop
parent
0d1886a9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MeshToolsLib/MeshGenerators/AddFaultToVoxelGrid.cpp
+13
-12
13 additions, 12 deletions
MeshToolsLib/MeshGenerators/AddFaultToVoxelGrid.cpp
with
13 additions
and
12 deletions
MeshToolsLib/MeshGenerators/AddFaultToVoxelGrid.cpp
+
13
−
12
View file @
da723ce0
...
...
@@ -167,22 +167,23 @@ bool isVoxelGrid(MeshLib::Mesh const& mesh)
"aligned hexahedra)."
);
return
false
;
}
for
(
auto
const
&
e
:
elements
)
auto
is_voxel
=
[](
auto
const
&
e
)
{
auto
const
n
=
e
->
getNodes
();
if
((
*
n
[
0
])[
2
]
!=
(
*
n
[
1
])[
2
]
||
(
*
n
[
1
])[
2
]
!=
(
*
n
[
2
])[
2
]
||
(
*
n
[
4
])[
2
]
!=
(
*
n
[
5
])[
2
]
||
(
*
n
[
5
])[
2
]
!=
(
*
n
[
6
])[
2
]
||
(
*
n
[
1
])[
0
]
!=
(
*
n
[
2
])[
0
]
||
(
*
n
[
2
])[
0
]
!=
(
*
n
[
5
])[
0
]
||
(
*
n
[
0
])[
0
]
!=
(
*
n
[
3
])[
0
]
||
(
*
n
[
3
])[
0
]
!=
(
*
n
[
7
])[
0
])
{
ERR
(
"Input mesh needs to be voxel grid (i.e. equally sized axis "
"aligned hexahedra)."
);
return
false
;
}
return
((
*
n
[
0
])[
2
]
!=
(
*
n
[
1
])[
2
]
||
(
*
n
[
1
])[
2
]
!=
(
*
n
[
2
])[
2
]
||
(
*
n
[
4
])[
2
]
!=
(
*
n
[
5
])[
2
]
||
(
*
n
[
5
])[
2
]
!=
(
*
n
[
6
])[
2
]
||
(
*
n
[
1
])[
0
]
!=
(
*
n
[
2
])[
0
]
||
(
*
n
[
2
])[
0
]
!=
(
*
n
[
5
])[
0
]
||
(
*
n
[
0
])[
0
]
!=
(
*
n
[
3
])[
0
]
||
(
*
n
[
3
])[
0
]
!=
(
*
n
[
7
])[
0
]);
};
if
(
std
::
any_of
(
elements
.
cbegin
(),
elements
.
cend
(),
is_voxel
))
{
ERR
(
"Input mesh needs to be voxel grid (i.e. equally sized axis "
"aligned hexahedra)."
);
return
false
;
}
return
true
;
}
}
// namespace
}
// namespace
namespace
MeshToolsLib
::
MeshGenerator
::
AddFaultToVoxelGrid
{
...
...
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