# Path: postproclib/postproc.py
# class PostProc:
# 
#     def __str__(self):
#         string =  ('\nAvailable outputs in ' + self.resultsdir + ' include:\n\n')
#         string += ('\t{0:^24s}\t{1:>10s}\n'.format('field', 'records'))
#         #string += ('\t{0:^24s}\t{1:^10s}\n'.format('-'*24, '-'*10))
#         for key,field in sorted(self.plotlist.items()):
#             line = '\t{0:<24s}=\t{1:>10f},\n'.format(key, field.maxrec)
#             string += line
#         return string 
# 
# Path: postproclib/pplexceptions.py
# class NoResultsInDir(Exception):
#     pass


import os
import numpy as np
import sys
import math as maths
import glob
from .serial_cfdfields import *
from .headerdata import *
from .postproc import PostProc
from .pplexceptions import NoResultsInDir 
            raise NoResultsInDir

        #Velocity
        if 'continuum_vbins' in (self.fieldfiles1):
            d1 = Serial_CFD_vField(self.resultsdir, **kwargs)
            self.plotlist.update({'u':d1})

        #Stress
        if 'continuum_tau_xx' in (self.fieldfiles1):
            M1 = Serial_CFD_StressField(self.resultsdir,
                                        fname='continuum_tau_xx', 
                                        **kwargs)
            self.plotlist.update({'CFD surface Tau_xx':M1})

        if 'continuum_tau_xy' in (self.fieldfiles1):
            M1 = Serial_CFD_StressField(self.resultsdir,
                                        fname='continuum_tau_xy', **kwargs)
            self.plotlist.update({'CFD surface Tau_xx':M1})

        if 'continuum_tau_yx' in (self.fieldfiles1):
            M1 = Serial_CFD_StressField(self.resultsdir,
                                        fname='continuum_tau_yx', **kwargs)
            self.plotlist.update({'CFD surface Tau_xx':M1})

        if 'continuum_tau_yy' in (self.fieldfiles1):
            M1 = Serial_CFD_StressField(self.resultsdir,
                                        fname='continuum_tau_yy', **kwargs)
            self.plotlist.update({'CFD surface Tau_xx':M1})

        if (len(self.plotlist) == 0):

# Path: postproclib/postproc.py
# class PostProc:
# 
#     def __str__(self):
#         string =  ('\nAvailable outputs in ' + self.resultsdir + ' include:\n\n')
#         string += ('\t{0:^24s}\t{1:>10s}\n'.format('field', 'records'))
#         #string += ('\t{0:^24s}\t{1:^10s}\n'.format('-'*24, '-'*10))
#         for key,field in sorted(self.plotlist.items()):
#             line = '\t{0:<24s}=\t{1:>10f},\n'.format(key, field.maxrec)
#             string += line
#         return string 
# 
# Path: postproclib/pplexceptions.py
# class NoResultsInDir(Exception):
#     pass


# Path: postproclib/serial_cfdpostproc.py
import os
import numpy as np
import sys
import math as maths
import glob
from .serial_cfdfields import *
from .headerdata import *
from .postproc import PostProc
from .pplexceptions import NoResultsInDir 

            raise NoResultsInDir

        #Velocity
        if 'continuum_vbins' in (self.fieldfiles1):
            d1 = Serial_CFD_vField(self.resultsdir, **kwargs)
            self.plotlist.update({'u':d1})

        #Stress
        if 'continuum_tau_xx' in (self.fieldfiles1):
            M1 = Serial_CFD_StressField(self.resultsdir,
                                        fname='continuum_tau_xx', 
                                        **kwargs)
            self.plotlist.update({'CFD surface Tau_xx':M1})

        if 'continuum_tau_xy' in (self.fieldfiles1):
            M1 = Serial_CFD_StressField(self.resultsdir,
                                        fname='continuum_tau_xy', **kwargs)
            self.plotlist.update({'CFD surface Tau_xx':M1})

        if 'continuum_tau_yx' in (self.fieldfiles1):
            M1 = Serial_CFD_StressField(self.resultsdir,
                                        fname='continuum_tau_yx', **kwargs)
            self.plotlist.update({'CFD surface Tau_xx':M1})

        if 'continuum_tau_yy' in (self.fieldfiles1):
            M1 = Serial_CFD_StressField(self.resultsdir,
                                        fname='continuum_tau_yy', **kwargs)
            self.plotlist.update({'CFD surface Tau_xx':M1})

        if (len(self.plotlist) == 0):

            raise NoResultsInDir 