38 searchableSurfaceFeatures,
39 searchableBoxFeatures,
50 const searchableSurface& surface,
51 const dictionary&
dict 54 searchableSurfaceFeatures(surface, dict),
57 extendedFeatureEdgeMesh::sideVolumeTypeNames_
59 dict.lookupOrDefault<word>(
"meshableSide",
"inside")
64 <<
" Meshable region = " 81 autoPtr<extendedFeatureEdgeMesh> features;
92 edgeNormals[eI].setSize(2, 0);
94 edgeNormals[0][0] = 2; edgeNormals[0][1] = 4;
95 edgeNormals[1][0] = 1; edgeNormals[1][1] = 4;
96 edgeNormals[2][0] = 3; edgeNormals[2][1] = 4;
97 edgeNormals[3][0] = 0; edgeNormals[3][1] = 4;
98 edgeNormals[4][0] = 2; edgeNormals[4][1] = 5;
99 edgeNormals[5][0] = 1; edgeNormals[5][1] = 5;
100 edgeNormals[6][0] = 3; edgeNormals[6][1] = 5;
101 edgeNormals[7][0] = 0; edgeNormals[7][1] = 5;
102 edgeNormals[8][0] = 0; edgeNormals[8][1] = 2;
103 edgeNormals[9][0] = 2; edgeNormals[9][1] = 1;
104 edgeNormals[10][0] = 1; edgeNormals[10][1] = 3;
105 edgeNormals[11][0] = 3; edgeNormals[11][1] = 0;
107 tmp<pointField> surfacePointsTmp(surface().
points());
108 pointField& surfacePoints = surfacePointsTmp.ref();
110 forAll(edgeDirections, eI)
113 surfacePoints[treeBoundBox::edges[eI].end()]
114 - surfacePoints[treeBoundBox::edges[eI].start()];
117 for (
label j = 0; j < 2; ++j)
120 (faceNormals[edgeNormals[eI][j]] ^ edgeDirections[eI]);
122 0.5*(
max(surfacePoints +
min(surfacePoints)))
123 - surfacePoints[treeBoundBox::edges[eI].start()];
125 normalDirections[eI][j] =
128 (cross/(
mag(cross) + vSmall))
129 & (fC0tofE0/(
mag(fC0tofE0)+ vSmall))
140 forAll(featurePointNormals, pI)
142 labelList& ftPtEdges = featurePointEdges[pI];
146 forAll(treeBoundBox::edges, eI)
148 const edge& e = treeBoundBox::edges[eI];
152 ftPtEdges[edgeI++] = eI;
154 else if (e.end() == pI)
156 ftPtEdges[edgeI++] = eI;
160 labelList& ftPtNormals = featurePointNormals[pI];
163 ftPtNormals[0] = edgeNormals[ftPtEdges[0]][0];
164 ftPtNormals[1] = edgeNormals[ftPtEdges[0]][1];
165 ftPtNormals[2] = edgeNormals[ftPtEdges[1]][0];
172 new extendedFeatureEdgeMesh
176 surface().
name() +
".extendedFeatureEdgeMesh",
177 surface().instance(),
178 "extendedFeatureEdgeMesh",
188 List<extendedFeatureEdgeMesh::sideVolumeType>(12, mode_),
static const FixedList< vector, 6 > faceNormals
Per face the unit normal.
searchableBoxFeatures(const searchableSurface &surface, const dictionary &dict)
Construct from searchable surface and dictionary.
List< labelList > labelListList
A List of labelList.
#define forAll(list, i)
Loop across all elements in list.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & indent(Ostream &os)
Indent stream.
static const Foam::NamedEnum< sideVolumeType, 4 > sideVolumeTypeNames_
Ostream & endl(Ostream &os)
Add newline and flush stream.
Vector< scalar > vector
A scalar version of the templated Vector.
Macros for easy insertion into run-time selection tables.
vectorField pointField
pointField is a vectorField.
const fileName & name() const
Return the dictionary name.
virtual autoPtr< extendedFeatureEdgeMesh > features() const
Return an extendedFeatureEdgeMesh containing the features.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
List< label > labelList
A List of labels.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
void setSize(const label)
Reset size of List.
virtual ~searchableBoxFeatures()
Destructor.
dimensioned< scalar > mag(const dimensioned< Type > &)
Field< vector > vectorField
Specialisation of Field<T> for vector.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...