1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// Copyright (C) 2006 Ola Skavhaug.
// Licensed under the GNU LGPL Version 2.1.
//
// Modified by Anders Logg, 2007.
//
// First added: 2006-11-29
// Last changed: 2007-05-09
#include <dolfin.h>
using namespace dolfin;
int main()
{
Mesh mesh("../mesh2D.xml.gz");
// Read mesh function from file
File in("../meshfunction.xml");
MeshFunction<double> f(mesh);
in >> f;
// Write mesh function to file
File out("meshfunction_out.xml");
out << f;
// Plot mesh function
plot(f);
}
|