libMesh::HPSingularity Class Reference
#include <hp_singular.h>
Public Member Functions | |
| HPSingularity () | |
| virtual | ~HPSingularity () |
| virtual void | select_refinement (System &system) |
Public Attributes | |
| std::list< Point > | singular_points |
Detailed Description
This class uses a user-provided list of singularity locations to choose between h refining and p elevation. Currently we assume that a set of elements has already been flagged for h refinement - any elements which do not contain a user-provided singular point are instead flagged for p refinement.
Definition at line 48 of file hp_singular.h.
Constructor & Destructor Documentation
| libMesh::HPSingularity::HPSingularity | ( | ) | [inline] |
Constructor.
Definition at line 55 of file hp_singular.h.
| virtual libMesh::HPSingularity::~HPSingularity | ( | ) | [inline, virtual] |
Member Function Documentation
| void libMesh::HPSingularity::select_refinement | ( | System & | system | ) | [virtual] |
This pure virtual function must be redefined in derived classes to take a mesh flagged for h refinement and potentially change the desired refinement type.
Definition at line 36 of file hp_singular.C.
References libMesh::MeshBase::active_local_elements_begin(), libMesh::MeshBase::active_local_elements_end(), libMesh::Elem::contains_point(), libMesh::Elem::DO_NOTHING, libMesh::System::get_mesh(), mesh, libMesh::Elem::REFINE, libMesh::Elem::refinement_flag(), libMesh::Elem::set_p_refinement_flag(), libMesh::Elem::set_refinement_flag(), and singular_points.
00037 { 00038 START_LOG("select_refinement()", "HPSingularity"); 00039 00040 // The current mesh 00041 MeshBase& mesh = system.get_mesh(); 00042 00043 MeshBase::element_iterator elem_it = 00044 mesh.active_local_elements_begin(); 00045 const MeshBase::element_iterator elem_end = 00046 mesh.active_local_elements_end(); 00047 00048 for (; elem_it != elem_end; ++elem_it) 00049 { 00050 Elem* elem = *elem_it; 00051 00052 // We're only checking elements that are already flagged for h 00053 // refinement 00054 if (elem->refinement_flag() != Elem::REFINE) 00055 continue; 00056 00057 elem->set_p_refinement_flag(Elem::REFINE); 00058 elem->set_refinement_flag(Elem::DO_NOTHING); 00059 00060 for (std::list<Point>::iterator ppoint = 00061 singular_points.begin(); 00062 ppoint != singular_points.end(); ++ppoint) 00063 { 00064 if (elem->contains_point(*ppoint)) 00065 { 00066 elem->set_p_refinement_flag(Elem::DO_NOTHING); 00067 elem->set_refinement_flag(Elem::REFINE); 00068 break; 00069 } 00070 } 00071 } 00072 00073 STOP_LOG("select_refinement()", "HPSingularity"); 00074 }
Member Data Documentation
| std::list<Point> libMesh::HPSingularity::singular_points |
This list, to be filled by the user, should include all singular points in the solution.
Definition at line 78 of file hp_singular.h.
Referenced by select_refinement().
The documentation for this class was generated from the following files:
Site Created By: libMesh Developers
Last modified: February 05 2013 19:55:26 UTC
Hosted By: