mathcomp.assemble.convdiff
Class ConvDiffHomogen

java.lang.Object
  extended by mathcomp.monitor.DefaultReportable
      extended by mathcomp.monitor.DefaultAlgorithm
          extended by mathcomp.assemble.Assembler
              extended by mathcomp.assemble.LagrangeLinearAssembler
                  extended by mathcomp.assemble.convdiff.AbstractCDA
                      extended by mathcomp.assemble.convdiff.AbstractCDA_cV
                          extended by mathcomp.assemble.convdiff.ConvDiffHomogen
All Implemented Interfaces:
java.lang.Runnable, Algorithm, Reportable
Direct Known Subclasses:
CDH_EF_Flux, CDH_HVM, CDH_RFB, CDH_Shishkin, CDH_SUPG, CDH_WBF, CDH_Weighted

public class ConvDiffHomogen
extends AbstractCDA_cV

An example class that extends AbstractConvDiffModel. A convection-diffusion problem with homogenous dirichlet bounday. For the diffusion parameter we have the variable epsilon for the convection in this assembler we have constant in both directions similar values stores in the double array b.

Author:
ch.wust

Field Summary
 
Fields inherited from class mathcomp.assemble.convdiff.AbstractCDA
area, aSixth, aThird, d0, d1, epsilon, tau, tauIndex
 
Fields inherited from class mathcomp.assemble.LagrangeLinearAssembler
gradVector
 
Fields inherited from class mathcomp.assemble.Assembler
dirichletBoundaryValues, solScale
 
Constructor Summary
ConvDiffHomogen()
           
 
Method Summary
 double evalBX(Node n)
           
 double evalBY(Node n)
           
 double evalExactSolution(Node n)
          For error calculations we need to know the exact solution of a problem.
 double evalF(Node n)
          Evaluates the right hand side function f on the Node n
 double evalU(double x, double b)
           
 double evalV(double y, double b)
           
 double getExactPartialU(double x, double b)
           
 double getExactPartialV(double y, double b)
           
 double getExactPartialX(Node n)
          Direct access to partialX
 double getExactPartialY(Node n)
          Direct access to partialY
 java.lang.String getPreferredGridFileName()
          Every Assembler has a preferred grid.
 double getSolScale()
           
 java.lang.String toString()
          Set the name of your assembler by overwriting this method in your assembler class.
 
Methods inherited from class mathcomp.assemble.convdiff.AbstractCDA_cV
approxLHS
 
Methods inherited from class mathcomp.assemble.convdiff.AbstractCDA
approxConvectionIntegral, getEpsilon, getFlowSegment, getTau, getTauIndex, setEpsilon, setTauIndex, zeta
 
Methods inherited from class mathcomp.assemble.LagrangeLinearAssembler
createDof, createDofExport, evalApproxGradient, evalApproxSolution, evalBasisFuncOnRef, evalGradXBasisFuncOnRef, evalGradYBasisFuncOnRef
 
Methods inherited from class mathcomp.assemble.Assembler
addDirichletNodes, assembleGlobal, calcDirichletBoundary, createSurfaces, createSurfaces, evalExactGradient, getDof, getElementMatrix, getErrorCalculator, getGrid, getInfoUrl, getM, getY, report, run, setGrid, setM, setY
 
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

ConvDiffHomogen

public ConvDiffHomogen()
Method Detail

evalBX

public double evalBX(Node n)
Specified by:
evalBX in class AbstractCDA

evalBY

public double evalBY(Node n)
Specified by:
evalBY in class AbstractCDA

evalF

public double evalF(Node n)
Description copied from class: Assembler
Evaluates the right hand side function f on the Node n

Specified by:
evalF in class Assembler
Parameters:
n - the Node where f is evaluated
Returns:
the evaluation value

evalExactSolution

public double evalExactSolution(Node n)
Description copied from class: Assembler
For error calculations we need to know the exact solution of a problem. If we don't know that, return 0.0 for every node n.

Overrides:
evalExactSolution in class Assembler
Parameters:
n - node where the exact solution should be evaluated

evalU

public double evalU(double x,
                    double b)

evalV

public double evalV(double y,
                    double b)

getExactPartialU

public double getExactPartialU(double x,
                               double b)

getExactPartialV

public double getExactPartialV(double y,
                               double b)

getExactPartialY

public double getExactPartialY(Node n)
Description copied from class: Assembler
Direct access to partialY

Overrides:
getExactPartialY in class Assembler

getExactPartialX

public double getExactPartialX(Node n)
Description copied from class: Assembler
Direct access to partialX

Overrides:
getExactPartialX in class Assembler

getSolScale

public double getSolScale()
Overrides:
getSolScale in class Assembler

toString

public java.lang.String toString()
Description copied from class: Assembler
Set the name of your assembler by overwriting this method in your assembler class.

Specified by:
toString in class Assembler
Returns:
the name of the assembler

getPreferredGridFileName

public java.lang.String getPreferredGridFileName()
Description copied from class: Assembler
Every Assembler has a preferred grid. If this method is not implemented in the specific assembler class, "square.grid" is default.

Overrides:
getPreferredGridFileName in class Assembler
Returns:
the file name of the preferred grid as a String object.