mathcomp.assemble.cfd
Class NSMiniAssembler

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
All Implemented Interfaces:
java.lang.Runnable, Algorithm, Reportable
Direct Known Subclasses:
NSMiniFPIAssembler, NSMiniOseenAssembler, NSTimeOseenSIAssembler, StokesTimeTester

public abstract class NSMiniAssembler
extends NavierStokesAssembler


Field Summary
 
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
 
Constructor Summary
NSMiniAssembler()
           
 
Method Summary
 void createDof(Grid grid, java.util.Set dof)
          All global Objects, that represent a degreeOfFreedom are added to dof.
 double[] evalApproxGradientU1(Node n, Triangle t, Vector x)
          For H1 error calculations we need to know the gradient of the approximated solution in a node n.
 double[] evalApproxGradientU2(Node n, Triangle t, Vector x)
          For H1 error calculations we need to know the gradient of the approximated solution in a node n.
 double evalApproxSolutionPressure(Node n, Triangle t, Vector x)
          Evaluates the FEM solution for the pressure in a Node.
 double evalApproxSolutionU1(Node n, Triangle t, Vector x)
          Evaluates the FEM solution for the first component of the velocity field in a Node.
 double evalApproxSolutionU2(Node n, Triangle t, Vector x)
          Evaluates the FEM solution for the second component of the velocity field in a Node.
 double evalBasisFuncOnRefPressure(Node u, int localBasisNumber)
          Returns the value of the basis function used to discretize the pressure at the Node u on the reference triangle.
 double evalBasisFuncOnRefVelocity(Node u, int localBasisNumber)
          Returns the value of the basis function used to discretize the velocity field at the Node u on the reference triangle.
 double[] evalBasisGradOnRefVelocity(Node u, int localBasisNumber)
           
 int getLocalNodeNumber(Triangle t, Node n)
          Returns the local Node number to a Node on triangle element.
 
Methods inherited from class mathcomp.assemble.cfd.NavierStokesAssembler
addDirichletNodes, addToM, addToY, assembleGlobal, calcDirichletBoundary, calcUnitNormals, getBoundaryNodes, getOldSolution, getParameterBox, getType, isFinalRun, setFP_parameters, setIterationState, setOldSolution, 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
 

Constructor Detail

NSMiniAssembler

public NSMiniAssembler()
Method Detail

createDof

public void createDof(Grid grid,
                      java.util.Set dof)
Description copied from class: Assembler
All global Objects, that represent a degreeOfFreedom are added to dof.

Specified by:
createDof in class Assembler
Parameters:
grid - the current grid
dof - the Set where the DOFs have to be put in

evalBasisFuncOnRefVelocity

public double evalBasisFuncOnRefVelocity(Node u,
                                         int localBasisNumber)
Description copied from class: mathcomp.assemble.stokes.StokesAssembler
Returns the value of the basis function used to discretize the velocity field at the Node u on the reference triangle.

Specified by:
evalBasisFuncOnRefVelocity in class mathcomp.assemble.stokes.StokesAssembler

evalBasisGradOnRefVelocity

public double[] evalBasisGradOnRefVelocity(Node u,
                                           int localBasisNumber)

evalBasisFuncOnRefPressure

public double evalBasisFuncOnRefPressure(Node u,
                                         int localBasisNumber)
Description copied from class: mathcomp.assemble.stokes.StokesAssembler
Returns the value of the basis function used to discretize the pressure at the Node u on the reference triangle.

Specified by:
evalBasisFuncOnRefPressure in class mathcomp.assemble.stokes.StokesAssembler

evalApproxSolutionU1

public double evalApproxSolutionU1(Node n,
                                   Triangle t,
                                   Vector x)
Description copied from class: mathcomp.assemble.stokes.StokesAssembler
Evaluates the FEM solution for the first component of the velocity field in a Node. We need this method for an easy error calculation.

Specified by:
evalApproxSolutionU1 in class mathcomp.assemble.stokes.StokesAssembler
Parameters:
n - Node where the solution has to be evaluated
t - the triangle that contains the Node n
x - the solution vector
Returns:
the value of the first component of the velocity field in n

evalApproxSolutionU2

public double evalApproxSolutionU2(Node n,
                                   Triangle t,
                                   Vector x)
Description copied from class: mathcomp.assemble.stokes.StokesAssembler
Evaluates the FEM solution for the second component of the velocity field in a Node. We need this method for an easy error calculation.

Specified by:
evalApproxSolutionU2 in class mathcomp.assemble.stokes.StokesAssembler
Parameters:
n - Node where the solution has to be evaluated
t - the triangle that contains the Node n
x - the solution vector
Returns:
the value of the second component of the velocity field in n

evalApproxSolutionPressure

public double evalApproxSolutionPressure(Node n,
                                         Triangle t,
                                         Vector x)
Description copied from class: mathcomp.assemble.stokes.StokesAssembler
Evaluates the FEM solution for the pressure in a Node. We need this method for an easy error calculation.

Specified by:
evalApproxSolutionPressure in class mathcomp.assemble.stokes.StokesAssembler
Parameters:
n - Node where the solution has to be evaluated
t - the triangle that contains the Node n
x - the solution vector
Returns:
the value of the pressure in n

getLocalNodeNumber

public int getLocalNodeNumber(Triangle t,
                              Node n)
Returns the local Node number to a Node on triangle element. Corner nodes have the local numbers 0,1 and 2 and the middle-node, used in mini-elements discretization, has local number 3. If the node is no local dof on this element returns -1.


evalApproxGradientU1

public double[] evalApproxGradientU1(Node n,
                                     Triangle t,
                                     Vector x)
Description copied from class: mathcomp.assemble.stokes.StokesAssembler
For H1 error calculations we need to know the gradient of the approximated solution in a node n. This method returns the gradient of the approximated solution of the first component of the velocity field, evaluated at the Node n.

Specified by:
evalApproxGradientU1 in class mathcomp.assemble.stokes.StokesAssembler

evalApproxGradientU2

public double[] evalApproxGradientU2(Node n,
                                     Triangle t,
                                     Vector x)
Description copied from class: mathcomp.assemble.stokes.StokesAssembler
For H1 error calculations we need to know the gradient of the approximated solution in a node n. This method returns the gradient of the approximated solution of the second component of the velocity field, evaluated at the Node n.

Specified by:
evalApproxGradientU2 in class mathcomp.assemble.stokes.StokesAssembler