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
b820ae47
Commit
b820ae47
authored
14 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
don't save node/element data by default
parent
09139da6
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
Geo/GModel.h
+0
-3
0 additions, 3 deletions
Geo/GModel.h
Geo/MElement.h
+3
-2
3 additions, 2 deletions
Geo/MElement.h
Geo/MVertex.cpp
+1
-1
1 addition, 1 deletion
Geo/MVertex.cpp
Geo/MVertex.h
+2
-3
2 additions, 3 deletions
Geo/MVertex.h
Post/PViewDataGModelIO.cpp
+25
-7
25 additions, 7 deletions
Post/PViewDataGModelIO.cpp
with
31 additions
and
16 deletions
Geo/GModel.h
+
0
−
3
View file @
b820ae47
...
...
@@ -353,9 +353,6 @@ class GModel
void
createTopologyFromMesh
();
void
createTopologyFromFaces
(
std
::
vector
<
discreteFace
*>
&
pFaces
);
// compute distance function
void
computeDistanceFunction
();
// a container for smooth normals
smooth_normals
*
normals
;
...
...
This diff is collapsed.
Click to expand it.
Geo/MElement.h
+
3
−
2
View file @
b820ae47
...
...
@@ -88,7 +88,8 @@ class MElement
// get the vertex using the VTK ordering
virtual
MVertex
*
getVertexVTK
(
int
num
){
return
getVertex
(
num
);
}
// get the vertex using the Nastran BDF ordering
// get the vertex using the Nastran BDF ordering
virtual
MVertex
*
getVertexBDF
(
int
num
){
return
getVertex
(
num
);
}
// get the vertex using MED ordering
...
...
@@ -164,7 +165,7 @@ class MElement
virtual
MElement
*
getDomain
(
int
i
)
const
{
return
NULL
;
}
virtual
void
setDomain
(
MElement
*
e
,
int
i
)
{
}
//get the type of the element
//
get the type of the element
virtual
int
getType
()
const
=
0
;
// get the max/min edge length
...
...
This diff is collapsed.
Click to expand it.
Geo/MVertex.cpp
+
1
−
1
View file @
b820ae47
...
...
@@ -429,7 +429,7 @@ void MVertex::registerBindings(binding *b)
cm
->
setDescription
(
"return the invariant vertex id"
);
cm
=
cb
->
addMethod
(
"getPolynomialOrder"
,
&
MVertex
::
getPolynomialOrder
);
cm
->
setDescription
(
"return the polynomial order of vertex"
);
cm
=
cb
->
addMethod
(
"setPolynomialOrder"
,
&
MVertex
::
setPolynomialOrder
_binding
);
cm
=
cb
->
addMethod
(
"setPolynomialOrder"
,
&
MVertex
::
setPolynomialOrder
);
cm
->
setDescription
(
"assign the polynomial order of vertex"
);
cm
->
setArgNames
(
"order"
,
NULL
);
}
This diff is collapsed.
Click to expand it.
Geo/MVertex.h
+
2
−
3
View file @
b820ae47
...
...
@@ -58,8 +58,7 @@ class MVertex{
// get the "polynomial order" of the vertex
inline
int
getPolynomialOrder
(){
return
_order
;
}
inline
void
setPolynomialOrder
(
char
order
){
_order
=
order
;
}
inline
void
setPolynomialOrder_binding
(
int
order
){
_order
=
order
;
}
inline
void
setPolynomialOrder
(
int
order
){
_order
=
(
char
)
order
;
}
// get/set the coordinates
inline
double
x
()
const
{
return
_x
;
}
...
...
@@ -69,7 +68,7 @@ class MVertex{
inline
double
&
y
()
{
return
_y
;
}
inline
double
&
z
()
{
return
_z
;
}
// cannot use the reference to set the value in the bindings
inline
void
setXYZ
(
double
x
,
double
y
,
double
z
)
{
_x
=
x
;
_y
=
y
;
_z
=
z
;
}
inline
void
setXYZ
(
double
x
,
double
y
,
double
z
)
{
_x
=
x
;
_y
=
y
;
_z
=
z
;
}
inline
SPoint3
point
()
const
{
return
SPoint3
(
_x
,
_y
,
_z
);
}
...
...
This diff is collapsed.
Click to expand it.
Post/PViewDataGModelIO.cpp
+
25
−
7
View file @
b820ae47
...
...
@@ -129,13 +129,31 @@ bool PViewDataGModel::writeMSH(std::string fileName, bool binary)
GModel
*
model
=
_steps
[
0
]
->
getModel
();
if
(
!
model
->
writeMSH
(
fileName
,
2.0
,
binary
))
return
false
;
// append data
FILE
*
fp
=
fopen
(
fileName
.
c_str
(),
binary
?
"ab"
:
"a"
);
if
(
!
fp
){
Msg
::
Error
(
"Unable to open file '%s'"
,
fileName
.
c_str
());
return
false
;
bool
writeNodesAndElements
=
false
;
FILE
*
fp
;
if
(
writeNodesAndElements
){
if
(
!
model
->
writeMSH
(
fileName
,
2.0
,
binary
))
return
false
;
// append data
fp
=
fopen
(
fileName
.
c_str
(),
binary
?
"ab"
:
"a"
);
if
(
!
fp
){
Msg
::
Error
(
"Unable to open file '%s'"
,
fileName
.
c_str
());
return
false
;
}
}
else
{
fp
=
fopen
(
fileName
.
c_str
(),
binary
?
"wb"
:
"w"
);
if
(
!
fp
){
Msg
::
Error
(
"Unable to open file '%s'"
,
fileName
.
c_str
());
return
false
;
}
fprintf
(
fp
,
"$MeshFormat
\n
"
);
fprintf
(
fp
,
"%g %d %d
\n
"
,
2.2
,
binary
?
1
:
0
,
(
int
)
sizeof
(
double
));
if
(
binary
){
int
one
=
1
;
fwrite
(
&
one
,
sizeof
(
int
),
1
,
fp
);
fprintf
(
fp
,
"
\n
"
);
}
fprintf
(
fp
,
"$EndMeshFormat
\n
"
);
}
for
(
unsigned
int
step
=
0
;
step
<
_steps
.
size
();
step
++
){
...
...
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