21 template<
typename MotionModel>
25 if(motionComponentName().size() != numSurfaces() )
28 "size of motion component names in the triSurface is not"<<
29 " equal to size of number of sub-surfaces"<<
endl;
37 ForAll( surfI, motionComponentName())
39 auto mName = motionComponentName()[surfI];
42 if( !motionModel_.nameToIndex(mName, mInd) )
45 mName<<
" does not exist in the list of motion names -> "<<
46 motionModel_.componentNames();
49 surfMotionIndex.push_back(mInd);
51 auto surfRange = subSurfaceRange(surfI);
53 for(
uint32 i=0; i<surfRange.numElements(); i++)
55 triMotionIndex.push_back(mInd);
58 auto pointRange = subSurfacePointRange(surfI);
59 for(
uint32 n=0;
n<pointRange.numElements();
n++)
61 pointMotionIndex.push_back(mInd);
65 surfMotionIndex_.assign(surfMotionIndex);
66 triMotionIndex_.assign(triMotionIndex);
67 pointMotionIndex_.assign(pointMotionIndex);
74 template<
typename ModelInterface>
78 const ModelInterface& mModel,
84 "geometryMotion<MotionModel>::movePoints",
87 auto newPos = mModel.transferPoint(pointMIndexD[i], pointsD[i], dt);
95 template<
typename MotionModel>
99 uint32 iter = this->currentIter();
100 real t = this->currentTime();
101 real dt = this->dt();
103 auto mModel = motionModel_.getModelInterface(iter, t, dt);
105 auto& pointMIndexD= pointMotionIndex_.deviceViewAll();
106 auto& pointsD = points().deviceViewAll();
111 motionModel_.getModelInterface(iter, t, dt),
112 pointMotionIndex_.deviceViewAll(),
113 points().deviceViewAll()
127 motionModel_.move(iter, t,dt);
135 template<
typename MotionModel>
149 objectFile::READ_ALWAYS,
150 objectFile::WRITE_ALWAYS
154 moveGeomTimer_(
"move geometry", &this->timers())
156 if(!findMotionIndex())
162 template <
typename MotionModelType>
188 objectFile::READ_NEVER,
189 objectFile::WRITE_ALWAYS
194 moveGeomTimer_(
"move geometry", &this->timers())
196 if(!findMotionIndex())
203 template<
typename MotionModel>
206 if( motionModel_.isMoving() )
208 moveGeomTimer_.start();
211 moveGeomTimer_.end();