mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
src/OpenFOAM: Moved function documentation comments into .H files and removed duplicates
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -749,212 +749,211 @@ void Foam::CV2D::newPoints()
|
|||||||
boundaryConform();
|
boundaryConform();
|
||||||
|
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// Old Method
|
||||||
// Old Method
|
/*
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
for
|
||||||
|
(
|
||||||
|
Triangulation::Finite_vertices_iterator vit = finite_vertices_begin();
|
||||||
|
vit != finite_vertices_end();
|
||||||
|
++vit
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (vit->internalPoint())
|
||||||
|
{
|
||||||
|
// Current dual-cell defining vertex ("centre")
|
||||||
|
point2DFromPoint defVert0 = toPoint2D(vit->point());
|
||||||
|
|
||||||
// for
|
Triangulation::Edge_circulator ec = incident_edges(vit);
|
||||||
// (
|
Triangulation::Edge_circulator ecStart = ec;
|
||||||
// Triangulation::Finite_vertices_iterator vit = finite_vertices_begin();
|
|
||||||
// vit != finite_vertices_end();
|
|
||||||
// ++vit
|
|
||||||
// )
|
|
||||||
// {
|
|
||||||
// if (vit->internalPoint())
|
|
||||||
// {
|
|
||||||
// // Current dual-cell defining vertex ("centre")
|
|
||||||
// point2DFromPoint defVert0 = toPoint2D(vit->point());
|
|
||||||
|
|
||||||
// Triangulation::Edge_circulator ec = incident_edges(vit);
|
// Circulate around the edges to find the first which is not
|
||||||
// Triangulation::Edge_circulator ecStart = ec;
|
// infinite
|
||||||
|
do
|
||||||
|
{
|
||||||
|
if (!is_infinite(ec)) break;
|
||||||
|
} while (++ec != ecStart);
|
||||||
|
|
||||||
// // Circulate around the edges to find the first which is not
|
// Store the start-end of the first non-infinte edge
|
||||||
// // infinite
|
point2D de0 = toPoint2D(circumcenter(ec->first));
|
||||||
// do
|
|
||||||
// {
|
|
||||||
// if (!is_infinite(ec)) break;
|
|
||||||
// } while (++ec != ecStart);
|
|
||||||
|
|
||||||
// // Store the start-end of the first non-infinte edge
|
// Keep track of the maximum edge length^2
|
||||||
// point2D de0 = toPoint2D(circumcenter(ec->first));
|
scalar maxEdgeLen2 = 0.0;
|
||||||
|
|
||||||
// // Keep track of the maximum edge length^2
|
// Keep track of the index of the longest edge
|
||||||
// scalar maxEdgeLen2 = 0.0;
|
label edgecd0i = -1;
|
||||||
|
|
||||||
// // Keep track of the index of the longest edge
|
// Edge counter
|
||||||
// label edgecd0i = -1;
|
label edgei = 0;
|
||||||
|
|
||||||
// // Edge counter
|
do
|
||||||
// label edgei = 0;
|
{
|
||||||
|
if (!is_infinite(ec))
|
||||||
|
{
|
||||||
|
// Get the end of the current edge
|
||||||
|
point2D de1 = toPoint2D
|
||||||
|
(
|
||||||
|
circumcenter(ec->first->neighbor(ec->second))
|
||||||
|
);
|
||||||
|
|
||||||
// do
|
// Store the current edge vector
|
||||||
// {
|
edges[edgei] = de1 - de0;
|
||||||
// if (!is_infinite(ec))
|
|
||||||
// {
|
|
||||||
// // Get the end of the current edge
|
|
||||||
// point2D de1 = toPoint2D
|
|
||||||
// (
|
|
||||||
// circumcenter(ec->first->neighbor(ec->second))
|
|
||||||
// );
|
|
||||||
|
|
||||||
// // Store the current edge vector
|
// Store the edge mid-point in the vertices array
|
||||||
// edges[edgei] = de1 - de0;
|
vertices[edgei] = 0.5*(de1 + de0);
|
||||||
|
|
||||||
// // Store the edge mid-point in the vertices array
|
// Move the current edge end into the edge start for the
|
||||||
// vertices[edgei] = 0.5*(de1 + de0);
|
// next iteration
|
||||||
|
de0 = de1;
|
||||||
|
|
||||||
// // Move the current edge end into the edge start for the
|
// Keep track of the longest edge
|
||||||
// // next iteration
|
|
||||||
// de0 = de1;
|
|
||||||
|
|
||||||
// // Keep track of the longest edge
|
scalar edgeLen2 = magSqr(edges[edgei]);
|
||||||
|
|
||||||
// scalar edgeLen2 = magSqr(edges[edgei]);
|
if (edgeLen2 > maxEdgeLen2)
|
||||||
|
{
|
||||||
|
maxEdgeLen2 = edgeLen2;
|
||||||
|
edgecd0i = edgei;
|
||||||
|
}
|
||||||
|
|
||||||
// if (edgeLen2 > maxEdgeLen2)
|
edgei++;
|
||||||
// {
|
}
|
||||||
// maxEdgeLen2 = edgeLen2;
|
} while (++ec != ecStart);
|
||||||
// edgecd0i = edgei;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// edgei++;
|
// Initialise cd0 such that the mesh will align
|
||||||
// }
|
// in in the x-y directions
|
||||||
// } while (++ec != ecStart);
|
vector2D cd0(1, 0);
|
||||||
|
|
||||||
// // Initialise cd0 such that the mesh will align
|
if (meshControls().relaxOrientation())
|
||||||
// // in in the x-y directions
|
{
|
||||||
// vector2D cd0(1, 0);
|
// Get the longest edge from the array and use as the primary
|
||||||
|
// direction of the coordinate system of the "square" cell
|
||||||
|
cd0 = edges[edgecd0i];
|
||||||
|
}
|
||||||
|
|
||||||
// if (meshControls().relaxOrientation())
|
if (meshControls().nearWallAlignedDist() > 0)
|
||||||
// {
|
{
|
||||||
// // Get the longest edge from the array and use as the primary
|
pointIndexHit pHit = qSurf_.tree().findNearest
|
||||||
// // direction of the coordinate system of the "square" cell
|
(
|
||||||
// cd0 = edges[edgecd0i];
|
toPoint3D(defVert0),
|
||||||
// }
|
meshControls().nearWallAlignedDist2()
|
||||||
|
);
|
||||||
|
|
||||||
// if (meshControls().nearWallAlignedDist() > 0)
|
if (pHit.hit())
|
||||||
// {
|
{
|
||||||
// pointIndexHit pHit = qSurf_.tree().findNearest
|
cd0 = toPoint2D(faceNormals[pHit.index()]);
|
||||||
// (
|
}
|
||||||
// toPoint3D(defVert0),
|
}
|
||||||
// meshControls().nearWallAlignedDist2()
|
|
||||||
// );
|
|
||||||
|
|
||||||
// if (pHit.hit())
|
// Rotate by 45deg needed to create an averaging procedure which
|
||||||
// {
|
// encourages the cells to be square
|
||||||
// cd0 = toPoint2D(faceNormals[pHit.index()]);
|
cd0 = vector2D(cd0.x() + cd0.y(), cd0.y() - cd0.x());
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // Rotate by 45deg needed to create an averaging procedure which
|
// Normalise the primary coordinate direction
|
||||||
// // encourages the cells to be square
|
cd0 /= mag(cd0);
|
||||||
// cd0 = vector2D(cd0.x() + cd0.y(), cd0.y() - cd0.x());
|
|
||||||
|
|
||||||
// // Normalise the primary coordinate direction
|
// Calculate the orthogonal coordinate direction
|
||||||
// cd0 /= mag(cd0);
|
vector2D cd1(-cd0.y(), cd0.x());
|
||||||
|
|
||||||
// // Calculate the orthogonal coordinate direction
|
|
||||||
// vector2D cd1(-cd0.y(), cd0.x());
|
|
||||||
|
|
||||||
|
|
||||||
// // Restart the circulator
|
// Restart the circulator
|
||||||
// ec = ecStart;
|
ec = ecStart;
|
||||||
|
|
||||||
// // ... and the counter
|
// ... and the counter
|
||||||
// edgei = 0;
|
edgei = 0;
|
||||||
|
|
||||||
// // Initialise the displacement for the centre and sum-weights
|
// Initialise the displacement for the centre and sum-weights
|
||||||
// vector2D disp = vector2D::zero;
|
vector2D disp = vector2D::zero;
|
||||||
// scalar sumw = 0;
|
scalar sumw = 0;
|
||||||
|
|
||||||
// do
|
do
|
||||||
// {
|
{
|
||||||
// if (!is_infinite(ec))
|
if (!is_infinite(ec))
|
||||||
// {
|
{
|
||||||
// // Pick up the current edge
|
// Pick up the current edge
|
||||||
// const vector2D& ei = edges[edgei];
|
const vector2D& ei = edges[edgei];
|
||||||
|
|
||||||
// // Calculate the centre to edge-centre vector
|
// Calculate the centre to edge-centre vector
|
||||||
// vector2D deltai = vertices[edgei] - defVert0;
|
vector2D deltai = vertices[edgei] - defVert0;
|
||||||
|
|
||||||
// // Set the weight for this edge contribution
|
// Set the weight for this edge contribution
|
||||||
// scalar w = 1;
|
scalar w = 1;
|
||||||
|
|
||||||
// if (meshControls().squares())
|
if (meshControls().squares())
|
||||||
// {
|
{
|
||||||
// w = magSqr(deltai.x()*ei.y() - deltai.y()*ei.x());
|
w = magSqr(deltai.x()*ei.y() - deltai.y()*ei.x());
|
||||||
// // alternative weights
|
// alternative weights
|
||||||
// //w = mag(deltai.x()*ei.y() - deltai.y()*ei.x());
|
//w = mag(deltai.x()*ei.y() - deltai.y()*ei.x());
|
||||||
// //w = magSqr(ei)*mag(deltai);
|
//w = magSqr(ei)*mag(deltai);
|
||||||
|
|
||||||
// // Use the following for an ~square mesh
|
// Use the following for an ~square mesh
|
||||||
// // Find the coordinate contributions for this edge delta
|
// Find the coordinate contributions for this edge delta
|
||||||
// scalar cd0deltai = cd0 & deltai;
|
scalar cd0deltai = cd0 & deltai;
|
||||||
// scalar cd1deltai = cd1 & deltai;
|
scalar cd1deltai = cd1 & deltai;
|
||||||
|
|
||||||
// // Create a "square" displacement
|
// Create a "square" displacement
|
||||||
// if (mag(cd0deltai) > mag(cd1deltai))
|
if (mag(cd0deltai) > mag(cd1deltai))
|
||||||
// {
|
{
|
||||||
// disp += (w*cd0deltai)*cd0;
|
disp += (w*cd0deltai)*cd0;
|
||||||
// }
|
}
|
||||||
// else
|
else
|
||||||
// {
|
{
|
||||||
// disp += (w*cd1deltai)*cd1;
|
disp += (w*cd1deltai)*cd1;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// else
|
else
|
||||||
// {
|
{
|
||||||
// // Use this for a hexagon/pentagon mesh
|
// Use this for a hexagon/pentagon mesh
|
||||||
// disp += w*deltai;
|
disp += w*deltai;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// // Sum the weights
|
// Sum the weights
|
||||||
// sumw += w;
|
sumw += w;
|
||||||
// }
|
}
|
||||||
// else
|
else
|
||||||
// {
|
{
|
||||||
// FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
// << "Infinite triangle found in internal mesh"
|
<< "Infinite triangle found in internal mesh"
|
||||||
// << exit(FatalError);
|
<< exit(FatalError);
|
||||||
// }
|
}
|
||||||
|
|
||||||
// edgei++;
|
edgei++;
|
||||||
|
|
||||||
// } while (++ec != ecStart);
|
} while (++ec != ecStart);
|
||||||
|
|
||||||
// // Calculate the average displacement
|
// Calculate the average displacement
|
||||||
// disp /= sumw;
|
disp /= sumw;
|
||||||
// totalDisp += disp;
|
totalDisp += disp;
|
||||||
// totalDist += mag(disp);
|
totalDist += mag(disp);
|
||||||
|
|
||||||
// // Move the point by a fraction of the average displacement
|
// Move the point by a fraction of the average displacement
|
||||||
// movePoint(vit, defVert0 + relaxation*disp);
|
movePoint(vit, defVert0 + relaxation*disp);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
// Info << "\nTotal displacement = " << totalDisp
|
Info << "\nTotal displacement = " << totalDisp
|
||||||
// << " total distance = " << totalDist << endl;
|
<< " total distance = " << totalDist << endl;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
void Foam::CV2D::moveInternalPoints(const point2DField& newPoints)
|
||||||
|
{
|
||||||
|
label pointI = 0;
|
||||||
|
|
||||||
//void Foam::CV2D::moveInternalPoints(const point2DField& newPoints)
|
for
|
||||||
//{
|
(
|
||||||
// label pointI = 0;
|
Triangulation::Finite_vertices_iterator vit = finite_vertices_begin();
|
||||||
|
vit != finite_vertices_end();
|
||||||
// for
|
++vit
|
||||||
// (
|
)
|
||||||
// Triangulation::Finite_vertices_iterator vit = finite_vertices_begin();
|
{
|
||||||
// vit != finite_vertices_end();
|
if (vit->internalPoint())
|
||||||
// ++vit
|
{
|
||||||
// )
|
movePoint(vit, newPoints[pointI++]);
|
||||||
// {
|
}
|
||||||
// if (vit->internalPoint())
|
}
|
||||||
// {
|
}
|
||||||
// movePoint(vit, newPoints[pointI++]);
|
*/
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::CV2D::write() const
|
void Foam::CV2D::write() const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -62,17 +62,11 @@ class StaticAssertionTest {};
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Internal use:
|
|
||||||
// ~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
// Paste together strings, even if an argument is itself a macro
|
// Paste together strings, even if an argument is itself a macro
|
||||||
#define StaticAssertMacro(X,Y) StaticAssertMacro1(X,Y)
|
#define StaticAssertMacro(X,Y) StaticAssertMacro1(X,Y)
|
||||||
#define StaticAssertMacro1(X,Y) StaticAssertMacro2(X,Y)
|
#define StaticAssertMacro1(X,Y) StaticAssertMacro2(X,Y)
|
||||||
#define StaticAssertMacro2(X,Y) X##Y
|
#define StaticAssertMacro2(X,Y) X##Y
|
||||||
|
|
||||||
// External use:
|
|
||||||
// ~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
//- Assert that some test is true at compile-time
|
//- Assert that some test is true at compile-time
|
||||||
#define StaticAssert(Test) \
|
#define StaticAssert(Test) \
|
||||||
typedef ::Foam::StaticAssertionTest \
|
typedef ::Foam::StaticAssertionTest \
|
||||||
|
|||||||
@ -42,12 +42,8 @@ Description
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
//- Declare a run-time selection
|
||||||
// external use:
|
#define declareRunTimeSelectionTable(autoPtr,baseType,argNames,argList,parList)\
|
||||||
// ~~~~~~~~~~~~~
|
|
||||||
// declare a run-time selection:
|
|
||||||
#define declareRunTimeSelectionTable\
|
|
||||||
(autoPtr,baseType,argNames,argList,parList) \
|
|
||||||
\
|
\
|
||||||
/* Construct from argList function pointer type */ \
|
/* Construct from argList function pointer type */ \
|
||||||
typedef autoPtr<baseType> (*argNames##ConstructorPtr)argList; \
|
typedef autoPtr<baseType> (*argNames##ConstructorPtr)argList; \
|
||||||
@ -134,11 +130,9 @@ Description
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// external use:
|
//- Declare a run-time selection for derived classes
|
||||||
// ~~~~~~~~~~~~~
|
#define declareRunTimeNewSelectionTable( \
|
||||||
// declare a run-time selection for derived classes:
|
autoPtr,baseType,argNames,argList,parList) \
|
||||||
#define declareRunTimeNewSelectionTable\
|
|
||||||
(autoPtr,baseType,argNames,argList,parList) \
|
|
||||||
\
|
\
|
||||||
/* Construct from argList function pointer type */ \
|
/* Construct from argList function pointer type */ \
|
||||||
typedef autoPtr<baseType> (*argNames##ConstructorPtr)argList; \
|
typedef autoPtr<baseType> (*argNames##ConstructorPtr)argList; \
|
||||||
@ -234,10 +228,8 @@ Description
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// internal use:
|
// Constructor aid
|
||||||
// constructor aid
|
#define defineRunTimeSelectionTableConstructor(baseType,argNames) \
|
||||||
#define defineRunTimeSelectionTableConstructor\
|
|
||||||
(baseType,argNames) \
|
|
||||||
\
|
\
|
||||||
/* Table constructor called from the table add function */ \
|
/* Table constructor called from the table add function */ \
|
||||||
void baseType::construct##argNames##ConstructorTables() \
|
void baseType::construct##argNames##ConstructorTables() \
|
||||||
@ -252,10 +244,8 @@ Description
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// internal use:
|
// Destructor aid
|
||||||
// destructor aid
|
#define defineRunTimeSelectionTableDestructor(baseType,argNames) \
|
||||||
#define defineRunTimeSelectionTableDestructor\
|
|
||||||
(baseType,argNames) \
|
|
||||||
\
|
\
|
||||||
/* Table destructor called from the table add function destructor */ \
|
/* Table destructor called from the table add function destructor */ \
|
||||||
void baseType::destroy##argNames##ConstructorTables() \
|
void baseType::destroy##argNames##ConstructorTables() \
|
||||||
@ -268,44 +258,28 @@ Description
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// internal use:
|
// Create pointer to hash-table of functions
|
||||||
// create pointer to hash-table of functions
|
#define defineRunTimeSelectionTablePtr(baseType,argNames) \
|
||||||
#define defineRunTimeSelectionTablePtr\
|
|
||||||
(baseType,argNames) \
|
|
||||||
\
|
\
|
||||||
/* Define the constructor function table */ \
|
/* Define the constructor function table */ \
|
||||||
baseType::argNames##ConstructorTable* \
|
baseType::argNames##ConstructorTable* \
|
||||||
baseType::argNames##ConstructorTablePtr_ = NULL
|
baseType::argNames##ConstructorTablePtr_ = NULL
|
||||||
|
|
||||||
|
|
||||||
// not much in use:
|
|
||||||
#define defineTemplateRunTimeSelectionTablePtr(baseType,argNames) \
|
|
||||||
\
|
|
||||||
/* Define the constructor function table */ \
|
|
||||||
typename baseType::argNames##ConstructorTable* \
|
|
||||||
baseType::argNames##ConstructorTablePtr_ = NULL
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
//- Define run-time selection table
|
||||||
// external use:
|
#define defineRunTimeSelectionTable(baseType,argNames) \
|
||||||
// ~~~~~~~~~~~~~
|
|
||||||
// define run-time selection table
|
|
||||||
#define defineRunTimeSelectionTable\
|
|
||||||
(baseType,argNames) \
|
|
||||||
\
|
\
|
||||||
defineRunTimeSelectionTablePtr(baseType,argNames); \
|
defineRunTimeSelectionTablePtr(baseType,argNames); \
|
||||||
defineRunTimeSelectionTableConstructor(baseType,argNames); \
|
defineRunTimeSelectionTableConstructor(baseType,argNames); \
|
||||||
defineRunTimeSelectionTableDestructor(baseType,argNames)
|
defineRunTimeSelectionTableDestructor(baseType,argNames)
|
||||||
|
|
||||||
|
|
||||||
// external use:
|
//- Define run-time selection table for template classes
|
||||||
// ~~~~~~~~~~~~~
|
|
||||||
// define run-time selection table for template classes
|
|
||||||
// use when baseType doesn't need a template argument (eg, is a typedef)
|
// use when baseType doesn't need a template argument (eg, is a typedef)
|
||||||
#define defineTemplateRunTimeSelectionTable\
|
#define defineTemplateRunTimeSelectionTable(baseType,argNames) \
|
||||||
(baseType,argNames) \
|
|
||||||
\
|
\
|
||||||
template<> \
|
template<> \
|
||||||
defineRunTimeSelectionTablePtr(baseType,argNames); \
|
defineRunTimeSelectionTablePtr(baseType,argNames); \
|
||||||
@ -317,12 +291,8 @@ Description
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
// Constructor aid: use when baseType requires the Targ template argument
|
||||||
// internal use:
|
#define defineTemplatedRunTimeSelectionTableConstructor(baseType,argNames,Targ)\
|
||||||
// constructor aid
|
|
||||||
// use when baseType requires the Targ template argument
|
|
||||||
#define defineTemplatedRunTimeSelectionTableConstructor\
|
|
||||||
(baseType,argNames,Targ) \
|
|
||||||
\
|
\
|
||||||
/* Table constructor called from the table add function */ \
|
/* Table constructor called from the table add function */ \
|
||||||
void baseType<Targ>::construct##argNames##ConstructorTables() \
|
void baseType<Targ>::construct##argNames##ConstructorTables() \
|
||||||
@ -337,11 +307,8 @@ Description
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// internal use:
|
// Destructor aid: use when baseType requires the Targ template argument
|
||||||
// destructor aid
|
#define defineTemplatedRunTimeSelectionTableDestructor(baseType,argNames,Targ) \
|
||||||
// use when baseType requires the Targ template argument
|
|
||||||
#define defineTemplatedRunTimeSelectionTableDestructor\
|
|
||||||
(baseType,argNames,Targ) \
|
|
||||||
\
|
\
|
||||||
/* Table destructor called from the table add function destructor */ \
|
/* Table destructor called from the table add function destructor */ \
|
||||||
void baseType<Targ>::destroy##argNames##ConstructorTables() \
|
void baseType<Targ>::destroy##argNames##ConstructorTables() \
|
||||||
@ -354,23 +321,18 @@ Description
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// internal use:
|
//- Create pointer to hash-table of functions
|
||||||
// create pointer to hash-table of functions
|
|
||||||
// use when baseType requires the Targ template argument
|
// use when baseType requires the Targ template argument
|
||||||
#define defineTemplatedRunTimeSelectionTablePtr\
|
#define defineTemplatedRunTimeSelectionTablePtr(baseType,argNames,Targ) \
|
||||||
(baseType,argNames,Targ) \
|
|
||||||
\
|
\
|
||||||
/* Define the constructor function table */ \
|
/* Define the constructor function table */ \
|
||||||
baseType<Targ>::argNames##ConstructorTable* \
|
baseType<Targ>::argNames##ConstructorTable* \
|
||||||
baseType<Targ>::argNames##ConstructorTablePtr_ = NULL
|
baseType<Targ>::argNames##ConstructorTablePtr_ = NULL
|
||||||
|
|
||||||
|
|
||||||
// external use:
|
//- Define run-time selection table for template classes
|
||||||
// ~~~~~~~~~~~~~
|
|
||||||
// define run-time selection table for template classes
|
|
||||||
// use when baseType requires the Targ template argument
|
// use when baseType requires the Targ template argument
|
||||||
#define defineTemplatedRunTimeSelectionTable\
|
#define defineTemplatedRunTimeSelectionTable(baseType,argNames,Targ) \
|
||||||
(baseType,argNames,Targ) \
|
|
||||||
\
|
\
|
||||||
template<> \
|
template<> \
|
||||||
defineTemplatedRunTimeSelectionTablePtr(baseType,argNames,Targ); \
|
defineTemplatedRunTimeSelectionTablePtr(baseType,argNames,Targ); \
|
||||||
|
|||||||
@ -38,12 +38,9 @@ Description
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
//- Declare a run-time selection:
|
||||||
// external use:
|
#define declareMemberFunctionSelectionTable( \
|
||||||
// ~~~~~~~~~~~~~
|
returnType,baseType,memberFunction,argNames,argList,parList) \
|
||||||
// declare a run-time selection:
|
|
||||||
#define declareMemberFunctionSelectionTable\
|
|
||||||
(returnType,baseType,memberFunction,argNames,argList,parList) \
|
|
||||||
\
|
\
|
||||||
/* Construct from argList function pointer type */ \
|
/* Construct from argList function pointer type */ \
|
||||||
typedef returnType (*memberFunction##argNames##MemberFunctionPtr)argList; \
|
typedef returnType (*memberFunction##argNames##MemberFunctionPtr)argList; \
|
||||||
@ -89,28 +86,26 @@ Description
|
|||||||
static void destroy##memberFunction##argNames##MemberFunctionTables()
|
static void destroy##memberFunction##argNames##MemberFunctionTables()
|
||||||
|
|
||||||
|
|
||||||
// internal use:
|
// Constructor aid
|
||||||
// constructor aid
|
#define defineMemberFunctionSelectionTableMemberFunction( \
|
||||||
#define defineMemberFunctionSelectionTableMemberFunction\
|
baseType,memberFunction,argNames) \
|
||||||
(baseType,memberFunction,argNames) \
|
|
||||||
\
|
\
|
||||||
/* Table memberFunction called from the table add function */ \
|
/* Table memberFunction called from the table add function */ \
|
||||||
void baseType::construct##memberFunction##argNames##MemberFunctionTables()\
|
void baseType::construct##memberFunction##argNames##MemberFunctionTables() \
|
||||||
{ \
|
{ \
|
||||||
static bool constructed = false; \
|
static bool constructed = false; \
|
||||||
if (!constructed) \
|
if (!constructed) \
|
||||||
{ \
|
{ \
|
||||||
constructed = true; \
|
constructed = true; \
|
||||||
baseType::memberFunction##argNames##MemberFunctionTablePtr_ \
|
baseType::memberFunction##argNames##MemberFunctionTablePtr_ \
|
||||||
= new baseType::memberFunction##argNames##MemberFunctionTable;\
|
= new baseType::memberFunction##argNames##MemberFunctionTable; \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// internal use:
|
// Destructor aid
|
||||||
// destructor aid
|
#define defineMemberFunctionSelectionTableDestructor( \
|
||||||
#define defineMemberFunctionSelectionTableDestructor\
|
baseType,memberFunction,argNames) \
|
||||||
(baseType,memberFunction,argNames) \
|
|
||||||
\
|
\
|
||||||
/* Table destructor called from the table add function destructor */ \
|
/* Table destructor called from the table add function destructor */ \
|
||||||
void baseType::destroy##memberFunction##argNames##MemberFunctionTables() \
|
void baseType::destroy##memberFunction##argNames##MemberFunctionTables() \
|
||||||
@ -123,32 +118,19 @@ Description
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// internal use:
|
// Create pointer to hash-table of functions
|
||||||
// create pointer to hash-table of functions
|
#define defineMemberFunctionSelectionTablePtr(baseType,memberFunction,argNames)\
|
||||||
#define defineMemberFunctionSelectionTablePtr\
|
|
||||||
(baseType,memberFunction,argNames) \
|
|
||||||
\
|
\
|
||||||
/* Define the memberFunction table */ \
|
/* Define the memberFunction table */ \
|
||||||
baseType::memberFunction##argNames##MemberFunctionTable* \
|
baseType::memberFunction##argNames##MemberFunctionTable* \
|
||||||
baseType::memberFunction##argNames##MemberFunctionTablePtr_ = NULL
|
baseType::memberFunction##argNames##MemberFunctionTablePtr_ = NULL
|
||||||
|
|
||||||
|
|
||||||
// not much in use:
|
|
||||||
#define defineTemplateMemberFunctionSelectionTablePtr\
|
|
||||||
(baseType,memberFunction,argNames) \
|
|
||||||
\
|
|
||||||
/* Define the memberFunction table */ \
|
|
||||||
typename baseType::memberFunction##argNames##MemberFunctionTable* \
|
|
||||||
baseType::memberFunction##argNames##MemberFunctionTablePtr_ = NULL
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// external use:
|
//- Define run-time selection table
|
||||||
// ~~~~~~~~~~~~~
|
#define defineMemberFunctionSelectionTable(baseType,memberFunction,argNames) \
|
||||||
// define run-time selection table
|
|
||||||
#define defineMemberFunctionSelectionTable\
|
|
||||||
(baseType,memberFunction,argNames) \
|
|
||||||
\
|
\
|
||||||
defineMemberFunctionSelectionTablePtr \
|
defineMemberFunctionSelectionTablePtr \
|
||||||
(baseType,memberFunction,argNames); \
|
(baseType,memberFunction,argNames); \
|
||||||
@ -158,12 +140,10 @@ Description
|
|||||||
(baseType,memberFunction,argNames)
|
(baseType,memberFunction,argNames)
|
||||||
|
|
||||||
|
|
||||||
// external use:
|
//- Define run-time selection table for template classes
|
||||||
// ~~~~~~~~~~~~~
|
|
||||||
// define run-time selection table for template classes
|
|
||||||
// use when baseType doesn't need a template argument (eg, is a typedef)
|
// use when baseType doesn't need a template argument (eg, is a typedef)
|
||||||
#define defineTemplateMemberFunctionSelectionTable\
|
#define defineTemplateMemberFunctionSelectionTable( \
|
||||||
(baseType,memberFunction,argNames) \
|
baseType,memberFunction,argNames) \
|
||||||
\
|
\
|
||||||
template<> \
|
template<> \
|
||||||
defineMemberFunctionSelectionTablePtr \
|
defineMemberFunctionSelectionTablePtr \
|
||||||
@ -178,11 +158,9 @@ Description
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// internal use:
|
// Constructor aid: use when baseType requires the Targ template argument
|
||||||
// constructor aid
|
#define defineTemplatedMemberFunctionSelectionTableMemberFunction( \
|
||||||
// use when baseType requires the Targ template argument
|
baseType,memberFunction,argNames,Targ) \
|
||||||
#define defineTemplatedMemberFunctionSelectionTableMemberFunction\
|
|
||||||
(baseType,memberFunction,argNames,Targ) \
|
|
||||||
\
|
\
|
||||||
/* Table memberFunction called from the table add function */ \
|
/* Table memberFunction called from the table add function */ \
|
||||||
void baseType<Targ>::construct##memberFunction##argNames## \
|
void baseType<Targ>::construct##memberFunction##argNames## \
|
||||||
@ -199,11 +177,10 @@ Description
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// internal use:
|
// Destructor aid
|
||||||
// destructor aid
|
|
||||||
// use when baseType requires the Targ template argument
|
// use when baseType requires the Targ template argument
|
||||||
#define defineTemplatedMemberFunctionSelectionTableDestructor\
|
#define defineTemplatedMemberFunctionSelectionTableDestructor( \
|
||||||
(baseType,memberFunction,argNames,Targ) \
|
baseType,memberFunction,argNames,Targ) \
|
||||||
\
|
\
|
||||||
/* Table destructor called from the table add function destructor */ \
|
/* Table destructor called from the table add function destructor */ \
|
||||||
void baseType<Targ>::destroy##memberFunction##argNames## \
|
void baseType<Targ>::destroy##memberFunction##argNames## \
|
||||||
@ -222,23 +199,20 @@ Description
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// internal use:
|
// Create pointer to hash-table of functions
|
||||||
// create pointer to hash-table of functions
|
|
||||||
// use when baseType requires the Targ template argument
|
// use when baseType requires the Targ template argument
|
||||||
#define defineTemplatedMemberFunctionSelectionTablePtr\
|
#define defineTemplatedMemberFunctionSelectionTablePtr( \
|
||||||
(baseType,memberFunction,argNames,Targ) \
|
baseType,memberFunction,argNames,Targ) \
|
||||||
\
|
\
|
||||||
/* Define the memberFunction table */ \
|
/* Define the memberFunction table */ \
|
||||||
baseType<Targ>::memberFunction##argNames##MemberFunctionTable* \
|
baseType<Targ>::memberFunction##argNames##MemberFunctionTable* \
|
||||||
baseType<Targ>::memberFunction##argNames##MemberFunctionTablePtr_ = NULL
|
baseType<Targ>::memberFunction##argNames##MemberFunctionTablePtr_ = NULL
|
||||||
|
|
||||||
|
|
||||||
// external use:
|
//- Define run-time selection table for template classes
|
||||||
// ~~~~~~~~~~~~~
|
|
||||||
// define run-time selection table for template classes
|
|
||||||
// use when baseType requires the Targ template argument
|
// use when baseType requires the Targ template argument
|
||||||
#define defineTemplatedMemberFunctionSelectionTable\
|
#define defineTemplatedMemberFunctionSelectionTable( \
|
||||||
(baseType,memberFunction,argNames,Targ) \
|
baseType,memberFunction,argNames,Targ) \
|
||||||
\
|
\
|
||||||
template<> \
|
template<> \
|
||||||
defineTemplatedMemberFunctionSelectionTablePtr \
|
defineTemplatedMemberFunctionSelectionTablePtr \
|
||||||
|
|||||||
@ -32,10 +32,7 @@ Description
|
|||||||
#include "defineDebugSwitch.H"
|
#include "defineDebugSwitch.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
// Declarations (without debug information)
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// declarations (without debug information)
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
//- Add typeName information from argument \a TypeNameString to a class.
|
//- Add typeName information from argument \a TypeNameString to a class.
|
||||||
// Without debug information
|
// Without debug information
|
||||||
@ -60,9 +57,8 @@ public: \
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
// declarations (with debug information)
|
// Declarations (with debug information)
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
//- Add typeName information from argument \a TypeNameString to a class.
|
//- Add typeName information from argument \a TypeNameString to a class.
|
||||||
// Also declares debug information.
|
// Also declares debug information.
|
||||||
@ -87,9 +83,8 @@ public: \
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
// definitions (without debug information)
|
// Definitions (without debug information)
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
//- Define the typeName, with alternative lookup as \a Name
|
//- Define the typeName, with alternative lookup as \a Name
|
||||||
#define defineTypeNameWithName(Type, Name) \
|
#define defineTypeNameWithName(Type, Name) \
|
||||||
@ -117,9 +112,8 @@ public: \
|
|||||||
defineTemplateTypeNameWithName(Type, Type::typeName_())
|
defineTemplateTypeNameWithName(Type, Type::typeName_())
|
||||||
|
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
// definitions (with debug information)
|
// Definitions (with debug information)
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
//- Define the typeName and debug information
|
//- Define the typeName and debug information
|
||||||
#define defineTypeNameAndDebug(Type, DebugSwitch) \
|
#define defineTypeNameAndDebug(Type, DebugSwitch) \
|
||||||
@ -141,7 +135,9 @@ public: \
|
|||||||
defineNamedTemplateTypeName(Type); \
|
defineNamedTemplateTypeName(Type); \
|
||||||
defineNamedTemplateDebugSwitch(Type, DebugSwitch)
|
defineNamedTemplateDebugSwitch(Type, DebugSwitch)
|
||||||
|
|
||||||
// for templated sub-classes
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
// For templated sub-classes
|
||||||
|
|
||||||
//- Define the typeName and debug information, lookup as \a Name
|
//- Define the typeName and debug information, lookup as \a Name
|
||||||
#define defineTemplate2TypeNameAndDebugWithName(Type, Name, DebugSwitch) \
|
#define defineTemplate2TypeNameAndDebugWithName(Type, Name, DebugSwitch) \
|
||||||
|
|||||||
@ -300,9 +300,6 @@ dimensioned<Type> operator/
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Products
|
|
||||||
// ~~~~~~~~
|
|
||||||
|
|
||||||
#define PRODUCT_OPERATOR(product, op, opFunc) \
|
#define PRODUCT_OPERATOR(product, op, opFunc) \
|
||||||
\
|
\
|
||||||
template<class Type1, class Type2> \
|
template<class Type1, class Type2> \
|
||||||
|
|||||||
@ -35,10 +35,6 @@ Description
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// definitions (debug information only)
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -74,6 +70,8 @@ public:
|
|||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#define registerTemplateDebugSwitchWithName(Type,Name) \
|
#define registerTemplateDebugSwitchWithName(Type,Name) \
|
||||||
template<> \
|
template<> \
|
||||||
const Foam::RegisterDebugSwitch<Type> \
|
const Foam::RegisterDebugSwitch<Type> \
|
||||||
@ -119,6 +117,7 @@ public:
|
|||||||
template<> \
|
template<> \
|
||||||
defineDebugSwitchWithName(Type, Name, DebugSwitch); \
|
defineDebugSwitchWithName(Type, Name, DebugSwitch); \
|
||||||
registerTemplateDebugSwitchWithName(Type, Name)
|
registerTemplateDebugSwitchWithName(Type, Name)
|
||||||
|
|
||||||
//- Define the debug information for templates sub-classes, lookup as \a Name
|
//- Define the debug information for templates sub-classes, lookup as \a Name
|
||||||
#define defineTemplate2DebugSwitchWithName(Type, Name, DebugSwitch) \
|
#define defineTemplate2DebugSwitchWithName(Type, Name, DebugSwitch) \
|
||||||
template<> \
|
template<> \
|
||||||
@ -135,8 +134,6 @@ public:
|
|||||||
defineTemplateDebugSwitchWithName(Type, Type::typeName_(), DebugSwitch)
|
defineTemplateDebugSwitchWithName(Type, Type::typeName_(), DebugSwitch)
|
||||||
|
|
||||||
|
|
||||||
// For templated sub-classes
|
|
||||||
|
|
||||||
//- Define the debug information for templates
|
//- Define the debug information for templates
|
||||||
// Useful with typedefs
|
// Useful with typedefs
|
||||||
#define defineTemplate2DebugSwitch(Type, DebugSwitch) \
|
#define defineTemplate2DebugSwitch(Type, DebugSwitch) \
|
||||||
|
|||||||
@ -1,10 +1,6 @@
|
|||||||
//
|
Foam::argList::addOption
|
||||||
// addDictOption.H
|
(
|
||||||
// ~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Foam::argList::addOption
|
|
||||||
(
|
|
||||||
"dict",
|
"dict",
|
||||||
"file",
|
"file",
|
||||||
"read control dictionary from specified location"
|
"read control dictionary from specified location"
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,10 +1,5 @@
|
|||||||
//
|
Foam::argList::addBoolOption
|
||||||
// addOverwriteOption.H
|
(
|
||||||
// ~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Foam::argList::addBoolOption
|
|
||||||
(
|
|
||||||
"overwrite",
|
"overwrite",
|
||||||
"overwrite existing mesh/results files"
|
"overwrite existing mesh/results files"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,6 @@
|
|||||||
//
|
Foam::argList::addOption
|
||||||
// addRegionOption.H
|
(
|
||||||
// ~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Foam::argList::addOption
|
|
||||||
(
|
|
||||||
"region",
|
"region",
|
||||||
"name",
|
"name",
|
||||||
"specify alternative mesh region"
|
"specify alternative mesh region"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -1,29 +1,24 @@
|
|||||||
//
|
Foam::argList::addBoolOption
|
||||||
// addTimeOptions.H
|
(
|
||||||
// ~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Foam::argList::addBoolOption
|
|
||||||
(
|
|
||||||
"constant",
|
"constant",
|
||||||
"include the 'constant/' dir in the times list"
|
"include the 'constant/' dir in the times list"
|
||||||
);
|
);
|
||||||
|
|
||||||
Foam::argList::addBoolOption
|
Foam::argList::addBoolOption
|
||||||
(
|
(
|
||||||
"latestTime",
|
"latestTime",
|
||||||
"select the latest time"
|
"select the latest time"
|
||||||
);
|
);
|
||||||
|
|
||||||
Foam::argList::addBoolOption
|
Foam::argList::addBoolOption
|
||||||
(
|
(
|
||||||
"noZero",
|
"noZero",
|
||||||
"exclude the '0/' dir from the times list"
|
"exclude the '0/' dir from the times list"
|
||||||
);
|
);
|
||||||
|
|
||||||
Foam::argList::addOption
|
Foam::argList::addOption
|
||||||
(
|
(
|
||||||
"time",
|
"time",
|
||||||
"time",
|
"time",
|
||||||
"specify a single time value to select"
|
"specify a single time value to select"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -1,14 +1,11 @@
|
|||||||
//
|
// Unless -constant is present, skip startTime if it is "constant"
|
||||||
// checkConstantOption.H
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// unless -constant is present, skip startTime if it is "constant"
|
|
||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
!args.optionFound("constant")
|
!args.optionFound("constant")
|
||||||
&& (startTime < Times.size()-1)
|
&& (startTime < Times.size()-1)
|
||||||
&& (Times[startTime].name() == "constant")
|
&& (Times[startTime].name() == "constant")
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
startTime++;
|
startTime++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,3 @@
|
|||||||
//
|
|
||||||
// checkTimeOption.H
|
|
||||||
// ~~~~~~~~~~~~~~~~~
|
|
||||||
// Check -time and -latestTime options
|
// Check -time and -latestTime options
|
||||||
|
|
||||||
if (args.optionFound("time"))
|
if (args.optionFound("time"))
|
||||||
|
|||||||
@ -1,7 +1,3 @@
|
|||||||
//
|
|
||||||
// checkTimeOptions.H
|
|
||||||
// ~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Foam::label startTime = 0;
|
Foam::label startTime = 0;
|
||||||
|
|
||||||
// Unless -constant is present, skip startTime if it is "constant"
|
// Unless -constant is present, skip startTime if it is "constant"
|
||||||
|
|||||||
@ -1,7 +1,3 @@
|
|||||||
//
|
|
||||||
// checkTimeOptionsNoConstant.H
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Foam::label startTime = 0;
|
Foam::label startTime = 0;
|
||||||
|
|
||||||
// Check -time and -latestTime options
|
// Check -time and -latestTime options
|
||||||
|
|||||||
@ -1,13 +1,9 @@
|
|||||||
//
|
Foam::Info
|
||||||
// createMesh.H
|
|
||||||
// ~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Foam::Info
|
|
||||||
<< "Create mesh for time = "
|
<< "Create mesh for time = "
|
||||||
<< runTime.timeName() << Foam::nl << Foam::endl;
|
<< runTime.timeName() << Foam::nl << Foam::endl;
|
||||||
|
|
||||||
Foam::fvMesh mesh
|
Foam::fvMesh mesh
|
||||||
(
|
(
|
||||||
Foam::IOobject
|
Foam::IOobject
|
||||||
(
|
(
|
||||||
Foam::fvMesh::defaultRegion,
|
Foam::fvMesh::defaultRegion,
|
||||||
@ -15,4 +11,4 @@
|
|||||||
runTime,
|
runTime,
|
||||||
Foam::IOobject::MUST_READ
|
Foam::IOobject::MUST_READ
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,14 +1,11 @@
|
|||||||
//
|
// Currently identical to createMesh.H
|
||||||
// createMeshNoClear.H
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~
|
|
||||||
// currently identical to createMesh.H
|
|
||||||
|
|
||||||
Foam::Info
|
Foam::Info
|
||||||
<< "Create mesh, no clear-out for time = "
|
<< "Create mesh, no clear-out for time = "
|
||||||
<< runTime.timeName() << Foam::nl << Foam::endl;
|
<< runTime.timeName() << Foam::nl << Foam::endl;
|
||||||
|
|
||||||
Foam::fvMesh mesh
|
Foam::fvMesh mesh
|
||||||
(
|
(
|
||||||
Foam::IOobject
|
Foam::IOobject
|
||||||
(
|
(
|
||||||
Foam::fvMesh::defaultRegion,
|
Foam::fvMesh::defaultRegion,
|
||||||
@ -16,4 +13,4 @@
|
|||||||
runTime,
|
runTime,
|
||||||
Foam::IOobject::MUST_READ
|
Foam::IOobject::MUST_READ
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,25 +1,21 @@
|
|||||||
//
|
Foam::word regionName;
|
||||||
// createNamedMesh.H
|
|
||||||
// ~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Foam::word regionName;
|
if (args.optionReadIfPresent("region", regionName))
|
||||||
|
{
|
||||||
if (args.optionReadIfPresent("region", regionName))
|
|
||||||
{
|
|
||||||
Foam::Info
|
Foam::Info
|
||||||
<< "Create mesh " << regionName << " for time = "
|
<< "Create mesh " << regionName << " for time = "
|
||||||
<< runTime.timeName() << Foam::nl << Foam::endl;
|
<< runTime.timeName() << Foam::nl << Foam::endl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
regionName = Foam::fvMesh::defaultRegion;
|
regionName = Foam::fvMesh::defaultRegion;
|
||||||
Foam::Info
|
Foam::Info
|
||||||
<< "Create mesh for time = "
|
<< "Create mesh for time = "
|
||||||
<< runTime.timeName() << Foam::nl << Foam::endl;
|
<< runTime.timeName() << Foam::nl << Foam::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Foam::fvMesh mesh
|
Foam::fvMesh mesh
|
||||||
(
|
(
|
||||||
Foam::IOobject
|
Foam::IOobject
|
||||||
(
|
(
|
||||||
regionName,
|
regionName,
|
||||||
@ -27,4 +23,4 @@
|
|||||||
runTime,
|
runTime,
|
||||||
Foam::IOobject::MUST_READ
|
Foam::IOobject::MUST_READ
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,25 +1,21 @@
|
|||||||
//
|
Foam::word regionName;
|
||||||
// createNamedPolyMesh.H
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Foam::word regionName;
|
if (args.optionReadIfPresent("region", regionName))
|
||||||
|
{
|
||||||
if (args.optionReadIfPresent("region", regionName))
|
|
||||||
{
|
|
||||||
Foam::Info
|
Foam::Info
|
||||||
<< "Create polyMesh " << regionName << " for time = "
|
<< "Create polyMesh " << regionName << " for time = "
|
||||||
<< runTime.timeName() << Foam::nl << Foam::endl;
|
<< runTime.timeName() << Foam::nl << Foam::endl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
regionName = Foam::polyMesh::defaultRegion;
|
regionName = Foam::polyMesh::defaultRegion;
|
||||||
Foam::Info
|
Foam::Info
|
||||||
<< "Create polyMesh for time = "
|
<< "Create polyMesh for time = "
|
||||||
<< runTime.timeName() << Foam::nl << Foam::endl;
|
<< runTime.timeName() << Foam::nl << Foam::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Foam::polyMesh mesh
|
Foam::polyMesh mesh
|
||||||
(
|
(
|
||||||
Foam::IOobject
|
Foam::IOobject
|
||||||
(
|
(
|
||||||
regionName,
|
regionName,
|
||||||
@ -27,4 +23,4 @@
|
|||||||
runTime,
|
runTime,
|
||||||
Foam::IOobject::MUST_READ
|
Foam::IOobject::MUST_READ
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,13 +1,9 @@
|
|||||||
//
|
Foam::Info
|
||||||
// createPolyMesh.H
|
|
||||||
// ~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Foam::Info
|
|
||||||
<< "Create polyMesh for time = "
|
<< "Create polyMesh for time = "
|
||||||
<< runTime.timeName() << Foam::nl << Foam::endl;
|
<< runTime.timeName() << Foam::nl << Foam::endl;
|
||||||
|
|
||||||
Foam::polyMesh mesh
|
Foam::polyMesh mesh
|
||||||
(
|
(
|
||||||
Foam::IOobject
|
Foam::IOobject
|
||||||
(
|
(
|
||||||
Foam::polyMesh::defaultRegion,
|
Foam::polyMesh::defaultRegion,
|
||||||
@ -15,4 +11,4 @@
|
|||||||
runTime,
|
runTime,
|
||||||
Foam::IOobject::MUST_READ
|
Foam::IOobject::MUST_READ
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,7 +1,3 @@
|
|||||||
//
|
Foam::Info<< "Create time\n" << Foam::endl;
|
||||||
// createTime.H
|
|
||||||
// ~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Foam::Info<< "Create time\n" << Foam::endl;
|
Foam::Time runTime(Foam::Time::controlDictName, args);
|
||||||
|
|
||||||
Foam::Time runTime(Foam::Time::controlDictName, args);
|
|
||||||
|
|||||||
@ -1,28 +1,24 @@
|
|||||||
//
|
fileName dictPath = "";
|
||||||
// setConstantMeshDictionaryIO.H
|
if (args.optionFound("dict"))
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
{
|
||||||
|
|
||||||
fileName dictPath = "";
|
|
||||||
if (args.optionFound("dict"))
|
|
||||||
{
|
|
||||||
dictPath = args["dict"];
|
dictPath = args["dict"];
|
||||||
if (isDir(dictPath))
|
if (isDir(dictPath))
|
||||||
{
|
{
|
||||||
dictPath = dictPath / dictName;
|
dictPath = dictPath / dictName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IOobject dictIO
|
IOobject dictIO
|
||||||
(
|
(
|
||||||
dictName,
|
dictName,
|
||||||
runTime.constant(),
|
runTime.constant(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::MUST_READ_IF_MODIFIED,
|
IOobject::MUST_READ_IF_MODIFIED,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
);
|
);
|
||||||
|
|
||||||
if (dictPath.size())
|
if (dictPath.size())
|
||||||
{
|
{
|
||||||
dictIO = IOobject
|
dictIO = IOobject
|
||||||
(
|
(
|
||||||
dictPath,
|
dictPath,
|
||||||
@ -30,4 +26,4 @@
|
|||||||
IOobject::MUST_READ_IF_MODIFIED,
|
IOobject::MUST_READ_IF_MODIFIED,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,5 @@
|
|||||||
//
|
Foam::argList args(argc, argv);
|
||||||
// setRootCase.H
|
if (!args.checkRootCase())
|
||||||
// ~~~~~~~~~~~~~
|
{
|
||||||
|
|
||||||
Foam::argList args(argc, argv);
|
|
||||||
if (!args.checkRootCase())
|
|
||||||
{
|
|
||||||
Foam::FatalError.exit();
|
Foam::FatalError.exit();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,28 +1,24 @@
|
|||||||
//
|
fileName dictPath = "";
|
||||||
// setSystemMeshDictionaryIO.H
|
if (args.optionFound("dict"))
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
{
|
||||||
|
|
||||||
fileName dictPath = "";
|
|
||||||
if (args.optionFound("dict"))
|
|
||||||
{
|
|
||||||
dictPath = args["dict"];
|
dictPath = args["dict"];
|
||||||
if (isDir(dictPath))
|
if (isDir(dictPath))
|
||||||
{
|
{
|
||||||
dictPath = dictPath / dictName;
|
dictPath = dictPath / dictName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IOobject dictIO
|
IOobject dictIO
|
||||||
(
|
(
|
||||||
dictName,
|
dictName,
|
||||||
runTime.system(),
|
runTime.system(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::MUST_READ_IF_MODIFIED,
|
IOobject::MUST_READ_IF_MODIFIED,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
);
|
);
|
||||||
|
|
||||||
if (dictPath.size())
|
if (dictPath.size())
|
||||||
{
|
{
|
||||||
dictIO = IOobject
|
dictIO = IOobject
|
||||||
(
|
(
|
||||||
dictPath,
|
dictPath,
|
||||||
@ -30,4 +26,4 @@
|
|||||||
IOobject::MUST_READ_IF_MODIFIED,
|
IOobject::MUST_READ_IF_MODIFIED,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,28 +1,24 @@
|
|||||||
//
|
fileName dictPath = "";
|
||||||
// setSystemRunTimeDictionaryIO.H
|
if (args.optionFound("dict"))
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
{
|
||||||
|
|
||||||
fileName dictPath = "";
|
|
||||||
if (args.optionFound("dict"))
|
|
||||||
{
|
|
||||||
dictPath = args["dict"];
|
dictPath = args["dict"];
|
||||||
if (isDir(dictPath))
|
if (isDir(dictPath))
|
||||||
{
|
{
|
||||||
dictPath = dictPath / dictName;
|
dictPath = dictPath / dictName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IOobject dictIO
|
IOobject dictIO
|
||||||
(
|
(
|
||||||
dictName,
|
dictName,
|
||||||
runTime.system(),
|
runTime.system(),
|
||||||
runTime,
|
runTime,
|
||||||
IOobject::MUST_READ_IF_MODIFIED,
|
IOobject::MUST_READ_IF_MODIFIED,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
);
|
);
|
||||||
|
|
||||||
if (dictPath.size())
|
if (dictPath.size())
|
||||||
{
|
{
|
||||||
dictIO = IOobject
|
dictIO = IOobject
|
||||||
(
|
(
|
||||||
dictPath,
|
dictPath,
|
||||||
@ -30,4 +26,4 @@
|
|||||||
IOobject::MUST_READ_IF_MODIFIED,
|
IOobject::MUST_READ_IF_MODIFIED,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5118,13 +5118,6 @@ const Foam::cellShapeList& Foam::hexRef8::cellShapes() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Unrefinement
|
|
||||||
// ~~~~~~~~~~~~
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
Foam::labelList Foam::hexRef8::getSplitPoints() const
|
Foam::labelList Foam::hexRef8::getSplitPoints() const
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
|
|||||||
@ -87,20 +87,6 @@ class autoSnapDriver
|
|||||||
const List<labelPair>&
|
const List<labelPair>&
|
||||||
);
|
);
|
||||||
|
|
||||||
//static tmp<pointField> avg
|
|
||||||
//(
|
|
||||||
// const indirectPrimitivePatch&,
|
|
||||||
// const pointField&
|
|
||||||
//);
|
|
||||||
|
|
||||||
//- Calculate displacement per patch point. Wip.
|
|
||||||
//static tmp<pointField> smoothLambdaMuPatchDisplacement
|
|
||||||
//(
|
|
||||||
// const motionSmoother& meshMover,
|
|
||||||
// const List<labelPair>& baffles
|
|
||||||
//);
|
|
||||||
|
|
||||||
|
|
||||||
//- Check that face zones are synced
|
//- Check that face zones are synced
|
||||||
void checkCoupledFaceZones() const;
|
void checkCoupledFaceZones() const;
|
||||||
|
|
||||||
@ -155,13 +141,7 @@ class autoSnapDriver
|
|||||||
const List<pointConstraint>& constraints,
|
const List<pointConstraint>& constraints,
|
||||||
vectorField& disp
|
vectorField& disp
|
||||||
) const;
|
) const;
|
||||||
//void smoothAndConstrain2
|
|
||||||
//(
|
|
||||||
// const bool applyConstraints,
|
|
||||||
// const indirectPrimitivePatch& pp,
|
|
||||||
// const List<pointConstraint>& constraints,
|
|
||||||
// vectorField& disp
|
|
||||||
//) const;
|
|
||||||
void calcNearest
|
void calcNearest
|
||||||
(
|
(
|
||||||
const label iter,
|
const label iter,
|
||||||
@ -170,6 +150,7 @@ class autoSnapDriver
|
|||||||
vectorField& pointSurfaceNormal,
|
vectorField& pointSurfaceNormal,
|
||||||
vectorField& pointRotation
|
vectorField& pointRotation
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
void calcNearestFace
|
void calcNearestFace
|
||||||
(
|
(
|
||||||
const label iter,
|
const label iter,
|
||||||
@ -180,6 +161,12 @@ class autoSnapDriver
|
|||||||
labelList& faceSurfaceRegion,
|
labelList& faceSurfaceRegion,
|
||||||
vectorField& faceRotation
|
vectorField& faceRotation
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
//- Collect (possibly remote) per point data of all surrounding
|
||||||
|
// faces
|
||||||
|
// - faceSurfaceNormal
|
||||||
|
// - faceDisp
|
||||||
|
// - faceCentres&faceNormal
|
||||||
void calcNearestFacePointProperties
|
void calcNearestFacePointProperties
|
||||||
(
|
(
|
||||||
const label iter,
|
const label iter,
|
||||||
@ -194,6 +181,11 @@ class autoSnapDriver
|
|||||||
List<List<point>>& pointFaceCentres,
|
List<List<point>>& pointFaceCentres,
|
||||||
List<labelList>& pointFacePatchID
|
List<labelList>& pointFacePatchID
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
//- Gets passed in offset to nearest point on feature
|
||||||
|
// edge. Calculates if the point has a different number of
|
||||||
|
// faces on either side of the feature and if so attracts the
|
||||||
|
// point to that non-dominant plane.
|
||||||
void correctAttraction
|
void correctAttraction
|
||||||
(
|
(
|
||||||
const DynamicList<point>& surfacePoints,
|
const DynamicList<point>& surfacePoints,
|
||||||
@ -274,6 +266,12 @@ class autoSnapDriver
|
|||||||
|
|
||||||
//- Return hit if faces-on-the-same-normalplane are on multiple
|
//- Return hit if faces-on-the-same-normalplane are on multiple
|
||||||
// patches
|
// patches
|
||||||
|
// - false, index=-1 : single patch
|
||||||
|
// - true , index=0 : multiple patches but on different
|
||||||
|
// normals planes (so geometric feature
|
||||||
|
// edge is also a region edge)
|
||||||
|
// - true , index=1 : multiple patches on same normals plane
|
||||||
|
// i.e. flat region edge
|
||||||
pointIndexHit findMultiPatchPoint
|
pointIndexHit findMultiPatchPoint
|
||||||
(
|
(
|
||||||
const point& pt,
|
const point& pt,
|
||||||
@ -381,6 +379,7 @@ class autoSnapDriver
|
|||||||
vectorField& patchAttraction,
|
vectorField& patchAttraction,
|
||||||
List<pointConstraint>& patchConstraints
|
List<pointConstraint>& patchConstraints
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
void reverseAttractMeshPoints
|
void reverseAttractMeshPoints
|
||||||
(
|
(
|
||||||
const label iter,
|
const label iter,
|
||||||
@ -465,6 +464,7 @@ class autoSnapDriver
|
|||||||
vectorField& patchAttraction,
|
vectorField& patchAttraction,
|
||||||
List<pointConstraint>& patchConstraints
|
List<pointConstraint>& patchConstraints
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
void preventFaceSqueeze
|
void preventFaceSqueeze
|
||||||
(
|
(
|
||||||
const label iter,
|
const label iter,
|
||||||
@ -582,16 +582,6 @@ public:
|
|||||||
vectorField& nearestNormal
|
vectorField& nearestNormal
|
||||||
);
|
);
|
||||||
|
|
||||||
////- Per patch point calculate point on nearest surface. Set as
|
|
||||||
//// boundary conditions of motionSmoother displacement field.
|
|
||||||
//// Return displacement of patch points.
|
|
||||||
//static vectorField calcNearestLocalSurface
|
|
||||||
//(
|
|
||||||
// const meshRefinement& meshRefiner,
|
|
||||||
// const scalarField& snapDist,
|
|
||||||
// const indirectPrimitivePatch&
|
|
||||||
//);
|
|
||||||
|
|
||||||
//- Smooth the displacement field to the internal.
|
//- Smooth the displacement field to the internal.
|
||||||
void smoothDisplacement
|
void smoothDisplacement
|
||||||
(
|
(
|
||||||
@ -626,7 +616,6 @@ public:
|
|||||||
const scalar planarAngle,
|
const scalar planarAngle,
|
||||||
const snapParameters& snapParams
|
const snapParameters& snapParams
|
||||||
);
|
);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -436,11 +436,6 @@ void Foam::autoSnapDriver::calcNearestFace
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Collect (possibly remote) per point data of all surrounding faces
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
// - faceSurfaceNormal
|
|
||||||
// - faceDisp
|
|
||||||
// - faceCentres&faceNormal
|
|
||||||
void Foam::autoSnapDriver::calcNearestFacePointProperties
|
void Foam::autoSnapDriver::calcNearestFacePointProperties
|
||||||
(
|
(
|
||||||
const label iter,
|
const label iter,
|
||||||
@ -639,9 +634,6 @@ void Foam::autoSnapDriver::calcNearestFacePointProperties
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Gets passed in offset to nearest point on feature edge. Calculates
|
|
||||||
// if the point has a different number of faces on either side of the feature
|
|
||||||
// and if so attracts the point to that non-dominant plane.
|
|
||||||
void Foam::autoSnapDriver::correctAttraction
|
void Foam::autoSnapDriver::correctAttraction
|
||||||
(
|
(
|
||||||
const DynamicList<point>& surfacePoints,
|
const DynamicList<point>& surfacePoints,
|
||||||
@ -731,12 +723,6 @@ Foam::label Foam::autoSnapDriver::findNormal
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Detect multiple patches. Returns pointIndexHit:
|
|
||||||
// - false, index=-1 : single patch
|
|
||||||
// - true , index=0 : multiple patches but on different normals planes
|
|
||||||
// (so geometric feature edge is also a region edge)
|
|
||||||
// - true , index=1 : multiple patches on same normals plane i.e. flat region
|
|
||||||
// edge
|
|
||||||
Foam::pointIndexHit Foam::autoSnapDriver::findMultiPatchPoint
|
Foam::pointIndexHit Foam::autoSnapDriver::findMultiPatchPoint
|
||||||
(
|
(
|
||||||
const point& pt,
|
const point& pt,
|
||||||
@ -1009,7 +995,6 @@ void Foam::autoSnapDriver::featureAttractionUsingReconstruction
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Special version that calculates attraction in one go
|
|
||||||
void Foam::autoSnapDriver::featureAttractionUsingReconstruction
|
void Foam::autoSnapDriver::featureAttractionUsingReconstruction
|
||||||
(
|
(
|
||||||
const label iter,
|
const label iter,
|
||||||
@ -1437,7 +1422,6 @@ void Foam::autoSnapDriver::releasePointsNextToMultiPatch
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// If only two attractions and across face return the face indices
|
|
||||||
Foam::labelPair Foam::autoSnapDriver::findDiagonalAttraction
|
Foam::labelPair Foam::autoSnapDriver::findDiagonalAttraction
|
||||||
(
|
(
|
||||||
const indirectPrimitivePatch& pp,
|
const indirectPrimitivePatch& pp,
|
||||||
@ -1447,6 +1431,7 @@ Foam::labelPair Foam::autoSnapDriver::findDiagonalAttraction
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const face& f = pp.localFaces()[faceI];
|
const face& f = pp.localFaces()[faceI];
|
||||||
|
|
||||||
// For now just detect any attraction. Improve this to look at
|
// For now just detect any attraction. Improve this to look at
|
||||||
// actual attraction position and orientation
|
// actual attraction position and orientation
|
||||||
|
|
||||||
@ -1771,8 +1756,6 @@ Foam::autoSnapDriver::findNearFeaturePoint
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Determines for every pp point - that is on multiple faces that form
|
|
||||||
// a feature - the nearest feature edge/point.
|
|
||||||
void Foam::autoSnapDriver::determineFeatures
|
void Foam::autoSnapDriver::determineFeatures
|
||||||
(
|
(
|
||||||
const label iter,
|
const label iter,
|
||||||
@ -2184,17 +2167,6 @@ void Foam::autoSnapDriver::determineFeatures
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Baffle handling
|
|
||||||
// ~~~~~~~~~~~~~~~
|
|
||||||
// Override pointAttractor, edgeAttractor, patchAttration etc. to
|
|
||||||
// implement 'baffle' handling.
|
|
||||||
// Baffle: the mesh pp point originates from a loose standing
|
|
||||||
// baffle.
|
|
||||||
// Sampling the surface with the surrounding face-centres only picks up
|
|
||||||
// a single triangle normal so above determineFeatures will not have
|
|
||||||
// detected anything. So explicitly pick up feature edges on the pp
|
|
||||||
// (after duplicating points & smoothing so will already have been
|
|
||||||
// expanded) and match these to the features.
|
|
||||||
void Foam::autoSnapDriver::determineBaffleFeatures
|
void Foam::autoSnapDriver::determineBaffleFeatures
|
||||||
(
|
(
|
||||||
const label iter,
|
const label iter,
|
||||||
@ -2214,6 +2186,16 @@ void Foam::autoSnapDriver::determineBaffleFeatures
|
|||||||
List<pointConstraint>& patchConstraints
|
List<pointConstraint>& patchConstraints
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
|
// Override pointAttractor, edgeAttractor, patchAttration etc. to
|
||||||
|
// implement 'baffle' handling.
|
||||||
|
// Baffle: the mesh pp point originates from a loose standing
|
||||||
|
// baffle.
|
||||||
|
// Sampling the surface with the surrounding face-centres only picks up
|
||||||
|
// a single triangle normal so above determineFeatures will not have
|
||||||
|
// detected anything. So explicitly pick up feature edges on the pp
|
||||||
|
// (after duplicating points & smoothing so will already have been
|
||||||
|
// expanded) and match these to the features.
|
||||||
|
|
||||||
const fvMesh& mesh = meshRefiner_.mesh();
|
const fvMesh& mesh = meshRefiner_.mesh();
|
||||||
const refinementFeatures& features = meshRefiner_.features();
|
const refinementFeatures& features = meshRefiner_.features();
|
||||||
|
|
||||||
@ -2966,7 +2948,6 @@ void Foam::autoSnapDriver::featureAttractionUsingFeatureEdges
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Correct for squeezing of face
|
|
||||||
void Foam::autoSnapDriver::preventFaceSqueeze
|
void Foam::autoSnapDriver::preventFaceSqueeze
|
||||||
(
|
(
|
||||||
const label iter,
|
const label iter,
|
||||||
|
|||||||
Reference in New Issue
Block a user