File: LevelSetIGeom.cpp

package info (click to toggle)
yade 2026.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 34,448 kB
  • sloc: cpp: 97,645; python: 52,173; sh: 677; makefile: 162
file content (21 lines) | stat: -rw-r--r-- 738 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*************************************************************************
*  2021 jerome.duriez@inrae.fr                                           *
*  This program is free software, see file LICENSE for details.          *
*************************************************************************/

#ifdef YADE_LS_DEM
#include <pkg/levelSet/LevelSetIGeom.hpp>

namespace yade {
YADE_PLUGIN((MultiScGeom)(LSnodeGeom));

bool MultiScGeom::hasNode(int nodeIdx) { return (iteratorToNode(nodeIdx) != nodesIds.end()); }

std::vector<int>::iterator MultiScGeom::iteratorToNode(int nodeIdx)
{
	return (std::find(nodesIds.begin(), nodesIds.end(), nodeIdx) // no problem even if nodesIds is empty)
	);
}

} // namespace yade
#endif //YADE_LS_DEM