foamNewApp: added an example createFields.H file

This commit is contained in:
Chris Greenshields
2021-07-08 11:53:07 +01:00
parent 8c44964f60
commit 407ad7ca9e
3 changed files with 19 additions and 1 deletions

View File

@ -3,7 +3,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | Website: https://openfoam.org
# \\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
# \\ / A nd | Copyright (C) 2015-2021 OpenFOAM Foundation
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
@ -79,4 +79,7 @@ echo "Creating Make subdirectory" && mkdir "${app}/Make"
sed "s#NAME#${app}#g" "${dir}/Make/files" > "${app}/Make/files"
cp "${dir}/Make/options" "${app}/Make"
echo "Copying example createFields.H file" && \
cp "${dir}/createFields.H" "${app}"
#------------------------------------------------------------------------------

View File

@ -36,6 +36,8 @@ int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -0,0 +1,13 @@
Info<< "Reading field p\n" << endl;
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);