mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Replace a few uses of triSurface with the more general meshedSurface.
This commit is contained in:
@ -15,8 +15,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lengine \
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-ltriSurface \
|
||||
-lmeshTools \
|
||||
-ldynamicMesh
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-ldynamicMesh \
|
||||
-ltriSurface \
|
||||
-lmeshTools
|
||||
|
||||
@ -1,10 +1,7 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude
|
||||
|
||||
|
||||
EXE_LIBS = \
|
||||
-ltriSurface \
|
||||
-ldynamicMesh \
|
||||
-lmeshTools
|
||||
|
||||
@ -1,8 +1 @@
|
||||
/*
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lmeshTools \
|
||||
-ltriSurface
|
||||
*/
|
||||
/* */
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
|
||||
EXE_LIBS = \
|
||||
-ldynamicMesh \
|
||||
-lmeshTools
|
||||
|
||||
@ -2,7 +2,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
@ -10,5 +9,4 @@ EXE_LIBS = \
|
||||
-lgenericPatchFields \
|
||||
-lmeshTools \
|
||||
-lsampling \
|
||||
-ltriSurface \
|
||||
-llagrangian
|
||||
|
||||
@ -3,7 +3,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/surfMesh/lnInclude \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
@ -12,5 +11,4 @@ EXE_LIBS = \
|
||||
-lmeshTools \
|
||||
-lsampling \
|
||||
-lsurfMesh \
|
||||
-ltriSurface \
|
||||
-llagrangian
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
EXE_INC = \
|
||||
/* -I$(LIB_SRC)/cfdTools/general/lnInclude */ \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude
|
||||
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/edgeMesh/lnInclude \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude
|
||||
-I$(LIB_SRC)/edgeMesh/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lmeshTools \
|
||||
-ledgeMesh \
|
||||
-ltriSurface
|
||||
-ledgeMesh
|
||||
|
||||
@ -79,11 +79,7 @@ void deleteBox
|
||||
{
|
||||
const point eMid = surf.edges()[edgeI].centre(surf.localPoints());
|
||||
|
||||
if
|
||||
(
|
||||
(removeInside && bb.contains(eMid))
|
||||
|| (!removeInside && !bb.contains(eMid))
|
||||
)
|
||||
if (removeInside ? bb.contains(eMid) : !bb.contains(eMid))
|
||||
{
|
||||
edgeStat[edgeI] = surfaceFeatures::NONE;
|
||||
}
|
||||
@ -133,7 +129,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
|
||||
|
||||
// Either construct features from surface&featureangle or read set.
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude
|
||||
-I$(LIB_SRC)/surfMesh/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lmeshTools \
|
||||
-ltriSurface
|
||||
-lsurfMesh
|
||||
|
||||
@ -23,18 +23,16 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
Finds nearest triangle and vertex.
|
||||
Finds nearest face and vertex.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "triSurface.H"
|
||||
#include "argList.H"
|
||||
#include "OFstream.H"
|
||||
|
||||
#ifndef namespaceFoam
|
||||
#define namespaceFoam
|
||||
#include "MeshedSurfaces.H"
|
||||
|
||||
using namespace Foam;
|
||||
#endif
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -44,9 +42,9 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.clear();
|
||||
argList::addOption("x", "X");
|
||||
argList::addOption("y", "Y");
|
||||
argList::addOption("z", "Z");
|
||||
argList::addOption("x", "X", "The point x-coordinate (if non-zero)");
|
||||
argList::addOption("y", "Y", "The point y-coordinate (if non-zero)");
|
||||
argList::addOption("z", "Z", "The point y-coordinate (if non-zero)");
|
||||
|
||||
argList::validArgs.append("surface file");
|
||||
|
||||
@ -54,15 +52,15 @@ int main(int argc, char *argv[])
|
||||
|
||||
point samplePt
|
||||
(
|
||||
args.optionRead<scalar>("x"),
|
||||
args.optionRead<scalar>("y"),
|
||||
args.optionRead<scalar>("z")
|
||||
args.optionLookupOrDefault<scalar>("x", 0),
|
||||
args.optionLookupOrDefault<scalar>("y", 0),
|
||||
args.optionLookupOrDefault<scalar>("z", 0)
|
||||
);
|
||||
Info<< "Looking for nearest face/vertex to " << samplePt << endl;
|
||||
|
||||
|
||||
Info<< "Reading surf1 ..." << endl;
|
||||
triSurface surf1(args.additionalArgs()[0]);
|
||||
Info<< "Reading surf ..." << endl;
|
||||
meshedSurface surf1(args.additionalArgs()[0]);
|
||||
|
||||
//
|
||||
// Nearest vertex
|
||||
@ -83,11 +81,11 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
Info<< "Nearest vertex:" << endl
|
||||
<< " index :" << minIndex << " (in localPoints)" << endl
|
||||
Info<< "Nearest vertex:" << nl
|
||||
<< " index :" << minIndex << " (in localPoints)" << nl
|
||||
<< " index :" << surf1.meshPoints()[minIndex]
|
||||
<< " (in points)" << endl
|
||||
<< " coordinates:" << localPoints[minIndex] << endl
|
||||
<< " (in points)" << nl
|
||||
<< " coordinates:" << localPoints[minIndex] << nl
|
||||
<< endl;
|
||||
|
||||
//
|
||||
@ -101,8 +99,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
forAll(surf1, faceI)
|
||||
{
|
||||
const labelledTri& f = surf1[faceI];
|
||||
const point centre = f.centre(points);
|
||||
const point centre = surf1[faceI].centre(points);
|
||||
|
||||
const scalar dist = mag(centre - samplePt);
|
||||
if (dist < minDist)
|
||||
@ -112,16 +109,19 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
const labelledTri& f = surf1[minIndex];
|
||||
const face& f = surf1[minIndex];
|
||||
|
||||
Info<< "Face with nearest centre:" << endl
|
||||
<< " index :" << minIndex << endl
|
||||
<< " centre :" << f.centre(points) << endl
|
||||
<< " face :" << f << endl
|
||||
<< " vertex coords:" << points[f[0]] << " "
|
||||
<< points[f[1]] << " " << points[f[2]] << endl
|
||||
<< endl;
|
||||
Info<< "Face with nearest centre:" << nl
|
||||
<< " index :" << minIndex << nl
|
||||
<< " centre :" << f.centre(points) << nl
|
||||
<< " face :" << f << nl
|
||||
<< " vertex coords:\n";
|
||||
forAll(f, fp)
|
||||
{
|
||||
Info<< " " << points[f[fp]] << "\n";
|
||||
}
|
||||
|
||||
Info<< endl;
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude
|
||||
-I$(LIB_SRC)/surfMesh/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lmeshTools \
|
||||
-ltriSurface
|
||||
-lsurfMesh
|
||||
|
||||
@ -23,15 +23,16 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
Example of simple laplacian smoother
|
||||
Example of a simple laplacian smoother
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "triSurface.H"
|
||||
#include "argList.H"
|
||||
#include "OFstream.H"
|
||||
#include "boundBox.H"
|
||||
|
||||
#include "MeshedSurfaces.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
|
||||
@ -61,23 +62,20 @@ int main(int argc, char *argv[])
|
||||
label iters(readLabel(IStringStream(args.additionalArgs()[2])()));
|
||||
fileName outFileName(args.additionalArgs()[3]);
|
||||
|
||||
Info<< "Relax:" << relax << endl;
|
||||
Info<< "Iters:" << iters << endl;
|
||||
Info<< "Relax:" << relax << nl
|
||||
<< "Iters:" << iters << nl
|
||||
<< "Reading surface from " << surfFileName << " ..." << endl;
|
||||
|
||||
meshedSurface surf1(surfFileName);
|
||||
|
||||
Info<< "Reading surface from " << surfFileName << " ..." << endl;
|
||||
|
||||
triSurface surf1(surfFileName);
|
||||
|
||||
Info<< "Triangles : " << surf1.size() << endl;
|
||||
Info<< "Vertices : " << surf1.nPoints() << endl;
|
||||
Info<< "Bounding Box : " << boundBox(surf1.localPoints()) << endl;
|
||||
Info<< "Faces : " << surf1.size() << nl
|
||||
<< "Vertices : " << surf1.nPoints() << nl
|
||||
<< "Bounding Box : " << boundBox(surf1.localPoints()) << endl;
|
||||
|
||||
pointField newPoints(surf1.localPoints());
|
||||
|
||||
const labelListList& pointEdges = surf1.pointEdges();
|
||||
|
||||
|
||||
for (label iter = 0; iter < iters; iter++)
|
||||
{
|
||||
forAll(pointEdges, vertI)
|
||||
@ -100,16 +98,14 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
triSurface surf2
|
||||
(
|
||||
surf1.localFaces(),
|
||||
surf1.patches(),
|
||||
newPoints
|
||||
);
|
||||
|
||||
Info<< "Writing surface to " << outFileName << " ..." << endl;
|
||||
|
||||
surf2.write(outFileName);
|
||||
meshedSurface
|
||||
(
|
||||
xferMove(newPoints),
|
||||
xferCopy(surf1.localFaces()),
|
||||
xferCopy(surf1.surfZones())
|
||||
).write(outFileName);
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude
|
||||
-I$(LIB_SRC)/surfMesh/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lmeshTools \
|
||||
-ltriSurface
|
||||
-lsurfMesh
|
||||
|
||||
@ -35,7 +35,6 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "triSurface.H"
|
||||
#include "argList.H"
|
||||
#include "OFstream.H"
|
||||
#include "IFstream.H"
|
||||
@ -45,6 +44,8 @@ Description
|
||||
#include "quaternion.H"
|
||||
#include "mathematicalConstants.H"
|
||||
|
||||
#include "MeshedSurfaces.H"
|
||||
|
||||
using namespace Foam;
|
||||
using namespace Foam::constant::mathematical;
|
||||
|
||||
@ -114,7 +115,7 @@ int main(int argc, char *argv[])
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
triSurface surf1(surfFileName);
|
||||
meshedSurface surf1(surfFileName);
|
||||
|
||||
pointField points(surf1.points());
|
||||
|
||||
@ -193,9 +194,8 @@ int main(int argc, char *argv[])
|
||||
points.replace(vector::Z, scaleVector.z()*points.component(vector::Z));
|
||||
}
|
||||
|
||||
triSurface surf2(surf1, surf1.patches(), points);
|
||||
|
||||
surf2.write(outFileName);
|
||||
surf1.movePoints(points);
|
||||
surf1.write(outFileName);
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
|
||||
@ -9,16 +9,17 @@ cellDist/wallPoint/wallPoint.C
|
||||
|
||||
cellFeatures/cellFeatures.C
|
||||
|
||||
coordinateSystems/coordinateSystem.C
|
||||
coordinateSystems/coordinateSystemNew.C
|
||||
coordinateSystems/coordinateSystems.C
|
||||
coordinateSystems/cylindricalCS.C
|
||||
coordinateSystems/sphericalCS.C
|
||||
coordinateSystems/parabolicCylindricalCS.C
|
||||
coordinateSystems/toroidalCS.C
|
||||
coordinateSystems/coordinateRotation/coordinateRotation.C
|
||||
coordinateSystems/coordinateRotation/EulerCoordinateRotation.C
|
||||
coordinateSystems/coordinateRotation/STARCDCoordinateRotation.C
|
||||
csys = coordinateSystems
|
||||
$(csys)/coordinateSystem.C
|
||||
$(csys)/coordinateSystemNew.C
|
||||
$(csys)/coordinateSystems.C
|
||||
$(csys)/cylindricalCS.C
|
||||
$(csys)/sphericalCS.C
|
||||
$(csys)/parabolicCylindricalCS.C
|
||||
$(csys)/toroidalCS.C
|
||||
$(csys)/coordinateRotation/coordinateRotation.C
|
||||
$(csys)/coordinateRotation/EulerCoordinateRotation.C
|
||||
$(csys)/coordinateRotation/STARCDCoordinateRotation.C
|
||||
|
||||
edgeFaceCirculator/edgeFaceCirculator.C
|
||||
|
||||
|
||||
@ -85,8 +85,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
// Tree node. Has up pointer and down pointers.
|
||||
|
||||
//- Tree node. Has up pointer and down pointers.
|
||||
class node
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user