mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: eliminate code duplication in Circulator/ConstCirculator
This commit is contained in:
@ -30,7 +30,7 @@ License
|
||||
#include "vectorTools.H"
|
||||
#include "triangle.H"
|
||||
#include "tetrahedron.H"
|
||||
#include "ConstCirculator.H"
|
||||
#include "Circulator.H"
|
||||
#include "DelaunayMeshTools.H"
|
||||
#include "OBJstream.H"
|
||||
|
||||
@ -195,20 +195,20 @@ void Foam::conformalVoronoiMesh::createEdgePointGroupByCirculating
|
||||
|
||||
if (circ.size()) do
|
||||
{
|
||||
const sideVolumeType volType = normalVolumeTypes[circ()];
|
||||
const sideVolumeType volType = normalVolumeTypes[circ.curr()];
|
||||
const sideVolumeType nextVolType = normalVolumeTypes[circ.next()];
|
||||
|
||||
const vector& normal = feNormals[circ()];
|
||||
const vector& normal = feNormals[circ.curr()];
|
||||
const vector& nextNormal = feNormals[circ.next()];
|
||||
|
||||
vector normalDir = (normal ^ edDir);
|
||||
normalDir *= circNormalDirs()/mag(normalDir);
|
||||
normalDir *= circNormalDirs.curr()/mag(normalDir);
|
||||
|
||||
vector nextNormalDir = (nextNormal ^ edDir);
|
||||
nextNormalDir *= circNormalDirs.next()/mag(nextNormalDir);
|
||||
|
||||
// Info<< " " << circ() << " " << circ.next() << nl
|
||||
// << " " << circNormalDirs() << " " << circNormalDirs.next()
|
||||
// Info<< " " << circ.curr() << " " << circ.next() << nl
|
||||
// << " " << circNormalDirs.curr() << " " << circNormalDirs.next()
|
||||
// << nl
|
||||
// << " normals = " << normal << " " << nextNormal << nl
|
||||
// << " normalDirs = " << normalDir << " " << nextNormalDir << nl
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -32,7 +32,7 @@ License
|
||||
#include "conformalVoronoiMesh.H"
|
||||
#include "cellShapeControl.H"
|
||||
#include "DelaunayMeshTools.H"
|
||||
#include "ConstCirculator.H"
|
||||
#include "Circulator.H"
|
||||
#include "backgroundMeshDecomposition.H"
|
||||
#include "autoPtr.H"
|
||||
#include "mapDistribute.H"
|
||||
@ -238,7 +238,7 @@ void Foam::featurePointConformer::createMasterAndSlavePoints
|
||||
if (circ.size()) do
|
||||
{
|
||||
// const edgeStatus eStatusPrev = feMesh.getEdgeStatus(circ.prev());
|
||||
const edgeStatus eStatusCurr = feMesh.getEdgeStatus(circ());
|
||||
const edgeStatus eStatusCurr = feMesh.getEdgeStatus(circ.curr());
|
||||
// const edgeStatus eStatusNext = feMesh.getEdgeStatus(circ.next());
|
||||
|
||||
// Info<< " Prev = "
|
||||
@ -253,7 +253,7 @@ void Foam::featurePointConformer::createMasterAndSlavePoints
|
||||
// feature point
|
||||
label sign = getSign(eStatusCurr);
|
||||
|
||||
const vector n = sharedFaceNormal(feMesh, circ(), circ.next());
|
||||
const vector n = sharedFaceNormal(feMesh, circ.curr(), circ.next());
|
||||
|
||||
const vector pointMotionDirection = sign*0.5*ppDist*n;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user