From cca2aa83478d7ff48a72d8536bd4c148a444ad8c Mon Sep 17 00:00:00 2001
From: JanHab <jan.habscheid@rwth-aachen.de>
Date: Tue, 11 Feb 2025 12:07:37 +0100
Subject: [PATCH] Try out coverage

---
 .coverage     | Bin 53248 -> 53248 bytes
 coverage.xml  |   4 +--
 fxdgm/Eq02.py |  80 +++++++++++++++++++++++++-------------------------
 3 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/.coverage b/.coverage
index a9320ef354670acb84953dfaf7fc2b2f67903333..f50d7eead9a1e192f1d3388d0616e50d9d8c294c 100644
GIT binary patch
delta 522
zcmZozz}&Eac>}A1AnzXr{+;}p{Azr+_@?uP^8VQ@DDaGzEu5W&q0xA9gTFe5Zb@o!
zNoHR9<WxTuHU~BqhDKJ9xHL>$KdmAqJy+kg&`+<R(vg*gp^+UVFM}a(V4_!0>BYjr
z&?pH~po*p-C^aoJFEzzCwK&7j1!NR69;1x(3M&1WSQr`=K}Kn!8ReRjnp{$ppHo?q
zne398pOUIqQ0dCZ!qCVMQjPG@JAZLO-oFg|S^VmJGx)-I|MK1D-?dp#;5jc#1WTjw
zWX5<6gyPgVRTf8<Mplrh6uO0A&$BtPG_r%FF~bJzcUEtfMoEyo3YvCwue0DW2;_5S
nf0jl?kU<(~24V9!lPgOj|71pggjY7di@&bVsJ;1Ezm)?3q#&v&

