# PhasicFlow: utilities/postprocessPhasicFlow/processField.hpp Source File

processField.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 __processField_hpp__
#define __processField_hpp__
#include "virtualConstructor.hpp"
#include "dictionary.hpp"
#include "readFromTimeFolder.hpp"
#include "includeMask.hpp"
#include "pointRectCell.hpp"
namespace pFlow
{
class repository;
class processField
{
protected:
dictionary dict_;
pointRectCell& pointToCell_;
mutable readFromTimeFolder timeFolder_;
word processedFieldName_;
word fieldName_;
word fieldType_;
word operation_;
word includeMaskType_;
int32 threshold_ = 1;
uniquePtr<includeMask> includeMask_ = nullptr;
bool static getFieldType(
const dictionary& dict,
readFromTimeFolder& timeFolder,
word& fieldName,
word& fieldType);
public:
TypeInfo("processField");
processField(const dictionary& dict, pointRectCell& pToCell, repository& rep);
create_vCtor(
processField,
dictionary,
(const dictionary& dict,
pointRectCell& pToCell,
repository& rep),
(dict, pToCell, rep) );
const auto& mesh()const
{
return pointToCell_.mesh();
}
const auto& pointToCell()const
{
return pointToCell_;
}
auto& dict()
{
return dict_;
}
const auto& dict()const
{
return dict_;
}
auto& timeFolderRepository()
{
return timeFolder_.db();
}
auto& processedRepository()
{
return pointToCell_.processedRepository();
}
const word& fieldType()const
{
return fieldType_;
}
const word& fieldName()const
{
return fieldName_;
}
bool isUniform()const
{
return fieldName_ == "uniformField";
}
const word& operation()const
{
return operation_;
}
auto& timeFolder()
{
return timeFolder_;
}
const word& includeMaskType()const
{
return includeMaskType_;
}
auto threshold()const
{
return threshold_;
}
const word& processedFieldName()const
{
return processedFieldName_;
}
// requires a class to read pointField from timefolder
virtual bool process() = 0;
virtual bool writeToVTK(iOstream& is) const = 0;
static
uniquePtr<processField> create(
const dictionary& dict,
pointRectCell& pToCell,
repository& rep);
};
}
#endif //__processField_hpp__
pFlow::processField::fieldType_
word fieldType_
Definition: processField.hpp:51
pFlow::processField::threshold_
int32 threshold_
Definition: processField.hpp:57
includeMask.hpp
pFlow::processField::writeToVTK
virtual bool writeToVTK(iOstream &is) const =0
pFlow::processField::operation_
word operation_
Definition: processField.hpp:53
pFlow::readFromTimeFolder
Definition: readFromTimeFolder.hpp:31
pFlow::processField::create
static uniquePtr< processField > create(const dictionary &dict, pointRectCell &pToCell, repository &rep)
Definition: processField.cpp:96
pFlow::processField::timeFolderRepository
auto & timeFolderRepository()
Definition: processField.hpp:103
pFlow::word
std::string word
Definition: builtinTypes.hpp:63
pFlow::processField::getFieldType
static bool getFieldType(const dictionary &dict, readFromTimeFolder &timeFolder, word &fieldName, word &fieldType)
Definition: processField.cpp:57
pFlow::processField::dict_
dictionary dict_
Definition: processField.hpp:41
readFromTimeFolder.hpp
pFlow::processField::isUniform
bool isUniform() const
Definition: processField.hpp:123
pFlow::processField::processedFieldName
const word & processedFieldName() const
Definition: processField.hpp:148
pFlow::readFromTimeFolder::db
auto & db()
Definition: readFromTimeFolder.hpp:52
pFlow::processField::fieldName_
word fieldName_
Definition: processField.hpp:49
pFlow::processField::operation
const word & operation() const
Definition: processField.hpp:128
pFlow::processField::includeMask_
uniquePtr< includeMask > includeMask_
Definition: processField.hpp:59
pointRectCell.hpp
pFlow::processField::process
virtual bool process()=0
pFlow::pointRectCell::processedRepository
auto & processedRepository()
Definition: pointRectCell.hpp:96
pFlow
Definition: demComponent.hpp:28
pFlow::int32
int int32
Definition: builtinTypes.hpp:53
pFlow::pointRectCell
Definition: pointRectCell.hpp:32
dictionary.hpp
virtualConstructor.hpp
pFlow::processField::processField
processField(const dictionary &dict, pointRectCell &pToCell, repository &rep)
Definition: processField.cpp:27
pFlow::processField
Definition: processField.hpp:37
pFlow::pointRectCell::mesh
const auto & mesh() const
Definition: pointRectCell.hpp:91
pFlow::processField::processedRepository
auto & processedRepository()
Definition: processField.hpp:108
pFlow::processField::fieldType
const word & fieldType() const
Definition: processField.hpp:113
pFlow::processField::includeMaskType
const word & includeMaskType() const
Definition: processField.hpp:138
pFlow::processField::dict
const auto & dict() const
Definition: processField.hpp:98
pFlow::processField::processedFieldName_
word processedFieldName_
Definition: processField.hpp:47
pFlow::processField::TypeInfo
TypeInfo("processField")
pFlow::processField::pointToCell_
pointRectCell & pointToCell_
Definition: processField.hpp:43
pFlow::uniquePtr
Definition: uniquePtr.hpp:44
pFlow::processField::threshold
auto threshold() const
Definition: processField.hpp:143
pFlow::processField::fieldName
const word & fieldName() const
Definition: processField.hpp:118
pFlow::processField::timeFolder
auto & timeFolder()
Definition: processField.hpp:133
pFlow::repository
Definition: repository.hpp:34
pFlow::processField::timeFolder_
readFromTimeFolder timeFolder_
Definition: processField.hpp:45
pFlow::processField::create_vCtor
create_vCtor(processField, dictionary,(const dictionary &dict, pointRectCell &pToCell, repository &rep),(dict, pToCell, rep))
pFlow::processField::mesh
const auto & mesh() const
Definition: processField.hpp:83
pFlow::processField::dict
auto & dict()
Definition: processField.hpp:93
pFlow::iOstream
Definition: iOstream.hpp:53
pFlow::dictionary
Definition: dictionary.hpp:38
pFlow::processField::includeMaskType_
word includeMaskType_
Definition: processField.hpp:55
pFlow::processField::pointToCell
const auto & pointToCell() const
Definition: processField.hpp:88
pFlow::timeFolder
Definition: timeFolder.hpp:32