Beispiel #1
0
    /**
     Compute the displacements of the structure (in global coordinate system)

     Return:
     a tuple containing (x, y, z, theta_x, theta_y, theta_z).
     each entry of the tuple is a numpy array describing the deflections for the given
     degree of freedom at each node.

     **/
    bp::tuple computeDisplacement() {

        int nodes = beam->getNumNodes();

        Vector dx_v(nodes);
        Vector dy_v(nodes);
        Vector dz_v(nodes);
        Vector dtheta_x_v(nodes);
        Vector dtheta_y_v(nodes);
        Vector dtheta_z_v(nodes);

        beam->computeDisplacement(dx_v, dy_v, dz_v, dtheta_x_v, dtheta_y_v, dtheta_z_v);

        bp::list dx, dy, dz, dtx, dty, dtz;

        for(int i = 0; i < nodes; i++)
        {
            dx.append(dx_v(i));
            dy.append(dy_v(i));
            dz.append(dz_v(i));
            dtx.append(dtheta_x_v(i));
            dty.append(dtheta_y_v(i));
            dtz.append(dtheta_z_v(i));
        }

        return bp::make_tuple(bpn::array(dx), bpn::array(dy), bpn::array(dz), bpn::array(dtx), bpn::array(dty), bpn::array(dtz));

    }
Beispiel #2
0
  /**
     Compute the displacements of the structure (in global coordinate system)

     Return:
     a tuple containing (x, y, z, theta_x, theta_y, theta_z).
     each entry of the tuple is a numpy array describing the deflections for the given
     degree of freedom at each node.

  **/
  py::tuple computeDisplacement(){

    int nodes = beam->getNumNodes();

    Vector dx(nodes);
    Vector dy(nodes);
    Vector dz(nodes);
    Vector dtx(nodes);
    Vector dty(nodes);
    Vector dtz(nodes);

    beam->computeDisplacement(dx, dy, dz, dtx, dty, dtz);

    return py::make_tuple(dx, dy, dz, dtx, dty, dtz);

  }