Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
parallel::SFCDstr Class Reference

A class which distributes a mesh over processors (non overlaping domains) and creates a parallel mesh. More...

#include <sfcdstr.hh>

Inheritance diagram for parallel::SFCDstr:
Inheritance graph
[legend]
Collaboration diagram for parallel::SFCDstr:
Collaboration graph
[legend]

List of all members.

Classes

class  ListElmSFC
 One element which has to be distributed. More...

Public Member Functions

const Communicatorcomm () const
Meshdistribute (concepts::Mesh &msh, uint lvl)
 Refines a mesh up to level lvl and distributes it among processors.
Mesh1distribute1 (concepts::Mesh1 &msh, uint lvl)
Mesh2distribute2 (concepts::Mesh2 &msh, uint lvl)
Mesh3distribute3 (concepts::Mesh3 &msh, uint lvl)
 SFCDstr (uint maxpnt, SFC &sfc, const Communicator &com)
 Constructor.
 ~SFCDstr ()

Protected Member Functions

std::ostream & info (std::ostream &os) const
 Returns information in an output stream.

Private Member Functions

template<class T >
void boundingBox_ (ListHead< ListElmSFC< T > > &lst, Real3d *pmin, Real *d, uint *npnt)
 Computes the bounding box of the cells to distribute.
bool mapCount1_ (Cell1 *cell, uint lvl, DynArray< uchar > &cellmap)
 Indicates if the map of a cell has to be saved separately (1d).
bool mapCount2_ (Cell2 *cell, uint lvl, DynArray< uchar > &cellmap)
 Indicates if the map of a cell has to be saved separately (2d).
bool mapCount3_ (Cell3 *cell, uint lvl, DynArray< uchar > &cellmap)
 Indicates if the map of a cell has to be saved separately (3d).
void markOwnCells1_ (ListHead< ListElmSFC< Cell1 > > &cells, uint *ncntr0, DynArray< uchar > &cellmap)
 Marks the cells staying on the own processor and counts the number of vertices on the own processor (1d).
void markOwnCells2_ (ListHead< ListElmSFC< Cell2 > > &cells, uint *ncntr0, uint *ncntr1, DynArray< uchar > &cellmap)
 Marks the cells staying on the own processor and counts the number of vertices and edges on the own processor (2d).
void markOwnCells3_ (ListHead< ListElmSFC< Cell3 > > &cells, uint *ncntr0, uint *ncntr1, uint *ncntr2, DynArray< uchar > &cellmap)
 Marks the cells staying on the own processor and counts the number of vertices, edges and faces on the own processor (3d).
void newCells1A_ (concepts::Edge1d *edg, uint lvl, uint *n, concepts::MapEdge1d *mapcln, DynArray< uchar > &cellmap, DynArray< concepts::Vertex * > &vtxmap, Array< auto_ptr< Connector0 > > &cntr0, Array< auto_ptr< Connector1 > > &cntr1, Array< auto_ptr< Cell1 > > &cell1)
 Makes a copy of the Edge1d on the own processor.
void newCells2A_ (concepts::Triangle2d *tri, uint lvl, uint *n, concepts::MappingTriangle2d *mapcln, DynArray< uchar > &cellmap, DynArray< concepts::Vertex * > &vtxmap, DynArray< concepts::Edge * > &edgmap, Array< auto_ptr< Connector0 > > &cntr0, Array< auto_ptr< Connector1 > > &cntr1, Array< auto_ptr< Connector2 > > &cntr2, Array< auto_ptr< Cell2 > > &cell2)
 Makes a copy of the Triangle2d on the own processor.
