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
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -749,212 +749,211 @@ void Foam::CV2D::newPoints()
|
||||
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::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);
|
||||
Triangulation::Edge_circulator ecStart = ec;
|
||||
|
||||
// Triangulation::Edge_circulator ec = incident_edges(vit);
|
||||
// Triangulation::Edge_circulator ecStart = ec;
|
||||
// Circulate around the edges to find the first which is not
|
||||
// infinite
|
||||
do
|
||||
{
|
||||
if (!is_infinite(ec)) break;
|
||||
} while (++ec != ecStart);
|
||||
|
||||
// // Circulate around the edges to find the first which is not
|
||||
// // infinite
|
||||
// do
|
||||
// {
|
||||
// if (!is_infinite(ec)) break;
|
||||
// } while (++ec != ecStart);
|
||||
// Store the start-end of the first non-infinte edge
|
||||
point2D de0 = toPoint2D(circumcenter(ec->first));
|
||||
|
||||
// // Store the start-end of the first non-infinte edge
|
||||
// point2D de0 = toPoint2D(circumcenter(ec->first));
|
||||
// Keep track of the maximum edge length^2
|
||||
scalar maxEdgeLen2 = 0.0;
|
||||
|
||||
// // Keep track of the maximum edge length^2
|
||||
// scalar maxEdgeLen2 = 0.0;
|
||||
// Keep track of the index of the longest edge
|
||||
label edgecd0i = -1;
|
||||
|
||||
// // Keep track of the index of the longest edge
|
||||
// label edgecd0i = -1;
|
||||
// Edge counter
|
||||
label edgei = 0;
|
||||
|
||||
// // Edge counter
|
||||
// label edgei = 0;
|
||||
do
|
||||
{
|
||||
if (!is_infinite(ec))
|
||||
{
|
||||
// Get the end of the current edge
|
||||
point2D de1 = toPoint2D
|
||||
(
|
||||
circumcenter(ec->first->neighbor(ec->second))
|
||||
);
|
||||
|
||||
// do
|
||||
// {
|
||||
// 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
|
||||
edges[edgei] = de1 - de0;
|
||||
|
||||
// // Store the current edge vector
|
||||
// edges[edgei] = de1 - de0;
|
||||
// Store the edge mid-point in the vertices array
|
||||
vertices[edgei] = 0.5*(de1 + de0);
|
||||
|
||||
// // Store the edge mid-point in the vertices array
|
||||
// vertices[edgei] = 0.5*(de1 + de0);
|
||||
// Move the current edge end into the edge start for the
|
||||
// next iteration
|
||||
de0 = de1;
|
||||
|
||||
// // Move the current edge end into the edge start for the
|
||||
// // next iteration
|
||||
// de0 = de1;
|
||||
// Keep track of the longest edge
|
||||
|
||||
// // 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)
|
||||
// {
|
||||
// maxEdgeLen2 = edgeLen2;
|
||||
// edgecd0i = edgei;
|
||||
// }
|
||||
edgei++;
|
||||
}
|
||||
} while (++ec != ecStart);
|
||||
|
||||
// edgei++;
|
||||
// }
|
||||
// } while (++ec != ecStart);
|
||||
// Initialise cd0 such that the mesh will align
|
||||
// in in the x-y directions
|
||||
vector2D cd0(1, 0);
|
||||
|
||||
// // Initialise cd0 such that the mesh will align
|
||||
// // in in the x-y directions
|
||||
// vector2D cd0(1, 0);
|
||||
if (meshControls().relaxOrientation())
|
||||
{
|
||||
// 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())
|
||||
// {
|
||||
// // 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().nearWallAlignedDist() > 0)
|
||||
{
|
||||
pointIndexHit pHit = qSurf_.tree().findNearest
|
||||
(
|
||||
toPoint3D(defVert0),
|
||||
meshControls().nearWallAlignedDist2()
|
||||
);
|
||||
|
||||
// if (meshControls().nearWallAlignedDist() > 0)
|
||||
// {
|
||||
// pointIndexHit pHit = qSurf_.tree().findNearest
|
||||
// (
|
||||
// toPoint3D(defVert0),
|
||||
// meshControls().nearWallAlignedDist2()
|
||||
// );
|
||||
if (pHit.hit())
|
||||
{
|
||||
cd0 = toPoint2D(faceNormals[pHit.index()]);
|
||||
}
|
||||
}
|
||||
|
||||
// if (pHit.hit())
|
||||
// {
|
||||
// cd0 = toPoint2D(faceNormals[pHit.index()]);
|
||||
// }
|
||||
// }
|
||||
// Rotate by 45deg needed to create an averaging procedure which
|
||||
// encourages the cells to be square
|
||||
cd0 = vector2D(cd0.x() + cd0.y(), cd0.y() - cd0.x());
|
||||
|
||||
// // Rotate by 45deg needed to create an averaging procedure which
|
||||
// // encourages the cells to be square
|
||||
// cd0 = vector2D(cd0.x() + cd0.y(), cd0.y() - cd0.x());
|
||||
// Normalise the primary coordinate direction
|
||||
cd0 /= mag(cd0);
|
||||
|
||||
// // Normalise the primary coordinate direction
|
||||
// cd0 /= mag(cd0);
|
||||
|
||||
// // Calculate the orthogonal coordinate direction
|
||||
// vector2D cd1(-cd0.y(), cd0.x());
|
||||
// Calculate the orthogonal coordinate direction
|
||||
vector2D cd1(-cd0.y(), cd0.x());
|
||||
|
||||
|
||||
// // Restart the circulator
|
||||
// ec = ecStart;
|
||||
// Restart the circulator
|
||||
ec = ecStart;
|
||||
|
||||
// // ... and the counter
|
||||
// edgei = 0;
|
||||
// ... and the counter
|
||||
edgei = 0;
|
||||
|
||||
// // Initialise the displacement for the centre and sum-weights
|
||||
// vector2D disp = vector2D::zero;
|
||||
// scalar sumw = 0;
|
||||
// Initialise the displacement for the centre and sum-weights
|
||||
vector2D disp = vector2D::zero;
|
||||
scalar sumw = 0;
|
||||
|
||||
// do
|
||||
// {
|
||||
// if (!is_infinite(ec))
|
||||
// {
|
||||
// // Pick up the current edge
|
||||
// const vector2D& ei = edges[edgei];
|
||||
do
|
||||
{
|
||||
if (!is_infinite(ec))
|
||||
{
|
||||
// Pick up the current edge
|
||||
const vector2D& ei = edges[edgei];
|
||||
|
||||
// // Calculate the centre to edge-centre vector
|
||||
// vector2D deltai = vertices[edgei] - defVert0;
|
||||
// Calculate the centre to edge-centre vector
|
||||
vector2D deltai = vertices[edgei] - defVert0;
|
||||
|
||||
// // Set the weight for this edge contribution
|
||||
// scalar w = 1;
|
||||
// Set the weight for this edge contribution
|
||||
scalar w = 1;
|
||||
|
||||
// if (meshControls().squares())
|
||||
// {
|
||||
// w = magSqr(deltai.x()*ei.y() - deltai.y()*ei.x());
|
||||
// // alternative weights
|
||||
// //w = mag(deltai.x()*ei.y() - deltai.y()*ei.x());
|
||||
// //w = magSqr(ei)*mag(deltai);
|
||||
if (meshControls().squares())
|
||||
{
|
||||
w = magSqr(deltai.x()*ei.y() - deltai.y()*ei.x());
|
||||
// alternative weights
|
||||
//w = mag(deltai.x()*ei.y() - deltai.y()*ei.x());
|
||||
//w = magSqr(ei)*mag(deltai);
|
||||
|
||||
// // Use the following for an ~square mesh
|
||||
// // Find the coordinate contributions for this edge delta
|
||||
// scalar cd0deltai = cd0 & deltai;
|
||||
// scalar cd1deltai = cd1 & deltai;
|
||||
// Use the following for an ~square mesh
|
||||
// Find the coordinate contributions for this edge delta
|
||||
scalar cd0deltai = cd0 & deltai;
|
||||
scalar cd1deltai = cd1 & deltai;
|
||||
|
||||
// // Create a "square" displacement
|
||||
// if (mag(cd0deltai) > mag(cd1deltai))
|
||||
// {
|
||||
// disp += (w*cd0deltai)*cd0;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// disp += (w*cd1deltai)*cd1;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // Use this for a hexagon/pentagon mesh
|
||||
// disp += w*deltai;
|
||||
// }
|
||||
// Create a "square" displacement
|
||||
if (mag(cd0deltai) > mag(cd1deltai))
|
||||
{
|
||||
disp += (w*cd0deltai)*cd0;
|
||||
}
|
||||
else
|
||||
{
|
||||
disp += (w*cd1deltai)*cd1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use this for a hexagon/pentagon mesh
|
||||
disp += w*deltai;
|
||||
}
|
||||
|
||||
// // Sum the weights
|
||||
// sumw += w;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// FatalErrorInFunction
|
||||
// << "Infinite triangle found in internal mesh"
|
||||
// << exit(FatalError);
|
||||
// }
|
||||
// Sum the weights
|
||||
sumw += w;
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Infinite triangle found in internal mesh"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
// edgei++;
|
||||
edgei++;
|
||||
|
||||
// } while (++ec != ecStart);
|
||||
} while (++ec != ecStart);
|
||||
|
||||
// // Calculate the average displacement
|
||||
// disp /= sumw;
|
||||
// totalDisp += disp;
|
||||
// totalDist += mag(disp);
|
||||
// Calculate the average displacement
|
||||
disp /= sumw;
|
||||
totalDisp += disp;
|
||||
totalDist += mag(disp);
|
||||
|
||||
// // Move the point by a fraction of the average displacement
|
||||
// movePoint(vit, defVert0 + relaxation*disp);
|
||||
// }
|
||||
// }
|
||||
// Move the point by a fraction of the average displacement
|
||||
movePoint(vit, defVert0 + relaxation*disp);
|
||||
}
|
||||
}
|
||||
|
||||
// Info << "\nTotal displacement = " << totalDisp
|
||||
// << " total distance = " << totalDist << endl;
|
||||
Info << "\nTotal displacement = " << totalDisp
|
||||
<< " total distance = " << totalDist << endl;
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
void Foam::CV2D::moveInternalPoints(const point2DField& newPoints)
|
||||
{
|
||||
label pointI = 0;
|
||||
|
||||
//void Foam::CV2D::moveInternalPoints(const point2DField& newPoints)
|
||||
//{
|
||||
// label pointI = 0;
|
||||
|
||||
// for
|
||||
// (
|
||||
// Triangulation::Finite_vertices_iterator vit = finite_vertices_begin();
|
||||
// vit != finite_vertices_end();
|
||||
// ++vit
|
||||
// )
|
||||
// {
|
||||
// if (vit->internalPoint())
|
||||
// {
|
||||
// movePoint(vit, newPoints[pointI++]);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
for
|
||||
(
|
||||
Triangulation::Finite_vertices_iterator vit = finite_vertices_begin();
|
||||
vit != finite_vertices_end();
|
||||
++vit
|
||||
)
|
||||
{
|
||||
if (vit->internalPoint())
|
||||
{
|
||||
movePoint(vit, newPoints[pointI++]);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
void Foam::CV2D::write() const
|
||||
{
|
||||
|
||||
@ -62,17 +62,11 @@ class StaticAssertionTest {};
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Internal use:
|
||||
// ~~~~~~~~~~~~~
|
||||
|
||||
// Paste together strings, even if an argument is itself a macro
|
||||
#define StaticAssertMacro(X,Y) StaticAssertMacro1(X,Y)
|
||||
#define StaticAssertMacro1(X,Y) StaticAssertMacro2(X,Y)
|
||||
#define StaticAssertMacro2(X,Y) X##Y
|
||||
|
||||
// External use:
|
||||
// ~~~~~~~~~~~~~
|
||||
|
||||
//- Assert that some test is true at compile-time
|
||||
#define StaticAssert(Test) \
|
||||
typedef ::Foam::StaticAssertionTest \
|
||||
|
||||
@ -42,12 +42,8 @@ Description
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// external use:
|
||||
// ~~~~~~~~~~~~~
|
||||
// declare a run-time selection:
|
||||
#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 */ \
|
||||
typedef autoPtr<baseType> (*argNames##ConstructorPtr)argList; \
|
||||
@ -134,11 +130,9 @@ Description
|
||||
|
||||
|
||||
|
||||
// external use:
|
||||
// ~~~~~~~~~~~~~
|
||||
// declare a run-time selection for derived classes:
|
||||
#define declareRunTimeNewSelectionTable\
|
||||
(autoPtr,baseType,argNames,argList,parList) \
|
||||
//- Declare a run-time selection for derived classes
|
||||
#define declareRunTimeNewSelectionTable( \
|
||||
autoPtr,baseType,argNames,argList,parList) \
|
||||
\
|
||||
/* Construct from argList function pointer type */ \
|
||||
typedef autoPtr<baseType> (*argNames##ConstructorPtr)argList; \
|
||||
@ -234,10 +228,8 @@ Description
|
||||
};
|
||||
|
||||
|
||||
// internal use:
|
||||
// constructor aid
|
||||
#define defineRunTimeSelectionTableConstructor\
|
||||
(baseType,argNames) \
|
||||
// Constructor aid
|
||||
#define defineRunTimeSelectionTableConstructor(baseType,argNames) \
|
||||
\
|
||||
/* Table constructor called from the table add function */ \
|
||||
void baseType::construct##argNames##ConstructorTables() \
|
||||
@ -252,10 +244,8 @@ Description
|
||||
}
|
||||
|
||||
|
||||
// internal use:
|
||||
// destructor aid
|
||||
#define defineRunTimeSelectionTableDestructor\
|
||||
(baseType,argNames) \
|
||||
// Destructor aid
|
||||
#define defineRunTimeSelectionTableDestructor(baseType,argNames) \
|
||||
\
|
||||
/* Table destructor called from the table add function destructor */ \
|
||||
void baseType::destroy##argNames##ConstructorTables() \
|
||||
@ -268,44 +258,28 @@ Description
|
||||
}
|
||||
|
||||
|
||||
// internal use:
|
||||
// create pointer to hash-table of functions
|
||||
#define defineRunTimeSelectionTablePtr\
|
||||
(baseType,argNames) \
|
||||
// Create pointer to hash-table of functions
|
||||
#define defineRunTimeSelectionTablePtr(baseType,argNames) \
|
||||
\
|
||||
/* Define the constructor function table */ \
|
||||
baseType::argNames##ConstructorTable* \
|
||||
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
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// external use:
|
||||
// ~~~~~~~~~~~~~
|
||||
// define run-time selection table
|
||||
#define defineRunTimeSelectionTable\
|
||||
(baseType,argNames) \
|
||||
//- Define run-time selection table
|
||||
#define defineRunTimeSelectionTable(baseType,argNames) \
|
||||
\
|
||||
defineRunTimeSelectionTablePtr(baseType,argNames); \
|
||||
defineRunTimeSelectionTableConstructor(baseType,argNames); \
|
||||
defineRunTimeSelectionTableDestructor(baseType,argNames)
|
||||
|
||||
|
||||
// external use:
|
||||
// ~~~~~~~~~~~~~
|
||||
// define run-time selection table for template classes
|
||||
// use when baseType doesn't need a template argument (eg, is a typedef)
|
||||
#define defineTemplateRunTimeSelectionTable\
|
||||
(baseType,argNames) \
|
||||
//- Define run-time selection table for template classes
|
||||
// use when baseType doesn't need a template argument (eg, is a typedef)
|
||||
#define defineTemplateRunTimeSelectionTable(baseType,argNames) \
|
||||
\
|
||||
template<> \
|
||||
defineRunTimeSelectionTablePtr(baseType,argNames); \
|
||||
@ -317,12 +291,8 @@ Description
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// internal use:
|
||||
// constructor aid
|
||||
// use when baseType requires the Targ template argument
|
||||
#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 */ \
|
||||
void baseType<Targ>::construct##argNames##ConstructorTables() \
|
||||
@ -337,11 +307,8 @@ Description
|
||||
}
|
||||
|
||||
|
||||
// internal use:
|
||||
// destructor aid
|
||||
// use when baseType requires the Targ template argument
|
||||
#define defineTemplatedRunTimeSelectionTableDestructor\
|
||||
(baseType,argNames,Targ) \
|
||||
// Destructor aid: use when baseType requires the Targ template argument
|
||||
#define defineTemplatedRunTimeSelectionTableDestructor(baseType,argNames,Targ) \
|
||||
\
|
||||
/* Table destructor called from the table add function destructor */ \
|
||||
void baseType<Targ>::destroy##argNames##ConstructorTables() \
|
||||
@ -354,23 +321,18 @@ Description
|
||||
}
|
||||
|
||||
|
||||
// internal use:
|
||||
// create pointer to hash-table of functions
|
||||
// use when baseType requires the Targ template argument
|
||||
#define defineTemplatedRunTimeSelectionTablePtr\
|
||||
(baseType,argNames,Targ) \
|
||||
//- Create pointer to hash-table of functions
|
||||
// use when baseType requires the Targ template argument
|
||||
#define defineTemplatedRunTimeSelectionTablePtr(baseType,argNames,Targ) \
|
||||
\
|
||||
/* Define the constructor function table */ \
|
||||
baseType<Targ>::argNames##ConstructorTable* \
|
||||
baseType<Targ>::argNames##ConstructorTablePtr_ = NULL
|
||||
|
||||
|
||||
// external use:
|
||||
// ~~~~~~~~~~~~~
|
||||
// define run-time selection table for template classes
|
||||
// use when baseType requires the Targ template argument
|
||||
#define defineTemplatedRunTimeSelectionTable\
|
||||
(baseType,argNames,Targ) \
|
||||
//- Define run-time selection table for template classes
|
||||
// use when baseType requires the Targ template argument
|
||||
#define defineTemplatedRunTimeSelectionTable(baseType,argNames,Targ) \
|
||||
\
|
||||
template<> \
|
||||
defineTemplatedRunTimeSelectionTablePtr(baseType,argNames,Targ); \
|
||||
|
||||
@ -38,15 +38,12 @@ Description
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// external use:
|
||||
// ~~~~~~~~~~~~~
|
||||
// declare a run-time selection:
|
||||
#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 */ \
|
||||
typedef returnType (*memberFunction##argNames##MemberFunctionPtr)argList; \
|
||||
typedef returnType (*memberFunction##argNames##MemberFunctionPtr)argList; \
|
||||
\
|
||||
/* Construct from argList function table type */ \
|
||||
typedef HashTable \
|
||||
@ -89,28 +86,26 @@ Description
|
||||
static void destroy##memberFunction##argNames##MemberFunctionTables()
|
||||
|
||||
|
||||
// internal use:
|
||||
// constructor aid
|
||||
#define defineMemberFunctionSelectionTableMemberFunction\
|
||||
(baseType,memberFunction,argNames) \
|
||||
// Constructor aid
|
||||
#define defineMemberFunctionSelectionTableMemberFunction( \
|
||||
baseType,memberFunction,argNames) \
|
||||
\
|
||||
/* Table memberFunction called from the table add function */ \
|
||||
void baseType::construct##memberFunction##argNames##MemberFunctionTables()\
|
||||
void baseType::construct##memberFunction##argNames##MemberFunctionTables() \
|
||||
{ \
|
||||
static bool constructed = false; \
|
||||
if (!constructed) \
|
||||
{ \
|
||||
constructed = true; \
|
||||
baseType::memberFunction##argNames##MemberFunctionTablePtr_ \
|
||||
= new baseType::memberFunction##argNames##MemberFunctionTable;\
|
||||
= new baseType::memberFunction##argNames##MemberFunctionTable; \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
// internal use:
|
||||
// destructor aid
|
||||
#define defineMemberFunctionSelectionTableDestructor\
|
||||
(baseType,memberFunction,argNames) \
|
||||
// Destructor aid
|
||||
#define defineMemberFunctionSelectionTableDestructor( \
|
||||
baseType,memberFunction,argNames) \
|
||||
\
|
||||
/* Table destructor called from the table add function destructor */ \
|
||||
void baseType::destroy##memberFunction##argNames##MemberFunctionTables() \
|
||||
@ -123,32 +118,19 @@ Description
|
||||
}
|
||||
|
||||
|
||||
// internal use:
|
||||
// create pointer to hash-table of functions
|
||||
#define defineMemberFunctionSelectionTablePtr\
|
||||
(baseType,memberFunction,argNames) \
|
||||
// Create pointer to hash-table of functions
|
||||
#define defineMemberFunctionSelectionTablePtr(baseType,memberFunction,argNames)\
|
||||
\
|
||||
/* Define the memberFunction table */ \
|
||||
baseType::memberFunction##argNames##MemberFunctionTable* \
|
||||
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 \
|
||||
(baseType,memberFunction,argNames); \
|
||||
@ -158,12 +140,10 @@ Description
|
||||
(baseType,memberFunction,argNames)
|
||||
|
||||
|
||||
// external use:
|
||||
// ~~~~~~~~~~~~~
|
||||
// define run-time selection table for template classes
|
||||
// use when baseType doesn't need a template argument (eg, is a typedef)
|
||||
#define defineTemplateMemberFunctionSelectionTable\
|
||||
(baseType,memberFunction,argNames) \
|
||||
//- Define run-time selection table for template classes
|
||||
// use when baseType doesn't need a template argument (eg, is a typedef)
|
||||
#define defineTemplateMemberFunctionSelectionTable( \
|
||||
baseType,memberFunction,argNames) \
|
||||
\
|
||||
template<> \
|
||||
defineMemberFunctionSelectionTablePtr \
|
||||
@ -178,11 +158,9 @@ Description
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// internal use:
|
||||
// constructor aid
|
||||
// use when baseType requires the Targ template argument
|
||||
#define defineTemplatedMemberFunctionSelectionTableMemberFunction\
|
||||
(baseType,memberFunction,argNames,Targ) \
|
||||
// Constructor aid: use when baseType requires the Targ template argument
|
||||
#define defineTemplatedMemberFunctionSelectionTableMemberFunction( \
|
||||
baseType,memberFunction,argNames,Targ) \
|
||||
\
|
||||
/* Table memberFunction called from the table add function */ \
|
||||
void baseType<Targ>::construct##memberFunction##argNames## \
|
||||
@ -192,18 +170,17 @@ Description
|
||||
if (!constructed) \
|
||||
{ \
|
||||
constructed = true; \
|
||||
baseType<Targ>::memberFunction##argNames##MemberFunctionTablePtr_ \
|
||||
baseType<Targ>::memberFunction##argNames##MemberFunctionTablePtr_ \
|
||||
= new baseType<Targ>::memberFunction##argNames## \
|
||||
MemberFunctionTable; \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
// internal use:
|
||||
// destructor aid
|
||||
// Destructor aid
|
||||
// use when baseType requires the Targ template argument
|
||||
#define defineTemplatedMemberFunctionSelectionTableDestructor\
|
||||
(baseType,memberFunction,argNames,Targ) \
|
||||
#define defineTemplatedMemberFunctionSelectionTableDestructor( \
|
||||
baseType,memberFunction,argNames,Targ) \
|
||||
\
|
||||
/* Table destructor called from the table add function destructor */ \
|
||||
void baseType<Targ>::destroy##memberFunction##argNames## \
|
||||
@ -211,7 +188,7 @@ Description
|
||||
{ \
|
||||
if \
|
||||
( \
|
||||
baseType<Targ>::memberFunction##argNames##MemberFunctionTablePtr_ \
|
||||
baseType<Targ>::memberFunction##argNames##MemberFunctionTablePtr_ \
|
||||
) \
|
||||
{ \
|
||||
delete baseType<Targ>::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
|
||||
#define defineTemplatedMemberFunctionSelectionTablePtr\
|
||||
(baseType,memberFunction,argNames,Targ) \
|
||||
#define defineTemplatedMemberFunctionSelectionTablePtr( \
|
||||
baseType,memberFunction,argNames,Targ) \
|
||||
\
|
||||
/* Define the memberFunction table */ \
|
||||
baseType<Targ>::memberFunction##argNames##MemberFunctionTable* \
|
||||
baseType<Targ>::memberFunction##argNames##MemberFunctionTablePtr_ = NULL
|
||||
|
||||
|
||||
// external use:
|
||||
// ~~~~~~~~~~~~~
|
||||
// define run-time selection table for template classes
|
||||
// use when baseType requires the Targ template argument
|
||||
#define defineTemplatedMemberFunctionSelectionTable\
|
||||
(baseType,memberFunction,argNames,Targ) \
|
||||
//- Define run-time selection table for template classes
|
||||
// use when baseType requires the Targ template argument
|
||||
#define defineTemplatedMemberFunctionSelectionTable( \
|
||||
baseType,memberFunction,argNames,Targ) \
|
||||
\
|
||||
template<> \
|
||||
defineTemplatedMemberFunctionSelectionTablePtr \
|
||||
|
||||
@ -32,10 +32,7 @@ Description
|
||||
#include "defineDebugSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// declarations (without debug information)
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Declarations (without debug information)
|
||||
|
||||
//- Add typeName information from argument \a TypeNameString to a class.
|
||||
// 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.
|
||||
// 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 defineTypeNameWithName(Type, Name) \
|
||||
@ -117,9 +112,8 @@ public: \
|
||||
defineTemplateTypeNameWithName(Type, Type::typeName_())
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// definitions (with debug information)
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Definitions (with debug information)
|
||||
|
||||
//- Define the typeName and debug information
|
||||
#define defineTypeNameAndDebug(Type, DebugSwitch) \
|
||||
@ -141,7 +135,9 @@ public: \
|
||||
defineNamedTemplateTypeName(Type); \
|
||||
defineNamedTemplateDebugSwitch(Type, DebugSwitch)
|
||||
|
||||
// for templated sub-classes
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// For templated sub-classes
|
||||
|
||||
//- Define the typeName and debug information, lookup as \a Name
|
||||
#define defineTemplate2TypeNameAndDebugWithName(Type, Name, DebugSwitch) \
|
||||
|
||||
@ -300,9 +300,6 @@ dimensioned<Type> operator/
|
||||
);
|
||||
|
||||
|
||||
// Products
|
||||
// ~~~~~~~~
|
||||
|
||||
#define PRODUCT_OPERATOR(product, op, opFunc) \
|
||||
\
|
||||
template<class Type1, class Type2> \
|
||||
|
||||
@ -35,10 +35,6 @@ Description
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// definitions (debug information only)
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
@ -74,6 +70,8 @@ public:
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#define registerTemplateDebugSwitchWithName(Type,Name) \
|
||||
template<> \
|
||||
const Foam::RegisterDebugSwitch<Type> \
|
||||
@ -119,6 +117,7 @@ public:
|
||||
template<> \
|
||||
defineDebugSwitchWithName(Type, Name, DebugSwitch); \
|
||||
registerTemplateDebugSwitchWithName(Type, Name)
|
||||
|
||||
//- Define the debug information for templates sub-classes, lookup as \a Name
|
||||
#define defineTemplate2DebugSwitchWithName(Type, Name, DebugSwitch) \
|
||||
template<> \
|
||||
@ -135,8 +134,6 @@ public:
|
||||
defineTemplateDebugSwitchWithName(Type, Type::typeName_(), DebugSwitch)
|
||||
|
||||
|
||||
// For templated sub-classes
|
||||
|
||||
//- Define the debug information for templates
|
||||
// Useful with typedefs
|
||||
#define defineTemplate2DebugSwitch(Type, DebugSwitch) \
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
//
|
||||
// addDictOption.H
|
||||
// ~~~~~~~~~~~~~~~~~
|
||||
|
||||
Foam::argList::addOption
|
||||
(
|
||||
"dict",
|
||||
"file",
|
||||
"read control dictionary from specified location"
|
||||
);
|
||||
Foam::argList::addOption
|
||||
(
|
||||
"dict",
|
||||
"file",
|
||||
"read control dictionary from specified location"
|
||||
);
|
||||
|
||||
@ -1,10 +1,5 @@
|
||||
//
|
||||
// addOverwriteOption.H
|
||||
// ~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Foam::argList::addBoolOption
|
||||
(
|
||||
"overwrite",
|
||||
"overwrite existing mesh/results files"
|
||||
);
|
||||
|
||||
Foam::argList::addBoolOption
|
||||
(
|
||||
"overwrite",
|
||||
"overwrite existing mesh/results files"
|
||||
);
|
||||
|
||||
@ -1,11 +1,6 @@
|
||||
//
|
||||
// addRegionOption.H
|
||||
// ~~~~~~~~~~~~~~~~~
|
||||
|
||||
Foam::argList::addOption
|
||||
(
|
||||
"region",
|
||||
"name",
|
||||
"specify alternative mesh region"
|
||||
);
|
||||
|
||||
Foam::argList::addOption
|
||||
(
|
||||
"region",
|
||||
"name",
|
||||
"specify alternative mesh region"
|
||||
);
|
||||
|
||||
@ -1,29 +1,24 @@
|
||||
//
|
||||
// addTimeOptions.H
|
||||
// ~~~~~~~~~~~~~~~~
|
||||
Foam::argList::addBoolOption
|
||||
(
|
||||
"constant",
|
||||
"include the 'constant/' dir in the times list"
|
||||
);
|
||||
|
||||
Foam::argList::addBoolOption
|
||||
(
|
||||
"constant",
|
||||
"include the 'constant/' dir in the times list"
|
||||
);
|
||||
Foam::argList::addBoolOption
|
||||
(
|
||||
"latestTime",
|
||||
"select the latest time"
|
||||
);
|
||||
|
||||
Foam::argList::addBoolOption
|
||||
(
|
||||
"latestTime",
|
||||
"select the latest time"
|
||||
);
|
||||
|
||||
Foam::argList::addBoolOption
|
||||
(
|
||||
"noZero",
|
||||
"exclude the '0/' dir from the times list"
|
||||
);
|
||||
|
||||
Foam::argList::addOption
|
||||
(
|
||||
"time",
|
||||
"time",
|
||||
"specify a single time value to select"
|
||||
);
|
||||
Foam::argList::addBoolOption
|
||||
(
|
||||
"noZero",
|
||||
"exclude the '0/' dir from the times list"
|
||||
);
|
||||
|
||||
Foam::argList::addOption
|
||||
(
|
||||
"time",
|
||||
"time",
|
||||
"specify a single time value to select"
|
||||
);
|
||||
|
||||
@ -1,14 +1,11 @@
|
||||
//
|
||||
// checkConstantOption.H
|
||||
// ~~~~~~~~~~~~~~~~~~~~~
|
||||
// unless -constant is present, skip startTime if it is "constant"
|
||||
// Unless -constant is present, skip startTime if it is "constant"
|
||||
|
||||
if
|
||||
(
|
||||
!args.optionFound("constant")
|
||||
&& (startTime < Times.size()-1)
|
||||
&& (Times[startTime].name() == "constant")
|
||||
)
|
||||
{
|
||||
startTime++;
|
||||
}
|
||||
if
|
||||
(
|
||||
!args.optionFound("constant")
|
||||
&& (startTime < Times.size()-1)
|
||||
&& (Times[startTime].name() == "constant")
|
||||
)
|
||||
{
|
||||
startTime++;
|
||||
}
|
||||
|
||||
@ -1,6 +1,3 @@
|
||||
//
|
||||
// checkTimeOption.H
|
||||
// ~~~~~~~~~~~~~~~~~
|
||||
// Check -time and -latestTime options
|
||||
|
||||
if (args.optionFound("time"))
|
||||
|
||||
@ -1,7 +1,3 @@
|
||||
//
|
||||
// checkTimeOptions.H
|
||||
// ~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Foam::label startTime = 0;
|
||||
|
||||
// Unless -constant is present, skip startTime if it is "constant"
|
||||
|
||||
@ -1,7 +1,3 @@
|
||||
//
|
||||
// checkTimeOptionsNoConstant.H
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Foam::label startTime = 0;
|
||||
|
||||
// Check -time and -latestTime options
|
||||
|
||||
@ -1,18 +1,14 @@
|
||||
//
|
||||
// createMesh.H
|
||||
// ~~~~~~~~~~~~
|
||||
Foam::Info
|
||||
<< "Create mesh for time = "
|
||||
<< runTime.timeName() << Foam::nl << Foam::endl;
|
||||
|
||||
Foam::Info
|
||||
<< "Create mesh for time = "
|
||||
<< runTime.timeName() << Foam::nl << Foam::endl;
|
||||
|
||||
Foam::fvMesh mesh
|
||||
Foam::fvMesh mesh
|
||||
(
|
||||
Foam::IOobject
|
||||
(
|
||||
Foam::IOobject
|
||||
(
|
||||
Foam::fvMesh::defaultRegion,
|
||||
runTime.timeName(),
|
||||
runTime,
|
||||
Foam::IOobject::MUST_READ
|
||||
)
|
||||
);
|
||||
Foam::fvMesh::defaultRegion,
|
||||
runTime.timeName(),
|
||||
runTime,
|
||||
Foam::IOobject::MUST_READ
|
||||
)
|
||||
);
|
||||
|
||||
@ -1,19 +1,16 @@
|
||||
//
|
||||
// createMeshNoClear.H
|
||||
// ~~~~~~~~~~~~~~~~~~~
|
||||
// currently identical to createMesh.H
|
||||
// Currently identical to createMesh.H
|
||||
|
||||
Foam::Info
|
||||
<< "Create mesh, no clear-out for time = "
|
||||
<< runTime.timeName() << Foam::nl << Foam::endl;
|
||||
Foam::Info
|
||||
<< "Create mesh, no clear-out for time = "
|
||||
<< runTime.timeName() << Foam::nl << Foam::endl;
|
||||
|
||||
Foam::fvMesh mesh
|
||||
Foam::fvMesh mesh
|
||||
(
|
||||
Foam::IOobject
|
||||
(
|
||||
Foam::IOobject
|
||||
(
|
||||
Foam::fvMesh::defaultRegion,
|
||||
runTime.timeName(),
|
||||
runTime,
|
||||
Foam::IOobject::MUST_READ
|
||||
)
|
||||
);
|
||||
Foam::fvMesh::defaultRegion,
|
||||
runTime.timeName(),
|
||||
runTime,
|
||||
Foam::IOobject::MUST_READ
|
||||
)
|
||||
);
|
||||
|
||||
@ -1,30 +1,26 @@
|
||||
//
|
||||
// createNamedMesh.H
|
||||
// ~~~~~~~~~~~~~~~~~
|
||||
Foam::word regionName;
|
||||
|
||||
Foam::word regionName;
|
||||
if (args.optionReadIfPresent("region", regionName))
|
||||
{
|
||||
Foam::Info
|
||||
<< "Create mesh " << regionName << " for time = "
|
||||
<< runTime.timeName() << Foam::nl << Foam::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
regionName = Foam::fvMesh::defaultRegion;
|
||||
Foam::Info
|
||||
<< "Create mesh for time = "
|
||||
<< runTime.timeName() << Foam::nl << Foam::endl;
|
||||
}
|
||||
|
||||
if (args.optionReadIfPresent("region", regionName))
|
||||
{
|
||||
Foam::Info
|
||||
<< "Create mesh " << regionName << " for time = "
|
||||
<< runTime.timeName() << Foam::nl << Foam::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
regionName = Foam::fvMesh::defaultRegion;
|
||||
Foam::Info
|
||||
<< "Create mesh for time = "
|
||||
<< runTime.timeName() << Foam::nl << Foam::endl;
|
||||
}
|
||||
|
||||
Foam::fvMesh mesh
|
||||
Foam::fvMesh mesh
|
||||
(
|
||||
Foam::IOobject
|
||||
(
|
||||
Foam::IOobject
|
||||
(
|
||||
regionName,
|
||||
runTime.timeName(),
|
||||
runTime,
|
||||
Foam::IOobject::MUST_READ
|
||||
)
|
||||
);
|
||||
regionName,
|
||||
runTime.timeName(),
|
||||
runTime,
|
||||
Foam::IOobject::MUST_READ
|
||||
)
|
||||
);
|
||||
|
||||
@ -1,30 +1,26 @@
|
||||
//
|
||||
// createNamedPolyMesh.H
|
||||
// ~~~~~~~~~~~~~~~~~~~~~
|
||||
Foam::word regionName;
|
||||
|
||||
Foam::word regionName;
|
||||
if (args.optionReadIfPresent("region", regionName))
|
||||
{
|
||||
Foam::Info
|
||||
<< "Create polyMesh " << regionName << " for time = "
|
||||
<< runTime.timeName() << Foam::nl << Foam::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
regionName = Foam::polyMesh::defaultRegion;
|
||||
Foam::Info
|
||||
<< "Create polyMesh for time = "
|
||||
<< runTime.timeName() << Foam::nl << Foam::endl;
|
||||
}
|
||||
|
||||
if (args.optionReadIfPresent("region", regionName))
|
||||
{
|
||||
Foam::Info
|
||||
<< "Create polyMesh " << regionName << " for time = "
|
||||
<< runTime.timeName() << Foam::nl << Foam::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
regionName = Foam::polyMesh::defaultRegion;
|
||||
Foam::Info
|
||||
<< "Create polyMesh for time = "
|
||||
<< runTime.timeName() << Foam::nl << Foam::endl;
|
||||
}
|
||||
|
||||
Foam::polyMesh mesh
|
||||
Foam::polyMesh mesh
|
||||
(
|
||||
Foam::IOobject
|
||||
(
|
||||
Foam::IOobject
|
||||
(
|
||||
regionName,
|
||||
runTime.timeName(),
|
||||
runTime,
|
||||
Foam::IOobject::MUST_READ
|
||||
)
|
||||
);
|
||||
regionName,
|
||||
runTime.timeName(),
|
||||
runTime,
|
||||
Foam::IOobject::MUST_READ
|
||||
)
|
||||
);
|
||||
|
||||
@ -1,18 +1,14 @@
|
||||
//
|
||||
// createPolyMesh.H
|
||||
// ~~~~~~~~~~~~~~~~
|
||||
Foam::Info
|
||||
<< "Create polyMesh for time = "
|
||||
<< runTime.timeName() << Foam::nl << Foam::endl;
|
||||
|
||||
Foam::Info
|
||||
<< "Create polyMesh for time = "
|
||||
<< runTime.timeName() << Foam::nl << Foam::endl;
|
||||
|
||||
Foam::polyMesh mesh
|
||||
Foam::polyMesh mesh
|
||||
(
|
||||
Foam::IOobject
|
||||
(
|
||||
Foam::IOobject
|
||||
(
|
||||
Foam::polyMesh::defaultRegion,
|
||||
runTime.timeName(),
|
||||
runTime,
|
||||
Foam::IOobject::MUST_READ
|
||||
)
|
||||
);
|
||||
Foam::polyMesh::defaultRegion,
|
||||
runTime.timeName(),
|
||||
runTime,
|
||||
Foam::IOobject::MUST_READ
|
||||
)
|
||||
);
|
||||
|
||||
@ -1,7 +1,3 @@
|
||||
//
|
||||
// createTime.H
|
||||
// ~~~~~~~~~~~~
|
||||
Foam::Info<< "Create time\n" << Foam::endl;
|
||||
|
||||
Foam::Info<< "Create time\n" << Foam::endl;
|
||||
|
||||
Foam::Time runTime(Foam::Time::controlDictName, args);
|
||||
Foam::Time runTime(Foam::Time::controlDictName, args);
|
||||
|
||||
@ -1,33 +1,29 @@
|
||||
//
|
||||
// setConstantMeshDictionaryIO.H
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
fileName dictPath = "";
|
||||
if (args.optionFound("dict"))
|
||||
fileName dictPath = "";
|
||||
if (args.optionFound("dict"))
|
||||
{
|
||||
dictPath = args["dict"];
|
||||
if (isDir(dictPath))
|
||||
{
|
||||
dictPath = args["dict"];
|
||||
if (isDir(dictPath))
|
||||
{
|
||||
dictPath = dictPath / dictName;
|
||||
}
|
||||
dictPath = dictPath / dictName;
|
||||
}
|
||||
}
|
||||
|
||||
IOobject dictIO
|
||||
IOobject dictIO
|
||||
(
|
||||
dictName,
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
);
|
||||
|
||||
if (dictPath.size())
|
||||
{
|
||||
dictIO = IOobject
|
||||
(
|
||||
dictName,
|
||||
runTime.constant(),
|
||||
dictPath,
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
);
|
||||
|
||||
if (dictPath.size())
|
||||
{
|
||||
dictIO = IOobject
|
||||
(
|
||||
dictPath,
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,9 +1,5 @@
|
||||
//
|
||||
// setRootCase.H
|
||||
// ~~~~~~~~~~~~~
|
||||
|
||||
Foam::argList args(argc, argv);
|
||||
if (!args.checkRootCase())
|
||||
{
|
||||
Foam::FatalError.exit();
|
||||
}
|
||||
Foam::argList args(argc, argv);
|
||||
if (!args.checkRootCase())
|
||||
{
|
||||
Foam::FatalError.exit();
|
||||
}
|
||||
|
||||
@ -1,33 +1,29 @@
|
||||
//
|
||||
// setSystemMeshDictionaryIO.H
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
fileName dictPath = "";
|
||||
if (args.optionFound("dict"))
|
||||
fileName dictPath = "";
|
||||
if (args.optionFound("dict"))
|
||||
{
|
||||
dictPath = args["dict"];
|
||||
if (isDir(dictPath))
|
||||
{
|
||||
dictPath = args["dict"];
|
||||
if (isDir(dictPath))
|
||||
{
|
||||
dictPath = dictPath / dictName;
|
||||
}
|
||||
dictPath = dictPath / dictName;
|
||||
}
|
||||
}
|
||||
|
||||
IOobject dictIO
|
||||
IOobject dictIO
|
||||
(
|
||||
dictName,
|
||||
runTime.system(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
);
|
||||
|
||||
if (dictPath.size())
|
||||
{
|
||||
dictIO = IOobject
|
||||
(
|
||||
dictName,
|
||||
runTime.system(),
|
||||
dictPath,
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
);
|
||||
|
||||
if (dictPath.size())
|
||||
{
|
||||
dictIO = IOobject
|
||||
(
|
||||
dictPath,
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,33 +1,29 @@
|
||||
//
|
||||
// setSystemRunTimeDictionaryIO.H
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
fileName dictPath = "";
|
||||
if (args.optionFound("dict"))
|
||||
fileName dictPath = "";
|
||||
if (args.optionFound("dict"))
|
||||
{
|
||||
dictPath = args["dict"];
|
||||
if (isDir(dictPath))
|
||||
{
|
||||
dictPath = args["dict"];
|
||||
if (isDir(dictPath))
|
||||
{
|
||||
dictPath = dictPath / dictName;
|
||||
}
|
||||
dictPath = dictPath / dictName;
|
||||
}
|
||||
}
|
||||
|
||||
IOobject dictIO
|
||||
IOobject dictIO
|
||||
(
|
||||
dictName,
|
||||
runTime.system(),
|
||||
runTime,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
);
|
||||
|
||||
if (dictPath.size())
|
||||
{
|
||||
dictIO = IOobject
|
||||
(
|
||||
dictName,
|
||||
runTime.system(),
|
||||
dictPath,
|
||||
runTime,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
);
|
||||
|
||||
if (dictPath.size())
|
||||
{
|
||||
dictIO = IOobject
|
||||
(
|
||||
dictPath,
|
||||
runTime,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5118,13 +5118,6 @@ const Foam::cellShapeList& Foam::hexRef8::cellShapes() const
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Unrefinement
|
||||
// ~~~~~~~~~~~~
|
||||
//
|
||||
|
||||
|
||||
Foam::labelList Foam::hexRef8::getSplitPoints() const
|
||||
{
|
||||
if (debug)
|
||||
|
||||
@ -87,20 +87,6 @@ class autoSnapDriver
|
||||
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
|
||||
void checkCoupledFaceZones() const;
|
||||
|
||||
@ -155,13 +141,7 @@ class autoSnapDriver
|
||||
const List<pointConstraint>& constraints,
|
||||
vectorField& disp
|
||||
) const;
|
||||
//void smoothAndConstrain2
|
||||
//(
|
||||
// const bool applyConstraints,
|
||||
// const indirectPrimitivePatch& pp,
|
||||
// const List<pointConstraint>& constraints,
|
||||
// vectorField& disp
|
||||
//) const;
|
||||
|
||||
void calcNearest
|
||||
(
|
||||
const label iter,
|
||||
@ -170,6 +150,7 @@ class autoSnapDriver
|
||||
vectorField& pointSurfaceNormal,
|
||||
vectorField& pointRotation
|
||||
) const;
|
||||
|
||||
void calcNearestFace
|
||||
(
|
||||
const label iter,
|
||||
@ -180,6 +161,12 @@ class autoSnapDriver
|
||||
labelList& faceSurfaceRegion,
|
||||
vectorField& faceRotation
|
||||
) const;
|
||||
|
||||
//- Collect (possibly remote) per point data of all surrounding
|
||||
// faces
|
||||
// - faceSurfaceNormal
|
||||
// - faceDisp
|
||||
// - faceCentres&faceNormal
|
||||
void calcNearestFacePointProperties
|
||||
(
|
||||
const label iter,
|
||||
@ -194,6 +181,11 @@ class autoSnapDriver
|
||||
List<List<point>>& pointFaceCentres,
|
||||
List<labelList>& pointFacePatchID
|
||||
) 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
|
||||
(
|
||||
const DynamicList<point>& surfacePoints,
|
||||
@ -274,6 +266,12 @@ class autoSnapDriver
|
||||
|
||||
//- Return hit if faces-on-the-same-normalplane are on multiple
|
||||
// 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
|
||||
(
|
||||
const point& pt,
|
||||
@ -381,6 +379,7 @@ class autoSnapDriver
|
||||
vectorField& patchAttraction,
|
||||
List<pointConstraint>& patchConstraints
|
||||
) const;
|
||||
|
||||
void reverseAttractMeshPoints
|
||||
(
|
||||
const label iter,
|
||||
@ -465,6 +464,7 @@ class autoSnapDriver
|
||||
vectorField& patchAttraction,
|
||||
List<pointConstraint>& patchConstraints
|
||||
) const;
|
||||
|
||||
void preventFaceSqueeze
|
||||
(
|
||||
const label iter,
|
||||
@ -582,16 +582,6 @@ public:
|
||||
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.
|
||||
void smoothDisplacement
|
||||
(
|
||||
@ -626,7 +616,6 @@ public:
|
||||
const scalar planarAngle,
|
||||
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
|
||||
(
|
||||
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
|
||||
(
|
||||
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
|
||||
(
|
||||
const point& pt,
|
||||
@ -1009,7 +995,6 @@ void Foam::autoSnapDriver::featureAttractionUsingReconstruction
|
||||
}
|
||||
|
||||
|
||||
// Special version that calculates attraction in one go
|
||||
void Foam::autoSnapDriver::featureAttractionUsingReconstruction
|
||||
(
|
||||
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
|
||||
(
|
||||
const indirectPrimitivePatch& pp,
|
||||
@ -1447,6 +1431,7 @@ Foam::labelPair Foam::autoSnapDriver::findDiagonalAttraction
|
||||
) const
|
||||
{
|
||||
const face& f = pp.localFaces()[faceI];
|
||||
|
||||
// For now just detect any attraction. Improve this to look at
|
||||
// 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
|
||||
(
|
||||
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
|
||||
(
|
||||
const label iter,
|
||||
@ -2214,6 +2186,16 @@ void Foam::autoSnapDriver::determineBaffleFeatures
|
||||
List<pointConstraint>& patchConstraints
|
||||
) 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 refinementFeatures& features = meshRefiner_.features();
|
||||
|
||||
@ -2966,7 +2948,6 @@ void Foam::autoSnapDriver::featureAttractionUsingFeatureEdges
|
||||
}
|
||||
|
||||
|
||||
// Correct for squeezing of face
|
||||
void Foam::autoSnapDriver::preventFaceSqueeze
|
||||
(
|
||||
const label iter,
|
||||
|
||||
Reference in New Issue
Block a user