BUG: searchableSurfaceControl: Correct resizing of region controls

This commit is contained in:
laurence
2013-07-04 13:12:11 +01:00
parent 5e4c161100
commit 7546c1529a
3 changed files with 18 additions and 43 deletions

View File

@ -209,7 +209,7 @@ Foam::searchableSurfaceControl::searchableSurfaceControl
label nRegions = regionsDict.size(); label nRegions = regionsDict.size();
regionCellSizeFunctions.setSize(nRegions + 1); regionCellSizeFunctions.setSize(nRegions);
defaultCellSizeRegions.setCapacity(nRegions); defaultCellSizeRegions.setCapacity(nRegions);
forAll(regionNames, regionI) forAll(regionNames, regionI)
@ -263,6 +263,8 @@ Foam::searchableSurfaceControl::searchableSurfaceControl
} }
else if (nRegionCellSizeFunctions > 0) else if (nRegionCellSizeFunctions > 0)
{ {
regionCellSizeFunctions.setSize(nRegionCellSizeFunctions + 1);
regionCellSizeFunctions.set regionCellSizeFunctions.set
( (
nRegionCellSizeFunctions, nRegionCellSizeFunctions,
@ -275,7 +277,7 @@ Foam::searchableSurfaceControl::searchableSurfaceControl
) )
); );
const wordList& regionNames = geometryToConformTo_.patchNames(); const wordList& regionNames = searchableSurface_.regions();
forAll(regionNames, regionI) forAll(regionNames, regionI)
{ {
@ -289,7 +291,7 @@ Foam::searchableSurfaceControl::searchableSurfaceControl
} }
else else
{ {
const wordList& regionNames = geometryToConformTo_.patchNames(); const wordList& regionNames = searchableSurface_.regions();
forAll(regionNames, regionI) forAll(regionNames, regionI)
{ {

View File

@ -22,34 +22,7 @@ FoamFile
geometry geometry
{ {
flange.stl #include "meshDict.geometry"
{
name flange;
type triSurfaceMesh;
regions
{
patch1
{
name wall;
}
patch2
{
name plate;
}
patch3
{
name rings;
}
patch4
{
name outlet;
}
}
}
} }
@ -80,7 +53,7 @@ surfaceConformation
regions regions
{ {
wall patch1
{ {
patchInfo patchInfo
{ {
@ -88,7 +61,7 @@ surfaceConformation
} }
} }
plate patch2
{ {
patchInfo patchInfo
{ {
@ -96,7 +69,7 @@ surfaceConformation
} }
} }
rings patch3
{ {
patchInfo patchInfo
{ {
@ -104,7 +77,7 @@ surfaceConformation
} }
} }
outlet patch4
{ {
patchInfo patchInfo
{ {
@ -150,7 +123,7 @@ motionControl
regions regions
{ {
rings patch3
{ {
type searchableSurfaceControl; type searchableSurfaceControl;
priority 2; priority 2;
@ -158,7 +131,7 @@ motionControl
surfaceCellSizeFunction uniformValue; surfaceCellSizeFunction uniformValue;
uniformValueCoeffs uniformValueCoeffs
{ {
surfaceCellSizeCoeff 0.5; surfaceCellSizeCoeff 0.25;
} }
cellSizeFunction surfaceOffsetLinearDistance; cellSizeFunction surfaceOffsetLinearDistance;
surfaceOffsetLinearDistanceCoeffs surfaceOffsetLinearDistanceCoeffs

View File

@ -59,9 +59,9 @@ surfaceConformation
extendedFeatureEdgeMesh "vessel.extendedFeatureEdgeMesh"; extendedFeatureEdgeMesh "vessel.extendedFeatureEdgeMesh";
regions regions
{ {
vessel_wall {} patch1 {}
vessel_outletPipe {} patch2 {}
vessel_outlet {} patch3 {}
} }
} }
@ -142,7 +142,7 @@ motionControl
regions regions
{ {
vessel_wall patch1
{ {
surfaceCellSizeFunction uniformValue; surfaceCellSizeFunction uniformValue;
uniformValueCoeffs uniformValueCoeffs
@ -154,7 +154,7 @@ motionControl
uniformCoeffs{} uniformCoeffs{}
} }
vessel_outletPipe patch2
{ {
priority 2; priority 2;
surfaceCellSizeFunction uniformValue; surfaceCellSizeFunction uniformValue;
@ -170,7 +170,7 @@ motionControl
} }
} }
vessel_outlet patch3
{ {
priority 2; priority 2;
surfaceCellSizeFunction uniformValue; surfaceCellSizeFunction uniformValue;