31 #define SDL_MAIN_HANDLED
62 bool secure = socketstream::secure_default;
74 "GLVis [vector data]",
"GLVis [mesh]"
107 if (field_type < 0 || field_type > 2)
117 cerr <<
"Initializing the visualization failed." << endl;
121 if (input_streams.size() > 0)
128 double mesh_range = -1.0;
129 if (field_type == 0 || field_type == 2)
200 else if (field_type == 1)
238 if (mesh_range > 0.0)
266 cout <<
"GLVis window closed." << endl;
273 cout <<
"Script: solution: " << flush;
276 cout <<
"mesh: " << mword <<
"; " << flush;
277 named_ifgzstream imesh(mword.c_str());
280 cout <<
"Can not open mesh file: " << mword << endl;
289 cout <<
"solution: " << mword << endl;
290 state.
grid_f.reset(
new GridFunction(state.
mesh.get(), imesh));
294 cout <<
"solution: " << sword << endl;
295 ifgzstream isol(sword.c_str());
298 cout <<
"Can not open solution file: " << sword << endl;
301 state.
grid_f.reset(
new GridFunction(state.
mesh.get(), isol));
311 int np, scr_keep_attr, err_read;
312 string mesh_prefix, sol_prefix;
314 cout <<
"Script: psolution: " << flush;
317 cout <<
"# processors: " << np <<
"; " << flush;
319 scr >> ws >> mesh_prefix;
320 cout <<
"mesh prefix: " << mesh_prefix <<
"; " << flush;
321 scr >> ws >> scr_keep_attr;
324 cout <<
"(real attributes); " << flush;
328 cout <<
"(processor attributes); " << flush;
331 scr >> ws >> sol_prefix;
332 cout <<
"solution prefix: " << sol_prefix << endl;
335 sol_prefix.c_str(), state, scr_keep_attr);
348 cout <<
"Script: mesh: " << flush;
351 named_ifgzstream imesh(word.c_str());
354 cout <<
"Can not open mesh file: " << word << endl;
357 cout << word << endl;
361 Mesh*
const m = meshstate.
mesh.get();
371 FiniteElementCollection *vfec = NULL;
372 FiniteElementSpace *vfes;
373 vfes = (FiniteElementSpace *)m->GetNodalFESpace();
376 vfec =
new LinearFECollection;
377 vfes =
new FiniteElementSpace(m, vfec, m->SpaceDimension());
380 meshstate.
grid_f.reset(
new GridFunction(vfes));
381 GridFunction *
const g = meshstate.
grid_f.get();
393 cout <<
"Script: incompatible meshes!" << endl;
397 state.
mesh = std::move(meshstate.
mesh);
408 cout <<
"No script stream defined! (Bug?)" << endl;
414 int done_one_command = 0;
415 while (!done_one_command)
420 cout <<
"End of script." << endl;
424 if (scr.peek() ==
'#')
434 else if (word ==
"}")
442 else if (word ==
"solution" || word ==
"mesh" || word ==
"psolution")
446 if (word ==
"solution")
450 done_one_command = 1;
454 else if (word ==
"mesh")
458 done_one_command = 1;
461 if (new_state.
mesh == NULL)
463 cout <<
"Script: unexpected 'mesh' command!" << endl;
464 done_one_command = 1;
468 else if (word ==
"psolution")
472 done_one_command = 1;
483 cout <<
"Different type of mesh / solution." << endl;
486 else if (word ==
"screenshot")
490 cout <<
"Script: screenshot: " << flush;
494 cout <<
"Screenshot(" << word <<
") failed." << endl;
495 done_one_command = 1;
498 cout <<
"-> " << word << endl;
504 if (scr_max_val < vs->GetMaxV())
509 else if (word ==
"viewcenter")
512 cout <<
"Script: viewcenter: "
516 else if (word ==
"perspective")
519 cout <<
"Script: perspective: " << word;
524 else if (word ==
"on")
535 else if (word ==
"light")
538 cout <<
"Script: light: " << word;
543 else if (word ==
"on")
554 else if (word ==
"view")
558 cout <<
"Script: view: " << theta <<
' ' << phi << endl;
562 else if (word ==
"zoom")
566 cout <<
"Script: zoom: " << factor << endl;
570 else if (word ==
"shading")
573 cout <<
"Script: shading: " << flush;
579 else if (word ==
"smooth")
583 else if (word ==
"cool")
590 cout << word << endl;
595 cout << word <<
" ?" << endl;
598 else if (word ==
"subdivisions")
602 cout <<
"Script: subdivisions: " << flush;
604 cout << t <<
' ' << b << endl;
607 else if (word ==
"valuerange")
611 cout <<
"Script: valuerange: " << flush;
613 cout << min <<
' ' << max << endl;
616 else if (word ==
"autoscale")
619 cout <<
"Script: autoscale: " << word;
624 else if (word ==
"on")
628 else if (word ==
"value")
632 else if (word ==
"mesh")
642 else if (word ==
"window")
646 <<
' ' <<
window_w <<
' ' << window_h << endl;
650 else if (word ==
"keys")
658 else if (word ==
"palette")
662 cout <<
"Script: palette: " << pal << endl;
666 else if (word ==
"palette_repeat")
670 cout <<
"Script: palette_repeat: " << rpt_times << endl;
675 else if (word ==
"toggle_attributes")
677 Array<int> attr_list;
678 cout <<
"Script: toggle_attributes:";
679 for (scr >> ws; scr.peek() !=
';'; scr >> ws)
682 scr >> attr_list.Last();
683 if (attr_list.Size() <= 256)
685 cout <<
' ' << attr_list.Last();
687 else if (attr_list.Size() == 257)
689 cout <<
" ... " << flush;
697 else if (word ==
"rotmat")
699 cout <<
"Script: rotmat:";
700 for (
int i = 0; i < 16; i++)
703 cout <<
' ' <<
vs->
rotmat[i/4][i%4];
708 else if (word ==
"camera")
711 cout <<
"Script: camera:";
712 for (
int i = 0; i < 9; i++)
715 cout <<
' ' << cam[i];
721 else if (word ==
"scale")
724 cout <<
"Script: scale:";
726 cout <<
' ' << scale;
731 else if (word ==
"translate")
734 cout <<
"Script: translate:";
736 cout <<
' ' << x <<
' ' << y <<
' ' << z;
741 else if (word ==
"plot_caption")
751 cout <<
"Unknown command in script: " << word << endl;
754 done_one_command = 1;
796 cout <<
"Error in script" << endl;
799 if (scr.peek() ==
'#')
805 if (word ==
"window")
809 else if (word ==
"solution")
819 else if (word ==
"psolution")
829 else if (word ==
"mesh")
842 cout <<
"Unknown command in script: " << word << endl;
850 std::thread worker_thread
870 worker_thread.join();
887 Session(
bool fix_elem_orient,
891 state.save_coloring = save_coloring;
895 : state(std::move(other_state))
899 ~Session() =
default;
901 Session(Session&& from) =
default;
902 Session& operator= (Session&& from) =
default;
921 handler = std::thread {funcThread,
922 std::move(state), ft, std::move(input_streams)};
926 bool StartSavedSession(std::string stream_file)
928 unique_ptr<ifstream> ifs(
new ifstream(stream_file));
931 cout <<
"Can not open stream file: " << stream_file << endl;
935 *ifs >> data_type >> ws;
936 ft = state.ReadStream(*ifs, data_type);
937 input_streams.emplace_back(std::move(ifs));
944 void GLVisServer(
int portnum,
bool save_stream,
bool fix_elem_orient,
947 std::vector<Session> current_sessions;
950 unsigned int nproc = 1, proc = 0;
952 #ifdef MFEM_USE_GNUTLS
953 unique_ptr<GnuTLS_global_state> state;
954 unique_ptr<GnuTLS_session_params> params;
957 state.reset(
new GnuTLS_global_state);
959 string home_dir(getenv(
"HOME"));
960 string server_dir = home_dir +
"/.config/glvis/server/";
961 #ifndef MFEM_USE_GNUTLS_X509
962 string pubkey = server_dir +
"pubring.gpg";
963 string privkey = server_dir +
"secring.gpg";
964 string trustedkeys = server_dir +
"trusted-clients.gpg";
966 string pubkey = server_dir +
"cert.pem";
967 string privkey = server_dir +
"key.pem";
968 string trustedkeys = server_dir +
"trusted-clients.pem";
970 params.reset(
new GnuTLS_session_params(
971 *state, pubkey.c_str(), privkey.c_str(),
972 trustedkeys.c_str(), GNUTLS_SERVER));
973 if (!params->status.good())
975 cout <<
" public key = " << pubkey <<
'\n'
976 <<
" private key = " << privkey <<
'\n'
977 <<
" trusted keys = " << trustedkeys << endl;
978 cout <<
"Error setting GLVis server parameters.\n"
979 "Generate your GLVis keys with:"
980 " bash glvis-keygen.sh [\"Your Name\"] [\"Your Email\"]"
987 const int backlog = 128;
988 socketserver server(portnum, backlog);
991 cout <<
"Waiting for data on port " << portnum <<
" ..." << endl;
995 cout <<
"Server already running on port " << portnum <<
".\n" << endl;
1001 unique_ptr<socketstream> isock;
1002 #ifndef MFEM_USE_GNUTLS
1003 isock.reset(
new socketstream);
1005 isock.reset(
secure ?
new socketstream(*params) :
new socketstream(
false));
1007 vector<unique_ptr<istream>> input_streams;
1008 while (server.accept(*isock) < 0)
1011 cout <<
"GLVis: server.accept(...) failed." << endl;
1015 *isock >> data_type >> ws;
1023 if (data_type ==
"parallel")
1026 unsigned int np = 0;
1029 *isock >> nproc >> proc;
1031 cout <<
"new connection: parallel " << nproc <<
' ' << proc
1038 cout <<
"Invalid number of processors: " << nproc << endl;
1041 input_streams.resize(nproc);
1045 if (nproc != input_streams.size())
1047 cout <<
"Unexpected number of processors: " << nproc
1048 <<
", expected: " << input_streams.size() << endl;
1054 cout <<
"Invalid processor rank: " << proc
1055 <<
", number of processors: " << nproc << endl;
1058 if (input_streams[proc])
1060 cout <<
"Second connection attempt from processor rank: "
1065 input_streams[proc] = std::move(isock);
1066 #ifndef MFEM_USE_GNUTLS
1067 isock.reset(
new socketstream);
1069 isock.reset(
secure ?
new socketstream(*params) :
1070 new socketstream(
false));
1078 while (server.accept(*isock) < 0)
1081 cout <<
"GLVis: server.accept(...) failed." << endl;
1084 *isock >> data_type >> ws;
1085 if (data_type !=
"parallel")
1087 cout <<
"Expected keyword \"parallel\", got \"" << data_type
1095 Session new_session(fix_elem_orient, save_coloring);
1100 sprintf(tmp_file,
"glvis-saved.%04d",viscount);
1101 ofstream ofs(tmp_file);
1104 ofs << data_type <<
'\n';
1105 ofs << isock->rdbuf();
1112 ofs <<
"solution\n";
1113 new_session.state.mesh->Print(ofs);
1114 new_session.state.grid_f->Save(ofs);
1117 cout <<
"Data saved in " << tmp_file << endl;
1119 new_session.StartSavedSession(tmp_file);
1125 new_session.ft = new_session.state.ReadStream(*isock, data_type);
1126 input_streams.emplace_back(std::move(isock));
1133 new_session.input_streams = std::move(input_streams);
1134 new_session.StartSession();
1136 current_sessions.emplace_back(std::move(new_session));
1149 bool save_stream =
false;
1153 int portnum = 19916;
1155 double line_width = 1.0;
1157 int geom_ref_type = Quadrature1D::ClosedUniform;
1158 bool legacy_gl_ctx =
false;
1159 bool enable_hidpi =
true;
1161 OptionsParser
args(argc, argv);
1163 args.AddOption(&
mesh_file,
"-m",
"--mesh",
1164 "Mesh file to visualize.");
1165 args.AddOption(&
gfunc_file,
"-g",
"--grid-function",
1166 "Solution (GridFunction) file to visualize.");
1167 args.AddOption(&
gf_component,
"-gc",
"--grid-function-component",
1168 "Select a grid function component, [0-<num-comp>) or"
1170 args.AddOption(&
sol_file,
"-s",
"--scalar-solution",
1171 "Scalar solution (vertex values) file to visualize.");
1172 args.AddOption(&
vec_sol_file,
"-v",
"--vector-solution",
1173 "Vector solution (vertex values) file to visualize.");
1174 args.AddOption(&np,
"-np",
"--num-proc",
1175 "Load mesh/solution from multiple processors.");
1176 args.AddOption(&
pad_digits,
"-d",
"--pad-digits",
1177 "Number of digits used for processor ranks in file names.");
1178 args.AddOption(&script_file,
"-run",
"--run-script",
1179 "Run a GLVis script file.");
1180 args.AddOption(&
arg_keys,
"-k",
"--keys",
1181 "Execute key shortcut commands in the GLVis window.");
1183 "-no-fo",
"--dont-fix-orientations",
1184 "Attempt to fix the orientations of inverted elements.");
1185 args.AddOption(&
keep_attr,
"-a",
"--real-attributes",
1186 "-ap",
"--processor-attributes",
1187 "When opening a parallel mesh, use the real mesh attributes"
1188 " or replace them with the processor rank.");
1189 args.AddOption(&geom_ref_type,
"-grt",
"--geometry-refiner-type",
1190 "Set of points to use when refining geometry:"
1191 " 3 = uniform, 1 = Gauss-Lobatto, (see mfem::Quadrature1D).");
1193 "-no-sc",
"--dont-save-coloring",
1194 "Save the mesh coloring generated when opening only a mesh.");
1195 args.AddOption(&portnum,
"-p",
"--listen-port",
1196 "Specify the port number on which to accept connections.");
1197 args.AddOption(&
secure,
"-sec",
"--secure-sockets",
1198 "-no-sec",
"--standard-sockets",
1199 "Enable or disable GnuTLS secure sockets.");
1200 args.AddOption(&save_stream,
"-save",
"--save-stream",
1201 "-no-save",
"--dont-save-stream",
1202 "In server mode, save incoming data to a file before"
1204 args.AddOption(&stream_file,
"-saved",
"--saved-stream",
1205 "Load a GLVis stream saved to a file.");
1206 args.AddOption(&
window_w,
"-ww",
"--window-width",
1207 "Set the window width.");
1208 args.AddOption(&
window_h,
"-wh",
"--window-height",
1209 "Set the window height.");
1211 "Set the window title.");
1213 "Set the plot caption (visible when colorbar is visible).");
1214 args.AddOption(&font_name,
"-fn",
"--font",
1215 "Set the font: [<font-name>[:style=<style>]][-<font-size>],"
1216 " e.g. -fn \"Helvetica:style=Bold-16\".");
1217 args.AddOption(&multisample,
"-ms",
"--multisample",
1218 "Set the multisampling mode (toggled with the 'A' key).");
1219 args.AddOption(&line_width,
"-lw",
"--line-width",
1220 "Set the line width (multisampling off).");
1221 args.AddOption(&ms_line_width,
"-mslw",
"--multisample-line-width",
1222 "Set the line width (multisampling on).");
1223 args.AddOption(&legacy_gl_ctx,
"-oldgl",
"--legacy-gl",
1224 "-anygl",
"--any-gl",
1225 "Only try to create a legacy OpenGL (< 2.1) context.");
1226 args.AddOption(&enable_hidpi,
"-hidpi",
"--high-dpi",
1227 "-nohidpi",
"--no-high-dpi",
1228 "Enable/disable support for HiDPI at runtime, if supported.");
1231 <<
" _/_/_/ _/ _/ _/ _/" << endl
1232 <<
" _/ _/ _/ _/ _/_/_/" << endl
1233 <<
" _/ _/_/ _/ _/ _/ _/ _/_/" << endl
1234 <<
" _/ _/ _/ _/ _/ _/ _/_/" << endl
1235 <<
" _/_/_/ _/_/_/_/ _/ _/ _/_/_/" << endl
1243 args.PrintError(cout);
1247 args.PrintHelp(cout);
1298 if (legacy_gl_ctx ==
true)
1314 if (!stream_session.StartSavedSession(stream_file))
1326 ifstream scr(script_file);
1329 cout <<
"Can not open script: " << script_file << endl;
1340 cout <<
"Invalid combination of mesh/solution options!\n\n";
1342 args.PrintHelp(cout);
1346 #ifndef MFEM_USE_GNUTLS
1349 cout <<
"The secure option can only be used when MFEM is compiled with"
1350 " GnuTLS support." << endl;
1359 std::thread serverThread{
GLVisServer, portnum, save_stream,
1366 serverThread.detach();
1379 bool use_vector_soln = (
input & 8);
1380 bool use_soln = (
input & 4);
1382 if (use_vector_soln)
1388 field_type = (use_soln) ? 0 : 2;
1390 Session single_session(field_type, std::move(
stream_state));
1391 single_session.StartSession();
1396 cout <<
"Thank you for using GLVis." << endl;
1405 "Start a GLVis server:\n"
1407 "Visualize a mesh:\n"
1408 " glvis -m <mesh_file>\n"
1409 "Visualize mesh and solution (grid function):\n"
1410 " glvis -m <mesh_file> -g <grid_function_file> [-gc <component>]\n"
1411 "Visualize parallel mesh and solution (grid function):\n"
1412 " glvis -np <#proc> -m <mesh_prefix> [-g <grid_function_prefix>]\n\n"
1423 cerr <<
"Can not open mesh file " <<
mesh_file <<
". Exit.\n";
1432 bool freesolin =
false;
1433 ifgzstream *solin = NULL;
1444 cerr <<
"Can not open solution file " <<
sol_file <<
". Exit.\n";
1451 state.
grid_f.reset(
new GridFunction(state.
mesh.get(), *solin));
1458 solin->getline(buff,128);
1459 state.
sol.Load(*solin, state.
mesh->GetNV());
1463 state.
solu.Load(*solin, state.
mesh->GetNV());
1464 state.
solv.Load(*solin, state.
mesh->GetNV());
1465 if (state.
mesh->SpaceDimension() == 3)
1467 state.
solw.Load(*solin, state.
mesh->GetNV());
1488 if (gf_component < 0 || gf_component >= state.
grid_f->VectorDim())
1490 cerr <<
"Invalid component " <<
gf_component <<
'.' << endl;
1493 FiniteElementSpace *ofes = state.
grid_f->FESpace();
1494 FiniteElementCollection *fec =
1495 FiniteElementCollection::New(ofes->FEColl()->Name());
1496 FiniteElementSpace *fes =
new FiniteElementSpace(state.
mesh.get(), fec);
1497 GridFunction *new_gf =
new GridFunction(fes);
1498 new_gf->MakeOwner(fec);
1499 for (
int i = 0; i < new_gf->Size(); i++)
1503 state.
grid_f.reset(new_gf);
1505 if (state.
grid_f->VectorDim() == 1)
1507 state.
grid_f->GetNodalValues(state.
sol);
1549 const char *sol_prefix,
1555 bool same_file =
false;
1558 same_file = !strcmp(sol_prefix, mesh_prefix);
1562 Array<Mesh *> mesh_array(np);
1563 Array<GridFunction *> gf_array(np);
1568 for (
int p = 0; p < np; p++)
1570 ostringstream fname;
1571 fname << mesh_prefix <<
'.' << setfill(
'0') << setw(
pad_digits) << p;
1572 named_ifgzstream meshfile(fname.str().c_str());
1575 cerr <<
"Could not open mesh file: " << fname.str() <<
'!' << endl;
1585 for (
int i = 0; i < mesh_array[p]->GetNE(); i++)
1587 mesh_array[p]->GetElement(i)->SetAttribute(p+1);
1589 for (
int i = 0; i < mesh_array[p]->GetNBE(); i++)
1591 mesh_array[p]->GetBdrElement(i)->SetAttribute(p+1);
1600 ostringstream sol_fname;
1601 sol_fname << sol_prefix <<
'.' << setfill(
'0') << setw(
pad_digits) << p;
1602 ifgzstream solfile(sol_fname.str().c_str());
1605 cerr <<
"Could not open solution file "
1606 << sol_fname.str() <<
'!' << endl;
1611 gf_array[p] =
new GridFunction(mesh_array[p], solfile);
1615 gf_array[p] =
new GridFunction(mesh_array[p], meshfile);
1623 state.
mesh.reset(
new Mesh(mesh_array, np));
1626 state.
grid_f.reset(
new GridFunction(state.
mesh.get(), gf_array, np));
1630 for (
int p = 0; p < np; p++)
1632 delete gf_array[np-1-p];
1633 delete mesh_array[np-1-p];
1641 int nproc = input_streams.size();
1642 Array<Mesh *> mesh_array(nproc);
1643 Array<GridFunction *> gf_array(nproc);
1649 for (
int p = 0; p < nproc; p++)
1652 cout <<
"connection[" << p <<
"]: reading initial data ... " << flush;
1654 istream &isock = *input_streams[p];
1656 isock >> ws >> data_type >> ws;
1658 cout <<
" type " << data_type <<
" ... " << flush;
1664 for (
int i = 0; i < mesh_array[p]->GetNE(); i++)
1666 mesh_array[p]->GetElement(i)->SetAttribute(p+1);
1668 for (
int i = 0; i < mesh_array[p]->GetNBE(); i++)
1670 mesh_array[p]->GetBdrElement(i)->SetAttribute(p+1);
1674 if (data_type !=
"mesh")
1676 gf_array[p] =
new GridFunction(mesh_array[p], isock);
1680 cout <<
"done." << endl;
1684 if (gf_count > 0 && gf_count != nproc)
1686 mfem_error(
"Input streams contain a mixture of data types!");
1689 state.
mesh.reset(
new Mesh(mesh_array, nproc));
1697 state.
grid_f.reset(
new GridFunction(state.
mesh.get(), gf_array, nproc));
1698 field_type = (state.
grid_f->VectorDim() == 1) ? 0 : 1;
1701 for (
int p = 0; p < nproc; p++)
1703 delete mesh_array[nproc-1-p];
1704 delete gf_array[nproc-1-p];
std::unique_ptr< GridFunction > ProjectVectorFEGridFunction(std::unique_ptr< GridFunction > gf)
const char * vec_sol_file
thread_local GeometryRefiner GLVisGeometryRefiner
void PlayScript(istream &scr)
void SetValueRange(double, double)
void Extrude1DMeshAndSolution()
Helper function for visualizing 1D data.
int Screenshot(const char *fname, bool convert)
Take a screenshot using libtiff, libpng or sdl2.
thread_local communication_thread * comm_thread
void Set(const double cam[])
void SetLineWidthMS(float width_ms)
void SetGridFunction(StreamState &state)
virtual void AutoRefine()=0
void Translate(double x, double y, double z=0.0)
bool SetFont(const vector< std::string > &font_patterns, int height)
int ScriptReadParSolution(istream &scr, StreamState &state)
void ExecuteScriptCommand()
void MyExpose(GLsizei w, GLsizei h)
void ThreadsPauseFunc(GLenum state)
void SetVisualizationScene(VisualizationScene *scene, int view, const char *keys)
virtual void SetShading(int, bool)=0
void AddIdleFunc(void(*Func)(void))
std::unique_ptr< mfem::GridFunction > grid_f
const char * c_plot_caption
int ScriptReadSolution(istream &scr, StreamState &state)
void SetRepeatTimes(int rpt)
thread_local string plot_caption
void SDLMainLoop(bool server_mode)
vector< unique_ptr< istream >> StreamCollection
void SetLight(bool light_set)
int ReadInputStreams(StreamState &state, const StreamCollection &input_streams)
thread_local VisualizationSceneScalarData * vs
thread_local StreamState stream_state
const char * window_titles[]
void SetMeshSolution()
Set a (checkerboard) solution when only the mesh is given.
bool SetNewMeshAndSolution(StreamState new_state, VisualizationScene *vs)
int main(int argc, char *argv[])
void SetIndex(int num)
Sets the palette texture to bind.
void RemoveIdleFunc(void(*Func)(void))
void SetView(double theta, double phi)
std::unique_ptr< mfem::Mesh > mesh
void SetLineWidth(float width)
void SetLightMatIdx(unsigned i)
SdlWindow * GetAppWindow()
void MoveResizeWindow(int x, int y, int w, int h)
void Init()
Initializes the palette textures.
void SetGridFunction(GridFunction &u)
void SetLegacyGLOnly(bool status)
virtual void ToggleAttributes(Array< int > &attr_list)=0
thread_local string extra_caption
virtual void SetRefineFactors(int, int)=0
bool GLVisInitVis(int field_type, StreamCollection input_streams)
thread_local GLVisCommand * glvis_command
void SetAutoscale(int _autoscale)
const char * window_title
void GLVisServer(int portnum, bool save_stream, bool fix_elem_orient, bool save_coloring)
int InitVisualization(const char name[], int x, int y, int w, int h)
Initializes the visualization and some keys.
void RunVisualization()
Start the infinite visualization loop.
const char * string_default
void SetMultisample(int m)
void setOnKeyDown(int key, Delegate func)
int ScriptReadDisplMesh(istream &scr, StreamState &state)
void ReadSerial(StreamState &state)
int ReadParMeshAndGridFunction(int np, const char *mesh_prefix, const char *sol_prefix, StreamState &state, int keep_attr)
const float LINE_WIDTH_AA
void CallKeySequence(const char *seq)
void PrintSampleUsage(ostream &out)
void SetUseHiDPI(bool status)
void ReadParallel(int np, StreamState &state)
void SetGridFunction(GridFunction *gf)