void newCells2B_ (concepts::Quad2d *quad, uint lvl, uint *n, concepts::MappingQuad2d *mapcln, DynArray< uchar > &cellmap, DynArray< concepts::Vertex * > &vtxmap, DynArray< concepts::Edge * > &edgmap, Array< auto_ptr< Connector0 > > &cntr0, Array< auto_ptr< Connector1 > > &cntr1, Array< auto_ptr< Connector2 > > &cntr2, Array< auto_ptr< Cell2 > > &cell2)
void newCells2C_ (concepts::Triangle3d *tri, uint lvl, uint *n, concepts::MapTriangle3d *mapcln, DynArray< uchar > &cellmap, DynArray< concepts::Vertex * > &vtxmap, DynArray< concepts::Edge * > &edgmap, Array< auto_ptr< Connector0 > > &cntr0, Array< auto_ptr< Connector1 > > &cntr1, Array< auto_ptr< Connector2 > > &cntr2, Array< auto_ptr< Cell2 > > &cell2)
void newCells3A_ (concepts::Hexahedron3d *hex, uint lvl, uint *n, concepts::MapHexahedron3d *mapcln, DynArray< uchar > &cellmap, DynArray< concepts::Vertex * > &vtxmap, DynArray< concepts::Edge * > &edgmap, DynArray< Connector2 * > &fcemap, Array< auto_ptr< Connector0 > > &cntr0, Array< auto_ptr< Connector1 > > &cntr1, Array< auto_ptr< Connector2 > > &cntr2, Array< auto_ptr< Connector3 > > &cntr3, Array< auto_ptr< Cell3 > > &cell3)
 Makes a copy of the Hexahedron3d on the own processor.
void refine1_ (Cell1 *cell, uint lvl, ListHead< ListElmSFC< Cell1 > > &lst)
 Refines geometry in 1d.
void refine2_ (Cell2 *cell, uint lvl, ListHead< ListElmSFC< Cell2 > > &lst)
 Refines geometry in 2d.
void refine3_ (Cell3 *cell, uint lvl, ListHead< ListElmSFC< Cell3 > > &lst)
 Refines geometry in 3d.
template<class T >
void sortList_ (ListElmSFC< T > **root, Real &d, Real3d &pmin, ushort ori)
 Sorts the cells to distribute according to the space filling curve.

Private Attributes

const Communicatorcom_
 Communicator.
uint maxpnt_
 Maximal number of points per box for stopping recursion.
SFCsfc_
 Space filling curve.

Detailed Description

A class which distributes a mesh over processors (non overlaping domains) and creates a parallel mesh.

The mesh is refined up to a certain level. On this refinement level the cells are distributed among the processors. The cells on the own processor and on refinement level are copied. With the copied cells a parallel mesh is created. Note, the new parallel mesh has a refinement level of 0!

Definition at line 32 of file sfcdstr.hh.


Constructor & Destructor Documentation

parallel::SFCDstr::SFCDstr ( uint  maxpnt,
SFC sfc,
const Communicator com 
)

Constructor.

Parameters:
maxpntMaximal number of points per box
sfcSpace filling curve
comCommunicator
parallel::SFCDstr::~SFCDstr ( )

Member Function Documentation

template<class T >
void parallel::SFCDstr::boundingBox_ ( ListHead< ListElmSFC< T > > &  lst,
Real3d *  pmin,
Real *  d,
uint *  npnt 
) [private]

Computes the bounding box of the cells to distribute.

Parameters:
TCell to sort (Cell1 1d, Cell2 2d, Cell3 3d)
lstList of the elements to sort
pminlower left front vertex of the bounding box (output)
dEdge size of the bounding box (output)
npntNumber of element in the list (output)
const Communicator& parallel::SFCDstr::comm ( ) const [inline]

Definition at line 266 of file sfcdstr.hh.

Mesh* parallel::SFCDstr::distribute ( concepts::Mesh msh,
uint  lvl 
)

Refines a mesh up to level lvl and distributes it among processors.

Mesh1* parallel::SFCDstr::distribute1 ( concepts::Mesh1 msh,
uint  lvl 
)
Mesh2* parallel::SFCDstr::distribute2 ( concepts::Mesh2 msh,
uint  lvl 
)
Mesh3* parallel::SFCDstr::distribute3 ( concepts::Mesh3 msh,
uint  lvl 
)
std::ostream& parallel::SFCDstr::info ( std::ostream &  os) const [protected, virtual]

Returns information in an output stream.

Reimplemented from concepts::OutputOperator.

bool parallel::SFCDstr::mapCount1_ ( Cell1 cell,
uint  lvl,
DynArray< uchar > &  cellmap 
) [private]

Indicates if the map of a cell has to be saved separately (1d).

Parameters:
boolTrue if map has to be saved separately.
cellCell
lvlLevel
cellmapArray indicating the own cells on refinement level
bool parallel::SFCDstr::mapCount2_ ( Cell2 cell,
uint  lvl,
DynArray< uchar > &  cellmap 
) [private]

Indicates if the map of a cell has to be saved separately (2d).

