• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python assign_type.double_or_blank函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中pyNastran.bdf.bdf_interface.assign_type.double_or_blank函数的典型用法代码示例。如果您正苦于以下问题:Python double_or_blank函数的具体用法?Python double_or_blank怎么用?Python double_or_blank使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了double_or_blank函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: add_card

    def add_card(self, card, comment=''):
        pid = integer(card, 1, 'property_id')
        if comment:
            self.set_comment(pid, comment)
        i = self.i
        self.property_id[i] = pid
        self.thickness[i] = double(card, 3, 'thickness')

        self.twelveIt3[i] = double_or_blank(card, 5, '12*I/t^3', 1.0)
        self.tst[i] = double_or_blank(card, 7, 'ts/t', 0.833333)
        self.nsm[i] = double_or_blank(card, 8, 'nsm', 0.0)

        t_over_2 = self.thickness[i] / 2.
        self.z1[i] = double_or_blank(card, 9, 'z1', -t_over_2)
        self.z2[i] = double_or_blank(card, 10, 'z2', t_over_2)
        self.material_ids[i, :] = [
            integer(card, 2, 'material_id'),
            integer_or_blank(card, 4, 'material_id2', -1),
            integer_or_blank(card, 6, 'material_id3', -1),
            integer_or_blank(card, 11, 'material_id4', -1)
        ]
        #self.model.log.debug(self.material_ids[i, :])

        #ii = np.array([i])
        #file_obj = StringIO()
        #file_obj.write('<PSHELL object> n=%s\n' % self.n)
        #self.write_card_by_index(file_obj, i=ii)
        #print(file_obj.getvalue())


        assert len(card) <= 12, 'len(PSHELL card) = %i\ncard=%s' % (len(card), card)
        self.i += 1
开发者ID:hurlei,项目名称:pyNastran,代码行数:32,代码来源:pshell.py


示例2: add_card

 def add_card(cls, card, icard=0, comment=''):
     noffset = icard * 5
     pid = integer(card, 1 + noffset, 'pid')
     k = double(card, 2 + noffset, 'k')
     ge = double_or_blank(card, 3 + noffset, 'ge', 0.)
     s = double_or_blank(card, 4 + noffset, 's', 0.)
     return PELAS(pid, k, ge, s, comment=comment)
开发者ID:marcinch18,项目名称:pyNastran,代码行数:7,代码来源:springs.py


示例3: add_card

    def add_card(cls, card, comment='', sol=101):
        csid = integer(card, 1, 'csid')
        sids = []
        tids = []
        frictions = []
        min_distances = []
        max_distances = []

        nfields = card.nfields
        i = 2
        j = 1
        while i < nfields:
            sids.append(integer(card, i, 'sid%s' % j))
            tids.append(integer(card, i + 1, 'tid%s' % j))
            frictions.append(double_or_blank(card, i + 2, 'fric%s' % j, 0.0))
            if sol == 101:
                min_distances.append(double_or_blank(card, i + 3, 'mind%s' % j, 0.0))
                max_distances.append(double_or_blank(card, i + 4, 'maxd%s' % j, 0.0))
            else:
                min_distances.append(None)
                max_distances.append(None)
            i += 8
            j += 1
        return BCTSET(csid, sids, tids, frictions, min_distances,
                      max_distances, comment=comment,
                      sol=sol)
开发者ID:EmanueleCannizzaro,项目名称:pyNastran,代码行数:26,代码来源:contact.py


示例4: add_card

 def add_card(cls, card, comment=''):
     pid = integer(card, 1, 'pid')
     af = double_or_blank(card, 2, 'af')
     d1 = double_or_blank(card, 3, 'd1')
     d2 = double_or_blank(card, 4, 'd2', d1)
     assert len(card) <= 5, 'len(PHBDY card) = %i' % len(card)
     return PHBDY(pid, af, d1, d2, comment=comment)
开发者ID:marcinch18,项目名称:pyNastran,代码行数:7,代码来源:thermal.py


