void ObjectParser::measureNeededMemory() { // Iterate for all faces we have for (auto index = vertexIndices.begin(); index != vertexIndices.end(); index++) { // Save vertex and normal by index vec3 vertex = in_vertices.at(*index-1); out_vertices.push_back(vertex); } for (auto index = normalIndices.begin(); index != normalIndices.end(); index++) { vec3 normal = in_normals.at(*index-1); out_normals.push_back(normal); } cout << "Before: " << endl; cout << "Vertices size: " << out_vertices.size() << endl; // cout << "Textures size: " << result[textures].size() << endl; cout << "Normals size: " << out_normals.size() << endl; checkFaces(); cout << "After: " << endl; cout << "Vertices size: " << out_vertices.size() << endl; // cout << "Textures size: " << result[textures].size() << endl; cout << "Normals size: " << out_normals.size() << endl; }
void Foam::displacementMeshMoverMotionSolver::solve() { // The points have moved so before calculation update // the mesh and motionSolver accordingly movePoints(mesh().points()); // Update any point motion bcs (e.g. timevarying) pointDisplacement().boundaryFieldRef().updateCoeffs(); label nAllowableErrors = 0; labelList checkFaces(identity(mesh().nFaces())); meshMover().move ( coeffDict().optionalSubDict(meshMover().type() + "Coeffs"), nAllowableErrors, checkFaces ); // This will have updated the mesh and implicitly the pointDisplacement pointDisplacement().correctBoundaryConditions(); }