Peano
Loading...
Searching...
No Matches
parseTest3.py
Go to the documentation of this file.
1import numpy as np
2from postProcess import parse_patch_file, reorder_array, plot_field
3
4if __name__ == "__main__":
5 v_solution = parse_patch_file("CollocatedPoisson.value-1.peano-patch-file", "CG")
6 v_random = parse_patch_file("CollocatedPoisson.rand-1.peano-patch-file", "CG")
7 v_random = reorder_array(v_solution, v_random)
8 print(f'{np.max(np.abs(v_solution - v_random)) = }')
9
10 #!!! v_solution and v_random are now Nx3 matrices! for the norm, compare only v[:,2]. Extra check for coordinates consistency can be done in reorder_array()
11 #!!! pay attention to the same in all tests for CG!
12
13 plot_field(v_solution)