aboutsummaryrefslogtreecommitdiff
path: root/src/gr/Jacobian.hh
blob: 626d080af23f3422c2a181f7d72cf555214630c8 (plain)
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
// Jacobian.hh -- data structures for the Jacobian matrix
// $Id$

//
// prerequisites:
//

//
// A Jacobian object stores the (a) Jacobian matrix of H with respect to h.
// Jacobian is an abstract base class, from which we derive a separate
// concrete class for each type of (storage scheme for the) Jacobian matrix.
//
// A row/column index of the Jacobian (denoted II/JJ) is a linearization
// of the patch system's (patch,irho,isigma).
//

class	Jacobian
	{
public:
	// access a matrix element
	virtual const fp& operator()(int II, int JJ) const;	// rvalue
	virtual       fp& operator()(int II, int JJ) const;	// lvalue

	// zero the whole matrix or a single row
	virtual void zero();
	virtual void zero_row(int II);

	// add to an element: Jacobian(II,JJ) += delta
	virtual void add_to_element(int II, int JJ, fp delta);
	};