diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc index aa9e475aebccb68e611e2f46818dfe75339f18f0..caac4622c6b4a268f40e341e5af7d826f545ba93 100644 --- a/src/one-body-sample.cc +++ b/src/one-body-sample.cc @@ -156,12 +156,12 @@ void implicitEulerExtractVelocity(VectorType const &u_old, // // Setup: Substract a(u_new, .) from rhs template <class VectorType, class MatrixType, class FunctionType, int dim> -void twoStageImplicitSetup(VectorType const &ell, MatrixType const &A, - VectorType const &u_old, VectorType const *u_old_old, - VectorType &problem_rhs, VectorType &problem_iterate, - MatrixType &problem_A, - Dune::BitSetVector<dim> const &dirichletNodes, - FunctionType const &dirichletFunction, double time) { +void ImplicitTwoStepSetup(VectorType const &ell, MatrixType const &A, + VectorType const &u_old, VectorType const *u_old_old, + VectorType &problem_rhs, VectorType &problem_iterate, + MatrixType &problem_A, + Dune::BitSetVector<dim> const &dirichletNodes, + FunctionType const &dirichletFunction, double time) { problem_A = A; problem_A /= 1.5; problem_rhs = ell; @@ -187,10 +187,10 @@ void twoStageImplicitSetup(VectorType const &ell, MatrixType const &A, } template <class VectorType> -void twoStageImplicitExtract(VectorType const &u_old, - VectorType const *u_old_old, - VectorType const &problem_iterate, - VectorType &solution) { +void ImplicitTwoStepExtract(VectorType const &u_old, + VectorType const *u_old_old, + VectorType const &problem_iterate, + VectorType &solution) { solution = problem_iterate; solution.axpy(2, u_old); solution.axpy(-.5, *u_old_old); @@ -207,10 +207,10 @@ void twoStageImplicitExtract(VectorType const &u_old, } template <class VectorType> -void twoStageImplicitExtractVelocity(VectorType const &u_old, - VectorType const *u_old_old, - VectorType const &problem_iterate, - VectorType &diff) { +void ImplicitTwoStepExtractVelocity(VectorType const &u_old, + VectorType const *u_old_old, + VectorType const &problem_iterate, + VectorType &diff) { diff = problem_iterate; } @@ -369,11 +369,11 @@ int main(int argc, char *argv[]) { VectorType problem_iterate(finestSize); auto setupFunc = - (run == 1 || !parset.get<bool>("twoStageImplicit")) + (run == 1 || !parset.get<bool>("ImplicitTwoStep")) ? &implicitEulerSetup<VectorType, MatrixType, decltype(dirichletFunction), dim> - : &twoStageImplicitSetup<VectorType, MatrixType, - decltype(dirichletFunction), dim>; + : &ImplicitTwoStepSetup<VectorType, MatrixType, + decltype(dirichletFunction), dim>; VectorType *u_old_old_ptr = (run == 1) ? nullptr : &u_previous; setupFunc(ell, stiffnessMatrix, u, u_old_old_ptr, problem_rhs, @@ -400,17 +400,17 @@ int main(int argc, char *argv[]) { false); // absolute error overallSolver.solve(); - auto extractFunc = (run == 1 || !parset.get<bool>("twoStageImplicit")) + auto extractFunc = (run == 1 || !parset.get<bool>("ImplicitTwoStep")) ? implicitEulerExtract<VectorType> - : twoStageImplicitExtract<VectorType>; + : ImplicitTwoStepExtract<VectorType>; // Extract solution from solver extractFunc(u, u_old_old_ptr, problem_iterate, solution); auto extractDiffFunc = - (run == 1 || !parset.get<bool>("twoStageImplicit")) + (run == 1 || !parset.get<bool>("implicitTwoStep")) ? implicitEulerExtractVelocity<VectorType> - : twoStageImplicitExtractVelocity<VectorType>; + : ImplicitTwoStepExtractVelocity<VectorType>; // Extract difference from solver extractDiffFunc(u, u_old_old_ptr, problem_iterate, u_diff); diff --git a/src/one-body-sample.parset b/src/one-body-sample.parset index 3a62349169da768522b179163b1a41395dff86f7..4fd5a8e30cdfb5c2d357e136fdb4062a98844867 100644 --- a/src/one-body-sample.parset +++ b/src/one-body-sample.parset @@ -13,7 +13,7 @@ printVelocitySteppingComparison = false enable_timer = false -twoStageImplicit = false +implicitTwoStep = false [grid] refinements = 4