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
b0f7bd43
Commit
b0f7bd43
authored
8 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
[MeL] clang format ElementCoordinatesMappingLocal.
parent
f1fea438
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
MeshLib/ElementCoordinatesMappingLocal.cpp
+19
-20
19 additions, 20 deletions
MeshLib/ElementCoordinatesMappingLocal.cpp
with
19 additions
and
20 deletions
MeshLib/ElementCoordinatesMappingLocal.cpp
+
19
−
20
View file @
b0f7bd43
...
...
@@ -21,26 +21,26 @@
namespace
detail
{
/// rotate points to local coordinates
void
rotateToLocal
(
const
MeshLib
::
RotationMatrix
&
matR2local
,
std
::
vector
<
MathLib
::
Point3d
>
&
points
)
void
rotateToLocal
(
const
MeshLib
::
RotationMatrix
&
matR2local
,
std
::
vector
<
MathLib
::
Point3d
>&
points
)
{
for
(
auto
&
p
:
points
)
p
=
matR2local
*
p
;
p
=
matR2local
*
p
;
}
/// get a rotation matrix to the global coordinates
/// it computes R in x=R*x' where x is original coordinates and x' is local
coordinates
void
getRotationMatrixToGlobal
(
const
unsigned
element_dimension
,
const
unsigned
global_dim
,
const
std
::
vector
<
MathLib
::
Point3d
>
&
points
,
MeshLib
::
RotationMatrix
&
matR
)
/// it computes R in x=R*x' where x is original coordinates and x' is local
/// coordinates
void
getRotationMatrixToGlobal
(
const
unsigned
element_dimension
,
const
unsigned
global_dim
,
const
std
::
vector
<
MathLib
::
Point3d
>&
points
,
MeshLib
::
RotationMatrix
&
matR
)
{
// compute R in x=R*x' where x are original coordinates and x' are local coordinates
if
(
element_dimension
==
1
)
{
// compute R in x=R*x' where x are original coordinates and x' are local
// coordinates
if
(
element_dimension
==
1
)
{
MathLib
::
Vector3
xx
(
points
[
0
],
points
[
1
]);
xx
.
normalize
();
if
(
global_dim
==
2
)
...
...
@@ -48,7 +48,9 @@ void getRotationMatrixToGlobal(
else
GeoLib
::
compute3DRotationMatrixToX
(
xx
,
matR
);
matR
.
transposeInPlace
();
}
else
if
(
global_dim
==
3
&&
element_dimension
==
2
)
{
}
else
if
(
global_dim
==
3
&&
element_dimension
==
2
)
{
// get plane normal
MathLib
::
Vector3
plane_normal
;
double
d
;
...
...
@@ -59,17 +61,14 @@ void getRotationMatrixToGlobal(
// set a transposed matrix
matR
.
transposeInPlace
();
}
}
}
// namespace detail
}
// namespace detail
namespace
MeshLib
{
ElementCoordinatesMappingLocal
::
ElementCoordinatesMappingLocal
(
const
Element
&
e
,
const
unsigned
global_dim
)
:
_global_dim
(
global_dim
),
_matR2global
(
3
,
3
)
const
Element
&
e
,
const
unsigned
global_dim
)
:
_global_dim
(
global_dim
),
_matR2global
(
3
,
3
)
{
assert
(
e
.
getDimension
()
<=
global_dim
);
_points
.
reserve
(
e
.
getNumberOfNodes
());
...
...
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