Time.hpp
Go to the documentation of this file.
1 /*------------------------------- phasicFlow ---------------------------------
2  O C enter of
3  O O E ngineering and
4  O O M ultiscale modeling of
5  OOOOOOO F luid flow
6 ------------------------------------------------------------------------------
7  Copyright (C): www.cemf.ir
8  email: hamid.r.norouzi AT gmail.com
9 ------------------------------------------------------------------------------
10 Licence:
11  This file is part of phasicFlow code. It is a free software for simulating
12  granular and multiphase flows. You can redistribute it and/or modify it under
13  the terms of GNU General Public License v3 or any other later versions.
14 
15  phasicFlow is distributed to help others in their research in the field of
16  granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
17  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 
19 -----------------------------------------------------------------------------*/
20 
21 
22 #ifndef __Time_hpp__
23 #define __Time_hpp__
24 
25 
26 #include "types.hpp"
27 #include "error.hpp"
28 
29 #include "timeControl.hpp"
30 #include "repository.hpp"
31 
32 
33 
34 namespace pFlow
35 {
36 
37 class dictionary;
38 
39 class Time
40 :
41  public repository,
42  public timeControl
43 {
44 
45 protected:
46 
47  // - geometry folder/repository
49 
50  // - integration folder/repository
52 
53 public:
54 
55  // Constructor with owner and settings dict
56  Time( repository* owner, const dictionary& setiingsDict);
57 
58  Time(
59  repository* owner,
60  dictionary& setiingsDict,
61  real startTime,
62  real endTime,
63  real saveInterval,
64  word startTimeName);
65 
66 
68  virtual fileSystem localPath()const
69  {
70  return timeName();
71  }
72 
73  // - geometry repository
74  const repository& geometry()const
75  {
76  return geometry_;
77  }
78 
80  {
81  return geometry_;
82  }
83 
84  const repository& integration()const
85  {
86  return integration_;
87  }
88 
90  {
91  return integration_;
92  }
93  // override the base write to manage write operation
94  // based on the valid write time intervals
95  virtual bool write(bool verbose = false) const;
96 
97 };
98 
99 } // pFlow
100 
101 #endif // __Time_hpp__
pFlow::real
float real
Definition: builtinTypes.hpp:46
pFlow::Time::localPath
virtual fileSystem localPath() const
Definition: Time.hpp:68
types.hpp
pFlow::repository::owner
const repository * owner() const
Definition: repository.cpp:73
pFlow::word
std::string word
Definition: builtinTypes.hpp:63
pFlow::Time::geometry
const repository & geometry() const
Definition: Time.hpp:74
pFlow::Time::integration
repository & integration()
Definition: Time.hpp:89
pFlow::Time::integration
const repository & integration() const
Definition: Time.hpp:84
pFlow::Time::geometry
repository & geometry()
Definition: Time.hpp:79
pFlow
Definition: demComponent.hpp:28
pFlow::Time::write
virtual bool write(bool verbose=false) const
Definition: Time.cpp:82
pFlow::fileSystem
Definition: fileSystem.hpp:63
repository.hpp
pFlow::timeControl::timeName
word timeName() const
Definition: timeControl.cpp:103
timeControl.hpp
pFlow::timeControl
Definition: timeControl.hpp:37
pFlow::Time::integration_
repository integration_
Definition: Time.hpp:51
pFlow::Time::Time
Time(repository *owner, const dictionary &setiingsDict)
Definition: Time.cpp:27
pFlow::Time::geometry_
repository geometry_
Definition: Time.hpp:48
pFlow::timeControl::startTime
real startTime() const
Definition: timeControl.hpp:124
pFlow::repository
Definition: repository.hpp:34
pFlow::dictionary
Definition: dictionary.hpp:38
error.hpp
pFlow::Time
Definition: Time.hpp:39