示例5: set_E_G_nu

    def set_E_G_nu(self, i, card):
        r"""
        \f[ G = \frac{E}{2 (1+\nu)} \f]
        """
        E = double_or_blank(card, 2, 'E')
        G = double_or_blank(card, 3, 'G')
        nu = double_or_blank(card, 4, 'nu')

        if G is None and E is None:  # no E,G
            raise RuntimeError('G=%s E=%s cannot both be None' % (G, E))
        elif E is not None and G is not None and nu is not None:
            pass
        elif E is not None and nu is not None:
            G = E / 2. / (1 + nu)
        elif G is not None and nu is not None:
            E = 2 * (1 + nu) * G
        elif G is not None and E is not None:
            nu = E / (2 * G) - 1.
        elif G is None and nu is None:
            G = 0.0
            nu = 0.0
        elif E is None and nu is None:
            E = 0.0
            nu = 0.0
        else:
            msg = 'G=%s E=%s nu=%s' % (G, E, nu)
            raise RuntimeError(msg)
        #self.model.log.debug('G = %s' % G)
        self.E[i] = E
        self.G[i] = G
        self.nu[i] = nu
开发者ID:hurlei,项目名称:pyNastran,代码行数:31,代码来源:mathp.py


示例6: add_card

 def add_card(cls, card, comment=''):
     pid = integer(card, 1, 'pid')
     mid = integer(card, 2, 'mid')
     gamma = double_or_blank(card, 3, 'gamma', 0.5)
     phi = double_or_blank(card, 4, 'gamma', 180.)
     assert len(card) <= 5, 'len(PRAC3D card) = %i' % len(card)
     return PRAC3D(pid, mid, gamma, phi, comment=comment)
开发者ID:marcinch18,项目名称:pyNastran,代码行数:7,代码来源:properties.py


示例7: add_card

    def add_card(cls, card, comment=''):
        eid = integer(card, 1, 'eid')
        pid = integer_or_blank(card, 2, 'pid', eid)
        ga = integer(card, 3, 'ga')
        gb = integer(card, 4, 'gb')
        x1_g0 = integer_double_or_blank(card, 5, 'x1_g0', 0.0)
        if isinstance(x1_g0, integer_types):
            g0 = x1_g0
            x = None
        elif isinstance(x1_g0, float):
            g0 = None
            x = np.array([double_or_blank(card, 5, 'x1', 0.0),
                          double_or_blank(card, 6, 'x2', 0.0),
                          double_or_blank(card, 7, 'x3', 0.0)], dtype='float64')
            if norm(x) == 0.0:
                msg = 'G0 vector defining plane 1 is not defined.\n'
                msg += 'G0 = %s\n' % g0
                msg += 'X  = %s\n' % x
                raise RuntimeError(msg)
        else:
            raise ValueError('invalid x1Go=%r on CBEND' % x1_g0)
        geom = integer(card, 8, 'geom')

        assert len(card) == 9, 'len(CBEND card) = %i\ncard=%s' % (len(card), card)
        return CBEND(eid, pid, ga, gb, g0, x, geom, comment=comment)
开发者ID:hurlei,项目名称:pyNastran,代码行数:25,代码来源:bars.py


