Merge pull request #153 from PhasicFlow/develop

changes in contactSearch and timeControl and timeInfo
This commit is contained in:
PhasicFlow 2025-01-31 13:44:07 +03:30 committed by GitHub
commit 2d7f7ec17f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 19 additions and 24 deletions

View File

@ -134,7 +134,7 @@ public:
ppwContactSearch_ =
makeUnique<SearchMethodType>
(
dict(),
csDict,
this->extendedDomainBox(),
minD,
maxD,
@ -154,10 +154,8 @@ public:
ContactSearch,
dictionary);
bool enterBroadSearchBoundary(const timeInfo& ti, bool force=false)const override
{
return enterBroadSearch(ti, force) || csBoundaries_.boundariesUpdated();
}
bool enterBroadSearchBoundary(const timeInfo& ti, bool force=false)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__

View File

@ -35,8 +35,7 @@ pFlow::contactSearch::contactSearch(
particles_(prtcl),
geometry_(geom),
bTimer_("Boundary particles contact search", &timers),
ppTimer_("Internal particles contact search", &timers),
dict_(dict)
ppTimer_("Internal particles contact search", &timers)
{
}
@ -70,6 +69,7 @@ bool pFlow::contactSearch::broadSearch
}
ppTimer_.end();
performedSearch_ = true;
lastUpdated_ = ti.currentIter();
}
else
{

View File

@ -67,8 +67,6 @@ private:
Timer ppTimer_;
dictionary dict_;
virtual
bool BroadSearch(
const timeInfo& ti,
@ -150,12 +148,6 @@ public:
return updateInterval_;
}
inline
const dictionary& dict()const
{
return dict_;
}
inline
const box& extendedDomainBox()const
{

View File

@ -133,7 +133,7 @@ public:
}
int32 currentIter()const
uint32 currentIter()const
{
return ti_.currentIter();
}
@ -174,7 +174,7 @@ public:
}
static
int32 timePrecision()
uint32 timePrecision()
{
return timeInfo::precision();
}

View File

@ -33,7 +33,7 @@ private:
friend class timeControl;
// - current iteration number (for this execution)
int32 currentIter_;
uint32 currentIter_;
// - current time of simulation
timeValue currentTime_;
@ -41,11 +41,11 @@ private:
// - integration time step
timeValue dt_;
inline static int32 presicion_ = 5;
inline static uint32 presicion_ = 5;
public:
timeInfo(int32 cIter, timeValue cTime, timeValue dt)
timeInfo(uint32 cIter, timeValue cTime, timeValue dt)
: currentIter_(cIter),
currentTime_(cTime),
dt_(dt)
@ -58,7 +58,7 @@ public:
currentTime_(dict.getVal<timeValue>("startTime")),
dt_( dict.getVal<timeValue>("dt"))
{
presicion_ = dict.getValOrSet<int32>("timePrecision",5);
presicion_ = dict.getValOrSet<uint32>("timePrecision",5);
}
timeInfo(timeValue currentTime, const dictionary& dict)
@ -83,12 +83,12 @@ public:
{
return dt_;
}
inline const int32& iter() const
inline const uint32& iter() const
{
return currentIter_;
}
inline const int32& currentIter() const
inline const uint32& currentIter() const
{
return currentIter_;
}
@ -107,7 +107,7 @@ public:
}
static
int32 precision()
uint32 precision()
{
return presicion_;
}