# Path: ffthompy/general/base.py
# def get_base_dir():
#     module_dir = os.path.dirname(os.path.abspath(__file__))
#     base_dir = os.path.normpath(os.path.join(module_dir, '../..'))
#     return base_dir
# 
# class Timer():
#     def __init__(self, name='time', start=True):
#         self.name = name
#         if start:
#             self.start()
# 
#     def start(self):
#         self.vals = []
#         self.ttin = [time.process_time(), time.clock(), time.time()]
# 
#     def measure(self, print_time=True):
#         self.vals.append([time.process_time()-self.ttin[0],
#                           time.clock()-self.ttin[1],
#                           time.time()-self.ttin[2]])
#         if print_time:
#             print(self)
# 
#     def __repr__(self):
#         return 'time (%s): %s' % (self.name, str(self.vals))


import numpy as np
import ffthompy.applications
import os
import sys
            import pickle
from ffthompy.general.base import get_base_dir, Timer
from copy import deepcopy
            if not os.path.exists(dirs) and dirs != '':
                os.makedirs(dirs)

            py_version = sys.version_info[0]
            if py_version == 2:
                with open(filename, 'w') as fop:
                    data = deepcopy(self.output)
                    pickle.dump(data, fop, protocol=None)
            elif py_version == 3:
                with open(filename, 'wb') as fop:
                    pickle.dump(self.output, fop, protocol=3)
            else:
                raise NotImplementedError('Python version!')

    def __repr__(self):
        ss = "Class : {}\n".format(self.__class__.__name__)
        ss += '    name : {}\n'.format(self.name)
        ss += '    physics = {}\n'.format(self.physics)
        ss += '    dim = {} (dimension)\n'.format(self.dim)
        ss += '    Y = {} (PUC size)\n'.format(self.Y)
        ss += '    material:\n'
        for key, val in list(self.material.items()):
            ss += '        {0} : {1}\n'.format(key, str(val))
        ss += '    solve:\n'
        for key, val in list(self.solve.items()):
            ss += '        {0} : {1}\n'.format(key, str(val))
        return ss


def import_file(file_name):

# Path: ffthompy/general/base.py
# def get_base_dir():
#     module_dir = os.path.dirname(os.path.abspath(__file__))
#     base_dir = os.path.normpath(os.path.join(module_dir, '../..'))
#     return base_dir
# 
# class Timer():
#     def __init__(self, name='time', start=True):
#         self.name = name
#         if start:
#             self.start()
# 
#     def start(self):
#         self.vals = []
#         self.ttin = [time.process_time(), time.clock(), time.time()]
# 
#     def measure(self, print_time=True):
#         self.vals.append([time.process_time()-self.ttin[0],
#                           time.clock()-self.ttin[1],
#                           time.time()-self.ttin[2]])
#         if print_time:
#             print(self)
# 
#     def __repr__(self):
#         return 'time (%s): %s' % (self.name, str(self.vals))


# Path: ffthompy/problem.py
import numpy as np
import ffthompy.applications
import os
import sys
            import pickle
from ffthompy.general.base import get_base_dir, Timer
from copy import deepcopy

            if not os.path.exists(dirs) and dirs != '':
                os.makedirs(dirs)

            py_version = sys.version_info[0]
            if py_version == 2:
                with open(filename, 'w') as fop:
                    data = deepcopy(self.output)
                    pickle.dump(data, fop, protocol=None)
            elif py_version == 3:
                with open(filename, 'wb') as fop:
                    pickle.dump(self.output, fop, protocol=3)
            else:
                raise NotImplementedError('Python version!')

    def __repr__(self):
        ss = "Class : {}\n".format(self.__class__.__name__)
        ss += '    name : {}\n'.format(self.name)
        ss += '    physics = {}\n'.format(self.physics)
        ss += '    dim = {} (dimension)\n'.format(self.dim)
        ss += '    Y = {} (PUC size)\n'.format(self.Y)
        ss += '    material:\n'
        for key, val in list(self.material.items()):
            ss += '        {0} : {1}\n'.format(key, str(val))
        ss += '    solve:\n'
        for key, val in list(self.solve.items()):
            ss += '        {0} : {1}\n'.format(key, str(val))
        return ss


def import_file(file_name):

    base_dir = get_base_dir()