diff --git a/src/foam/foam.cc b/src/foam/foam.cc index d104818560afad209a720f27b8a581d961cf0d52..21dc1cecc98d53bd9817acb39c48d7ecd7e12992 100644 --- a/src/foam/foam.cc +++ b/src/foam/foam.cc @@ -136,7 +136,7 @@ int main(int argc, char *argv[]) { auto const parset = getParameters(argc, argv); auto outPath = std::filesystem::current_path(); - outPath += "/output/" + parset.get<std::string>("outPath"); + outPath += "/output/" + parset.get<std::string>("general.outPath"); if (!std::filesystem::is_directory(outPath)) std::filesystem::create_directories(outPath); @@ -250,22 +250,26 @@ int main(int argc, char *argv[]) { // Assuming dPhi(v = 0) = 0, we thus only have to solve Au = ell0 BitVector totalDirichletNodes; contactNetwork.totalNodes("dirichlet", totalDirichletNodes); + + using BoundaryNodes = typename ContactNetwork::BoundaryNodes; + BoundaryNodes dirichletNodes; + contactNetwork.boundaryNodes("dirichlet", dirichletNodes); + size_t dof = 0; for (size_t i=0; i<bodyCount; i++) { const auto& body = *contactNetwork.body(i); if (body.data()->getYoungModulus() == 0.0) { - for (; dof<body.nVertices(); dof++) { + for (size_t j=0; j<body.nVertices(); j++) { totalDirichletNodes[dof] = true; + dof++; } } else { dof += body.nVertices(); } } - using BoundaryNodes = typename ContactNetwork::BoundaryNodes; - BoundaryNodes dirichletNodes; - contactNetwork.boundaryNodes("dirichlet", dirichletNodes); + std::vector<const Dune::BitSetVector<1>*> frictionNodes; contactNetwork.frictionNodes(frictionNodes); @@ -501,10 +505,17 @@ int main(int argc, char *argv[]) { print(programState.a, "current a:"); print(programState.alpha, "current alpha:");*/ + //using Vector = typename ProgramState::Vector; + /*Vector mortarV; + contactNetwork.nBodyAssembler().nodalToTransformed(programState.v, mortarV); + printRegularityTruncation(globalFriction, mortarV);*/ + contactNetwork.setDeformation(programState.u); ioHandler->write(programState, contactNetwork, globalFriction, iterationCount, false); + + if (programState.timeStep==timeSteps) { std::cout << "limit of timeSteps reached!" << std::endl; break; // TODO remove after debugging