mathcomp.assemble.cfd
Class NSMiniFPIAssembler
java.lang.Object
mathcomp.monitor.DefaultReportable
mathcomp.monitor.DefaultAlgorithm
mathcomp.assemble.Assembler
mathcomp.assemble.stokes.StokesAssembler
mathcomp.assemble.cfd.NavierStokesAssembler
mathcomp.assemble.cfd.NSMiniAssembler
mathcomp.assemble.cfd.NSMiniFPIAssembler
- All Implemented Interfaces:
- java.lang.Runnable, Algorithm, Reportable, IteratedAssembler
- Direct Known Subclasses:
- FilamentAssembler, NSMini_BUCanal, NSMiniHomogen, NSMiniOseen, NSMiniOseenTesterA
public abstract class NSMiniFPIAssembler
- extends NSMiniAssembler
- implements IteratedAssembler
Fields inherited from class mathcomp.assemble.cfd.NavierStokesAssembler |
alpha, beta, BOUNDARY_FRICTION, BOUNDARY_GLUE, BOUNDARY_INFLOW, BOUNDARY_OUTFLOW, BOUNDARY_SLIP, INIT_ALPHA, INIT_BETA, INIT_DUCT_RADIUS, INIT_MAXITER, INIT_STARTTIME, INIT_STEPTIME, INIT_STOPTIME, INIT_TOLERANCE, INIT_VELOCITY, INIT_VISCOSITY, IS_ITERATIVE, IS_TIMEDEPENDANT, NO_BOUNDARY, type |
Fields inherited from class mathcomp.assemble.stokes.StokesAssembler |
gaussPoints, gaussWeights |
Method Summary |
void |
assembleGlobal()
The main assemble method generally called from outside. |
double |
getIt()
if x(k+1)=x(k)+g(x(k)) returns 0 (NewtonAssembler), if x(k+1)=g(x(k)) returns -1 (FixedPointAssembler); |
double |
getOldArea()
|
Vector |
getOldSolution()
|
void |
init()
|
int |
initializeFP()
this method is used to decide if some iterations should be done using fixed point iteration
before using the Newton's method, since this one only converges if the first iteration is enough
close to the exact solution. |
boolean |
isDamped()
|
boolean |
isToContinue(Vector x)
this method defines if the iterative solver stops or continues. |
void |
setMyTolerance(double myTolerance)
|
void |
setOldSolution(Vector oldSolution)
|
void |
setOldSolution(Vector x,
Vector yy)
This method is used to set the previous iteration that is used to calculate the new iteration |
Methods inherited from class mathcomp.assemble.cfd.NavierStokesAssembler |
addDirichletNodes, addToM, addToY, calcDirichletBoundary, calcUnitNormals, getBoundaryNodes, getParameterBox, getType, isFinalRun, setFP_parameters, setIterationState, setParameterBox |
Methods inherited from class mathcomp.assemble.stokes.StokesAssembler |
createSurfaces, evalApproxSolution, evalExactGradientU1, evalExactGradientU2, evalExactSolution, evalExactSolutionPressure, evalExactSolutionU1, evalExactSolutionU2, evalF, evalF1, evalF2, getDirichletValueAt, getErrorCalculator, getPaintNodes, getViscosity, setViscosity |
Methods inherited from class mathcomp.assemble.Assembler |
createSurfaces, evalApproxGradient, evalExactGradient, getDof, getElementMatrix, getEpsilon, getExactPartialX, getExactPartialY, getGrid, getInfoUrl, getM, getPreferredGridFileName, getSolScale, getY, report, run, setEpsilon, setGrid, setM, setTauIndex, setY, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
oldSolution
public Vector oldSolution
stokesY
public Vector stokesY
NSMiniFPIAssembler
public NSMiniFPIAssembler()
isToContinue
public boolean isToContinue(Vector x)
- Description copied from interface:
IteratedAssembler
- this method defines if the iterative solver stops or continues. The tolerance is used in this method
- Specified by:
isToContinue
in interface IteratedAssembler
- Parameters:
x
- solution of the system of linear equations
- Returns:
- true if it should contine or false if it should stop
assembleGlobal
public void assembleGlobal()
- Description copied from class:
Assembler
- The main assemble method generally called from outside. It once
calculates the boundary, the global DOFs and the Dirichlet values. Then
Matrix m and right side Vector y are created. Finally an iteration over
all elements calls
assemble(Grid g, Triangle t, Matrix m)
for each element.
- Overrides:
assembleGlobal
in class NavierStokesAssembler
init
public void init()
- Specified by:
init
in interface IteratedAssembler
setOldSolution
public void setOldSolution(Vector x,
Vector yy)
- Description copied from interface:
IteratedAssembler
- This method is used to set the previous iteration that is used to calculate the new iteration
- Specified by:
setOldSolution
in interface IteratedAssembler
- Overrides:
setOldSolution
in class NavierStokesAssembler
- Parameters:
x
- the previous iterationyy
- it's only used in damped Newton's method
getOldArea
public double getOldArea()
- Specified by:
getOldArea
in interface IteratedAssembler
getIt
public double getIt()
- Description copied from interface:
IteratedAssembler
- if x(k+1)=x(k)+g(x(k)) returns 0 (NewtonAssembler), if x(k+1)=g(x(k)) returns -1 (FixedPointAssembler);
- Specified by:
getIt
in interface IteratedAssembler
initializeFP
public int initializeFP()
- Description copied from interface:
IteratedAssembler
- this method is used to decide if some iterations should be done using fixed point iteration
before using the Newton's method, since this one only converges if the first iteration is enough
close to the exact solution.
- Specified by:
initializeFP
in interface IteratedAssembler
- Returns:
- 0 (if no iterations should be done using fixed point iteration) or the number of iterations
that should be done to initialize the iterative solver
isDamped
public boolean isDamped()
- Specified by:
isDamped
in interface IteratedAssembler
- Returns:
- true if the iterative solver is damped and false if is not
setMyTolerance
public void setMyTolerance(double myTolerance)
getOldSolution
public Vector getOldSolution()
- Overrides:
getOldSolution
in class NavierStokesAssembler
setOldSolution
public void setOldSolution(Vector oldSolution)