Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 The current state

 Class structure


Gliffy Diagram
size600
displayNameNamelistClassRelationship2
nameNamelistClassRelationship2
pagePin14

  • Three classes displaying similarly looking (but not the same!) extra namelist panels:
    • Grid2DExtraInputPanel
      • Used by Grid2D application
      • A member of Grid2DNamelistPanel that extends CenterPanel
    • ENamelistPanel
      • Used by Edge2D application
      • A member of EGoNamelistPanel that extends CenterPanelCheck (that extends CenterPanel)
    • ExtraNamelistPanel
      • Used by Jetto, Sanco, Mishka, Helena, Elite
      • A member of OutputExtraNamelistPanel that extends CenterPanelCheck (that extends CenterPanel)

 Challenges

  • Complex legacy code
  • The current implementation violates Model-View-Controller principia:
    • No clear separation of data and GUI that makes both 'tightly coupled'
    • Some data are kept in table 'model' 
    • GUI influences the way data are storing
  • Arrays specified as a set of entries: (variable name, index, value)
  • Quite a lot of time spent on 'reverse engineering' essential to understand dependencies and internal mechanisms working 'under the hood'
    • How / from data are being read?
    • How / where data are being saved?
  • Necessity to kept backward compatibility in terms of produced output files 

 Development

 GUI

Image Added


  • NewExtraNamelistPanel class, replacing ExtraNamelistPanel - designed and developed

  • package jet.misc.extranamelist.gui;
  • Integration of NewExtraNamelistPanel  class:

    • Integrated: 
      • Jetto
      • Sanco
      • Mishka
      • Helena
      • Elite
    • Not integrated 
      • Grid2D
      • Edge2D
  • Additional dialog to present variable data and metadata and to edit value

Image Added


Data handling

  • A Variable class: 
    • name
    • overview
    • obsolete
    • Specification class
      • namelist
      • model
      • tab
    • Data class
      • meta_type
      • type
      • value
    • Info class
      • link
      • description


 Open points

Config files

 YAML file format

YAML file format to be finally accepted.

Progress:

  • GUI development
    • simplification of architecture
    • table is resizable
  • NewExtraNamelistPanel  class shows data of:
    • Jetto
    • Sanco
    • Mishka
    • Helena
    • Elite
  • Grid2D and Edge2D - handled by separate classes (see below)
  • Conversion of extrainput.cfg  → YAML
    • working ('dirty') mechanism for conversion of configs prepared (can be extracted)
    • default value of meta_type  - 'array' (out of scalar/array/choice)
    • default value of type  (if not specified in cfg file)  → 'string'
    • overview  - short description
Code Block
languageyml
 # any comments can be put here (manually!!!) .... e.g.: 
 ###############################################    
 ###           ITRFASTIONS.                  ### 
 ###############################################   
 - variable 
    name: ITRFASTIONS
    overview:  nameShort description of variable 
	obsolete: ITRFASTIONSfalse
  	specification:
    	name_list: NLIST3
      	model: ""
      	tab: ""
      link	data: !<array>
      		meta_type: array
      	type: integer
      	default_value: ""
      obsolete: false	info:
      min_value: 
      max_value: 	link: http://documentation.server/link/to/documentation/page
      overview: 
      	description: ' -1Weiland combine fast ions. 0 (default) legacy ps+ns. 1 beams only.
        2 beams+RF minority as thermal Maxwellians'
  • Active variables saved to settings

 Open points

Outputs:

  • settings (startup.jset) 
  • namelist (jetto.in)
  • anything else?
model switches'

 Conversions of config files

  • Working ('dirty') mechanism for conversion of configs prepared (can be extracted)
  • Every time 'old' config file is read, the new one is saved
  • Files saved to  "jams/v210321_gateway_v5/java/lib/jet/misc/extranamelist/resources/" + config_name + ".yaml"  
    • What should be an 'final' destination for them?

Settings

 File format

...


Code Block
OutputExtraNamelist.selItems.cell[0][0]                     : EUP
OutputExtraNamelist.selItems.cell[0][1]                     : 1
OutputExtraNamelist.selItems.cell[0][2]                     : 2.5
...
OutputExtraNamelist.selItems.columns                        : 3
OutputExtraNamelist.selItems.rows                           : 17
OutputExtraNamelist.select                                  : true

...

Code Block
Read SETTINGS from: /pfs/work/g2fkoech/cmg/jams/v210321_gateway_v5/java/data/group_data/settings/startup.set
Read SETTINGS from: /pfs/work/g2bpalak/cmg/jams/data/settings/startup.set
Read SETTINGS from: /pfs/work/g2fkoech/cmg/jams/v210321_gateway_v5/java/data/group_data/settings/startup.jset
Read SETTINGS from: /pfs/work/g2bpalak/cmg/jams/data/settings/startup.jset



  • Group settings being read
  • User settings being added
    • overwrites group settings (especially OutputExtraNamelist.selItems.rows  )
    • not shown anywhere (??)
  • Incorrect management of file - artefacts remain!!!

Namelist


  • Can updateNamelist  method be unified somehow? Lots of IFs....

 Tests

Installation


PREPARE ENVIRONMENT

Code Block
module use /pfs/work/g2fjc/jintrac/default/modules
module load jintrac

mkdir -p $HOME/cmg/jams
cd $HOME/cmg/jams


CLONING

Code Block
git clone git@git.ccfe.ac.uk:jintrac/jams.git jams-test


BUILDING

Code Block
cd jams-test

module unload jams 
module use $HOME/cmg/jams/jams-test/modules/
module load jams

make clone MODULE=all
make

SWITCH TO TEST VERSION

Code Block
languagebash
cd java/lib/jet/misc/
git checkout JETTONamelistGUI
make


Launching


Code Block
languagebash
module use /pfs/work/g2fkoech/jintrac/v210321_gateway_v5/modules
module load jintrac/gateway.gfortran

cd ~/work/cmg/jams

jams-test/java/sh/jams







Gliffy Diagram
size1200
displayNameNamelistClassRelationship2
nameNamelistClassRelationship2
pagePin14

...