aboutsummaryrefslogtreecommitdiff
path: root/src/gr/Jacobian.hh
blob: e49187a9ad89b9d7241cdabc48d1dfe0fc0412cf (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
31
32
33
34
// 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:
	// basic meta-info
	patch_system& my_patch_system();

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);
	};