|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectspis.Util.List.PointList
spis.Util.List.PartList
Class Name : PartList
Project ref : SPIS project
File name : PartList.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 : List of particles.
Minimal extension of PointList class (by derivation) to describe a particle:
velocity and particle flag are added o position and cell index.
Performs basic operations on particles:
- applyFunc: applies a function on particles
- sort: sorts particles
They should be overriden in most derived classes (to take into account
variable particle weight or type, or to sort extra Tables...
Versions and anomalies correction :
Version number | Author (name, e-mail) | Corrections/Modifications |
0.1 | JF Roussel, roussel@onecert.fr | Creation |
Field Summary | |
protected IntScalTable |
flagT
flag of the particle: -1=no_particle=unoccupied_position 0=in_volume, 1=arrived_on_1st_surface_mesh 2=arrived_on_2nd_surface_mesh |
private FloatScalTable |
fst
temporary buffer FloatScalTable (stored in object to avoid memory-reallocation cost) |
private FloatScalTable |
fst2
temporary buffer FloatScalTable (stored in object to avoid memory-reallocation cost) |
static TestOfInt |
isEmpty
Tests whether a particle slot is unoccupied |
static TestOfInt |
isInVol
Tests whether a particle is in the volume |
static TestOfInt |
isNotInVol
Tests whether a particle is not in the volume |
static TestOfInt |
isOccupied
Tests whether a particle slot is occupied |
static TestOfInt |
isOnSurf1
Tests whether a particle is on 1st surface (boundary) |
static TestOfInt |
isOnSurf2
Tests whether a particle is on 2nd surface (spacecraft) |
protected Part |
part
physical particle type (not used in derived classes with variable particle types) |
static ModifInt |
setEmpty
Declares a particle slot is unoccupied |
static ModifInt |
setInVol
Declares a particle is in the volume |
static ModifInt |
setOnSurf1
Declares a particle is on 1st surface (boundary) |
static ModifInt |
setOnSurf2
Declares a particle is on 2nd surface (spacecraft) |
protected SurfMesh |
sm1
pointer to the surface mesh the index refers to, for particles on a first surface |
protected SurfMesh |
sm2
pointer to the surface mesh the index refers to, for particles on a second surface |
protected VeloVectTable |
veloT
velocity of the particle |
protected float |
weight
particle weight, i.e. number of physical particles represnted by a super-particle (not used in derived classes with variable particle types) |
Fields inherited from class spis.Util.List.PointList |
dim, endId, indexT, posT, startId, vm |
Constructor Summary | |
PartList(PartList pl)
copy constructor (variable arrays are copied, whereas for meshes and particle type pointers only are copied) |
|
PartList(VolMesh vm,
SurfMesh bdSurfMesh,
SurfMesh scSurfMesh,
Part particle,
float w)
Constructor of an empty list (maybe to suppress later) |
|
PartList(VolMesh vm,
SurfMesh bdSurfMesh,
SurfMesh scSurfMesh,
Part particle,
float w,
int dim)
Constructor of a list of a given dimension |
|
PartList(VolMesh vm,
SurfMesh bdSurfMesh,
SurfMesh scSurfMesh,
Part particle,
float w,
IntScalTable flagT_,
SpaceVectTable posT,
IntScalTable indexT,
VeloVectTable veloT_)
Constructor with full data |
Method Summary | |
void |
applyFunc(IntScalTable indexTable,
FunctionOfParticle f,
VectTable refDirection,
boolean intensive,
boolean indexedFunction,
ScalSurfField matModId,
ScalSurfField matId,
FloatScalTable result)
Applies the supplied function f to the particles of this list. |
void |
applyFuncDeprecated(TestOfInt selectPart,
IntScalTable selectTable,
IntScalTable indexTable,
FunctionOfParticleE f,
float factor,
FloatScalTable result)
Applies the supplied function of energy f to selected paricles, the ones verifying selectPart.testOfInt(selectVal[i]) = true. |
void |
applyFuncDeprecated(TestOfInt selectPart,
IntScalTable selectTable,
IntScalTable indexTable,
FunctionOfParticleETheta f,
VectTable refDir_,
float factor,
FloatScalTable result)
Applies the supplied function of energy and angle f to selected paricles, the ones verifying selectPart.testOfInt(selectVal[i]) = true. |
void |
applyFuncDeprecated(TestOfInt selectPart,
IntScalTable selectTable,
IntScalTable indexTable,
FunctionOfParticleNothing f,
float factor,
FloatScalTable result)
Applies the supplied function of nothing f (a constant) to selected paricles, the ones verifying selectPart.testOfInt(selectVal[i]) = true. |
void |
applyFuncDeprecated(TestOfInt selectPart,
IntScalTable selectTable,
IntScalTable indexTable,
FunctionOfParticle f,
VectTable refDir,
float factor,
FloatScalTable result)
Applies the supplied function of energy f to selected paricles, the ones verifying selectPart.testOfInt(selectVal[i]) = true. |
void |
clean(TestOfInt selectPart,
IntScalTable selectTable)
Cleans the list, excluding particles verifying selectPart.test(selectTable[i]) |
void |
computeChargeOverMass(FloatScalTable chargeOverMass)
|
void |
concat(PartList plIn)
concatenates the provided list plIn to this list. |
void |
extract(PartList plOut,
TestOfInt extractTest)
Extracts the particles of this list fullfilling the condition extractTest.test(flag) to the other list plOut. |
PartList |
extractFraction(float ratio)
extracts a fraction of the list (at random) |
void |
generateSurfaceSample(SurfMesh sm,
SurfSampler sampler,
float time)
generates a sample of particles following the passed sampler for velocities, and uniformely on surface mesh for positions. |
void |
generateVolumeSample(VolSampler sampler)
generates a sample of particles following the passed sampler for velocities, and uniformely in volume mesh for positions. |
IntScalTable |
getFlagTable()
|
TestOfInt |
getIsOnThisSurfMesh(SurfMesh sm)
|
Part |
getPart()
|
PartList |
getPartListCopy()
returns a copy of this list (to be overriden by sub-types) |
PartList |
getSimilar()
returns a similar PartList, with same subtype and particle type(s) (and fixed weight), but empty (to be overriden by sub-types (derived classes) |
SurfMesh |
getSm1()
return surface mesh 1, usually the external boundary mesh |
SurfMesh |
getSm2()
return surface mesh 2, usually the spacecraft mesh |
VeloVectTable |
getVeloTable()
|
float |
getWeight()
|
void |
init(int dim)
intialisations |
void |
initBuffers(int dim)
buffer intialisations |
void |
inject(PartList plIn)
injects the provided list plIn into this list. |
void |
setDim(int dimension)
sets the list dimension to dim: resizes the tables if needed, not preserving data (except if no resizing is needed). |
void |
setDimPreserve(int dimension)
sets the list dimension to dim: resizes the tables if needed, not preserving data (except if no resizing is needed). |
Methods inherited from class spis.Util.List.PointList |
declareDim, getDim, getEndId, getIndexTable, getPosTable, getStartId, getVm, init |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Part part
protected float weight
protected VeloVectTable veloT
protected IntScalTable flagT
protected SurfMesh sm1
protected SurfMesh sm2
public static TestOfInt isEmpty
public static TestOfInt isOccupied
public static TestOfInt isInVol
public static TestOfInt isNotInVol
public static TestOfInt isOnSurf1
public static TestOfInt isOnSurf2
public static ModifInt setEmpty
public static ModifInt setInVol
public static ModifInt setOnSurf1
public static ModifInt setOnSurf2
private FloatScalTable fst
private FloatScalTable fst2
Constructor Detail |
public PartList(VolMesh vm, SurfMesh bdSurfMesh, SurfMesh scSurfMesh, Part particle, float w)
public PartList(VolMesh vm, SurfMesh bdSurfMesh, SurfMesh scSurfMesh, Part particle, float w, int dim)
vm
- reference volume mesh of the listbdSurfMesh
- boundary surface mesh (No 1)scSurfMesh
- spacecraft surface mesh (No 2)particle
- particles this table is filled withw
- weight of the particles this table is filled withdim
- dimension of the tables to be allocatedpublic PartList(VolMesh vm, SurfMesh bdSurfMesh, SurfMesh scSurfMesh, Part particle, float w, IntScalTable flagT_, SpaceVectTable posT, IntScalTable indexT, VeloVectTable veloT_)
vm
- reference volume mesh of the listbdSurfMesh
- boundary surface mesh (No 1)scSurfMesh
- spacecraft surface mesh (No 2)particle
- particles this table is filled withw
- weight of the particles this table is filled withposT
- position tableindexT
- index tablepublic PartList(PartList pl)
Method Detail |
public void init(int dim)
public void initBuffers(int dim)
public void extract(PartList plOut, TestOfInt extractTest)
Version number | Author (name, e-mail) | Corrections/Modifications |
0.1 | JF Roussel, roussel@onecert.fr | Creation |
public void applyFunc(IntScalTable indexTable, FunctionOfParticle f, VectTable refDirection, boolean intensive, boolean indexedFunction, ScalSurfField matModId, ScalSurfField matId, FloatScalTable result)
indexTable
- array of the elements the particle belongs tof
- function to be appliedrefDirection
- reference direcction for angle dependence (usually normal to surface)intensive
- if true, intense function => average is computed instead of sumindexedFunction
- if true, applies the function with 3 extra parametersmatModId
- material model Id field (1st extra param if indexedFunction, can be null if not)matId
- material Id field (2nd extra param if indexedFunction, can be null if not)result
- result (index of the array = indexTable value)
- this PartList sub-type: RichPartList is handled
public void applyFuncDeprecated(TestOfInt selectPart, IntScalTable selectTable, IntScalTable indexTable, FunctionOfParticle f, VectTable refDir, float factor, FloatScalTable result)
public void applyFuncDeprecated(TestOfInt selectPart, IntScalTable selectTable, IntScalTable indexTable, FunctionOfParticleETheta f, VectTable refDir_, float factor, FloatScalTable result)
public void applyFuncDeprecated(TestOfInt selectPart, IntScalTable selectTable, IntScalTable indexTable, FunctionOfParticleE f, float factor, FloatScalTable result)
public void applyFuncDeprecated(TestOfInt selectPart, IntScalTable selectTable, IntScalTable indexTable, FunctionOfParticleNothing f, float factor, FloatScalTable result)
public void generateVolumeSample(VolSampler sampler)
public void generateSurfaceSample(SurfMesh sm, SurfSampler sampler, float time)
sm
- surface mesh the smapling has to done onsampler
- surface sampler => generates random velocities following a given lawtime
- physical integration duration producing that samplepublic PartList extractFraction(float ratio)
ratio
- fraction of the list to be extracted
public void inject(PartList plIn)
plIn
- input listconcat(PartList)
public void concat(PartList plIn)
plIn
- input list to concatenate to this listpublic void clean(TestOfInt selectPart, IntScalTable selectTable)
selectPart
- selectTable
- public void computeChargeOverMass(FloatScalTable chargeOverMass)
public void setDim(int dimension)
setDim
in class PointList
public void setDimPreserve(int dimension)
setDimPreserve
in class PointList
public PartList getSimilar()
public PartList getPartListCopy()
public Part getPart()
public float getWeight()
public VeloVectTable getVeloTable()
public IntScalTable getFlagTable()
public SurfMesh getSm1()
public SurfMesh getSm2()
public TestOfInt getIsOnThisSurfMesh(SurfMesh sm)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |