00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _FRAMETL_FRAME_SUPPORT_H
00011 #define _FRAMETL_FRAME_SUPPORT_H
00012
00013 #include <list>
00014 #include <set>
00015
00016 #include <geometry/chart.h>
00017 #include <geometry/point.h>
00018 #include <cube/cube_basis.h>
00019 #include <galerkin/infinite_preconditioner.h>
00020 #include <index1D.h>
00021 #include <aggregated_frame.h>
00022
00023 using WaveletTL::CubeBasis;
00024 using FrameTL::Index1D;
00025
00026 namespace FrameTL
00027 {
00028
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00050 template <class IBASIS, unsigned int DIM_d, unsigned int DIM_m>
00051 bool in_support(const AggregatedFrame<IBASIS,DIM_d,DIM_m>& frame,
00052 const typename AggregatedFrame<IBASIS,DIM_d,DIM_m>::Index& lambda,
00053 const Point<DIM_m>& p);
00054
00061 template <class IBASIS, unsigned int DIM_d, unsigned int DIM_m>
00062 bool intersect_supports(const AggregatedFrame<IBASIS,DIM_d,DIM_m>& frame,
00063 const typename AggregatedFrame<IBASIS,DIM_d,DIM_m>::Index& lambda,
00064 const typename AggregatedFrame<IBASIS,DIM_d,DIM_m>::Index& mu,
00065 const typename CubeBasis<IBASIS,DIM_d>::Support* supp_lambda,
00066 const typename CubeBasis<IBASIS,DIM_d>::Support* supp_mu);
00067
00073 template <class IBASIS, unsigned int DIM_d, unsigned int DIM_m>
00074 void precompute_supports_simple(const AggregatedFrame<IBASIS,DIM_d,DIM_m>* frame,
00075 Array1D<typename AggregatedFrame<IBASIS,DIM_d,DIM_m>::Support>& all_patch_supports);
00081 template <class IBASIS, unsigned int DIM_d, unsigned int DIM_m>
00082 bool intersect_supports_simple(const AggregatedFrame<IBASIS,DIM_d,DIM_m>& frame,
00083 const typename AggregatedFrame<IBASIS,DIM_d,DIM_m>::Index& lambda,
00084 const typename AggregatedFrame<IBASIS,DIM_d,DIM_m>::Index& mu);
00085
00086
00090 template <class IBASIS, unsigned int DIM_d, unsigned int DIM_m>
00091 bool intersect_supports(const AggregatedFrame<IBASIS,DIM_d,DIM_m>& frame,
00092 const typename AggregatedFrame<IBASIS,DIM_d,DIM_m>::Index& lambda,
00093 const typename AggregatedFrame<IBASIS,DIM_d,DIM_m>::Index& mu,
00094 const typename CubeBasis<IBASIS,DIM_d>::Support* supp_lambda);
00095
00101 template <class IBASIS, unsigned int DIM_d, unsigned int DIM_m>
00102 bool intersect_supports_1D(const AggregatedFrame<IBASIS,DIM_d,DIM_m>& frame,
00103 const Index1D<IBASIS>& lambda,
00104 const Index1D<IBASIS>& mu,
00105 const typename CubeBasis<IBASIS,DIM_d>::Support* supp_lambda,
00106 const typename CubeBasis<IBASIS,DIM_d>::Support* supp_mu,
00107 const int dir,
00108 Array1D<double>& supp_intersect);
00109
00119 template <class IBASIS, unsigned int DIM_d, unsigned int DIM_m>
00120 bool intersect_supports(const AggregatedFrame<IBASIS,DIM_d,DIM_m>& frame,
00121 const typename AggregatedFrame<IBASIS,DIM_d,DIM_m>::Index& lambda,
00122 const typename AggregatedFrame<IBASIS,DIM_d,DIM_m>::Index& mu,
00123 const typename CubeBasis<IBASIS,DIM_d>::Support* supp_lambda,
00124 const typename CubeBasis<IBASIS,DIM_d>::Support* supp_mu,
00125 FixedArray1D<Array1D<double>,DIM_d >& supp_intersect);
00126
00132 template <class IBASIS, unsigned int DIM_d, unsigned int DIM_m>
00133 void intersecting_wavelets(const AggregatedFrame<IBASIS,DIM_d,DIM_m>& frame,
00134 const typename AggregatedFrame<IBASIS,DIM_d,DIM_m>::Index& lambda,
00135 const int j, const bool generators,
00136 std::list<typename AggregatedFrame<IBASIS,DIM_d,DIM_m>::Index>& intersecting);
00137
00144 template <class IBASIS, unsigned int DIM_d, unsigned int DIM_m>
00145 void intersecting_wavelets_on_patch(const AggregatedFrame<IBASIS,DIM_d,DIM_m>& frame,
00146 const typename AggregatedFrame<IBASIS,DIM_d,DIM_m>::Index& lambda,
00147 const int p,
00148 const int j, const bool generators,
00149 std::list<typename AggregatedFrame<IBASIS,DIM_d,DIM_m>::Index>& intersecting);
00150
00156 template <class IBASIS, unsigned int DIM_d, unsigned int DIM_m>
00157 inline
00158 void intersecting_wavelets (const AggregatedFrame<IBASIS,DIM_d,DIM_m>& frame,
00159 const typename AggregatedFrame<IBASIS,DIM_d,DIM_m>::Index& lambda,
00160 const int p,
00161 const std::set<typename AggregatedFrame<IBASIS,DIM_d,DIM_m>::Index>& Lambda,
00162 std::list<typename AggregatedFrame<IBASIS,DIM_d,DIM_m>::Index>& intersecting);
00163
00168 template <class IBASIS, unsigned int DIM_d, unsigned int DIM_m>
00169 bool intersect_singular_support(const AggregatedFrame<IBASIS,DIM_d,DIM_m>& frame,
00170 const typename AggregatedFrame<IBASIS,DIM_d,DIM_m>::Index& lambda,
00171 const typename AggregatedFrame<IBASIS,DIM_d,DIM_m>::Index& nu);
00172
00181 template <unsigned int DIM>
00182 int edgesIntersect (const Point<DIM>& A, const Point<DIM>& B,
00183 const Point<DIM>& C, const Point<DIM>& D);
00184
00193 template <unsigned int DIM>
00194 unsigned short int pos_wrt_line (const Point<DIM>& p, const Point<DIM>& p1, const Point<DIM>& p2);
00195
00200 template <unsigned int DIM>
00201 bool quadrangles_intersect (FixedArray1D<Point<DIM>, 4> poly1, FixedArray1D<Point<DIM>, 4> poly2);
00202
00203
00204 }
00205 #include <frame_support.cpp>
00206
00207 #endif