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
96da7177
Commit
96da7177
authored
15 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
remote stuff now mostly functional
parent
cd9b9aca
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
Common/GmshDaemon.cpp
+4
-2
4 additions, 2 deletions
Common/GmshDaemon.cpp
Common/VertexArray.cpp
+15
-9
15 additions, 9 deletions
Common/VertexArray.cpp
Post/PViewDataRemote.h
+1
-2
1 addition, 2 deletions
Post/PViewDataRemote.h
with
20 additions
and
13 deletions
Common/GmshDaemon.cpp
+
4
−
2
View file @
96da7177
...
@@ -12,9 +12,11 @@
...
@@ -12,9 +12,11 @@
#include
"PViewOptions.h"
#include
"PViewOptions.h"
#include
"PViewData.h"
#include
"PViewData.h"
#include
"VertexArray.h"
#include
"VertexArray.h"
#include
"Context.h"
static
void
computeAndSendVertexArrays
(
GmshClient
&
client
)
static
void
computeAndSendVertexArrays
(
GmshClient
&
client
)
{
{
CTX
::
instance
()
->
terminal
=
1
;
// debug
client
.
Info
(
"Sending vertex arrays"
);
client
.
Info
(
"Sending vertex arrays"
);
for
(
unsigned
int
i
=
0
;
i
<
PView
::
list
.
size
();
i
++
){
for
(
unsigned
int
i
=
0
;
i
<
PView
::
list
.
size
();
i
++
){
PView
*
p
=
PView
::
list
[
i
];
PView
*
p
=
PView
::
list
[
i
];
...
@@ -23,7 +25,7 @@ static void computeAndSendVertexArrays(GmshClient &client)
...
@@ -23,7 +25,7 @@ static void computeAndSendVertexArrays(GmshClient &client)
VertexArray
*
va
[
4
]
=
VertexArray
*
va
[
4
]
=
{
p
->
va_points
,
p
->
va_lines
,
p
->
va_triangles
,
p
->
va_vectors
};
{
p
->
va_points
,
p
->
va_lines
,
p
->
va_triangles
,
p
->
va_vectors
};
for
(
int
type
=
0
;
type
<
4
;
type
++
){
for
(
int
type
=
0
;
type
<
4
;
type
++
){
if
(
va
[
type
]
&&
va
[
type
]
->
getNumVertices
()
){
if
(
va
[
type
]){
int
len
;
int
len
;
char
*
str
=
va
[
type
]
->
toChar
char
*
str
=
va
[
type
]
->
toChar
(
p
->
getNum
(),
type
+
1
,
data
->
getMin
(),
data
->
getMax
(),
(
p
->
getNum
(),
type
+
1
,
data
->
getMin
(),
data
->
getMax
(),
...
@@ -79,6 +81,7 @@ int GmshDaemon(std::string socket)
...
@@ -79,6 +81,7 @@ int GmshDaemon(std::string socket)
break
;
break
;
}
}
else
if
(
type
==
GmshSocket
::
GMSH_VERTEX_ARRAY
){
else
if
(
type
==
GmshSocket
::
GMSH_VERTEX_ARRAY
){
ParseString
(
msg
);
computeAndSendVertexArrays
(
client
);
computeAndSendVertexArrays
(
client
);
}
}
else
if
(
type
==
GmshSocket
::
GMSH_MERGE_FILE
){
else
if
(
type
==
GmshSocket
::
GMSH_MERGE_FILE
){
...
@@ -87,7 +90,6 @@ int GmshDaemon(std::string socket)
...
@@ -87,7 +90,6 @@ int GmshDaemon(std::string socket)
}
}
else
if
(
type
==
GmshSocket
::
GMSH_PARSE_STRING
){
else
if
(
type
==
GmshSocket
::
GMSH_PARSE_STRING
){
ParseString
(
msg
);
ParseString
(
msg
);
computeAndSendVertexArrays
(
client
);
}
}
else
if
(
type
==
GmshSocket
::
GMSH_SPEED_TEST
){
else
if
(
type
==
GmshSocket
::
GMSH_SPEED_TEST
){
client
.
Info
(
"Sending huge array"
);
client
.
Info
(
"Sending huge array"
);
...
...
This diff is collapsed.
Click to expand it.
Common/VertexArray.cpp
+
15
−
9
View file @
96da7177
...
@@ -241,11 +241,11 @@ char *VertexArray::toChar(int num, int type, double min, double max, double time
...
@@ -241,11 +241,11 @@ char *VertexArray::toChar(int num, int type, double min, double max, double time
memcpy
(
&
bytes
[
index
],
&
ymax
,
ds
);
index
+=
ds
;
memcpy
(
&
bytes
[
index
],
&
ymax
,
ds
);
index
+=
ds
;
memcpy
(
&
bytes
[
index
],
&
zmax
,
ds
);
index
+=
ds
;
memcpy
(
&
bytes
[
index
],
&
zmax
,
ds
);
index
+=
ds
;
memcpy
(
&
bytes
[
index
],
&
vn
,
is
);
index
+=
is
;
memcpy
(
&
bytes
[
index
],
&
vn
,
is
);
index
+=
is
;
memcpy
(
&
bytes
[
index
],
&
_vertices
[
0
],
vs
);
index
+=
vs
;
if
(
vs
){
memcpy
(
&
bytes
[
index
],
&
_vertices
[
0
],
vs
);
index
+=
vs
;
}
memcpy
(
&
bytes
[
index
],
&
nn
,
is
);
index
+=
is
;
memcpy
(
&
bytes
[
index
],
&
nn
,
is
);
index
+=
is
;
memcpy
(
&
bytes
[
index
],
&
_normals
[
0
],
ns
);
index
+=
ns
;
if
(
ns
){
memcpy
(
&
bytes
[
index
],
&
_normals
[
0
],
ns
);
index
+=
ns
;
}
memcpy
(
&
bytes
[
index
],
&
cn
,
is
);
index
+=
is
;
memcpy
(
&
bytes
[
index
],
&
cn
,
is
);
index
+=
is
;
memcpy
(
&
bytes
[
index
],
&
_colors
[
0
],
cs
);
index
+=
cs
;
if
(
cs
){
memcpy
(
&
bytes
[
index
],
&
_colors
[
0
],
cs
);
index
+=
cs
;
}
return
bytes
;
return
bytes
;
}
}
...
@@ -270,14 +270,20 @@ void VertexArray::fromChar(const char *bytes)
...
@@ -270,14 +270,20 @@ void VertexArray::fromChar(const char *bytes)
double
zmax
;
memcpy
(
&
zmax
,
&
bytes
[
index
],
ds
);
index
+=
ds
;
double
zmax
;
memcpy
(
&
zmax
,
&
bytes
[
index
],
ds
);
index
+=
ds
;
int
vn
;
memcpy
(
&
vn
,
&
bytes
[
index
],
is
);
index
+=
is
;
int
vn
;
memcpy
(
&
vn
,
&
bytes
[
index
],
is
);
index
+=
is
;
_vertices
.
resize
(
vn
);
int
vs
=
vn
*
sizeof
(
float
);
if
(
vn
){
memcpy
(
&
_vertices
[
0
],
&
bytes
[
index
],
vs
);
index
+=
vs
;
_vertices
.
resize
(
vn
);
int
vs
=
vn
*
sizeof
(
float
);
memcpy
(
&
_vertices
[
0
],
&
bytes
[
index
],
vs
);
index
+=
vs
;
}
int
nn
;
memcpy
(
&
nn
,
&
bytes
[
index
],
is
);
index
+=
is
;
int
nn
;
memcpy
(
&
nn
,
&
bytes
[
index
],
is
);
index
+=
is
;
_normals
.
resize
(
nn
);
int
ns
=
nn
*
sizeof
(
char
);
if
(
nn
){
memcpy
(
&
_normals
[
0
],
&
bytes
[
index
],
ns
);
index
+=
ns
;
_normals
.
resize
(
nn
);
int
ns
=
nn
*
sizeof
(
char
);
memcpy
(
&
_normals
[
0
],
&
bytes
[
index
],
ns
);
index
+=
ns
;
}
int
cn
;
memcpy
(
&
cn
,
&
bytes
[
index
],
is
);
index
+=
is
;
int
cn
;
memcpy
(
&
cn
,
&
bytes
[
index
],
is
);
index
+=
is
;
_colors
.
resize
(
cn
);
int
cs
=
cn
*
sizeof
(
unsigned
char
);
if
(
cn
){
memcpy
(
&
_colors
[
0
],
&
bytes
[
index
],
cs
);
index
+=
cs
;
_colors
.
resize
(
cn
);
int
cs
=
cn
*
sizeof
(
unsigned
char
);
memcpy
(
&
_colors
[
0
],
&
bytes
[
index
],
cs
);
index
+=
cs
;
}
}
}
This diff is collapsed.
Click to expand it.
Post/PViewDataRemote.h
+
1
−
2
View file @
96da7177
...
@@ -71,8 +71,7 @@ class PViewDataRemote : public PViewData {
...
@@ -71,8 +71,7 @@ class PViewDataRemote : public PViewData {
// FIXME: until we rewrite the option code and allow nice serialization ;-)
// FIXME: until we rewrite the option code and allow nice serialization ;-)
PrintOptions
(
0
,
GMSH_FULLRC
,
0
,
0
,
fileName
.
c_str
());
PrintOptions
(
0
,
GMSH_FULLRC
,
0
,
0
,
fileName
.
c_str
());
std
::
string
options
=
ConvertFileToString
(
fileName
);
std
::
string
options
=
ConvertFileToString
(
fileName
);
server
->
SendString
(
GmshSocket
::
GMSH_PARSE_STRING
,
options
.
c_str
());
server
->
SendString
(
GmshSocket
::
GMSH_VERTEX_ARRAY
,
options
.
c_str
());
server
->
SendString
(
GmshSocket
::
GMSH_VERTEX_ARRAY
,
"Send the vertex arrays!"
);
return
1
;
return
1
;
}
}
};
};
...
...
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