//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
{
std::ostringstream oss; oss << "Invalid size of refCoo : expecting to be : " << nbNodes << " (nbNodePerCell) * " << dim << " (dim) !";
throw INTERP_KERNEL::Exception(oss.str().c_str());
{
std::ostringstream oss; oss << "Invalid size of refCoo : expecting to be : " << nbNodes << " (nbNodePerCell) * " << dim << " (dim) !";
throw INTERP_KERNEL::Exception(oss.str().c_str());
* push at the end of tinyInfo its basic serialization info. The size of pushed data is always the same.
* @param tinyInfo inout parameter.
*/
* push at the end of tinyInfo its basic serialization info. The size of pushed data is always the same.
* @param tinyInfo inout parameter.
*/
INTERP_KERNEL::NormalizedCellType typ(getType());
int dim(INTERP_KERNEL::CellModel::GetCellModel(typ).getDimension()),outDim(mesh->getSpaceDimension());
MCAuto<DataArrayDouble> ret(DataArrayDouble::New());
ret->alloc(nbPts*nbCells,outDim);
double *retPtr(ret->getPointer());
INTERP_KERNEL::NormalizedCellType typ(getType());
int dim(INTERP_KERNEL::CellModel::GetCellModel(typ).getDimension()),outDim(mesh->getSpaceDimension());
MCAuto<DataArrayDouble> ret(DataArrayDouble::New());
ret->alloc(nbPts*nbCells,outDim);
double *retPtr(ret->getPointer());
throw INTERP_KERNEL::Exception("MEDCouplingGaussLocalization::localizePtsInRefCooForEachCell : number of components of input coo is not equal to dim of element !");
const std::vector<double>& wg(getWeights());
INTERP_KERNEL::GaussCoords calculator;
calculator.addGaussInfo(typ,dim, ptsInRefCoo->begin(),nbPts,&_ref_coord[0],getNumberOfPtsInRefCell());
//
throw INTERP_KERNEL::Exception("MEDCouplingGaussLocalization::localizePtsInRefCooForEachCell : number of components of input coo is not equal to dim of element !");
const std::vector<double>& wg(getWeights());
INTERP_KERNEL::GaussCoords calculator;
calculator.addGaussInfo(typ,dim, ptsInRefCoo->begin(),nbPts,&_ref_coord[0],getNumberOfPtsInRefCell());
//
calculator.calculateCoords(getType(),coords,outDim,conn+connI[i]+1,retPtr);
return ret;
}
calculator.calculateCoords(getType(),coords,outDim,conn+connI[i]+1,retPtr);
return ret;
}
{
MCAuto<DataArrayDouble> coo(DataArrayDouble::New());
const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel(getType()));
{
MCAuto<DataArrayDouble> coo(DataArrayDouble::New());
const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel(getType()));
throw INTERP_KERNEL::Exception("BuildRefCell : dimension mistmatch !");
coo->alloc(cm.getNumberOfNodes(),getDimension());
std::copy(_ref_coord.begin(),_ref_coord.end(),coo->getPointer());
MCAuto<MEDCoupling1SGTUMesh> ret(MEDCoupling1SGTUMesh::New("",getType()));
ret->setCoords(coo);
throw INTERP_KERNEL::Exception("BuildRefCell : dimension mistmatch !");
coo->alloc(cm.getNumberOfNodes(),getDimension());
std::copy(_ref_coord.begin(),_ref_coord.end(),coo->getPointer());
MCAuto<MEDCoupling1SGTUMesh> ret(MEDCoupling1SGTUMesh::New("",getType()));
ret->setCoords(coo);
conn->alloc(cm.getNumberOfNodes(),1);
conn->iota();
ret->setNodalConnectivity(conn);
conn->alloc(cm.getNumberOfNodes(),1);
conn->iota();
ret->setNodalConnectivity(conn);
{
std::vector<double> v1(dim*tinyData[1]),v2(dim*tinyData[2]),v3(tinyData[2]);
return MEDCouplingGaussLocalization((INTERP_KERNEL::NormalizedCellType)tinyData[0],v1,v2,v3);
}
{
std::vector<double> v1(dim*tinyData[1]),v2(dim*tinyData[2]),v3(tinyData[2]);
return MEDCouplingGaussLocalization((INTERP_KERNEL::NormalizedCellType)tinyData[0],v1,v2,v3);
}
{
const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(_type);
int dim=cm.getDimension();
{
const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(_type);
int dim=cm.getDimension();
if(gaussPtIdInCell<0 || gaussPtIdInCell>=nbGsPts)
throw INTERP_KERNEL::Exception("gaussPtIdInCell specified is invalid : must be in [0:nbGsPts) !");
if(comp<0 || comp>=dim)
if(gaussPtIdInCell<0 || gaussPtIdInCell>=nbGsPts)
throw INTERP_KERNEL::Exception("gaussPtIdInCell specified is invalid : must be in [0:nbGsPts) !");
if(comp<0 || comp>=dim)