Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
internal::GridReordering2d::GridReordering Class Reference

#include <grid_reordering_internal.h>

Public Member Functions

void reorient (std::vector< CellData< 2 > > &quads)
 

Private Member Functions

void build_graph (const std::vector< CellData< 2 > > &inquads)
 
void orient ()
 
void get_quads (std::vector< CellData< 2 > > &outquads) const
 
void orient_side (const unsigned int quadnum, const unsigned int localsidenum)
 
bool is_fully_oriented_quad (const unsigned int quadnum) const
 
bool is_oriented_side (const unsigned int quadnum, const unsigned int lsn) const
 
bool is_side_default_oriented (const unsigned int qnum, const unsigned int lsn) const
 
bool get_unoriented_quad (unsigned int &UnOrQLoc) const
 
bool get_unoriented_side (const unsigned int quadnum, unsigned int &sidenum) const
 
bool side_hop (unsigned int &qnum, unsigned int &lsn) const
 

Private Attributes

std::vector< MSidesides
 
std::vector< MQuadmquads
 

Detailed Description

Implement the 2d algorithm for grid reordering described in the documentation of the GridReordering class.

Author
Michael Anderson, 2003

Definition at line 212 of file grid_reordering_internal.h.

Member Function Documentation

void internal::GridReordering2d::GridReordering::reorient ( std::vector< CellData< 2 > > &  quads)

Do the work intended by this class.

void internal::GridReordering2d::GridReordering::build_graph ( const std::vector< CellData< 2 > > &  inquads)
private

Sets up the internal data structures so that the we can do side hopping and face switching efficiently. This means we need a whole bunch of connectivity information

void internal::GridReordering2d::GridReordering::orient ( )
private

Orient the internal data into deal.II format The orientation algorith is as follows

1) Find an unoriented quad (A)

2) Orient an un_oriented side (s) of (A)

3) side hop on (s) of (A) to get (B)

4) if opposite side to (s) of (B) is unoriented orient it

5) repeat 3) and 4) until side-hoppong fails (we've reached a boundary) or (s) has already been oriented (we've closed a loop or unoriented sides).

6) Repeat 2), 3), 4) and 5) on other unoriented sides of (A)

7) Choose a new unoriented A.

void internal::GridReordering2d::GridReordering::get_quads ( std::vector< CellData< 2 > > &  outquads) const
private

Get the (now correctly oriented if we've called orient) quads.

void internal::GridReordering2d::GridReordering::orient_side ( const unsigned int  quadnum,
const unsigned int  localsidenum 
)
private

Orient_side(qnum,lsn) orients the local side lsn of the quad qnum in the triangulation. If the side opposite lsn is oriented then lsn is oriented to match it. Otherwise it is oriented in the "default" direction for the quad.

bool internal::GridReordering2d::GridReordering::is_fully_oriented_quad ( const unsigned int  quadnum) const
private

Returns true if all sides of the quad quadnum are oriented.

bool internal::GridReordering2d::GridReordering::is_oriented_side ( const unsigned int  quadnum,
const unsigned int  lsn 
) const
private

Returns true if the side lsn of the quad quadnum is oriented.

bool internal::GridReordering2d::GridReordering::is_side_default_oriented ( const unsigned int  qnum,
const unsigned int  lsn 
) const
private

Returns true is the side is oriented in the "default" direction

bool internal::GridReordering2d::GridReordering::get_unoriented_quad ( unsigned int UnOrQLoc) const
private

Increases UnOrQLoc from it's original value to the next quad with an unoriented side. Returns true if there was another unoriented quad.

bool internal::GridReordering2d::GridReordering::get_unoriented_side ( const unsigned int  quadnum,
unsigned int sidenum 
) const
private

Sets sidenum to the local sidenumber of an unoriented side of the quad quadnum. Returns true if such a side exists.

bool internal::GridReordering2d::GridReordering::side_hop ( unsigned int qnum,
unsigned int lsn 
) const
private

side_hop(&qnum, &lsn) has qnum being the quadnumber of a quad in the triangulation, and a local side number. side_hop then sets qnum to the quadnumber across the other side of the side, and sets lsn so that quads[qnum].sides[lsn] is the same before and after the call. if there is no other quad on the other side of the current quad, then side_hop returns false.

Member Data Documentation

std::vector<MSide> internal::GridReordering2d::GridReordering::sides
private

A list of enriched sides/edges of the mesh.

Definition at line 357 of file grid_reordering_internal.h.

std::vector<MQuad> internal::GridReordering2d::GridReordering::mquads
private

A list of enriched quads in the mesh.

Definition at line 362 of file grid_reordering_internal.h.


The documentation for this class was generated from the following file: