mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Adding mathematical:: changes and modifying boost library for old
meshers.
This commit is contained in:
@ -22,5 +22,5 @@ EXE_LIBS = \
|
||||
-lmeshTools \
|
||||
-ltriSurface \
|
||||
-ldynamicMesh \
|
||||
-lboost_thread-${BOOST_COMPILER}-mt-${BOOST_LIB_VERSION} \
|
||||
-lboost_thread \
|
||||
-lmpfr
|
||||
|
||||
@ -27,7 +27,7 @@ License
|
||||
#include "CV2D.H"
|
||||
#include "plane.H"
|
||||
#include "triSurfaceTools.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "unitConversion.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
@ -98,20 +98,15 @@ void Foam::CV2D::insertFeaturePoints()
|
||||
point2D reflMasterPt = refPt + 2*(featPt - refPt);
|
||||
|
||||
// Reflect refPt in both faces.
|
||||
point2D reflectedA =
|
||||
point2D reflectedA =
|
||||
reflMasterPt + 2*((featPt - reflMasterPt) & nA)*nA;
|
||||
|
||||
point2D reflectedB =
|
||||
reflMasterPt + 2*((featPt - reflMasterPt) & nB)*nB;
|
||||
|
||||
// Total angle around the concave feature
|
||||
// scalar totalAngle =
|
||||
// 180*(2.0*mathematicalConstant::pi - acos(mag(nA & nB)))
|
||||
// /mathematicalConstant::pi;
|
||||
|
||||
scalar totalAngle =
|
||||
180*(mathematicalConstant::pi + acos(mag(nA & nB)))
|
||||
/mathematicalConstant::pi;
|
||||
scalar totalAngle =
|
||||
radToDeg(constant::mathematical::pi + acos(mag(nA & nB)));
|
||||
|
||||
// Number of quadrants the angle should be split into
|
||||
int nQuads = int(totalAngle/controls_.maxQuadAngle) + 1;
|
||||
|
||||
@ -25,7 +25,7 @@ License
|
||||
\*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "querySurface.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "unitConversion.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -58,7 +58,7 @@ Foam::labelList Foam::querySurface::extractFeatures2D
|
||||
const scalar featAngle
|
||||
) const
|
||||
{
|
||||
scalar featCos = cos(mathematicalConstant::pi*featAngle/180.0);
|
||||
scalar featCos = cos(degToRad(featAngle));
|
||||
|
||||
const labelListList& edgeFaces = this->edgeFaces();
|
||||
const pointField& localPoints = this->localPoints();
|
||||
|
||||
@ -116,8 +116,8 @@ void Foam::CV3D::setVertexAlignmentDirections()
|
||||
{
|
||||
vector spoke
|
||||
(
|
||||
Foam::cos(i*mathematicalConstant::twoPi/s),
|
||||
Foam::sin(i*mathematicalConstant::twoPi/s),
|
||||
Foam::cos(i*constant::mathematical::twoPi/s),
|
||||
Foam::sin(i*constant::mathematical::twoPi/s),
|
||||
0
|
||||
);
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@ SourceFiles
|
||||
#include "SortableList.H"
|
||||
#include "plane.H"
|
||||
#include "triSurfaceTools.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "unitConversion.H"
|
||||
#include "transform.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -21,5 +21,5 @@ EXE_LIBS = \
|
||||
-lmeshTools \
|
||||
-ltriSurface \
|
||||
-ldynamicMesh \
|
||||
-lboost_thread-${BOOST_COMPILER}-mt-${BOOST_LIB_VERSION} \
|
||||
-lboost_thread \
|
||||
-lmpfr
|
||||
|
||||
@ -40,8 +40,7 @@ void Foam::CV3D::insertFeaturePoints()
|
||||
|
||||
scalar planeErrorAngle = 0.1*(180.0 - controls_.includedAngle);
|
||||
|
||||
scalar planeErrorAngleCos =
|
||||
cos(mathematicalConstant::pi*planeErrorAngle/180.0);
|
||||
scalar planeErrorAngleCos = cos(degToRad(planeErrorAngle));
|
||||
|
||||
forAll(featPoints, i)
|
||||
{
|
||||
@ -372,9 +371,9 @@ void Foam::CV3D::insertFeaturePoints()
|
||||
|
||||
insertPoint(concaveEdgeExternalPt, internalPtAI);
|
||||
|
||||
scalar totalAngle = 180/mathematicalConstant::pi *
|
||||
scalar totalAngle = radToDeg
|
||||
(
|
||||
mathematicalConstant::pi +
|
||||
constant::mathematical::pi +
|
||||
acos(mag(concaveEdgePlaneANormal & concaveEdgePlaneBNormal))
|
||||
);
|
||||
|
||||
|
||||
@ -751,8 +751,7 @@ void Foam::CV3D::insertEdgePointGroups
|
||||
reflMasterPt + 2*((edgePt - reflMasterPt) & nB)*nB;
|
||||
|
||||
scalar totalAngle =
|
||||
180*(mathematicalConstant::pi + acos(mag(nA & nB)))
|
||||
/mathematicalConstant::pi;
|
||||
radToDeg(constant::mathematical::pi + acos(mag(nA & nB)));
|
||||
|
||||
// Number of quadrants the angle should be split into
|
||||
int nQuads = int(totalAngle/controls_.maxQuadAngle) + 1;
|
||||
|
||||
@ -25,7 +25,7 @@ License
|
||||
\*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "querySurface.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "unitConversion.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
Reference in New Issue
Block a user