# PhasicFlow: src/phasicFlow/containers/pointField/boundaryField/boundaryField/boundaryField.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.

boundaryField.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.
-----------------------------------------------------------------------------*/
template<class T, class MemorySpace>
pFlow::boundaryField<T, MemorySpace>::boundaryField
(
const boundaryBase& boundary,
const pointStructure& pStruct,
InternalFieldType& internal
)
:
generalBoundary
(
boundary,
pStruct,
getTypeName<T>(),
memory_space::name()
),
internal_(internal)
{}
template<class T, class MemorySpace>
typename pFlow::boundaryField<T, MemorySpace>::ProcVectorType&
pFlow::boundaryField<T, MemorySpace>::neighborProcField()
{
static ProcVectorType dummyVector{"dummyVector"};
//notImplementedFunction;
//fatalExit;
return dummyVector;
}
template<class T, class MemorySpace>
const typename pFlow::boundaryField<T, MemorySpace>::ProcVectorType&
pFlow::boundaryField<T, MemorySpace>::neighborProcField() const
{
static ProcVectorType dummyVector{"dummyVector"};
//notImplementedFunction;
//fatalExit;
return dummyVector;
}
template<class T, class MemorySpace>
pFlow::uniquePtr<pFlow::boundaryField<T, MemorySpace>>
pFlow::boundaryField<T, MemorySpace>::create
(
const boundaryBase& boundary,
const pointStructure& pStruct,
InternalFieldType& internal
)
{
word bType = angleBracketsNames3(
"boundaryField",
boundary.type(),
getTypeName<T>(),
memory_space::name());
word bTypeAlter = angleBracketsNames3(
"boundaryField",
"none",
getTypeName<T>(),
memory_space::name());
if(boundaryBasevCtorSelector_.search(bType))
{
return boundaryBasevCtorSelector_[bType](boundary, pStruct, internal);
}
else
{
printKeys
(
fatalError << "Ctor Selector "<< bType << "for type "<<
Yellow_Text(getTypeName<T>()) << " does not exist.\n"
<<"Avaiable ones are: \n\n"
,
boundaryBasevCtorSelector_
);
fatalExit;
}
return nullptr;
}
pFlow::boundaryField::create
static uniquePtr< boundaryField > create(const boundaryBase &boundary, const pointStructure &pStruct, InternalFieldType &internal)
Definition: boundaryField.cpp:62
pFlow::angleBracketsNames3
word angleBracketsNames3(const word &base, const word &w1, const word &w2, const word &w3)
Output base<w1,sw2,w3>
Definition: bTypesFunctions.cpp:168
fatalExit
#define fatalExit
Fatal exit.
Definition: error.hpp:98
pFlow::word
std::string word
Definition: builtinTypes.hpp:64
pFlow::printKeys
iOstream & printKeys(iOstream &os, const wordHashMap< T > &m)
Yellow_Text
#define Yellow_Text(text)
Definition: iOstream.hpp:40
pFlow::boundaryBase::type
const word & type() const
Definition: boundaryBase.hpp:252
pFlow::pointStructure
Definition: pointStructure.hpp:34
pFlow::boundaryBase
Definition: boundaryBase.hpp:42
pFlow::VectorSingle
Definition: VectorSingle.hpp:44
pFlow::boundaryField::boundaryField
boundaryField(const boundaryBase &boundary, const pointStructure &pStruct, InternalFieldType &internal)
Definition: boundaryField.cpp:23
fatalError
#define fatalError
Report a fatal error and exit the applicaiton.
Definition: error.hpp:70
pFlow::internalField< T, void >
pStruct
auto & pStruct
Definition: setPointStructure.hpp:24
pFlow::uniquePtr
Definition: uniquePtr.hpp:42
pFlow::boundaryField::neighborProcField
virtual ProcVectorType & neighborProcField()
Definition: boundaryField.cpp:41
pFlow::generalBoundary
Definition: generalBoundary.hpp:38