|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--gov.sns.tools.math.r3.Grid
|
+--gov.sns.tools.math.r3.PoissonGrid
Solves Poisson's equation for a potential function defined on a grid in R3.
The grid object then solved the discretized version of
Div Grad
| Field Summary | |
static int |
PT_DIRICHLET
Grid point is a boundary point with Dirichlet boundary conditions |
static int |
PT_NEUMANN1
Grid point with Neumann boundary conditions, gradient in the first direction |
static int |
PT_NEUMANN2
Grid point with Neumann boundary conditions, gradient in the second direction |
static int |
PT_NEUMANN3
Grid point with Neumann boundary conditions, gradient in the third direction |
static int |
PT_OPEN
Grid point is in an open region |
static int |
PT_UNDEFINED
Grid point type is undefined |
| Constructor Summary | |
PoissonGrid(int n1,
int n2,
int n3)
Allocate a new PotentialGrid |
|
| Method Summary | |
protected gov.sns.tools.math.r3.Grid.GridCell[][][] |
allocateCells(int n1,
int n2,
int n3)
Override base class allocator in order to allocate modified grid cell objects. |
protected gov.sns.tools.math.r3.Grid.GridPt[][][] |
allocatePts(int n1,
int n2,
int n3)
Override base class allocator in order to allocate modified grid point objects. |
R3 |
fieldCartesian(R3 pt)
Compute and return the field in cartesian coordinates at point pt as generated by the potential values on the grid. |
R3 |
fieldCylindrical(R3 pt)
Compute and return the field in cylindrical coordinates at point pt as generated by the potential values on the grid. |
R3 |
fieldSpherical(R3 pt)
Compute and return the field in spherical coordinates at point pt as generated by the potential values on the grid. |
protected gov.sns.tools.math.r3.PoissonGrid.Point |
getPt(int i,
int j,
int k)
Return grid point object located with index (i,j,k) |
double |
potential(R3 pt)
Compute and return interpolated potential at a point pt within grid definition. |
protected double[] |
relaxWeightsCartesian()
Compute the weighting coefficients of this grid for a Gauss-Seidel relaxation solution technique for Poisson's equation. |
protected double[] |
relaxWeightsCylindrical(double r)
Compute the weighting coefficients of this grid for a Gauss-Seidel relaxation solution technique for Poisson's equation. |
void |
setPtPotential(int i,
int j,
int k,
double dblPot)
Set the potential value at grid point given by index |
void |
setPtSource(int i,
int j,
int k,
double dblSrc)
Set the source value at grid point given by index |
void |
setPtType(int i,
int j,
int k,
int enmType)
Set the type of the grid point given by index |
double |
solveCartesian(int intIterMax,
double dblErrMax)
Solve for the potential on the grid using a gauss-seidel relaxation technique. |
double |
solveCylindrical(int intIterMax,
double dblErrMax)
Solve for the potential on the grid using a gauss-seidel relaxation technique. |
| Methods inherited from class gov.sns.tools.math.r3.Grid |
compCellContaining, compCellIndex, compPtCoords, compPtCoords, getGridCell, getGridCell, getGridDomain, getGridOrigin, getGridPt, getGridPt, getGridResolution, getGridSize, getPtValue, interpolateGradient, interpolateValue, main, membershipGrid, print, setGridDomain, setPtValue |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int PT_UNDEFINED
public static final int PT_OPEN
public static final int PT_DIRICHLET
public static final int PT_NEUMANN1
public static final int PT_NEUMANN2
public static final int PT_NEUMANN3
| Constructor Detail |
public PoissonGrid(int n1,
int n2,
int n3)
throws GridException
n1 - number of grid points in first dimensionn2 - number of grid points in second dimensionn3 - number of grid points in third dimension
GridException - invalid size vector encountered| Method Detail |
public void setPtPotential(int i,
int j,
int k,
double dblPot)
i - x dimension index of grid pointj - y dimension index of grid pointk - z dimension index of grid pointdblPot - value of the potential at grid point (i,j,k)
public void setPtType(int i,
int j,
int k,
int enmType)
i - x dimension index of grid pointj - y dimension index of grid pointk - z dimension index of grid pointenmType - type enumeration of grid point (i,j,k)
public void setPtSource(int i,
int j,
int k,
double dblSrc)
i - x dimension index of grid pointj - y dimension index of grid pointk - z dimension index of grid pointdblSrc - value of the driving source at grid point (i,j,k)
public double solveCartesian(int intIterMax,
double dblErrMax)
throws GridException
intIterMax - maximum number of iterationsdblErrMax - maximum residual error
GridException - procedure did not converge to prescribed residual error
public double solveCylindrical(int intIterMax,
double dblErrMax)
throws GridException
intIterMax - maximum number of iterationsdblErrMax - maximum residual error
GridException - procedure did not converge to prescribed residual error
public double potential(R3 pt)
throws GridException
pt - coordinates of field point within grid
GridException - point pt is outside grid domain
public R3 fieldCartesian(R3 pt)
throws GridException
pt - field point to compute field
GridException - field undefined or pt is outside grid
public R3 fieldCylindrical(R3 pt)
throws GridException
pt - field point to compute field
GridException - field undefined or pt is outside grid
public R3 fieldSpherical(R3 pt)
throws GridException
pt - field point to compute field
GridException - field undefined or pt is outside grid
protected gov.sns.tools.math.r3.PoissonGrid.Point getPt(int i,
int j,
int k)
protected gov.sns.tools.math.r3.Grid.GridPt[][][] allocatePts(int n1,
int n2,
int n3)
throws GridException
allocatePts in class Gridn1 - size of the first dimensionn2 - size of the second dimensionn3 - size of the third dimension
GridException - unable to allocate array
protected gov.sns.tools.math.r3.Grid.GridCell[][][] allocateCells(int n1,
int n2,
int n3)
throws GridException
allocateCells in class Gridn1 - size of the first dimensionn2 - size of the second dimensionn3 - size of the third dimension
GridException - unable to allocate arrayprotected double[] relaxWeightsCartesian()
protected double[] relaxWeightsCylindrical(double r)
r - the radius at which the weights are determined
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||