Loading...
Searching...
No Matches
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-2023 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 Classes
18 - Foam::fvMesh
19
20Required Variables
21 - args [argList]
22 - runTime [Time]
23
24Provided Variables
25 - regionName [word]
26 - mesh [fvMesh]
27
28\*---------------------------------------------------------------------------*/
30// "getRegionOption.H"
32(
33 args.getOrDefault<word>("region", Foam::polyMesh::defaultRegion)
34);
35
37 Foam::Info << "Create mesh";
39 {
40 Foam::Info << ' ' << regionName;
41 }
42 Foam::Info << " for time = " << runTime.timeName() << Foam::nl;
43}
44
45
47(
49 (
51 runTime.timeName(),
52 runTime,
54 ),
55 false
56);
57
58mesh.init(true); // Initialise all (lower levels and current)
59
61
62
63// ************************************************************************* //
@ MUST_READ
Reading required.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition IOobject.H:191
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
static const word & regionName(const word &region)
The mesh region name or word::null if polyMesh::defaultRegion.
Definition polyMesh.C:796
static word defaultRegion
Return the default region name.
Definition polyMesh.H:406
A class for handling words, derived from Foam::string.
Definition word.H:66
dynamicFvMesh & mesh
engineTime & runTime
Foam::word regionName(args.getOrDefault< word >("region", Foam::polyMesh::defaultRegion))
Foam::word regionName(args.getOrDefault< word >("region", 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:519
constexpr char nl
The newline '\n' character (0x0a).
Definition Ostream.H:50
Foam::argList args(argc, argv)