示例8: _read_shock

    def _read_shock(self, card, istart):
        """
        F(u, v) = Cv * S(u) * sign(v) * |v|^ev
        """
        self.shockType = string_or_blank(card, istart + 1, 'shockType')
        self.shockCVT = double(card, istart + 2, 'shockCVT')
        self.shockCVC = double_or_blank(card, istart + 3, 'shockCVC')
        self.shockExpVT = double_or_blank(card, istart + 4, 'shockExpVT', 1.0)
        self.shockExpVC = double_or_blank(card, istart + 5,
                                          'shockExpVC', self.shockExpVT)

        if self.shockType == 'TABLE':
            pass
            # self.shockIDTS = integer(card, istart + 6, 'shockIDTS')
            # self.shockIDETS = blank(card, istart + 9, 'shockIDETS')
            # self.shockIDECS = blank(card, istart + 10, 'shockIDECS')
            # self.shockIDETSD = blank(card, istart + 11, 'shockIDETSD')
            # self.shockIDECSD = blank(card, istart + 12, 'shockIDECSD')
        elif self.shockType == 'EQUAT':
            self.shockIDTS = blank(card, istart + 6, 'shockIDTS')
            self.shockIDETS = integer(card, istart + 9, 'shockIDETS')
            self.shockIDECS = integer_or_blank(card, istart + 10,
                                               'shockIDECS', self.shockIDETS)
            self.shockIDETSD = integer(card, istart + 11, 'shockIDETSD')
            self.shockIDECSD = integer_or_blank(card, istart + 11,
                                                'shockIDECSD', self.shockIDETSD)

            #def DEquation(self):
                #if isinstance(self.dequation, int):
                    #return self.dequation
                #return self.dequation.equation_id
        else:
            raise RuntimeError('Invalid shockType=%r on card\n%s' %(self.shockType, card))
        istart += 8
        return istart
开发者ID:marcinch18,项目名称:pyNastran,代码行数:35,代码来源:bush.py


示例9: add_card

    def add_card(cls, card, comment=''):
        eid = integer(card, 1, 'eid')
        pid = integer(card, 2, 'pid')

        Type = string(card, 3, 'Type')
        #print("self.Type = %s" % self.Type)
        # msg = 'CHBDYP Type=%r' % self.Type
        #assert self.Type in ['POINT','LINE','ELCYL','FTUBE','TUBE'], msg

        iViewFront = integer_or_blank(card, 4, 'iViewFront', 0)
        iViewBack = integer_or_blank(card, 5, 'iViewBack', 0)
        g1 = integer(card, 6, 'g1')

        if Type != 'POINT':
            g2 = integer(card, 7, 'g2')
        else:
            g2 = blank(card, 7, 'g2')

        g0 = integer_or_blank(card, 8, 'g0', 0)
        radMidFront = integer_or_blank(card, 9, 'radMidFront', 0)
        radMidBack = integer_or_blank(card, 10, 'radMidBack', 0)
        gmid = integer_or_blank(card, 11, 'gmid')
        ce = integer_or_blank(card, 12, 'ce', 0)
        e1 = double_or_blank(card, 13, 'e3')
        e2 = double_or_blank(card, 14, 'e3')
        e3 = double_or_blank(card, 15, 'e3')
        assert len(card) <= 16, 'len(CHBDYP card) = %i\ncard=%s' % (len(card), card)
        return CHBDYP(eid, pid, Type, g1, g2, g0=g0, gmid=gmid, ce=ce,
                      iViewFront=iViewFront, iViewBack=iViewBack,
                      radMidFront=radMidFront, radMidBack=radMidBack,
                      e1=e1, e2=e2, e3=e3, comment=comment)
开发者ID:FrankNaets,项目名称:pyNastran,代码行数:31,代码来源:thermal.py


示例10: add_card

    def add_card(self, card, comment=''):
        if comment:
            self._comment = comment
        pid = integer(card, 1, 'pid')
        k = double_or_blank(card, 2, 'k', 0.0)
        c = double_or_blank(card, 3, 'c', 0.0)
        m = double_or_blank(card, 4, 'm', 0.0)

        sa = double_or_blank(card, 6, 'sa', 0.0)
        se = double_or_blank(card, 7, 'se', 0.0)

        nfields = card.nfields
        self.vars = []
        istart = 9
        while istart < nfields:
            pname = string(card, istart, 'pname')
            if pname == 'SHOCKA':
                istart = self._read_shock(card, istart)
            elif pname == 'SPRING':
                self._read_spring(card, istart)
            elif pname == 'DAMPER':
                self._read_damper(card, istart)
            elif pname == 'GENER':
                self._read_gener(card, istart)
            else:
                break
            istart += 8

        self.pid = pid
        self.k = k
        self.c = c
        self.m = m

        self.sa = sa
        self.se = se
