# PhasicFlow: src/phasicFlow/repository/Time/Time.cpp Source File

Time.cpp
Go to the documentation of this file.
/*------------------------------- phasicFlow ---------------------------------
O C enter of
O O E ngineering and
O O M ultiscale modeling of
OOOOOOO F luid flow
------------------------------------------------------------------------------
Copyright (C): www.cemf.ir
email: hamid.r.norouzi AT gmail.com
------------------------------------------------------------------------------
Licence:
This file is part of phasicFlow code. It is a free software for simulating
granular and multiphase flows. You can redistribute it and/or modify it under
the terms of GNU General Public License v3 or any other later versions.
phasicFlow is distributed to help others in their research in the field of
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------------------------------------------------------------------------*/
#include "Time.hpp"
#include "dictionary.hpp"
#include "vocabs.hpp"
pFlow::Time::Time
(
repository* owner,
const dictionary& setiingsDict
)
:
repository("Time", "", owner),
timeControl(setiingsDict),
geometry_
(
geometryRepository_,
geometryFolder__,
this
),
integration_
(
integrationRepository__,
integrationFolder__,
this
)
{
}
pFlow::Time::Time(
repository* owner,
dictionary& setiingsDict,
real startTime,
real endTime,
real saveInterval,
word startTimeName)
:
repository("Time", "", owner),
timeControl(
setiingsDict,
startTime,
endTime,
saveInterval,
startTimeName),
geometry_
(
geometryRepository_,
geometryFolder__,
this
),
integration_
(
integrationRepository__,
integrationFolder__,
this
)
{
}
bool pFlow::Time::write
(
bool verbose
) const
{
if(outputToFile())
{
REPORT(0)<<"\nWriting to file at time: "<< cyanText(timeName())<<endREPORT;
return repository::write(verbose);
}
return true;
}
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