# PhasicFlow: src/Integration/integration/integration.hpp Source File

integration.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 __integration_hpp__
#define __integration_hpp__
#include "virtualConstructor.hpp"
#include "Vectors.hpp"
#include "pointStructure.hpp"
#include "repository.hpp"
namespace pFlow
{
class integration
{
protected:
repository& owner_;
const word baseName_;
const pointStructure& pStruct_;
public:
// type info
TypeInfo("integration");
integration(
const word& baseName,
repository& owner,
const pointStructure& pStruct,
const word& method);
virtual ~integration()=default;
// - add a virtual constructor
create_vCtor(
integration,
word,
(const word& baseName,
repository& owner,
const pointStructure& pStruct,
const word& method),
(baseName, owner, pStruct, method) );
const auto& pStruct()const
{
return pStruct_;
}
virtual bool predict(real dt, realx3Vector_D& y, realx3Vector_D& dy) = 0;
virtual bool correct(real dt, realx3Vector_D& y, realx3Vector_D& dy) = 0;
virtual bool setInitialVals(
const int32IndexContainer& newIndices,
const realx3Vector& y) = 0;
virtual bool needSetInitialVals()const = 0;
virtual uniquePtr<integration> clone()const=0;
const word& baseName()const
{
return baseName_;
}
repository& owner()
{
return owner_;
}
static
uniquePtr<integration> create(
const word& baseName,
repository& owner,
const pointStructure& pStruct,
const word& method);
};
} // pFlow
#endif //__integration_hpp__
pFlow::integration::owner_
repository & owner_
Definition: integration.hpp:39
pFlow::real
float real
Definition: builtinTypes.hpp:46
pFlow::integration::baseName_
const word baseName_
Definition: integration.hpp:41
pFlow::integration
Definition: integration.hpp:35
pFlow::integration::pStruct
const auto & pStruct() const
Definition: integration.hpp:72
pFlow::integration::predict
virtual bool predict(real dt, realx3Vector_D &y, realx3Vector_D &dy)=0
pFlow::integration::setInitialVals
virtual bool setInitialVals(const int32IndexContainer &newIndices, const realx3Vector &y)=0
pFlow::integration::correct
virtual bool correct(real dt, realx3Vector_D &y, realx3Vector_D &dy)=0
pFlow::word
std::string word
Definition: builtinTypes.hpp:63
Vectors.hpp
pFlow::integration::baseName
const word & baseName() const
Definition: integration.hpp:89
pFlow::integration::clone
virtual uniquePtr< integration > clone() const =0
pFlow
Definition: demComponent.hpp:28
pFlow::integration::TypeInfo
TypeInfo("integration")
repository.hpp
pFlow::pointStructure
Definition: pointStructure.hpp:44
pFlow::integration::create_vCtor
create_vCtor(integration, word,(const word &baseName, repository &owner, const pointStructure &pStruct, const word &method),(baseName, owner, pStruct, method))
virtualConstructor.hpp
pFlow::VectorSingle
Definition: VectorSingle.hpp:45
pFlow::integration::create
static uniquePtr< integration > create(const word &baseName, repository &owner, const pointStructure &pStruct, const word &method)
Definition: integration.cpp:40
pFlow::integration::owner
repository & owner()
Definition: integration.hpp:94
pFlow::integration::~integration
virtual ~integration()=default
pFlow::uniquePtr
Definition: uniquePtr.hpp:44
pFlow::integration::integration
integration(const word &baseName, repository &owner, const pointStructure &pStruct, const word &method)
Definition: integration.cpp:24
pFlow::integration::pStruct_
const pointStructure & pStruct_
Definition: integration.hpp:43
pFlow::integration::needSetInitialVals
virtual bool needSetInitialVals() const =0
pFlow::repository
Definition: repository.hpp:34
pFlow::Vector< realx3 >
pointStructure.hpp
pFlow::indexContainer< int32 >