delta 313
zcmZozz}&Eac>}A1AfE*T{~`V=eh0oke24ft`7AaI3Mlch`LnYyG%8Pi;HN&>&`*Wc
zoQ;{G6vPwKPpe2t&((J=^wTS-v|wdsC<h6Pz=aJ=^a?7SSXdYuIYAPW`TfONEtoNt
z8R->Nx-qdZGzx;1&GVOLwP9pts0Z`j`HKtkSu*ff^E>h#=Ii3K<onBic(b5@G9OC-
zOQZ5+#yE}1hH<LQ7R;p}wjkVgkfYcvnae?<!f;Wrn^>J$8aYAYllkK%m@(CW9K`I-
f(kKX4GcR6-#fG^a?1#<o;;-v7a&JD?Z{+|0@0VLz

diff --git a/coverage.xml b/coverage.xml
index 4394685..3d7d1a1 100644
--- a/coverage.xml
+++ b/coverage.xml
@@ -1,9 +1,9 @@
 <?xml version="1.0" ?>
-<coverage version="7.6.11" timestamp="1739271601600" lines-valid="591" lines-covered="560" line-rate="0.9475" branches-covered="0" branches-valid="0" branch-rate="0" complexity="0">
+<coverage version="7.6.11" timestamp="1739272050600" lines-valid="591" lines-covered="560" line-rate="0.9475" branches-covered="0" branches-valid="0" branch-rate="0" complexity="0">
 	<!-- Generated by coverage.py: https://coverage.readthedocs.io/en/7.6.11 -->
 	<!-- Based on https://raw.githubusercontent.com/cobertura/web/master/htdocs/xml/coverage-04.dtd -->
 	<sources>
-		<source>/Users/janhabscheid/Documents/git/fxdgm/fxdgm</source>
+		<source>/Users/janhabscheid/Documents/git/fxdgm-testing/fxdgm</source>
 	</sources>
 	<packages>
 		<package name="." line-rate="0.9475" branch-rate="0" complexity="0">
diff --git a/fxdgm/Eq02.py b/fxdgm/Eq02.py
index 15f96f4..b006ed3 100644
--- a/fxdgm/Eq02.py
+++ b/fxdgm/Eq02.py
@@ -242,47 +242,47 @@ def solve_System_2eq(phi_left:float, phi_right:float, p_right:float, z_A:float,
         
         return y_A_vals, y_C_vals, phi_vals, p_vals, x_vals
     
-# if __name__ == '__main__':
-#     # Define the parameters
-#     phi_left = 5.0
-#     phi_right = 0.0
-#     p_right = 0.0
-#     y_A_R = 1/3
-#     y_C_R = 1/3
-#     z_A = -1.0
-#     z_C = 1.0
-#     K = 'incompressible'
-#     Lambda2 = 8.553e-6
-#     a2 = 7.5412e-4
-#     number_cells = 1024
-#     relax_param = .1
-#     rtol = 1e-4
-#     max_iter = 500
+if __name__ == '__main__': # pragma: no cover # dont cover main in coverage
+    # Define the parameters
+    phi_left = 5.0
+    phi_right = 0.0
+    p_right = 0.0
+    y_A_R = 1/3
+    y_C_R = 1/3
+    z_A = -1.0
+    z_C = 1.0
+    K = 'incompressible'
+    Lambda2 = 8.553e-6
+    a2 = 7.5412e-4
+    number_cells = 1024
+    relax_param = .1
+    rtol = 1e-4
+    max_iter = 500
     
-#     # Solve the system
-#     y_A, y_C, phi, p, x = solve_System_2eq(phi_left, phi_right, p_right, z_A, z_C, y_A_R, y_C_R, K, Lambda2, a2, number_cells, relax_param=relax_param, x0=0, x1=1, refinement_style='uniform', return_type='Vector', max_iter=max_iter, rtol=rtol)
+    # Solve the system
+    y_A, y_C, phi, p, x = solve_System_2eq(phi_left, phi_right, p_right, z_A, z_C, y_A_R, y_C_R, K, Lambda2, a2, number_cells, relax_param=relax_param, x0=0, x1=1, refinement_style='uniform', return_type='Vector', max_iter=max_iter, rtol=rtol)
     
-#     # Plot the solution
-#     plt.plot(x, phi)
-#     plt.xlim(0,0.05)
-#     plt.grid()
-#     plt.xlabel('x [-]')
-#     plt.ylabel('$\\varphi$  [-]')
-#     plt.show()
+    # Plot the solution
+    plt.plot(x, phi)
+    plt.xlim(0,0.05)
+    plt.grid()
+    plt.xlabel('x [-]')
+    plt.ylabel('$\\varphi$  [-]')
+    plt.show()
     
-#     plt.plot(x, y_A, '--', color='tab:blue', label='$y_A$')
-#     plt.plot(x, y_C, '-', color='tab:blue', label='$y_C$')
-#     plt.plot(x, 1 - y_A - y_C, ':', color='tab:blue', label='$y_S$')
-#     plt.xlim(0,0.05)
-#     plt.legend()
-#     plt.grid()
-#     plt.xlabel('x [-]')
-#     plt.ylabel('$y_\\alpha$ [-]')
-#     plt.show()
+    plt.plot(x, y_A, '--', color='tab:blue', label='$y_A$')
+    plt.plot(x, y_C, '-', color='tab:blue', label='$y_C$')
+    plt.plot(x, 1 - y_A - y_C, ':', color='tab:blue', label='$y_S$')
+    plt.xlim(0,0.05)
+    plt.legend()
+    plt.grid()
+    plt.xlabel('x [-]')
+    plt.ylabel('$y_\\alpha$ [-]')
+    plt.show()
     
-#     plt.plot(x, p)
-#     plt.xlim(0,0.05)
-#     plt.grid()
-#     plt.xlabel('x [-]')
-#     plt.ylabel('$p$ [-]')
-#     plt.show()
+    plt.plot(x, p)
+    plt.xlim(0,0.05)
+    plt.grid()
+    plt.xlabel('x [-]')
+    plt.ylabel('$p$ [-]')
+    plt.show()
-- 
GitLab