Skip to content
Snippets Groups Projects
Commit 09ee2342 authored by andy's avatar andy
Browse files

STYLE: Updated header documentation

parent f4d592c3
No related merge requests found
...@@ -469,7 +469,7 @@ public: ...@@ -469,7 +469,7 @@ public:
) const; ) const;
//- Interpolate from target to source with supplied binary op //- Interpolate from target to source with supplied op
template<class Type, class CombineOp> template<class Type, class CombineOp>
tmp<Field<Type> > interpolateToSource tmp<Field<Type> > interpolateToSource
( (
...@@ -477,8 +477,7 @@ public: ...@@ -477,8 +477,7 @@ public:
const CombineOp& cop const CombineOp& cop
) const; ) const;
//- Interpolate from target tmp field to source with supplied //- Interpolate from target tmp field to source with supplied op
// binary op
template<class Type, class CombineOp> template<class Type, class CombineOp>
tmp<Field<Type> > interpolateToSource tmp<Field<Type> > interpolateToSource
( (
......
...@@ -52,12 +52,11 @@ void Foam::meshToMeshNew::calcMapNearest ...@@ -52,12 +52,11 @@ void Foam::meshToMeshNew::calcMapNearest
do do
{ {
srcToTgt[srcCellI].append(tgtCellI);
// find nearest tgt cell // find nearest tgt cell
findNearestCell(src, tgt, srcCellI, tgtCellI); findNearestCell(src, tgt, srcCellI, tgtCellI);
// store src/tgt cell pair // store src/tgt cell pair
srcToTgt[srcCellI].append(tgtCellI);
tgtToSrc[tgtCellI].append(srcCellI); tgtToSrc[tgtCellI].append(srcCellI);
// mark source cell srcCellI and tgtCellI as matched // mark source cell srcCellI and tgtCellI as matched
...@@ -108,12 +107,7 @@ void Foam::meshToMeshNew::calcMapNearest ...@@ -108,12 +107,7 @@ void Foam::meshToMeshNew::calcMapNearest
forAll(tgtToSrcCellAddr_, i) forAll(tgtToSrcCellAddr_, i)
{ {
scalar v = tgtVc[i]; scalar v = tgtVc[i];
scalarList w(tgtToSrc[i].size(), v); tgtToSrcCellWght_[i] = scalarList(tgtToSrc[i].size(), v);
forAll(w, j)
{
w[j] /= w.size();
}
tgtToSrcCellWght_[i] = scalarList(w, v);
tgtToSrcCellAddr_[i].transfer(tgtToSrc[i]); tgtToSrcCellAddr_[i].transfer(tgtToSrc[i]);
} }
} }
...@@ -239,4 +233,5 @@ Foam::label Foam::meshToMeshNew::findMappedSrcCell ...@@ -239,4 +233,5 @@ Foam::label Foam::meshToMeshNew::findMappedSrcCell
return -1; return -1;
} }
// ************************************************************************* // // ************************************************************************* //
...@@ -27,6 +27,15 @@ Class ...@@ -27,6 +27,15 @@ Class
Description Description
Class to calculate the cell-addressing between two overlapping meshes Class to calculate the cell-addressing between two overlapping meshes
Three methods are currently available:
- direct : 1-to-1 mapping between meshes
- mapNearest : assign nearest cell values without interpolation
- cellVolumeWeight : volume consistent mapping
The \c direct and \c cellVolumeWeight options are volume conservative,
whereas mapNearest is non-conservative.
SourceFiles SourceFiles
calcDirect.C calcDirect.C
calcMapNearest.C calcMapNearest.C
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment