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

[Problem] Choose a spatially constant initial velocity

parent 8927b5e7
No related branches found
No related tags found
No related merge requests found
...@@ -341,10 +341,18 @@ int main(int argc, char *argv[]) { ...@@ -341,10 +341,18 @@ int main(int argc, char *argv[]) {
VectorType u_initial(finestSize); VectorType u_initial(finestSize);
u_initial = 0.0; u_initial = 0.0;
VectorType v_initial(finestSize);
v_initial = 0.0;
// From here on: calculate the initial acceleration VectorType v_initial(finestSize);
{
// Prescribe a homogeneous velocity field in the x-direction
// This way, the initial condition for v and the Dirichlet
// condition match up at t=0
v_initial = 0.0;
double v_initial_const;
dirichletFunction.evaluate(0.0, v_initial_const);
for (size_t i = 0; i < v_initial.size(); ++i)
v_initial[i][0] = v_initial_const;
}
VectorType a_initial(finestSize); VectorType a_initial(finestSize);
a_initial = 0.0; a_initial = 0.0;
{ {
......
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