|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectspis.Surf.InteractModel.FunctionOfParticle
Class Name : FunctionOfParticle
Project ref : SPIS project
File name : FunctionOfParticle.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 : general microscopic function class (i.e. a function of
a single particle kinematic parameters, i.e. energy, impact angle...)
All microscopic function classes must be derived form this class.
For a given particle with defined energy an/or angle to normal, etc.,
it gives a scalar (which can e.g. be a yield, an energy of secondary
particles, etc.)
The function can be hard-coded in a derived class.
A simpler way is to use the default derived classes which compute the function
from tabulated values versus particles energy and/or angle
(TabulatedFunctionOfParticleE).
This class should not be directly derived, but one should rather
derive again one of its derived classes (FunctionOfParticleE, etc.),
which enforces defining:
1- the function of particle kinematic parameter(s) (E, E+theta, or nothing)
2- the same function of 3 extra parameters (material model Id,material Id,
particle Id) which was specially designed for material interactions
These extra parameters (the material model Id and particle Id) refer to
a material model array and a particle type table.
It must be checked that the array these Ids refer to is the same as the array
the FunctionOfParticle was based upon, hence the refence to these arrays
requested in the constructor (can be null if the function with 3 extra
parameters is not used)
NB: compare to FunctionOfDistrib, which does the same job for a whole distribution.
Versions and anomalies correction :
Version number | Author (name, e-mail) | Corrections/Modifications |
0.1 | JF Roussel, roussel@onecert.fr | Creation |
Field Summary | |
protected int |
defaultParamsId
Id of the default parameter sets, that may be used by non-material-indexed compute(E) methods of derived classes |
protected int |
materialRange
range of acceptable material Ids is [0, materialRange-1] |
protected int |
modelId
Id of the material model this Function is related to (the material Id is local to this material model), if negative accepts any model Id |
protected int |
particleId
Id of the particle type this Function only accepts (this particle Id itself refers to the PartTable contained in FunctionOfParticle parent class), if negative accepts any particle type Id |
protected PartTable |
partTable
reference to the table of particle types the particle Id refers to in the second version of the function (with parameters) |
Constructor Summary | |
FunctionOfParticle(int materialRange,
int modelId,
int particleId,
PartTable partTable)
Default constructor: request a reference to a material model array and a particle type table. |
Method Summary | |
abstract float |
compute(float[] velocity,
float mass,
float[] normal)
generic interface allowing the computation of the function depending on particle energy, energy and angle to normal, or on nothing |
abstract float |
compute(float[] velocity,
float mass,
float[] normal,
float matModId,
float matId,
float partId)
generic interface allowing the computation of the function depending on particle energy, energy and angle to normal, or on nothing, and on the Ids of material model, material and particle |
int |
getDefaultParamsId()
|
int |
getMaterialRange()
|
int |
getModelId()
|
int |
getParticleId()
|
PartTable |
getPartTable()
|
protected int |
selectParamSet(float matModId,
float matId,
float partId)
selects the right parameter set if conditions are fulfilled |
void |
setDefaultParams(int matId)
Defines the default parameter set as the internal paramSet of Id matId (amounts to selecting material matId) (may be used by non-material-indexed compute(E) function of derived classes) NB: this could also be defined at higher level (FunctionOfPart), but not useful for now |
void |
setDefaultParamsId(int defaultParamsId)
|
void |
setMaterialRange(int materialRange)
|
void |
setModelId(int modelId)
|
void |
setParticleId(int particleId)
|
void |
setPartTable(PartTable table)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int materialRange
protected int modelId
protected int particleId
protected PartTable partTable
protected int defaultParamsId
Constructor Detail |
public FunctionOfParticle(int materialRange, int modelId, int particleId, PartTable partTable)
materialRange
- range of acceptable material Ids is [0, materialRange-1] (any material if negative)modelId
- Id of the acceptable model Id to use this function of Particle (any, if negative)particleId
- Id of the acceptable particle Id to use this function of Particle (any, if negative)partTable
- particle table the particleId refers toMethod Detail |
public abstract float compute(float[] velocity, float mass, float[] normal)
velocity
- particle velocitymass
- particle mass [amu]normal
- vector defining the angle origin
public abstract float compute(float[] velocity, float mass, float[] normal, float matModId, float matId, float partId)
velocity
- particle velocitymass
- particle mass [amu]normal
- vector defining the angle originmatModId
- material model IdmatId
- material IdpartId
- particle Id
public void setDefaultParams(int matId)
matId
- public PartTable getPartTable()
public void setPartTable(PartTable table)
table
- public int getModelId()
public void setModelId(int modelId)
modelId
- The modelId to set.public int getParticleId()
public void setParticleId(int particleId)
particleId
- The particleId to set.protected int selectParamSet(float matModId, float matId, float partId)
public int getDefaultParamsId()
public void setDefaultParamsId(int defaultParamsId)
defaultParamsId
- The defaultParamsId to set.public int getMaterialRange()
public void setMaterialRange(int materialRange)
materialRange
- The materialRange to set.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |