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

alpha_new -> alpha

parent 7efed67c
No related branches found
No related tags found
No related merge requests found
......@@ -198,8 +198,8 @@ int main(int argc, char *argv[]) {
VectorType u_diff(finestSize);
u_diff = 0.0; // Has to be zero!
auto alpha_new = Dune::make_shared<SingletonVectorType>(finestSize);
*alpha_new = alpha_old;
auto alpha = Dune::make_shared<SingletonVectorType>(finestSize);
*alpha = alpha_old;
SingletonVectorType vonMisesStress;
VectorType rhs;
......@@ -268,8 +268,7 @@ int main(int argc, char *argv[]) {
++state_fpi) {
auto myGlobalNonlinearity =
assemble_nonlinearity<MatrixType, VectorType>(
parset.sub("boundary.friction"), nodalIntegrals, alpha_new,
h);
parset.sub("boundary.friction"), nodalIntegrals, alpha, h);
MyConvexProblemType const myConvexProblem(stiffnessMatrix,
*myGlobalNonlinearity, rhs);
......@@ -295,12 +294,11 @@ int main(int argc, char *argv[]) {
switch (parset.get<Config::state_model>(
"boundary.friction.state.model")) {
case Config::Dieterich:
(*alpha_new)[i] =
(*alpha)[i] =
state_update_dieterich(h, unorm / L, alpha_old[i]);
break;
case Config::Ruina:
(*alpha_new)[i] =
state_update_ruina(h, unorm / L, alpha_old[i]);
(*alpha)[i] = state_update_ruina(h, unorm / L, alpha_old[i]);
break;
}
}
......@@ -319,7 +317,7 @@ int main(int argc, char *argv[]) {
if (parset.get<bool>("writeEvolution")) {
double out;
neumannFunction.evaluate(time, out);
octave_writer << (*alpha_new)[first_frictional_node][0] << " "
octave_writer << (*alpha)[first_frictional_node][0] << " "
<< u[first_frictional_node][0] * 1e6 << " " << out
<< std::endl;
}
......@@ -330,7 +328,7 @@ int main(int argc, char *argv[]) {
if (parset.get<bool>("printVelocitySteppingComparison")) {
double const v = u_diff[first_frictional_node].two_norm() / h / L;
double const euler = (*alpha_new)[first_frictional_node];
double const euler = (*alpha)[first_frictional_node];
double direct;
if (run < 120) {
direct = euler;
......@@ -353,7 +351,7 @@ int main(int argc, char *argv[]) {
// Record the coefficient of friction at a fixed node
if (parset.get<bool>("printCoefficient")) {
double const V = u_diff[first_frictional_node].two_norm();
double const state = (*alpha_new)[first_frictional_node];
double const state = (*alpha)[first_frictional_node];
coefficient_writer << (mu + a * std::log(V * eta) +
b * (state - std::log(eta * L))) << std::endl;
......@@ -361,7 +359,7 @@ int main(int argc, char *argv[]) {
}
u += u_diff;
alpha_old = *alpha_new;
alpha_old = *alpha;
// Compute von Mises stress and write everything to a file
if (parset.get<bool>("writeVTK")) {
......@@ -373,7 +371,7 @@ int main(int argc, char *argv[]) {
.assemble(localStressAssembler, vonMisesStress, true);
writeVtk<P1Basis, P0Basis, VectorType, SingletonVectorType, GridView>(
p1Basis, u, *alpha_new, p0Basis, vonMisesStress, leafView,
p1Basis, u, *alpha, p0Basis, vonMisesStress, leafView,
(boost::format("obs%d") % run).str());
}
}
......
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