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-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
12
13Description
14 Create a dynamicFvMesh, with init()
15
16Required Variables
17 - runTime [Time]
18
19Provided Variables
20 - mesh [dynamicFvMesh], meshPtr
21
22\*---------------------------------------------------------------------------*/
23
25
26{
27 Foam::Info << "Create dynamic mesh for time = "
28 << runTime.timeName() << Foam::nl;
29
30 meshPtr = dynamicFvMesh::New
31 (
32 IOobject
33 (
34 polyMesh::defaultRegion,
35 runTime.timeName(),
36 runTime,
37 IOobject::MUST_READ
38 )
39 );
40}
41
42
43dynamicFvMesh& 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
47mesh.update();
48
51
52// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
dynamicFvMesh & mesh
Foam::autoPtr< Foam::dynamicFvMesh > meshPtr
engineTime & runTime
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:372
constexpr char nl
The newline '\n' character (0x0a)
Definition: Ostream.H:53