operator01.hh

Go to the documentation of this file.
1 
6 #ifndef clusterOperator01_hh
7 #define clusterOperator01_hh
8 
9 #include "basics/exceptions.hh"
10 #include "toolbox/dynArray.hh"
11 #include "operator/bilinearForm.hh"
12 #include "operator/compositions.hh"
13 #include "cluster/f.hh"
14 
15 namespace cluster {
16 
17  // ***************************************************** CacheSizeExceeded **
18 
25 
26  // ************************************************************ Operator01 **
27 
32  template<class NodeX, class NodeY>
33  class Operator01 : public concepts::Operator<typename TreeTraits<NodeX>::F> {
34  public:
38  typedef typename TraitsX::F FX;
39  typedef typename TraitsY::F FY;
42  class NfldMatrix {
46  uint dX_;
48  uint* idxX_;
50  uint dY_;
52  uint* idxY_;
54  FX* val_;
55  public:
69  concepts::DynArray<uint>& idxX, uint nidxX,
71  uint nelmX, concepts::DynArray<uint>& idxY, uint nidxY,
73  uint nelmY);
74  inline ~NfldMatrix() {delete[] val_; delete[] idxY_; delete[] idxX_;}
75 
77  void operator()(const concepts::Vector<FY>& fncY,
78  concepts::Vector<FX>& fncX);
80  inline NfldMatrix* link() const {return lnk_;}
82  inline float memory() const;
83  };
91  ClstX<NodeX>& X, ClstY<NodeY>& Y);
92  virtual ~Operator01();
93 
97  void operator()(const concepts::Vector<FY>& fncY,
98  concepts::Vector<FX>& fncX);
102  float memory() const;
103  inline const concepts::Space<FX>& spaceX() const {return X_.space();}
104  inline const concepts::Space<FY>& spaceY() const {return Y_.space();}
105  protected:
106  std::ostream& info(std::ostream& os) const;
107  private:
119  uint nnfldval_;
120 
128  template<class Trts, class Nd>
129  void constructor_(const Nd* clst, concepts::DynArray<uint>& idx,
130  uint* nidx, concepts::DynArray<const concepts::Element
131  <typename Trts::F>*>& elm, uint* nelm);
132  };
133 
134  template<class NodeX, class NodeY>
136  return sizeof(NfldMatrix)
137  + (float)dX_ * sizeof(idxX_[0])
138  + (float)dY_ * sizeof(idxY_[0])
139  + (float)(dX_ * dY_) * sizeof(val_[0]);
140  }
141 
142 } // namespace cluster
143 
144 #endif // clusterOperator01_hh
An abstract class for an element of a space.
Definition: exceptions.hh:15
Exception class.
Definition: operator01.hh:24
const concepts::Space< FY > & spaceY() const
Definition: operator01.hh:104
Operator01(concepts::BilinearForm< FX > &bf, ClstF< NodeX, NodeY > &F, ClstX< NodeX > &X, ClstY< NodeY > &Y)
Constructor.
Base class for exceptions.
Definition: exceptions.hh:86
Abstract class for a space.
void constructor_(const Nd *clst, concepts::DynArray< uint > &idx, uint *nidx, concepts::DynArray< const concepts::Element< typename Trts::F > * > &elm, uint *nelm)
Constructor for recursive calls.
Abstract class for a function.
Definition: basis.hh:21
uint dX_
Number of DoF in one cluster.
Definition: operator01.hh:46
NfldMatrix * N_
Near field matrix.
Definition: operator01.hh:117
std::ostream & info(std::ostream &os) const
ClstF< NodeX, NodeY > & F_
Far field matrix F.
Definition: operator01.hh:111
concepts::BilinearForm< FX > & bf_
Bilinear form.
Definition: operator01.hh:109
TreeTraits< NodeX > TraitsX
Interface for the operator.
Definition: operator01.hh:36
NfldMatrix(concepts::BilinearForm< FX > &bf, NfldMatrix *lnk, concepts::DynArray< uint > &idxX, uint nidxX, concepts::DynArray< const concepts::Element< FX > * > &elmX, uint nelmX, concepts::DynArray< uint > &idxY, uint nidxY, concepts::DynArray< const concepts::Element< FY > * > &elmY, uint nelmY)
Constructor.
Interface class for a node in a cluster tree.
Definition: tree.hh:252
void operator()(const concepts::Vector< FY > &fncY, concepts::Vector< FX > &fncX)
float memory() const
Memory usage in byte.
Definition: operator01.hh:135
TreeTraits< NodeY > TraitsY
Definition: operator01.hh:37
uint * idxY_
DoF numbers in the other cluster.
Definition: operator01.hh:52
uint * idxX_
DoF numbers in one cluster.
Definition: operator01.hh:48
Class to hold the near field entries for two clusters.
Definition: operator01.hh:42
Abstract class for an operator.
Definition: ARPACK.hh:16
uint dY_
Number of DoF in the other cluster.
Definition: operator01.hh:50
FX * val_
Matrix entries.
Definition: operator01.hh:54
void operator()(const concepts::Vector< FY > &fncY, concepts::Vector< FX > &fncX)
Application operator.
Node::CF F
Field of the node (Real or Cmplx)
Definition: tree.hh:255
Abstract class for a far field matrix F.
Definition: f.hh:42
float memory() const
Memory usage of the operator and the near field (without the far field approximation) in byte.
Used for the cluster classes for the boundary element method.
Definition: cebysev.hh:13
Cluster approximation of the stiffness matrix.
Definition: operator01.hh:33
NfldMatrix * link() const
Next near field entries.
Definition: operator01.hh:80
uint nnfldval_
Number of near field entries.
Definition: operator01.hh:119
virtual const concepts::Space< F > & space() const =0
Space.
ClstY< NodeY > & Y_
Far field matrix Y.
Definition: operator01.hh:115
void operator()(const concepts::Function< FY > &fncY, concepts::Function< FX > &fncX)
const concepts::Space< FX > & spaceX() const
Definition: operator01.hh:103
ClstX< NodeX > & X_
Far field matrix X.
Definition: operator01.hh:113
NfldMatrix * lnk_
Near field entries of next cluster pair.
Definition: operator01.hh:44
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich