Toast++  1.0.2 (r.539)
Forward and inverse modelling in optical tomography
fwdsolver_mw.h
1 // -*-C++-*-
2 // ==========================================================================
3 // Forward model: finite element method (multi-wavelength version)
4 // ==========================================================================
5 
6 #ifndef __FWDSOLVER_MW_H
7 #define __FWDSOLVER_MW_H
8 
9 #include "fwdsolver.h"
10 #ifdef TOAST_MPI
11 #include "toast_mpi.h"
12 #endif
13 
14 // =========================================================================
15 
24 template<class T> class TFwdSolverMW: public TFwdSolver<T> {
25 public:
32  TFwdSolverMW (const QMMesh *mesh, LSOLVER linsolver, double tol = 1e-10);
33 
42  TFwdSolverMW (const QMMesh *mesh, char *solver, double tol = 1e-10);
43 
51  TFwdSolverMW (const QMMesh *mesh, ParamParser &pp);
52 
56  ~TFwdSolverMW ();
57 
75  const TCompRowMatrix<T> &mvec, const MWsolution &sol, double omega,
76  DataScale scl = DATA_DEFAULT);
77 
95  const TCompRowMatrix<T> &mvec, const MWsolution &sol, double omega,
96  DataScale scl = DATA_DEFAULT);
97 
98 protected:
102  void Setup();
103 
107  void Cleanup();
108 
109 private:
110 #ifdef TOAST_MPI
111  MPI_Datatype mpitp;
112  int sze, rnk;
113  int *projall_count;
114  int *projall_ofs;
115  int *qidx;
116 #endif
117 };
118 
119 // ==========================================================================
120 // template typedefs
121 
124 
125 // ==========================================================================
126 // extern declarations of FwdSolverMW (only required for VS)
127 
128 #ifndef __FWDSOLVER_MW_CC
129 extern template class STOASTLIB TFwdSolverMW<double>;
130 extern template class STOASTLIB TFwdSolverMW<std::complex<double> >;
131 #endif // !__FWDSOLVER_MW_CC
132 
133 #endif // __FWDSOLVER_MW_H
LSOLVER
Definition: fwdsolver.h:18
Definition: pparse.h:11
TFwdSolverMW(const QMMesh *mesh, LSOLVER linsolver, double tol=1e-10)
Constructor. Creates a forward solver instance.
DataScale
Definition: fwdsolver.h:27
Templated forward solver class.
Definition: fwdsolver.h:37
RVector ProjectAll_wavel_real(const TCompRowMatrix< T > &qvec, const TCompRowMatrix< T > &mvec, const MWsolution &sol, double omega, DataScale scl=DATA_DEFAULT)
Return boundary data for the complex case in a real vector.
~TFwdSolverMW()
Destructor. Destroys the forward solver instance.
Definition: qmmesh.h:22
TVector< T > ProjectAll_wavel(const TCompRowMatrix< T > &qvec, const TCompRowMatrix< T > &mvec, const MWsolution &sol, double omega, DataScale scl=DATA_DEFAULT)
Return boundary data for all sources and all detectors at all wavelengths.
Definition: mwsolution.h:8
void Cleanup()
Clean-up routines.
void Setup()
Forward solver initialisation routines.
default method
Definition: fwdsolver.h:28
Templated forward solver class for multi-wavelength problems.
Definition: fwdsolver_mw.h:24