Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 794b8a8b authored by Philippe Depouilly's avatar Philippe Depouilly
Browse files

add coarseFromRangeVector method

parent a3820ea7
No related branches found
No related tags found
No related merge requests found
......@@ -75,6 +75,22 @@ long Grid::refineFromRangeVector(std::vector<double> v, double min, double max){
return counter;
}
long Grid::coarseFromRangeVector(std::vector<double> v, double threshold){
long counter = 0;
PiercedVector<double> pv = VtoPV(v, this);
for (auto &cell : getCells()) {
const long &id = cell.getId();
if (getCell(id).isInterior() && (pv[id] > threshold)) {
markCellForCoarsening(id);
counter++;
}
}
update(false,true);
return counter;
}
// Return the neighbours of one point
std::vector<long> Grid::findQuadrantNeighs(const NPoint &x0, const long id)
{
......
......@@ -138,6 +138,11 @@ long nbCells() {
*/
long refineFromRangeVector(std::vector<double> v, double min, double max);
/**
* @brief Return elements size Coarsening from a Vector Range Values
*/
long coarseFromRangeVector(std::vector<double> v, double threshold);
std::vector<bitpit::adaption::Info> getMapper() {
return _mapper;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment