|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectspis.Vol.VolMesh.VolMesh
spis.Vol.VolMesh.UnstructVolMesh
spis.Vol.VolMesh.ThreeDUnstructVolMesh
Class Name : ThreeDUnstructVolMesh (generic Volume Mesh class)
Project ref : SPIS project
File name : ThreeDUnstructVolMesh.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 : 3-dimensional Unstructured Volume Mesh class (tetrahedra only).
Derives from UnstructVolMesh class.
Most methods and data shall be implemented at this level.
Constraints on cell/surf/edge/node numbering:
- the i-th cellNode of a cell must be "opposite" the i-th cellSurf
(i-th node does not belong to i-th surface)
- the i-th surfNode of a surf must be "opposite" the i-th surfEdge
- ...
Versions and anomalies correction :
Version number | Author (name, e-mail) | Corrections/Modifications |
0.1 | JF Roussel, roussel@onecert.fr and D Volpert, Dominique.Volpert@cert.fr | Creation |
Constructor Summary | |
ThreeDUnstructVolMesh(Geom geometry,
ThreeDUnstructSurfMesh boundarySurfMesh,
ThreeDUnstructSurfMesh scSurfMesh,
int cellNbr,
int surfNbr,
int edgeNbr,
int nodeNbr,
int[][] cellSurfs,
int[][] cellEdges,
int[][] cellNodes,
int[][] surfEdges,
int[][] surfNodes,
int[][] edgeNodes,
int[] surfFlags,
int[] surfIdSC,
int[] surfIdB,
int[] edgeFlags,
int[] edgeIdSC,
int[] edgeIdB,
int[] nodeFlags,
int[] nodeIdSC,
int[] nodeIdB,
float[][] xyzCoord)
Main constructor with basic sufficient data provided. |
Method Summary | |
void |
advance(PartList pl,
VectTable dx)
Advances the particles of particle list pl from their current position to their next position, defined by the shift vector dx. |
float[] |
applyScalFunction(Centring centring,
ScalFunctionOfVect f)
Applies a function of the position to the nodes (or surfaces/cells... depending on centring), and returns the result (f(xi,yi,zi)) as a float array. |
float[][] |
applyVectFunction(Centring centring,
VectFunctionOfVect f)
Applies a vectorial function of the position to the nodes (or surfaces/cells... depending on centring), and returns the result (f(xi,yi,zi)) as a float[i][] array. |
void |
computeBarCo(float[] barCo,
float x,
float y,
float z,
int cellNo)
Computes barycentric coordinates barCo from cartesian coordinates with origin at first tetrahedron point (x = xParticle - xPoint1) for a point (x, y, z) in cell cellNo. |
void |
computeGradient(PointList pl,
ScalVolField vf,
VectTable val)
Similar to Interpolate, but the gradient of a volume field is computed. |
void |
computeNormals()
Computes surface normals and makes a few checks. |
void |
currentDeposit(PartList pl,
VectVolField cur)
Performs the PIC deposit of current of the particle list pl in the current density cur. |
void |
deposit(PartList pl,
ScalVolField dens,
int charge,
int mass)
Performs the PIC deposit of charges of the particle list pl in the density dens (dens is incremented, reset it before if you want to start from 0). |
void |
export()
exports the mesh(es) |
int[][] |
getCellEdge()
Returns the table of the edges of a cell (6 edges of the tetrahedron) |
int[][] |
getCellNode()
Returns the table of the nodes of a cell (4 points of the tetrahedron) |
int[][] |
getCellSurf()
Returns the table of the surfaces of a cell (4 triangles of the tetrahedron) |
float[] |
getCellVol()
Returns cell volumes |
ScalVolField |
getCellVolField()
Returns 'node volumes' |
int[] |
getEdgeFlag()
Returns the flags of the volume mesh edges |
int[] |
getEdgeIndexB()
Returns the boundary-surface indices of the volume mesh edges |
int[] |
getEdgeIndexSC()
Returns the SC-surface indices of the volume mesh edges |
float[] |
getEdgeLength()
Returns edges lengths |
int[][] |
getEdgeNode()
Returns the table of the nodes of an edge (2 points of an edge) |
int |
getElNb(Centring cent)
Provides the number of elements for a field with this centring (on nodes/cells/...). |
int |
getElNb(int relDim)
Returns the number of elements of relative dimension relDim |
int[] |
getExternNodeNumberingMap()
Returns the map of external node numbering. |
IntScalTable |
getInjectionCell(IntScalTable flagTable,
IntScalTable indexTable)
Returns the table of the cell indices of particles particles injected from boundaries. |
int[] |
getInternNodeNumberingMap()
Returns the map of internal node numbering. |
float[][] |
getNodeCoord()
Returns nodes coordinates |
int[] |
getNodeFlag()
Returns the flags of the volume mesh nodes |
int[] |
getNodeIndexB()
Returns the boundary-surface indices of the volume mesh nodes |
int[] |
getNodeIndexSC()
Returns the SC-surface indices of the volume mesh nodes |
float[] |
getNodeVol()
Returns 'node volumes' as a float array |
ScalVolField |
getNodeVolField()
Returns 'node volumes' as a volume field |
float[] |
getSurfArea()
Returns surface areas |
int[][] |
getSurfCell()
Returns the table of the cells surrounding a surface (2 tetrahedra, one on each side of a triangle) |
int[][] |
getSurfEdge()
Returns the table of the edges of a surface (3 edges of a triangle) |
int[] |
getSurfFlag()
Returns the flags of the volume mesh triangles |
int[] |
getSurfIndexB()
Returns the boundary-surface indices of the volume mesh triangles |
int[] |
getSurfIndexSC()
Returns the SC-surface indices of the volume mesh triangles |
int[][] |
getSurfNode()
Returns the table of the nodes of a surface (3 points of a triangle) |
float[][] |
getSurfNormal()
Returns surface normals |
float[][][] |
getToBarCo()
Returns the matrices to get the barycentric coordinates in each cell |
void |
initialise()
Performs extra mesh initialisations. |
void |
interpolate(PointList pl,
VolField vf,
Table val)
Interpolates the volume field vf (defined on the mesh nodes/cells/...) |
boolean |
isNodeRenumberingOn()
|
void |
mapToExternalNodeIndexing(float[] array)
Transforms an internal-node-number-indexed array of node-centered quantities to an external-node-number-indexed array on the spot (i.e. in the same array). |
void |
mapToExternalNodeIndexing(float[][] internIndexed,
float[][] externIndexed)
Maps node-centered quantities from an internal-node-number-indexed array to an external-node-number-indexed array. |
void |
mapToExternalNodeIndexing(float[] internIndexed,
float[] externIndexed)
Maps node-centered quantities from an internal-node-number-indexed array to an external-node-number-indexed array. |
void |
mapToInternalNodeIndexing(float[] array)
Transforms an external-node-number-indexed array of node-centered quantities to an internal-node-number-indexed array on the spot (i.e. in the same array). |
void |
mapToInternalNodeIndexing(float[][] externIndexed,
float[][] internIndexed)
Maps node-centered quantities from an external-node-number-indexed array to an internal-node-number-indexed array. |
void |
mapToInternalNodeIndexing(float[] externIndexed,
float[] internIndexed)
Maps node-centered quantities from an external-node-number-indexed array to an internal-node-number-indexed array. |
void |
mapToInternalNodeIndexing(int[] array)
Transforms an external-node-number-indexed array of node-centered integer quantities to an internal-node-number-indexed array on the spot (i.e. in the same array). |
void |
mapToInternalNodeIndexing(int[] externIndexed,
int[] internIndexed)
Maps integer node-centered quantities from an external-node-number-indexed array to an internal-node-number-indexed array. |
void |
mapToSurfField(ScalVolField fIn,
ScalSurfField fOut,
int flag)
Maps a volume field onto a surface fields. |
void |
poissonSolve(VectVolField E,
ScalVolField dens,
PoissonBC bc)
Solves Poison equation for electric field E (indeed for the potential from which it derives if E is stored as a potential, i.e. of sub-type PotVectVolField) and density dens. |
void |
samplePos(IntScalTable indexT,
SpaceVectTable posT)
Performs a random sampling of particle positions. |
void |
setInternNodeNumbering(int[] internNumbering)
Defines external to internal node numbering maps, external to internal maps, and renumbers node-indexed arrays with the internal numbering (for related surface meshes scsm and bsm too). |
void |
setNodeRenumbering(boolean b)
|
Methods inherited from class spis.Vol.VolMesh.VolMesh |
eulerSolve, getBsm, getGeom, getScsm, getTotalVol, maxwellSolve, mhdSolve, setBsm, setScsm |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ThreeDUnstructVolMesh(Geom geometry, ThreeDUnstructSurfMesh boundarySurfMesh, ThreeDUnstructSurfMesh scSurfMesh, int cellNbr, int surfNbr, int edgeNbr, int nodeNbr, int[][] cellSurfs, int[][] cellEdges, int[][] cellNodes, int[][] surfEdges, int[][] surfNodes, int[][] edgeNodes, int[] surfFlags, int[] surfIdSC, int[] surfIdB, int[] edgeFlags, int[] edgeIdSC, int[] edgeIdB, int[] nodeFlags, int[] nodeIdSC, int[] nodeIdB, float[][] xyzCoord)
Method Detail |
public void initialise()
public void computeNormals()
public void interpolate(PointList pl, VolField vf, Table val)
interpolate
in class VolMesh
public void computeGradient(PointList pl, ScalVolField vf, VectTable val)
computeGradient
in class VolMesh
VolMesh.interpolate(PointList, VolField, Table)
public void advance(PartList pl, VectTable dx)
advance
in class VolMesh
public void computeBarCo(float[] barCo, float x, float y, float z, int cellNo)
barCo
- outputx
- y
- z
- cellNo
- public void deposit(PartList pl, ScalVolField dens, int charge, int mass)
deposit
in class VolMesh
public void currentDeposit(PartList pl, VectVolField cur)
currentDeposit
in class VolMesh
public void poissonSolve(VectVolField E, ScalVolField dens, PoissonBC bc)
poissonSolve
in class VolMesh
public void samplePos(IntScalTable indexT, SpaceVectTable posT)
samplePos
in class VolMesh
indexT
- posT
- public void mapToInternalNodeIndexing(float[] externIndexed, float[] internIndexed)
mapToInternalNodeIndexing
in class VolMesh
public void mapToInternalNodeIndexing(int[] externIndexed, int[] internIndexed)
public void mapToInternalNodeIndexing(float[][] externIndexed, float[][] internIndexed)
mapToInternalNodeIndexing
in class VolMesh
public void mapToExternalNodeIndexing(float[] internIndexed, float[] externIndexed)
mapToExternalNodeIndexing
in class VolMesh
public void mapToExternalNodeIndexing(float[][] internIndexed, float[][] externIndexed)
mapToExternalNodeIndexing
in class VolMesh
public void mapToInternalNodeIndexing(float[] array)
public void mapToInternalNodeIndexing(int[] array)
public void mapToExternalNodeIndexing(float[] array)
public void setInternNodeNumbering(int[] internNumbering)
public float[] applyScalFunction(Centring centring, ScalFunctionOfVect f)
applyScalFunction
in class VolMesh
public float[][] applyVectFunction(Centring centring, VectFunctionOfVect f)
applyVectFunction
in class VolMesh
public void mapToSurfField(ScalVolField fIn, ScalSurfField fOut, int flag)
mapToSurfField
in class VolMesh
public void export()
public IntScalTable getInjectionCell(IntScalTable flagTable, IntScalTable indexTable)
getInjectionCell
in class VolMesh
flagTable
- flag of the particles (on SC or on boundary, cf PartList)indexTable
- surface index for a particle on a surface mesh
public int[] getInternNodeNumberingMap()
public int[] getExternNodeNumberingMap()
public int getElNb(Centring cent)
getElNb
in class VolMesh
public int getElNb(int relDim)
getElNb
in class VolMesh
public int[][] getCellSurf()
public int[][] getCellEdge()
public int[][] getCellNode()
public int[][] getSurfEdge()
public int[][] getSurfNode()
public int[][] getEdgeNode()
public int[][] getSurfCell()
public int[] getSurfFlag()
public int[] getSurfIndexSC()
public int[] getSurfIndexB()
public int[] getEdgeFlag()
public int[] getEdgeIndexSC()
public int[] getEdgeIndexB()
public int[] getNodeFlag()
public int[] getNodeIndexSC()
public int[] getNodeIndexB()
public float[][] getNodeCoord()
public float[] getCellVol()
public ScalVolField getCellVolField()
getCellVolField
in class VolMesh
public float[] getSurfArea()
public float[] getEdgeLength()
public float[] getNodeVol()
public ScalVolField getNodeVolField()
getNodeVolField
in class VolMesh
public float[][] getSurfNormal()
public float[][][] getToBarCo()
public boolean isNodeRenumberingOn()
public void setNodeRenumbering(boolean b)
b
- true if node renumbering is on (defined by CutHill McKee renumbering)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |