-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2013 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// Author : Anthony Geay (CEA/DEN)
#include "MEDCouplingGaussLocalization.hxx"
#include "CellModel.hxx"
throw e;
}
+ParaMEDMEM::MEDCouplingGaussLocalization::MEDCouplingGaussLocalization(INTERP_KERNEL::NormalizedCellType typ) throw(INTERP_KERNEL::Exception)
+try:_type(typ)
+{
+ INTERP_KERNEL::CellModel::GetCellModel(_type);
+}
+catch(INTERP_KERNEL::Exception& e)
+ {
+ _type=INTERP_KERNEL::NORM_ERROR;
+ throw e;
+ }
+
+void ParaMEDMEM::MEDCouplingGaussLocalization::setType(INTERP_KERNEL::NormalizedCellType typ) throw(INTERP_KERNEL::Exception)
+{
+ INTERP_KERNEL::CellModel::GetCellModel(typ);//throws if not found. This is a check
+ _type=typ;
+}
+
void ParaMEDMEM::MEDCouplingGaussLocalization::checkCoherency() const throw(INTERP_KERNEL::Exception)
{
const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(_type);
return oss.str();
}
+std::size_t ParaMEDMEM::MEDCouplingGaussLocalization::getHeapMemorySize() const
+{
+ std::size_t ret=0;
+ ret+=_ref_coord.capacity()*sizeof(double);
+ ret+=_gauss_coord.capacity()*sizeof(double);
+ ret+=_weight.capacity()*sizeof(double);
+ return ret;
+}
+
bool ParaMEDMEM::MEDCouplingGaussLocalization::isEqual(const MEDCouplingGaussLocalization& other, double eps) const
{
if(_type!=other._type)
_weight[gaussPtIdInCell]=newVal;
}
+void ParaMEDMEM::MEDCouplingGaussLocalization::setRefCoords(const std::vector<double>& refCoo) throw(INTERP_KERNEL::Exception)
+{
+ _ref_coord=refCoo;
+}
+
+void ParaMEDMEM::MEDCouplingGaussLocalization::setGaussCoords(const std::vector<double>& gsCoo) throw(INTERP_KERNEL::Exception)
+{
+ _gauss_coord=gsCoo;
+}
+
+void ParaMEDMEM::MEDCouplingGaussLocalization::setWeights(const std::vector<double>& w) throw(INTERP_KERNEL::Exception)
+{
+ _weight=w;
+}
+
/*!
* The format of 'tinyData' parameter is the same than pushed in method ParaMEDMEM::MEDCouplingGaussLocalization::pushTinySerializationIntInfo.
*/