mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: improved handling of 'unresolved' surface intersections (issue #450)
- the heuristic for matching unresolved intersections is a relatively simple matching scheme that seems to be more robust than attempting to walk the geometry or the cuts. - avoid false positives for self intersection
This commit is contained in:
@ -84,6 +84,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
forAllConstIter(dictionary, dict, iter)
|
||||
{
|
||||
const word& dictName = iter().keyword();
|
||||
|
||||
if (!iter().isDict())
|
||||
{
|
||||
continue;
|
||||
@ -106,7 +108,7 @@ int main(int argc, char *argv[])
|
||||
const word outputName =
|
||||
fileName
|
||||
(
|
||||
surfaceDict.lookupOrDefault<word>("output", iter().keyword())
|
||||
surfaceDict.lookupOrDefault<word>("output", dictName)
|
||||
).lessExt();
|
||||
|
||||
// The "surfaces" entry is normally optional, but if the sub-dictionary
|
||||
@ -115,7 +117,7 @@ int main(int argc, char *argv[])
|
||||
// additional switch.
|
||||
if
|
||||
(
|
||||
iter().keyword() == "surfaces" // mandatory
|
||||
dictName == "surfaces" // mandatory
|
||||
|| surfaceDict.found("surfaces") // or optional
|
||||
)
|
||||
{
|
||||
@ -123,14 +125,14 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
loader.select(iter().keyword());
|
||||
loader.select(dictName);
|
||||
}
|
||||
|
||||
if (loader.selected().empty())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "No surfaces specified/found for entry: "
|
||||
<< iter().keyword() << exit(FatalError);
|
||||
<< dictName << exit(FatalError);
|
||||
}
|
||||
// DebugVar(loader.available());
|
||||
// DebugVar(outputName);
|
||||
@ -153,7 +155,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Problem loading surface(s) for entry: "
|
||||
<< iter().keyword() << exit(FatalError);
|
||||
<< dictName << exit(FatalError);
|
||||
}
|
||||
|
||||
triSurface surf = surfPtr();
|
||||
|
||||
Reference in New Issue
Block a user