createNamedDynamicFvMesh.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) 2012 OpenFOAM Foundation
9  Copyright (C) 2022-2023 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
13 
14 Description
15  Create a dynamicFvMesh for a specified region, or the defaultRegion
16 
17 Required Classes
18  - Foam::dynamicFvMesh
19 
20 Required Variables
21  - args [argList]
22  - runTime [Time]
23 
24 Provided Variables
25  - regionName [word]
26  - mesh [dynamicFvMesh]
27  - meshPtr [autoPtr<dynamicFvMesh>]
28 
29 \*---------------------------------------------------------------------------*/
30 
32 
33 // "getRegionOption.H"
35 (
37 );
38 
39 {
40  Foam::Info << "Create dynamic mesh";
42  {
43  Foam::Info << ' ' << regionName;
44  }
45  Foam::Info << " for time = " << runTime.timeName() << Foam::nl;
46 
48  (
50  (
51  regionName,
52  runTime.timeName(),
53  runTime,
55  )
56  );
57 }
58 
60 
62 
63 
64 // ************************************************************************* //
const word & regionName() const
The mesh region name or word::null if polyMesh::defaultRegion.
Definition: polyMesh.C:847
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
T getOrDefault(const word &optName, const T &deflt) const
Get a value from the named option if present, or return default.
Definition: argListI.H:300
dynamicFvMesh & mesh
Foam::autoPtr< Foam::dynamicFvMesh > meshPtr
A class for handling words, derived from Foam::string.
Definition: word.H:63
static word defaultRegion
Return the default region name.
Definition: polyMesh.H:405
Foam::word regionName(args.getOrDefault< word >("region", Foam::polyMesh::defaultRegion))
Abstract base class for geometry and/or topology changing fvMesh.
Definition: dynamicFvMesh.H:74
static autoPtr< dynamicFvMesh > New(const IOobject &io)
Select, construct and return the dynamicFvMesh.
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
Foam::argList args(argc, argv)
Defines the attributes of an object for which implicit objectRegistry management is supported...
Definition: IOobject.H:172