File: backrest2.py

package info (click to toggle)
dune-grid 2.11.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,472 kB
  • sloc: cpp: 60,883; python: 1,438; perl: 191; makefile: 12; sh: 3
file content (20 lines) | stat: -rw-r--r-- 705 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
# SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception

import pickle
import dune.generator # needed to set path to 'dune.generated' - could be moved to 'import dune'
[a,string,otherHGrid,value] = pickle.load(open("dumpA","rb"))

otherGrid = otherHGrid.leafView

otherGrid.plot()

print("leaf after refine", otherGrid.size(0))
print("level 1 after refine",
      otherGrid.hierarchicalGrid.levelView(1).size(0))
otherGrid.hierarchicalGrid.globalRefine(-2)
print("coarsen other", otherGrid.size(0))
print("numpy vector",a)

test = pickle.load(open("dumpB","rb"))
print("test:",test.run())