mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
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:
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user