Wildmeshing Toolkit
unique_homogeneous_simplices.cpp
Go to the documentation of this file.
1
#include <
wmtk/simplex/internal/HomogeneousSimplexEqualFunctor.hpp
>
2
#include <
wmtk/simplex/internal/HomogeneousSimplexLessFunctor.hpp
>
3
#include "
unique_homogeneous_simplices.hpp
"
4
namespace
wmtk::simplex::utils
{
5
6
7
std::vector<Tuple>
8
unique_homogeneous_simplices
(
const
Mesh
& m,
PrimitiveType
pt,
const
std::vector<Tuple>& tups)
9
{
10
std::vector<Tuple> vec = tups;
11
unique_homogeneous_simplices_inline
(m, pt, vec);
12
return
vec;
13
}
14
void
unique_homogeneous_simplices_inline
(
const
Mesh
& m,
PrimitiveType
pt, std::vector<Tuple>& tups)
15
{
16
auto
less =
wmtk::simplex::internal::HomogeneousSimplexLessFunctor
(m, pt);
17
auto
equal =
wmtk::simplex::internal::HomogeneousSimplexEqualFunctor
(m, pt);
18
19
std::sort(tups.begin(), tups.end(), less);
20
21
tups.erase(std::unique(tups.begin(), tups.end(), equal));
22
}
23
}
// namespace wmtk::simplex::internal
HomogeneousSimplexEqualFunctor.hpp
HomogeneousSimplexLessFunctor.hpp
wmtk::Mesh
Definition:
Mesh.hpp:106
wmtk::simplex::utils
Definition:
Mesh.hpp:73
wmtk::simplex::utils::unique_homogeneous_simplices
std::vector< Tuple > unique_homogeneous_simplices(const Mesh &m, PrimitiveType pt, const std::vector< Tuple > &tups)
Definition:
unique_homogeneous_simplices.cpp:8
wmtk::simplex::utils::unique_homogeneous_simplices_inline
void unique_homogeneous_simplices_inline(const Mesh &m, PrimitiveType pt, std::vector< Tuple > &tups)
Definition:
unique_homogeneous_simplices.cpp:14
wmtk::PrimitiveType
PrimitiveType
Definition:
PrimitiveType.hpp:9
wmtk::simplex::internal::HomogeneousSimplexEqualFunctor
Definition:
HomogeneousSimplexEqualFunctor.hpp:9
wmtk::simplex::internal::HomogeneousSimplexLessFunctor
Definition:
HomogeneousSimplexLessFunctor.hpp:9
unique_homogeneous_simplices.hpp
src
wmtk
simplex
utils
unique_homogeneous_simplices.cpp
Generated by
1.9.1