Time.cpp
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 #include "Time.hpp"
23 #include "dictionary.hpp"
24 #include "vocabs.hpp"
25 
27 (
28  repository* owner,
29  const dictionary& setiingsDict
30 )
31 :
32  repository("Time", "", owner),
33  timeControl(setiingsDict),
34  geometry_
35  (
38  this
39  ),
40  integration_
41  (
44  this
45  )
46 {
47 
48 }
49 
51  repository* owner,
52  dictionary& setiingsDict,
53  real startTime,
54  real endTime,
55  real saveInterval,
56  word startTimeName)
57 :
58  repository("Time", "", owner),
60  setiingsDict,
61  startTime,
62  endTime,
63  saveInterval,
64  startTimeName),
65  geometry_
66  (
69  this
70  ),
71  integration_
72  (
75  this
76  )
77 {
78 
79 }
80 
82 (
83  bool verbose
84 ) const
85 {
86  if(outputToFile())
87  {
88  REPORT(0)<<"\nWriting to file at time: "<< cyanText(timeName())<<endREPORT;
89  return repository::write(verbose);
90  }
91  return true;
92 }
endREPORT
#define endREPORT
Definition: streams.hpp:41
pFlow::real
float real
Definition: builtinTypes.hpp:46
REPORT
#define REPORT(n)
Definition: streams.hpp:40
cyanText
#define cyanText(text)
Definition: streams.hpp:34
pFlow::word
std::string word
Definition: builtinTypes.hpp:63
pFlow::repository::write
virtual bool write(bool verbose=false) const
Definition: repository.cpp:239
pFlow::Time::write
virtual bool write(bool verbose=false) const
Definition: Time.cpp:82
pFlow::geometryFolder__
const char * geometryFolder__
Definition: vocabs.hpp:33
dictionary.hpp
pFlow::timeControl
Definition: timeControl.hpp:37
Time.hpp
pFlow::integrationRepository__
const char * integrationRepository__
Definition: vocabs.hpp:35
pFlow::Time::Time
Time(repository *owner, const dictionary &setiingsDict)
Definition: Time.cpp:27
pFlow::integrationFolder__
const char * integrationFolder__
Definition: vocabs.hpp:36
pFlow::repository
Definition: repository.hpp:34
vocabs.hpp
pFlow::geometryRepository_
const char * geometryRepository_
Definition: vocabs.hpp:34
pFlow::dictionary
Definition: dictionary.hpp:38