Merge pull request #153 from PhasicFlow/develop
changes in contactSearch and timeControl and timeInfo
This commit is contained in:
commit
2d7f7ec17f
|
@ -134,7 +134,7 @@ public:
|
||||||
ppwContactSearch_ =
|
ppwContactSearch_ =
|
||||||
makeUnique<SearchMethodType>
|
makeUnique<SearchMethodType>
|
||||||
(
|
(
|
||||||
dict(),
|
csDict,
|
||||||
this->extendedDomainBox(),
|
this->extendedDomainBox(),
|
||||||
minD,
|
minD,
|
||||||
maxD,
|
maxD,
|
||||||
|
@ -154,10 +154,8 @@ public:
|
||||||
ContactSearch,
|
ContactSearch,
|
||||||
dictionary);
|
dictionary);
|
||||||
|
|
||||||
bool enterBroadSearchBoundary(const timeInfo& ti, bool force=false)const override
|
bool enterBroadSearchBoundary(const timeInfo& ti, bool force=false)const override;
|
||||||
{
|
|
||||||
return enterBroadSearch(ti, force) || csBoundaries_.boundariesUpdated();
|
|
||||||
}
|
|
||||||
|
|
||||||
real sizeRatio()const override
|
real sizeRatio()const override
|
||||||
{
|
{
|
||||||
|
@ -171,7 +169,12 @@ public:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <class searchMethod>
|
||||||
|
inline bool ContactSearch<searchMethod>::enterBroadSearchBoundary(const timeInfo &ti, bool force) const
|
||||||
|
{
|
||||||
|
return performSearch(ti.iter(),force) || csBoundaries_.boundariesUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#endif //__ContactSearch_hpp__
|
#endif //__ContactSearch_hpp__
|
||||||
|
|
|
@ -35,8 +35,7 @@ pFlow::contactSearch::contactSearch(
|
||||||
particles_(prtcl),
|
particles_(prtcl),
|
||||||
geometry_(geom),
|
geometry_(geom),
|
||||||
bTimer_("Boundary particles contact search", &timers),
|
bTimer_("Boundary particles contact search", &timers),
|
||||||
ppTimer_("Internal particles contact search", &timers),
|
ppTimer_("Internal particles contact search", &timers)
|
||||||
dict_(dict)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -70,6 +69,7 @@ bool pFlow::contactSearch::broadSearch
|
||||||
}
|
}
|
||||||
ppTimer_.end();
|
ppTimer_.end();
|
||||||
performedSearch_ = true;
|
performedSearch_ = true;
|
||||||
|
lastUpdated_ = ti.currentIter();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -67,8 +67,6 @@ private:
|
||||||
|
|
||||||
Timer ppTimer_;
|
Timer ppTimer_;
|
||||||
|
|
||||||
dictionary dict_;
|
|
||||||
|
|
||||||
virtual
|
virtual
|
||||||
bool BroadSearch(
|
bool BroadSearch(
|
||||||
const timeInfo& ti,
|
const timeInfo& ti,
|
||||||
|
@ -150,12 +148,6 @@ public:
|
||||||
return updateInterval_;
|
return updateInterval_;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
|
||||||
const dictionary& dict()const
|
|
||||||
{
|
|
||||||
return dict_;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
inline
|
||||||
const box& extendedDomainBox()const
|
const box& extendedDomainBox()const
|
||||||
{
|
{
|
||||||
|
|
|
@ -133,7 +133,7 @@ public:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 currentIter()const
|
uint32 currentIter()const
|
||||||
{
|
{
|
||||||
return ti_.currentIter();
|
return ti_.currentIter();
|
||||||
}
|
}
|
||||||
|
@ -174,7 +174,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
int32 timePrecision()
|
uint32 timePrecision()
|
||||||
{
|
{
|
||||||
return timeInfo::precision();
|
return timeInfo::precision();
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ private:
|
||||||
friend class timeControl;
|
friend class timeControl;
|
||||||
|
|
||||||
// - current iteration number (for this execution)
|
// - current iteration number (for this execution)
|
||||||
int32 currentIter_;
|
uint32 currentIter_;
|
||||||
|
|
||||||
// - current time of simulation
|
// - current time of simulation
|
||||||
timeValue currentTime_;
|
timeValue currentTime_;
|
||||||
|
@ -41,11 +41,11 @@ private:
|
||||||
// - integration time step
|
// - integration time step
|
||||||
timeValue dt_;
|
timeValue dt_;
|
||||||
|
|
||||||
inline static int32 presicion_ = 5;
|
inline static uint32 presicion_ = 5;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
timeInfo(int32 cIter, timeValue cTime, timeValue dt)
|
timeInfo(uint32 cIter, timeValue cTime, timeValue dt)
|
||||||
: currentIter_(cIter),
|
: currentIter_(cIter),
|
||||||
currentTime_(cTime),
|
currentTime_(cTime),
|
||||||
dt_(dt)
|
dt_(dt)
|
||||||
|
@ -58,7 +58,7 @@ public:
|
||||||
currentTime_(dict.getVal<timeValue>("startTime")),
|
currentTime_(dict.getVal<timeValue>("startTime")),
|
||||||
dt_( dict.getVal<timeValue>("dt"))
|
dt_( dict.getVal<timeValue>("dt"))
|
||||||
{
|
{
|
||||||
presicion_ = dict.getValOrSet<int32>("timePrecision",5);
|
presicion_ = dict.getValOrSet<uint32>("timePrecision",5);
|
||||||
}
|
}
|
||||||
|
|
||||||
timeInfo(timeValue currentTime, const dictionary& dict)
|
timeInfo(timeValue currentTime, const dictionary& dict)
|
||||||
|
@ -83,12 +83,12 @@ public:
|
||||||
{
|
{
|
||||||
return dt_;
|
return dt_;
|
||||||
}
|
}
|
||||||
inline const int32& iter() const
|
inline const uint32& iter() const
|
||||||
{
|
{
|
||||||
return currentIter_;
|
return currentIter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline const int32& currentIter() const
|
inline const uint32& currentIter() const
|
||||||
{
|
{
|
||||||
return currentIter_;
|
return currentIter_;
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
int32 precision()
|
uint32 precision()
|
||||||
{
|
{
|
||||||
return presicion_;
|
return presicion_;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue