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
3056b9c3
Commit
3056b9c3
authored
9 years ago
by
Norihiro Watanabe
Committed by
Dmitri Naumov
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
include comments from DN
parent
064f0276
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
Applications/DataExplorer/VtkVis/VtkMeshSource.cpp
+2
-3
2 additions, 3 deletions
Applications/DataExplorer/VtkVis/VtkMeshSource.cpp
MeshLib/VtkOGSEnum.cpp
+37
-76
37 additions, 76 deletions
MeshLib/VtkOGSEnum.cpp
with
39 additions
and
79 deletions
Applications/DataExplorer/VtkVis/VtkMeshSource.cpp
+
2
−
3
View file @
3056b9c3
...
@@ -135,7 +135,6 @@ int VtkMeshSource::RequestData( vtkInformation* request,
...
@@ -135,7 +135,6 @@ int VtkMeshSource::RequestData( vtkInformation* request,
// Generate mesh elements
// Generate mesh elements
for
(
unsigned
i
=
0
;
i
<
nElems
;
++
i
)
for
(
unsigned
i
=
0
;
i
<
nElems
;
++
i
)
{
{
int
type
(
0
);
const
MeshLib
::
Element
*
elem
(
elems
[
i
]);
const
MeshLib
::
Element
*
elem
(
elems
[
i
]);
materialIDs
->
InsertValue
(
i
,
elem
->
getValue
());
materialIDs
->
InsertValue
(
i
,
elem
->
getValue
());
...
@@ -145,8 +144,8 @@ int VtkMeshSource::RequestData( vtkInformation* request,
...
@@ -145,8 +144,8 @@ int VtkMeshSource::RequestData( vtkInformation* request,
for
(
unsigned
j
=
0
;
j
<
nElemNodes
;
++
j
)
for
(
unsigned
j
=
0
;
j
<
nElemNodes
;
++
j
)
point_ids
->
SetId
(
j
,
elem
->
getNode
(
j
)
->
getID
());
point_ids
->
SetId
(
j
,
elem
->
getNode
(
j
)
->
getID
());
type
=
OGSToVtkCellType
(
elem
->
getCellType
());
const
int
type
=
OGSToVtkCellType
(
elem
->
getCellType
());
if
(
type
==
0
)
if
(
type
==
-
1
)
{
{
ERR
(
"VtkMeshSource::RequestData(): Unknown element type
\"
%s
\"
."
,
ERR
(
"VtkMeshSource::RequestData(): Unknown element type
\"
%s
\"
."
,
CellType2String
(
elem
->
getCellType
()).
c_str
());
CellType2String
(
elem
->
getCellType
()).
c_str
());
...
...
This diff is collapsed.
Click to expand it.
MeshLib/VtkOGSEnum.cpp
+
37
−
76
View file @
3056b9c3
...
@@ -13,127 +13,88 @@
...
@@ -13,127 +13,88 @@
CellType
VtkCellTypeToOGS
(
int
type
)
CellType
VtkCellTypeToOGS
(
int
type
)
{
{
CellType
ogs
;
switch
(
type
)
switch
(
type
)
{
{
case
VTK_LINE
:
case
VTK_LINE
:
ogs
=
CellType
::
LINE2
;
return
CellType
::
LINE2
;
break
;
case
VTK_QUADRATIC_EDGE
:
case
VTK_QUADRATIC_EDGE
:
ogs
=
CellType
::
LINE3
;
return
CellType
::
LINE3
;
break
;
case
VTK_TRIANGLE
:
case
VTK_TRIANGLE
:
ogs
=
CellType
::
TRI3
;
return
CellType
::
TRI3
;
break
;
case
VTK_QUADRATIC_TRIANGLE
:
case
VTK_QUADRATIC_TRIANGLE
:
ogs
=
CellType
::
TRI6
;
return
CellType
::
TRI6
;
break
;
case
VTK_QUAD
:
case
VTK_QUAD
:
ogs
=
CellType
::
QUAD4
;
return
CellType
::
QUAD4
;
break
;
case
VTK_QUADRATIC_QUAD
:
case
VTK_QUADRATIC_QUAD
:
ogs
=
CellType
::
QUAD8
;
return
CellType
::
QUAD8
;
break
;
case
VTK_BIQUADRATIC_QUAD
:
case
VTK_BIQUADRATIC_QUAD
:
ogs
=
CellType
::
QUAD9
;
return
CellType
::
QUAD9
;
break
;
case
VTK_HEXAHEDRON
:
case
VTK_HEXAHEDRON
:
ogs
=
CellType
::
HEX8
;
return
CellType
::
HEX8
;
break
;
case
VTK_QUADRATIC_HEXAHEDRON
:
case
VTK_QUADRATIC_HEXAHEDRON
:
ogs
=
CellType
::
HEX20
;
return
CellType
::
HEX20
;
break
;
case
VTK_TRIQUADRATIC_HEXAHEDRON
:
case
VTK_TRIQUADRATIC_HEXAHEDRON
:
ogs
=
CellType
::
HEX27
;
return
CellType
::
HEX27
;
break
;
case
VTK_TETRA
:
case
VTK_TETRA
:
ogs
=
CellType
::
TET4
;
return
CellType
::
TET4
;
break
;
case
VTK_QUADRATIC_TETRA
:
case
VTK_QUADRATIC_TETRA
:
ogs
=
CellType
::
TET10
;
return
CellType
::
TET10
;
break
;
case
VTK_WEDGE
:
case
VTK_WEDGE
:
ogs
=
CellType
::
PRISM6
;
return
CellType
::
PRISM6
;
break
;
case
VTK_QUADRATIC_WEDGE
:
case
VTK_QUADRATIC_WEDGE
:
ogs
=
CellType
::
PRISM15
;
return
CellType
::
PRISM15
;
break
;
case
VTK_BIQUADRATIC_QUADRATIC_WEDGE
:
case
VTK_BIQUADRATIC_QUADRATIC_WEDGE
:
ogs
=
CellType
::
PRISM18
;
return
CellType
::
PRISM18
;
break
;
case
VTK_PYRAMID
:
case
VTK_PYRAMID
:
ogs
=
CellType
::
PYRAMID5
;
return
CellType
::
PYRAMID5
;
break
;
case
VTK_QUADRATIC_PYRAMID
:
case
VTK_QUADRATIC_PYRAMID
:
ogs
=
CellType
::
PYRAMID13
;
return
CellType
::
PYRAMID13
;
break
;
default:
default:
ogs
=
CellType
::
INVALID
;
return
CellType
::
INVALID
;
break
;
}
}
return
ogs
;
}
}
int
OGSToVtkCellType
(
CellType
ogs
)
int
OGSToVtkCellType
(
CellType
ogs
)
{
{
int
type
=
0
;
switch
(
ogs
)
switch
(
ogs
)
{
{
case
CellType
::
INVALID
:
break
;
case
CellType
::
LINE2
:
case
CellType
::
LINE2
:
type
=
VTK_LINE
;
return
VTK_LINE
;
break
;
case
CellType
::
LINE3
:
case
CellType
::
LINE3
:
type
=
VTK_QUADRATIC_EDGE
;
return
VTK_QUADRATIC_EDGE
;
break
;
case
CellType
::
TRI3
:
case
CellType
::
TRI3
:
type
=
VTK_TRIANGLE
;
return
VTK_TRIANGLE
;
break
;
case
CellType
::
TRI6
:
case
CellType
::
TRI6
:
type
=
VTK_QUADRATIC_TRIANGLE
;
return
VTK_QUADRATIC_TRIANGLE
;
break
;
case
CellType
::
QUAD4
:
case
CellType
::
QUAD4
:
type
=
VTK_QUAD
;
return
VTK_QUAD
;
break
;
case
CellType
::
QUAD8
:
case
CellType
::
QUAD8
:
type
=
VTK_QUADRATIC_QUAD
;
return
VTK_QUADRATIC_QUAD
;
break
;
case
CellType
::
QUAD9
:
case
CellType
::
QUAD9
:
type
=
VTK_BIQUADRATIC_QUAD
;
return
VTK_BIQUADRATIC_QUAD
;
break
;
case
CellType
::
HEX8
:
case
CellType
::
HEX8
:
type
=
VTK_HEXAHEDRON
;
return
VTK_HEXAHEDRON
;
break
;
case
CellType
::
HEX20
:
case
CellType
::
HEX20
:
type
=
VTK_QUADRATIC_HEXAHEDRON
;
return
VTK_QUADRATIC_HEXAHEDRON
;
break
;
case
CellType
::
HEX27
:
case
CellType
::
HEX27
:
type
=
VTK_TRIQUADRATIC_HEXAHEDRON
;
return
VTK_TRIQUADRATIC_HEXAHEDRON
;
break
;
case
CellType
::
TET4
:
case
CellType
::
TET4
:
type
=
VTK_TETRA
;
return
VTK_TETRA
;
break
;
case
CellType
::
TET10
:
case
CellType
::
TET10
:
type
=
VTK_QUADRATIC_TETRA
;
return
VTK_QUADRATIC_TETRA
;
break
;
case
CellType
::
PRISM6
:
case
CellType
::
PRISM6
:
type
=
VTK_WEDGE
;
return
VTK_WEDGE
;
break
;
case
CellType
::
PRISM15
:
case
CellType
::
PRISM15
:
type
=
VTK_QUADRATIC_WEDGE
;
return
VTK_QUADRATIC_WEDGE
;
break
;
case
CellType
::
PRISM18
:
case
CellType
::
PRISM18
:
type
=
VTK_BIQUADRATIC_QUADRATIC_WEDGE
;
return
VTK_BIQUADRATIC_QUADRATIC_WEDGE
;
break
;
case
CellType
::
PYRAMID5
:
case
CellType
::
PYRAMID5
:
type
=
VTK_PYRAMID
;
return
VTK_PYRAMID
;
break
;
case
CellType
::
PYRAMID13
:
case
CellType
::
PYRAMID13
:
type
=
VTK_QUADRATIC_PYRAMID
;
return
VTK_QUADRATIC_PYRAMID
;
break
;
default:
return
-
1
;
}
}
return
type
;
}
}
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