Go to the documentation of this file.00001
00002
00003
00004
00005
00006 #ifndef analyticalConstr_hh
00007 #define analyticalConstr_hh
00008
00009 #include "basics/outputOperator.hh"
00010 #include "toolbox/scannerConnectors.hh"
00011 #include "operator/bilinearForm.hh"
00012 #include "function/linearForm.hh"
00013
00014 namespace concepts {
00015 template<typename F>
00016 class TColumn;
00017 }
00018
00019 namespace constraints {
00020
00021 template<typename F>
00022 class Element;
00023
00024
00025
00039 template<typename F>
00040 class AnalyticalConstraint : public concepts::OutputOperator {
00041 public:
00046 virtual void lengthT(const concepts::Element<F>& e, uint& length) = 0;
00074 virtual void assembly(const concepts::Element<F>& e,
00075 concepts::TColumn<F>*& t, uint& n, uint& j,
00076 uint length) = 0;
00080 virtual AnalyticalConstraint<F>* clone() const = 0;
00081
00092 virtual void localMatrix(concepts::ElementMatrix<F>& em, uint& j,
00093 const Element<F>& elm) const = 0;
00094
00098 virtual void localVector(concepts::ElementMatrix<F>& em, uint& j,
00099 const Element<F>& elm) const = 0;
00100 };
00101
00102
00103
00107 template<typename F>
00108 class ConstraintsList : public concepts::BilinearForm<F>,
00109 public concepts::LinearForm<F> {
00110 public:
00112 ConstraintsList() : n_(0), constraints_(0) {}
00113 virtual ~ConstraintsList();
00114
00118 void add(const AnalyticalConstraint<F>& c);
00119
00123 void add(AnalyticalConstraint<F>* c);
00124
00129 void assembly(const concepts::Element<F>& e,
00130 concepts::TColumn<F>*& t, uint& n);
00131
00132 virtual void operator()(const concepts::Element<F>& elmX,
00133 const concepts::Element<F>& elmY,
00134 concepts::ElementMatrix<F>& em);
00135
00136 virtual void operator()(const concepts::Element<F>& elm,
00137 concepts::ElementMatrix<F>& em);
00138
00139 virtual ConstraintsList* clone() const;
00140 protected:
00141 virtual std::ostream& info(std::ostream& os) const;
00142 private:
00144 uint n_;
00145
00147 concepts::Joiner<AnalyticalConstraint<F>*, 1>* constraints_;
00148 };
00149
00150 }
00151
00152 #endif // analyticalConstr_hh