1
// Copyright (C) 2005-2006 Anders Logg.
2
// Licensed under the GNU LGPL Version 2.1.
4
// First added: 2005-01-28
5
// Last changed: 2006-07-06
7
#ifndef __MONO_ADAPTIVE_JACOBIAN_H
8
#define __MONO_ADAPTIVE_JACOBIAN_H
10
#include <dolfin/TimeSlabJacobian.h>
15
class MonoAdaptiveTimeSlab;
17
/// This class represents the Jacobian matrix of the system of
18
/// equations defined on a mono-adaptive time slab.
20
class MonoAdaptiveJacobian : public TimeSlabJacobian
25
MonoAdaptiveJacobian(MonoAdaptiveTimeSlab& timeslab,
26
bool implicit, bool piecewise);
29
~MonoAdaptiveJacobian();
31
/// Return number of rows (dim = 0) or columns (dim = 1)
32
uint size(uint dim) const;
34
/// Compute product y = Ax
35
void mult(const uBlasVector& x, uBlasVector& y) const;
37
/// Update sparse copy of Jacobian
40
/// Update sparse copy of Jacobian
41
void update(const uBlasVector& u, real t);
46
friend class MonoAdaptiveNewtonSolver;
49
MonoAdaptiveTimeSlab& ts;
51
// True if ODE is implicit
54
// True if M is piecewise constant
57
// FIXME: Maybe we can reuse some other vectors?
59
// Temporary vectors for storing multiplication
60
mutable uBlasVector xx;
61
mutable uBlasVector yy;