29 #include "surfaceInterpolate.H" 44 namespace fvMeshTopoChangers
54 void Foam::fvMeshTopoChangers::meshToMesh::interpolateUfs()
58 HashTable<surfaceVectorField*> Ufs
60 mesh().lookupClass<surfaceVectorField>()
63 forAllIter(HashTable<surfaceVectorField*>, Ufs, iter)
88 times_(dict.
lookup(
"times")),
89 timeDelta_(dict.
lookup<scalar>(
"timeDelta")),
94 timeIndices_.insert(
label(times_[i]/timeDelta_));
109 if (timeIndex_ == -1)
111 const_cast<Time&
>(
mesh().time()).functionObjects().append
115 "meshToMeshAdjustTimeStep",
122 bool hasChanged =
false;
127 timeIndex_ =
mesh().time().timeIndex();
136 if (timeIndices_.found((userTime + timeDelta_/2)/timeDelta_))
138 const word meshDir =
"meshToMesh_" +
mesh().time().timeName(userTime);
140 Info <<
"Mapping to mesh " << meshDir <<
endl;
149 mesh().time().constant(),
161 if (cuttingPatches_.size())
164 forAll(cuttingPatches_, i)
166 cuttingPatchTable.
insert(cuttingPatches_[i]);
178 && !isA<processorPolyPatch>(pbm[i])
189 cellVolumeWeightMethod::typeName,
200 cellVolumeWeightMethod::typeName
204 mesh().reset(newMesh);
206 mesh().deltaCoeffs();
209 #define mapVolFieldType(Type, nullArg) \ 210 MeshToMeshMapVolFields<Type>(mapper); 214 #define NaNSurfaceFieldType(Type, nullArg) \ 216 <Type, fvsPatchField, surfaceMesh, fvPatchFieldMapper>(mapper); 220 #define NaNPointFieldType(Type, nullArg) \ 222 <Type, pointPatchField, pointMesh, pointPatchFieldMapper>(mapper); A HashTable with keys but without contents.
Return the vol-field velocity corresponding to a given surface-field velocity.
Adjusts time-step for meshToMesh mapping.
#define forAll(list, i)
Loop across all elements in list.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const word & name() const
Return name.
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define mapVolFieldType(Type, nullArg)
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
Ostream & endl(Ostream &os)
Add newline and flush stream.
const volVectorField & surfaceToVolVelocity(const surfaceVectorField &Uf)
Get the cell velocity field corresponding to a given face velocity, or a.
Class to calculate the cell-addressing between two overlapping meshes.
static const List< T > & null()
Return a null List.
addToRunTimeSelectionTable(fvMeshTopoChanger, list, fvMesh)
GeometricField< vector, fvPatchField, volMesh > volVectorField
bool insert(const Key &key)
Insert a new entry.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Macros for easy insertion into run-time selection tables.
virtual bool update()
Update the mesh for both mesh motion and topology change.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
bool isNull(const T &t)
Return true if t is a reference to the nullObject of type T.
virtual void distribute(const polyDistributionMap &)
Update corresponding to the given distribution map.
bool found(const Key &) const
Return true if hashedEntry is found in table.
A class for handling words, derived from string.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
faceListList boundary(nPatches)
An STL-conforming hash table.
virtual ~meshToMesh()
Destructor.
virtual void topoChange(const polyTopoChangeMap &)
Update corresponding to the given map.
word name(const complex &)
Return a string representation of a complex.
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
meshToMesh(fvMesh &, const dictionary &dict)
Construct from fvMesh and dictionary.
#define NaNSurfaceFieldType(Type, nullArg)
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
Mesh data needed to do the Finite Volume discretisation.
FOR_ALL_FIELD_TYPES(DefineFvWallInfoType)
Class containing mesh-to-mesh mapping information.
#define NaNPointFieldType(Type, nullArg)
An abstract class for the user time description.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
defineTypeNameAndDebug(list, 0)
Abstract base class for fvMesh movers.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.