mathcomp.assemble.cfd
Class NSMiniFPIAssembler

java.lang.Object
  extended by mathcomp.monitor.DefaultReportable
      extended by mathcomp.monitor.DefaultAlgorithm
          extended by mathcomp.assemble.Assembler
              extended by mathcomp.assemble.stokes.StokesAssembler
                  extended by mathcomp.assemble.cfd.NavierStokesAssembler
                      extended by mathcomp.assemble.cfd.NSMiniAssembler
                          extended by 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


Field Summary
 Vector oldSolution
           
 Vector stokesY
           
 
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
 
Fields inherited from class mathcomp.assemble.Assembler
dirichletBoundaryValues, solScale
 
Fields inherited from interface mathcomp.run.IteratedAssembler
tolerance
 
Constructor Summary
NSMiniFPIAssembler()
           
 
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.NSMiniAssembler
createDof, evalApproxGradientU1, evalApproxGradientU2, evalApproxSolutionPressure, evalApproxSolutionU1, evalApproxSolutionU2, evalBasisFuncOnRefPressure, evalBasisFuncOnRefVelocity, evalBasisGradOnRefVelocity, getLocalNodeNumber
 
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 mathcomp.monitor.DefaultAlgorithm
algoAbortIfNeeded, algoCancel, algoClear, algoCount, algoIncrement, algoMax, isAlgoCancel, setAlgoCount, setAlgoMax
 
Methods inherited from class mathcomp.monitor.DefaultReportable
getReport, setReport
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface mathcomp.monitor.Reportable
getReport, setReport
 

Field Detail

oldSolution

public Vector oldSolution

stokesY

public Vector stokesY
Constructor Detail

NSMiniFPIAssembler

public NSMiniFPIAssembler()
Method Detail

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 iteration
yy - 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)