mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
STYLE: remove unused code.
This commit is contained in:
@ -96,21 +96,6 @@ public:
|
||||
const unallocLabelList& internalData
|
||||
) const = 0;
|
||||
|
||||
// //- Initialise interface data transfer
|
||||
// virtual void initTransfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& interfaceData
|
||||
// ) const
|
||||
// {}
|
||||
//
|
||||
// //- Transfer and return neighbour field
|
||||
// virtual tmp<labelField> transfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& interfaceData
|
||||
// ) const = 0;
|
||||
|
||||
//- Initialise transfer of internal field adjacent to the interface
|
||||
virtual void initInternalFieldTransfer
|
||||
(
|
||||
|
||||
@ -29,49 +29,6 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
// template<class Type>
|
||||
// Foam::List<Type>& Foam::processorLduInterface::setSendBuf(const label nElems)
|
||||
// const
|
||||
// {
|
||||
// if (!contiguous<Type>())
|
||||
// {
|
||||
// FatalErrorIn("processorLduInterface::setSendBuf(const label) const")
|
||||
// << "Cannot return the binary size of a list of "
|
||||
// "non-primitive elements"
|
||||
// << abort(FatalError);
|
||||
// }
|
||||
//
|
||||
// label nBytes = nElems*sizeof(Type);
|
||||
// sendBuf_.setSize(nBytes);
|
||||
//
|
||||
// return reinterpret_cast<List<Type>&>(sendBuf_);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// template<class Type>
|
||||
// Foam::List<Type>& Foam::processorLduInterface::setReceiveBuf
|
||||
// (
|
||||
// const label nElems
|
||||
// ) const
|
||||
// {
|
||||
// if (!contiguous<Type>())
|
||||
// {
|
||||
// FatalErrorIn("processorLduInterface::setReceiveBuf(const label) const")
|
||||
// << "Cannot return the binary size of a list of "
|
||||
// "non-primitive elements"
|
||||
// << abort(FatalError);
|
||||
// }
|
||||
//
|
||||
// label nBytes = nElems*sizeof(Type);
|
||||
//
|
||||
// //receiveBuf_.setSize(nBytes, '\0'); // necessary because of expanding
|
||||
// // compression?
|
||||
// receiveBuf_.setSize(nBytes);
|
||||
//
|
||||
// return reinterpret_cast<List<Type>&>(receiveBuf_);
|
||||
// }
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::processorLduInterface::send
|
||||
(
|
||||
@ -92,7 +49,6 @@ void Foam::processorLduInterface::send
|
||||
}
|
||||
else if (commsType == Pstream::nonBlocking)
|
||||
{
|
||||
//setReceiveBuf<Type>(f.size());
|
||||
resizeBuf(receiveBuf_, f.size()*sizeof(Type));
|
||||
|
||||
IPstream::read
|
||||
@ -104,7 +60,6 @@ void Foam::processorLduInterface::send
|
||||
tag()
|
||||
);
|
||||
|
||||
//setSendBuf<Type>(f.size());
|
||||
resizeBuf(sendBuf_, f.byteSize());
|
||||
memcpy(sendBuf_.begin(), f.begin(), f.byteSize());
|
||||
|
||||
@ -187,7 +142,6 @@ void Foam::processorLduInterface::compressedSend
|
||||
|
||||
const scalar *sArray = reinterpret_cast<const scalar*>(f.begin());
|
||||
const scalar *slast = &sArray[nm1];
|
||||
//setSendBuf<float>(nFloats);
|
||||
resizeBuf(sendBuf_, nBytes);
|
||||
float *fArray = reinterpret_cast<float*>(sendBuf_.begin());
|
||||
|
||||
@ -211,7 +165,6 @@ void Foam::processorLduInterface::compressedSend
|
||||
}
|
||||
else if (commsType == Pstream::nonBlocking)
|
||||
{
|
||||
//setReceiveBuf<float>(nFloats);
|
||||
resizeBuf(receiveBuf_, nBytes);
|
||||
|
||||
IPstream::read
|
||||
@ -262,7 +215,6 @@ void Foam::processorLduInterface::compressedReceive
|
||||
|
||||
if (commsType == Pstream::blocking || commsType == Pstream::scheduled)
|
||||
{
|
||||
//setReceiveBuf<float>(nFloats);
|
||||
resizeBuf(receiveBuf_, nBytes);
|
||||
|
||||
IPstream::read
|
||||
@ -311,160 +263,4 @@ Foam::tmp<Foam::Field<Type> > Foam::processorLduInterface::compressedReceive
|
||||
}
|
||||
|
||||
|
||||
// template<class Type>
|
||||
// void Foam::processorLduInterface::compressedBufferSend
|
||||
// (
|
||||
// const Pstream::commsTypes commsType
|
||||
// ) const
|
||||
// {
|
||||
// // Optionally inline compress sendBuf
|
||||
// if
|
||||
// (
|
||||
// sizeof(scalar) > sizeof(float)
|
||||
// && sendBuf_.size()
|
||||
// && Pstream::floatTransfer
|
||||
// )
|
||||
// {
|
||||
// const List<Type>& f = reinterpret_cast<const List<Type>&>(sendBuf_);
|
||||
// label fSize = f.size()/sizeof(Type);
|
||||
//
|
||||
// // Inplace compress
|
||||
// static const label nCmpts = sizeof(Type)/sizeof(scalar);
|
||||
// label nm1 = (fSize - 1)*nCmpts;
|
||||
// label nlast = sizeof(Type)/sizeof(float);
|
||||
// label nFloats = nm1 + nlast;
|
||||
//
|
||||
// const scalar *sArray = reinterpret_cast<const scalar*>(f.begin());
|
||||
// const scalar *slast = &sArray[nm1];
|
||||
// float *fArray = reinterpret_cast<float*>(sendBuf_.begin());
|
||||
//
|
||||
// for (register label i=0; i<nm1; i++)
|
||||
// {
|
||||
// fArray[i] = sArray[i] - slast[i%nCmpts];
|
||||
// }
|
||||
//
|
||||
// reinterpret_cast<Type&>(fArray[nm1]) = f[fSize - 1];
|
||||
//
|
||||
// // Trim
|
||||
// setSendBuf<float>(nFloats);
|
||||
// }
|
||||
//
|
||||
// // Send sendBuf
|
||||
// if (commsType == Pstream::blocking || commsType == Pstream::scheduled)
|
||||
// {
|
||||
// OPstream::write
|
||||
// (
|
||||
// commsType,
|
||||
// neighbProcNo(),
|
||||
// sendBuf_.begin(),
|
||||
// sendBuf_.size(),
|
||||
// tag()
|
||||
// );
|
||||
// }
|
||||
// else if (commsType == Pstream::nonBlocking)
|
||||
// {
|
||||
// setReceiveBuf<char>(sendBuf_.size());
|
||||
//
|
||||
// IPstream::read
|
||||
// (
|
||||
// commsType,
|
||||
// neighbProcNo(),
|
||||
// receiveBuf_.begin(),
|
||||
// receiveBuf_.size(),
|
||||
// tag()
|
||||
// );
|
||||
//
|
||||
// OPstream::write
|
||||
// (
|
||||
// commsType,
|
||||
// neighbProcNo(),
|
||||
// sendBuf_.begin(),
|
||||
// sendBuf_.size(),
|
||||
// tag()
|
||||
// );
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// FatalErrorIn("processorLduInterface::compressedBufferSend")
|
||||
// << "Unsupported communications type " << commsType
|
||||
// << exit(FatalError);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// template<class Type>
|
||||
// const Foam::List<Type>& Foam::processorLduInterface::compressedBufferReceive
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const label size
|
||||
// ) const
|
||||
// {
|
||||
// if (sizeof(scalar) > sizeof(float) && size && Pstream::floatTransfer)
|
||||
// {
|
||||
// static const label nCmpts = sizeof(Type)/sizeof(scalar);
|
||||
// label nm1 = (size - 1)*nCmpts;
|
||||
// label nlast = sizeof(Type)/sizeof(float);
|
||||
// label nFloats = nm1 + nlast;
|
||||
//
|
||||
// if (commsType == Pstream::blocking || commsType == Pstream::scheduled)
|
||||
// {
|
||||
// setReceiveBuf<float>(nFloats);
|
||||
//
|
||||
// IPstream::read
|
||||
// (
|
||||
// commsType,
|
||||
// neighbProcNo(),
|
||||
// receiveBuf_.begin(),
|
||||
// receiveBuf_.size(),
|
||||
// tag()
|
||||
// );
|
||||
// }
|
||||
// else if (commsType != Pstream::nonBlocking)
|
||||
// {
|
||||
// FatalErrorIn("processorLduInterface::compressedBufferReceive")
|
||||
// << "Unsupported communications type " << commsType
|
||||
// << exit(FatalError);
|
||||
// }
|
||||
//
|
||||
// // Inline expand
|
||||
// List<Type>& f = setReceiveBuf<Type>(size);
|
||||
// label fSize = f.size()/sizeof(Type);
|
||||
//
|
||||
// const float *fArray =
|
||||
// reinterpret_cast<const float*>(receiveBuf_.begin());
|
||||
// f[fSize - 1] = reinterpret_cast<const Type&>(fArray[nm1]);
|
||||
// scalar *sArray = reinterpret_cast<scalar*>(f.begin());
|
||||
// const scalar *slast = &sArray[nm1];
|
||||
//
|
||||
// for (register label i=0; i<nm1; i++)
|
||||
// {
|
||||
// sArray[i] = fArray[i] + slast[i%nCmpts];
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (commsType == Pstream::blocking || commsType == Pstream::scheduled)
|
||||
// {
|
||||
// setReceiveBuf<Type>(size);
|
||||
//
|
||||
// IPstream::read
|
||||
// (
|
||||
// commsType,
|
||||
// neighbProcNo(),
|
||||
// receiveBuf_.begin(),
|
||||
// receiveBuf_.size(),
|
||||
// tag()
|
||||
// );
|
||||
// }
|
||||
// else if (commsType != Pstream::nonBlocking)
|
||||
// {
|
||||
// FatalErrorIn("processorLduInterface::compressedBufferReceive")
|
||||
// << "Unsupported communications type " << commsType
|
||||
// << exit(FatalError);
|
||||
// }
|
||||
// }
|
||||
// return reinterpret_cast<List<Type>&>(receiveBuf_);
|
||||
// }
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -36,7 +36,6 @@ SourceFiles
|
||||
#ifndef GAMGInterface_H
|
||||
#define GAMGInterface_H
|
||||
|
||||
//#include "lduInterface.H"
|
||||
#include "autoPtr.H"
|
||||
#include "lduInterfacePtrsList.H"
|
||||
|
||||
|
||||
@ -245,30 +245,6 @@ Foam::cyclicGAMGInterface::~cyclicGAMGInterface()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
//Foam::tmp<Foam::labelField> Foam::cyclicGAMGInterface::transfer
|
||||
//(
|
||||
// const Pstream::commsTypes,
|
||||
// const unallocLabelList& interfaceData
|
||||
//) const
|
||||
//{
|
||||
// notImplemented("cyclicGAMGInterface::transfer(..)");
|
||||
//
|
||||
////XXXXX to be done
|
||||
// tmp<labelField> tpnf(new labelField(size()));
|
||||
// labelField& pnf = tpnf();
|
||||
//
|
||||
// label sizeby2 = size()/2;
|
||||
//
|
||||
// for (label facei=0; facei<sizeby2; facei++)
|
||||
// {
|
||||
// pnf[facei] = interfaceData[facei + sizeby2];
|
||||
// pnf[facei + sizeby2] = interfaceData[facei];
|
||||
// }
|
||||
//
|
||||
// return tpnf;
|
||||
//}
|
||||
|
||||
|
||||
Foam::tmp<Foam::labelField> Foam::cyclicGAMGInterface::internalFieldTransfer
|
||||
(
|
||||
const Pstream::commsTypes,
|
||||
|
||||
@ -96,13 +96,6 @@ public:
|
||||
|
||||
// Interface transfer functions
|
||||
|
||||
// //- Transfer and return neighbour field
|
||||
// virtual tmp<labelField> transfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& interfaceData
|
||||
// ) const;
|
||||
|
||||
//- Transfer and return internal field adjacent to the interface
|
||||
virtual tmp<labelField> internalFieldTransfer
|
||||
(
|
||||
@ -113,12 +106,6 @@ public:
|
||||
|
||||
//- Cyclic interface functions
|
||||
|
||||
// //- Return my index
|
||||
// virtual label patchID() const
|
||||
// {
|
||||
// return fineCyclicInterface_.patchID();
|
||||
// }
|
||||
|
||||
//- Return neigbour processor number
|
||||
virtual label neighbPatchID() const
|
||||
{
|
||||
|
||||
@ -70,46 +70,4 @@ Foam::processorCyclicGAMGInterface::~processorCyclicGAMGInterface()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
// void Foam::processorCyclicGAMGInterface::initTransfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& interfaceData
|
||||
// ) const
|
||||
// {
|
||||
// send(commsType, interfaceData);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// Foam::tmp<Foam::labelField> Foam::processorCyclicGAMGInterface::transfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& interfaceData
|
||||
// ) const
|
||||
// {
|
||||
// return receive<label>(commsType, this->size());
|
||||
// }
|
||||
//
|
||||
//
|
||||
//void Foam::processorCyclicGAMGInterface::initInternalFieldTransfer
|
||||
//(
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& iF
|
||||
//) const
|
||||
//{
|
||||
// send(commsType, interfaceInternalField(iF)());
|
||||
//}
|
||||
//
|
||||
//
|
||||
//Foam::tmp<Foam::labelField> Foam::processorCyclicGAMGInterface::internalFieldTransfer
|
||||
//(
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& iF
|
||||
//) const
|
||||
//{
|
||||
// return receive<label>(commsType, this->size());
|
||||
//}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -52,13 +52,6 @@ class processorCyclicGAMGInterface
|
||||
:
|
||||
public processorGAMGInterface
|
||||
{
|
||||
// Private data
|
||||
|
||||
// //- Reference tor the processorLduInterface from which this is
|
||||
// // agglomerated
|
||||
// const processorLduInterface& fineProcInterface_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
@ -91,65 +84,6 @@ public:
|
||||
|
||||
virtual ~processorCyclicGAMGInterface();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Interface transfer functions
|
||||
|
||||
// //- Initialise interface data transfer
|
||||
// virtual void initTransfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& interfaceData
|
||||
// ) const;
|
||||
//
|
||||
// //- Transfer and return neighbour field
|
||||
// virtual tmp<labelField> transfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& interfaceData
|
||||
// ) const;
|
||||
|
||||
// //- Initialise neighbour field transfer
|
||||
// virtual void initInternalFieldTransfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& iF
|
||||
// ) const;
|
||||
//
|
||||
// //- Transfer and return internal field adjacent to the interface
|
||||
// virtual tmp<labelField> internalFieldTransfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& iF
|
||||
// ) const;
|
||||
//
|
||||
//
|
||||
// //- Processor interface functions
|
||||
//
|
||||
// //- Return processor number
|
||||
// virtual int myProcNo() const
|
||||
// {
|
||||
// return fineProcInterface_.myProcNo();
|
||||
// }
|
||||
//
|
||||
// //- Return neigbour processor number
|
||||
// virtual int neighbProcNo() const
|
||||
// {
|
||||
// return fineProcInterface_.neighbProcNo();
|
||||
// }
|
||||
//
|
||||
// //- Return face transformation tensor
|
||||
// virtual const tensorField& forwardT() const
|
||||
// {
|
||||
// return fineProcInterface_.forwardT();
|
||||
// }
|
||||
//
|
||||
// //- Return message tag used for sending
|
||||
// virtual int tag() const
|
||||
// {
|
||||
// return fineProcInterface_.tag();
|
||||
// }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -238,26 +238,6 @@ Foam::processorGAMGInterface::~processorGAMGInterface()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
// void Foam::processorGAMGInterface::initTransfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& interfaceData
|
||||
// ) const
|
||||
// {
|
||||
// send(commsType, interfaceData);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// Foam::tmp<Foam::labelField> Foam::processorGAMGInterface::transfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& interfaceData
|
||||
// ) const
|
||||
// {
|
||||
// return receive<label>(commsType, this->size());
|
||||
// }
|
||||
|
||||
|
||||
void Foam::processorGAMGInterface::initInternalFieldTransfer
|
||||
(
|
||||
const Pstream::commsTypes commsType,
|
||||
|
||||
@ -96,20 +96,6 @@ public:
|
||||
|
||||
// Interface transfer functions
|
||||
|
||||
// //- Initialise interface data transfer
|
||||
// virtual void initTransfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& interfaceData
|
||||
// ) const;
|
||||
//
|
||||
// //- Transfer and return neighbour field
|
||||
// virtual tmp<labelField> transfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& interfaceData
|
||||
// ) const;
|
||||
|
||||
//- Initialise neighbour field transfer
|
||||
virtual void initInternalFieldTransfer
|
||||
(
|
||||
|
||||
@ -105,12 +105,6 @@ const edgeList& cyclicPointPatch::transformPairs() const
|
||||
}
|
||||
|
||||
|
||||
//const labelList& cyclicPointPatch::separatedPoints() const
|
||||
//{
|
||||
// return separatedPoints_;
|
||||
//}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
@ -160,8 +160,6 @@ public:
|
||||
// neighbour patch.
|
||||
virtual const edgeList& transformPairs() const;
|
||||
|
||||
// //- List of separated coupled points
|
||||
// virtual const labelList& separatedPoints() const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -65,7 +65,6 @@ class processorPointPatch
|
||||
|
||||
mutable labelList reverseMeshPoints_;
|
||||
|
||||
// mutable labelList separatedPoints_;
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
@ -174,9 +173,6 @@ public:
|
||||
//- Return mesh points in the correct order for the receiving side
|
||||
const labelList& reverseMeshPoints() const;
|
||||
|
||||
// //- List of separated coupled points
|
||||
// virtual const labelList& separatedPoints() const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -108,8 +108,6 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
////- List of separated coupled points
|
||||
//virtual const labelList& separatedPoints() const = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -111,23 +111,6 @@ void Foam::coupledPolyPatch::writeOBJ
|
||||
}
|
||||
|
||||
|
||||
//Foam::pointField Foam::coupledPolyPatch::calcFaceCentres
|
||||
//(
|
||||
// const UList<face>& faces,
|
||||
// const pointField& points
|
||||
//)
|
||||
//{
|
||||
// pointField ctrs(faces.size());
|
||||
//
|
||||
// forAll(faces, faceI)
|
||||
// {
|
||||
// ctrs[faceI] = faces[faceI].centre(points);
|
||||
// }
|
||||
//
|
||||
// return ctrs;
|
||||
//}
|
||||
|
||||
|
||||
Foam::pointField Foam::coupledPolyPatch::getAnchorPoints
|
||||
(
|
||||
const UList<face>& faces,
|
||||
|
||||
@ -84,11 +84,6 @@ protected:
|
||||
// absTol : absolute error in normal
|
||||
void calcTransformTensors
|
||||
(
|
||||
// bool& separated,
|
||||
// vector& separation,
|
||||
// bool& parallel,
|
||||
// tensor& forwardT,
|
||||
// tensor& reverseT,
|
||||
const vectorField& Cf,
|
||||
const vectorField& Cr,
|
||||
const vectorField& nf,
|
||||
@ -241,16 +236,6 @@ public:
|
||||
return !owner();
|
||||
}
|
||||
|
||||
// //- Transform a patch-based field from other side to this side.
|
||||
// //!! TDB with macros?
|
||||
// virtual bool doTransform() const = 0;
|
||||
// virtual void transform(scalarField& l) const = 0;
|
||||
// virtual void transform(vectorField& l) const = 0;
|
||||
// virtual void transform(sphericalTensorField& l) const = 0;
|
||||
// virtual void transform(diagTensorField& l) const = 0;
|
||||
// virtual void transform(symmTensorField& l) const = 0;
|
||||
// virtual void transform(tensorField& l) const = 0;
|
||||
|
||||
//- Transform a patch-based position from other side to this side
|
||||
virtual void transformPosition(pointField& l) const = 0;
|
||||
|
||||
@ -291,15 +276,6 @@ public:
|
||||
}
|
||||
|
||||
|
||||
// //- Initialise the calculation of the patch geometry
|
||||
// virtual void initGeometry
|
||||
// (
|
||||
// const primitivePatch& referPatch,
|
||||
// UList<point>& nbrCtrs,
|
||||
// UList<point>& nbrAreas,
|
||||
// UList<point>& nbrCc
|
||||
// ) = 0;
|
||||
|
||||
//- Calculate the patch geometry
|
||||
virtual void calcGeometry
|
||||
(
|
||||
|
||||
@ -839,6 +839,10 @@ const Foam::edgeList& Foam::cyclicPolyPatch::coupledEdges() const
|
||||
// Use the edgeMap to get the edges on the B side.
|
||||
|
||||
const cyclicPolyPatch& neighbPatch = this->neighbPatch();
|
||||
const labelList& nbrMp = neighbPatch.meshPoints();
|
||||
const labelList& mp = meshPoints();
|
||||
|
||||
|
||||
|
||||
coupledEdgesPtr_ = new edgeList(edgeMap.size());
|
||||
edgeList& coupledEdges = *coupledEdgesPtr_;
|
||||
@ -860,9 +864,14 @@ const Foam::edgeList& Foam::cyclicPolyPatch::coupledEdges() const
|
||||
if (iter != edgeMap.end())
|
||||
{
|
||||
label edgeA = iter();
|
||||
const edge& eA = edges()[edgeA];
|
||||
|
||||
// Store correspondence. Filter out edges on wedge axis.
|
||||
if (edgeA != edgeI)
|
||||
if
|
||||
(
|
||||
edge(mp[eA[0]], mp[eA[1]])
|
||||
!= edge(nbrMp[e[0]], nbrMp[e[1]])
|
||||
)
|
||||
{
|
||||
coupledEdges[coupleI++] = edge(edgeA, edgeI);
|
||||
}
|
||||
@ -881,7 +890,7 @@ const Foam::edgeList& Foam::cyclicPolyPatch::coupledEdges() const
|
||||
{
|
||||
const edge& e = coupledEdges[i];
|
||||
|
||||
if (e[0] == e[1] || e[0] < 0 || e[1] < 0)
|
||||
if (e[0] < 0 || e[1] < 0)
|
||||
{
|
||||
FatalErrorIn("cyclicPolyPatch::coupledEdges() const")
|
||||
<< "Problem : at position " << i
|
||||
|
||||
@ -48,7 +48,6 @@ SourceFiles
|
||||
|
||||
#include "coupledPolyPatch.H"
|
||||
#include "edgeList.H"
|
||||
//#include "transform.H"
|
||||
#include "polyBoundaryMesh.H"
|
||||
#include "diagTensorField.H"
|
||||
|
||||
@ -353,81 +352,12 @@ public:
|
||||
// calculation!
|
||||
const edgeList& coupledEdges() const;
|
||||
|
||||
// //- Transform a patch-based field from other side to this side.
|
||||
// template<class T>
|
||||
// void transform(Field<T>& l) const
|
||||
// {
|
||||
// if (!parallel())
|
||||
// {
|
||||
// transform(forwardT_, l);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// virtual bool doTransform() const
|
||||
// {
|
||||
// return !parallel();
|
||||
// }
|
||||
// virtual void transform(scalarField& l) const
|
||||
// {
|
||||
// transform(l);
|
||||
// }
|
||||
// virtual void transform(vectorField& l) const
|
||||
// {
|
||||
// transform(l);
|
||||
// }
|
||||
// virtual void transform(sphericalTensorField& l) const
|
||||
// {
|
||||
// transform(l);
|
||||
// }
|
||||
// virtual void transform(diagTensorField& l) const
|
||||
// {
|
||||
// transform(l);
|
||||
// }
|
||||
// virtual void transform(symmTensorField& l) const
|
||||
// {
|
||||
// transform(l);
|
||||
// }
|
||||
// virtual void transform(tensorField& l) const
|
||||
// {
|
||||
// transform(l);
|
||||
// }
|
||||
|
||||
//- Transform a patch-based position from other side to this side
|
||||
virtual void transformPosition(pointField& l) const;
|
||||
|
||||
|
||||
// Transformation
|
||||
|
||||
// //- Are the coupled planes separated
|
||||
// virtual bool separated() const
|
||||
// {
|
||||
// return separated_;
|
||||
// }
|
||||
//
|
||||
// virtual const vector& separation() const
|
||||
// {
|
||||
// return separation_;
|
||||
// }
|
||||
//
|
||||
// //- Are the cyclic planes parallel
|
||||
// virtual bool parallel() const
|
||||
// {
|
||||
// return parallel_;
|
||||
// }
|
||||
//
|
||||
// //- Return face transformation tensor
|
||||
// virtual const tensor& forwardT() const
|
||||
// {
|
||||
// return forwardT_;
|
||||
// }
|
||||
//
|
||||
// //- Return neighbour-cell transformation tensor
|
||||
// virtual const tensor& reverseT() const
|
||||
// {
|
||||
// return reverseT_;
|
||||
// }
|
||||
|
||||
label transformGlobalFace(const label facei) const
|
||||
{
|
||||
label offset = facei-start();
|
||||
|
||||
@ -85,19 +85,6 @@ protected:
|
||||
//- Initialise the calculation of the patch geometry
|
||||
void initGeometry(PstreamBuffers&);
|
||||
|
||||
// //- Initialise the calculation of the patch geometry with externally
|
||||
// // provided geometry
|
||||
// virtual void initGeometry
|
||||
// (
|
||||
// const primitivePatch& referPatch,
|
||||
// UList<point>&,
|
||||
// UList<point>&,
|
||||
// UList<point>&
|
||||
// )
|
||||
// {
|
||||
// notImplemented("processorPolyPatch::initGeometry(..)");
|
||||
// }
|
||||
|
||||
//- Calculate the patch geometry
|
||||
void calcGeometry(PstreamBuffers&);
|
||||
|
||||
@ -296,63 +283,10 @@ public:
|
||||
return Pstream::msgType();
|
||||
}
|
||||
|
||||
// //- Transform a patch-based field from other side to this side.
|
||||
// virtual bool doTransform() const
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// virtual void transform(scalarField& l) const
|
||||
// {}
|
||||
// virtual void transform(vectorField& l) const
|
||||
// {}
|
||||
// virtual void transform(sphericalTensorField& l) const
|
||||
// {}
|
||||
// virtual void transform(diagTensorField& l) const
|
||||
// {}
|
||||
// virtual void transform(symmTensorField& l) const
|
||||
// {}
|
||||
// virtual void transform(tensorField& l) const
|
||||
// {}
|
||||
|
||||
//- Transform a patch-based position from other side to this side
|
||||
virtual void transformPosition(pointField& l) const
|
||||
{}
|
||||
|
||||
// //- Are the planes separated.
|
||||
// virtual bool separated() const
|
||||
// {
|
||||
// //notImplemented("processorPolyPatch::separated(..)");
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// //- If the planes are separated the separation vector.
|
||||
// virtual const vector& separation() const
|
||||
// {
|
||||
// //notImplemented("processorPolyPatch::separation(..)");
|
||||
// return vector::zero;
|
||||
// }
|
||||
//
|
||||
// //- Are the cyclic planes parallel.
|
||||
// virtual bool parallel() const
|
||||
// {
|
||||
// //notImplemented("processorPolyPatch::parallel()");
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// //- Return face transformation tensor.
|
||||
// virtual const tensor& forwardT() const
|
||||
// {
|
||||
// notImplemented("processorPolyPatch::forwardT(..)");
|
||||
// return tensor::zero;
|
||||
// }
|
||||
//
|
||||
// //- Return neighbour-cell transformation tensor.
|
||||
// virtual const tensor& reverseT() const
|
||||
// {
|
||||
// notImplemented("processorPolyPatch::reverseT(..)");
|
||||
// return tensor::zero;
|
||||
// }
|
||||
|
||||
//- Initialize ordering for primitivePatch. Does not
|
||||
// refer to *this (except for name() and type() etc.)
|
||||
virtual void initOrder(PstreamBuffers&, const primitivePatch&) const;
|
||||
|
||||
@ -87,12 +87,6 @@ class polyPatch
|
||||
mutable labelList* mePtr_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
// //- Calculate labels of mesh edges
|
||||
// void calcMeshEdges() const;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
@ -108,10 +108,6 @@ cyclicFvPatchField<Type>::cyclicFvPatchField
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
// Pout<< "Construct from dictionary for " << p.name() << endl
|
||||
// << "Underlying cyclic:" << cyclicPatch_.name()
|
||||
// << " with parallel:" << cyclicPatch_.parallel() << endl;
|
||||
|
||||
this->evaluate(Pstream::blocking);
|
||||
}
|
||||
|
||||
|
||||
@ -43,7 +43,6 @@ processorCyclicFvPatchField<Type>::processorCyclicFvPatchField
|
||||
const DimensionedField<Type, volMesh>& iF
|
||||
)
|
||||
:
|
||||
//coupledFvPatchField<Type>(p, iF),
|
||||
processorFvPatchField<Type>(p, iF),
|
||||
procPatch_(refCast<const processorCyclicFvPatch>(p))
|
||||
{}
|
||||
|
||||
@ -131,21 +131,6 @@ public:
|
||||
const unallocLabelList& internalData
|
||||
) const = 0;
|
||||
|
||||
// //- Initialise interface data transfer
|
||||
// virtual void initTransfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& interfaceData
|
||||
// ) const
|
||||
// {}
|
||||
//
|
||||
// //- Transfer and return neighbour field
|
||||
// virtual tmp<labelField> transfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& interfaceData
|
||||
// ) const = 0;
|
||||
|
||||
//- Initialise neighbour field transfer
|
||||
virtual void initInternalFieldTransfer
|
||||
(
|
||||
|
||||
@ -136,30 +136,6 @@ tmp<labelField> cyclicFvPatch::interfaceInternalField
|
||||
}
|
||||
|
||||
|
||||
//- Would need other side data!
|
||||
// tmp<labelField> cyclicFvPatch::transfer
|
||||
// (
|
||||
// const Pstream::commsTypes,
|
||||
// const unallocLabelList& interfaceData
|
||||
// ) const
|
||||
// {
|
||||
// notImplemented("cyclicFvPatch::transfer(..)");
|
||||
//
|
||||
// tmp<labelField> tpnf(new labelField(this->size()));
|
||||
// labelField& pnf = tpnf();
|
||||
//
|
||||
// label sizeby2 = this->size()/2;
|
||||
//
|
||||
// for (label facei=0; facei<sizeby2; facei++)
|
||||
// {
|
||||
// pnf[facei] = interfaceData[facei + sizeby2];
|
||||
// pnf[facei + sizeby2] = interfaceData[facei];
|
||||
// }
|
||||
//
|
||||
// return tpnf;
|
||||
// }
|
||||
|
||||
|
||||
tmp<labelField> cyclicFvPatch::internalFieldTransfer
|
||||
(
|
||||
const Pstream::commsTypes commsType,
|
||||
|
||||
@ -156,13 +156,6 @@ public:
|
||||
const unallocLabelList& internalData
|
||||
) const;
|
||||
|
||||
// //- Transfer and return neighbour field
|
||||
// virtual tmp<labelField> transfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& interfaceData
|
||||
// ) const;
|
||||
|
||||
//- Return neighbour field
|
||||
virtual tmp<labelField> internalFieldTransfer
|
||||
(
|
||||
|
||||
@ -122,26 +122,6 @@ tmp<labelField> processorFvPatch::interfaceInternalField
|
||||
}
|
||||
|
||||
|
||||
// void processorFvPatch::initTransfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& interfaceData
|
||||
// ) const
|
||||
// {
|
||||
// send(commsType, interfaceData);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// tmp<labelField> processorFvPatch::transfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList&
|
||||
// ) const
|
||||
// {
|
||||
// return receive<label>(commsType, this->size());
|
||||
// }
|
||||
|
||||
|
||||
void processorFvPatch::initInternalFieldTransfer
|
||||
(
|
||||
const Pstream::commsTypes commsType,
|
||||
|
||||
@ -123,18 +123,6 @@ public:
|
||||
return procPolyPatch_;
|
||||
}
|
||||
|
||||
// //- Are the planes separated.
|
||||
// virtual bool separated() const
|
||||
// {
|
||||
// return procPolyPatch_.separated();
|
||||
// }
|
||||
//
|
||||
// //- If the planes are separated the separation vector.
|
||||
// virtual const vector& separation() const
|
||||
// {
|
||||
// return procPolyPatch_.separation();
|
||||
// }
|
||||
//
|
||||
//- Are the cyclic planes parallel
|
||||
virtual bool parallel() const
|
||||
{
|
||||
@ -166,20 +154,6 @@ public:
|
||||
const unallocLabelList& internalData
|
||||
) const;
|
||||
|
||||
// //- Initialise interface data transfer
|
||||
// virtual void initTransfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& interfaceData
|
||||
// ) const;
|
||||
//
|
||||
// //- Transfer and return neighbour field
|
||||
// virtual tmp<labelField> transfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& interfaceData
|
||||
// ) const;
|
||||
|
||||
//- Initialise neighbour field transfer
|
||||
virtual void initInternalFieldTransfer
|
||||
(
|
||||
|
||||
@ -39,130 +39,6 @@ defineTypeNameAndDebug(processorCyclicFvPatch, 0);
|
||||
addToRunTimeSelectionTable(fvPatch, processorCyclicFvPatch, polyPatch);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
//void processorCyclicFvPatch::makeWeights(scalarField& w) const
|
||||
//{
|
||||
// if (Pstream::parRun())
|
||||
// {
|
||||
// // The face normals point in the opposite direction on the other side
|
||||
// scalarField neighbFaceCentresCn
|
||||
// (
|
||||
// (
|
||||
// procPolyPatch_.neighbFaceAreas()
|
||||
// /(mag(procPolyPatch_.neighbFaceAreas()) + VSMALL)
|
||||
// )
|
||||
// & (
|
||||
// procPolyPatch_.neighbFaceCentres()
|
||||
// - procPolyPatch_.neighbFaceCellCentres())
|
||||
// );
|
||||
//
|
||||
// w = neighbFaceCentresCn/((nf()&fvPatch::delta()) + neighbFaceCentresCn);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// w = 1.0;
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//
|
||||
//void processorCyclicFvPatch::makeDeltaCoeffs(scalarField& dc) const
|
||||
//{
|
||||
// if (Pstream::parRun())
|
||||
// {
|
||||
// dc = (1.0 - weights())/(nf() & fvPatch::delta());
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// dc = 1.0/(nf() & fvPatch::delta());
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//
|
||||
//tmp<vectorField> processorCyclicFvPatch::delta() const
|
||||
//{
|
||||
// if (Pstream::parRun())
|
||||
// {
|
||||
// // To the transformation if necessary
|
||||
// if (parallel())
|
||||
// {
|
||||
// return
|
||||
// fvPatch::delta()
|
||||
// - (
|
||||
// procPolyPatch_.neighbFaceCentres()
|
||||
// - procPolyPatch_.neighbFaceCellCentres()
|
||||
// );
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return
|
||||
// fvPatch::delta()
|
||||
// - transform
|
||||
// (
|
||||
// forwardT(),
|
||||
// (
|
||||
// procPolyPatch_.neighbFaceCentres()
|
||||
// - procPolyPatch_.neighbFaceCellCentres()
|
||||
// )
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return fvPatch::delta();
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//
|
||||
//tmp<labelField> processorCyclicFvPatch::interfaceInternalField
|
||||
//(
|
||||
// const unallocLabelList& internalData
|
||||
//) const
|
||||
//{
|
||||
// return patchInternalField(internalData);
|
||||
//}
|
||||
|
||||
|
||||
// void processorCyclicFvPatch::initTransfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& interfaceData
|
||||
// ) const
|
||||
// {
|
||||
// send(commsType, interfaceData);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// tmp<labelField> processorCyclicFvPatch::transfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList&
|
||||
// ) const
|
||||
// {
|
||||
// return receive<label>(commsType, this->size());
|
||||
// }
|
||||
|
||||
|
||||
//void processorCyclicFvPatch::initInternalFieldTransfer
|
||||
//(
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& iF
|
||||
//) const
|
||||
//{
|
||||
// send(commsType, patchInternalField(iF)());
|
||||
//}
|
||||
//
|
||||
//
|
||||
//tmp<labelField> processorCyclicFvPatch::internalFieldTransfer
|
||||
//(
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList&
|
||||
//) const
|
||||
//{
|
||||
// return receive<label>(commsType, this->size());
|
||||
//}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
@ -36,8 +36,6 @@ SourceFiles
|
||||
#ifndef processorCyclicFvPatch_H
|
||||
#define processorCyclicFvPatch_H
|
||||
|
||||
//#include "coupledFvPatch.H"
|
||||
//#include "processorLduInterface.H"
|
||||
#include "processorCyclicPolyPatch.H"
|
||||
#include "processorFvPatch.H"
|
||||
|
||||
@ -52,26 +50,12 @@ namespace Foam
|
||||
|
||||
class processorCyclicFvPatch
|
||||
:
|
||||
// public coupledFvPatch,
|
||||
// public processorLduInterface
|
||||
public processorFvPatch
|
||||
{
|
||||
// Private Data
|
||||
|
||||
const processorCyclicPolyPatch& procPolyPatch_;
|
||||
|
||||
|
||||
//protected:
|
||||
//
|
||||
// // Protected Member functions
|
||||
//
|
||||
// //- Make patch weighting factors
|
||||
// void makeWeights(scalarField&) const;
|
||||
//
|
||||
// //- Make patch face - neighbour cell distances
|
||||
// void makeDeltaCoeffs(scalarField&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
@ -83,7 +67,6 @@ public:
|
||||
//- Construct from components
|
||||
processorCyclicFvPatch(const polyPatch& patch, const fvBoundaryMesh& bm)
|
||||
:
|
||||
// coupledFvPatch(patch, bm),
|
||||
processorFvPatch(patch, bm),
|
||||
procPolyPatch_(refCast<const processorCyclicPolyPatch>(patch))
|
||||
{}
|
||||
@ -91,31 +74,6 @@ public:
|
||||
|
||||
// Member functions
|
||||
|
||||
// //- Return processor number
|
||||
// int myProcNo() const
|
||||
// {
|
||||
// return procPolyPatch_.myProcNo();
|
||||
// }
|
||||
//
|
||||
// //- Return neigbour processor number
|
||||
// int neighbProcNo() const
|
||||
// {
|
||||
// return procPolyPatch_.neighbProcNo();
|
||||
// }
|
||||
//
|
||||
// //- Return true if running parallel
|
||||
// virtual bool coupled() const
|
||||
// {
|
||||
// if (Pstream::parRun())
|
||||
// {
|
||||
// return true;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
|
||||
//- Return message tag used for sending
|
||||
virtual int tag() const
|
||||
{
|
||||
@ -128,19 +86,6 @@ public:
|
||||
return procPolyPatch_;
|
||||
}
|
||||
|
||||
// //- Are the planes separated.
|
||||
// virtual bool separated() const
|
||||
// {
|
||||
// return procPolyPatch_.separated();
|
||||
// }
|
||||
//
|
||||
// //- If the planes are separated the separation vector.
|
||||
// virtual const vector& separation() const
|
||||
// {
|
||||
// return procPolyPatch_.separation();
|
||||
// }
|
||||
//
|
||||
|
||||
//- Are the cyclic planes parallel
|
||||
virtual bool parallel() const
|
||||
{
|
||||
@ -158,48 +103,6 @@ public:
|
||||
{
|
||||
return procPolyPatch_.reverseT();
|
||||
}
|
||||
|
||||
//
|
||||
// //- Return delta (P to N) vectors across coupled patch
|
||||
// virtual tmp<vectorField> delta() const;
|
||||
|
||||
|
||||
// Interface transfer functions
|
||||
|
||||
// //- Return the values of the given internal data adjacent to
|
||||
// // the interface as a field
|
||||
// virtual tmp<labelField> interfaceInternalField
|
||||
// (
|
||||
// const unallocLabelList& internalData
|
||||
// ) const;
|
||||
|
||||
// //- Initialise interface data transfer
|
||||
// virtual void initTransfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& interfaceData
|
||||
// ) const;
|
||||
//
|
||||
// //- Transfer and return neighbour field
|
||||
// virtual tmp<labelField> transfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& interfaceData
|
||||
// ) const;
|
||||
|
||||
// //- Initialise neighbour field transfer
|
||||
// virtual void initInternalFieldTransfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& internalData
|
||||
// ) const;
|
||||
//
|
||||
// //- Return neighbour field
|
||||
// virtual tmp<labelField> internalFieldTransfer
|
||||
// (
|
||||
// const Pstream::commsTypes commsType,
|
||||
// const unallocLabelList& internalData
|
||||
// ) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user