开发者ID:marcinch18,项目名称:pyNastran,代码行数:35,代码来源:bush.py


示例11: build

    def build(self):
        """
        :param cards: the list of MOMENT cards
        """
        cards = self._cards
        ncards = len(cards)
        self.n = ncards
        if ncards:
            float_fmt = self.model.float
            #: Property ID
            self.load_id = zeros(ncards, 'int32')
            self.node_id = zeros(ncards, 'int32')
            self.coord_id = zeros(ncards, 'int32')
            self.mag = zeros(ncards, float_fmt)
            self.xyz = zeros((ncards, 3), float_fmt)

            for i, card in enumerate(cards):
                self.load_id[i] = integer(card, 1, 'sid')
                self.node_id[i] = integer(card, 2, 'node')
                self.coord_id[i] = integer_or_blank(card, 3, 'cid', 0)
                self.mag[i] = double(card, 4, 'mag')
                xyz = [double_or_blank(card, 5, 'X1', 0.0),
                       double_or_blank(card, 6, 'X2', 0.0),
                       double_or_blank(card, 7, 'X3', 0.0)]
                self.xyz[i] = xyz
                assert len(card) <= 8, 'len(MOMENT card) = %i\ncard=%s' % (len(card), card)

            i = self.load_id.argsort()
            self.load_id = self.load_id[i]
            self.node_id = self.node_id[i]
            self.coord_id = self.coord_id[i]
            self.mag = self.mag[i]
            self.xyz = self.xyz[i]
            self._cards = []
            self._comments = []
开发者ID:EmanueleCannizzaro,项目名称:pyNastran,代码行数:35,代码来源:moment.py


示例12: loadHESS_INV

    def loadHESS_INV(self, nrows, card):
        alphaOmega_default = None
        LJ_default = None
        if self.method == 'INV':
            alphaOmega_default = 0.0
            LJ_default = 1.0

        for irow in range(nrows):
            NEj = integer(card, 9 + 7 * irow + 5, 'NE%s' % str(irow))
            NDJ_default = None
            if self.method == 'INV':
                NDJ_default = 3 * NEj

            i = 9 + 8 * irow
            self.alphaAjs.append(
                double_or_blank(card, i, 'alphaA' + str(irow), alphaOmega_default))
            self.omegaAjs.append(
                double_or_blank(card, i + 1, 'omegaA' + str(irow), alphaOmega_default))
            self.alphaBjs.append(
                double_or_blank(card, i + 2, 'alphaB' + str(irow), alphaOmega_default))
            self.omegaBjs.append(
                double_or_blank(card, i + 3, 'omegaB' + str(irow), alphaOmega_default))
            self.LJs.append(
                double_or_blank(card, i + 4, 'LJ' + str(irow), LJ_default))
            self.NEJs.append(
                integer(card, i + 5, 'NEJ' + str(irow)))
            self.NDJs.append(
                integer_or_blank(card, i + 6, 'NDJ' + str(irow), NDJ_default))
开发者ID:watkinrt,项目名称:pyNastran,代码行数:28,代码来源:methods.py


示例13: build

    def build(self):
        cards = self._cards
        ncards = len(cards)

        self.n = ncards
        if ncards:
            float_fmt = self.model.float_fmt
            self.nid = zeros(ncards, 'int32')
            self.temp = zeros(ncards, float_fmt)

            for i, card in enumerate(cards):
                #: Node ID
                self.nid[i] = integer(card, 1, 'nid')

                #: Grid point coordinate system
                self.cp[i] = integer_or_blank(card, 2, 'cp', cp0)

                x = double_or_blank(card, 3, 'x1', 0.)
                y = double_or_blank(card, 4, 'x2', 0.)
                z = double_or_blank(card, 5, 'x3', 0.)
                #: node location in local frame
                self.xyz[i] = [x, y, z]

                #: Analysis coordinate system
                self.cd[i] = integer_or_blank(card, 6, 'cd', cd0)

                #: SPC constraint
                self.ps[i] = integer_or_blank(card, 7, 'ps', ps0)

                #: Superelement ID
                self.seid[i] = integer_or_blank(card, 8, 'seid', seid0)
