createUpdatedDynamicFvMesh.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2017 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
12 
13 Description
14  Create a dynamicFvMesh, with init()
15 
16 Required Variables
17  - runTime [Time]
18 
19 Provided Variables
20  - mesh [dynamicFvMesh], meshPtr
21 
22 \*---------------------------------------------------------------------------*/
23 
25 
26 {
27  Foam::Info << "Create dynamic mesh for time = "
28  << runTime.timeName() << Foam::nl;
29 
31  (
32  IOobject
33  (
34  polyMesh::defaultRegion,
35  runTime.timeName(),
36  runTime,
37  IOobject::MUST_READ
38  )
39  );
40 }
41 
42 
43 dynamicFvMesh& mesh = meshPtr();
44 
45 // Calculate initial mesh-to-mesh mapping. Note that this should be
46 // done under the hood, e.g. as a MeshObject
47 mesh.update();
48 
50 
51 
52 // ************************************************************************* //
Foam::autoPtr< Foam::dynamicFvMesh > meshPtr
constexpr char nl
The newline &#39;\n&#39; character (0x0a)
Definition: Ostream.H:50
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:531
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
dynamicFvMesh & mesh
messageStream Info
Information stream (stdout output on master, null elsewhere)
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48