Commit 3c0ee0a9 authored by Petr Strakos's avatar Petr Strakos

adding code images

parent 67357650
This diff is collapsed.
......@@ -33,6 +33,6 @@ option(BUILD_TESTING "Build Testing" OFF)
# Setup testing.
if (BUILD_TESTING)
include(CTest)
add_test(NAME CxxFullExampleTest COMMAND CxxFullExample ${CMAKE_CURRENT_SOURCE_DIR}/SampleScripts/feslicescript.py)
add_test(NAME CxxFullExampleTest COMMAND CxxFullExample ${CMAKE_CURRENT_SOURCE_DIR}/feslicescript.py)
set_tests_properties(CxxFullExampleTest PROPERTIES LABELS "PARAVIEW;CATALYST")
endif()
......@@ -11,9 +11,9 @@
int main(int argc, char** argv)
{
// Check the input arguments for area size
if (argc < 4) {
printf("Not all arguments for grid definition supplied\n");
// Check the input arguments
if (argc < 5) {
printf("Not all arguments supplied (grid definition, Python script name)\n");
return 0;
}
......@@ -21,7 +21,7 @@ int main(int argc, char** argv)
unsigned int pointsY = abs(std::stoi(argv[2]));
unsigned int pointsZ = abs(std::stoi(argv[3]));
//MPI_Init(&argc, &argv);
// MPI_Init(&argc, &argv);
MPI_Init(NULL, NULL);
Grid grid;
......@@ -32,13 +32,13 @@ int main(int argc, char** argv)
attributes.Initialize(&grid);
#ifdef USE_CATALYST
// The first argument is the program name
// The argument nr. 4 is the Python script name
FEAdaptor::Initialize(argv[4]);
#endif
unsigned int numberOfTimeSteps = 1000;
for (unsigned int timeStep = 0; timeStep < numberOfTimeSteps; timeStep++)
{
// use a time step length of 0.1
// Use a time step of length 0.1
double time = timeStep * 0.1;
attributes.UpdateFields(time);
#ifdef USE_CATALYST
......@@ -50,6 +50,7 @@ int main(int argc, char** argv)
int name_len;
MPI_Get_processor_name(processor_name, &name_len);
// Print actual time step and processor name that handles the calculation
printf("This is processor %s, time step: %0.3f\n", processor_name, time);
usleep(500000);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment