FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

meshCutter Class Reference

Cuts (splits) cells. More...

#include <dynamicMesh/meshCutter.H>


Detailed Description

Cuts (splits) cells.

Description of cut is given as a loop of 'cuts' per cell (see cellCuts). setRefinement() takes this cut description and inserts the nessecary topoActions (add points/faces/cells) into the polyTopoChange.

Stores added cells/faces/points.

Cut description gives orientation to cut by calculating 'anchorPoints'. The side of the cell that contains the anchorPoints is the master cell. Likewise the cells' edges will have the split added as a duplicate of the master (anchor) point. Think of it as the cell with the anchor points at the bottom. Add a face at the bottom to split the cell and then sweep this face up to be through the middle of the cell (inflation).

  1. Start: cell with anchor points at bottom
    +-------+
    |   +
    |   +
    |   +
    |   +
    |   +
    |   +
    |   +
    +-------+
    anchor  anchor
    
  1. Topo change: splitface introduced at bottom of cell, introducing a new cell and splitting the side faces into two.
    +-------+
    |   +
    |   +
    |   + <- addedCell
    |   +
    |   +
    |   +
    +-------+ <- splitFace
    +-------+ <- original cell
    anchor  anchor
    
  1. Inflation: splitface shifted up to middle of cell (or wherever cut was)
    +-------+
    |   +
    |   + <- addedCell
    |   +
    +-------+ <- splitFace
    |   +
    |   + <- original cell
    |   +
    +-------+
    anchor  anchor
    

Anyway this was the original idea. Inflation was meant to handle conservative properties distribution without interpolation. (just face sweeping through space). But problem was that only if the introduced splitface was exactly the same shape as bottom face (so same 2D topo or perfectly flat) the volume between them was 0.

This meshCutting still uses anchorPoints though:

  • the master cell is the one without the anchor points. The added cell (on top of the splitFace) is the with.
  • the splitFace is owned by the master cell (since it has the lower number)
  • the side faces get split and get either the original cell as neighbour or the added cell (if the faces contain the cell anchor points)
Source files

Definition at line 135 of file meshCutter.H.

Inheritance diagram for meshCutter:
Collaboration diagram for meshCutter:

List of all members.

Public Member Functions

 ClassName ("meshCutter")
 Runtime type information.
 meshCutter (const polyMesh &mesh)
 Construct from mesh.
 ~meshCutter ()
void  setRefinement (const cellCuts &cuts, polyTopoChange &meshMod)
 Do actual cutting with cut description. Inserts mesh changes.
void  updateMesh (const mapPolyMesh &)
 Force recalculation of locally stored data on topological change.
const Map< label > &  addedCells () const
 Cells added. Per split cell label of added cell.
const Map< label > &  addedFaces () const
 Faces added. Per split cell label of added face.
const HashTable< label, edge,
Hash< edge > > &  
addedPoints () const
 Points added. Per split edge label of added point.

Constructor & Destructor Documentation

meshCutter ( const polyMesh &   mesh  )

Construct from mesh.

Definition at line 532 of file meshCutter.C.

~meshCutter (  )

Definition at line 544 of file meshCutter.C.


Member Function Documentation

ClassName ( "meshCutter"    )

Runtime type information.

void updateMesh ( const mapPolyMesh &   morphMap  )

Force recalculation of locally stored data on topological change.

Reimplemented in undoableMeshCutter.

Definition at line 1011 of file meshCutter.C.

References HashTable< T, Key, Hash >::begin(), edge::end(), Foam::endl(), Foam::Pout, mapPolyMesh::reverseCellMap(), mapPolyMesh::reverseFaceMap(), mapPolyMesh::reversePointMap(), and edge::start().

Referenced by undoableMeshCutter::updateMesh().

const Map<label>& addedCells (  ) const [inline]

Cells added. Per split cell label of added cell.

Definition at line 296 of file meshCutter.H.

const Map<label>& addedFaces (  ) const [inline]

Faces added. Per split cell label of added face.

Definition at line 302 of file meshCutter.H.

const HashTable<label, edge, Hash<edge> >& addedPoints (  ) const [inline]

Points added. Per split edge label of added point.

Definition at line 308 of file meshCutter.H.


The documentation for this class was generated from the following files:
  • src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.H
  • src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.C