writeFreeSurface.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) 2019 Zeljko Tukovic, FSB Zagreb.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::writeFreeSurface
28
29Description
30 A function object to write the control points on the free surface
31
32SourceFiles
33 writeFreeSurface.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef writeFreeSurface_H
38#define writeFreeSurface_H
39
40#include "functionObject.H"
41#include "dictionary.H"
42#include "fvMesh.H"
43#include "OFstream.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49
50/*---------------------------------------------------------------------------*\
51 Class writeFreeSurface Declaration
52\*---------------------------------------------------------------------------*/
55:
56 public functionObject
57{
58 // Private Data
59
60 //- Name
61 const word name_;
62
63 //- Reference to main object registry
64 const Time& time_;
65
66 //- Region name
67 word regionName_;
68
69
70 // Private Member Functions
71
72 //- Write data
73 bool writeData();
74
75 //- No copy construct
76 writeFreeSurface(const writeFreeSurface&) = delete;
77
78 //- No copy assignment
79 void operator=(const writeFreeSurface&) = delete;
80
81public:
82
83 //- Runtime type information
84 TypeName("writeFreeSurface");
85
86
87 // Constructors
88
89 //- Construct from components
91 (
92 const word& name,
93 const Time& runTime,
94 const dictionary& dict
95 );
96
97
98 // Member Functions
99
100 //- start is called at the start of the time-loop
101 virtual bool start();
102
103 //- execute is called at each ++ or += of the time-loop
104 virtual bool execute();
105
106 //- Read and set the function object if its data has changed
107 virtual bool read(const dictionary& dict);
108
109 //- No-op
110 virtual bool write()
111 {
112 return true;
113 }
114};
115
116
117// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118
119} // End namespace Foam
120
121// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122
123#endif
124
125// ************************************************************************* //
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Abstract base-class for Time/database function objects.
const word & name() const noexcept
Return the name of this functionObject.
A class for handling words, derived from Foam::string.
Definition: word.H:68
A function object to write the control points on the free surface.
virtual bool write()
No-op.
virtual bool read(const dictionary &dict)
Read and set the function object if its data has changed.
virtual bool start()
start is called at the start of the time-loop
TypeName("writeFreeSurface")
Runtime type information.
virtual bool execute()
execute is called at each ++ or += of the time-loop
engineTime & runTime
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73