コード例 #1
0
ファイル: graphical_reports.py プロジェクト: smohaorg/xc
 def getOutputHandler(self, setToDisplay):
     ''' Return an output handler from the set argument.
         NOT a very elegant solution-> to refactor.'''
     modelSpace= predefined_spaces.getModelSpaceFromPreprocessor(setToDisplay.getPreprocessor)
     outputHandler= oh.OutputHandler(modelSpace)
     outputHandler.outputStyle.cameraParameters= self.cameraParameters
     return outputHandler
コード例 #2
0
 def __init__(self,
              feProblem,
              loadCaseName='',
              loadCaseExpr='',
              outputStyle=output_styles.OutputStyle()):
     modelSpace = predefined_spaces.getModelSpaceFromPreprocessor(
         feProblem.getPreprocessor)
     super(LoadCaseResults, self).__init__(modelSpace, loadCaseName,
                                           loadCaseExpr, outputStyle)
     self.feProblem = feProblem
     if (self.feProblem):
         self.prep = feProblem.getPreprocessor
コード例 #3
0
ファイル: graphical_reports.py プロジェクト: smohaorg/xc
    def loadReports(self,FEcase,texFile,cfg):
        '''Creates the graphics files of loads for the load case and insert them in
        a LaTex file

        :param FEcase:     finite element problem 
        :param texFile:    laTex file where to include the graphics 
                           (e.g.:'text/report_loads.tex')
        :param cfg:        instance of EnvConfig class with config parameters
        '''
        preprocessor= FEcase.getPreprocessor
        modelSpace= predefined_spaces.getModelSpaceFromPreprocessor(preprocessor)
        self.writeLoadReport(modelSpace, texFile,cfg)
コード例 #4
0
ファイル: graphical_reports.py プロジェクト: smohaorg/xc
    def simplLCReports(self,FEproblem,texFile,cfg):
        '''Creates the graphics files of displacements and internal forces 
         calculated for a simple load case and insert them in a LaTex file

        :param FEproblem:  finite element problem
        :param texFile:    laTex file where to include the graphics 
                           (e.g.:'text/report_loads.tex')
        :param cfg:        instance of EnvConfig class with config parameters
        '''
        preprocessor= FEproblem.getPreprocessor
        modelSpace= predefined_spaces.getModelSpaceFromPreprocessor(preprocessor)
        self.solveLC(modelSpace)
        self.writeSimpleLoadCaseReport(modelSpace, texFile,cfg)
コード例 #5
0
    def loadReports(self, FEcase, texFile, cfg):
        '''Creates the graphics files of loads for the load case and insert them in
      a LaTex file

      :param FEcase:     finite element case 
      :param texFile:    laTex file where to include the graphics 
                         (e.g.:'text/report_loads.tex')
      :param cfg:        instance of EnvConfig class with config parameters
      '''
        fullPath = cfg.projectDirTree.getReportLoadsGrPath()
        rltvPath = cfg.projectDirTree.getRltvReportLoadsGrPath()
        preprocessor = FEcase.getPreprocessor
        labl = self.loadCaseName
        lcs = QGrph.LoadCaseResults(FEcase)
        modelSpace = predefined_spaces.getModelSpaceFromPreprocessor(
            preprocessor)
        modelSpace.removeAllLoadPatternsFromDomain()
        modelSpace.addNewLoadCaseToDomain(self.loadCaseName, self.loadCaseExpr)
        for st in self.setsToDispLoads:
            fullgrfname = fullPath + self.loadCaseName + st.name
            rltvgrfname = rltvPath + self.loadCaseName + st.name
            capt = self.getDescription(
            ) + '. ' + st.description + ', ' + self.unitsLoads
            jpegFileName = fullgrfname + '.jpg'
            #          lcs.displayLoads(setToDisplay=st,caption= capt,fileName= jpegFileName)  # changed 22/06/2020
            lcs.displayLoadVectors(setToDisplay=st,
                                   caption=capt,
                                   fileName=jpegFileName)
            insertGrInTex(texFile=texFile,
                          grFileNm=rltvgrfname,
                          grWdt=cfg.grWidth,
                          capText=capt,
                          labl=labl)
        for st in self.setsToDispBeamLoads:
            fullgrfname = fullPath + self.loadCaseName + st.name
            rltvgrfname = rltvPath + self.loadCaseName + st.name
            capt = self.getDescription(
            ) + '. ' + st.description + ', ' + self.unitsLoads
            jpegFileName = fullgrfname + '.jpg'
            lcs.displayLoads(setToDisplay=st,
                             caption=capt,
                             fileName=jpegFileName)  # changed 22/06/2020
            insertGrInTex(texFile=texFile,
                          grFileNm=rltvgrfname,
                          grWdt=cfg.grWidth,
                          capText=capt,
                          labl=labl)