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
Dmitri Naumov
ogs
Commits
b54418a7
Commit
b54418a7
authored
9 years ago
by
Dmitri Naumov
Browse files
Options
Downloads
Patches
Plain Diff
[AsmL] Move implementation of findGlobalIndices.
parent
793087af
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
AssemblerLib/LocalToGlobalIndexMap.h
+36
-30
36 additions, 30 deletions
AssemblerLib/LocalToGlobalIndexMap.h
with
36 additions
and
30 deletions
AssemblerLib/LocalToGlobalIndexMap.h
+
36
−
30
View file @
b54418a7
...
...
@@ -99,36 +99,7 @@ private:
template
<
typename
ElementIterator
>
void
findGlobalIndices
(
ElementIterator
first
,
ElementIterator
last
,
std
::
size_t
const
mesh_id
,
AssemblerLib
::
ComponentOrder
const
order
)
{
// For each element find the global indices for node/element
// components.
for
(
ElementIterator
e
=
first
;
e
!=
last
;
++
e
)
{
std
::
vector
<
MeshLib
::
Location
>
vec_items
;
std
::
size_t
const
nnodes
=
(
*
e
)
->
getNNodes
();
vec_items
.
reserve
(
nnodes
);
for
(
unsigned
n
=
0
;
n
<
nnodes
;
n
++
)
{
vec_items
.
emplace_back
(
mesh_id
,
MeshLib
::
MeshItemType
::
Node
,
(
*
e
)
->
getNode
(
n
)
->
getID
());
}
// Save a line of indices for the current element.
switch
(
order
)
{
case
AssemblerLib
::
ComponentOrder
::
BY_LOCATION
:
_rows
.
push_back
(
_mesh_component_map
.
getGlobalIndices
<
AssemblerLib
::
ComponentOrder
::
BY_LOCATION
>
(
vec_items
));
break
;
case
AssemblerLib
::
ComponentOrder
::
BY_COMPONENT
:
_rows
.
push_back
(
_mesh_component_map
.
getGlobalIndices
<
AssemblerLib
::
ComponentOrder
::
BY_COMPONENT
>
(
vec_items
));
break
;
}
}
}
std
::
size_t
const
mesh_id
,
AssemblerLib
::
ComponentOrder
const
order
);
private
:
std
::
vector
<
MeshLib
::
MeshSubsets
*>
const
&
_mesh_subsets
;
...
...
@@ -149,6 +120,41 @@ private:
};
template
<
typename
ElementIterator
>
void
LocalToGlobalIndexMap
::
findGlobalIndices
(
ElementIterator
first
,
ElementIterator
last
,
std
::
size_t
const
mesh_id
,
AssemblerLib
::
ComponentOrder
const
order
)
{
// For each element find the global indices for node/element
// components.
for
(
ElementIterator
e
=
first
;
e
!=
last
;
++
e
)
{
std
::
vector
<
MeshLib
::
Location
>
vec_items
;
std
::
size_t
const
nnodes
=
(
*
e
)
->
getNNodes
();
vec_items
.
reserve
(
nnodes
);
for
(
unsigned
n
=
0
;
n
<
nnodes
;
n
++
)
{
vec_items
.
emplace_back
(
mesh_id
,
MeshLib
::
MeshItemType
::
Node
,
(
*
e
)
->
getNode
(
n
)
->
getID
());
}
// Save a line of indices for the current element.
switch
(
order
)
{
case
AssemblerLib
::
ComponentOrder
::
BY_LOCATION
:
_rows
.
push_back
(
_mesh_component_map
.
getGlobalIndices
<
AssemblerLib
::
ComponentOrder
::
BY_LOCATION
>
(
vec_items
));
break
;
case
AssemblerLib
::
ComponentOrder
::
BY_COMPONENT
:
_rows
.
push_back
(
_mesh_component_map
.
getGlobalIndices
<
AssemblerLib
::
ComponentOrder
::
BY_COMPONENT
>
(
vec_items
));
break
;
}
}
}
}
// namespace AssemblerLib
#endif // ASSEMBLERLIB_LOCALTOGLOBALINDEXMAP_H_
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