1 ============================================================
3 * Randomizer module : version 0.2
4 * Sierpinsky module : version 0.2
5 ============================================================
16 =======================================================
18 =======================================================
20 Randomizer and Sierpinsky SALOME-based modules implement simple interface to calculate Sierpinsky fields.
22 =======================================================
24 =======================================================
27 All other products are those used by SALOME.
29 =======================================================
31 =======================================================
33 The compilation procedure is exactly the same as for other SALOME modules:
35 3.1. install SALOME with all prerequisite products;
36 3.2. unpack Randomizer and Sierpinsky modules sources;
39 source <salome_install_dir>/env_products.csh
41 where <salome_install_dir> is a directory where SALOME is installed to.
43 3.4 create build directory for Randomizer module:
45 mkdir RANDOMIZER_BUILD
48 3.5 make and install Randomizer module:
50 cmake -DCMAKE_BUILD_TYPE=<Mode> -DCMAKE_INSTALL_PREFIX=${RANDOMIZER_install_dir} ${RANDOMIZER_src_dir}
54 where <Mode> is build mode (Release or Debug),
55 <RANDOMIZER_src_dir> is a Randomizer module sources directory and
56 <RANDOMIZER_install_dir> is a directory where you want to install the Randomizer module.
58 3.6. Repeat 3.4, 3.5 steps for Sierpinsky module.
60 Launch 'cmake --help' command to learn more about configuration options.
62 =======================================================
64 =======================================================
66 To launch SALOME application the following steps should be performed:
70 source <salome_install_dir>/env_products.csh
72 where <salome_install_dir> is a directory where SALOME is installed to.
74 4.3. add Randomizer and Sierpinsky modules environment:
76 setenv RANDOMIZER_ROOT_DIR <RANDOMIZER_install_dir>
77 setenv SIERPINSKY_ROOT_DIR <SIERPINSKY_install_dir>
79 where <RANDOMIZER_install_dir> and <SIERPINSKY_install_dir> are the directories where
80 you have installed Randomizer and Sierpinsky modules correspondingly (see paragraph 3 above).
84 ${KERNEL_ROOT_DIR}/bin/salome/runSalome --modules=SMESH,VISU,RANDOMIZER,SIERPINSKY
86 =======================================================
88 =======================================================
92 Randomizer module is implemented as pure Python module. It does not have any GUI.
93 The IDL interface includes two methods:
95 - void InitPoint( out double theX, out double theY );
97 to generate a random 2D point; X and Y coordinates are in [0,1) range;
99 - long NextIteration();
101 to calculate next random iteration step: the integer value in range {1,3}.
103 The functionality of this module is used by Sierpinsky module to calculate Sierpinsky fields.
105 5.2. Sierpinsky module.
107 The engine interface includes the following methods:
109 - void Init( in double X1, in double Y1, in double X2, in double Y2, in double X3, in double Y3 );
111 to initialize the engine with three points which will be used as reference points in the calculations;
115 to initializes the engine with three default reference points: (0.5, 1), (0, 0), (1, 0);
117 - void NextPoint( in double X, in double Y, in long iter, out double nextX, out double nextY );
119 calculates next iteration point, basing on the previous one and the iteration step given from
120 Randomizer engine; this method is called subsequently in the loop to generate the points cloud;
122 - boolean ExportToJPEG( in string fileName, in long size );
124 exports the collected points data to the JPEG file;
126 - boolean ExportToMED( in string fileName, in double size );
128 exports the collected points data to the MED file.
130 The Init() and Reset() methods clear the collected points data and prepare engine to the new calculations.
131 The JPEG file can be viewed with help of any image viewer supporting JPEG format.
132 The MED files created by ExportToMED() method can be then imported in the Post-Pro (VISU) module for the
133 visualization (see below).
135 =======================================================
137 =======================================================
141 Launch SALOME (see paragraph 4) and create a new study. To activate Sierpinsky module click the corresponding
142 button on the 'Components' toolbar or select it in the components combo-box.
144 The only action of the Sierpinsky module's GUI is available via 'Sierpinsky' main menu - it is a 'Run' command
145 (there is also corresponding button on the toolbar).
146 This command opens 'Run Sierpinsky Algo' dialog box which allows:
148 - to define a start point for the calculations; if 'Random' checkbox is turned on, the start point will
149 be generated automatically via Randomizer module functionality;
151 - to define three reference points for the algo; if 'Random' checkbox is turned on, the reference points
152 will be generated automatically via Randomizer module functionality; if 'Default' checkbox is turned on
153 the default values will be used;
155 - to enter the number of the points to be calculated;
157 - to create JPEG image after calculcations finishing; 'Image size' parameter defines the size of the image side
160 - to export results to the MED file after calculcations finishing; 'Mesh size' parameter defines the mesh range.
162 - to import generated MED file automatically to the Post-Pro (VISU) module for the further visualisation.
164 After pressing the 'Start' button the calculation begins. It is possible to stop the calculation by pressing
165 'Stop' button. The progress bar in the lower part of the dialog box displays the calculation status.
169 Activate Post-Pro (VISU) module by clicking the corresponding button on the 'Components' toolbar.
170 Select 'File - Import from file' menu command. Select the MED file, click 'Open' button. The MED file is imported
172 Note: the MED file can be automatically imported to the study after finishing of the calculations
173 (see previous paragraph).
175 Select 'Post-Pro/<med_file>.med/Sierpinsky/Families/onNodes' object in the Object Browser, invoke context popup
176 menu by mouse right-button click and select 'Display Only' command. The cloud of points is displayed in the viewer.
177 Note: the visualizaion of mesh is only possible in the VTK viewer.
181 Activate YACS module by clicking the corresponding button on the 'Components' toolbar.
182 There are two sample YACS schemas which allow to test the Randomizer and Sierpinsky modules
183 functionality. These files can be found in the <SIERPINSKY_install_dir>/share/salome/resources directory
184 where <SIERPINSKY_install_dir> is the directory where you have installed Sierpinsky module (see paragraph 3).
186 Call 'YACS - Import Schema' menu command, then browse to the 'schema1.xml' or 'schema2.xml' file and click 'Open' button.
187 To prepare the schema for execution, call 'YACS - Run Current Schema' menu command or just click the corresponding toolbar button.
188 Then launch the ready schema by calling 'YACS - Start/Resume execution' menu command.
190 The both schemas implement simple loop to perform calculations. The first schema uses default parameters and
191 exports the generated data to the JPEG file after calculation finishing.
193 The second schema is some more complicated. It uses random start and reference points. After the calculations finishing
194 it exports the data to the JPEG file and to the MED file, then automatically imports the MED file to the Post-Pro
195 module and displays it in the new 3d viewer (the 'ImportToVisu' inline node performs the importation and visualizing).