Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
7ed8db61
Commit
7ed8db61
authored
17 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
work on node view
parent
b89fb25a
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Post/PViewDataGModel.cpp
+29
-19
29 additions, 19 deletions
Post/PViewDataGModel.cpp
Post/PViewDataGModel.h
+1
-0
1 addition, 0 deletions
Post/PViewDataGModel.h
Post/PViewDataList.h
+1
-1
1 addition, 1 deletion
Post/PViewDataList.h
with
31 additions
and
20 deletions
Post/PViewDataGModel.cpp
+
29
−
19
View file @
7ed8db61
// $Id: PViewDataGModel.cpp,v 1.1
5
2008-02-24 1
6:18:19
geuzaine Exp $
// $Id: PViewDataGModel.cpp,v 1.1
6
2008-02-24 1
7:23:20
geuzaine Exp $
//
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -23,14 +23,21 @@
//
#include
"PViewDataGModel.h"
#include
"MElement.h"
#include
"Message.h"
PViewDataGModel
::
PViewDataGModel
(
GModel
*
model
)
:
_model
(
model
)
{
// store linear vector of GEntities so we can index in them
// efficiently
for
(
GModel
::
eiter
it
=
_model
->
firstEdge
();
it
!=
_model
->
lastEdge
();
++
it
)
_entities
.
push_back
(
*
it
);
for
(
GModel
::
fiter
it
=
_model
->
firstFace
();
it
!=
_model
->
lastFace
();
++
it
)
_entities
.
push_back
(
*
it
);
for
(
GModel
::
riter
it
=
_model
->
firstRegion
();
it
!=
_model
->
lastRegion
();
++
it
)
_entities
.
push_back
(
*
it
);
/*
store linear vector of GEntity* (index in that vector used for
all element access later)
create a vector (one entry per time step) of
class data{
...
...
@@ -65,7 +72,6 @@ PViewDataGModel::PViewDataGModel(GModel *model) : _model(model)
PViewDataGModel
::~
PViewDataGModel
()
{
}
double
PViewDataGModel
::
getTime
(
int
step
)
...
...
@@ -85,29 +91,31 @@ double PViewDataGModel::getMax(int step)
int
PViewDataGModel
::
getNumEntities
()
{
return
0
;
return
_entities
.
size
()
;
}
int
PViewDataGModel
::
getNumElements
(
int
ent
)
{
if
(
ent
<
0
)
return
_model
->
getNumMeshElements
();
else
return
0
;
// TODO
if
(
ent
<
0
)
return
_model
->
getNumMeshElements
();
return
_entities
[
ent
]
->
getNumMeshElements
();
}
int
PViewDataGModel
::
getDimension
(
int
ent
,
int
ele
)
{
return
0
;
return
_entities
[
ent
]
->
getMeshElement
(
ele
)
->
getDim
();
}
int
PViewDataGModel
::
getNumNodes
(
int
ent
,
int
ele
)
{
return
0
;
return
_entities
[
ent
]
->
getMeshElement
(
ele
)
->
getNumVertices
();
}
void
PViewDataGModel
::
getNode
(
int
ent
,
int
ele
,
int
nod
,
double
&
x
,
double
&
y
,
double
&
z
)
{
MVertex
*
v
=
_entities
[
ent
]
->
getMeshElement
(
ele
)
->
getVertex
(
nod
);
x
=
v
->
x
();
y
=
v
->
y
();
z
=
v
->
z
();
}
int
PViewDataGModel
::
getNumComponents
(
int
ent
,
int
ele
)
...
...
@@ -115,36 +123,38 @@ int PViewDataGModel::getNumComponents(int ent, int ele)
return
1
;
}
void
PViewDataGModel
::
getValue
(
int
ent
,
int
ele
,
int
nod
e
,
int
comp
,
int
step
,
double
&
val
)
void
PViewDataGModel
::
getValue
(
int
ent
,
int
ele
,
int
nod
,
int
comp
,
int
step
,
double
&
val
)
{
MVertex
*
v
=
_entities
[
ent
]
->
getMeshElement
(
ele
)
->
getVertex
(
nod
);
val
=
v
->
x
()
*
v
->
y
()
*
v
->
z
();
}
int
PViewDataGModel
::
getNumEdges
(
int
ent
,
int
ele
)
{
return
0
;
return
_entities
[
ent
]
->
getMeshElement
(
ele
)
->
getNumEdges
();
}
bool
PViewDataGModel
::
skipEntity
(
int
ent
)
{
return
false
;
return
!
_entities
[
ent
]
->
getVisibility
()
;
}
bool
PViewDataGModel
::
skipElement
(
int
ent
,
int
ele
)
{
return
false
;
return
!
_entities
[
ent
]
->
getMeshElement
(
ele
)
->
getVisibility
()
;
}
bool
PViewDataGModel
::
readMSH
(
FILE
*
fp
)
{
Msg
(
INFO
,
"Filling PViewDataGModel..."
);
MVertex
*
v
=
_model
->
getMeshVertexByTag
(
10
);
MVertex
*
v
=
_model
->
getMeshVertexByTag
(
10
);
if
(
v
){
printf
(
"vertex 10 in mesh is %p
\n
"
,
v
);
}
return
false
;
finalize
();
return
true
;
}
bool
PViewDataGModel
::
writePOS
(
std
::
string
name
,
bool
binary
,
bool
parsed
,
...
...
This diff is collapsed.
Click to expand it.
Post/PViewDataGModel.h
+
1
−
0
View file @
7ed8db61
...
...
@@ -29,6 +29,7 @@
class
PViewDataGModel
:
public
PViewData
{
private:
GModel
*
_model
;
std
::
vector
<
GEntity
*>
_entities
;
PViewDataList
*
_cloneToList
();
// create old-style data from this
public:
PViewDataGModel
(
GModel
*
model
);
...
...
This diff is collapsed.
Click to expand it.
Post/PViewDataList.h
+
1
−
1
View file @
7ed8db61
...
...
@@ -98,7 +98,7 @@ class PViewDataList : public PViewData {
int
getNumNodes
(
int
ent
,
int
ele
);
void
getNode
(
int
ent
,
int
ele
,
int
nod
,
double
&
x
,
double
&
y
,
double
&
z
);
int
getNumComponents
(
int
ent
,
int
ele
);
void
getValue
(
int
ent
,
int
ele
,
int
nod
e
,
int
comp
,
int
step
,
double
&
val
);
void
getValue
(
int
ent
,
int
ele
,
int
nod
,
int
comp
,
int
step
,
double
&
val
);
int
getNumEdges
(
int
ent
,
int
ele
);
int
getNumStrings2D
(){
return
NbT2
;
}
int
getNumStrings3D
(){
return
NbT3
;
}
...
...
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