Example #1
0
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;
}
Example #2
0
//H1ShapesetOrtho shapeset;
H1ShapesetBeuchler shapeset;

#else

HcurlShapesetLegendre shapeset;
//HcurlShapesetGradLeg shapeset;

#endif


PrecalcShapeset precalc(&shapeset);
Quad2DStd quad;

int nc = shapeset.get_num_components();

const double eps = 1e-13;
inline bool eq(double a, double b) { return fabs(a - b) < eps; }
//inline bool eq(double a, double b) { return a == b; }


double2x2 rot[2][4] =
{
  { {{1,0},{0,1}}, {{-0.5,0.5},{-0.5,-0.5}}, {{0,-1},{1,0}} },
  { {{1,0},{0,1}}, {{0,1},{-1,0}}, {{-1,0},{0,-1}}, {{0,-1},{1,0}} }
};


void test_edge_rotation()
{