Esempio n. 1
0
/*! Get the coordinates of the nodes of an octant in logical domain.
 * \param[out] nodes Vector of arrays [nnodes][3] with the coordinates of the nodes of octant.
 */
void
Octant::getNodes(u32arr3vector & nodes) const {
    uint8_t		i, cx, cy, cz;
    uint32_t	dh;
    uint8_t nn = 1<<m_dim;

    dh = getSize();
    nodes.resize(nn);

    for (i = 0; i < nn; i++) {
        cx = uint8_t(i%2);
        cy = uint8_t((i-4*(i/4))/2);
        cz = uint8_t(i/4);
        nodes[i][0] = m_x + cx*dh;
        nodes[i][1] = m_y + cy*dh;
        nodes[i][2] = m_z + cz*dh;
    }
};
Esempio n. 2
0
/*! Get the coordinates of the nodes of an octant in logical domain.
 * \param[out] nodes Vector of arrays [nnodes][3] with the coordinates of the nodes of octant.
 */
void
Octant::getNodes(u32arr3vector & nodes) const{
	uint8_t		i; // cx, cy, cz;
	uint32_t	dh;
	uint8_t nn = 1<<m_dim;

	dh = getSize();
	nodes.resize(nn);

	for (i = 0; i < nn; i++){
//		cx = uint8_t(i%2);
//		cy = uint8_t((i-4*(i/4))/2);
//		cz = uint8_t(i/4);

		nodes[i][0] = m_x + sm_CoeffNode[i][0]*dh;
		nodes[i][1] = m_y + sm_CoeffNode[i][1]*dh;
		nodes[i][2] = m_z + sm_CoeffNode[i][2]*dh;
	}
};