示例#1
0
    def computeFaceDimensions(self):
        geometry = self.geometry
        oml0 = self.geometry.oml0

        groupLengths = numpy.zeros(oml0.ngroup)
        groupCount = numpy.zeros(oml0.ngroup,int)
        for k in range(len(geometry.comps)):
            comp = geometry.comps[geometry.keys[k]]
            for f in range(len(comp.Ks)):
                ni, nj = comp.Ks[f].shape
                groupLengths, groupCount = PSMlib.addgrouplengths(ni, nj, oml0.nsurf, oml0.nedge, oml0.ngroup, comp.Ks[f]+1, oml0.surf_edge, oml0.edge_group, self.surfEdgeLengths, groupLengths, groupCount)

        groupLengths = groupLengths / groupCount
                 
        faceDims = []       
        for k in range(len(geometry.comps)):
            comp = geometry.comps[geometry.keys[k]]
            faceDimsComp = []
            for f in range(len(comp.Ks)):
                ni, nj = comp.Ks[f].shape
                idims, jdims = PSMlib.computefacedimensions(ni, nj, oml0.nsurf, oml0.nedge, oml0.ngroup, comp.Ks[f]+1, oml0.surf_edge, oml0.edge_group, groupLengths)
                faceDimsComp.append([idims,jdims])
            faceDims.append(faceDimsComp)

        self.faceDims = faceDims
示例#2
0
文件: airframe.py 项目: nbons/GeoMACH
    def computeFaceDimensions(self):
        geometry = self.geometry
        bse = geometry._bse
        nsurf = bse._num['surf']
        nedge = bse._num['edge']
        ngroup = bse._num['group']
        surf_edge = self.computeSurfEdge()
        edge_group = bse._topo['edge_group']

        groupLengths = numpy.zeros(ngroup)
        groupCount = numpy.zeros(ngroup, int)
        for comp in geometry.comps.values():
            for face in comp.faces.values():
                ni, nj = face._num_surf['u'], face._num_surf['v']
                surf_indices = face._surf_indices
                groupLengths[:], groupCount[:] = PSMlib.addgrouplengths(
                    ni, nj, nsurf, nedge, ngroup, surf_indices + 1, surf_edge,
                    edge_group, self.surfEdgeLengths, groupLengths, groupCount)

        groupLengths = groupLengths / groupCount

        faceDims = OrderedDict()
        for comp in geometry.comps.values():
            faceDimsComp = OrderedDict()
            for face in comp.faces.values():
                ni, nj = face._num_surf['u'], face._num_surf['v']
                surf_indices = face._surf_indices
                idims, jdims = PSMlib.computefacedimensions(
                    ni, nj, nsurf, nedge, ngroup, surf_indices + 1, surf_edge,
                    edge_group, groupLengths)
                faceDimsComp[face._name] = [idims, jdims]
            faceDims[comp._name] = faceDimsComp

        self.faceDims = faceDims
示例#3
0
    def computeFaceDimensions(self):
        geometry = self.geometry
        oml0 = geometry.oml0

        groupLengths = numpy.zeros(oml0.ngroup)
        groupCount = numpy.zeros(oml0.ngroup, int)
        for comp in geometry.comps.values():
            for face in comp.faces.values():
                ni, nj = face.num_surf
                groupLengths[:], groupCount[:] = PSMlib.addgrouplengths(
                    ni, nj, oml0.nsurf, oml0.nedge, oml0.ngroup,
                    face.surf_indices + 1, oml0.surf_edge, oml0.edge_group,
                    self.surfEdgeLengths, groupLengths, groupCount)

        groupLengths = groupLengths / groupCount

        faceDims = OrderedDict()
        for comp in geometry.comps.values():
            faceDimsComp = OrderedDict()
            for face in comp.faces.values():
                ni, nj = face.num_surf
                idims, jdims = PSMlib.computefacedimensions(
                    ni, nj, oml0.nsurf, oml0.nedge, oml0.ngroup,
                    face.surf_indices + 1, oml0.surf_edge, oml0.edge_group,
                    groupLengths)
                faceDimsComp[face.name] = [idims, jdims]
            faceDims[comp.name] = faceDimsComp

        self.faceDims = faceDims
示例#4
0
    def computeFaceDimensions(self):
        geometry = self.geometry
        bse = geometry._bse
        nsurf = bse._num['surf']
        nedge = bse._num['edge']
        ngroup = bse._num['group']
        surf_edge = self.computeSurfEdge()
        edge_group = bse._topo['edge_group']

        groupLengths = numpy.zeros(ngroup)
        groupCount = numpy.zeros(ngroup,int)
        for comp in geometry.comps.values():
            for face in comp.faces.values():
                ni, nj = face._num_surf['u'], face._num_surf['v']
                surf_indices = face._surf_indices
                groupLengths[:], groupCount[:] = PSMlib.addgrouplengths(ni, nj, nsurf, nedge, ngroup, surf_indices+1, surf_edge, edge_group, self.surfEdgeLengths, groupLengths, groupCount)

        groupLengths = groupLengths / groupCount
                 
        faceDims = OrderedDict()
        for comp in geometry.comps.values():
            faceDimsComp = OrderedDict()
            for face in comp.faces.values():
                ni, nj = face._num_surf['u'], face._num_surf['v']
                surf_indices = face._surf_indices
                idims, jdims = PSMlib.computefacedimensions(ni, nj, nsurf, nedge, ngroup, surf_indices+1, surf_edge, edge_group, groupLengths)
                faceDimsComp[face._name] = [idims,jdims]
            faceDims[comp._name] = faceDimsComp

        self.faceDims = faceDims
示例#5
0
    def computeFaceDimensions(self):
        geometry = self.geometry
        oml0 = geometry.oml0

        groupLengths = numpy.zeros(oml0.ngroup)
        groupCount = numpy.zeros(oml0.ngroup,int)
        for comp in geometry.comps.values():
            for face in comp.faces.values():
                ni, nj = face.num_surf
                groupLengths[:], groupCount[:] = PSMlib.addgrouplengths(ni, nj, oml0.nsurf, oml0.nedge, oml0.ngroup, face.surf_indices+1, oml0.surf_edge, oml0.edge_group, self.surfEdgeLengths, groupLengths, groupCount)

        groupLengths = groupLengths / groupCount
                 
        faceDims = OrderedDict()
        for comp in geometry.comps.values():
            faceDimsComp = OrderedDict()
            for face in comp.faces.values():
                ni, nj = face.num_surf
                idims, jdims = PSMlib.computefacedimensions(ni, nj, oml0.nsurf, oml0.nedge, oml0.ngroup, face.surf_indices+1, oml0.surf_edge, oml0.edge_group, groupLengths)
                faceDimsComp[face.name] = [idims,jdims]
            faceDims[comp.name] = faceDimsComp

        self.faceDims = faceDims