//
// 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
MEDCouplingGaussLocalization::MEDCouplingGaussLocalization(INTERP_KERNEL::NormalizedCellType type, const std::vector<double>& refCoo,
const std::vector<double>& gsCoo, const std::vector<double>& w)
MEDCouplingGaussLocalization::MEDCouplingGaussLocalization(INTERP_KERNEL::NormalizedCellType type, const std::vector<double>& refCoo,
const std::vector<double>& gsCoo, const std::vector<double>& w)
-try:_type(type),_ref_coord(refCoo),_gauss_coord(gsCoo),_weight(w)
+:_type(type),_ref_coord(refCoo),_gauss_coord(gsCoo),_weight(w)
{
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::GaussCoords calculator;
calculator.addGaussInfo(typ,dim, ptsInRefCoo->begin(),nbPts,&_ref_coord[0],getNumberOfPtsInRefCell());
//
INTERP_KERNEL::GaussCoords calculator;
calculator.addGaussInfo(typ,dim, ptsInRefCoo->begin(),nbPts,&_ref_coord[0],getNumberOfPtsInRefCell());
//
- for(int i=0;i<nbCells;i++,retPtr+=nbPts*dim)
- calculator.calculateCoords(getType(),coords,dim,conn+connI[i]+1,retPtr);
+ for(mcIdType i=0;i<nbCells;i++,retPtr+=nbPts*outDim)
+ calculator.calculateCoords(getType(),coords,outDim,conn+connI[i]+1,retPtr);
{
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)