mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' into molecularDynamics
This commit is contained in:
@ -1164,7 +1164,12 @@ Foam::labelList Foam::meshRefinement::refineCandidates
|
||||
// Refinement based on curvature of surface
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
if (curvatureRefinement && (curvature >= -1 && curvature <= 1))
|
||||
if
|
||||
(
|
||||
curvatureRefinement
|
||||
&& (curvature >= -1 && curvature <= 1)
|
||||
&& (surfaces_.minLevel() != surfaces_.maxLevel())
|
||||
)
|
||||
{
|
||||
label nCurv = markSurfaceCurvatureRefinement
|
||||
(
|
||||
|
||||
@ -436,7 +436,13 @@ void Foam::searchableBox::findLineAll
|
||||
// Work array
|
||||
DynamicList<pointIndexHit, 1, 1> hits;
|
||||
|
||||
// Tolerances
|
||||
//XXX
|
||||
// Tolerances:
|
||||
// To find all intersections we add a small vector to the last intersection
|
||||
// This is chosen such that
|
||||
// - it is significant (SMALL is smallest representative relative tolerance;
|
||||
// we need something bigger since we're doing calculations)
|
||||
// - if the start-end vector is zero we still progress
|
||||
const vectorField dirVec(end-start);
|
||||
const scalarField magSqrDirVec(magSqr(dirVec));
|
||||
const vectorField smallVec
|
||||
@ -447,34 +453,44 @@ void Foam::searchableBox::findLineAll
|
||||
|
||||
forAll(start, pointI)
|
||||
{
|
||||
hits.clear();
|
||||
// See if any intersection between pt and end
|
||||
pointIndexHit inter = findLine(start[pointI], end[pointI]);
|
||||
|
||||
// Current starting point of ray.
|
||||
point pt = start[pointI];
|
||||
|
||||
while (true)
|
||||
if (inter.hit())
|
||||
{
|
||||
// See if any intersection between pt and end
|
||||
pointIndexHit inter = findLine(pt, end[pointI]);
|
||||
|
||||
if (!inter.hit())
|
||||
{
|
||||
break;
|
||||
}
|
||||
hits.clear();
|
||||
hits.append(inter);
|
||||
|
||||
pt = inter.hitPoint() + smallVec[pointI];
|
||||
point pt = inter.hitPoint() + smallVec[pointI];
|
||||
|
||||
if (((pt-start[pointI])&dirVec[pointI]) > magSqrDirVec[pointI])
|
||||
while (((pt-start[pointI])&dirVec[pointI]) <= magSqrDirVec[pointI])
|
||||
{
|
||||
// Adding smallVec has taken us beyond end
|
||||
break;
|
||||
}
|
||||
}
|
||||
// See if any intersection between pt and end
|
||||
pointIndexHit inter = findLine(pt, end[pointI]);
|
||||
|
||||
hits.shrink();
|
||||
info[pointI].transfer(hits);
|
||||
hits.clear();
|
||||
// Check for not hit or hit same face as before (can happen
|
||||
// if vector along surface of face)
|
||||
if
|
||||
(
|
||||
!inter.hit()
|
||||
|| (inter.index() == hits[hits.size()-1].index())
|
||||
)
|
||||
{
|
||||
break;
|
||||
}
|
||||
hits.append(inter);
|
||||
|
||||
pt = inter.hitPoint() + smallVec[pointI];
|
||||
}
|
||||
|
||||
hits.shrink();
|
||||
info[pointI].transfer(hits);
|
||||
hits.clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
info[pointI].clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -443,7 +443,12 @@ void Foam::triSurfaceMesh::findLineAll
|
||||
// Work array
|
||||
DynamicList<pointIndexHit, 1, 1> hits;
|
||||
|
||||
// Tolerances
|
||||
// Tolerances:
|
||||
// To find all intersections we add a small vector to the last intersection
|
||||
// This is chosen such that
|
||||
// - it is significant (SMALL is smallest representative relative tolerance;
|
||||
// we need something bigger since we're doing calculations)
|
||||
// - if the start-end vector is zero we still progress
|
||||
const vectorField dirVec(end-start);
|
||||
const scalarField magSqrDirVec(magSqr(dirVec));
|
||||
const vectorField smallVec
|
||||
@ -454,34 +459,44 @@ void Foam::triSurfaceMesh::findLineAll
|
||||
|
||||
forAll(start, pointI)
|
||||
{
|
||||
hits.clear();
|
||||
// See if any intersection between pt and end
|
||||
pointIndexHit inter = octree.findLine(start[pointI], end[pointI]);
|
||||
|
||||
// Current starting point of ray.
|
||||
point pt = start[pointI];
|
||||
|
||||
while (true)
|
||||
if (inter.hit())
|
||||
{
|
||||
// See if any intersection between pt and end
|
||||
pointIndexHit inter = octree.findLine(pt, end[pointI]);
|
||||
|
||||
if (!inter.hit())
|
||||
{
|
||||
break;
|
||||
}
|
||||
hits.clear();
|
||||
hits.append(inter);
|
||||
|
||||
pt = inter.hitPoint() + smallVec[pointI];
|
||||
point pt = inter.hitPoint() + smallVec[pointI];
|
||||
|
||||
if (((pt-start[pointI])&dirVec[pointI]) > magSqrDirVec[pointI])
|
||||
while (((pt-start[pointI])&dirVec[pointI]) <= magSqrDirVec[pointI])
|
||||
{
|
||||
// Adding smallVec has taken us beyond end
|
||||
break;
|
||||
}
|
||||
}
|
||||
// See if any intersection between pt and end
|
||||
pointIndexHit inter = octree.findLine(pt, end[pointI]);
|
||||
|
||||
hits.shrink();
|
||||
info[pointI].transfer(hits);
|
||||
hits.clear();
|
||||
// Check for not hit or hit same triangle as before (can happen
|
||||
// if vector along surface of triangle)
|
||||
if
|
||||
(
|
||||
!inter.hit()
|
||||
|| (inter.index() == hits[hits.size()-1].index())
|
||||
)
|
||||
{
|
||||
break;
|
||||
}
|
||||
hits.append(inter);
|
||||
|
||||
pt = inter.hitPoint() + smallVec[pointI];
|
||||
}
|
||||
|
||||
hits.shrink();
|
||||
info[pointI].transfer(hits);
|
||||
hits.clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
info[pointI].clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -214,8 +214,8 @@ LRR::LRR
|
||||
FatalErrorIn
|
||||
(
|
||||
"LRR::LRR"
|
||||
"(const volVectorField& U, const surfaceScalarField& phi,"
|
||||
"incompressibleTransportModel& lamTransportModel)"
|
||||
"( const volScalarField&, const volVectorField&"
|
||||
", const surfaceScalarField&, incompressibleTransportModel&)"
|
||||
) << "couplingFactor = " << couplingFactor_
|
||||
<< " is not in range 0 - 1" << nl
|
||||
<< exit(FatalError);
|
||||
|
||||
@ -236,8 +236,8 @@ LaunderGibsonRSTM::LaunderGibsonRSTM
|
||||
FatalErrorIn
|
||||
(
|
||||
"LaunderGibsonRSTM::LaunderGibsonRSTM"
|
||||
"(const volVectorField& U, const surfaceScalarField& phi,"
|
||||
"incompressibleTransportModel& lamTransportModel)"
|
||||
"(const volScalarField&, const volVectorField&"
|
||||
", const surfaceScalarField&, basicThermo&)"
|
||||
) << "couplingFactor = " << couplingFactor_
|
||||
<< " is not in range 0 - 1" << nl
|
||||
<< exit(FatalError);
|
||||
|
||||
@ -74,8 +74,8 @@ autoPtr<RASModel> RASModel::New
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"RASModel::New(const volScalarField& rho, "
|
||||
"const volVectorField& U, const surfaceScalarField& phi, "
|
||||
"RASModel::New(const volScalarField&, "
|
||||
"const volVectorField&, const surfaceScalarField&, "
|
||||
"basicThermo&)"
|
||||
) << "Unknown RASModel type " << RASModelTypeName
|
||||
<< endl << endl
|
||||
|
||||
@ -35,6 +35,8 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressible
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -144,6 +146,7 @@ makePatchTypeField
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace compressible
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -23,7 +23,8 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::turbulentMixingLengthDissipationRateInletFvPatchScalarField
|
||||
Foam::compressible::
|
||||
turbulentMixingLengthDissipationRateInletFvPatchScalarField
|
||||
|
||||
Description
|
||||
Calculate epsilon via the mixing length [m]
|
||||
@ -43,8 +44,8 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef turbulentMixingLengthDissipationRateInletFvPatchScalarField_H
|
||||
#define turbulentMixingLengthDissipationRateInletFvPatchScalarField_H
|
||||
#ifndef compressibleturbulentMixingLengthDissipationRateInletFvPatchField_H
|
||||
#define compressibleturbulentMixingLengthDissipationRateInletFvPatchField_H
|
||||
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
|
||||
@ -52,6 +53,8 @@ SourceFiles
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressible
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class turbulentMixingLengthDissipationRateInletFvPatch Declaration
|
||||
@ -154,6 +157,7 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace compressible
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -35,6 +35,8 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressible
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -150,6 +152,7 @@ makePatchTypeField
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace compressible
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -23,7 +23,7 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::turbulentMixingLengthFrequencyInletFvPatchScalarField
|
||||
Foam::compressible::turbulentMixingLengthFrequencyInletFvPatchScalarField
|
||||
|
||||
Description
|
||||
Calculate omega via the mixing length
|
||||
@ -44,8 +44,8 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef turbulentMixingLengthFrequencyInletFvPatchScalarField_H
|
||||
#define turbulentMixingLengthFrequencyInletFvPatchScalarField_H
|
||||
#ifndef compressibleturbulentMixingLengthFrequencyInletFvPatchScalarField_H
|
||||
#define compressibleturbulentMixingLengthFrequencyInletFvPatchScalarField_H
|
||||
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
|
||||
@ -53,6 +53,8 @@ SourceFiles
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressible
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class turbulentMixingLengthFrequencyInletFvPatchScalarField Declaration
|
||||
@ -159,6 +161,7 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace compressible
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -35,6 +35,8 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace incompressible
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -144,6 +146,7 @@ makePatchTypeField
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace incompressible
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -23,7 +23,8 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::turbulentMixingLengthDissipationRateInletFvPatchScalarField
|
||||
Foam::incompressible::
|
||||
turbulentMixingLengthDissipationRateInletFvPatchScalarField
|
||||
|
||||
Description
|
||||
Calculate epsilon via the mixing length [m]
|
||||
@ -43,8 +44,8 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef turbulentMixingLengthDissipationRateInletFvPatchScalarField_H
|
||||
#define turbulentMixingLengthDissipationRateInletFvPatchScalarField_H
|
||||
#ifndef incompressibleturbulentMixingLengthDissipationRateInlet_H
|
||||
#define incompressibleturbulentMixingLengthDissipationRateInlet_H
|
||||
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
|
||||
@ -52,6 +53,8 @@ SourceFiles
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace incompressible
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class turbulentMixingLengthDissipationRateInletFvPatch Declaration
|
||||
@ -154,6 +157,7 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace incompressible
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -35,6 +35,8 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace incompressible
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -150,6 +152,7 @@ makePatchTypeField
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace incompressible
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -23,7 +23,7 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::turbulentMixingLengthFrequencyInletFvPatchScalarField
|
||||
Foam::incompressible::turbulentMixingLengthFrequencyInletFvPatchScalarField
|
||||
|
||||
Description
|
||||
Calculate omega via the mixing length
|
||||
@ -44,8 +44,8 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef turbulentMixingLengthFrequencyInletFvPatchScalarField_H
|
||||
#define turbulentMixingLengthFrequencyInletFvPatchScalarField_H
|
||||
#ifndef incompressibleturbulentMixingLengthFrequencyInletFvPatchScalarField_H
|
||||
#define incompressibleturbulentMixingLengthFrequencyInletFvPatchScalarField_H
|
||||
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
|
||||
@ -53,6 +53,8 @@ SourceFiles
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace incompressible
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class turbulentMixingLengthFrequencyInletFvPatchScalarField Declaration
|
||||
@ -159,6 +161,7 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace incompressible
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Reference in New Issue
Block a user