-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdarcy_brinkman_3d.py
72 lines (58 loc) · 1.29 KB
/
darcy_brinkman_3d.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
file='./mesh/4x4x4.msh'
# @profile
def importe():
from impress import FineScaleMesh as mesh
from packs.stokes_brinkman_3d import stokes_brinkman as stokes
import multiprocessing as mp
import gc
import numpy as np
import time
# @profile
def get_sol2(file):
# gc.collect(generation=0)
M = mesh(file)
stokes.stokes_solver(M)
# del(M)
# @profile
def run_process():
p=mp.Process(target=get_sol2, args=[file])
p.start()
p.join()
# run_process()
get_sol2(file)
# import update_inputs
importe()
#
# @profile
# def get_sol(file):
# M=mesh(file)
# stokes.stokes_solver(M)
# # gc.collect(generation=0)
# # gc.is_tracked(M)
#
#
# # gc.collect(generation=2)
# @profile
# def nada():
# a=np.ones((1000,1000))
# del(a)
#
# @profile
# def run_process():
# p=mp.Process(target=get_sol2, args=[file])
# p.start()
# p.join()
# import pdb; pdb.set_trace()
# run_process()
# nada()
# subDomains = [file]
# p=mp.Process(target=acumulate_OP, args=[file])
# p.start()
# p.join()
# procs = [mp.Process(target=acumulate_OP, args=[s]) for s in subDomains]
# get_sol(file)
# get_sol2(file)
# import pdb; pdb.set_trace()
# for i in range(5):
# get_sol(file)
# import pdb; pdb.set_trace()