1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
28 Face cracker mesh modifier. This modifier takes a set of
29 internal face labels and converts them into boundary faces.
35 \*---------------------------------------------------------------------------*/
40 #include "polyMeshModifier.H"
41 #include "polyPatchID.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class faceCracker Declaration
51 \*---------------------------------------------------------------------------*/
55 public polyMeshModifier
59 //- Crack face zone ID
60 faceZoneID crackZoneID_;
62 //- Crack patch ID. Holds faces after cracking
63 polyPatchID crackPatchID_;
65 //- Open patch ID. Holds faces after cracking
66 polyPatchID openPatchID_;
68 //- List of boundary faces to move to open patch
69 mutable labelList coupledFacesToBreak_;
71 //- Topology change trigger
72 mutable bool trigger_;
75 // Private Member Functions
77 //- Disallow default bitwise copy construct
78 faceCracker(const faceCracker&);
80 //- Disallow default bitwise assignment
81 void operator=(const faceCracker&);
83 //- Check validity of construction data
84 void checkDefinition();
87 void detachFaceCracker(polyTopoChange&) const;
92 //- Runtime type information
93 TypeName("faceCracker");
98 //- Construct from components
103 const polyTopoChanger& mme,
104 const word& faceZoneName,
105 const word& crackPatchName,
106 const word& openPatchName
109 //- Construct from dictionary
113 const dictionary& dict,
115 const polyTopoChanger& mesh
121 virtual ~faceCracker();
126 //- Return master patch ID
127 const polyPatchID& crackPatchID() const
129 return crackPatchID_;
132 //- Set faces to break and open on next update
133 // break = convert internal face into two boundary faces in
135 // open = move crack faces into the open patch
138 const labelList& facesToBreak,
139 const boolList& faceFlip,
140 const labelList& coupledFacesToBreak
143 //- Set cracked faces to open on next update
146 //- Check for topology change
147 virtual bool changeTopology() const;
149 //- Set topological change
150 virtual void setRefinement(polyTopoChange&) const;
152 //- Modify motion points to comply with the topological change
153 virtual void modifyMotionPoints(pointField& motionPoints) const;
155 //- Force recalculation of locally stored data on topological change
156 virtual void updateMesh(const mapPolyMesh&);
160 virtual void write(Ostream&) const;
163 virtual void writeDict(Ostream&) const;
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 } // End namespace Foam
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 // ************************************************************************* //