# PhasicFlow: src/Interaction/contactSearch/contactSearch/contactSearch.hpp Source File

contactSearch.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 __contactSearch_hpp__
#define __contactSearch_hpp__
#include "interactionBase.hpp"
#include "unsortedPairs.hpp"
#include "box.hpp"
#include "dictionary.hpp"
namespace pFlow
{
class contactSearch
:
public interactionBase
{
public:
using IdType = typename interactionBase::IdType;
using IndexType = typename interactionBase::IndexType;
using ExecutionSpace = typename interactionBase::ExecutionSpace;
using PairContainerType = unsortedPairs<ExecutionSpace, IdType>;
protected:
const box& domain_;
dictionary dict_;
Timer sphereSphereTimer_;
Timer sphereWallTimer_;
auto& dict()
{
return dict_;
}
public:
TypeInfo("contactSearch");
contactSearch(
const dictionary& dict,
const box& domain,
const particles& prtcl,
const geometry& geom,
Timers& timers);
virtual ~contactSearch()=default;
create_vCtor
(
contactSearch,
dictionary,
(
const dictionary& dict,
const box& domain,
const particles& prtcl,
const geometry& geom,
Timers& timers
),
(dict, domain, prtcl, geom, timers)
);
const auto& domain()const
{
return domain_;
}
const auto& dict()const
{
return dict_;
}
virtual
bool broadSearch(
PairContainerType& ppPairs,
PairContainerType& pwPairs,
bool force = false) = 0;
virtual
bool ppEnterBroadSearch()const = 0;
virtual
bool pwEnterBroadSearch()const = 0;
virtual
bool ppPerformedBroadSearch()const = 0;
virtual
bool pwPerformedBroadSearch()const = 0;
static
uniquePtr<contactSearch> create(
const dictionary& dict,
const box& domain,
const particles& prtcl,
const geometry& geom,
Timers& timers);
};
}
#endif //__ContactSearch_hpp__
pFlow::contactSearch::dict
const auto & dict() const
Definition: contactSearch.hpp:96
pFlow::interactionBase::IndexType
CELL_INDEX_TYPE IndexType
Definition: interactionBase.hpp:35
pFlow::contactSearch::broadSearch
virtual bool broadSearch(PairContainerType &ppPairs, PairContainerType &pwPairs, bool force=false)=0
pFlow::interactionBase::IdType
ID_TYPE IdType
Definition: interactionBase.hpp:37
pFlow::contactSearch::pwEnterBroadSearch
virtual bool pwEnterBroadSearch() const =0
pFlow::contactSearch::domain
const auto & domain() const
Definition: contactSearch.hpp:91
pFlow::contactSearch::PairContainerType
unsortedPairs< ExecutionSpace, IdType > PairContainerType
Definition: contactSearch.hpp:46
box.hpp
pFlow::contactSearch::ExecutionSpace
typename interactionBase::ExecutionSpace ExecutionSpace
Definition: contactSearch.hpp:44
pFlow::Timers
Definition: Timers.hpp:33
pFlow::contactSearch::ppEnterBroadSearch
virtual bool ppEnterBroadSearch() const =0
pFlow::interactionBase::ExecutionSpace
DefaultExecutionSpace ExecutionSpace
Definition: interactionBase.hpp:39
pFlow::unsortedPairs
Definition: unsortedPairs.hpp:32
interactionBase.hpp
pFlow
Definition: demComponent.hpp:28
pFlow::contactSearch::sphereWallTimer_
Timer sphereWallTimer_
Definition: contactSearch.hpp:56
pFlow::contactSearch::dict
auto & dict()
Definition: contactSearch.hpp:58
pFlow::particles
Definition: particles.hpp:33
pFlow::Timer
Definition: Timer.hpp:39
dictionary.hpp
pFlow::contactSearch::sphereSphereTimer_
Timer sphereSphereTimer_
Definition: contactSearch.hpp:54
pFlow::contactSearch::pwPerformedBroadSearch
virtual bool pwPerformedBroadSearch() const =0
unsortedPairs.hpp
pFlow::interactionBase
Definition: interactionBase.hpp:31
pFlow::contactSearch::IndexType
typename interactionBase::IndexType IndexType
Definition: contactSearch.hpp:42
pFlow::contactSearch::create_vCtor
create_vCtor(contactSearch, dictionary,(const dictionary &dict, const box &domain, const particles &prtcl, const geometry &geom, Timers &timers),(dict, domain, prtcl, geom, timers))
pFlow::contactSearch::IdType
typename interactionBase::IdType IdType
Definition: contactSearch.hpp:40
pFlow::contactSearch
Definition: contactSearch.hpp:35
pFlow::contactSearch::TypeInfo
TypeInfo("contactSearch")
pFlow::contactSearch::create
static uniquePtr< contactSearch > create(const dictionary &dict, const box &domain, const particles &prtcl, const geometry &geom, Timers &timers)
Definition: contactSearch.cpp:42
pFlow::contactSearch::domain_
const box & domain_
Definition: contactSearch.hpp:50
pFlow::box
Definition: box.hpp:32
pFlow::uniquePtr
Definition: uniquePtr.hpp:44
pFlow::geometry
Definition: geometry.hpp:37
pFlow::contactSearch::~contactSearch
virtual ~contactSearch()=default
pFlow::contactSearch::contactSearch
contactSearch(const dictionary &dict, const box &domain, const particles &prtcl, const geometry &geom, Timers &timers)
Definition: contactSearch.cpp:25
pFlow::contactSearch::ppPerformedBroadSearch
virtual bool ppPerformedBroadSearch() const =0
pFlow::dictionary
Definition: dictionary.hpp:38
pFlow::contactSearch::dict_
dictionary dict_
Definition: contactSearch.hpp:52