return ret;
}
+std::vector<double> GaussInfo::GetDefaultReferenceCoordinatesOf(NormalizedCellType ct)
+{
+ switch(ct)
+ {
+ case INTERP_KERNEL::NORM_SEG2:
+ return std::vector<double>(SEG2A_REF,SEG2A_REF+sizeof(SEG2A_REF)/sizeof(double));
+ case INTERP_KERNEL::NORM_SEG3:
+ return std::vector<double>(SEG3_REF,SEG3_REF+sizeof(SEG3_REF)/sizeof(double));
+ case INTERP_KERNEL::NORM_TRI3:
+ return std::vector<double>(TRIA3A_REF,TRIA3A_REF+sizeof(TRIA3A_REF)/sizeof(double));
+ case INTERP_KERNEL::NORM_TRI6:
+ return std::vector<double>(TRIA6A_REF,TRIA6A_REF+sizeof(TRIA6A_REF)/sizeof(double));
+ case INTERP_KERNEL::NORM_TRI7:
+ return std::vector<double>(TRIA7A_REF,TRIA7A_REF+sizeof(TRIA7A_REF)/sizeof(double));
+ case INTERP_KERNEL::NORM_QUAD4:
+ return std::vector<double>(QUAD4A_REF,QUAD4A_REF+sizeof(QUAD4A_REF)/sizeof(double));
+ case INTERP_KERNEL::NORM_QUAD8:
+ return std::vector<double>(QUAD8A_REF,QUAD8A_REF+sizeof(QUAD8A_REF)/sizeof(double));
+ case INTERP_KERNEL::NORM_QUAD9:
+ return std::vector<double>(QUAD9A_REF,QUAD9A_REF+sizeof(QUAD9A_REF)/sizeof(double));
+ case INTERP_KERNEL::NORM_TETRA4:
+ return std::vector<double>(TETRA4A_REF,TETRA4A_REF+sizeof(TETRA4A_REF)/sizeof(double));
+ case INTERP_KERNEL::NORM_TETRA10:
+ return std::vector<double>(TETRA10A_REF,TETRA10A_REF+sizeof(TETRA10A_REF)/sizeof(double));
+ case INTERP_KERNEL::NORM_PYRA5:
+ return std::vector<double>(PYRA5A_REF,PYRA5A_REF+sizeof(PYRA5A_REF)/sizeof(double));
+ case INTERP_KERNEL::NORM_PYRA13:
+ return std::vector<double>(PYRA13A_REF,PYRA13A_REF+sizeof(PYRA13A_REF)/sizeof(double));
+ case INTERP_KERNEL::NORM_PENTA6:
+ return std::vector<double>(PENTA6A_REF,PENTA6A_REF+sizeof(PENTA6A_REF)/sizeof(double));
+ case INTERP_KERNEL::NORM_PENTA15:
+ return std::vector<double>(PENTA15A_REF,PENTA15A_REF+sizeof(PENTA15A_REF)/sizeof(double));
+ case INTERP_KERNEL::NORM_PENTA18:
+ return std::vector<double>(PENTA18A_REF,PENTA18A_REF+sizeof(PENTA18A_REF)/sizeof(double));
+ case INTERP_KERNEL::NORM_HEXA8:
+ return std::vector<double>(HEXA8A_REF,HEXA8A_REF+sizeof(HEXA8A_REF)/sizeof(double));
+ case INTERP_KERNEL::NORM_HEXA20:
+ return std::vector<double>(HEXA20A_REF,HEXA20A_REF+sizeof(HEXA20A_REF)/sizeof(double));
+ case INTERP_KERNEL::NORM_HEXA27:
+ return std::vector<double>(HEXA27A_REF,HEXA27A_REF+sizeof(HEXA27A_REF)/sizeof(double));
+ }
+ THROW_IK_EXCEPTION("Input type " << ct << "is not managed by GetDefaultReferenceCoordinatesOf")
+}
+
typedef void (*MapToShapeFunction)(GaussInfo& obj);
/*!
std::transform(tmp.begin(),tmp.end(),tmp.begin(),[](double c){return fabs(c);});
return *std::max_element(tmp.begin(),tmp.end())<eps;
}
+
+MCAuto<DataArrayDouble> MEDCouplingGaussLocalization::GetDefaultReferenceCoordinatesOf(INTERP_KERNEL::NormalizedCellType type)
+{
+ std::vector<double> retCpp(INTERP_KERNEL::GaussInfo::GetDefaultReferenceCoordinatesOf(type));
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
+ auto nbDim(cm.getDimension());
+ std::size_t sz(retCpp.size());
+ MCAuto<DataArrayDouble> ret(DataArrayDouble::New());
+ if( sz%std::size_t(nbDim) != 0 )
+ THROW_IK_EXCEPTION("GetDefaultReferenceCoordinatesOf : unexpected size of defaut array : " << sz << " % " << nbDim << " != 0 !");
+ ret->alloc(sz/size_t(nbDim),nbDim);
+ std::copy(retCpp.begin(),retCpp.end(),ret->getPointer());
+ return ret;
+}
%newobject MEDCoupling::MEDCouplingGaussLocalization::buildRefCell;
%newobject MEDCoupling::MEDCouplingGaussLocalization::getShapeFunctionValues;
%newobject MEDCoupling::MEDCouplingGaussLocalization::getDerivativeOfShapeFunctionValues;
+%newobject MEDCoupling::MEDCouplingGaussLocalization::GetDefaultReferenceCoordinatesOf;
%newobject MEDCoupling::MEDCouplingSkyLineArray::BuildFromPolyhedronConn;
%newobject MEDCoupling::MEDCouplingSkyLineArray::getSuperIndexArray;
%newobject MEDCoupling::MEDCouplingSkyLineArray::getIndexArray;
MCAuto<DataArrayDouble> ret(self->getDerivativeOfShapeFunctionValues());
return ret.retn();
}
+
+ static DataArrayDouble *GetDefaultReferenceCoordinatesOf(INTERP_KERNEL::NormalizedCellType type)
+ {
+ MCAuto<DataArrayDouble> ret(MEDCouplingGaussLocalization::GetDefaultReferenceCoordinatesOf(type));
+ return ret.retn();
+ }
}
};