Toast++  1.0.2 (r.539)
Forward and inverse modelling in optical tomography
raster_px2.h
1 // -*-C++-*-
2 
3 #ifndef __RASTER_PX2_H
4 #define __RASTER_PX2_H
5 
14 #include "raster.h"
15 
16 void Tetsplit (Mesh *mesh, int el, int cut_orient, double cut_pos);
17 // exported temporarily
18 
19 // =========================================================================
23 class STOASTLIB Raster_Pixel2: public Raster {
24 public:
39  Raster_Pixel2 (const IVector &_bdim, const IVector &_gdim, Mesh *mesh,
40  RDenseMatrix *bb = 0, double _map_tol=1e-10);
41 
45  ~Raster_Pixel2 ();
46 
52  double Value_nomask (const Point &p, int i, bool is_solidx=true) const;
53 
62  void Map_GridToBasis (const RVector &gvec, RVector &bvec) const;
63 
69  void Map_GridToBasis (const CVector &gvec, CVector &bvec) const;
70 
79  void Map_BasisToGrid (const RVector &bvec, RVector &gvec) const;
80 
89  void Map_BasisToGrid (const CVector &bvec, CVector &gvec) const;
90 
96  void Map_MeshToBasis (const RVector &mvec, RVector &bvec) const;
97 
103  void Map_BasisToMesh (const RVector &bvec, RVector &mvec) const;
104 
112  void Map_BasisToSol (const RVector &bvec, RVector &svec) const;
113 
122  void Map_SolToBasis (const RVector &svec, RVector &bvec) const;
123 
130  void Map_MeshToSol (const RVector &mvec, RVector &svec) const;
131 
137  void Map_SolToMesh (const RVector &svec, RVector &mvec) const;
138 
139 
140 private:
141  bool grid_is_basis;
142  RCompRowMatrix *D;
143  RCompRowMatrix *Buu;
144  RCompRowMatrix *Bvv;
145  RCompRowMatrix *Buv;
146 
147  RPrecon_IC *Buu_precon;
148  RPrecon_IC *Bvv_precon;
149  double map_tol;
150 
154  RCompRowMatrix *CreateMixedMassmat () const;
155  RCompRowMatrix *CreateMixedMassmat_tet4 () const;
156 
157  RCompRowMatrix *CreatePixelMassmat () const;
158 
159  int SutherlandHodgman (int el, int xgrid, int ygrid, Point *clip_poly,
160  int npoly) const;
161 };
162 
163 #endif // !__RASTER_PX2_H
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.
Pixel (or voxel) basis representation.
Definition: raster_px2.h:23
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.
Definition: crmatrix.h:37
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.