diff --git a/docs.it4i/software/viz/insitu.md b/docs.it4i/software/viz/insitu.md index 6af5eb743dcf7e54d60dd77ec23c1b2021e46aa2..b438ed73d583cb679d19b9863450abc8174d1b76 100644 --- a/docs.it4i/software/viz/insitu.md +++ b/docs.it4i/software/viz/insitu.md @@ -45,12 +45,19 @@ It will generate the CxxFullExampleAdaptor executable file. This can be later ru ## Code explanation -Provided example is a simple MPI program. Main executing part is written in FEDriver.cxx. It is a simulator code that creates computational grid and performs simulation (see below). +Provided example is a simple MPI program. Main executing part is written in FEDriver.cxx. It is a simulator code that creates computational grid and performs simulation-adaptor interaction (see below). -Dimensions of the computational grid in terms of number of points in x, y, z direction are supplied as input parameters to the *main* function (see lines 22-24). The fourth parametr in *main* is for the name of a Python script (we use feslicescript.py) that sets up the ParaView-Catalyst pipeline. +Dimensions of the computational grid in terms of number of points in x, y, z direction are supplied as input parameters to the *main* function (see lines 22-24). Based on the number of MPI ranks each MPI process creates different part of the overall grid. The fourth parametr in *main* is for the name of a Python script (we use feslicescript.py) that sets up the ParaView-Catalyst pipeline. After the Adaptor initialization on line 36 we start the simulation by linearly progressing *timeStep* value in the *for* loop. Each iteration of the loop upates the grid attributes (Velocity and Pressure) by calling the UpdateFields method in Attributes class + + - +Within the UpdateFields method the velocity progresses with the value of *time* and with the specific value of *setting* which depends on the respective MPI rank. In this way, different processes can be visually distinguished during the simulation. + + + +In each iteration of the simulation, adaptor's CoProcess function is called by using actual parameters of the grid in time. + mpirun -n 2 ./CxxFullExample 30 30 30 ../SampleScripts/feslicescript.py diff --git a/docs.it4i/software/viz/insitu/FEAdaptor.cxx b/docs.it4i/software/viz/insitu/FEAdaptor.cxx index 8c3b7ef7381cd8b81916eb4d0419fd54e31ab3a7..a3fc3a9d4b6127b43a250905eb0feb6e36d22756 100644 --- a/docs.it4i/software/viz/insitu/FEAdaptor.cxx +++ b/docs.it4i/software/viz/insitu/FEAdaptor.cxx @@ -145,7 +145,7 @@ void CoProcess( dataDescription->SetTimeData(time, timeStep); if (lastTimeStep == true) { - // assume that we want to all the pipelines to execute if it + // assume that we want to execute all the pipelines if it // is the last time step. dataDescription->ForceOutputOn(); } diff --git a/docs.it4i/software/viz/insitu/FEDataStructures.h b/docs.it4i/software/viz/insitu/FEDataStructures.h index b9d39db966fb14c1a3e86c9aa2cd79289ae4f843..bbfdf66991e3939f1a7d439b7ee81da6d0ce963b 100644 --- a/docs.it4i/software/viz/insitu/FEDataStructures.h +++ b/docs.it4i/software/viz/insitu/FEDataStructures.h @@ -24,9 +24,8 @@ class Attributes { // A class for generating and storing point and cell fields. // Velocity is stored at the points and pressure is stored - // for the cells. The current velocity profile is for a - // shearing flow with U(y,t) = y*t, V = 0 and W = 0. - // Pressure is constant through the domain. + // for the cells. + public: Attributes(); void Initialize(Grid* grid);