SimplePoisson1DTest Class Reference

List of all members.

Public Member Functions

 SimplePoisson1DTest (const Array< int > &nx)
std::string name () const
Array< int > pExpected () const
Expr exactSoln () const
LinearProblem prob (const Mesh &mesh) const
Array< LPTestSpec > specs () const


Detailed Description

This class sets up a test that checks convergence rate for solution of the Poisson equation in 1D with Lagrange(2) basis functions. The test problem is

\[ u'' = -\frac{1}{4}\pi^2 \sin(\pi x/2) \]

with boundary conditions

\[ u(0)=1, \;\;\; u'(1)=0. \]

The solution is $u(x)=\sin(\pi x/2)$.

Definition at line 47 of file LPTests1D.cpp.


Constructor & Destructor Documentation

SimplePoisson1DTest::SimplePoisson1DTest ( const Array< int > &  nx  )  [inline]

Construct the test object. The constructor calls the base class constructor with a list of mesh sizes to be used.

Definition at line 54 of file LPTests1D.cpp.


Member Function Documentation

Expr SimplePoisson1DTest::exactSoln (  )  const [inline]

Return an expression for the exact solution to the test problem.

Definition at line 68 of file LPTests1D.cpp.

References pi.

std::string SimplePoisson1DTest::name (  )  const [inline]

Return a descriptive name for the test

Definition at line 58 of file LPTests1D.cpp.

Array<int> SimplePoisson1DTest::pExpected (  )  const [inline]

Return the expected order of accuracy for the solutions. Because a problem might have multiple field variables, the expected orders of accuracy for the different variables are returned as an array.

Definition at line 63 of file LPTests1D.cpp.

LinearProblem SimplePoisson1DTest::prob ( const Mesh &  mesh  )  const [inline]

Return a LP for the specified mesh. This function implements the prob() pure virtual function of class LPTestBase.

Definition at line 80 of file LPTests1D.cpp.

References Sundance::gradient(), and pi.

Array<LPTestSpec> SimplePoisson1DTest::specs (  )  const [inline]

Specify which linear solvers are to be used.

Definition at line 103 of file LPTests1D.cpp.

Site Contact