Skip to content
Snippets Groups Projects
Commit 1e6afbde authored by podlesny's avatar podlesny
Browse files

set dirichlet data for dirichlet body correctly

parent 20e77595
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment