本文整理汇总了C++中PrecalcShapeset::set_quad_2d方法的典型用法代码示例。如果您正苦于以下问题:C++ PrecalcShapeset::set_quad_2d方法的具体用法?C++ PrecalcShapeset::set_quad_2d怎么用?C++ PrecalcShapeset::set_quad_2d使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PrecalcShapeset
的用法示例。
在下文中一共展示了PrecalcShapeset::set_quad_2d方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char* argv[])
{
hermes2d_initialize(&argc, argv);
info("SHAPESET TESTER");
info("num_components = %d", shapeset.get_num_components());
info("max_order = %d", shapeset.get_max_order());
precalc.set_quad_2d(&quad);
for (int mode = 0; mode <= 1; mode++)
{
shapeset.set_mode(mode);
quad.set_mode(mode);
precalc.set_mode(mode);
info(mode ? "\nTESTING QUADS\n" : "\nTESTING TRIANGLES\n");
//test_orders(&shapeset);
test_edge_rotation();
//test_edge_orientation(&shapeset);
//test_num_bubbles(&shapeset);
}
//info("\nALL OK!\n");
printf("\n");
hermes2d_finalize();
return 0;
}
示例2: update_refmap_coefs
void CurvMap::update_refmap_coefs(Element* e)
{
ref_map_pss.set_quad_2d(&quad2d);
//ref_map_pss.set_active_element(e);
// calculation of projection matrices
if (edge_proj_matrix == NULL) precalculate_cholesky_projection_matrix_edge();
if (bubble_proj_matrix_tri == NULL) precalculate_cholesky_projection_matrices_bubble();
ref_map_pss.set_mode(e->get_mode());
ref_map_shapeset.set_mode(e->get_mode());
// allocate projection coefficients
int nv = e->nvert;
int ne = order - 1;
int qo = e->is_quad() ? make_quad_order(order, order) : order;
int nb = ref_map_shapeset.get_num_bubbles(qo);
nc = nv + nv*ne + nb;
if (coefs != NULL) delete [] coefs;
coefs = new double2[nc];
// WARNING: do not change the format of the array 'coefs'. If it changes,
// RefMap::set_active_element() has to be changed too.
Nurbs** nurbs;
if (toplevel == false)
{
ref_map_pss.set_active_element(e);
ref_map_pss.set_transform(part);
nurbs = parent->cm->nurbs;
}
else
{
ref_map_pss.reset_transform();
nurbs = e->cm->nurbs;
}
ctm = *(ref_map_pss.get_ctm());
ref_map_pss.reset_transform(); // fixme - do we need this?
// calculation of new projection coefficients
ref_map_projection(e, nurbs, order, coefs);
}
示例3: free
void RefMap::set_quad_2d(Quad2D* quad_2d)
{
free();
this->quad_2d = quad_2d;
ref_map_pss.set_quad_2d(quad_2d);
}