# PhasicFlow: src/phasicFlow/repository/Time/baseTimeControl.hpp Source File
PhasicFlow is an open-source parallel DEM (discrete element method) package for simulating granular flow. It is developed in C++ and can be exectued on both GPU (like CUDA) and CPU.

baseTimeControl.hpp
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.
-----------------------------------------------------------------------------*/
#ifndef __baseTimeControl_hpp__
#define __baseTimeControl_hpp__
#include "dictionary.hpp"
#include "ranges.hpp"
namespace pFlow
{
class baseTimeControl
{
private:
bool isTimeStep_;
int32StridedRagne iRange_;
realStridedRange rRange_;
const word intervalPrefix_;
public:
baseTimeControl(
const dictionary& dict,
const word& intervalPrefix = "",
real defStartTime = 0.0
);
baseTimeControl(
int32 start,
int32 end,
int32 stride,
const word& intervalPrefix = ""
);
inline bool isTimeStep() const
{
return isTimeStep_;
}
bool timeEvent(uint32 iter, real t, real dt) const;
bool isInRange(uint32 iter, real t, real dt) const;
real startTime() const;
real endTime() const;
real rInterval() const;
int32 startIter() const;
int32 endIter() const;
int32 iInterval() const;
bool write(dictionary& dict) const;
};
}
#endif
pFlow::baseTimeControl::iRange_
int32StridedRagne iRange_
Definition: baseTimeControl.hpp:35
pFlow::baseTimeControl::endIter
int32 endIter() const
Definition: baseTimeControl.cpp:155
pFlow::baseTimeControl::startIter
int32 startIter() const
Definition: baseTimeControl.cpp:143
pFlow::real
float real
Definition: builtinTypes.hpp:45
pFlow::uint32
unsigned int uint32
Definition: builtinTypes.hpp:56
pFlow::baseTimeControl::timeEvent
bool timeEvent(uint32 iter, real t, real dt) const
Definition: baseTimeControl.cpp:78
pFlow::word
std::string word
Definition: builtinTypes.hpp:64
pFlow::stridedRange< int32 >
pFlow::baseTimeControl::startTime
real startTime() const
Definition: baseTimeControl.cpp:105
pFlow
Definition: demGeometry.hpp:27
pFlow::int32
int int32
Definition: builtinTypes.hpp:50
pFlow::baseTimeControl::iInterval
int32 iInterval() const
Definition: baseTimeControl.cpp:167
pFlow::baseTimeControl::endTime
real endTime() const
Definition: baseTimeControl.cpp:118
pFlow::baseTimeControl::write
bool write(dictionary &dict) const
Definition: baseTimeControl.cpp:179
dictionary.hpp
pFlow::baseTimeControl
Definition: baseTimeControl.hpp:29
pFlow::baseTimeControl::isTimeStep
bool isTimeStep() const
Definition: baseTimeControl.hpp:56
pFlow::baseTimeControl::isInRange
bool isInRange(uint32 iter, real t, real dt) const
Definition: baseTimeControl.cpp:92
ranges.hpp
pFlow::baseTimeControl::rInterval
real rInterval() const
Definition: baseTimeControl.cpp:131
pFlow::baseTimeControl::rRange_
realStridedRange rRange_
Definition: baseTimeControl.hpp:37
pFlow::baseTimeControl::isTimeStep_
bool isTimeStep_
Definition: baseTimeControl.hpp:33
pFlow::baseTimeControl::intervalPrefix_
const word intervalPrefix_
Definition: baseTimeControl.hpp:39
pFlow::baseTimeControl::baseTimeControl
baseTimeControl(const dictionary &dict, const word &intervalPrefix="", real defStartTime=0.0)
Definition: baseTimeControl.cpp:25
pFlow::dictionary
Dictionary holds a set of data entries or sub-dictionaries that are enclosed in a curely braces or ar...
Definition: dictionary.hpp:67