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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
// Copyright (C) 2003-2005 Anders Logg.
// Licensed under the GNU LGPL Version 2.1.
//
// First added: 2003-11-20
// Last changed: 2005
#ifndef __SAMPLE_H
#define __SAMPLE_H
#include <string>
#include <dolfin/common/types.h>
#include <dolfin/common/Variable.h>
namespace dolfin
{
class TimeSlab;
/// Sample of solution values at a given point.
class Sample : public Variable
{
public:
/// Constructor
Sample(TimeSlab& timeslab, real t, std::string name, std::string label);
/// Destructor
~Sample();
/// Return number of components
uint size() const;
/// Return time t
real t() const;
/// Return value of component with given index
real u(uint index);
/// Return time step for component with given index
real k(uint index);
/// Return residual for component with given index
real r(uint index);
private:
TimeSlab& timeslab;
real time;
};
}
#endif
|