void Foam::dissolMotionPointPatchVectorField::updateCoeffs() { if(debug) { Info << "dissolMotionPointPatchVectorField::updateCoeffs()"<<endl; } if (this->updated()) { return; } if( this->db().foundObject<IOdictionary>("transportProperties") ) { //label patchID = this->patch().index(); const scalar dt = this->db().time().deltaTValue(); //const polyMesh& mesh = this->internalField().mesh()(); vectorField pointMotion; getPointMotion(pointMotion); pointMotion *= dt; /* Info<<"PPPoint motion: "<<nl; for(int i = 0; i<10; i++) { Info<< pointMotion[i] << nl; } */ // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // TODO the rest of relaxation should be implemented Info<<"fixCommonNeighborPatchPoints"<<nl; fixCommonNeighborPatchPoints(pointMotion); Info<<nl<<"relaxEdges"<<nl; relaxEdges(pointMotion); Info<<nl<<"relaxPatchMesh"<<nl; relaxPatchMesh(pointMotion); // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /* Info<<"Aftern: "<<nl; for(int i = 0; i<10; i++) { Info<< pointMotion[i] << nl; } */ // set the velocity for the point motion this->operator==( pointMotion/dt ); fixedValuePointPatchField<vector>::updateCoeffs(); } }
bool BellmanFord::bellmanFord(std::list<Edge<int,int> > edgeList, std::list<int> vertexList, int source) { init(vertexList, source); relaxEdges(edgeList, vertexList.size()); return hasNegativeCycle(edgeList); }