# PhasicFlow: src/MotionModel/entities/conveyorBelt/conveyorBelt.cpp 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.

conveyorBelt.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 "conveyorBelt.hpp"
#include "dictionary.hpp"
FUNCTION_H
pFlow::conveyorBelt::conveyorBelt(const dictionary& dict)
{
if(!read(dict))
{
fatalErrorInFunction<<
" error in reading conveyorBelt from dictionary "<< dict.globalName()<<endl;
fatalExit;
}
}
FUNCTION_H
bool pFlow::conveyorBelt::read(const dictionary& dict)
{
tangentVelocity_ = dict.getVal<realx3>("tangentVelocity");
return true;
}
FUNCTION_H
bool pFlow::conveyorBelt::write(dictionary& dict) const
{
if( !dict.add("tangentVelocity", tangentVelocity_) )
{
fatalErrorInFunction<<
" error in writing tangentVelocity to dictionary "<< dict.globalName()<<endl;
return false;
}
return true;
}
FUNCTION_H
bool pFlow::conveyorBelt::read(iIstream& is)
{
notImplementedFunction;
return true;
}
FUNCTION_H
bool pFlow::conveyorBelt::write(iOstream& os)const
{
os.writeWordEntry("tangentVelocity", tangentVelocity_);
return true;
}
notImplementedFunction
#define notImplementedFunction
Report that a function is yet not implemented.
Definition: error.hpp:84
fatalExit
#define fatalExit
Fatal exit.
Definition: error.hpp:98
conveyorBelt.hpp
pFlow::dictionary::globalName
virtual word globalName() const
global name of entry, separated with dots
Definition: dictionary.cpp:356
pFlow::dictionary::add
bool add(const word &keyword, const float &v)
add a float dataEntry
Definition: dictionary.cpp:435
pFlow::endl
iOstream & endl(iOstream &os)
Add newline and flush stream.
Definition: iOstream.hpp:341
FUNCTION_H
#define FUNCTION_H
Definition: pFlowMacros.hpp:62
pFlow::conveyorBelt::write
FUNCTION_H bool write(dictionary &dict) const
Definition: conveyorBelt.cpp:46
pFlow::iIstream
Interface class for any input stream
Definition: iIstream.hpp:37
fatalErrorInFunction
#define fatalErrorInFunction
Report a fatal error and function name and exit the application.
Definition: error.hpp:77
dictionary.hpp
pFlow::conveyorBelt::read
FUNCTION_H bool read(const dictionary &dict)
Definition: conveyorBelt.cpp:37
pFlow::dictionary::getVal
T getVal(const word &keyword) const
get the value of data entry
Definition: dictionary.hpp:379
pFlow::triple< real >
pFlow::iOstream
Interface class for any output stream.
Definition: iOstream.hpp:59
pFlow::conveyorBelt::conveyorBelt
FUNCTION_HD conveyorBelt()=default
pFlow::iOstream::writeWordEntry
iOstream & writeWordEntry(const word &key, const T &value)
Write a keyword/value entry.
Definition: iOstream.hpp:239
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