def METHOD_NAME(self, mtx_d, drill, virtual, state,
              mode=None, term_mode=None, diff_var=None, **kwargs):
    from sfepy.discrete.variables import create_adof_conn
    vv, vu = virtual, state
    geo, _ = self.get_mapping(vv)
    # Displacements of element nodes.
    vec_u = vu()
    econn = vu.field.get_econn('cell', self.region)
    adc = create_adof_conn(nm.arange(vu.n_dof, dtype=nm.int32), econn, 6, 0)
    el_u = vec_u[adc]
    qp_coors = geo.qp.vals
    dsg = shell10x.get_dsg_strain(geo.coors_loc, geo.qp.vals)
    mtx_b = shell10x.create_strain_matrix(geo.bfgm, geo.dxidx, dsg)
    mtx_be = shell10x.add_eas_dofs(mtx_b, qp_coors, geo.det,
                                   geo.det0, geo.dxidx0)
    mtx_dr = shell10x.rotate_elastic_tensor(mtx_d, geo.bfu, geo.ebs)
    mtx_k_qp = ddot(ddot(mtx_be, mtx_dr, 'ATB'), mtx_be, 'AB')
    # Integrate.
    mtx_k = (mtx_k_qp * (geo.det * geo.qp.weights)[..., None, None]).sum(1)
    # Static condensation.
    k11 = mtx_k[:, :24, :24]
    k12 = mtx_k[:, :24, 24:]
    k22 = mtx_k[:, 24:, 24:]
    mtx_k = k11 - ddot(ddot(k12, nm.linalg.inv(k22)),
                       k12.transpose(0, 2, 1))
    if drill != 0.0:
        coefs =  mtx_dr[..., 3, 3].mean(1) * geo.volume * drill
        mtx_k = shell10x.lock_drilling_rotations(mtx_k, geo.ebs, coefs)
    # DOFs in mtx_k are DOF-by-DOF. Transform is u and phi node-by-node.
    blocks = nm.arange(24).reshape(2, 3, 4)
    blocks = blocks.transpose((0, 2, 1)).reshape((-1, 3))
    shell10x.transform_asm_matrices(mtx_k[:, None, ...], geo.mtx_t, blocks)
    fmode = diff_var is not None
    return (mtx_k, el_u, fmode)