开发者ID:saullocastro,项目名称:pyNastran,代码行数:31,代码来源:temp.py


示例14: add_card

    def add_card(cls, card, comment=''):
        conid = integer(card, 1, 'conid')
        gids = []
        constraints = []
        enforced = []

        fields = card.fields(0)
        nfields = len(fields)

        i = 1
        for ifield in range(2, nfields, 8):
            grid = integer(card, ifield, 'G%i' % i)
            component = components_or_blank(card, ifield + 1, 'constraint%i' % i, 0)  # scalar point
            if i == 1:
                enforcedi = double(card, ifield + 2, 'enforced%i' % i)
                if enforcedi == 0.0:
                    raise RuntimeError('enforced1 must be nonzero; enforcedi=%r' % enforcedi)
            else:
                enforcedi = double_or_blank(card, ifield + 2, 'enforced%i' % i, 0.0)
            gids.append(grid)
            constraints.append(component)
            enforced.append(enforcedi)
            i += 1

            if ifield + 4 > nfields and i != 2:
                # if G2 is empty (it's ifield+4 because nfields is length based and not loop friendly)
                break
            grid = integer(card, ifield + 3, 'G%i' % i)
            component = components_or_blank(card, ifield + 4, 'constraint%i' % i, 0)  # scalar point
            enforcedi = double_or_blank(card, ifield + 5, 'enforced%i' % i)
            gids.append(grid)
            constraints.append(component)
            enforced.append(enforcedi)
            i += 1
        return MPC(conid, gids, constraints, enforced, comment=comment)
开发者ID:marcinch18,项目名称:pyNastran,代码行数:35,代码来源:constraints.py


示例15: add_card

    def add_card(cls, card, comment=''):
        sid = integer(card, 1, 'sid')
        method = string_or_blank(card, 2, 'method', 'LAN')

        f1 = double_or_blank(card, 3, 'f1')
        f2 = double_or_blank(card, 4, 'f2')
        ne = integer_or_blank(card, 5, 'ne')

        if method not in cls.allowed_methods:
            msg = 'method=%s; allowed_methods=[%s]' % (
                method, ', '.join(cls.allowed_methods))
            raise ValueError(msg)

        if method == 'SINV':
            nd = integer_or_blank(card, 6, 'nd', 600)
        if method == 'INV':
            nd = integer_or_blank(card, 6, 'nd', 3 * ne)
        elif method in ['GIV', 'MGIV', 'HOU', 'MHOU']:
            nd = integer_or_blank(card, 6, 'nd', 0)
        else:
            nd = integer(card, 6, 'nd')
        norm = string_or_blank(card, 9, 'norm', 'MASS')

        if method == 'POINT':
            G = integer(card, 10, 'G')
            C = components(card, 11, 'C')
        else:
            G = blank(card, 10, 'G')
            C = blank(card, 11, 'C')
        assert len(card) <= 12, 'len(EIGR card) = %i\ncard=%s' % (len(card), card)
        return EIGR(sid, method, f1, f2, ne, nd, norm, G, C, comment=comment)
开发者ID:EmanueleCannizzaro,项目名称:pyNastran,代码行数:31,代码来源:methods.py


