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-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
13
14Description
15 Create a fvMesh for a specified region, or the defaultRegion
16
17Required Variables
18 - args [argList]
19 - runTime [Time]
20
21Provided 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;
37
38
40(
42 (
44 runTime.timeName(),
45 runTime,
47 ),
48 false
49);
50
51mesh.init(true); // Initialise all (lower levels and current)
52
54
55
56// ************************************************************************* //
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:170
bool readIfPresent(const word &optName, T &val) const
Read a value from the named option if present.
Definition: argListI.H:323
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
static word defaultRegion
Return the default region name.
Definition: polyMesh.H:321
A class for handling words, derived from Foam::string.
Definition: word.H:68
dynamicFvMesh & mesh
engineTime & runTime
Foam::word regionName(Foam::polyMesh::defaultRegion)
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
Foam::argList args(argc, argv)