Exemplo n.º 1
0
    def dw_dot(out, mat, val_qp, bfve, bfsc, geo, fmode):

        nel, nqp, dim, nc = mat.shape
        nen = bfve.shape[3]

        status1 = 0
        if fmode in [0, 1, 3]:
            aux = nm.zeros((nel, nqp, dim * nen, nc), dtype=nm.float64)
            status1 = terms.actBfT(aux, bfve, mat)

        if fmode == 0:
            status2 = terms.mulAB_integrate(out, aux, val_qp, geo, 'AB')

        if fmode == 1:
            status2 = terms.mulAB_integrate(out, aux, bfsc, geo, 'AB')

        if fmode == 2:
            aux = (bfsc * dot_sequences(mat, val_qp, mode='ATB')).transpose(
                (0, 1, 3, 2))
            status2 = geo.integrate(out, nm.ascontiguousarray(aux))

        if fmode == 3:
            status2 = terms.mulAB_integrate(out, bfsc, aux, geo, 'ATBT')

        return status1 and status2
Exemplo n.º 2
0
    def dw_fun(out, val, mat, bf, vg, fmode):

        if fmode == 0:
            status = terms.mulAB_integrate(out,
                                           vg.bfg,
                                           mat * val,
                                           vg,
                                           mode='ATB')

        elif fmode == 1:
            status = terms.mulAB_integrate(out, bf * mat, val, vg, mode='ATB')

        elif fmode == 2:
            status = terms.mulAB_integrate(out,
                                           vg.bfg,
                                           mat * bf,
                                           vg,
                                           mode='ATB')

        elif fmode == 3:
            status = terms.mulAB_integrate(out,
                                           mat * bf,
                                           vg.bfg,
                                           vg,
                                           mode='ATB')

        return status
Exemplo n.º 3
0
    def dw_dot(out, mat, val_qp, bfve, bfsc, geo, fmode):

        nel, nqp, dim, nc = mat.shape
        nen = bfve.shape[2]

        status1 = 0
        if fmode in [0, 1, 3]:
            aux = nm.zeros((nel, nqp, dim * nen, nc), dtype=nm.float64)
            status1 = terms.actBfT(aux, bfve, mat)

        if fmode == 0:
            status2 = terms.mulAB_integrate(out, aux, val_qp, geo, 'AB')

        if fmode == 1:
            status2 = terms.mulAB_integrate(out, aux, bfsc, geo, 'AB')

        if fmode == 2:
            aux = (bfsc * dot_sequences(mat, val_qp,
                                        mode='ATB')).transpose((0,1,3,2))
            status2 = geo.integrate(out, nm.ascontiguousarray(aux))

        if fmode == 3:
            status2 = terms.mulAB_integrate(out, bfsc, aux, geo, 'ATBT')

        return status1 and status2
Exemplo n.º 4
0
    def dw_fun(out, bf, vg, grad, idx, fmode):
        cc = nm.ascontiguousarray
        bft = cc(nm.tile(bf, (out.shape[0], 1, 1, 1)))

        if fmode == 0:
            status = terms.mulAB_integrate(out, bft,
                                           cc(grad[..., idx:idx+1, :]), vg,
                                           mode='ATB')

        else:
            status = terms.mulAB_integrate(out, bft,
                                           cc(vg.bfg[:,:,idx:(idx + 1),:]), vg,
                                           mode='ATB')

        return status
Exemplo n.º 5
0
    def dw_fun(out, val, mat, bf, vg, fmode):

        if fmode == 0:
            status = terms.mulAB_integrate(out, vg.bfg, mat * val, vg,
                                           mode='ATB')

        elif fmode == 1:
            status = terms.mulAB_integrate(out, bf * mat, val, vg, mode='ATB')

        elif fmode == 2:
            status = terms.mulAB_integrate(out, vg.bfg, mat * bf, vg,
                                           mode='ATB')

        elif fmode == 3:
            status = terms.mulAB_integrate(out, mat * bf, vg.bfg, vg,
                                           mode='ATB')

        return status