Parameters:
boolTrue if map has to be saved separately.
cellCell
lvlLevel
cellmapArray indicating the own cells on refinement level
bool parallel::SFCDstr::mapCount3_ ( Cell3 cell,
uint  lvl,
DynArray< uchar > &  cellmap 
) [private]

Indicates if the map of a cell has to be saved separately (3d).

Parameters:
boolTrue if map has to be saved separately.
cellCell
lvlLevel
cellmapArray indicating the own cells on refinement level
void parallel::SFCDstr::markOwnCells1_ ( ListHead< ListElmSFC< Cell1 > > &  cells,
uint *  ncntr0,
DynArray< uchar > &  cellmap 
) [private]

Marks the cells staying on the own processor and counts the number of vertices on the own processor (1d).

Parameters:
cellsList of cells staying on the own processor
ncntr0Number of vertices on the own processor (output)
cellmapArray indicating the own cells (output)
void parallel::SFCDstr::markOwnCells2_ ( ListHead< ListElmSFC< Cell2 > > &  cells,
uint *  ncntr0,
uint *  ncntr1,
DynArray< uchar > &  cellmap 
) [private]

Marks the cells staying on the own processor and counts the number of vertices and edges on the own processor (2d).

Parameters:
cellsList of cells staying on the own processor
ncntr0Number of vertices on the own processor (output)
ncntr1Number of edges on the own processor (output)
cellmapArray indicating the own cells (output)
void parallel::SFCDstr::markOwnCells3_ ( ListHead< ListElmSFC< Cell3 > > &  cells,
uint *  ncntr0,
uint *  ncntr1,
uint *  ncntr2,
DynArray< uchar > &  cellmap 
) [private]

Marks the cells staying on the own processor and counts the number of vertices, edges and faces on the own processor (3d).

Parameters:
cellsList of cells staying on the own processor
ncntr0Number of vertices on the own processor (output)
ncntr1Number of edges on the own processor (output)
ncntr2Number of faces on the own processor (output)
cellmapArray indicating the own cells (output)
void parallel::SFCDstr::newCells1A_ ( concepts::Edge1d edg,
uint  lvl,
uint *  n,
concepts::MapEdge1d mapcln,
DynArray< uchar > &  cellmap,
DynArray< concepts::Vertex * > &  vtxmap,
Array< auto_ptr< Connector0 > > &  cntr0,
Array< auto_ptr< Connector1 > > &  cntr1,
Array< auto_ptr< Cell1 > > &  cell1 
) [private]

Makes a copy of the Edge1d on the own processor.

Parameters:
edgCell containing cells on the own processor.
lvlRefinement level.
nVector with number of elements (in-/output) n[0]: Number of maps n[1]: Number of cells n[2]: Number of vertices
mapclnPointer of the copy of the element map.
cellmapArray indicating the own cells.
vtxmapPointer of the copy of the vertices (in-/output)
cntr0Vector containing vertices of the parallel mesh (output).
cntr1Vector containing edges of the parallel mesh (output).
cell1Vector containing cells of the parallel mesh (output).
void parallel::SFCDstr::newCells2A_ ( concepts::Triangle2d tri,
uint  lvl,
uint *  n,
concepts::MappingTriangle2d mapcln,
DynArray< uchar > &  cellmap,
DynArray< concepts::Vertex * > &  vtxmap,
DynArray< concepts::Edge * > &  edgmap,
Array< auto_ptr< Connector0 > > &  cntr0,
Array< auto_ptr< Connector1 > > &  cntr1,
Array< auto_ptr< Connector2 > > &  cntr2,
Array< auto_ptr< Cell2 > > &  cell2 
) [private]

Makes a copy of the Triangle2d on the own processor.

