18 cout <<
"=== TwoD_Node_Mesh: very basic read/write test ======\n";
25 std::size_t nx2( 31 );
26 std::size_t ny2( 41 );
33 for ( std::size_t i = 0; i < nx; ++i )
35 for ( std::size_t j = 0; j < ny; ++j )
37 mesh( i, j, 0 ) = cos( M_PI * x[ i ] ) * sin( M_PI * y[ j ] );
48 for ( std::size_t j = 0; j < ny; ++j )
50 for ( std::size_t i = 0; i < nx; ++i )
52 mesh( i, j, 0 ) -= cos( M_PI * x[ i ] ) * sin( M_PI * y[ j ] );
60 cout <<
"\033[1;31;48m * FAILED \033[0m\n";
62 cout <<
"Difference following remeshing is " << diff <<
"\n";
67 cout <<
"\033[1;32;48m * PASSED \033[0m\n";
A shorter bundled include file for ODE_BVP and PDE_IBVP codes.
A specification for a two dimensional mesh object.
An DenseVector class – a dense vector object.
A two dimensional mesh utility object.
DenseMatrix< _Type > get_var_as_matrix(std::size_t var) const
Return a matrix corresponding to each nodal point in the mesh Each matrix element will contain a spec...
void remesh1(const DenseVector< double > &newX, const DenseVector< double > &newY)
Interpolate this mesh data (bilinearly) into a new mesh with nodal points defined in the argument lis...
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...