Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

cluster/operator02.hh
Go to the documentation of this file.
00001 /* Cluster approximation of the stiffness matrix 02
00002  */
00003 
00004 #ifndef clusterOperator02_hh
00005 #define clusterOperator02_hh
00006 
00007 #include "basics/exceptions.hh"
00008 #include "operator/bilinearForm.hh"
00009 #include "operator/compositions.hh"
00010 #include "operator/sparseMatrix.hh"
00011 #include "cluster/f.hh"
00012 
00013 namespace cluster {
00014 
00015   // ************************************************************ Operator02 **
00016 
00021   template<class NodeX, class NodeY>
00022   class Operator02 : public concepts::Operator<typename TreeTraits<NodeX>::F> {
00024     typedef TreeTraits<NodeX>   TraitsX;
00025     typedef TreeTraits<NodeY>   TraitsY;
00026     typedef typename TraitsX::F FX;
00027     typedef typename TraitsY::F FY;
00028 
00030     concepts::BilinearForm<FX>& bf_;
00032     ClstF<NodeX,NodeY>& F_;
00034     ClstX<NodeX>& X_;
00036     ClstY<NodeY>& Y_;
00038     concepts::SparseMatrix<FX> N_;
00039 
00041     concepts::ElementMatrix<FX> A_;
00042     concepts::ElementMatrix<FX> B_;
00043 
00045     void constructor_(const NodeX* X, const NodeY* Y);
00046     void constructor_(const concepts::Element<FX>* elmX, const NodeY* Y);
00047 
00048   protected:
00049     std::ostream& info(std::ostream& os) const;
00050 
00051   public:
00058     Operator02(concepts::BilinearForm<FX>& bf, ClstF<NodeX, NodeY>& F,
00059          ClstX<NodeX>& X, ClstY<NodeY>& Y);
00060 
00062     void operator()(const concepts::Function<FY>& fncY,
00063         concepts::Function<FX>& fncX);
00064     void operator()(const concepts::Vector<FY>& fncY,
00065         concepts::Vector<FX>& fncX);
00067     inline float memory() const;
00068     inline const concepts::Space<FX>& spaceX() const {return X_.space();}
00069     inline const concepts::Space<FY>& spaceY() const {return Y_.space();}
00070   };
00071 
00072   template<class NodeX, class NodeY>
00073   inline float Operator02<NodeX, NodeY>::memory() const {
00074     return sizeof(Operator02<NodeX, NodeY>) + N_.memory()
00075       - sizeof(concepts::SparseMatrix<FX>);
00076   }
00077 
00078 } // namespace cluster
00079 
00080 #endif // clusterOperator02_hh

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)