Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Multiphysics 0471
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
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
Denis Louis
Multiphysics 0471
Commits
d7eace11
Commit
d7eace11
authored
2 years ago
by
Denis Louis
Browse files
Options
Downloads
Patches
Plain Diff
FINAL DEADLINE AND FINAL VERSION OF THE CODE
parent
f546eb61
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
srcs/BEM/postProcessing.cpp
+24
-29
24 additions, 29 deletions
srcs/BEM/postProcessing.cpp
with
24 additions
and
29 deletions
srcs/BEM/postProcessing.cpp
+
24
−
29
View file @
d7eace11
...
...
@@ -317,47 +317,42 @@ void boundaryElementTags(std::vector<std::size_t> &domainBoundaryElementTags,
const
int
domainPhysicalGroupTag
)
{
// #pragma omp parallel
std
::
vector
<
std
::
size_t
>
localElementTags
;
// For parallelization.
// Loops over each boundary element and retrieves the element in contact with its boundary nodes.
// #pragma omp for schedule(guided)
for
(
std
::
size_t
i
=
0
;
i
<
elementVector
.
size
();
i
++
)
{
std
::
vector
<
std
::
size_t
>
localElementTags
;
// For parallelization.
std
::
vector
<
size_t
>
elementTags
;
gmsh
::
model
::
mesh
::
getElementsByCoordinates
(
elementVector
[
i
].
x1
,
elementVector
[
i
].
y1
,
0
,
elementTags
,
2
);
// Loops over each boundary element and retrieves the element in contact with its boundary nodes.
// #pragma omp for schedule(guided)
for
(
std
::
size_t
i
=
0
;
i
<
elementVector
.
size
();
i
++
)
// Adds the elements tags to the local vector.
for
(
std
::
size_t
j
=
0
;
j
<
elementTags
.
size
();
j
++
)
{
// Retrieves the physical group to which the element belongs because it is possible that the element belongs to
// an adjacent physical surface.
int
elementType
;
std
::
vector
<
size_t
>
nodeTags
;
int
entityDim
;
int
entityTag
;
std
::
vector
<
int
>
physicalTags
;
// Adds the elements tags to the local vector.
for
(
std
::
size_t
j
=
0
;
j
<
elementTags
.
size
();
j
++
)
// #pragma omp critical
{
// Retrieves the physical group to which the element belongs because it is possible that the element belongs to
// an adjacent physical surface.
int
elementType
;
std
::
vector
<
size_t
>
nodeTags
;
int
entityDim
;
int
entityTag
;
std
::
vector
<
int
>
physicalTags
;
// #pragma omp critical
{
gmsh
::
model
::
mesh
::
getElement
(
elementTags
[
j
],
elementType
,
nodeTags
,
entityDim
,
entityTag
);
gmsh
::
model
::
getPhysicalGroupsForEntity
(
entityDim
,
entityTag
,
physicalTags
);
}
// Add the element tag (to a local 'thread safe' vector) if the physical tag is the right one.
for
(
std
::
size_t
k
=
0
;
k
<
physicalTags
.
size
();
k
++
)
if
(
physicalTags
[
k
]
==
domainPhysicalGroupTag
)
localElementTags
.
push_back
(
elementTags
[
j
]);
gmsh
::
model
::
mesh
::
getElement
(
elementTags
[
j
],
elementType
,
nodeTags
,
entityDim
,
entityTag
);
gmsh
::
model
::
getPhysicalGroupsForEntity
(
entityDim
,
entityTag
,
physicalTags
);
}
// Add the element tag (to a local 'thread safe' vector) if the physical tag is the right one.
for
(
std
::
size_t
k
=
0
;
k
<
physicalTags
.
size
();
k
++
)
if
(
physicalTags
[
k
]
==
domainPhysicalGroupTag
)
localElementTags
.
push_back
(
elementTags
[
j
]);
}
// // Fills the "domainBoundaryElementTags" vector.
// #pragma omp critical
domainBoundaryElementTags
.
insert
(
domainBoundaryElementTags
.
end
(),
localElementTags
.
begin
(),
localElementTags
.
end
());
}
// // Fills the "domainBoundaryElementTags" vector.
// #pragma omp critical
domainBoundaryElementTags
.
insert
(
domainBoundaryElementTags
.
end
(),
localElementTags
.
begin
(),
localElementTags
.
end
());
// Allows duplicate tags to be removed. If an element has several nodes in common with the boundary, it has been counted
// several times before.
...
...
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