createNamedMesh.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) 2011 OpenFOAM Foundation
9  Copyright (C) 2021 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 fvMesh for a specified region, or the defaultRegion
16 
17 Required Variables
18  - args [argList]
19  - runTime [Time]
20 
21 Provided Variables
22  - regionName [word]
23  - mesh [fvMesh]
24 
25 \*---------------------------------------------------------------------------*/
26 
28 
29 {
30  Foam::Info << "Create mesh";
31  if (args.readIfPresent("region", regionName))
32  {
33  Foam::Info << ' ' << regionName;
34  }
35  Foam::Info << " for time = " << runTime.timeName() << Foam::nl;
36 }
37 
38 
40 (
42  (
43  regionName,
44  runTime.timeName(),
45  runTime,
47  ),
48  false
49 );
50 
51 mesh.init(true); // Initialise all (lower levels and current)
52 
54 
55 
56 // ************************************************************************* //
constexpr char nl
The newline &#39;\n&#39; character (0x0a)
Definition: Ostream.H:49
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:487
Foam::word regionName(Foam::polyMesh::defaultRegion)
dynamicFvMesh & mesh
A class for handling words, derived from Foam::string.
Definition: word.H:63
static word defaultRegion
Return the default region name.
Definition: polyMesh.H:397
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:79
messageStream Info
Information stream (stdout output on master, null elsewhere)
bool readIfPresent(const word &optName, T &val) const
Read a value from the named option if present.
Definition: argListI.H:316
Foam::argList args(argc, argv)
Defines the attributes of an object for which implicit objectRegistry management is supported...
Definition: IOobject.H:166