spis.Util.Part
Class PartTable

java.lang.Object
  extended byspis.Util.Part.PartTable

public class PartTable
extends java.lang.Object

Class Name : PartTable
Project ref : SPIS project
File name : Part.java
File type : class
Copyright : ONERA, 2 Av. E. Belin, 31055 Toulouse cedex, France http://www.onecert.fr
Status : under development
Creation : 25/08/2003
Modification :

Description : Particle Table
Table of the physical particles.
Still under work because the current implementation (Vector of Part) may not be very efficient

Versions and anomalies correction :

Version numberAuthor (name, e-mail) Corrections/Modifications
0.1 JF Roussel, roussel@onecert.frCreation


Version:
0.1
Author:
JF Roussel

Field Summary
private  int dim
          number of particle types
private  Part[] partA
          table of particle types
private  float[] partCharge
          table of particles charges (extracted from Part[] particles, hence redundant, the faithful original being particles)
private  float[] partChargeOverMass
          table of particles charge over masses ratios (extracted from Part[] particles, hence redundant, the faithful original being particles)
private  float[] partMass
          table of particles masses (extracted from Part[] particles, hence redundant, the faithful original being particles)
 
Constructor Summary
PartTable(Part[] partArray)
          Default constructor
 
Method Summary
 float[] getChargeArray()
          Returns the array of the charges of each particle type (array index = particle type)
 float[] getChargeOverMassArray()
          Returns the array of the q/m ratios of each particle type (array index = particle type)
 int getDim()
           
 float[] getMassArray()
          Returns the array of the masses of each particle type (array index = particle type)
 Part[] getPartArray()
           
 Part getPartNamed(java.lang.String partName)
          Returns the particle of the table named partName.
 int indexOf(Part particleType)
          Returns the index of the particle particleType in this table of particles (-1 if not found)
 int indexOfAdd(Part particleType)
          Returns the index of the particle particleType in this table of particles, adding it at the end of the list if necessary (hence not changing other particles indexing)
private  void map(IntScalTable partTypeT, FloatScalTable mappedValuesT, float[] valuesToMap)
          Maps valuesToMap onto mappedValuesT following partTypeIdT indexation
 void mapCharge(IntScalTable partTypeT, FloatScalTable chargeT)
          Maps particle charges onto chargeT (particle types are partTypeIdT).
 void mapChargeOverMass(IntScalTable partTypeT, FloatScalTable chargeOverMassT)
          Maps particle q/m ratios onto chargeOverMassT (particle types are partTypeIdT).
 void mapMass(IntScalTable partTypeT, FloatScalTable massT)
          Maps particle masses onto massT (particle types are partTypeIdT).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

partA

private Part[] partA
table of particle types


dim

private int dim
number of particle types


partCharge

private float[] partCharge
table of particles charges (extracted from Part[] particles, hence redundant, the faithful original being particles)


partMass

private float[] partMass
table of particles masses (extracted from Part[] particles, hence redundant, the faithful original being particles)


partChargeOverMass

private float[] partChargeOverMass
table of particles charge over masses ratios (extracted from Part[] particles, hence redundant, the faithful original being particles)

Constructor Detail

PartTable

public PartTable(Part[] partArray)
Default constructor

Method Detail

indexOf

public int indexOf(Part particleType)
Returns the index of the particle particleType in this table of particles (-1 if not found)

Parameters:
particleType -
Returns:

indexOfAdd

public int indexOfAdd(Part particleType)
Returns the index of the particle particleType in this table of particles, adding it at the end of the list if necessary (hence not changing other particles indexing)

Parameters:
particleType -
Returns:

getPartNamed

public Part getPartNamed(java.lang.String partName)
Returns the particle of the table named partName. Throws an exception if not found.

Parameters:
partName -
Returns:
particle (of type Part)
Throws:
SpisParameterNotFoundException

getChargeArray

public float[] getChargeArray()
Returns the array of the charges of each particle type (array index = particle type)


getMassArray

public float[] getMassArray()
Returns the array of the masses of each particle type (array index = particle type)


getChargeOverMassArray

public float[] getChargeOverMassArray()
Returns the array of the q/m ratios of each particle type (array index = particle type)


mapCharge

public void mapCharge(IntScalTable partTypeT,
                      FloatScalTable chargeT)
Maps particle charges onto chargeT (particle types are partTypeIdT).
NB: it is often more efficient to use the mapping array obtained through getChargeArray().


mapMass

public void mapMass(IntScalTable partTypeT,
                    FloatScalTable massT)
Maps particle masses onto massT (particle types are partTypeIdT).
NB: it is often more efficient to use the mapping array obtained through getMassArray().


mapChargeOverMass

public void mapChargeOverMass(IntScalTable partTypeT,
                              FloatScalTable chargeOverMassT)
Maps particle q/m ratios onto chargeOverMassT (particle types are partTypeIdT).
NB: it is often more efficient to use the mapping array obtained through getChargeOverMassArray().


map

private void map(IntScalTable partTypeT,
                 FloatScalTable mappedValuesT,
                 float[] valuesToMap)
Maps valuesToMap onto mappedValuesT following partTypeIdT indexation


getDim

public int getDim()
Returns:

getPartArray

public Part[] getPartArray()
Returns: