00001 #ifndef _MY__PoissonEqVar_ 00002 #define _MY_PoissonEqVar_ 00003 #include "dealfewrapper.h" 00004 #include "globals.h" 00005 #include "sfunctions.h" 00006 #include <fe/fe_q.h> 00007 00020 class PoissonEqVar : public DealFEWrapper 00021 { 00022 private: 00023 FE_Q<3> m_FE; 00024 QGauss<3> m_cQG; 00025 QGauss<2> m_fQG; 00026 VecIndex m_global_dofs_map; 00027 static const Index m_local_dof_face_cell_map[6][4]; 00028 OrthoMesh &m_mesh; 00029 Function3D *m_pFS; //Source term 00030 const VecDouble *m_pK; 00031 double m_currK; 00032 protected: 00033 00034 public: 00035 PoissonEqVar(OrthoMesh &mesh); 00036 ~PoissonEqVar(); 00037 void setSource(Function3D &fs){assert(!m_pFS);m_pFS=&fs;} 00038 void setK(const VecDouble &K){m_pK=&K;} 00039 const VecDouble& getK(){assert(m_pK);return *m_pK;} 00040 00041 unsigned n_dofs_per_face(){return 4;} 00042 unsigned n_dofs_per_cell(){return 8;} 00043 unsigned n_quadrature_points(){return 8;} 00044 unsigned n_face_quadrature_points(){return 4;} 00045 unsigned n_dofs(){return m_mesh.numVertices();} 00046 unsigned n_max_dof_coupling(){return 27;} 00047 Index local_dof_component(Index cDof); 00048 Point3D get_global_dof_position(Index cDof); 00049 const VecIndex& local_to_global_dofs_map(); 00050 Index local_face_to_local_cell_map(Index face,Index local_dof_face); 00051 void setCell(OrthoMesh::Cell_It &cell); 00052 void changedCellEvent(){m_currK=getK()(getCell()->index());} 00053 00054 00055 // void changedCellEvent(){} //Every time we change a cell 00056 //void changedQPointEvent(){} //Every time we change a quad point. 00057 //void changedCellRHSEvent(){} //Every time we changed a cell 00058 //void changedQPointRHSEvent(){} //Ponto de integracao trocou durante a montagem do RHS 00059 //void changedQPointFaceEvent(){} //Called every time we change the quadrature pt at face 00060 double localEqVar(unsigned i,unsigned j,unsigned qPoint); 00061 double localRHS(unsigned i,unsigned qPoint); 00062 double localNeummanCondition(unsigned face_no,unsigned face_local_dof,unsigned qPoint,Function3D &fN); 00063 bool nullProduct(unsigned i,unsigned j); 00064 }; 00065 00066 #endif