From 31ae97e16f8e334334980cdf9773514448886983 Mon Sep 17 00:00:00 2001
From: Timo Koch <timo.koch@iws.uni-stuttgart.de>
Date: Sat, 23 Apr 2022 17:02:25 +0200
Subject: [PATCH] [test][python][cleanup] Make initialization order more
 sensible

The old one wasn't wrong but it seems to make more sense and easier to read
if the gridvariables are initialized before passing them to the assembler.
---
 test/python/test_1p.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/python/test_1p.py b/test/python/test_1p.py
index 029be21f61..89b14accbc 100755
--- a/test/python/test_1p.py
+++ b/test/python/test_1p.py
@@ -129,11 +129,11 @@ problem = Problem()
 model["Problem"] = Property.fromInstance(problem)
 
 # Initialize the GridVariables and the Assembler
+sol = blockVector(gridGeometry.numDofs)
 gridVars = GridVariables(problem=problem, model=model)
-assembler = FVAssembler(problem=problem, gridVariables=gridVars, model=model, diffMethod=diffMethod)
-sol = blockVector(assembler.numDofs)
 gridVars.init(sol)
-print("numdofs", assembler.numDofs)
+assembler = FVAssembler(problem=problem, gridVariables=gridVars, model=model, diffMethod=diffMethod)
+print("num dofs: ", assembler.numDofs)
 
 # Assemble the Jacobian and the residual
 assembler.assembleJacobianAndResidual(sol)
-- 
GitLab