corrector example added
This commit is contained in:
30
corrector/run_estimate.py
Normal file
30
corrector/run_estimate.py
Normal file
@ -0,0 +1,30 @@
|
||||
import sys
|
||||
import logging
|
||||
import os.path
|
||||
from dolfin import *
|
||||
from dPdirectestim.dPdirectestim import *
|
||||
|
||||
|
||||
logging.getLogger().setLevel(logging.INFO)
|
||||
#set_log_level(PROGRESS)
|
||||
|
||||
parameters['form_compiler']['optimize'] = True
|
||||
parameters['form_compiler']['cpp_optimize'] = True
|
||||
parameters['form_compiler']['cpp_optimize_flags'] = \
|
||||
'-O3 -ffast-math -march=native'
|
||||
|
||||
if len(sys.argv) > 1 and os.path.exists(sys.argv[1]):
|
||||
inpfile = sys.argv[1]
|
||||
print('Found input file ' + inpfile)
|
||||
else:
|
||||
raise Exception('No input file given')
|
||||
|
||||
estimator = DPDirectEstim(inpfile)
|
||||
|
||||
estimator.estimate()
|
||||
|
||||
|
||||
if '2019' in dolfin.__version__:
|
||||
list_timings(TimingClear.clear, [TimingType.wall])
|
||||
else:
|
||||
list_timings(TimingClear_clear, [TimingType_wall])
|
Reference in New Issue
Block a user