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
aa2cff58
Commit
aa2cff58
authored
16 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
added some comments
parent
f40fd316
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Post/PViewData.cpp
+2
-2
2 additions, 2 deletions
Post/PViewData.cpp
Post/PViewData.h
+20
-4
20 additions, 4 deletions
Post/PViewData.h
Post/adaptiveData.cpp
+5
-5
5 additions, 5 deletions
Post/adaptiveData.cpp
with
27 additions
and
11 deletions
Post/PViewData.cpp
+
2
−
2
View file @
aa2cff58
// $Id: PViewData.cpp,v 1.1
8
2008-04-22 0
7:37:16
geuzaine Exp $
// $Id: PViewData.cpp,v 1.1
9
2008-04-22 0
9:29:29
geuzaine Exp $
//
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -40,7 +40,7 @@ PViewData::~PViewData()
bool
PViewData
::
finalize
()
{
if
(
!
_adaptive
&&
_interpolation
.
size
()){
Msg
(
INFO
,
"Initializing adaptive data %p interp size=
%d"
,
Msg
(
INFO
,
"Initializing adaptive data %p interp size=%d"
,
this
,
_interpolation
.
size
());
_adaptive
=
new
adaptiveData
(
this
);
_adaptive
->
initWithLowResolution
(
0
);
...
...
This diff is collapsed.
Click to expand it.
Post/PViewData.h
+
20
−
4
View file @
aa2cff58
...
...
@@ -101,10 +101,11 @@ class PViewData {
// Returns the number of values available for the ele-th element
// in the ent-th entity
virtual
int
getNumValues
(
int
step
,
int
ent
,
int
ele
)
=
0
;
// Gets the idx'th value for the ele-th element in the ent-th entity
virtual
void
getValue
(
int
step
,
int
ent
,
int
ele
,
int
idx
,
double
&
val
)
=
0
;
// Gets/sets the comp-th component (at the step-th time step)
// associated with the node-th node from the ele-th element in the
// ent-th entity
virtual
void
getValue
(
int
step
,
int
ent
,
int
ele
,
int
idx
,
double
&
val
)
=
0
;
virtual
void
getValue
(
int
step
,
int
ent
,
int
ele
,
int
nod
,
int
comp
,
double
&
val
)
=
0
;
virtual
void
setValue
(
int
step
,
int
ent
,
int
ele
,
int
nod
,
int
comp
,
double
val
);
// Returns a scalar value (same as value for scalars, norm for
...
...
@@ -114,32 +115,47 @@ class PViewData {
// Returns the number of edges of the ele-th element in the ent-th
// entity
virtual
int
getNumEdges
(
int
step
,
int
ent
,
int
ele
)
=
0
;
// Returns the number of 2D/3D strings in the view
virtual
int
getNumStrings2D
(){
return
0
;
}
virtual
int
getNumStrings3D
(){
return
0
;
}
// Returns the i-th 2D/3D string in the view
virtual
void
getString2D
(
int
i
,
int
step
,
std
::
string
&
str
,
double
&
x
,
double
&
y
,
double
&
style
){}
virtual
void
getString3D
(
int
i
,
int
step
,
std
::
string
&
str
,
double
&
x
,
double
&
y
,
double
&
z
,
double
&
style
){}
// Change the orientation of the ele-th element
virtual
void
revertElement
(
int
step
,
int
ent
,
int
ele
){}
// Cheks if the view is empty
virtual
bool
empty
();
virtual
void
smooth
(){}
virtual
bool
combineTime
(
nameData
&
nd
){
return
false
;
}
virtual
bool
combineSpace
(
nameData
&
nd
){
return
false
;
}
// Cheks if we should skip the ent-th entity
virtual
bool
skipEntity
(
int
step
,
int
ent
){
return
false
;
}
// Cheks if we should skip the ele-th entity
virtual
bool
skipElement
(
int
step
,
int
ent
,
int
ele
,
bool
checkVisibility
=
false
){
return
false
;
}
virtual
bool
hasTimeStep
(
int
step
){
return
step
<
getNumTimeSteps
();
}
virtual
bool
hasPartition
(
int
part
){
return
false
;
}
virtual
bool
hasMultipleMeshes
(){
return
false
;
}
virtual
bool
hasModel
(
GModel
*
model
,
int
step
=-
1
){
return
false
;
}
virtual
bool
useGaussPoints
(){
return
false
;
}
// check if the view is adaptive
bool
isAdaptive
(){
return
_adaptive
?
true
:
false
;
}
// return the adaptive data
adaptiveData
*
getAdaptiveData
(){
return
_adaptive
;
}
// set/get the interpolation matrices for elements with "type"
// number of edges
void
setInterpolationScheme
(
int
type
,
List_T
*
coef
,
List_T
*
pol
,
List_T
*
coefGeo
=
0
,
List_T
*
polGeo
=
0
);
int
getInterpolationScheme
(
int
type
,
std
::
vector
<
List_T
*>
&
p
);
// Smoothes the data in the view (makes it C0)
virtual
void
smooth
(){}
virtual
bool
combineTime
(
nameData
&
nd
){
return
false
;
}
virtual
bool
combineSpace
(
nameData
&
nd
){
return
false
;
}
// I/O routines
virtual
bool
writeSTL
(
std
::
string
fileName
);
virtual
bool
writeTXT
(
std
::
string
fileName
);
...
...
This diff is collapsed.
Click to expand it.
Post/adaptiveData.cpp
+
5
−
5
View file @
aa2cff58
...
...
@@ -897,9 +897,10 @@ void adaptiveElements<T>::initWithLowResolution(PViewData *data, int step)
template
<
class
T
>
void
adaptiveElements
<
T
>::
changeResolution
(
int
level
,
double
tol
,
GMSH_Post_Plugin
*
plug
)
{
if
(
!
_val
)
return
;
// error
//if(level == _resolutionLevel && tol == _tolerance && !plug) return;
if
(
!
_val
){
Msg
(
GERROR
,
"Trying to change resolution in wrong state"
);
return
;
}
_resolutionLevel
=
level
;
_tolerance
=
tol
;
...
...
@@ -1026,11 +1027,10 @@ int adaptiveElements<T>::_zoomElement(int ielem, int level, GMSH_Post_Plugin *pl
return
0
;
}
adaptivePoint
**
p
;
for
(
typename
std
::
list
<
T
*>::
iterator
it
=
T
::
all
.
begin
();
it
!=
T
::
all
.
end
();
it
++
){
if
((
*
it
)
->
visible
){
p
=
(
*
it
)
->
p
;
adaptivePoint
**
p
=
(
*
it
)
->
p
;
for
(
int
k
=
0
;
k
<
T
::
numNodes
;
++
k
)
List_Add
(
_listEle
,
&
p
[
k
]
->
X
);
for
(
int
k
=
0
;
k
<
T
::
numNodes
;
++
k
)
List_Add
(
_listEle
,
&
p
[
k
]
->
Y
);
for
(
int
k
=
0
;
k
<
T
::
numNodes
;
++
k
)
List_Add
(
_listEle
,
&
p
[
k
]
->
Z
);
...
...
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