mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
GIT: Initial commit after latest foundation merge
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -106,11 +106,11 @@ void Foam::cellVolumeWeightMethod::calculateAddressing
|
||||
label srcCellI = srcSeedI;
|
||||
label tgtCellI = tgtSeedI;
|
||||
|
||||
List<DynamicList<label> > srcToTgtAddr(src_.nCells());
|
||||
List<DynamicList<scalar> > srcToTgtWght(src_.nCells());
|
||||
List<DynamicList<label>> srcToTgtAddr(src_.nCells());
|
||||
List<DynamicList<scalar>> srcToTgtWght(src_.nCells());
|
||||
|
||||
List<DynamicList<label> > tgtToSrcAddr(tgt_.nCells());
|
||||
List<DynamicList<scalar> > tgtToSrcWght(tgt_.nCells());
|
||||
List<DynamicList<label>> tgtToSrcAddr(tgt_.nCells());
|
||||
List<DynamicList<scalar>> tgtToSrcWght(tgt_.nCells());
|
||||
|
||||
// list of tgt cell neighbour cells
|
||||
DynamicList<label> nbrTgtCells(10);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -93,6 +93,11 @@ protected:
|
||||
labelList& seedCells
|
||||
) const;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private member functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
cellVolumeWeightMethod(const cellVolumeWeightMethod&);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -110,8 +110,8 @@ void Foam::directMethod::calculateAddressing
|
||||
// store a list of src cells already mapped
|
||||
labelList srcTgtSeed(src_.nCells(), -1);
|
||||
|
||||
List<DynamicList<label> > srcToTgt(src_.nCells());
|
||||
List<DynamicList<label> > tgtToSrc(tgt_.nCells());
|
||||
List<DynamicList<label>> srcToTgt(src_.nCells());
|
||||
List<DynamicList<label>> tgtToSrc(tgt_.nCells());
|
||||
|
||||
DynamicList<label> srcSeeds(10);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -98,6 +98,11 @@ protected:
|
||||
label& tgtSeedI
|
||||
) const;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private member functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
directMethod(const directMethod&);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -102,8 +102,8 @@ void Foam::mapNearestMethod::calculateAddressing
|
||||
label& startSeedI
|
||||
)
|
||||
{
|
||||
List<DynamicList<label> > srcToTgt(src_.nCells());
|
||||
List<DynamicList<label> > tgtToSrc(tgt_.nCells());
|
||||
List<DynamicList<label>> srcToTgt(src_.nCells());
|
||||
List<DynamicList<label>> tgtToSrc(tgt_.nCells());
|
||||
|
||||
const scalarField& srcVc = src_.cellVolumes();
|
||||
const scalarField& tgtVc = tgt_.cellVolumes();
|
||||
@ -284,7 +284,7 @@ void Foam::mapNearestMethod::setNextNearestCells
|
||||
Foam::label Foam::mapNearestMethod::findMappedSrcCell
|
||||
(
|
||||
const label tgtCellI,
|
||||
const List<DynamicList<label> >& tgtToSrc
|
||||
const List<DynamicList<label>>& tgtToSrc
|
||||
) const
|
||||
{
|
||||
DynamicList<label> testCells(10);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -108,7 +108,7 @@ protected:
|
||||
virtual label findMappedSrcCell
|
||||
(
|
||||
const label tgtCellI,
|
||||
const List<DynamicList<label> >& tgtToSrc
|
||||
const List<DynamicList<label>>& tgtToSrc
|
||||
) const;
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
/*---------------------------------------------------------------------------* \
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -109,6 +109,11 @@ protected:
|
||||
scalarListList& tgtToTgtWght
|
||||
) const;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private member functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
meshToMeshMethod(const meshToMeshMethod&);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -581,7 +581,7 @@ void Foam::meshToMesh::calculate(const word& methodName)
|
||||
);
|
||||
|
||||
// cache maps and reset addresses
|
||||
List<Map<label> > cMap;
|
||||
List<Map<label>> cMap;
|
||||
srcMapPtr_.reset
|
||||
(
|
||||
new mapDistribute(globalSrcCells, tgtToSrcCellAddr_, cMap)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -416,7 +416,7 @@ public:
|
||||
//- Return the src field mapped to the tgt mesh with a defined
|
||||
// operation. Initial values of the result are set to zero
|
||||
template<class Type, class CombineOp>
|
||||
tmp<Field<Type> > mapSrcToTgt
|
||||
tmp<Field<Type>> mapSrcToTgt
|
||||
(
|
||||
const Field<Type>& srcFld,
|
||||
const CombineOp& cop
|
||||
@ -425,16 +425,16 @@ public:
|
||||
//- Convenience function to map a tmp field to the tgt mesh
|
||||
// with a defined operation
|
||||
template<class Type, class CombineOp>
|
||||
tmp<Field<Type> > mapSrcToTgt
|
||||
tmp<Field<Type>> mapSrcToTgt
|
||||
(
|
||||
const tmp<Field<Type> >& tsrcFld,
|
||||
const tmp<Field<Type>>& tsrcFld,
|
||||
const CombineOp& cop
|
||||
) const;
|
||||
|
||||
//- Convenience function to map a field to the tgt mesh with a
|
||||
// default operation (plusEqOp)
|
||||
template<class Type>
|
||||
tmp<Field<Type> > mapSrcToTgt
|
||||
tmp<Field<Type>> mapSrcToTgt
|
||||
(
|
||||
const Field<Type>& srcFld
|
||||
) const;
|
||||
@ -442,9 +442,9 @@ public:
|
||||
//- Convenience function to map a tmp field to the tgt mesh
|
||||
// with a default operation (plusEqOp)
|
||||
template<class Type>
|
||||
tmp<Field<Type> > mapSrcToTgt
|
||||
tmp<Field<Type>> mapSrcToTgt
|
||||
(
|
||||
const tmp<Field<Type> >& tsrcFld
|
||||
const tmp<Field<Type>>& tsrcFld
|
||||
) const;
|
||||
|
||||
|
||||
@ -479,7 +479,7 @@ public:
|
||||
//- Return the tgt field mapped to the src mesh with a defined
|
||||
// operation. Initial values of the result are set to zero
|
||||
template<class Type, class CombineOp>
|
||||
tmp<Field<Type> > mapTgtToSrc
|
||||
tmp<Field<Type>> mapTgtToSrc
|
||||
(
|
||||
const Field<Type>& tgtFld,
|
||||
const CombineOp& cop
|
||||
@ -488,16 +488,16 @@ public:
|
||||
//- Convenience function to map a tmp field to the src mesh
|
||||
// with a defined operation
|
||||
template<class Type, class CombineOp>
|
||||
tmp<Field<Type> > mapTgtToSrc
|
||||
tmp<Field<Type>> mapTgtToSrc
|
||||
(
|
||||
const tmp<Field<Type> >& ttgtFld,
|
||||
const tmp<Field<Type>>& ttgtFld,
|
||||
const CombineOp& cop
|
||||
) const;
|
||||
|
||||
//- Convenience function to map a field to the src mesh with a
|
||||
// default operation (plusEqOp)
|
||||
template<class Type>
|
||||
tmp<Field<Type> > mapTgtToSrc
|
||||
tmp<Field<Type>> mapTgtToSrc
|
||||
(
|
||||
const Field<Type>& tgtFld
|
||||
) const;
|
||||
@ -505,9 +505,9 @@ public:
|
||||
//- Convenience function to map a tmp field to the src mesh
|
||||
// with a default operation (plusEqOp)
|
||||
template<class Type>
|
||||
tmp<Field<Type> > mapTgtToSrc
|
||||
tmp<Field<Type>> mapTgtToSrc
|
||||
(
|
||||
const tmp<Field<Type> >& ttgtFld
|
||||
const tmp<Field<Type>>& ttgtFld
|
||||
) const;
|
||||
|
||||
|
||||
@ -529,7 +529,7 @@ public:
|
||||
//- Interpolate a field with a defined operation. The initial
|
||||
// values of the result are set to zero
|
||||
template<class Type, class CombineOp>
|
||||
tmp<GeometricField<Type, fvPatchField, volMesh> > mapSrcToTgt
|
||||
tmp<GeometricField<Type, fvPatchField, volMesh>> mapSrcToTgt
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& field,
|
||||
const CombineOp& cop,
|
||||
@ -539,9 +539,9 @@ public:
|
||||
//- Interpolate a tmp field with a defined operation. The
|
||||
// initial values of the result are set to zero
|
||||
template<class Type, class CombineOp>
|
||||
tmp<GeometricField<Type, fvPatchField, volMesh> > mapSrcToTgt
|
||||
tmp<GeometricField<Type, fvPatchField, volMesh>> mapSrcToTgt
|
||||
(
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh> >&
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh>>&
|
||||
tfield,
|
||||
const CombineOp& cop,
|
||||
const bool secondOrder = true
|
||||
@ -550,7 +550,7 @@ public:
|
||||
//- Convenience function to map a field with a default
|
||||
// operation (plusEqOp)
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvPatchField, volMesh> > mapSrcToTgt
|
||||
tmp<GeometricField<Type, fvPatchField, volMesh>> mapSrcToTgt
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& field,
|
||||
const bool secondOrder = true
|
||||
@ -559,9 +559,9 @@ public:
|
||||
//- Convenience function to map a tmp field with a default
|
||||
// operation (plusEqOp)
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvPatchField, volMesh> > mapSrcToTgt
|
||||
tmp<GeometricField<Type, fvPatchField, volMesh>> mapSrcToTgt
|
||||
(
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh> >&
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh>>&
|
||||
tfield,
|
||||
const bool secondOrder = true
|
||||
) const;
|
||||
@ -585,7 +585,7 @@ public:
|
||||
//- Interpolate a field with a defined operation. The initial
|
||||
// values of the result are set to zero
|
||||
template<class Type, class CombineOp>
|
||||
tmp<GeometricField<Type, fvPatchField, volMesh> > mapTgtToSrc
|
||||
tmp<GeometricField<Type, fvPatchField, volMesh>> mapTgtToSrc
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& field,
|
||||
const CombineOp& cop,
|
||||
@ -595,9 +595,9 @@ public:
|
||||
//- Interpolate a tmp field with a defined operation. The
|
||||
// initial values of the result are set to zero
|
||||
template<class Type, class CombineOp>
|
||||
tmp<GeometricField<Type, fvPatchField, volMesh> > mapTgtToSrc
|
||||
tmp<GeometricField<Type, fvPatchField, volMesh>> mapTgtToSrc
|
||||
(
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh> >&
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh>>&
|
||||
tfield,
|
||||
const CombineOp& cop,
|
||||
const bool secondOrder = true
|
||||
@ -606,7 +606,7 @@ public:
|
||||
//- Convenience function to map a field with a default
|
||||
// operation (plusEqOp)
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvPatchField, volMesh> > mapTgtToSrc
|
||||
tmp<GeometricField<Type, fvPatchField, volMesh>> mapTgtToSrc
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& field,
|
||||
const bool secondOrder = true
|
||||
@ -615,9 +615,9 @@ public:
|
||||
//- Convenience function to map a tmp field with a default
|
||||
// operation (plusEqOp)
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvPatchField, volMesh> > mapTgtToSrc
|
||||
tmp<GeometricField<Type, fvPatchField, volMesh>> mapTgtToSrc
|
||||
(
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh> >&
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh>>&
|
||||
tfield,
|
||||
const bool secondOrder = true
|
||||
) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -64,7 +64,7 @@ Foam::label Foam::meshToMesh::calcDistribution
|
||||
procI = -1;
|
||||
if (debug)
|
||||
{
|
||||
Info<< "meshToMesh::calcDistribution: "
|
||||
InfoInFunction
|
||||
<< "Meshes split across multiple processors" << endl;
|
||||
}
|
||||
}
|
||||
@ -73,7 +73,7 @@ Foam::label Foam::meshToMesh::calcDistribution
|
||||
procI = findIndex(cellsPresentOnProc, 1);
|
||||
if (debug)
|
||||
{
|
||||
Info<< "meshToMesh::calcDistribution: "
|
||||
InfoInFunction
|
||||
<< "Meshes local to processor" << procI << endl;
|
||||
}
|
||||
}
|
||||
@ -143,7 +143,8 @@ Foam::autoPtr<Foam::mapDistribute> Foam::meshToMesh::calcProcMap
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Info<< "Determining extent of src mesh per processor:" << nl
|
||||
InfoInFunction
|
||||
<< "Determining extent of src mesh per processor:" << nl
|
||||
<< "\tproc\tbb" << endl;
|
||||
forAll(procBb, procI)
|
||||
{
|
||||
@ -161,7 +162,7 @@ Foam::autoPtr<Foam::mapDistribute> Foam::meshToMesh::calcProcMap
|
||||
|
||||
{
|
||||
// per processor indices into all segments to send
|
||||
List<DynamicList<label> > dynSendMap(Pstream::nProcs());
|
||||
List<DynamicList<label>> dynSendMap(Pstream::nProcs());
|
||||
label iniSize = floor(tgt.nCells()/Pstream::nProcs());
|
||||
|
||||
forAll(dynSendMap, procI)
|
||||
@ -584,7 +585,7 @@ void Foam::meshToMesh::distributeAndMergeCells
|
||||
|
||||
// Count any coupled faces
|
||||
typedef FixedList<label, 3> label3;
|
||||
typedef HashTable<label, label3, label3::Hash<> > procCoupleInfo;
|
||||
typedef HashTable<label, label3, label3::Hash<>> procCoupleInfo;
|
||||
procCoupleInfo procFaceToGlobalCell;
|
||||
|
||||
forAll(allNbrProcIDs, procI)
|
||||
@ -648,17 +649,14 @@ void Foam::meshToMesh::distributeAndMergeCells
|
||||
forAll(allPoints, procI)
|
||||
{
|
||||
const pointField& pts = allPoints[procI];
|
||||
SubList<point>(tgtPoints, pts.size(), pointOffset[procI]).assign(pts);
|
||||
SubList<point>(tgtPoints, pts.size(), pointOffset[procI]) = pts;
|
||||
}
|
||||
|
||||
// Insert cellIDs
|
||||
forAll(allTgtCellIDs, procI)
|
||||
{
|
||||
const labelList& cellIDs = allTgtCellIDs[procI];
|
||||
SubList<label>(tgtCellIDs, cellIDs.size(), cellOffset[procI]).assign
|
||||
(
|
||||
cellIDs
|
||||
);
|
||||
SubList<label>(tgtCellIDs, cellIDs.size(), cellOffset[procI]) = cellIDs;
|
||||
}
|
||||
|
||||
|
||||
@ -675,7 +673,7 @@ void Foam::meshToMesh::distributeAndMergeCells
|
||||
allNInternalFaces[procI],
|
||||
internalFaceOffset[procI]
|
||||
);
|
||||
slice.assign(SubList<face>(fcs, allNInternalFaces[procI]));
|
||||
slice = SubList<face>(fcs, allNInternalFaces[procI]);
|
||||
forAll(slice, i)
|
||||
{
|
||||
add(slice[i], pointOffset[procI]);
|
||||
@ -687,7 +685,7 @@ void Foam::meshToMesh::distributeAndMergeCells
|
||||
allNInternalFaces[procI],
|
||||
internalFaceOffset[procI]
|
||||
);
|
||||
ownSlice.assign(SubField<label>(faceOs, allNInternalFaces[procI]));
|
||||
ownSlice = SubField<label>(faceOs, allNInternalFaces[procI]);
|
||||
add(ownSlice, cellOffset[procI]);
|
||||
|
||||
SubField<label> nbrSlice
|
||||
@ -696,7 +694,7 @@ void Foam::meshToMesh::distributeAndMergeCells
|
||||
allNInternalFaces[procI],
|
||||
internalFaceOffset[procI]
|
||||
);
|
||||
nbrSlice.assign(SubField<label>(faceNs, allNInternalFaces[procI]));
|
||||
nbrSlice = SubField<label>(faceNs, allNInternalFaces[procI]);
|
||||
add(nbrSlice, cellOffset[procI]);
|
||||
|
||||
internalFaceOffset[procI] += allNInternalFaces[procI];
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -112,6 +112,7 @@ void Foam::meshToMesh::mapSrcToTgt
|
||||
|
||||
if (srcAddress.size())
|
||||
{
|
||||
// result[cellI] = Zero;
|
||||
result[cellI] *= (1.0 - sum(srcWeight));
|
||||
forAll(srcAddress, i)
|
||||
{
|
||||
@ -131,6 +132,7 @@ void Foam::meshToMesh::mapSrcToTgt
|
||||
|
||||
if (srcAddress.size())
|
||||
{
|
||||
// result[cellI] = Zero;
|
||||
result[cellI] *= (1.0 - sum(srcWeight));
|
||||
forAll(srcAddress, i)
|
||||
{
|
||||
@ -239,31 +241,31 @@ void Foam::meshToMesh::mapSrcToTgt
|
||||
|
||||
|
||||
template<class Type, class CombineOp>
|
||||
Foam::tmp<Foam::Field<Type> > Foam::meshToMesh::mapSrcToTgt
|
||||
Foam::tmp<Foam::Field<Type>> Foam::meshToMesh::mapSrcToTgt
|
||||
(
|
||||
const Field<Type>& srcField,
|
||||
const CombineOp& cop
|
||||
) const
|
||||
{
|
||||
tmp<Field<Type> > tresult
|
||||
tmp<Field<Type>> tresult
|
||||
(
|
||||
new Field<Type>
|
||||
(
|
||||
tgtToSrcCellAddr_.size(),
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
);
|
||||
|
||||
mapSrcToTgt(srcField, cop, tresult());
|
||||
mapSrcToTgt(srcField, cop, tresult.ref());
|
||||
|
||||
return tresult;
|
||||
}
|
||||
|
||||
|
||||
template<class Type, class CombineOp>
|
||||
Foam::tmp<Foam::Field<Type> > Foam::meshToMesh::mapSrcToTgt
|
||||
Foam::tmp<Foam::Field<Type>> Foam::meshToMesh::mapSrcToTgt
|
||||
(
|
||||
const tmp<Field<Type> >& tsrcField,
|
||||
const tmp<Field<Type>>& tsrcField,
|
||||
const CombineOp& cop
|
||||
) const
|
||||
{
|
||||
@ -272,7 +274,7 @@ Foam::tmp<Foam::Field<Type> > Foam::meshToMesh::mapSrcToTgt
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::Field<Type> > Foam::meshToMesh::mapSrcToTgt
|
||||
Foam::tmp<Foam::Field<Type>> Foam::meshToMesh::mapSrcToTgt
|
||||
(
|
||||
const Field<Type>& srcField
|
||||
) const
|
||||
@ -282,9 +284,9 @@ Foam::tmp<Foam::Field<Type> > Foam::meshToMesh::mapSrcToTgt
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::Field<Type> > Foam::meshToMesh::mapSrcToTgt
|
||||
Foam::tmp<Foam::Field<Type>> Foam::meshToMesh::mapSrcToTgt
|
||||
(
|
||||
const tmp<Field<Type> >& tsrcField
|
||||
const tmp<Field<Type>>& tsrcField
|
||||
) const
|
||||
{
|
||||
return mapSrcToTgt(tsrcField());
|
||||
@ -444,31 +446,31 @@ void Foam::meshToMesh::mapTgtToSrc
|
||||
|
||||
|
||||
template<class Type, class CombineOp>
|
||||
Foam::tmp<Foam::Field<Type> > Foam::meshToMesh::mapTgtToSrc
|
||||
Foam::tmp<Foam::Field<Type>> Foam::meshToMesh::mapTgtToSrc
|
||||
(
|
||||
const Field<Type>& tgtField,
|
||||
const CombineOp& cop
|
||||
) const
|
||||
{
|
||||
tmp<Field<Type> > tresult
|
||||
tmp<Field<Type>> tresult
|
||||
(
|
||||
new Field<Type>
|
||||
(
|
||||
srcToTgtCellAddr_.size(),
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
);
|
||||
|
||||
mapTgtToSrc(tgtField, cop, tresult());
|
||||
mapTgtToSrc(tgtField, cop, tresult.ref());
|
||||
|
||||
return tresult;
|
||||
}
|
||||
|
||||
|
||||
template<class Type, class CombineOp>
|
||||
Foam::tmp<Foam::Field<Type> > Foam::meshToMesh::mapTgtToSrc
|
||||
Foam::tmp<Foam::Field<Type>> Foam::meshToMesh::mapTgtToSrc
|
||||
(
|
||||
const tmp<Field<Type> >& ttgtField,
|
||||
const tmp<Field<Type>>& ttgtField,
|
||||
const CombineOp& cop
|
||||
) const
|
||||
{
|
||||
@ -477,7 +479,7 @@ Foam::tmp<Foam::Field<Type> > Foam::meshToMesh::mapTgtToSrc
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::Field<Type> > Foam::meshToMesh::mapTgtToSrc
|
||||
Foam::tmp<Foam::Field<Type>> Foam::meshToMesh::mapTgtToSrc
|
||||
(
|
||||
const Field<Type>& tgtField
|
||||
) const
|
||||
@ -487,9 +489,9 @@ Foam::tmp<Foam::Field<Type> > Foam::meshToMesh::mapTgtToSrc
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::Field<Type> > Foam::meshToMesh::mapTgtToSrc
|
||||
Foam::tmp<Foam::Field<Type>> Foam::meshToMesh::mapTgtToSrc
|
||||
(
|
||||
const tmp<Field<Type> >& ttgtField
|
||||
const tmp<Field<Type>>& ttgtField
|
||||
) const
|
||||
{
|
||||
return mapTgtToSrc(ttgtField(), plusEqOp<Type>());
|
||||
@ -592,7 +594,6 @@ void Foam::meshToMesh::mapSrcToTgt
|
||||
// tgtField
|
||||
tgtField.rmap(tnewTgt(), identity(tgtField.size()));
|
||||
|
||||
|
||||
// Override value to account for CombineOp (note: is dummy template
|
||||
// specialisation for plusEqOp)
|
||||
mapAndOpSrcToTgt(AMIList[i], srcField, tgtField, cop);
|
||||
@ -608,7 +609,7 @@ void Foam::meshToMesh::mapSrcToTgt
|
||||
|
||||
|
||||
template<class Type, class CombineOp>
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
|
||||
Foam::meshToMesh::mapSrcToTgt
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& field,
|
||||
@ -624,7 +625,7 @@ Foam::meshToMesh::mapSrcToTgt
|
||||
const typename fieldType::GeometricBoundaryField& srcBfld =
|
||||
field.boundaryField();
|
||||
|
||||
PtrList<fvPatchField<Type> > tgtPatchFields(tgtBm.size());
|
||||
PtrList<fvPatchField<Type>> tgtPatchFields(tgtBm.size());
|
||||
|
||||
// constuct tgt boundary patch types as copy of 'field' boundary types
|
||||
// note: this will provide place holders for fields with additional
|
||||
@ -687,22 +688,22 @@ Foam::meshToMesh::mapSrcToTgt
|
||||
),
|
||||
tgtMesh,
|
||||
field.dimensions(),
|
||||
Field<Type>(tgtMesh.nCells(), pTraits<Type>::zero),
|
||||
Field<Type>(tgtMesh.nCells(), Zero),
|
||||
tgtPatchFields
|
||||
)
|
||||
);
|
||||
|
||||
mapSrcToTgt(field, cop, tresult(), secondOrder);
|
||||
mapSrcToTgt(field, cop, tresult.ref(), secondOrder);
|
||||
|
||||
return tresult;
|
||||
}
|
||||
|
||||
|
||||
template<class Type, class CombineOp>
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
|
||||
Foam::meshToMesh::mapSrcToTgt
|
||||
(
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tfield,
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh>>& tfield,
|
||||
const CombineOp& cop,
|
||||
const bool secondOrder
|
||||
) const
|
||||
@ -712,7 +713,7 @@ Foam::meshToMesh::mapSrcToTgt
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
|
||||
Foam::meshToMesh::mapSrcToTgt
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& field,
|
||||
@ -724,7 +725,7 @@ Foam::meshToMesh::mapSrcToTgt
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
|
||||
Foam::meshToMesh::mapSrcToTgt
|
||||
(
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tfield,
|
||||
@ -804,7 +805,6 @@ void Foam::meshToMesh::mapTgtToSrc
|
||||
fvPatchField<Type>& srcField = result.boundaryField()[srcPatchI];
|
||||
const fvPatchField<Type>& tgtField = field.boundaryField()[tgtPatchI];
|
||||
|
||||
|
||||
// Clone and map (since rmap does not do general mapping)
|
||||
tmp<fvPatchField<Type> > tnewSrc
|
||||
(
|
||||
@ -831,7 +831,6 @@ void Foam::meshToMesh::mapTgtToSrc
|
||||
// tgtField
|
||||
srcField.rmap(tnewSrc(), identity(srcField.size()));
|
||||
|
||||
|
||||
// Override value to account for CombineOp (could be dummy for
|
||||
// plusEqOp)
|
||||
mapAndOpTgtToSrc(AMIList[i], srcField, tgtField, cop);
|
||||
@ -847,7 +846,7 @@ void Foam::meshToMesh::mapTgtToSrc
|
||||
|
||||
|
||||
template<class Type, class CombineOp>
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
|
||||
Foam::meshToMesh::mapTgtToSrc
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& field,
|
||||
@ -863,7 +862,7 @@ Foam::meshToMesh::mapTgtToSrc
|
||||
const typename fieldType::GeometricBoundaryField& tgtBfld =
|
||||
field.boundaryField();
|
||||
|
||||
PtrList<fvPatchField<Type> > srcPatchFields(srcBm.size());
|
||||
PtrList<fvPatchField<Type>> srcPatchFields(srcBm.size());
|
||||
|
||||
// constuct src boundary patch types as copy of 'field' boundary types
|
||||
// note: this will provide place holders for fields with additional
|
||||
@ -926,22 +925,22 @@ Foam::meshToMesh::mapTgtToSrc
|
||||
),
|
||||
srcMesh,
|
||||
field.dimensions(),
|
||||
Field<Type>(srcMesh.nCells(), pTraits<Type>::zero),
|
||||
Field<Type>(srcMesh.nCells(), Zero),
|
||||
srcPatchFields
|
||||
)
|
||||
);
|
||||
|
||||
mapTgtToSrc(field, cop, tresult(), secondOrder);
|
||||
mapTgtToSrc(field, cop, tresult.ref(), secondOrder);
|
||||
|
||||
return tresult;
|
||||
}
|
||||
|
||||
|
||||
template<class Type, class CombineOp>
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
|
||||
Foam::meshToMesh::mapTgtToSrc
|
||||
(
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tfield,
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh>>& tfield,
|
||||
const CombineOp& cop,
|
||||
const bool secondOrder
|
||||
) const
|
||||
@ -951,7 +950,7 @@ Foam::meshToMesh::mapTgtToSrc
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
|
||||
Foam::meshToMesh::mapTgtToSrc
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& field,
|
||||
@ -963,10 +962,10 @@ Foam::meshToMesh::mapTgtToSrc
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
|
||||
Foam::meshToMesh::mapTgtToSrc
|
||||
(
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tfield,
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh>>& tfield,
|
||||
const bool secondOrder
|
||||
) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user