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
Package registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Romin Tomasetti
gmsh
Commits
fcc5b266
Commit
fcc5b266
authored
6 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
https://gitlab.onelab.info/gmsh/gmsh
parents
3f6d4bd0
5ec9bb74
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Post/PViewDataGModel.cpp
+2
-2
2 additions, 2 deletions
Post/PViewDataGModel.cpp
Post/PViewDataGModel.h
+6
-6
6 additions, 6 deletions
Post/PViewDataGModel.h
Post/PViewDataGModelIO.cpp
+7
-7
7 additions, 7 deletions
Post/PViewDataGModelIO.cpp
doc/texinfo/api.texi
+20
-16
20 additions, 16 deletions
doc/texinfo/api.texi
with
35 additions
and
31 deletions
Post/PViewDataGModel.cpp
+
2
−
2
View file @
fcc5b266
...
...
@@ -97,7 +97,7 @@ bool PViewDataGModel::finalize(bool computeMinMax,
if
(
_type
==
NodeData
||
_type
==
ElementData
)
{
// treat these 2 special cases separately for maximum efficiency
int
numComp
=
_steps
[
step
]
->
getNumComponents
();
for
(
in
t
i
=
0
;
i
<
_steps
[
step
]
->
getNumData
();
i
++
)
{
for
(
std
::
size_
t
i
=
0
;
i
<
_steps
[
step
]
->
getNumData
();
i
++
)
{
double
*
d
=
_steps
[
step
]
->
getData
(
i
);
if
(
d
)
{
double
val
=
ComputeScalarRep
(
numComp
,
d
,
tensorRep
);
...
...
@@ -737,7 +737,7 @@ void PViewDataGModel::smooth()
}
}
}
for
(
in
t
i
=
0
;
i
<
_steps2
.
back
()
->
getNumData
();
i
++
)
{
for
(
std
::
size_
t
i
=
0
;
i
<
_steps2
.
back
()
->
getNumData
();
i
++
)
{
double
*
d
=
_steps2
.
back
()
->
getData
(
i
);
if
(
d
)
{
double
f
=
nodeConnect
[
i
];
...
...
This diff is collapsed.
Click to expand it.
Post/PViewDataGModel.h
+
6
−
6
View file @
fcc5b266
...
...
@@ -68,9 +68,9 @@ public:
_max
=
other
.
_max
;
_numComp
=
other
.
_numComp
;
if
(
other
.
_data
)
{
in
t
n
=
other
.
getNumData
();
std
::
size_
t
n
=
other
.
getNumData
();
_data
=
new
std
::
vector
<
Real
*>
(
n
,
(
Real
*
)
0
);
for
(
in
t
i
=
0
;
i
<
n
;
i
++
)
{
for
(
std
::
size_
t
i
=
0
;
i
<
n
;
i
++
)
{
Real
*
d
=
other
.
getData
(
i
);
if
(
d
)
{
int
m
=
other
.
getMult
(
i
)
*
_numComp
;
...
...
@@ -106,7 +106,7 @@ public:
void
setMin
(
double
min
)
{
_min
=
min
;
}
double
getMax
()
{
return
_max
;
}
void
setMax
(
double
max
)
{
_max
=
max
;
}
in
t
getNumData
()
std
::
size_
t
getNumData
()
{
if
(
!
_data
)
return
0
;
return
_data
->
size
();
...
...
@@ -120,7 +120,7 @@ public:
{
if
(
index
<
0
)
return
0
;
if
(
allocIfNeeded
)
{
if
(
index
>=
getNumData
())
resizeData
(
index
+
100
);
// optimize this
if
(
index
>=
(
int
)
getNumData
())
resizeData
(
index
+
100
);
// optimize this
if
(
!
(
*
_data
)[
index
])
{
(
*
_data
)[
index
]
=
new
Real
[
_numComp
*
mult
];
for
(
int
i
=
0
;
i
<
_numComp
*
mult
;
i
++
)
(
*
_data
)[
index
][
i
]
=
0.
;
...
...
@@ -132,7 +132,7 @@ public:
}
}
else
{
if
(
index
>=
getNumData
())
return
0
;
if
(
index
>=
(
int
)
getNumData
())
return
0
;
}
return
(
*
_data
)[
index
];
}
...
...
@@ -154,7 +154,7 @@ public:
double
getMemoryInMb
()
{
double
b
=
0.
;
for
(
in
t
i
=
0
;
i
<
getNumData
();
i
++
)
b
+=
getMult
(
i
);
for
(
std
::
size_
t
i
=
0
;
i
<
getNumData
();
i
++
)
b
+=
getMult
(
i
);
return
b
*
getNumComponents
()
*
sizeof
(
Real
)
/
1024.
/
1024.
;
}
};
...
...
This diff is collapsed.
Click to expand it.
Post/PViewDataGModelIO.cpp
+
7
−
7
View file @
fcc5b266
...
...
@@ -249,7 +249,7 @@ bool PViewDataGModel::writeMSH(const std::string &fileName, double version,
for
(
std
::
size_t
step
=
0
;
step
<
_steps
.
size
();
step
++
)
{
int
numEnt
=
0
,
numComp
=
_steps
[
step
]
->
getNumComponents
();
for
(
in
t
i
=
0
;
i
<
_steps
[
step
]
->
getNumData
();
i
++
)
for
(
std
::
size_
t
i
=
0
;
i
<
_steps
[
step
]
->
getNumData
();
i
++
)
if
(
_steps
[
step
]
->
getData
(
i
))
numEnt
++
;
if
(
numEnt
)
{
if
(
_type
==
NodeData
)
{
...
...
@@ -261,7 +261,7 @@ bool PViewDataGModel::writeMSH(const std::string &fileName, double version,
partitionNum
);
else
fprintf
(
fp
,
"3
\n
%lu
\n
%d
\n
%d
\n
"
,
step
,
numComp
,
numEnt
);
for
(
in
t
i
=
0
;
i
<
_steps
[
step
]
->
getNumData
();
i
++
)
{
for
(
std
::
size_
t
i
=
0
;
i
<
_steps
[
step
]
->
getNumData
();
i
++
)
{
if
(
_steps
[
step
]
->
getData
(
i
))
{
MVertex
*
v
=
_steps
[
step
]
->
getModel
()
->
getMeshVertexByTag
(
i
);
if
(
!
v
)
{
...
...
@@ -302,7 +302,7 @@ bool PViewDataGModel::writeMSH(const std::string &fileName, double version,
partitionNum
);
else
fprintf
(
fp
,
"3
\n
%lu
\n
%d
\n
%d
\n
"
,
step
,
numComp
,
numEnt
);
for
(
in
t
i
=
0
;
i
<
_steps
[
step
]
->
getNumData
();
i
++
)
{
for
(
std
::
size_
t
i
=
0
;
i
<
_steps
[
step
]
->
getNumData
();
i
++
)
{
if
(
_steps
[
step
]
->
getData
(
i
))
{
MElement
*
e
=
model
->
getMeshElementByTag
(
i
);
if
(
!
e
)
{
...
...
@@ -926,7 +926,7 @@ bool PViewDataGModel::writeMED(const std::string &fileName)
// compute profile
char
*
profileName
=
(
char
*
)
"nodeProfile"
;
std
::
vector
<
med_int
>
profile
,
indices
;
for
(
in
t
i
=
0
;
i
<
_steps
[
0
]
->
getNumData
();
i
++
)
{
for
(
std
::
size_
t
i
=
0
;
i
<
_steps
[
0
]
->
getNumData
();
i
++
)
{
if
(
_steps
[
0
]
->
getData
(
i
))
{
MVertex
*
v
=
_steps
[
0
]
->
getModel
()
->
getMeshVertexByTag
(
i
);
if
(
!
v
)
{
...
...
@@ -981,7 +981,7 @@ bool PViewDataGModel::writeMED(const std::string &fileName)
}
for
(
std
::
size_t
step
=
0
;
step
<
_steps
.
size
();
step
++
)
{
std
::
size_t
n
=
0
;
for
(
in
t
i
=
0
;
i
<
_steps
[
step
]
->
getNumData
();
i
++
)
for
(
std
::
size_
t
i
=
0
;
i
<
_steps
[
step
]
->
getNumData
();
i
++
)
if
(
_steps
[
step
]
->
getData
(
i
))
n
++
;
if
(
n
!=
profile
.
size
()
||
numComp
!=
_steps
[
step
]
->
getNumComponents
())
{
Msg
::
Error
(
"Skipping incompatible step"
);
...
...
@@ -1049,7 +1049,7 @@ void PViewDataGModel::sendToServer(const std::string &name)
for
(
std
::
size_t
step
=
0
;
step
<
_steps
.
size
();
step
++
)
{
int
nc
=
_steps
[
step
]
->
getNumComponents
();
int
ne
=
0
;
for
(
in
t
i
=
0
;
i
<
_steps
[
step
]
->
getNumData
();
i
++
)
for
(
std
::
size_
t
i
=
0
;
i
<
_steps
[
step
]
->
getNumData
();
i
++
)
if
(
_steps
[
step
]
->
getData
(
i
))
ne
++
;
if
(
!
step
){
numEnt
=
ne
;
...
...
@@ -1066,7 +1066,7 @@ void PViewDataGModel::sendToServer(const std::string &name)
std
::
vector
<
double
>
exp
;
exp
.
push_back
(
numEnt
);
for
(
in
t
i
=
0
;
i
<
_steps
[
0
]
->
getNumData
();
i
++
)
{
for
(
std
::
size_
t
i
=
0
;
i
<
_steps
[
0
]
->
getNumData
();
i
++
)
{
if
(
_steps
[
0
]
->
getData
(
i
))
{
MVertex
*
v
=
_steps
[
0
]
->
getModel
()
->
getMeshVertexByTag
(
i
);
if
(
!
v
)
{
...
...
This diff is collapsed.
Click to expand it.
doc/texinfo/api.texi
+
20
−
16
View file @
fcc5b266
...
...
@@ -738,7 +738,7 @@ length of @code{nodeTags} that contains the x, y, z coordinates of the nodes,
concatenated: [n1x, n1y, n1z, n2x, ...]. The optional @code{parametricCoord}
vector contains the parametric coordinates of the nodes, if any. The length of
@code{parametricCoord} can be 0 or @code{dim} times the length of
@code{nodeTags}. If the @code{nodeTag} vector is empty, new tags are
@code{nodeTags}. If the @code{nodeTag
s
} vector is empty, new tags are
automatically assigned to the nodes.
@table @asis
...
...
@@ -1052,16 +1052,17 @@ if @code{getBarycenters} is called with @code{numTasks} > 1.
@item getElementEdgeNodes
Get the nodes on the edges of all elements of type @code{elementType} classified
on the entity of tag @code{tag}. If @code{primary} is set, only the primary
(begin/end) nodes of the edges are returned. If @code{tag} < 0, get the edge
nodes for all entities. If @code{numTasks} > 1, only compute and return the part
of the data indexed by @code{task}.
on the entity of tag @code{tag}. @code{nodeTags} contains the node tags. If
@code{primary} is set, only the primary (begin/end) nodes of the edges are
returned. If @code{tag} < 0, get the edge nodes for all entities. If
@code{numTasks} > 1, only compute and return the part of the data indexed by
@code{task}.
@table @asis
@item Input:
@code{elementType}, @code{tag}, @code{primary}, @code{task}, @code{numTasks}
@item Output:
@code{nodes}
@code{node
Tag
s}
@item Return:
-
@end table
...
...
@@ -1069,16 +1070,17 @@ of the data indexed by @code{task}.
@item getElementFaceNodes
Get the nodes on the faces of type @code{faceType} (3 for triangular faces, 4
for quadrangular faces) of all elements of type @code{elementType} classified on
the entity of tag @code{tag}. If @code{primary} is set, only the primary
(corner) nodes of the faces are returned. If @code{tag} < 0, get the face nodes
for all entities. If @code{numTasks} > 1, only compute and return the part of
the data indexed by @code{task}.
the entity of tag @code{tag}. @code{nodeTags} contains the node tags. If
@code{primary} is set, only the primary (corner) nodes of the faces are
returned. If @code{tag} < 0, get the face nodes for all entities. If
@code{numTasks} > 1, only compute and return the part of the data indexed by
@code{task}.
@table @asis
@item Input:
@code{elementType}, @code{faceType}, @code{tag}, @code{primary}, @code{task}, @code{numTasks}
@item Output:
@code{nodes}
@code{node
Tag
s}
@item Return:
-
@end table
...
...
@@ -1282,14 +1284,16 @@ matrix, by row). Currently only available for @code{dim} == 1 and @code{dim} ==
@end table
@item getPeriodicNodes
Get the master entity, periodic node pairs and affine transform for the entity
of dimension @code{dim} and tag @code{tag}.
Get the master entity @code{tagMaster}, the node tags @code{nodeTags} and their
corresponding master node tags @code{nodeTagsMaster}, and the affine transform
@code{affineTransform} for the entity of dimension @code{dim} and tag
@code{tag}.
@table @asis
@item Input:
@code{dim}, @code{tag}
@item Output:
@code{tagMaster}, @code{node
s
}, @code{affineTransform}
@code{tagMaster}, @code{node
Tags}, @code{nodeTagsMaster
}, @code{affineTransform}
@item Return:
-
@end table
...
...
@@ -2995,7 +2999,7 @@ Select elements in the user interface.
@item Input:
-
@item Output:
@code{
t
ags}
@code{
elementT
ags}
@item Return:
integer value
@end table
...
...
@@ -3007,7 +3011,7 @@ Select views in the user interface.
@item Input:
-
@item Output:
@code{
t
ags}
@code{
viewT
ags}
@item Return:
integer value
@end table
...
...
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