Skip to content
Snippets Groups Projects
Commit 734aa557 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Rely on FieldVector<double, 1><->double conversion

parent 850d5035
No related branches found
No related tags found
No related merge requests found
......@@ -50,13 +50,13 @@ class GlobalLaursenNonlinearity
sigma_n [id + mu id] = sigma_n (1 + mu) id
*/
virtual shared_ptr<LocalNonlinearity<dim> const> restriction(int i) const {
if ((*nodalIntegrals)[i][0] == 0)
if ((*nodalIntegrals)[i] == 0)
return trivialNonlinearity;
if (restrictions[i] != nullptr)
return restrictions[i];
double coefficient = (*nodalIntegrals)[i][0];
double coefficient = (*nodalIntegrals)[i];
coefficient *= (*normalStress)[i];
coefficient *= 1 + (*mu)[i];
......
......@@ -51,15 +51,15 @@ class GlobalRuinaNonlinearity
Return a restriction of the outer function to the i'th node.
*/
virtual shared_ptr<LocalNonlinearity<dim> const> restriction(int i) const {
if ((*nodalIntegrals)[i][0] == 0)
if ((*nodalIntegrals)[i] == 0)
return trivialNonlinearity;
if (restrictions[i] != nullptr)
return restrictions[i];
auto const func = make_shared<RuinaFunction const>(
(*nodalIntegrals)[i][0], (*a)[i][0], (*mu)[i][0], (*eta)[i][0],
(*normalStress)[i][0], (*b)[i][0], (*state)[i][0], (*L)[i][0], h);
(*nodalIntegrals)[i], (*a)[i], (*mu)[i], (*eta)[i], (*normalStress)[i],
(*b)[i], (*state)[i], (*L)[i], h);
restrictions[i] = make_shared<LocalNonlinearity<dim> const>(func);
return restrictions[i];
}
......
......@@ -311,7 +311,7 @@ int main(int argc, char *argv[]) {
double const L = parset.get<double>("boundary.friction.ruina.L");
double const unorm = u4_diff[i].two_norm();
(*s4_new)[i][0] = compute_state_update(h, unorm, L, s4_old[i][0]);
(*s4_new)[i] = compute_state_update(h, unorm, L, s4_old[i]);
}
}
}
......@@ -364,7 +364,7 @@ int main(int argc, char *argv[]) {
double const L = parset.get<double>("boundary.friction.ruina.L");
double const unorm = u5_diff[i].two_norm();
(*s5_new)[i][0] = compute_state_update(h, unorm, L, s5_old[i][0]);
(*s5_new)[i] = compute_state_update(h, unorm, L, s5_old[i]);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment