41 searchableSurfaceFeatures,
42 searchableBoxFeatures,
51 Foam::searchableBoxFeatures::searchableBoxFeatures
53 const searchableSurface&
surface,
54 const dictionary&
dict 60 extendedFeatureEdgeMesh::sideVolumeTypeNames_
62 dict.getOrDefault<word>(
"meshableSide",
"inside")
67 <<
" Meshable region = " 84 autoPtr<extendedFeatureEdgeMesh> features;
87 vectorField faceNormals(std::move(faceNormalsList));
93 edgeNormals[0][0] = 2; edgeNormals[0][1] = 4;
94 edgeNormals[1][0] = 1; edgeNormals[1][1] = 4;
95 edgeNormals[2][0] = 3; edgeNormals[2][1] = 4;
96 edgeNormals[3][0] = 0; edgeNormals[3][1] = 4;
97 edgeNormals[4][0] = 2; edgeNormals[4][1] = 5;
98 edgeNormals[5][0] = 1; edgeNormals[5][1] = 5;
99 edgeNormals[6][0] = 3; edgeNormals[6][1] = 5;
100 edgeNormals[7][0] = 0; edgeNormals[7][1] = 5;
101 edgeNormals[8][0] = 0; edgeNormals[8][1] = 2;
102 edgeNormals[9][0] = 2; edgeNormals[9][1] = 1;
103 edgeNormals[10][0] = 1; edgeNormals[10][1] = 3;
104 edgeNormals[11][0] = 3; edgeNormals[11][1] = 0;
107 pointField& surfacePoints = surfacePointsTmp.ref();
109 forAll(edgeDirections, eI)
115 for (label j = 0; j < 2; ++j)
118 (faceNormals[edgeNormals[eI][j]] ^ edgeDirections[eI]);
120 0.5*(
max(surfacePoints +
min(surfacePoints)))
123 normalDirections[eI][j] =
127 & (fC0tofE0/(
mag(fC0tofE0)+ VSMALL))
139 forAll(featurePointNormals, pI)
141 labelList& ftPtEdges = featurePointEdges[pI];
150 ftPtEdges[edgeI++] = eI;
152 else if (
e.end() == pI)
154 ftPtEdges[edgeI++] = eI;
158 labelList& ftPtNormals = featurePointNormals[pI];
160 ftPtNormals[0] = edgeNormals[ftPtEdges[0]][0];
161 ftPtNormals[1] = edgeNormals[ftPtEdges[0]][1];
162 ftPtNormals[2] = edgeNormals[ftPtEdges[1]][0];
169 new extendedFeatureEdgeMesh
175 "extendedFeatureEdgeMesh",
185 List<extendedFeatureEdgeMesh::sideVolumeType>(12, mode_),
static const Enum< sideVolumeType > sideVolumeTypeNames_
Ostream & indent(Ostream &os)
Indent stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void cross(FieldField< Field1, typename crossProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
static const FixedList< vector, 6 > faceNormals
The unit normal per face.
List< labelList > labelListList
List of labelList.
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
vectorField pointField
pointField is a vectorField.
const dimensionedScalar e
Elementary charge.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
virtual autoPtr< extendedFeatureEdgeMesh > features() const
Return an extendedFeatureEdgeMesh containing the features.
static const edgeList edges
Edge to point addressing, using octant corner points.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
const wordList surface
Standard surface field types (scalar, vector, tensor, etc)
defineTypeNameAndDebug(combustionModel, 0)
Automatically write from objectRegistry::writeObject()
virtual ~searchableBoxFeatures()
Destructor.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Field< vector > vectorField
Specialisation of Field<T> for vector.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
iterator end() noexcept
Return an iterator to end traversing the UList.
List< label > labelList
A List of labels.
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)
static constexpr const zero Zero
Global zero (0)