mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
trim trailing space in src/sampling
This commit is contained in:
@ -36,14 +36,9 @@ Description
|
|||||||
#include "octreeDataCell.H"
|
#include "octreeDataCell.H"
|
||||||
#include "octreeDataFace.H"
|
#include "octreeDataFace.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
void meshToMesh::calcAddressing()
|
void Foam::meshToMesh::calcAddressing()
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
@ -225,7 +220,7 @@ void meshToMesh::calcAddressing()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void meshToMesh::cellAddresses
|
void Foam::meshToMesh::cellAddresses
|
||||||
(
|
(
|
||||||
labelList& cellAddressing_,
|
labelList& cellAddressing_,
|
||||||
const pointField& points,
|
const pointField& points,
|
||||||
@ -356,8 +351,4 @@ void meshToMesh::cellAddresses
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -26,14 +26,9 @@ License
|
|||||||
|
|
||||||
#include "meshToMesh.H"
|
#include "meshToMesh.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
void meshToMesh::calculateInverseDistanceWeights() const
|
void Foam::meshToMesh::calculateInverseDistanceWeights() const
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
@ -93,7 +88,7 @@ void meshToMesh::calculateInverseDistanceWeights() const
|
|||||||
invDistCoeffs[celli][ni + 1] = invDist;
|
invDistCoeffs[celli][ni + 1] = invDist;
|
||||||
sumInvDist += invDist;
|
sumInvDist += invDist;
|
||||||
}
|
}
|
||||||
|
|
||||||
// divide by the total inverse-distance
|
// divide by the total inverse-distance
|
||||||
forAll (invDistCoeffs[celli], i)
|
forAll (invDistCoeffs[celli], i)
|
||||||
{
|
{
|
||||||
@ -107,19 +102,15 @@ void meshToMesh::calculateInverseDistanceWeights() const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
const scalarListList& meshToMesh::inverseDistanceWeights() const
|
const Foam::scalarListList& Foam::meshToMesh::inverseDistanceWeights() const
|
||||||
{
|
{
|
||||||
if (!inverseDistanceWeightsPtr_)
|
if (!inverseDistanceWeightsPtr_)
|
||||||
{
|
{
|
||||||
calculateInverseDistanceWeights();
|
calculateInverseDistanceWeights();
|
||||||
}
|
}
|
||||||
|
|
||||||
return *inverseDistanceWeightsPtr_;
|
return *inverseDistanceWeightsPtr_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -28,20 +28,15 @@ License
|
|||||||
#include "processorFvPatch.H"
|
#include "processorFvPatch.H"
|
||||||
#include "demandDrivenData.H"
|
#include "demandDrivenData.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
defineTypeNameAndDebug(meshToMesh, 0);
|
defineTypeNameAndDebug(Foam::meshToMesh, 0);
|
||||||
|
const Foam::scalar Foam::meshToMesh::directHitTol = 1e-5;
|
||||||
const scalar meshToMesh::directHitTol = 1e-5;
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
meshToMesh::meshToMesh
|
Foam::meshToMesh::meshToMesh
|
||||||
(
|
(
|
||||||
const fvMesh& meshFrom,
|
const fvMesh& meshFrom,
|
||||||
const fvMesh& meshTo,
|
const fvMesh& meshTo,
|
||||||
@ -114,7 +109,7 @@ meshToMesh::meshToMesh
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
meshToMesh::meshToMesh
|
Foam::meshToMesh::meshToMesh
|
||||||
(
|
(
|
||||||
const fvMesh& meshFrom,
|
const fvMesh& meshFrom,
|
||||||
const fvMesh& meshTo
|
const fvMesh& meshTo
|
||||||
@ -159,7 +154,7 @@ meshToMesh::meshToMesh
|
|||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
fromMesh_.boundaryMesh()[patchi].type()
|
fromMesh_.boundaryMesh()[patchi].type()
|
||||||
!= toMesh_.boundaryMesh()[patchi].type()
|
!= toMesh_.boundaryMesh()[patchi].type()
|
||||||
@ -201,14 +196,10 @@ meshToMesh::meshToMesh
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
meshToMesh::~meshToMesh()
|
Foam::meshToMesh::~meshToMesh()
|
||||||
{
|
{
|
||||||
deleteDemandDrivenData(inverseDistanceWeightsPtr_);
|
deleteDemandDrivenData(inverseDistanceWeightsPtr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -56,7 +56,7 @@ class octree;
|
|||||||
class octreeDataCell;
|
class octreeDataCell;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class meshToMesh Declaration
|
Class meshToMesh Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class meshToMesh
|
class meshToMesh
|
||||||
@ -207,7 +207,7 @@ public:
|
|||||||
{
|
{
|
||||||
return fromMesh_;
|
return fromMesh_;
|
||||||
}
|
}
|
||||||
|
|
||||||
const fvMesh& toMesh() const
|
const fvMesh& toMesh() const
|
||||||
{
|
{
|
||||||
return toMesh_;
|
return toMesh_;
|
||||||
|
|||||||
@ -30,15 +30,10 @@ License
|
|||||||
#include "SubField.H"
|
#include "SubField.H"
|
||||||
#include "mixedFvPatchField.H"
|
#include "mixedFvPatchField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void meshToMesh::mapField
|
void Foam::meshToMesh::mapField
|
||||||
(
|
(
|
||||||
Field<Type>& toF,
|
Field<Type>& toF,
|
||||||
const Field<Type>& fromVf,
|
const Field<Type>& fromVf,
|
||||||
@ -60,7 +55,7 @@ void meshToMesh::mapField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void meshToMesh::interpolateField
|
void Foam::meshToMesh::interpolateField
|
||||||
(
|
(
|
||||||
Field<Type>& toF,
|
Field<Type>& toF,
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& fromVf,
|
const GeometricField<Type, fvPatchField, volMesh>& fromVf,
|
||||||
@ -79,7 +74,7 @@ void meshToMesh::interpolateField
|
|||||||
{
|
{
|
||||||
const labelList& neighbours = cc[adr[celli]];
|
const labelList& neighbours = cc[adr[celli]];
|
||||||
const scalarList& w = weights[celli];
|
const scalarList& w = weights[celli];
|
||||||
|
|
||||||
toF[celli] = fromVf[adr[celli]]*w[0];
|
toF[celli] = fromVf[adr[celli]]*w[0];
|
||||||
|
|
||||||
for (label ni = 1; ni < w.size(); ni++)
|
for (label ni = 1; ni < w.size(); ni++)
|
||||||
@ -92,7 +87,7 @@ void meshToMesh::interpolateField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void meshToMesh::interpolateField
|
void Foam::meshToMesh::interpolateField
|
||||||
(
|
(
|
||||||
Field<Type>& toF,
|
Field<Type>& toF,
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& fromVf,
|
const GeometricField<Type, fvPatchField, volMesh>& fromVf,
|
||||||
@ -118,7 +113,7 @@ void meshToMesh::interpolateField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void meshToMesh::interpolateInternalField
|
void Foam::meshToMesh::interpolateInternalField
|
||||||
(
|
(
|
||||||
Field<Type>& toF,
|
Field<Type>& toF,
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& fromVf,
|
const GeometricField<Type, fvPatchField, volMesh>& fromVf,
|
||||||
@ -160,7 +155,7 @@ void meshToMesh::interpolateInternalField
|
|||||||
case INTERPOLATE:
|
case INTERPOLATE:
|
||||||
interpolateField
|
interpolateField
|
||||||
(
|
(
|
||||||
toF,
|
toF,
|
||||||
fromVf,
|
fromVf,
|
||||||
cellAddressing_,
|
cellAddressing_,
|
||||||
inverseDistanceWeights()
|
inverseDistanceWeights()
|
||||||
@ -170,7 +165,7 @@ void meshToMesh::interpolateInternalField
|
|||||||
case CELL_POINT_INTERPOLATE:
|
case CELL_POINT_INTERPOLATE:
|
||||||
interpolateField
|
interpolateField
|
||||||
(
|
(
|
||||||
toF,
|
toF,
|
||||||
fromVf,
|
fromVf,
|
||||||
cellAddressing_,
|
cellAddressing_,
|
||||||
toMesh_.cellCentres()
|
toMesh_.cellCentres()
|
||||||
@ -190,7 +185,7 @@ void meshToMesh::interpolateInternalField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void meshToMesh::interpolateInternalField
|
void Foam::meshToMesh::interpolateInternalField
|
||||||
(
|
(
|
||||||
Field<Type>& toF,
|
Field<Type>& toF,
|
||||||
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tfromVf,
|
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tfromVf,
|
||||||
@ -203,7 +198,7 @@ void meshToMesh::interpolateInternalField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void meshToMesh::interpolate
|
void Foam::meshToMesh::interpolate
|
||||||
(
|
(
|
||||||
GeometricField<Type, fvPatchField, volMesh>& toVf,
|
GeometricField<Type, fvPatchField, volMesh>& toVf,
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& fromVf,
|
const GeometricField<Type, fvPatchField, volMesh>& fromVf,
|
||||||
@ -268,7 +263,7 @@ void meshToMesh::interpolate
|
|||||||
).refValue() = toVf.boundaryField()[patchi];
|
).refValue() = toVf.boundaryField()[patchi];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if
|
else if
|
||||||
(
|
(
|
||||||
patchMap_.found(toPatch.name())
|
patchMap_.found(toPatch.name())
|
||||||
&& fromMeshPatches_.found(patchMap_.find(toPatch.name())())
|
&& fromMeshPatches_.found(patchMap_.find(toPatch.name())())
|
||||||
@ -300,7 +295,7 @@ void meshToMesh::interpolate
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void meshToMesh::interpolate
|
void Foam::meshToMesh::interpolate
|
||||||
(
|
(
|
||||||
GeometricField<Type, fvPatchField, volMesh>& toVf,
|
GeometricField<Type, fvPatchField, volMesh>& toVf,
|
||||||
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tfromVf,
|
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tfromVf,
|
||||||
@ -313,7 +308,8 @@ void meshToMesh::interpolate
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<GeometricField<Type, fvPatchField, volMesh> > meshToMesh::interpolate
|
Foam::tmp< Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
|
||||||
|
Foam::meshToMesh::interpolate
|
||||||
(
|
(
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& fromVf,
|
const GeometricField<Type, fvPatchField, volMesh>& fromVf,
|
||||||
meshToMesh::order ord
|
meshToMesh::order ord
|
||||||
@ -387,7 +383,8 @@ tmp<GeometricField<Type, fvPatchField, volMesh> > meshToMesh::interpolate
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<GeometricField<Type, fvPatchField, volMesh> > meshToMesh::interpolate
|
Foam::tmp< Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
|
||||||
|
Foam::meshToMesh::interpolate
|
||||||
(
|
(
|
||||||
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tfromVf,
|
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tfromVf,
|
||||||
meshToMesh::order ord
|
meshToMesh::order ord
|
||||||
@ -401,8 +398,4 @@ tmp<GeometricField<Type, fvPatchField, volMesh> > meshToMesh::interpolate
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -153,7 +153,7 @@ void Foam::vtkSetWriter<Type>::write
|
|||||||
label globalPtI = 0;
|
label globalPtI = 0;
|
||||||
forAll(tracks, trackI)
|
forAll(tracks, trackI)
|
||||||
{
|
{
|
||||||
const coordSet& points = tracks[trackI];
|
const coordSet& points = tracks[trackI];
|
||||||
|
|
||||||
os << points.size();
|
os << points.size();
|
||||||
forAll(points, i)
|
forAll(points, i)
|
||||||
@ -164,7 +164,7 @@ void Foam::vtkSetWriter<Type>::write
|
|||||||
os << nl;
|
os << nl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
os << "POINT_DATA " << nPoints << nl
|
os << "POINT_DATA " << nPoints << nl
|
||||||
<< " FIELD attributes " << valueSetNames.size() << nl;
|
<< " FIELD attributes " << valueSetNames.size() << nl;
|
||||||
|
|
||||||
|
|||||||
@ -243,7 +243,7 @@ bool Foam::sampledIsoSurfaceCell::expire()
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// force update
|
// force update
|
||||||
prevTimeIndex_ = -1;
|
prevTimeIndex_ = -1;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -67,7 +67,7 @@ class thresholdCellFaces
|
|||||||
|
|
||||||
void calculate
|
void calculate
|
||||||
(
|
(
|
||||||
const scalarField&,
|
const scalarField&,
|
||||||
const scalar lowerThreshold,
|
const scalar lowerThreshold,
|
||||||
const scalar upperThreshold,
|
const scalar upperThreshold,
|
||||||
const bool triangulate
|
const bool triangulate
|
||||||
|
|||||||
Reference in New Issue
Block a user