Skip to content
Snippets Groups Projects
MElement.cpp 33.8 KiB
Newer Older
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
  case MSH_PYR_14: return new MPyramid14(v, num, part);
  case MSH_TET_20: return new MTetrahedronN(v, 3, num, part);
  case MSH_TET_34: return new MTetrahedronN(v, 3, num, part);
  case MSH_TET_35: return new MTetrahedronN(v, 4, num, part);
  case MSH_TET_52: return new MTetrahedronN(v, 5, num, part);
  case MSH_TET_56: return new MTetrahedronN(v, 5, num, part);
Gaetan Bricteux's avatar
Gaetan Bricteux committed
  case MSH_POLYH_: return new MPolyhedron(v, num, part, owner, parent);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
  default:         return 0;
  }
}

#include "Bindings.h"

void MElement::registerBindings(binding *b)
{
  classBinding *cb = b->addClass<MElement>("MElement");
  cb->setDescription("A mesh element.");
  methodBinding *cm;
  cm = cb->addMethod("getNum",&MElement::getNum);
  cm->setDescription("return the tag of the element");
  cm = cb->addMethod("getNumVertices", &MElement::getNumVertices);
  cm->setDescription("get the number of vertices of this element");
  cm = cb->addMethod("getVertex", &MElement::getVertex);
  cm->setDescription("return the i-th vertex of this element");
  cm->setArgNames("i",NULL);
  cm = cb->addMethod("getType", &MElement::getType);
  cm->setDescription("get the type of the element");
  cm = cb->addMethod("getTypeForMSH", &MElement::getTypeForMSH);
  cm->setDescription("get the gmsh type of the element");
  cm = cb->addMethod("getPartition", &MElement::getPartition);
  cm->setDescription("get the partition to which the element belongs");
  cm = cb->addMethod("setPartition", &MElement::setPartition);
  cm->setDescription("set the partition to which the element belongs");
  cm->setArgNames("iPartition",NULL);
  cm = cb->addMethod("getPolynomialOrder", &MElement::getPolynomialOrder);
  cm->setDescription("return the polynomial order the element");
  cm = cb->addMethod("getDim", &MElement::getDim);
  cm->setDescription("return the geometrical dimension of the element");
  cm = cb->addMethod("getJacobianDeterminant", &MElement::getJacobianDeterminant);
  cm->setDescription("return the jacobian of the determinant of the transformation");
  cm->setArgNames("u","v","w",NULL);