# PhasicFlow: src/Particles/Insertion/shapeMixture/shapeMixture.hpp Source File

shapeMixture.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 __shapeMixture_hpp__
#define __shapeMixture_hpp__
#include "Vectors.hpp"
namespace pFlow
{
class dictionary;
class shapeMixture
{
protected:
// - list of shape names
wordVector names_;
// - number composition
uint32Vector number_;
// - number inserted of each shape
uint32Vector numberInserted_;
uint32Vector current_;
public:
//- type Info
TypeInfoNV("shapeMixture");
//
shapeMixture(const dictionary & dict);
shapeMixture(const shapeMixture&) = default;
shapeMixture(shapeMixture&&) = default;
shapeMixture& operator=(const shapeMixture&) = default;
shapeMixture& operator=(shapeMixture&&) = default;
uniquePtr<shapeMixture> clone()const
{
return makeUnique<shapeMixture>(*this);
}
shapeMixture* clonePtr()const
{
return new shapeMixture(*this);
}
//
~shapeMixture() = default;
word getNextShapeName();
void getNextShapeNameN(size_t n, wordVector& names);
auto size()const {
return names_.size();
}
auto totalInserted()const {
return sum(numberInserted_);
}
bool read(const dictionary& dict);
bool write(dictionary& dict) const;
};
} // pFlow
#endif //__shapeMixture_hpp__
pFlow::shapeMixture::names_
wordVector names_
Definition: shapeMixture.hpp:37
pFlow::shapeMixture::totalInserted
auto totalInserted() const
Definition: shapeMixture.hpp:91
pFlow::shapeMixture::~shapeMixture
~shapeMixture()=default
pFlow::word
std::string word
Definition: builtinTypes.hpp:63
pFlow::shapeMixture::operator=
shapeMixture & operator=(const shapeMixture &)=default
pFlow::Vector::size
auto size() const
Definition: Vector.hpp:299
Vectors.hpp
pFlow::shapeMixture
Definition: shapeMixture.hpp:32
pFlow::shapeMixture::write
bool write(dictionary &dict) const
Definition: shapeMixture.cpp:128
pFlow
Definition: demComponent.hpp:28
pFlow::shapeMixture::number_
uint32Vector number_
Definition: shapeMixture.hpp:40
n
int32 n
Definition: NBSCrossLoop.hpp:24
pFlow::shapeMixture::clonePtr
shapeMixture * clonePtr() const
Definition: shapeMixture.hpp:71
pFlow::shapeMixture::current_
uint32Vector current_
Definition: shapeMixture.hpp:45
pFlow::shapeMixture::clone
uniquePtr< shapeMixture > clone() const
Definition: shapeMixture.hpp:66
pFlow::sum
T sum(const Vector< T, Allocator > &v)
Definition: VectorMath.hpp:190
pFlow::shapeMixture::getNextShapeNameN
void getNextShapeNameN(size_t n, wordVector &names)
Definition: shapeMixture.cpp:55
pFlow::shapeMixture::read
bool read(const dictionary &dict)
Definition: shapeMixture.cpp:69
pFlow::uniquePtr
Definition: uniquePtr.hpp:44
pFlow::shapeMixture::numberInserted_
uint32Vector numberInserted_
Definition: shapeMixture.hpp:43
pFlow::shapeMixture::TypeInfoNV
TypeInfoNV("shapeMixture")
pFlow::shapeMixture::getNextShapeName
word getNextShapeName()
Definition: shapeMixture.cpp:37
pFlow::Vector< word >
pFlow::shapeMixture::shapeMixture
shapeMixture(const dictionary &dict)
Definition: shapeMixture.cpp:27
pFlow::dictionary
Definition: dictionary.hpp:38
pFlow::shapeMixture::size
auto size() const
Definition: shapeMixture.hpp:87