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
076d13f3
Commit
076d13f3
authored
17 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
progress on new post-pro
parent
ae8754f8
No related branches found
No related tags found
No related merge requests found
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Post/PViewData.h
+15
-10
15 additions, 10 deletions
Post/PViewData.h
Post/PViewOptions.cpp
+25
-2
25 additions, 2 deletions
Post/PViewOptions.cpp
Post/PViewOptions.h
+4
-2
4 additions, 2 deletions
Post/PViewOptions.h
with
44 additions
and
14 deletions
Post/PViewData.h
+
15
−
10
View file @
076d13f3
...
@@ -31,13 +31,18 @@
...
@@ -31,13 +31,18 @@
// abstract interface to post-processing view data
// abstract interface to post-processing view data
class
PViewData
{
class
PViewData
{
private:
// flag to mark that the data is 'dirty' and should not be displayed
bool
_dirty
;
public:
public:
PViewData
(){}
PViewData
()
:
_dirty
(
true
)
{}
virtual
~
PViewData
(){}
virtual
~
PViewData
(){}
virtual
bool
getDirty
(){
return
_dirty
;
}
virtual
void
setDirty
(
bool
val
){
_dirty
=
val
;
}
virtual
void
finalize
(){}
virtual
void
finalize
(){}
virtual
int
getNumTimeSteps
()
=
0
;
virtual
int
getNumTimeSteps
()
=
0
;
virtual
int
getMin
(
int
step
=-
1
)
=
0
;
virtual
double
getMin
(
int
step
=-
1
)
=
0
;
virtual
int
getMax
(
int
step
=-
1
)
=
0
;
virtual
double
getMax
(
int
step
=-
1
)
=
0
;
virtual
SBoundingBox3d
getBoundingBox
()
=
0
;
virtual
SBoundingBox3d
getBoundingBox
()
=
0
;
virtual
int
getNumPoints
(){
return
0
;
}
virtual
int
getNumPoints
(){
return
0
;
}
virtual
int
getNumLines
(){
return
0
;
}
virtual
int
getNumLines
(){
return
0
;
}
...
@@ -53,7 +58,7 @@ class PViewData {
...
@@ -53,7 +58,7 @@ class PViewData {
virtual
int
getNumNodes
(
int
ele
)
=
0
;
virtual
int
getNumNodes
(
int
ele
)
=
0
;
virtual
void
getNode
(
int
ele
,
int
nod
,
double
&
x
,
double
&
y
,
double
&
z
)
=
0
;
virtual
void
getNode
(
int
ele
,
int
nod
,
double
&
x
,
double
&
y
,
double
&
z
)
=
0
;
virtual
int
getNumComponents
(
int
ele
)
=
0
;
virtual
int
getNumComponents
(
int
ele
)
=
0
;
virtual
void
getValue
(
int
ele
,
int
node
,
int
ste
p
,
int
com
p
,
double
&
val
)
=
0
;
virtual
void
getValue
(
int
ele
,
int
node
,
int
com
p
,
int
ste
p
,
double
&
val
)
=
0
;
virtual
bool
read
(
std
::
string
filename
){}
virtual
bool
read
(
std
::
string
filename
){}
};
};
...
@@ -101,8 +106,8 @@ class PViewDataList : public PViewData {
...
@@ -101,8 +106,8 @@ class PViewDataList : public PViewData {
~
PViewDataList
();
~
PViewDataList
();
void
finalize
();
void
finalize
();
int
getNumTimeSteps
(){
return
NbTimeStep
;
}
int
getNumTimeSteps
(){
return
NbTimeStep
;
}
int
getMin
(
int
step
=-
1
)
{
return
Min
;
}
double
getMin
(
int
step
=-
1
)
;
int
getMax
(
int
step
=-
1
)
{
return
Max
;
}
double
getMax
(
int
step
=-
1
)
;
SBoundingBox3d
getBoundingBox
(){
return
BBox
;
}
SBoundingBox3d
getBoundingBox
(){
return
BBox
;
}
int
getNumPoints
(){
return
NbSP
+
NbVP
+
NbTP
;
}
int
getNumPoints
(){
return
NbSP
+
NbVP
+
NbTP
;
}
int
getNumLines
(){
return
NbSL
+
NbVL
+
NbTL
;
}
int
getNumLines
(){
return
NbSL
+
NbVL
+
NbTL
;
}
...
@@ -122,7 +127,7 @@ class PViewDataList : public PViewData {
...
@@ -122,7 +127,7 @@ class PViewDataList : public PViewData {
int
getNumNodes
(
int
ele
);
int
getNumNodes
(
int
ele
);
void
getNode
(
int
ele
,
int
nod
,
double
&
x
,
double
&
y
,
double
&
z
);
void
getNode
(
int
ele
,
int
nod
,
double
&
x
,
double
&
y
,
double
&
z
);
int
getNumComponents
(
int
ele
);
int
getNumComponents
(
int
ele
);
void
getValue
(
int
ele
,
int
node
,
int
ste
p
,
int
com
p
,
double
&
val
);
void
getValue
(
int
ele
,
int
node
,
int
com
p
,
int
ste
p
,
double
&
val
);
bool
read
(
std
::
string
filename
);
bool
read
(
std
::
string
filename
);
};
};
...
@@ -135,15 +140,15 @@ class PViewDataGModel : public PViewData {
...
@@ -135,15 +140,15 @@ class PViewDataGModel : public PViewData {
PViewDataGModel
(){}
PViewDataGModel
(){}
~
PViewDataGModel
(){}
~
PViewDataGModel
(){}
int
getNumTimeSteps
(){
return
1
;
}
int
getNumTimeSteps
(){
return
1
;
}
int
getMin
(
int
step
=-
1
){
return
0.
;
}
double
getMin
(
int
step
=-
1
){
return
0.
;
}
int
getMax
(
int
step
=-
1
){
return
1.
;
}
double
getMax
(
int
step
=-
1
){
return
1.
;
}
SBoundingBox3d
getBoundingBox
(){
return
SBoundingBox3d
();
}
SBoundingBox3d
getBoundingBox
(){
return
SBoundingBox3d
();
}
int
getNumElements
(){
return
_model
->
numElements
();
}
int
getNumElements
(){
return
_model
->
numElements
();
}
int
getDimension
(
int
ele
){
return
0
;
}
int
getDimension
(
int
ele
){
return
0
;
}
int
getNumNodes
(
int
ele
){
return
0
;
}
int
getNumNodes
(
int
ele
){
return
0
;
}
void
getNode
(
int
ele
,
int
nod
,
double
&
x
,
double
&
y
,
double
&
z
){}
void
getNode
(
int
ele
,
int
nod
,
double
&
x
,
double
&
y
,
double
&
z
){}
int
getNumComponents
(
int
ele
){
return
1
;
}
int
getNumComponents
(
int
ele
){
return
1
;
}
void
getValue
(
int
ele
,
int
node
,
int
ste
p
,
int
com
p
,
double
&
val
){}
void
getValue
(
int
ele
,
int
node
,
int
com
p
,
int
ste
p
,
double
&
val
){}
};
};
#endif
#endif
This diff is collapsed.
Click to expand it.
Post/PViewOptions.cpp
+
25
−
2
View file @
076d13f3
// $Id: PViewOptions.cpp,v 1.
1
2007-08-2
1 19:05:43
geuzaine Exp $
// $Id: PViewOptions.cpp,v 1.
2
2007-08-2
4 20:14:19
geuzaine Exp $
//
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -72,5 +72,28 @@ PViewOptions::PViewOptions()
...
@@ -72,5 +72,28 @@ PViewOptions::PViewOptions()
UseGenRaise
=
0
;
UseGenRaise
=
0
;
GenRaiseFactor
=
0.
;
GenRaiseFactor
=
0.
;
GmshColorTable
CT
;
ColorTable_InitParam
(
2
,
&
CT
);
ColorTable_Recompute
(
&
CT
);
}
// val in [min, max]
unsigned
int
PViewOptions
::
getColor
(
double
val
,
double
min
,
double
max
)
{
//int index = v->GIFV(min, max, v->CT.size, val);
if
(
CT
.
size
==
1
)
return
CT
.
table
[
0
];
int
index
=
(
min
==
max
)
?
CT
.
size
/
2
:
(
int
)((
val
-
min
)
*
(
CT
.
size
-
1
)
/
(
max
-
min
));
return
CT
.
table
[
index
];
}
// i in [0, nb - 1]
unsigned
int
PViewOptions
::
getColor
(
int
i
,
int
nb
)
{
int
index
=
(
nb
==
1
)
?
CT
.
size
/
2
:
(
int
)(
i
/
(
double
)(
nb
-
1
)
*
(
CT
.
size
-
1
)
+
0.5
);
return
CT
.
table
[
index
];
}
}
This diff is collapsed.
Click to expand it.
Post/PViewOptions.h
+
4
−
2
View file @
076d13f3
...
@@ -63,7 +63,7 @@ class PViewOptions {
...
@@ -63,7 +63,7 @@ class PViewOptions {
enum
RangeType
{
enum
RangeType
{
Default
,
Default
,
Custom
,
Custom
,
PerStep
Per
Time
Step
};
};
enum
ScaleType
{
enum
ScaleType
{
Linear
,
Linear
,
...
@@ -77,7 +77,7 @@ class PViewOptions {
...
@@ -77,7 +77,7 @@ class PViewOptions {
int
Axes
,
AxesAutoPosition
,
AxesTics
[
3
];
int
Axes
,
AxesAutoPosition
,
AxesTics
[
3
];
char
AxesFormat
[
3
][
256
],
AxesLabel
[
3
][
256
];
char
AxesFormat
[
3
][
256
],
AxesLabel
[
3
][
256
];
double
AxesPosition
[
6
];
double
AxesPosition
[
6
];
double
CustomMin
,
CustomMax
;
double
CustomMin
,
CustomMax
,
TmpMin
,
TmpMax
;
double
Offset
[
3
],
Raise
[
3
],
Transform
[
3
][
3
],
DisplacementFactor
,
Explode
;
double
Offset
[
3
],
Raise
[
3
],
Transform
[
3
][
3
],
DisplacementFactor
,
Explode
;
double
ArrowSize
,
ArrowRelHeadRadius
,
ArrowRelStemRadius
,
ArrowRelStemLength
;
double
ArrowSize
,
ArrowRelHeadRadius
,
ArrowRelStemRadius
,
ArrowRelStemLength
;
double
Normals
,
Tangents
;
double
Normals
,
Tangents
;
...
@@ -113,6 +113,8 @@ class PViewOptions {
...
@@ -113,6 +113,8 @@ class PViewOptions {
// static reference container that contains default values
// static reference container that contains default values
static
PViewOptions
reference
;
static
PViewOptions
reference
;
PViewOptions
();
PViewOptions
();
unsigned
int
getColor
(
int
i
,
int
nb
);
unsigned
int
getColor
(
double
val
,
double
min
,
double
max
);
};
};
#endif
#endif
This diff is collapsed.
Click to expand it.
Prev
1
2
Next
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