#include "dolfin.h" using namespace dolfin; // PPDE DOLFIN example #1: vectors, output, arithmetic operations int main() { dolfin_set("output", "plain text"); Vector v1(3); v1(0) = 7.0; v1(1) = -1.0; v1(2) = 2.0; cout << "v1:" << endl; v1.show(); Vector v2(3); v2(0) = 10.0; v2(1) = 4.0; v2(2) = 1.0; cout << "v2:" << endl; v2.show(); Vector v3(3); v3 = v1; v3 += v2; cout << "v3:" << endl; v3.show(); v3 *= -2.0; cout << "v3:" << endl; v3.show(); cout << "v3 norm: " << v3.norm() << endl; }