int main(int argc, char **argv) { int i; simulation_data sim; simulation_data_ctor(&sim); /* Initialize environment variables. */ SimulationArguments(argc, argv); VisItSetupEnvironment(); for(i = 1; i < argc; ++i) { if(strcmp(argv[i], "-echo") == 0) sim.echo = 1; } /* Write out .sim file that VisIt uses to connect. */ VisItInitializeSocketAndDumpSimFile("curve", "Demonstrates curve data access function", "/path/to/where/sim/was/started", NULL, NULL, SimulationFilename()); /* Read input problem setup, geometry, data.*/ read_input_deck(); /* Call the main loop. */ mainloop(&sim); simulation_data_dtor(&sim); return 0; }
int main(int argc, char **argv) { simulation_data sim; simulation_data_ctor(&sim); /* Initialize environment variables. */ SimulationArguments(argc, argv); VisItSetupEnvironment(); /* Write out .sim2 file that VisIt uses to connect. */ VisItInitializeSocketAndDumpSimFile("material", "Demonstrates material data access function", "/path/to/where/sim/was/started", NULL, NULL, SimulationFilename()); /* Read input problem setup, geometry, data. */ read_input_deck(); /* Call the main loop. */ mainloop(&sim); /* Cleanup */ simulation_data_dtor(&sim); return 0; }
int main(int argc, char **argv) { simulation_data sim; simulation_data_ctor(&sim); SimulationArguments(argc, argv); /* Initialize environment variables. */ VisItSetupEnvironment(); #ifdef PARALLEL /* Initialize MPI */ MPI_Init(&argc, &argv); MPI_Comm_rank (MPI_COMM_WORLD, &sim.par_rank); MPI_Comm_size (MPI_COMM_WORLD, &sim.par_size); /* Install callback functions for global communication. */ VisItSetBroadcastIntFunction(visit_broadcast_int_callback); VisItSetBroadcastStringFunction(visit_broadcast_string_callback); /* Tell VSIL whether the simulation is parallel. */ VisItSetParallel(sim.par_size > 1); VisItSetParallelRank(sim.par_rank); #endif /* Write out .sim2 file that VisIt uses to connect. Only do it * on processor 0. */ if(sim.par_rank == 0) { VisItInitializeSocketAndDumpSimFile("sim4p", "Parallel C prototype simulation connects to VisIt", "/path/to/where/sim/was/started", NULL, NULL, NULL); } /* Read input problem setup, geometry, data. */ read_input_deck(&sim); /* Call the main loop. */ mainloop(&sim); simulation_data_dtor(&sim); #ifdef PARALLEL MPI_Finalize(); #endif return 0; }
int main(int argc, char **argv) { /* Initialize environment variables. */ SimulationArguments(argc, argv); VisItSetupEnvironment(); /* Write out .sim2 file that VisIt uses to connect. */ VisItInitializeSocketAndDumpSimFile("amr", "Demonstrates domain nesting data access function", "/no/useful/path", NULL, NULL, SimulationFilename()); /* Read input problem setup, geometry, data. */ read_input_deck(); /* Call the main loop. */ mainloop(); return 0; }
int main(int argc, char **argv) { /* Initialize environment variables. */ SimulationArguments(argc, argv); VisItSetupEnvironment(); /* Write out .sim2 file that VisIt uses to connect. */ VisItInitializeSocketAndDumpSimFile("unstructured", "Demonstrates creating an unstructured mesh", "/path/to/where/sim/was/started", NULL, NULL, NULL); /* Read input problem setup, geometry, data. */ read_input_deck(); /* Call the main loop. */ mainloop(); return 0; }
int main(int argc, char **argv) { simulation_data sim; simulation_data_ctor(&sim); SimulationArguments(argc, argv); /* Initialize envuronment variables. */ VisItSetupEnvironment(); /* Write out .sim2 file that VisIt uses to connect. */ VisItInitializeSocketAndDumpSimFile("sim6", "Demonstrates setting simulation state in metadata", "/path/to/where/sim/was/started", NULL, NULL, NULL); /* Read input problem setup, geometry, data. */ read_input_deck(&sim); /* Call the main loop. */ mainloop(&sim); simulation_data_dtor(&sim); return 0; }