Poster of Linux kernelThe best gift for a Linux geek
HPSingularity

HPSingularity

Section: C Library Functions (3) Updated: Thu Apr 7 2011
Local index Up
 

NAME

HPSingularity -  

SYNOPSIS


#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.

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.

  {
    libmesh_experimental();
  }
 

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

Definition at line 67 of file hp_singular.h.

{}
 

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(), Elem::REFINE, Elem::refinement_flag(), Elem::set_p_refinement_flag(), Elem::set_refinement_flag(), and singular_points.

{
  START_LOG('select_refinement()', 'HPSingularity');

  // The current mesh
  MeshBase& mesh = system.get_mesh();

  MeshBase::element_iterator       elem_it  =
    mesh.active_local_elements_begin();
  const MeshBase::element_iterator elem_end =
    mesh.active_local_elements_end(); 

  for (; elem_it != elem_end; ++elem_it)
    {
      Elem* elem = *elem_it;

      // We're only checking elements that are already flagged for h
      // refinement
      if (elem->refinement_flag() != Elem::REFINE)
        continue;

      elem->set_p_refinement_flag(Elem::REFINE);
      elem->set_refinement_flag(Elem::DO_NOTHING);

      for (std::list<Point>::iterator ppoint =
             singular_points.begin();
           ppoint != singular_points.end(); ++ppoint)
        {
          if (elem->contains_point(*ppoint))
            {
              elem->set_p_refinement_flag(Elem::DO_NOTHING);
              elem->set_refinement_flag(Elem::REFINE);
              break;
            }
        }
    }

  STOP_LOG('select_refinement()', 'HPSingularity');
}
 

Member Data Documentation

 

std::list<Point> HPSingularity::singular_pointsThis 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().

 

Author

Generated automatically by Doxygen for libMesh from the source code.


 

Index

NAME
SYNOPSIS
Public Member Functions
Public Attributes
Detailed Description
Constructor & Destructor Documentation
HPSingularity::HPSingularity () [inline]Constructor.
virtual HPSingularity::~HPSingularity () [inline, virtual]Destructor.
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.
Member Data Documentation
std::list<Point> HPSingularity::singular_pointsThis list, to be filled by the user, should include all singular points in the solution.
Author

This document was created by man2html, using the manual pages.
Time: 21:47:49 GMT, April 16, 2011