HPSingularity Class Reference

#include <hp_singular.h>

List of all members.

Public Member Functions

 HPSingularity ()
virtual ~HPSingularity ()
virtual void select_refinement (System &system)

Public Attributes

std::list< Pointsingular_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.

Author:
Roy H. Stogner, 2006.

Definition at line 52 of file hp_singular.h.


Constructor & Destructor Documentation

HPSingularity::HPSingularity (  )  [inline]

Constructor.

Definition at line 59 of file hp_singular.h.

00060   {
00061     libmesh_experimental();
00062   }

virtual HPSingularity::~HPSingularity (  )  [inline, virtual]

Destructor.

Definition at line 67 of file hp_singular.h.

00067 {}


Member Function Documentation

void 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 35 of file hp_singular.C.

References MeshBase::active_local_elements_begin(), MeshBase::active_local_elements_end(), Elem::contains_point(), Elem::DO_NOTHING, System::get_mesh(), mesh, Elem::REFINE, Elem::refinement_flag(), Elem::set_p_refinement_flag(), Elem::set_refinement_flag(), and singular_points.

00036 {
00037   START_LOG("select_refinement()", "HPSingularity");
00038 
00039   // The current mesh
00040   MeshBase& mesh = system.get_mesh();
00041 
00042   MeshBase::element_iterator       elem_it  =
00043     mesh.active_local_elements_begin();
00044   const MeshBase::element_iterator elem_end =
00045     mesh.active_local_elements_end(); 
00046 
00047   for (; elem_it != elem_end; ++elem_it)
00048     {
00049       Elem* elem = *elem_it;
00050 
00051       // We're only checking elements that are already flagged for h
00052       // refinement
00053       if (elem->refinement_flag() != Elem::REFINE)
00054         continue;
00055 
00056       elem->set_p_refinement_flag(Elem::REFINE);
00057       elem->set_refinement_flag(Elem::DO_NOTHING);
00058 
00059       for (std::list<Point>::iterator ppoint =
00060              singular_points.begin();
00061            ppoint != singular_points.end(); ++ppoint)
00062         {
00063           if (elem->contains_point(*ppoint))
00064             {
00065               elem->set_p_refinement_flag(Elem::DO_NOTHING);
00066               elem->set_refinement_flag(Elem::REFINE);
00067               break;
00068             }
00069         }
00070     }
00071 
00072   STOP_LOG("select_refinement()", "HPSingularity");
00073 }


Member Data Documentation

This list, to be filled by the user, should include all singular points in the solution.

Definition at line 82 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: November 25 2009 03:44:25.

Hosted By:
SourceForge.net Logo