示例16: __init__

    def __init__(self, card, comment=''):
        self.pid = integer(card, 1, 'property_id')
        self.sets = []
        self.Types = []
        self.gammas = []
        self._cps = []
        #self.set = integer(card, 2, 'set_id')
        #self.Type = string(card, 3, 'Type')
        #if self.Type not in ['NEWTON','PRANDTL-MEYER', 'CP']:
        #    raise RuntimeError('Type=%r' % Type)
        #self.gamma = double_or_blank(card, 4, 'gamma', 1.4)

        i = 2
        while i < len(card):
            self.sets.append(integer(card, i, 'set_id'))
            Type = string(card, i+1, 'Type')
            self.Types.append(Type)
            #if self.Type not in ['NEWTON','PRANDTL-MEYER', 'CP']:
                #raise RuntimeError('Type=%r' % Type)
            self.gammas.append(double_or_blank(card, i+2, 'gamma', 1.4))

            _cp = None
            if Type == 'CP':
                _cp = double(card, i+3, 'Cp')
            elif Type == 'NEWTON':
                _cp = double_or_blank(card, i+3, 'Cp_nominal', 2.0)
            self._cps.append(_cp)
            i += 7
开发者ID:FrankNaets,项目名称:pyNastran,代码行数:28,代码来源:cards.py


示例17: __init__

    def __init__(self, card=None, data=None, comment=''):
        ThermalElement.__init__(self, card)
        if comment:
            self._comment = comment
        if card:
            #: Surface element ID
            self.eid = integer(card, 1, 'eid')

            #: PHBDY property entry identification numbers. (Integer > 0)
            self.pid = integer(card, 2, 'pid')
            assert self.pid > 0

            self.Type = string(card, 3, 'Type')
            #print("self.Type = %s" % self.Type)
            # msg = 'CHBDYP Type=%r' % self.Type
            #assert self.Type in ['POINT','LINE','ELCYL','FTUBE','TUBE'], msg

            #: A VIEW entry identification number for the front face.
            self.iViewFront = integer_or_blank(card, 4, 'iViewFront', 0)

            #: A VIEW entry identification number for the back face.
            self.iViewBack = integer_or_blank(card, 5, 'iViewBack', 0)

            #: Grid point identification numbers of grids bounding the surface.
            #: (Integer > 0)
            self.g1 = integer(card, 6, 'g1')
            #: Grid point identification numbers of grids bounding the surface.
            #: (Integer > 0)
            if self.Type != 'POINT':
                self.g2 = integer(card, 7, 'g2')
            else:
                self.g2 = blank(card, 7, 'g2')

            #: Orientation grid point. (Integer > 0; Default = 0)
            self.g0 = integer_or_blank(card, 8, 'g0', 0)

            #: RADM identification number for front face of surface element.
            #: (Integer > 0)
            self.radMidFront = integer_or_blank(card, 9, 'radMidFront', 0)

            #: RADM identification number for back face of surface element.
            #: (Integer > 0)
            self.radMidBack = integer_or_blank(card, 10, 'radMidBack', 0)

            #: Grid point identification number of a midside node if it is used
            #: with the line type surface element.
            self.gmid = integer_or_blank(card, 11, 'gmid')
            #: Coordinate system for defining orientation vector.
            #: (Integer > 0; Default = 0
            self.ce = integer_or_blank(card, 12, 'ce', 0)

            #: Components of the orientation vector in coordinate system CE.
            #: The origin of the orientation vector is grid point G1.
            #: (Real or blank)
            self.e1 = double_or_blank(card, 13, 'e3')
            self.e2 = double_or_blank(card, 14, 'e3')
            self.e3 = double_or_blank(card, 15, 'e3')
            assert len(card) <= 16, 'len(CHBDYP card) = %i' % len(card)
        else:
            raise NotImplementedError(data)
开发者ID:watkinrt,项目名称:pyNastran,代码行数:60,代码来源:thermal.py


