NGSolve
4.9
|
00001 #ifndef FILE_H1HOFESPACE 00002 #define FILE_H1HOFESPACE 00003 00004 /*********************************************************************/ 00005 /* File: h1hofespace.hpp */ 00006 /* Author: Start */ 00007 /* Date: 10. Feb. 2003 */ 00008 /*********************************************************************/ 00009 00010 namespace ngcomp 00011 { 00012 00018 class NGS_DLL_HEADER H1HighOrderFESpace : public FESpace 00019 { 00020 protected: 00021 int level; 00022 00023 Array<int> first_edge_dof; 00024 Array<int> first_face_dof; 00025 Array<int> first_element_dof; 00026 00027 00029 int rel_order; 00030 bool var_order; 00031 bool fixed_order; 00032 bool wb_loedge; 00033 Array<int> order_edge; 00034 Array<INT<2> > order_face; 00035 Array<INT<3> > order_inner; 00036 Array<bool> used_vertex; 00037 Array<bool> used_edge; 00038 Array<bool> used_face; 00039 00040 int ndof; 00041 int uniform_order_inner; 00042 int uniform_order_face; 00043 int uniform_order_edge; 00044 int uniform_order_quad; 00045 int uniform_order_trig; 00046 Array<INT<3> > dom_order_min; 00047 Array<INT<3> > dom_order_max; 00048 int smoother; 00049 00050 Array<int> ndlevel; 00051 00052 bool level_adapted_order; 00053 bool nodalp2; 00054 public: 00055 00056 H1HighOrderFESpace (const MeshAccess & ama, const Flags & flags, bool checkflags=false); 00058 virtual ~H1HighOrderFESpace (); 00059 00060 virtual string GetClassName () const 00061 { 00062 return "H1HighOrderFESpace"; 00063 } 00064 00066 virtual void Update(LocalHeap & lh); 00068 virtual void PrintReport (ostream & ost); 00069 00071 virtual int GetNDof () const; 00073 virtual int GetNDofLevel (int alevel) const; 00075 virtual const FiniteElement & GetFE (int elnr, LocalHeap & lh) const; 00077 virtual const FiniteElement & GetSFE (int elnr, LocalHeap & lh) const; 00079 virtual void GetDofNrs (int elnr, Array<int> & dnums) const; 00080 00081 virtual void GetVertexDofNrs (int vnr, Array<int> & dnums) const; 00082 virtual void GetEdgeDofNrs (int ednr, Array<int> & dnums) const; 00083 virtual void GetFaceDofNrs (int fanr, Array<int> & dnums) const; 00084 virtual void GetInnerDofNrs (int elnr, Array<int> & dnums) const; 00086 virtual void GetSDofNrs (int selnr, Array<int> & dnums) const; 00087 00088 virtual Table<int> * CreateSmoothingBlocks (const Flags & precflags) const; 00089 // virtual void CreateSmoothingBlocks2 (SmoothingBlocksCreator & sbc, const Flags & precflags) const; 00091 virtual Array<int> * CreateDirectSolverClusters (const Flags & flags) const; 00092 00094 int GetFirstFaceDof(int i) const {return(first_face_dof[i]);} ; 00096 int GetFirstEdgeDof(int i) const {return(first_edge_dof[i]);} ; 00098 int GetFirstElementDof(int i) const {return(first_element_dof[i]);} ; 00100 void UpdateDofTables (); 00102 virtual void UpdateCouplingDofArray(); 00103 00104 void SetEdgeOrder (int enr, int eo) { order_edge[enr] = eo; } 00105 void SetFaceOrder (int fnr, int fo) { order_face[fnr] = INT<2> (fo, fo); } 00106 void SetFaceOrder (int fnr, int ox, int oy) { order_face[fnr] = INT<2> (ox, oy); } 00107 void SetElementOrder (int elnr, int elo) 00108 { order_inner[elnr] = INT<3> (elo, elo, elo); } 00109 void SetElementOrder (int elnr, int ox, int oy, int oz) 00110 { order_inner[elnr] = INT<3> (ox, oy, oz); } 00111 00113 virtual int GetRelOrder() const { return rel_order; } 00114 virtual bool VarOrder() const { return var_order; } 00115 00116 IntRange GetEdgeDofs (int nr) const 00117 { 00118 return IntRange (first_edge_dof[nr], first_edge_dof[nr+1]); 00119 } 00120 00121 IntRange GetFaceDofs (int nr) const 00122 { 00123 return IntRange (first_face_dof[nr], first_face_dof[nr+1]); 00124 } 00125 00126 IntRange GetElementDofs (int nr) const 00127 { 00128 return IntRange (first_element_dof[nr], first_element_dof[nr+1]); 00129 } 00130 00131 }; 00132 00133 } 00134 00135 #endif 00136