mathcomp.assemble
Class ErrorCalculatorCompare

java.lang.Object
  extended by mathcomp.monitor.DefaultReportable
      extended by mathcomp.assemble.ErrorCalculator
          extended by mathcomp.assemble.ErrorCalculatorCompare
All Implemented Interfaces:
Reportable

public class ErrorCalculatorCompare
extends ErrorCalculator


Constructor Summary
ErrorCalculatorCompare(Assembler a)
           
 
Method Summary
 double getH1Error()
           
 double getL2Error()
          Returns the L2 error to the FEM solution x.
 double getMaxError()
          Gets the pointwise maximal error compared to the exact solution.
 void report()
           
 void setSolution(Vector sol)
          Sets a solution to this ErrorCalculator.
 
Methods inherited from class mathcomp.assemble.ErrorCalculator
findTriangle, printSol, setAssembler, setFineSolution
 
Methods inherited from class mathcomp.monitor.DefaultReportable
getReport, setReport
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorCalculatorCompare

public ErrorCalculatorCompare(Assembler a)
Method Detail

setSolution

public void setSolution(Vector sol)
Description copied from class: ErrorCalculator
Sets a solution to this ErrorCalculator.

Overrides:
setSolution in class ErrorCalculator
Parameters:
sol - the solution to be set (adds the Dirichlet Nodes to that solution)

report

public void report()
Specified by:
report in interface Reportable
Overrides:
report in class ErrorCalculator

getMaxError

public double getMaxError()
Description copied from class: ErrorCalculator
Gets the pointwise maximal error compared to the exact solution. The points that are considered here are all the global dofs and all boundary nodes (we really would not need them, but I used the paintNodes for this, and they're in here. Remember that the getExactValue mathod has to be implemented correctly for this.

Overrides:
getMaxError in class ErrorCalculator
Returns:

getL2Error

public double getL2Error()
Description copied from class: ErrorCalculator
Returns the L2 error to the FEM solution x. Remember that the getExactValue mathod has to be implemented correctly for this.

Overrides:
getL2Error in class ErrorCalculator
Returns:
the L2 error

getH1Error

public double getH1Error()
Overrides:
getH1Error in class ErrorCalculator