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
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
Yuhao Liu
ogs
Commits
b3792140
Commit
b3792140
authored
8 years ago
by
Christoph Lehmann
Browse files
Options
Downloads
Patches
Plain Diff
[MeL] pass global_dim explicitly
parent
464cf7f7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MeshLib/ElementCoordinatesMappingLocal.cpp
+6
-7
6 additions, 7 deletions
MeshLib/ElementCoordinatesMappingLocal.cpp
MeshLib/ElementCoordinatesMappingLocal.h
+3
-3
3 additions, 3 deletions
MeshLib/ElementCoordinatesMappingLocal.h
with
9 additions
and
10 deletions
MeshLib/ElementCoordinatesMappingLocal.cpp
+
6
−
7
View file @
b3792140
...
...
@@ -68,24 +68,23 @@ namespace MeshLib
ElementCoordinatesMappingLocal
::
ElementCoordinatesMappingLocal
(
const
Element
&
e
,
const
CoordinateSystem
&
global_
coords
)
:
_
coords
(
global_
coords
),
_matR2global
(
3
,
3
)
const
unsigned
global_
dim
)
:
_
global_dim
(
global_
dim
),
_matR2global
(
3
,
3
)
{
assert
(
e
.
getDimension
()
<=
global_
coords
.
getDimension
()
);
assert
(
e
.
getDimension
()
<=
global_
dim
);
_points
.
reserve
(
e
.
getNumberOfNodes
());
for
(
unsigned
i
=
0
;
i
<
e
.
getNumberOfNodes
();
i
++
)
_points
.
emplace_back
(
*
(
e
.
getNode
(
i
)));
auto
const
element_dimension
=
e
.
getDimension
();
auto
const
global_dimension
=
global_coords
.
getDimension
();
auto
const
element_dim
=
e
.
getDimension
();
if
(
global_dim
ension
==
element_dim
ension
)
if
(
global_dim
==
element_dim
)
{
_matR2global
.
setIdentity
();
return
;
}
detail
::
getRotationMatrixToGlobal
(
element_dim
ension
,
global_dim
ension
,
_points
,
_matR2global
);
detail
::
getRotationMatrixToGlobal
(
element_dim
,
global_dim
,
_points
,
_matR2global
);
detail
::
rotateToLocal
(
_matR2global
.
transpose
(),
_points
);
}
...
...
This diff is collapsed.
Click to expand it.
MeshLib/ElementCoordinatesMappingLocal.h
+
3
−
3
View file @
b3792140
...
...
@@ -37,10 +37,10 @@ public:
* \param e Mesh element whose node coordinates are mapped
* \param global_coord_system Global coordinate system
*/
ElementCoordinatesMappingLocal
(
const
Element
&
e
,
const
CoordinateSystem
&
global_coord_syste
m
);
ElementCoordinatesMappingLocal
(
const
Element
&
e
,
const
unsigned
global_di
m
);
/// return the global coordinate system
const
CoordinateSystem
getGlobalCoordinateSystem
()
const
{
return
_
coords
;
}
unsigned
getGlobalDimension
()
const
{
return
_
global_dim
;
}
/// return mapped coordinates of the node
MathLib
::
Point3d
const
&
getMappedCoordinates
(
std
::
size_t
node_id
)
const
...
...
@@ -52,7 +52,7 @@ public:
const
RotationMatrix
&
getRotationMatrixToGlobal
()
const
{
return
_matR2global
;}
private
:
const
CoordinateSystem
_coords
;
const
unsigned
_global_dim
;
std
::
vector
<
MathLib
::
Point3d
>
_points
;
RotationMatrix
_matR2global
;
};
...
...
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