mapFields: Reinstated mapFields from OpenFOAM-2.2.x and renamed the current mapFields -> mapFieldsPar

This required the addition of the meshToMesh class in the sampling
library from OpenFOAM-2.2.x which is now named meshToMesh0.
This commit is contained in:
Henry
2015-05-26 11:32:46 +01:00
parent 526d7efeb0
commit 71c6af8fe9
45 changed files with 3804 additions and 278 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -35,7 +35,7 @@ Description
#include "cloud.H"
#include "GeometricField.H"
#include "meshToMesh.H"
#include "meshToMesh0.H"
#include "IOobjectList.H"
#include "CompactIOField.H"
@ -51,18 +51,19 @@ void MapLagrangianFields
(
const string& cloudName,
const IOobjectList& objects,
const polyMesh& meshTarget,
const meshToMesh0& meshToMesh0Interp,
const labelList& addParticles
)
{
const fvMesh& meshTarget = meshToMesh0Interp.toMesh();
{
IOobjectList fields = objects.lookupClass(IOField<Type>::typeName);
forAllIter(IOobjectList, fields, fieldIter)
{
const word& fieldName = fieldIter()->name();
Info<< " mapping lagrangian field " << fieldName << endl;
Info<< " mapping lagrangian field "
<< fieldIter()->name() << endl;
// Read field (does not need mesh)
IOField<Type> fieldSource(*fieldIter());
@ -72,7 +73,7 @@ void MapLagrangianFields
(
IOobject
(
fieldName,
fieldIter()->name(),
meshTarget.time().timeName(),
cloud::prefix/cloudName,
meshTarget,
@ -99,9 +100,8 @@ void MapLagrangianFields
forAllIter(IOobjectList, fieldFields, fieldIter)
{
const word& fieldName = fieldIter()->name();
Info<< " mapping lagrangian fieldField " << fieldName << endl;
Info<< " mapping lagrangian fieldField "
<< fieldIter()->name() << endl;
// Read field (does not need mesh)
IOField<Field<Type> > fieldSource(*fieldIter());
@ -112,7 +112,7 @@ void MapLagrangianFields
(
IOobject
(
fieldName,
fieldIter()->name(),
meshTarget.time().timeName(),
cloud::prefix/cloudName,
meshTarget,