A class which distributes a mesh over processors (non overlaping domains) and creates a parallel mesh. More...
#include <sfcdstr.hh>


Classes | |
| class | ListElmSFC |
| One element which has to be distributed. More... | |
Public Member Functions | |
| const Communicator & | comm () const |
| Mesh * | distribute (concepts::Mesh &msh, uint lvl) |
| Refines a mesh up to level lvl and distributes it among processors. | |
| Mesh1 * | distribute1 (concepts::Mesh1 &msh, uint lvl) |
| Mesh2 * | distribute2 (concepts::Mesh2 &msh, uint lvl) |
| Mesh3 * | distribute3 (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 Communicator & | com_ |
| Communicator. | |
| uint | maxpnt_ |
| Maximal number of points per box for stopping recursion. | |
| SFC & | sfc_ |
| Space filling curve. | |
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.
| parallel::SFCDstr::SFCDstr | ( | uint | maxpnt, |
| SFC & | sfc, | ||
| const Communicator & | com | ||
| ) |
Constructor.
| maxpnt | Maximal number of points per box |
| sfc | Space filling curve |
| com | Communicator |
| parallel::SFCDstr::~SFCDstr | ( | ) |
| void parallel::SFCDstr::boundingBox_ | ( | ListHead< ListElmSFC< T > > & | lst, |
| Real3d * | pmin, | ||
| Real * | d, | ||
| uint * | npnt | ||
| ) | [private] |
Computes the bounding box of the cells to distribute.
| T | Cell to sort (Cell1 1d, Cell2 2d, Cell3 3d) |
| lst | List of the elements to sort |
| pmin | lower left front vertex of the bounding box (output) |
| d | Edge size of the bounding box (output) |
| npnt | Number 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).
| bool | True if map has to be saved separately. |
| cell | Cell |
| lvl | Level |
| cellmap | Array 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).
| bool | True if map has to be saved separately. |
| cell | Cell |
| lvl | Level |
| cellmap | Array 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).
| bool | True if map has to be saved separately. |
| cell | Cell |
| lvl | Level |
| cellmap | Array 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).
| cells | List of cells staying on the own processor |
| ncntr0 | Number of vertices on the own processor (output) |
| cellmap | Array 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).
| cells | List of cells staying on the own processor |
| ncntr0 | Number of vertices on the own processor (output) |
| ncntr1 | Number of edges on the own processor (output) |
| cellmap | Array 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).
| cells | List of cells staying on the own processor |
| ncntr0 | Number of vertices on the own processor (output) |
| ncntr1 | Number of edges on the own processor (output) |
| ncntr2 | Number of faces on the own processor (output) |
| cellmap | Array 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.
| edg | Cell containing cells on the own processor. |
| lvl | Refinement level. |
| n | Vector with number of elements (in-/output) n[0]: Number of maps n[1]: Number of cells n[2]: Number of vertices |
| mapcln | Pointer of the copy of the element map. |
| cellmap | Array indicating the own cells. |
| vtxmap | Pointer of the copy of the vertices (in-/output) |
| cntr0 | Vector containing vertices of the parallel mesh (output). |
| cntr1 | Vector containing edges of the parallel mesh (output). |
| cell1 | Vector 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.
| tri | Cell containing cells on the own processor. |
| lvl | Refinement level. |
| n | Vector 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 |
| mapcln | Pointer of the copy of the element map. |
| cellmap | Array indicating the own cells. |
| vtxmap | Pointer of the copy of the vertices (in-/output) |
| edgmap | Pointer of the copy of the edges (in-/output) |
| cntr0 | Vector containing vertices of the parallel mesh (output). |
| cntr1 | Vector containing edges of the parallel mesh (output). |
| cntr2 | Vector containing faces of the parallel mesh (output). |
| cell2 | Vector 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.
| hex | Cell containing cells on the own processor. |
| lvl | Refinement level. |
| n | Vector 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 |
| mapcln | Pointer of the copy of the element map. |
| cellmap | Array indicating the own cells. |
| vtxmap | Pointer of the copy of the vertices (in-/output) |
| edgmap | Pointer of the copy of the edges (in-/output) |
| fcemap | Pointer of the copy of the faces (in-/output) |
| cntr0 | Vector containing vertices of the parallel mesh (output). |
| cntr1 | Vector containing edges of the parallel mesh (output). |
| cntr2 | Vector containing faces of the parallel mesh (output). |
| cntr3 | Vector containing volumes of the parallel mesh (output). |
| cell3 | Vector containing cells of the parallel mesh (output). |
| void parallel::SFCDstr::refine1_ | ( | Cell1 * | cell, |
| uint | lvl, | ||
| ListHead< ListElmSFC< Cell1 > > & | lst | ||
| ) | [private] |
Refines geometry in 1d.
| cell | Cell to refine |
| lvl | Refinement level |
| lst | Adds 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.
| cell | Cell to refine |
| lvl | Refinement level |
| lst | Adds 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.
| cell | Cell to refine |
| lvl | Refinement level |
| lst | Adds the cells on refinement level to the list (output) |
| 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.
| T | Cells to sort (Cell1 1d, Cell2 2d, Cell3 3d) |
| root | List with the cells to sort (in-/output) |
| d | Edge size of the box containing all centers of the cells |
| pmin | lower left front vertex of the box |
| or | orientation of the box |
const Communicator& parallel::SFCDstr::com_ [private] |
Definition at line 245 of file sfcdstr.hh.
uint parallel::SFCDstr::maxpnt_ [private] |
Maximal number of points per box for stopping recursion.
Definition at line 247 of file sfcdstr.hh.
SFC& parallel::SFCDstr::sfc_ [private] |
Space filling curve.
Definition at line 249 of file sfcdstr.hh.