void updatePhi(int *seed, const int *nTry, int *nAccept, const double *epsilon, double *phi, const int *Q, const int *G, const int *S, const double *x, const int *psi, const double *nu, const int *delta, const double *Delta, const double *sigma2, const double *theta, const double *lambda) { unsigned int seedU = (unsigned int) *seed; updatePhi(&seedU,*nTry,nAccept,*epsilon,phi,*Q,*G,S,x,psi,nu, delta,Delta,sigma2,theta,lambda); *seed = (int) seedU; return; }
Foam::tmp<Foam::scalarField> Foam::fvMesh::movePoints(const pointField& p) { // Grab old time volumes if the time has been incremented if (curTimeIndex_ < time().timeIndex()) { if (V00Ptr_ && V0Ptr_) { if (debug) { InfoIn("void fvMesh::movePoints(const pointField& p)") << "Grabbing old-old cell volumes." << endl; } *V00Ptr_ = *V0Ptr_; } if (V0Ptr_) { if (debug) { InfoIn("void fvMesh::movePoints(const pointField& p)") << "Grabbing old cell volumes." << endl; } *V0Ptr_ = V(); } else { if (debug) { InfoIn("void fvMesh::movePoints(const pointField& p)") << "Creating old cell volumes." << endl; } V0Ptr_ = new DimensionedField<scalar, volMesh> ( IOobject ( "V0", time().timeName(), *this, IOobject::NO_READ, IOobject::NO_WRITE ), V() ); } curTimeIndex_ = time().timeIndex(); } // Delete out of date geometrical information clearGeomNotOldVol(); if (!phiPtr_) { // Create mesh motion flux if (debug) { InfoIn("tmp<scalarField> fvMesh::movePoints(const pointField& p)") << "Creating new mesh motion fluxes" << endl; } phiPtr_ = new surfaceScalarField ( IOobject ( "meshPhi", this->time().timeName(), *this, IOobject::NO_READ, IOobject::AUTO_WRITE ), *this, dimVolume/dimTime ); } else { // Grab old time mesh motion fluxes if the time has been incremented if (phiPtr_->timeIndex() < time().timeIndex()) { phiPtr_->oldTime(); } } // Move the polyMesh and set the mesh motion fluxes to the swept-volumes tmp<scalarField> tsweptVols = polyMesh::movePoints(p); updatePhi(tsweptVols()); boundary_.movePoints(); surfaceInterpolation::movePoints(); // Function object update moved to polyMesh // HJ, 29/Aug/2010 return tsweptVols; }