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/>.
25 refineImmersedBoundaryMesh
28 Refine immersed boundary mesh for a thick plate simulation
30 \*---------------------------------------------------------------------------*/
33 #include "refineImmersedBoundaryMesh.H"
35 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
37 int main(int argc, char *argv[])
39 # include "setRootCase.H"
41 # include "createTime.H"
42 # include "createMesh.H"
46 labelHashSet refCellSet;
48 const vectorField& C = mesh.cellCentres();
53 if (mag(C[cellI].x()) <= L)
55 if (mag(C[cellI].y()) <= L)
57 refCellSet.insert(cellI);
62 labelList refCells(refCellSet.toc());
64 refineImmersedBoundaryMesh rib(mesh);
65 rib.refineMesh(refCells);
70 labelHashSet refCellSet;
72 const vectorField& C = mesh.cellCentres();
77 if (mag(C[cellI].x()) <= L)
79 if (mag(C[cellI].y()) <= L)
81 refCellSet.insert(cellI);
86 labelList refCells(refCellSet.toc());
88 refineImmersedBoundaryMesh rib(mesh);
89 rib.refineMesh(refCells);
94 labelHashSet refCellSet;
96 const vectorField& C = mesh.cellCentres();
101 if (mag(C[cellI].x()) <= L)
103 if (mag(C[cellI].y()) <= L)
105 refCellSet.insert(cellI);
110 labelList refCells(refCellSet.toc());
112 refineImmersedBoundaryMesh rib(mesh);
113 rib.refineMesh(refCells);
118 labelHashSet refCellSet;
120 const vectorField& C = mesh.cellCentres();
125 if (mag(C[cellI].x()) <= L)
127 if (mag(C[cellI].y()) <= L)
129 refCellSet.insert(cellI);
134 labelList refCells(refCellSet.toc());
136 refineImmersedBoundaryMesh rib(mesh);
137 rib.refineMesh(refCells);
142 labelHashSet refCellSet;
144 const vectorField& C = mesh.cellCentres();
149 if (mag(C[cellI].x()) <= L)
151 if (mag(C[cellI].y()) <= L)
153 refCellSet.insert(cellI);
158 labelList refCells(refCellSet.toc());
160 refineImmersedBoundaryMesh rib(mesh);
161 rib.refineMesh(refCells);
169 Info<< "End\n" << endl;
175 // ************************************************************************* //