mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -734,7 +734,8 @@ private:
|
|||||||
//- edge conformation location
|
//- edge conformation location
|
||||||
bool nearFeatureEdgeLocation
|
bool nearFeatureEdgeLocation
|
||||||
(
|
(
|
||||||
pointIndexHit& pHit
|
const pointIndexHit& pHit,
|
||||||
|
pointIndexHit& nearestEdgeHit
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Build or rebuild the edge location tree
|
//- Build or rebuild the edge location tree
|
||||||
|
|||||||
@ -1897,87 +1897,87 @@ void Foam::conformalVoronoiMesh::indexDualVertices
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
// {
|
||||||
// Snapping points far outside
|
// // Snapping points far outside
|
||||||
if (cit->boundaryDualVertex() && !cit->parallelDualVertex())
|
// if (cit->boundaryDualVertex() && !cit->parallelDualVertex())
|
||||||
{
|
// {
|
||||||
pointFromPoint dual = cit->dual();
|
// pointFromPoint dual = cit->dual();
|
||||||
|
//
|
||||||
pointIndexHit hitInfo;
|
// pointIndexHit hitInfo;
|
||||||
label surfHit;
|
// label surfHit;
|
||||||
|
//
|
||||||
// Find nearest surface point
|
// // Find nearest surface point
|
||||||
geometryToConformTo_.findSurfaceNearest
|
// geometryToConformTo_.findSurfaceNearest
|
||||||
(
|
// (
|
||||||
dual,
|
// dual,
|
||||||
sqr(targetCellSize(dual)),
|
// sqr(targetCellSize(dual)),
|
||||||
hitInfo,
|
// hitInfo,
|
||||||
surfHit
|
// surfHit
|
||||||
);
|
// );
|
||||||
|
//
|
||||||
if (!hitInfo.hit())
|
// if (!hitInfo.hit())
|
||||||
{
|
// {
|
||||||
// Project dual to nearest point on tet
|
// // Project dual to nearest point on tet
|
||||||
|
//
|
||||||
tetPointRef tet
|
// tetPointRef tet
|
||||||
(
|
// (
|
||||||
topoint(cit->vertex(0)->point()),
|
// topoint(cit->vertex(0)->point()),
|
||||||
topoint(cit->vertex(1)->point()),
|
// topoint(cit->vertex(1)->point()),
|
||||||
topoint(cit->vertex(2)->point()),
|
// topoint(cit->vertex(2)->point()),
|
||||||
topoint(cit->vertex(3)->point())
|
// topoint(cit->vertex(3)->point())
|
||||||
);
|
// );
|
||||||
|
//
|
||||||
pointFromPoint nearestPointOnTet =
|
// pointFromPoint nearestPointOnTet =
|
||||||
tet.nearestPoint(dual).rawPoint();
|
// tet.nearestPoint(dual).rawPoint();
|
||||||
|
//
|
||||||
// Get nearest point on surface from tet.
|
// // Get nearest point on surface from tet.
|
||||||
geometryToConformTo_.findSurfaceNearest
|
// geometryToConformTo_.findSurfaceNearest
|
||||||
(
|
// (
|
||||||
nearestPointOnTet,
|
// nearestPointOnTet,
|
||||||
sqr(targetCellSize(nearestPointOnTet)),
|
// sqr(targetCellSize(nearestPointOnTet)),
|
||||||
hitInfo,
|
// hitInfo,
|
||||||
surfHit
|
// surfHit
|
||||||
);
|
// );
|
||||||
|
//
|
||||||
vector snapDir = nearestPointOnTet - dual;
|
// vector snapDir = nearestPointOnTet - dual;
|
||||||
snapDir /= mag(snapDir) + SMALL;
|
// snapDir /= mag(snapDir) + SMALL;
|
||||||
|
//
|
||||||
drawDelaunayCell(tetToSnapTo, cit, offset);
|
// drawDelaunayCell(tetToSnapTo, cit, offset);
|
||||||
offset += 1;
|
// offset += 1;
|
||||||
|
//
|
||||||
vectorField norm(1);
|
// vectorField norm(1);
|
||||||
allGeometry_[surfHit].getNormal
|
// allGeometry_[surfHit].getNormal
|
||||||
(
|
// (
|
||||||
List<pointIndexHit>(1, hitInfo),
|
// List<pointIndexHit>(1, hitInfo),
|
||||||
norm
|
// norm
|
||||||
);
|
// );
|
||||||
norm[0] /= mag(norm[0]) + SMALL;
|
// norm[0] /= mag(norm[0]) + SMALL;
|
||||||
|
//
|
||||||
if
|
// if
|
||||||
(
|
// (
|
||||||
hitInfo.hit()
|
// hitInfo.hit()
|
||||||
&& (mag(snapDir & norm[0]) > 0.5)
|
// && (mag(snapDir & norm[0]) > 0.5)
|
||||||
)
|
// )
|
||||||
{
|
// {
|
||||||
snapping1.write
|
// snapping1.write
|
||||||
(
|
// (
|
||||||
linePointRef(dual, nearestPointOnTet)
|
// linePointRef(dual, nearestPointOnTet)
|
||||||
);
|
// );
|
||||||
|
//
|
||||||
snapping2.write
|
// snapping2.write
|
||||||
(
|
// (
|
||||||
linePointRef
|
// linePointRef
|
||||||
(
|
// (
|
||||||
nearestPointOnTet,
|
// nearestPointOnTet,
|
||||||
hitInfo.hitPoint()
|
// hitInfo.hitPoint()
|
||||||
)
|
// )
|
||||||
);
|
// );
|
||||||
|
//
|
||||||
pts[cit->cellIndex()] = hitInfo.hitPoint();
|
// pts[cit->cellIndex()] = hitInfo.hitPoint();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (cit->boundaryDualVertex())
|
if (cit->boundaryDualVertex())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1928,14 +1928,16 @@ bool Foam::conformalVoronoiMesh::pointIsNearSurfaceLocation
|
|||||||
|
|
||||||
bool Foam::conformalVoronoiMesh::nearFeatureEdgeLocation
|
bool Foam::conformalVoronoiMesh::nearFeatureEdgeLocation
|
||||||
(
|
(
|
||||||
pointIndexHit& pHit
|
const pointIndexHit& pHit,
|
||||||
|
pointIndexHit& nearestEdgeHit
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
Foam::point pt = pHit.hitPoint();
|
const Foam::point& pt = pHit.hitPoint();
|
||||||
|
|
||||||
const scalar exclusionRangeSqr = featureEdgeExclusionDistanceSqr(pt);
|
const scalar exclusionRangeSqr = featureEdgeExclusionDistanceSqr(pt);
|
||||||
|
|
||||||
bool closeToFeatureEdge = pointIsNearFeatureEdgeLocation(pt);
|
bool closeToFeatureEdge =
|
||||||
|
pointIsNearFeatureEdgeLocation(pt, nearestEdgeHit);
|
||||||
|
|
||||||
if (closeToFeatureEdge)
|
if (closeToFeatureEdge)
|
||||||
{
|
{
|
||||||
@ -1978,15 +1980,11 @@ bool Foam::conformalVoronoiMesh::nearFeatureEdgeLocation
|
|||||||
if
|
if
|
||||||
(
|
(
|
||||||
mag(cosAngle) < searchConeAngle
|
mag(cosAngle) < searchConeAngle
|
||||||
&& (
|
&& (mag(lineBetweenPoints) > pointPairDistance(pt))
|
||||||
mag(lineBetweenPoints)
|
|
||||||
> foamyHexMeshControls().pointPairDistanceCoeff()
|
|
||||||
*targetCellSize(pt)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
pt = edgeHit.hitPoint();
|
//pt = edgeHit.hitPoint();
|
||||||
pHit.setPoint(pt);
|
//pHit.setPoint(pt);
|
||||||
closeToFeatureEdge = false;
|
closeToFeatureEdge = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2183,12 +2181,12 @@ void Foam::conformalVoronoiMesh::addSurfaceAndEdgeHits
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
!pointIsNearFeatureEdgeLocation
|
// !pointIsNearFeatureEdgeLocation
|
||||||
(
|
// (
|
||||||
edPt,
|
// edPt,
|
||||||
nearestEdgeHit
|
// nearestEdgeHit
|
||||||
)
|
// )
|
||||||
// !nearFeatureEdgeLocation(edHit)
|
!nearFeatureEdgeLocation(edHit, nearestEdgeHit)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
appendToEdgeLocationTree(edPt);
|
appendToEdgeLocationTree(edPt);
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -122,6 +122,7 @@ void Foam::regionModels::regionModel1D::initialise()
|
|||||||
|
|
||||||
surfaceScalarField& nMagSf = nMagSfPtr_();
|
surfaceScalarField& nMagSf = nMagSfPtr_();
|
||||||
|
|
||||||
|
localPyrolysisFaceI = 0;
|
||||||
forAll(intCoupledPatchIDs_, i)
|
forAll(intCoupledPatchIDs_, i)
|
||||||
{
|
{
|
||||||
const label patchI = intCoupledPatchIDs_[i];
|
const label patchI = intCoupledPatchIDs_[i];
|
||||||
@ -132,7 +133,7 @@ void Foam::regionModels::regionModel1D::initialise()
|
|||||||
forAll(pNormals, localFaceI)
|
forAll(pNormals, localFaceI)
|
||||||
{
|
{
|
||||||
const vector& n = pNormals[localFaceI];
|
const vector& n = pNormals[localFaceI];
|
||||||
const labelList& faces = boundaryFaceFaces_[localFaceI];
|
const labelList& faces = boundaryFaceFaces_[localPyrolysisFaceI++];
|
||||||
forAll (faces, faceI)
|
forAll (faces, faceI)
|
||||||
{
|
{
|
||||||
const label faceID = faces[faceI];
|
const label faceID = faces[faceI];
|
||||||
|
|||||||
@ -47,8 +47,8 @@ namespace Foam
|
|||||||
defineTemplateTypeNameAndDebugWithName \
|
defineTemplateTypeNameAndDebugWithName \
|
||||||
( \
|
( \
|
||||||
SS##Schem##Comp##SThermo##GThermo, \
|
SS##Schem##Comp##SThermo##GThermo, \
|
||||||
(#SS"<" + word(Schem::typeName_()) +"<"#Comp"," + SThermo::typeName() \
|
(#SS"<"#Schem"<"#Comp"," + SThermo::typeName() + "," \
|
||||||
+ "," + GThermo::typeName() + ">>").c_str(), \
|
+ GThermo::typeName() + ">>").c_str(), \
|
||||||
0 \
|
0 \
|
||||||
); \
|
); \
|
||||||
\
|
\
|
||||||
|
|||||||
Reference in New Issue
Block a user