00001 00005 class NeighborFE 00006 00007 { 00008 friend class GridFE; 00009 friend class GridFEAdB; 00010 00011 private: 00012 Handle(SparseDS) n2e; 00013 Handle(SparseDS) n2n; 00014 Handle(SparseDS) e2e; 00015 00016 bool special_e2e; 00017 00018 void init_GridFEAdB (GridFE& grid); 00019 00020 void initCoupling (SetDistinct(int)& couplings, 00021 SetDistinct(int)& element_list,GridFE& grid); 00022 00023 Handle(MatSimpleH(int)) e2es; 00024 Handle(MatSimpleH(int)) e2s; 00025 Handle(MatSimpleH(int)) s2e; 00026 Handle(MatSimpleH(int)) s2n; 00027 Handle(MatSimpleH(int)) n2s; 00028 00029 void fillNodePathForElm (GridFE& grid, int e,MatSimple(int)& loc_side_nodes); 00030 00031 void generateElm2ElmTable1D (GridFE& grid, int& nside); 00032 void generateElm2ElmTable2D (GridFE& grid, int& nside); 00033 void generateElm2ElmTable3D (GridFE& grid, int& nside); 00034 void generateElm2ElmTable (GridFE& grid, int& nside); 00035 00036 void generateSide2NodeElmInfo (GridFE& grid); 00037 void generateNode2SideInfo (GridFE& grid); 00038 00039 public: 00040 NeighborFE(); 00041 ~NeighborFE(){} 00042 00043 void init (GridFE& grid); 00044 00045 void init (GridFE& grid, 00046 bool init_n2e, 00047 bool init_n2n, 00048 bool init_e2e, 00049 bool side_e2e = false); 00050 00051 void remove ( bool remove_n2e = true, 00052 bool remove_n2n = true, 00053 bool remove_e2e = true ); 00054 00055 bool sideElements() { return special_e2e;} 00056 00057 bool ok () const; 00058 00059 void node (int n, VecSimplest(int)& element_list); 00060 void nodes (int n, VecSimplest(int)& node_list); 00061 void couplings (int n, VecSimplest(int)& node_list); 00062 void element (int e, VecSimplest(int)& element_list); 00063 00064 int nodeSize () const { return n2e->getNoNonzeroes(); } 00065 int couplingsSize () const { return n2n->getNoNonzeroes(); } 00066 int elementSize () const { return e2e->getNoNonzeroes(); } 00067 00068 int nodeIrow (int n) const { return n2e->irow(n); } 00069 int couplingsIrow (int n) const { return n2n->irow(n); } 00070 int elementIrow (int e) const { return e2e->irow(e); } 00071 00072 int nodeJcol (int n) const { return n2e->jcol(n); } 00073 int couplingsJcol (int n) const { return n2n->jcol(n); } 00074 int elementJcol (int e) const { return e2e->jcol(e); } 00075 00076 00077 00078 void initSideInfo (GridFE& grid); 00079 bool hasSideInfo () { return e2es.ok(); } 00080 00081 void elementSide (int e, VecSimplest(int)& element_list, bool elm = true); 00082 void elementSide (Handle(MatSimpleH(int))& element_list, bool elm = true); 00083 00084 void nodeSide (int n, VecSimplest(int)& side_list); 00085 void nodeSide (Handle(MatSimpleH(int))& side_list); 00086 00087 void side (int s, 00088 VecSimplest(int)& element_list, 00089 VecSimplest(int)& node_list); 00090 void side (Handle(MatSimpleH(int))& element_list, 00091 Handle(MatSimpleH(int))& node_list); 00092 00093 void print(Os os); 00094 }; 00095 00096