Comments (2)
Subsequent issues:
from wildmeshing-toolkit.
@daniel-zint to continue the discussion in
#369 (comment)
and
#369 (comment)
My main issue here is that currently the validity of SimplexCollection::get_union()
and SimplexCollection::get_intersection()
are completely ambiguous, as they both depend on std::set_union
and std:::set_intersection
, which REQUIRE their input ranges are sorted.
see:
- https://en.cppreference.com/w/cpp/algorithm/set_intersection
- https://en.cppreference.com/w/cpp/algorithm/set_union
As such there are three choices:
- Add a flag to
SimplexCollection
for whether it is sorted and branch between different algorithms if the input is not sorted - Add assertions / checks for sortedness of SimplexCollection
- guarantee that a
SimplexCollection
is always sorted
I much prefer the last option, and I think that there is an easy semantic choice that enables your performance worries AND this semantic:
- Functions that return a
std::vector<Simplex>
do not have a guarantee of being sorted - Functions that return a
SimplexCollection
are sorted
The inclusion of a mesh-like object in SimplexCollection
is therefore:
struct SimplexCollection {
public:
SimplexCollection(const Mesh& mesh, std::vector<Simplex>&& simplices): m_complex(mesh), m_simplices(std::move(simplices)) {}
private:
std::vector<Simplex> m_simplices;
SimplicialComplex m_complex;
protected:
void fix_state(); // uses m_complex to sort and unique
};
where
struct SimplicialComplex {
bool less_than(const Simplex&, const Simplex&) const;
bool equal(const Simplex&, const Simplex&) const;
SimplexLessThanFunctor less_than_functor() const;
SimplexEqualFunctor equal_functor() const;
private:
const Mesh& m_mesh;
};
In this case SimplicialComplex
is more like a "view" of a Mesh
to utilize simplex-specific tools
from wildmeshing-toolkit.
Related Issues (20)
- 3d collapse link condition
- Attribute checkpoints
- tet inversion invariant
- tetmesh link condition invariant
- nrrd input support for embedded remeshing
- TriMesh Edge Collapse Reuses IDs
- MultiMesh Checkpoints
- `Invariants::after` should also take the input simplex
- tet swap operation
- Disallow stack-allocated meshes
- multimesh new attribute strategies
- unify strategies for Tri/TetMesh
- attribute transfer based on neighbor sum functions
- refactor optimization smooth
- Triangle insersion refactoring
- fix a wrong example in the test
- optimize the marching component HOT 1
- add document for integration test HOT 1
- Can not find the 'app' folder within 'build' folder after cmake and make process HOT 6
- A bug in function `tetmesh_topology_initialization`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wildmeshing-toolkit.