How to transfer my SPIS/NUM java modifications from Eclipse to SPIS framework ?

 

Obsolete page, organisation changed slightly

 

  1. Go under command line (prompt) in your Eclipse root directory.

It is by default workspace/myProjectName, so often workspace/SpisNum

During the Kiruna training, double-click on “SpisNum prompt� short-cut

 

  1. Tar all you java classes into a jar file (jar command, with same syntax as tar):

> jar cvf spis.jar spis org

the lapack library is included in the jar thanks to the org in the command.

If ever the org class hierarchy was not created you have to inflate it from the jar files the lapack library is usually stored in:

> jar xvf lapack.jar

> jar xvf blas.jar

> jar xvf f2jutil.jar

> jar xvf xerbla.jar

For Kiruna training you have a shortcut in SpisNum (not on desktop): jare.bat

NB: the directories (and sub-directores) always correspond to packages in java.  Example: LeoSimulation class is in spis.Top.Simulation package, hence the LeoSimulation.java class is coded in will always be situated in spis/Top/Simulation sub-directory

 

  1. Copy this spis.jar file at the right place in the spis project: SpisRootDirectory/SpisNum/build/Lib

For Kiruna training you have a shortcut in SpisNum (not on desktop) that makes that copy: intNum.bat

                    (stands for “integrate NUM�)

 

  1. If you want to modify the way your java classes are called (e.g. switch from a LeoSimulation to a GeoSimulation), edit the JyTop4.py python file.

Jext is a good editor for that (in C:\sdk\sdk\Spis2.95.17_KRN\ Spis2.95.17_KRN\SpisUI\Bin in Kiruna).

You basically can change the type of simulation to be built, and its integration time, cf below about JyTop4.py

As of SPIS v3.00, you’ll more likely leave JyTop4.py the way it is: it calls the SimulationFormUIParams class, which controls the simulation from user-defined global and local parameters (see Controlling NUM from UI.html), but you can still create your own Simulation class (e.g. starting from SimulationFormUIParams and modifying it).

 

  1. You are ready to run the framework!

 

JyTop4.py file

 

# Building mesh objects

self.scSurfMesh = ThreeDUnstructSurfMesh(…)

self.bdSurfMesh = ThreeDUnstructSurfMesh(…)

self.volMesh = ThreeDUnstructVolMesh(…)

 

# Initialising and running SimulationFromUIParams object

 

self.simu = SimulationFromUIParams(self.volMesh, self.bdSurfMesh, self.scSurfMesh, self.globalParameterArray, self.localParameterArray, GL_DATA_PATH)

self.simu.integrate()

 

# Retrievieng post-processing data

self.scSurfResults = self.simu.getScSurfResults()

self.volResults = self.simu.getVolResults()

...

 

# the end