mathcomp.assemble.discontinuousgalerkin
Class DGAssembler

java.lang.Object
  extended by mathcomp.monitor.DefaultReportable
      extended by mathcomp.monitor.DefaultAlgorithm
          extended by mathcomp.assemble.Assembler
              extended by mathcomp.assemble.discontinuousgalerkin.DGAssembler
All Implemented Interfaces:
java.lang.Runnable, Algorithm, Reportable
Direct Known Subclasses:
TimeIndependentAssembler

public abstract class DGAssembler
extends Assembler


Field Summary
 
Fields inherited from class mathcomp.assemble.Assembler
dirichletBoundaryValues, solScale
 
Constructor Summary
DGAssembler()
           
 
Method Summary
 void createDof(Grid grid, java.util.Set dof)
          All global Objects, that represent a degreeOfFreedom are added to dof.
 Surface[] createSurfaces(Vector x)
          Generates and returns an array of Surface Objects.
 double evalApproxSolution(Node n, Triangle t, Vector x)
          Evaluates the FEM solution in a Node.
 double[] evalBasisFuncGradOnRef(int localBasisNumber)
           
 double evalBasisFuncOnRef(Node u, int localBasisNumber)
           
 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
abstract  double evalG(Node n, double time)
          computes the value of the right hand side coefficient function of the convection-diffusion problem.
abstract  double evalUd(Node n, double time)
          Computes the value of the time dependent Dirichlet data in the point (n, time) of the convection-diffusion problem.
 Edges getEdges()
           
 ErrorCalculator getErrorCalculator()
           
 void iniQuadrature()
          Used to initialize the quadrature rules that are going to be used.
 
Methods inherited from class mathcomp.assemble.Assembler
addDirichletNodes, assembleGlobal, calcDirichletBoundary, 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

DGAssembler

public DGAssembler()
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

evalBasisFuncOnRef

public double evalBasisFuncOnRef(Node u,
                                 int localBasisNumber)

evalBasisFuncGradOnRef

public double[] evalBasisFuncGradOnRef(int localBasisNumber)

iniQuadrature

public void iniQuadrature()
Used to initialize the quadrature rules that are going to be used.


evalApproxSolution

public double evalApproxSolution(Node n,
                                 Triangle t,
                                 Vector x)
Description copied from class: Assembler
Evaluates the FEM solution in a Node. To do that we do need the triangle. We need this method for an easy l2 and l\infty error calculation.

Specified by:
evalApproxSolution in class Assembler
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 solution in n

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

evalG

public abstract double evalG(Node n,
                             double time)
computes the value of the right hand side coefficient function of the convection-diffusion problem.


evalUd

public abstract double evalUd(Node n,
                              double time)
Computes the value of the time dependent Dirichlet data in the point (n, time) of the convection-diffusion problem.


createSurfaces

public Surface[] createSurfaces(Vector x)
Description copied from class: Assembler
Generates and returns an array of Surface Objects. This contains the data for the java3D plots. For every basis type, this draws only triangles by evaluating the solution in the corner nodes of the triangle. By convention th order of the four objects is [approx, error, exact, empty]

Overrides:
createSurfaces in class Assembler
Parameters:
x - the FE-solution vector
Returns:
the generated Suface object

getErrorCalculator

public ErrorCalculator getErrorCalculator()
Overrides:
getErrorCalculator in class Assembler

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

getEdges

public Edges getEdges()