21 template<
typename MotionModel>
26 real t = this->currentTime();
28 auto pointMIndex= pointMotionIndex_.deviceVector();
29 auto mModel = motionModel_.getModel(t);
30 realx3* points = triSurface_.pointsData_D();
31 auto numPoints = triSurface_.numPoints();
35 "geometryMotion<MotionModel>::movePoints",
38 auto newPos = mModel.transferPoint(pointMIndex[i], points[i], dt);
45 motionModel_.move(t,dt);
53 template<
typename MotionModel>
57 triMotionIndex_.reserve( this->surface().capacity() );
58 triMotionIndex_.clear();
60 ForAll( surfI, motionComponentName_)
62 auto mName = motionComponentName_[surfI];
63 auto mInd = motionModel_.nameToIndex(mName);
64 motionIndex_.push_back(mInd);
66 int32 surfSize = this->surface().surfNumTriangles(surfI);
67 for(
int32 i=0; i<surfSize; i++)
69 triMotionIndex_.push_back(mInd);
72 motionIndex_.syncViews();
73 triMotionIndex_.syncViews();
75 pointMotionIndex_.reserve(triSurface_.numPoints());
76 pointMotionIndex_.clear();
78 ForAll(surfI, motionIndex_)
80 auto nP = triSurface_.surfNumPoints(surfI);
81 for(
int32 i=0; i<nP; i++)
83 pointMotionIndex_.push_back(motionIndex_[surfI]);
86 pointMotionIndex_.syncViews();
91 template<
typename MotionModel>
100 this->owner().
template emplaceObject<MotionModel>(
104 objectFile::READ_ALWAYS,
105 objectFile::WRITE_ALWAYS
109 moveGeomTimer_(
"move geometry", &this->timers())
114 template<
typename MotionModel>
133 this->owner().
template emplaceObject<MotionModel>(
137 objectFile::READ_NEVER,
138 objectFile::WRITE_ALWAYS
143 moveGeomTimer_(
"move geometry", &this->timers())
148 template<
typename MotionModel>
168 this->owner().
template emplaceObject<MotionModel>(
172 objectFile::READ_NEVER,
173 objectFile::WRITE_ALWAYS
178 moveGeomTimer_(
"move geometry", &this->timers())
183 template<
typename MotionModel>
186 if( motionModel_.isMoving() )
188 moveGeomTimer_.start();
190 moveGeomTimer_.end();