OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

meshRefinement.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::meshRefinement
00027 
00028 Description
00029     Helper class which maintains intersections of (changing) mesh with
00030     (static) surfaces.
00031 
00032     Maintains
00033     - per face any intersections of the cc-cc segment with any of the surfaces
00034 
00035 SourceFiles
00036     meshRefinement.C
00037     meshRefinementBaffles.C
00038     meshRefinementMerge.C
00039     meshRefinementProblemCells.C
00040     meshRefinementRefine.C
00041 
00042 \*---------------------------------------------------------------------------*/
00043 
00044 #ifndef meshRefinement_H
00045 #define meshRefinement_H
00046 
00047 #include "hexRef8.H"
00048 #include "mapPolyMesh.H"
00049 #include "autoPtr.H"
00050 #include "labelPair.H"
00051 #include "indirectPrimitivePatch.H"
00052 #include "pointFieldsFwd.H"
00053 #include "Tuple2.H"
00054 #include "pointIndexHit.H"
00055 
00056 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00057 
00058 namespace Foam
00059 {
00060 
00061 // Class forward declarations
00062 class fvMesh;
00063 class mapDistributePolyMesh;
00064 class decompositionMethod;
00065 class refinementSurfaces;
00066 class shellSurfaces;
00067 class removeCells;
00068 class featureEdgeMesh;
00069 class fvMeshDistribute;
00070 class searchableSurface;
00071 class regionSplit;
00072 class globalIndex;
00073 
00074 /*---------------------------------------------------------------------------*\
00075                            Class meshRefinement Declaration
00076 \*---------------------------------------------------------------------------*/
00077 
00078 class meshRefinement
00079 {
00080 
00081 public:
00082 
00083     // Public data types
00084 
00085         //- Enumeration for debug dumping
00086         enum writeFlag
00087         {
00088             MESH = 1,
00089             SCALARLEVELS = 2,
00090             OBJINTERSECTIONS = 4
00091         };
00092 
00093 
00094         //- Enumeration for how the userdata is to be mapped upon refinement.
00095         enum mapType
00096         {
00097             MASTERONLY = 1, 
00098             KEEPALL = 2,    
00099             REMOVE = 4      
00100         };
00101 
00102 
00103 private:
00104 
00105     // Private data
00106 
00107         //- Reference to mesh
00108         fvMesh& mesh_;
00109 
00110         //- tolerance used for sorting coordinates (used in 'less' routine)
00111         const scalar mergeDistance_;
00112 
00113         //- overwrite the mesh?
00114         const bool overwrite_;
00115 
00116         //- Instance of mesh upon construction. Used when in overwrite_ mode.
00117         const word oldInstance_;
00118 
00119         //- All surface-intersection interaction
00120         const refinementSurfaces& surfaces_;
00121 
00122         //- All shell-refinement interaction
00123         const shellSurfaces& shells_;
00124 
00125         //- refinement engine
00126         hexRef8 meshCutter_;
00127 
00128         //- per cc-cc vector the index of the surface hit
00129         labelIOList surfaceIndex_;
00130 
00131         //- user supplied face based data.
00132         List<Tuple2<mapType, labelList> > userFaceData_;
00133 
00134         //- Meshed patches - are treated differently. Stored as wordList since
00135         //  order changes.
00136         wordList meshedPatches_;
00137 
00138 
00139     // Private Member Functions
00140 
00141         //- Reorder list according to map.
00142         template<class T>
00143         static void updateList
00144         (
00145             const labelList& newToOld,
00146             const T& nullValue,
00147             List<T>& elems
00148         );
00149 
00150         //- Add patchfield of given type to all fields on mesh
00151         template<class GeoField>
00152         static void addPatchFields(fvMesh&, const word& patchFieldType);
00153 
00154         //- Reorder patchfields of all fields on mesh
00155         template<class GeoField>
00156         static void reorderPatchFields(fvMesh&, const labelList& oldToNew);
00157 
00158         //- Find out which faces have changed given cells (old mesh labels)
00159         //  that were marked for refinement.
00160         static labelList getChangedFaces
00161         (
00162             const mapPolyMesh&,
00163             const labelList& oldCellsToRefine
00164         );
00165 
00166         //- Calculate coupled boundary end vector and refinement level
00167         void calcNeighbourData
00168         (
00169             labelList& neiLevel,
00170             pointField& neiCc
00171         ) const;
00172 
00173         //- Find any intersection of surface. Store in surfaceIndex_.
00174         void updateIntersections(const labelList& changedFaces);
00175 
00176         //- Remove cells. Put exposedFaces into exposedPatchIDs.
00177         autoPtr<mapPolyMesh> doRemoveCells
00178         (
00179             const labelList& cellsToRemove,
00180             const labelList& exposedFaces,
00181             const labelList& exposedPatchIDs,
00182             removeCells& cellRemover
00183         );
00184 
00185         // Get cells which are inside any closed surface. Note that
00186         // all closed surfaces
00187         // will have already been oriented to have keepPoint outside.
00188         labelList getInsideCells(const word&) const;
00189 
00190         // Do all to remove inside cells
00191         autoPtr<mapPolyMesh> removeInsideCells
00192         (
00193             const string& msg,
00194             const label exposedPatchI
00195         );
00196 
00197         // For decomposeCombineRegions
00198 
00199             //- Used in decomposeCombineRegions. Given global region per cell
00200             //  determines master processor/cell for regions straddling
00201             //  procboundaries.
00202             void getCoupledRegionMaster
00203             (
00204                 const globalIndex& globalCells,
00205                 const boolList& blockedFace,
00206                 const regionSplit& globalRegion,
00207                 Map<label>& regionToMaster
00208             ) const;
00209 
00210             //- Determine regions that are local to me or coupled ones that
00211             //  are owned by me. Determine representative location.
00212             void calcLocalRegions
00213             (
00214                 const globalIndex& globalCells,
00215                 const labelList& globalRegion,
00216                 const Map<label>& coupledRegionToMaster,
00217 
00218                 Map<label>& globalToLocalRegion,
00219                 pointField& localPoints
00220             ) const;
00221 
00222             //- Convert region into global index.
00223             static label getShiftedRegion
00224             (
00225                 const globalIndex& indexer,
00226                 const Map<label>& globalToLocalRegion,
00227                 const Map<label>& coupledRegionToShifted,
00228                 const label globalRegion
00229             );
00230 
00231             //- helper: add element if not in list. Linear search.
00232             static void addUnique(const label, labelList&);
00233 
00234             //- Calculate region connectivity. Major communication.
00235             void calcRegionRegions
00236             (
00237                 const labelList& globalRegion,
00238                 const Map<label>& globalToLocalRegion,
00239                 const Map<label>& coupledRegionToMaster,
00240                 labelListList& regionRegions
00241             ) const;
00242 
00243 
00244         // Refinement candidate selection
00245 
00246             //- Mark cell for refinement (if not already marked). Return false
00247             // if refinelimit hit. Keeps running count (in nRefine) of cells
00248             // marked for refinement
00249             static bool markForRefine
00250             (
00251                 const label markValue,
00252                 const label nAllowRefine,
00253                 label& cellValue,
00254                 label& nRefine
00255             );
00256 
00257             //- Calculate list of cells to refine based on intersection of
00258             //  features.
00259             label markFeatureRefinement
00260             (
00261                 const point& keepPoint,
00262                 const PtrList<featureEdgeMesh>& featureMeshes,
00263                 const labelList& featureLevels,
00264                 const label nAllowRefine,
00265 
00266                 labelList& refineCell,
00267                 label& nRefine
00268             ) const;
00269 
00270             //- Mark cells for refinement-shells based refinement.
00271             label markInternalRefinement
00272             (
00273                 const label nAllowRefine,
00274                 labelList& refineCell,
00275                 label& nRefine
00276             ) const;
00277 
00278             //- Collect faces that are intersected and whose neighbours aren't
00279             //  yet marked  for refinement.
00280             labelList getRefineCandidateFaces
00281             (
00282                 const labelList& refineCell
00283             ) const;
00284 
00285             //- Mark cells for surface intersection based refinement.
00286             label markSurfaceRefinement
00287             (
00288                 const label nAllowRefine,
00289                 const labelList& neiLevel,
00290                 const pointField& neiCc,
00291                 labelList& refineCell,
00292                 label& nRefine
00293             ) const;
00294 
00295             //- Mark cell if local curvature > curvature or
00296             //  markDifferingRegions = true and intersections with different
00297             //  regions.
00298             bool checkCurvature
00299             (
00300                 const scalar curvature,
00301                 const label nAllowRefine,
00302                 const label surfaceLevel,
00303                 const vector& surfaceNormal,
00304                 const label cellI,
00305                 label& cellMaxLevel,
00306                 vector& cellMaxNormal,
00307                 labelList& refineCell,
00308                 label& nRefine
00309             ) const;
00310 
00311 
00312             //- Mark cells for surface curvature based refinement. Marks if
00313             //  local curvature > curvature or if on different regions
00314             //  (markDifferingRegions)
00315             label markSurfaceCurvatureRefinement
00316             (
00317                 const scalar curvature,
00318                 const label nAllowRefine,
00319                 const labelList& neiLevel,
00320                 const pointField& neiCc,
00321                 labelList& refineCell,
00322                 label& nRefine
00323             ) const;
00324 
00325         // Baffle handling
00326 
00327             //- Determine patches for baffles
00328             void getBafflePatches
00329             (
00330                 const labelList& globalToPatch,
00331                 const labelList& neiLevel,
00332                 const pointField& neiCc,
00333                 labelList& ownPatch,
00334                 labelList& neiPatch
00335             ) const;
00336 
00337             //- Determine patch for baffle using some heuristic (and not
00338             //  surface)
00339             label getBafflePatch
00340             (
00341                 const labelList& facePatch,
00342                 const label faceI
00343             ) const;
00344 
00345             //- Repatches external face or creates baffle for internal face
00346             //  with user specified patches (might be different for both sides).
00347             //  Returns label of added face.
00348             label createBaffle
00349             (
00350                 const label faceI,
00351                 const label ownPatch,
00352                 const label neiPatch,
00353                 polyTopoChange& meshMod
00354             ) const;
00355 
00356         // Problem cell handling
00357 
00358             //- Helper function to mark face as being on 'boundary'. Used by
00359             //  markFacesOnProblemCells
00360             void markBoundaryFace
00361             (
00362                 const label faceI,
00363                 boolList& isBoundaryFace,
00364                 boolList& isBoundaryEdge,
00365                 boolList& isBoundaryPoint
00366             ) const;
00367 
00368             void findNearest
00369             (
00370                 const labelList& meshFaces,
00371                 List<pointIndexHit>& nearestInfo,
00372                 labelList& nearestSurface,
00373                 labelList& nearestRegion,
00374                 vectorField& nearestNormal
00375             ) const;
00376 
00377             Map<label> findEdgeConnectedProblemCells
00378             (
00379                 const scalarField& perpendicularAngle,
00380                 const labelList&
00381             ) const;
00382 
00383             bool isCollapsedFace
00384             (
00385                 const pointField&,
00386                 const pointField& neiCc,
00387                 const scalar minFaceArea,
00388                 const scalar maxNonOrtho,
00389                 const label faceI
00390             ) const;
00391 
00392             bool isCollapsedCell
00393             (
00394                 const pointField&,
00395                 const scalar volFraction,
00396                 const label cellI
00397             ) const;
00398 
00399             //- Returns list with for every internal face -1 or the patch
00400             //  they should be baffled into. If removeEdgeConnectedCells is set
00401             //  removes cells based on perpendicularAngle.
00402             labelList markFacesOnProblemCells
00403             (
00404                 const dictionary& motionDict,
00405                 const bool removeEdgeConnectedCells,
00406                 const scalarField& perpendicularAngle,
00407                 const labelList& globalToPatch
00408             ) const;
00409 
00411             //labelList markFacesOnProblemCellsGeometric
00412             //(
00413             //    const dictionary& motionDict
00414             //) const;
00415 
00416 
00417         // Baffle merging
00418 
00419             //- Extract those baffles (duplicate) faces that are on the edge
00420             //  of a baffle region. These are candidates for merging.
00421             List<labelPair> filterDuplicateFaces(const List<labelPair>&) const;
00422 
00423 
00424         // Zone handling
00425 
00426             //- Finds zone per cell for cells inside closed named surfaces.
00427             //  (uses geometric test for insideness)
00428             //  Adapts namedSurfaceIndex so all faces on boundary of cellZone
00429             //  have corresponding faceZone.
00430             void findCellZoneGeometric
00431             (
00432                 const labelList& closedNamedSurfaces,
00433                 labelList& namedSurfaceIndex,
00434                 const labelList& surfaceToCellZone,
00435                 labelList& cellToZone
00436             ) const;
00437 
00438             //- Determines cell zone from cell region information.
00439             bool calcRegionToZone
00440             (
00441                 const label surfZoneI,
00442                 const label ownRegion,
00443                 const label neiRegion,
00444 
00445                 labelList& regionToCellZone
00446             ) const;
00447 
00448             //- Finds zone per cell. Uses topological walk with all faces
00449             //  marked in namedSurfaceIndex regarded as blocked.
00450             void findCellZoneTopo
00451             (
00452                 const point& keepPoint,
00453                 const labelList& namedSurfaceIndex,
00454                 const labelList& surfaceToCellZone,
00455                 labelList& cellToZone
00456             ) const;
00457 
00458             void makeConsistentFaceIndex
00459             (
00460                 const labelList& cellToZone,
00461                 labelList& namedSurfaceIndex
00462             ) const;
00463 
00464 
00465         //- Disallow default bitwise copy construct
00466         meshRefinement(const meshRefinement&);
00467 
00468         //- Disallow default bitwise assignment
00469         void operator=(const meshRefinement&);
00470 
00471 public:
00472 
00473     //- Runtime type information
00474     ClassName("meshRefinement");
00475 
00476 
00477     // Constructors
00478 
00479         //- Construct from components
00480         meshRefinement
00481         (
00482             fvMesh& mesh,
00483             const scalar mergeDistance,
00484             const bool overwrite,
00485             const refinementSurfaces&,
00486             const shellSurfaces&
00487         );
00488 
00489 
00490     // Member Functions
00491 
00492         // Access
00493 
00494             //- reference to mesh
00495             const fvMesh& mesh() const
00496             {
00497                 return mesh_;
00498             }
00499             fvMesh& mesh()
00500             {
00501                 return mesh_;
00502             }
00503 
00504             scalar mergeDistance() const
00505             {
00506                 return mergeDistance_;
00507             }
00508 
00509             //- Overwrite the mesh?
00510             bool overwrite() const
00511             {
00512                 return overwrite_;
00513             }
00514 
00515             //- (points)instance of mesh upon construction
00516             const word& oldInstance() const
00517             {
00518                 return oldInstance_;
00519             }
00520 
00521             //- reference to surface search engines
00522             const refinementSurfaces& surfaces() const
00523             {
00524                 return surfaces_;
00525             }
00526 
00527             //- reference to refinement shells (regions)
00528             const shellSurfaces& shells() const
00529             {
00530                 return shells_;
00531             }
00532 
00533             //- reference to meshcutting engine
00534             const hexRef8& meshCutter() const
00535             {
00536                 return meshCutter_;
00537             }
00538 
00539             //- per start-end edge the index of the surface hit
00540             const labelList& surfaceIndex() const
00541             {
00542                 return surfaceIndex_;
00543             }
00544 
00545             labelList& surfaceIndex()
00546             {
00547                 return surfaceIndex_;
00548             }
00549 
00550             //- Additional face data that is maintained across
00551             //  topo changes. Every entry is a list over all faces.
00552             //  Bit of a hack. Additional flag to say whether to maintain master
00553             //  only (false) or increase set to account for face-from-face.
00554             const List<Tuple2<mapType, labelList> >& userFaceData() const
00555             {
00556                 return userFaceData_;
00557             }
00558 
00559             List<Tuple2<mapType, labelList> >& userFaceData()
00560             {
00561                 return userFaceData_;
00562             }
00563 
00564 
00565         // Other
00566 
00567             //- Count number of intersections (local)
00568             label countHits() const;
00569 
00570             //- Helper function to get decomposition such that all connected
00571             //  regions get moved onto one processor. Used to prevent baffles
00572             //  straddling processor boundaries. explicitConnections is to
00573             //  keep pairs of non-coupled boundary faces together
00574             //  (e.g. to keep baffles together)
00575             labelList decomposeCombineRegions
00576             (
00577                 const boolList& blockedFace,
00578                 const List<labelPair>& explicitConnections,
00579                 decompositionMethod&
00580             ) const;
00581 
00582             //- Redecompose according to cell count
00583             //  keepZoneFaces : find all faceZones from zoned surfaces and keep
00584             //                  owner and neighbour together
00585             //  keepBaffles   : find all baffles and keep them together
00586             autoPtr<mapDistributePolyMesh> balance
00587             (
00588                 const bool keepZoneFaces,
00589                 const bool keepBaffles,
00590                 decompositionMethod& decomposer,
00591                 fvMeshDistribute& distributor
00592             );
00593 
00594             //- Get faces with intersection.
00595             labelList intersectedFaces() const;
00596 
00597             //- Get points on surfaces with intersection and boundary faces.
00598             labelList intersectedPoints() const;
00599 
00600             //- Create patch from set of patches
00601             static autoPtr<indirectPrimitivePatch> makePatch
00602             (
00603                 const polyMesh&,
00604                 const labelList&
00605             );
00606 
00607             //- Helper function to make a pointVectorField with correct
00608             //  bcs for mesh movement:
00609             //  - adaptPatchIDs         : fixedValue
00610             //  - processor             : calculated (so free to move)
00611             //  - cyclic/wedge/symmetry : slip
00612             //  - other                 : slip
00613             static tmp<pointVectorField> makeDisplacementField
00614             (
00615                 const pointMesh& pMesh,
00616                 const labelList& adaptPatchIDs
00617             );
00618 
00619             //- Helper function: check that face zones are synced
00620             static void checkCoupledFaceZones(const polyMesh&);
00621 
00622 
00623         // Refinement
00624 
00625             //- Calculate list of cells to refine.
00626             labelList refineCandidates
00627             (
00628                 const point& keepPoint,
00629                 const scalar curvature,
00630 
00631                 const PtrList<featureEdgeMesh>& featureMeshes,
00632                 const labelList& featureLevels,
00633 
00634                 const bool featureRefinement,
00635                 const bool internalRefinement,
00636                 const bool surfaceRefinement,
00637                 const bool curvatureRefinement,
00638                 const label maxGlobalCells,
00639                 const label maxLocalCells
00640             ) const;
00641 
00642             //- Refine some cells
00643             autoPtr<mapPolyMesh> refine(const labelList& cellsToRefine);
00644 
00645             //- Refine some cells and rebalance
00646             autoPtr<mapDistributePolyMesh> refineAndBalance
00647             (
00648                 const string& msg,
00649                 decompositionMethod& decomposer,
00650                 fvMeshDistribute& distributor,
00651                 const labelList& cellsToRefine
00652             );
00653 
00654 
00655         // Baffle handling
00656 
00657             //- Split off unreachable areas of mesh.
00658             void baffleAndSplitMesh
00659             (
00660                 const bool handleSnapProblems,
00661                 const bool removeEdgeConnectedCells,
00662                 const scalarField& perpendicularAngle,
00663                 const bool mergeFreeStanding,
00664                 const dictionary& motionDict,
00665                 Time& runTime,
00666                 const labelList& globalToPatch,
00667                 const point& keepPoint
00668             );
00669 
00670             //- Split off (with optional buffer layers) unreachable areas
00671             //  of mesh. Does not introduce baffles.
00672             autoPtr<mapPolyMesh> splitMesh
00673             (
00674                 const label nBufferLayers,
00675                 const labelList& globalToPatch,
00676                 const point& keepPoint
00677             );
00678 
00679             //- Find boundary points that connect to more than one cell
00680             //  region and split them.
00681             autoPtr<mapPolyMesh> dupNonManifoldPoints();
00682 
00683             //- Create baffle for every internal face where ownPatch != -1.
00684             //  External faces get repatched according to ownPatch (neiPatch
00685             //  should be -1 for these)
00686             autoPtr<mapPolyMesh> createBaffles
00687             (
00688                 const labelList& ownPatch,
00689                 const labelList& neiPatch
00690             );
00691 
00692             //- Return a list of coupled face pairs, i.e. faces that
00693             //  use the same vertices.
00694             List<labelPair> getDuplicateFaces(const labelList& testFaces) const;
00695 
00696             //- Merge baffles. Gets pairs of faces.
00697             autoPtr<mapPolyMesh> mergeBaffles(const List<labelPair>&);
00698 
00699             //- Put faces/cells into zones according to surface specification.
00700             //  Returns null if no zone surfaces present. Region containing
00701             //  the keepPoint will not be put into a cellZone.
00702             autoPtr<mapPolyMesh> zonify(const point& keepPoint);
00703 
00704 
00705         // Other topo changes
00706 
00707             //- Helper:add patch to mesh. Update all registered fields.
00708             //  Use addMeshedPatch to add patches originating from surfaces.
00709             static label addPatch(fvMesh&, const word& name, const word& type);
00710 
00711             //- Add patch originating from meshing. Update meshedPatches_.
00712             label addMeshedPatch(const word& name, const word& type);
00713 
00714             //- Get patchIDs for patches added in addMeshedPatch.
00715             labelList meshedPatches() const;
00716 
00717             //- Split mesh. Keep part containing point.
00718             autoPtr<mapPolyMesh> splitMeshRegions(const point& keepPoint);
00719 
00720             //- Update local numbering for mesh redistribution
00721             void distribute(const mapDistributePolyMesh&);
00722 
00723             //- Update for external change to mesh. changedFaces are in new mesh
00724             //  face labels.
00725             void updateMesh
00726             (
00727                 const mapPolyMesh&,
00728                 const labelList& changedFaces
00729             );
00730 
00731 
00732             // Restoring : is where other processes delete and reinsert data.
00733 
00734                 //- Signal points/face/cells for which to store data
00735                 void storeData
00736                 (
00737                     const labelList& pointsToStore,
00738                     const labelList& facesToStore,
00739                     const labelList& cellsToStore
00740                 );
00741 
00742                 //- Update local numbering + undo
00743                 //  Data to restore given as new pointlabel + stored pointlabel
00744                 //  (i.e. what was in pointsToStore)
00745                 void updateMesh
00746                 (
00747                     const mapPolyMesh&,
00748                     const labelList& changedFaces,
00749                     const Map<label>& pointsToRestore,
00750                     const Map<label>& facesToRestore,
00751                     const Map<label>& cellsToRestore
00752                 );
00753 
00754 
00755             //- Merge faces on the same patch (usually from exposing refinement)
00756             //  Returns global number of faces merged.
00757             label mergePatchFaces
00758             (
00759                 const scalar minCos,
00760                 const scalar concaveCos,
00761                 const labelList& patchIDs
00762             );
00763 
00764             //- Remove points not used by any face or points used
00765             // by only two faces where the edges are in line
00766             autoPtr<mapPolyMesh> mergeEdges(const scalar minCos);
00767 
00768 
00769         // Debug/IO
00770 
00771             //- Debugging: check that all faces still obey start()>end()
00772             void checkData();
00773 
00774             //- Compare two lists over all boundary faces
00775             template<class T>
00776             void testSyncBoundaryFaceList
00777             (
00778                 const scalar mergeDistance,
00779                 const string&,
00780                 const UList<T>&,
00781                 const UList<T>&
00782             ) const;
00783 
00784             //- Print some mesh stats.
00785             void printMeshInfo(const bool, const string&) const;
00786 
00787             //- Replacement for Time::timeName() : return oldInstance (if
00788             //  overwrite_)
00789             word timeName() const;
00790 
00791             //- Set instance of all local IOobjects
00792             void setInstance(const fileName&);
00793 
00794             //- Write mesh and all data
00795             bool write() const;
00796 
00797             //- Write refinement level as volScalarFields for postprocessing
00798             void dumpRefinementLevel() const;
00799 
00800             //- Debug: Write intersection information to OBJ format
00801             void dumpIntersections(const fileName& prefix) const;
00802 
00803             //- Do any one of above IO functions. flag is combination of
00804             //  writeFlag values.
00805             void write(const label flag, const fileName&) const;
00806 };
00807 
00808 
00809 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00810 
00811 } // End namespace Foam
00812 
00813 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00814 
00815 #ifdef NoRepository
00816 #   include "meshRefinementTemplates.C"
00817 #endif
00818 
00819 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00820 
00821 #endif
00822 
00823 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd