Mercurial > fem-fenics-eugenio
view obsolete/test/test_rlhs.cc @ 85:8084ecfaa2b7
Maint: old test are moved in the obsolete folder
author | gedeone-octave <marcovass89@hotmail.it> |
---|---|
date | Sat, 03 Aug 2013 14:49:56 +0200 |
parents | test/test_rlhs.cc@de8427de316e |
children |
line wrap: on
line source
#include "Laplace.h" using namespace Laplace; #include <dolfin.h> #include "functionspace.h" #include "boundarycondition.h" #include "coefficient.h" DEFUN_DLD (test_rlhs, args, , "test_bc: functionspace V, boundarycondition bc") { int nargin = args.length (); octave_value retval=0; if (nargin < 2) print_usage (); else { if (args(0).type_id () == functionspace::static_type_id ()) { const functionspace & fspo = static_cast<const functionspace&> (args(0).get_rep ()); Array <double> myu = args(1).array_value (); if (!error_state) { const boost::shared_ptr<const dolfin::FunctionSpace> & V = fspo.get_pfsp (); dolfin::Vector du(myu.length ()); for (std::size_t i = 0; i < myu.length (); ++i) du.setitem (i, myu(i)); boost::shared_ptr<dolfin::Vector> uu (new dolfin::Vector(du)); dolfin::Function u(V, uu); dolfin::File file ("fem-fenics-rlhs.pvd"); file << u; dolfin::plot (u); dolfin::interactive (); } } } return retval; }