Parameters:
triCell containing cells on the own processor.
lvlRefinement level.
nVector with number of elements (in-/output) n[0]: Number of maps n[1]: Number of cells n[2]: Number of vertices n[3]: Number of edges
mapclnPointer of the copy of the element map.
cellmapArray indicating the own cells.
vtxmapPointer of the copy of the vertices (in-/output)
edgmapPointer of the copy of the edges (in-/output)
cntr0Vector containing vertices of the parallel mesh (output).
cntr1Vector containing edges of the parallel mesh (output).
cntr2Vector containing faces of the parallel mesh (output).
cell2Vector containing cells of the parallel mesh (output).
void parallel::SFCDstr::newCells2B_ ( concepts::Quad2d quad,
uint  lvl,
uint *  n,
concepts::MappingQuad2d mapcln,
DynArray< uchar > &  cellmap,
DynArray< concepts::Vertex * > &  vtxmap,
DynArray< concepts::Edge * > &  edgmap,
Array< auto_ptr< Connector0 > > &  cntr0,
Array< auto_ptr< Connector1 > > &  cntr1,
Array< auto_ptr< Connector2 > > &  cntr2,
Array< auto_ptr< Cell2 > > &  cell2 
) [private]
void parallel::SFCDstr::newCells2C_ ( concepts::Triangle3d tri,
uint  lvl,
uint *  n,
concepts::MapTriangle3d mapcln,
DynArray< uchar > &  cellmap,
DynArray< concepts::Vertex * > &  vtxmap,
DynArray< concepts::Edge * > &  edgmap,
Array< auto_ptr< Connector0 > > &  cntr0,
Array< auto_ptr< Connector1 > > &  cntr1,
Array< auto_ptr< Connector2 > > &  cntr2,
Array< auto_ptr< Cell2 > > &  cell2 
) [private]
void parallel::SFCDstr::newCells3A_ ( concepts::Hexahedron3d hex,
uint  lvl,
uint *  n,
concepts::MapHexahedron3d mapcln,
DynArray< uchar > &  cellmap,
DynArray< concepts::Vertex * > &  vtxmap,
DynArray< concepts::Edge * > &  edgmap,
DynArray< Connector2 * > &  fcemap,
Array< auto_ptr< Connector0 > > &  cntr0,
Array< auto_ptr< Connector1 > > &  cntr1,
Array< auto_ptr< Connector2 > > &  cntr2,
Array< auto_ptr< Connector3 > > &  cntr3,
Array< auto_ptr< Cell3 > > &  cell3 
) [private]

Makes a copy of the Hexahedron3d on the own processor.

Parameters:
hexCell containing cells on the own processor.
lvlRefinement level.
nVector with number of elements (in-/output) n[0]: Number of maps n[1]: Number of cells n[2]: Number of vertices n[3]: Number of edges n[4]: Number of faces
mapclnPointer of the copy of the element map.
cellmapArray indicating the own cells.
vtxmapPointer of the copy of the vertices (in-/output)
edgmapPointer of the copy of the edges (in-/output)
fcemapPointer of the copy of the faces (in-/output)
cntr0Vector containing vertices of the parallel mesh (output).
cntr1Vector containing edges of the parallel mesh (output).
cntr2Vector containing faces of the parallel mesh (output).
cntr3Vector containing volumes of the parallel mesh (output).
cell3Vector containing cells of the parallel mesh (output).
void parallel::SFCDstr::refine1_ ( Cell1 cell,
uint  lvl,
ListHead< ListElmSFC< Cell1 > > &  lst 
) [private]

Refines geometry in 1d.

Parameters:
cellCell to refine
lvlRefinement level
lstAdds the cells on refinement level to the list (output)
void parallel::SFCDstr::refine2_ ( Cell2 cell,
uint  lvl,
ListHead< ListElmSFC< Cell2 > > &  lst 
) [private]

Refines geometry in 2d.

Parameters:
cellCell to refine
lvlRefinement level
lstAdds the cells on refinement level to the list (output)
void parallel::SFCDstr::refine3_ ( Cell3 cell,
uint  lvl,
ListHead< ListElmSFC< Cell3 > > &  lst 
) [private]

Refines geometry in 3d.

Parameters:
cellCell to refine
lvlRefinement level
lstAdds the cells on refinement level to the list (output)
template<class T >
void parallel::SFCDstr::sortList_ ( ListElmSFC< T > **  root,
Real &  d,
Real3d &  pmin,
ushort  ori 
) [private]

Sorts the cells to distribute according to the space filling curve.

Parameters:
TCells to sort (Cell1 1d, Cell2 2d, Cell3 3d)
rootList with the cells to sort (in-/output)
dEdge size of the box containing all centers of the cells
pminlower left front vertex of the box
ororientation of the box

Member Data Documentation

Communicator.

Definition at line 245 of file sfcdstr.hh.

Maximal number of points per box for stopping recursion.

Definition at line 247 of file sfcdstr.hh.

Space filling curve.

Definition at line 249 of file sfcdstr.hh.


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

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)