Toast++  1.0.2 (r.539)
Forward and inverse modelling in optical tomography
raster_px.h
1 // -*-C++-*-
2 
3 #ifndef __RASTER_PX_H
4 #define __RASTER_PX_H
5 
11 #include "raster.h"
12 
13 // =========================================================================
17 class STOASTLIB Raster_Pixel: public Raster {
18 public:
32  Raster_Pixel (const IVector &_bdim, const IVector &_gdim, Mesh *mesh,
33  RDenseMatrix *bb = 0);
34 
38  ~Raster_Pixel ();
39 
45  double Value_nomask (const Point &p, int i, bool is_solidx=true) const;
46 
55  void Map_GridToBasis (const RVector &gvec, RVector &bvec) const;
56 
62  void Map_GridToBasis (const CVector &gvec, CVector &bvec) const;
63 
72  void Map_BasisToGrid (const RVector &bvec, RVector &gvec) const;
73 
82  void Map_BasisToGrid (const CVector &bvec, CVector &gvec) const;
83 
89  void Map_MeshToBasis (const RVector &mvec, RVector &bvec) const;
90 
96  void Map_BasisToMesh (const RVector &bvec, RVector &mvec) const;
97 
105  void Map_BasisToSol (const RVector &bvec, RVector &svec) const;
106 
115  void Map_SolToBasis (const RVector &svec, RVector &bvec) const;
116 
123  void Map_MeshToSol (const RVector &mvec, RVector &svec) const;
124 
130  void Map_SolToMesh (const RVector &svec, RVector &mvec) const;
131 
135  const RGenericSparseMatrix &Mesh2BasisMatrix() const { return *C; }
136 
140  const RGenericSparseMatrix &Basis2MeshMatrix() const { return *CI; }
141 
142 private:
143  bool grid_is_basis;
148  RCompRowMatrix *D;
149 };
150 
151 #endif // !__RASTER_PX_H
Virtual base class for sparse matrix types.
Definition: gsmatrix.h:47
Pixel (or voxel) basis representation.
Definition: raster_px.h:17
virtual void Map_BasisToGrid(const RVector &bvec, RVector &gvec) const =0
Map a real-valued field from basis to grid representation.
virtual void Map_SolToBasis(const RVector &svec, RVector &bvec) const
Map a real-valued field from solution to basis representation.
Finite-element mesh management.
Definition: mesh.h:145
Base class for mapping between mesh and an independent basis representation.
Definition: raster.h:20
Definition: point.h:18
virtual void Map_BasisToSol(const RVector &bvec, RVector &svec) const
Map a real-valued field from basis to solution representation.
virtual void Map_MeshToBasis(const RVector &mvec, RVector &bvec) const
Map a real-valued field from mesh to basis representation.
virtual void Map_BasisToMesh(const RVector &bvec, RVector &mvec) const
Map a real-valued field from basis to mesh representation.
virtual void Map_GridToBasis(const RVector &gvec, RVector &bvec) const =0
Map a real-valued field from grid to basis representation.
virtual void Map_MeshToSol(const RVector &mvec, RVector &svec) const
Map a real-valued field from mesh to solution representation.
virtual void Map_SolToMesh(const RVector &svec, RVector &mvec) const
Map a real-valued field from solution to mesh representation.
const RGenericSparseMatrix & Mesh2BasisMatrix() const
Return the mesh->basis transformation matrix.
Definition: raster_px.h:135
virtual double Value_nomask(const Point &p, int i, bool is_solidx=true) const =0
Value of basis function b_i at point p This does not check for mesh support.
const RGenericSparseMatrix & Basis2MeshMatrix() const
Return the basis->mesh transformation matrix.
Definition: raster_px.h:140