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

if young modulus of body is zero, set it to rigid dirichlet body

parent c8d6fef8
No related branches found
No related tags found
No related merge requests found
......@@ -151,17 +151,19 @@ template <class VectorTEMPLATE, class ScalarVectorTEMPLATE> class ProgramState {
// Assuming dPhi(v = 0) = 0, we thus only have to solve Au = ell0
BitVector dirichletNodes;
contactNetwork.totalNodes("dirichlet", dirichletNodes);
/*for (size_t i=0; i<dirichletNodes.size(); i++) {
bool val = false;
for (size_t d=0; d<dims; d++) {
val = val || dirichletNodes[i][d];
}
dirichletNodes[i] = val;
for (size_t d=0; d<dims; d++) {
dirichletNodes[i][d] = val;
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++) {
dirichletNodes[dof] = true;
}
} else {
dof += body.nVertices();
}
}*/
}
std::cout << "solving linear problem for u..." << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment