26  cout << 
"=== OneD_Node_Mesh & BandedMatrix: Airy function ====\n";
 
   31  double d = abs( l ) / ( n - 1 ); 
 
   39  b[ 0 ] = 0.04024123849;        
 
   40  for ( 
size_t i = 1; i < n - 1; ++i )
 
   43    a( i, i-1 ) = 1.0/(d*d);
 
   44    a( i, i ) = -2.0/(d*d);
 
   45    a( i, i+1 ) = 1.0/(d*d);
 
   47    a( i, i ) -= soln.
coord( i );
 
   49  a( n - 1, n - 1 ) = 1.0;       
 
   50  b[ n - 1 ] = 0.3550280539;     
 
   59  catch (
const std::runtime_error &error )
 
   61    cout << 
" \033[1;31;48m  * FAILED THROUGH EXCEPTION BEING RAISED \033[0m\n";
 
   69  const double tol = 1.e-5;
 
   70  if ( abs( soln.
integral2() - 0.7656984 ) > tol )
 
   72    cout << 
"\033[1;31;48m  * FAILED \033[0m\n";
 
   74    cout << n << 
" " << soln.
integral2() - 0.7656984 << 
"\n";
 
   79    cout << 
"\033[1;32;48m  * PASSED \033[0m\n";
 
Specification of the linear system class.
A specification for a one dimensional mesh object.
A spec for a collection of utility functions.
A linear system class for vector right-hand sides.
void solve()
Solve the banded system.
A matrix class that constructs a BANDED matrix.
An DenseVector class – a dense vector object.
A one dimensional mesh utility object.
void set_vars_from_vector(const DenseVector< _Type > &vec)
Set the variables of this mesh from a vector.
const _Xtype & coord(const std::size_t &node) const
Access a nodal position.
_Type integral2(std::size_t var=0) const
Integrate over the domain.
DenseVector< double > uniform_node_vector(const double &lower, const double &upper, const std::size_t &N)
Return a DENSE vector with the nodal points of a uniform mesh distributed between the upper/lower bou...
A collection of OO numerical routines aimed at simple (typical) applied problems in continuum mechani...