From ade538b0ad8f05820feed7264edfc432b28ed642 Mon Sep 17 00:00:00 2001 From: strakpe <petr.strakos@vsb.cz> Date: Mon, 14 Jan 2019 22:30:53 +0100 Subject: [PATCH] adding code images --- docs.it4i/software/viz/insitu.md | 13 ++++++++++--- docs.it4i/software/viz/insitu/FEAdaptor.cxx | 2 +- docs.it4i/software/viz/insitu/FEDataStructures.h | 5 ++--- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/docs.it4i/software/viz/insitu.md b/docs.it4i/software/viz/insitu.md index 6af5eb74..b438ed73 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 8c3b7ef7..a3fc3a9d 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 b9d39db9..bbfdf669 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); -- GitLab