示例18: add_card

    def add_card(self, card, comment=''):
        i = self.i
        self.element_id[i] = integer(card, 1, 'eid')
        self.property_id[i] = integer(card, 2, 'pid')

        self.node_ids[i, :] = [
            integer(card, 3, 'n1'),
            integer(card, 4, 'n2'),
            integer(card, 5, 'n3'),
            integer(card, 6, 'n4')
        ]

        theta_mcid = integer_double_or_blank(card, 7, 'theta_mcid', 0.0)

        if isinstance(theta_mcid, float):
            self.is_theta[i] = 1
            self.theta[i] = theta_mcid
        else:
            self.is_theta[i] = 0
            self.mcid[i] = theta_mcid


        #self.thetaMcid =
        #self.zOffset = double_or_blank(card, 7, 'zOffset', 0.0)
        #blank(card, 8, 'blank')
        #blank(card, 9, 'blank')

        self.t_flag[i] = integer_or_blank(card, 10, 'TFlag', 0)
        self.thickness[i, :] = [
            double_or_blank(card, 11, 'T1', 1.0),
            double_or_blank(card, 12, 'T2', 1.0),
            double_or_blank(card, 13, 'T3', 1.0),
            double_or_blank(card, 14, 'T4', 1.0),
        ]
        self.i += 1
开发者ID:hurlei,项目名称:pyNastran,代码行数:35,代码来源:cquad4.py


示例19: add_card

    def add_card(self, card, comment=''):
        assert self.n > 0, self.n
        i = self.i
        load_id = integer(card, 1, 'load_id')
        tbar = double(card, 3, 'Tbar')
        tprime = double(card, 4, 'Tprime')
        t1 = double_or_blank(card, 5, 'T1')
        t2 = double_or_blank(card, 6, 'T2')

        self.load_id[i] = load_id
        self.element_id[i] = integer(card, 2, 'element_id')
        self.tbar[i] = tbar
        self.tprime[i] = tprime
        self.temp[i, 0] = t1
        self.temp[i, 1] = t2
        self.i += 1

        if len(card) >= 7:
            # i must be < self.n
            eids = expand_thru(card[9:])
            for eid in eids:
                self.load_id[i] = load_id
                assert isinstance(eid, int), eid
                self.element_id[i] = eid
                self.tbar[i] = tbar
                self.tprime[i] = tprime
                self.temp[i, 0] = t1
                self.temp[i, 1] = t2
                self.i += 1
                assert self.i <= self.n

        assert len(card) <= 7, '%s; n=%s' % (card, len(card))
        #assert len(card) <= 7, len(card)
        self.eids = None
开发者ID:hurlei,项目名称:pyNastran,代码行数:34,代码来源:temp.py


示例20: add_card

    def add_card(self, card, comment=''):
        i = self.i
        self.element_id[i] = integer(card, 1, 'element_id')
        self.property_id[i] = integer(card, 2, 'property_id')

        print(card)
        self.node_ids[i, :] = [
            integer(card, 3, 'n1'),
            integer(card, 4, 'n2'),
            integer(card, 5, 'n3'),
            integer(card, 6, 'n4'),
            integer_or_blank(card, 7, 'n5', 0),
            integer_or_blank(card, 8, 'n6', 0),
            integer_or_blank(card, 9, 'n7', 0),
            integer_or_blank(card, 10, 'n8', 0)]

        self.thickness[i, :] = [
            double_or_blank(card, 11, 'T1', 1.0),
            double_or_blank(card, 12, 'T2', 1.0),
            double_or_blank(card, 13, 'T3', 1.0),
            double_or_blank(card, 14, 'T4', 1.0), ]

        #self.theta_mcid[i] = integer_double_or_blank(card, 15, 'theta_mcid', 0.0)
        self.zoffset[i] = double_or_blank(card, 16, 'zoffset', 0.0)
        self.t_flag[i] = integer_or_blank(card, 17, 'TFlag', 0)
        self.i += 1
开发者ID:saullocastro,项目名称:pyNastran,代码行数:26,代码来源:cquad8.py



注:本文中的pyNastran.bdf.bdf_interface.assign_type.double_or_blank函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python assign_type.integer函数代码示例发布时间:2022-05-25
下一篇:
Python assign_type.double函数代码示例发布时间:2022-05-25
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap