Skip to content

Conversation

@yungyuc
Copy link
Member

@yungyuc yungyuc commented Jan 22, 2022

The minimal unstructured-mesh code has the most basic unit test in 2D.

…ification

The mesh is named StaticMesh* because it does not change when being used.

1. The code was copied from SOLVCON (https://github.com/solvcon/solvcon).
2. Add basic shape tests for the mesh object.
3. Add CellType but it is not used nor tested at all.
Add mesh.hpp to house code of unstructured mesh
… object

This is the first step: Create a simple test function for the object creation.
Note that the cell type ID is augmented by 1 (the valid type ID started from 0 in SOLVCON, but now it starts from 1 in modmesh).  Use of 1-based index leaves 0 to be the invalid sentinel for the type ID in modmesh.

Use the trivial triangle unit tests for build_faces_from_cells().
Add code to build the data for 2D unstructured mesh object
Use std::algorithm to count maximal number of faces for interior data.
* Add SimpleArray::vptr() API to return the pointer to an element.
* Change the use of some local pointers with SimpleArray API.
Remove use of pointers to shorten the code.
Add helper class detail::FaceBuilder to house the face building code.  The helper functions include:
* populate()
* make_ndfcs()
* make_dedupmap()
* remap_face()
I wrongly coded it to be swap(SimpleArray && other).  Change it to swap(SimpleArray & other).  Also use noexcept for C++17.
Make the function a little bit flatter.
Ubuntu g++ 10 detected these missing includes.
@yungyuc yungyuc self-assigned this Jan 22, 2022
@yungyuc yungyuc merged commit 10a2174 into master Jan 22, 2022
@yungyuc yungyuc deleted the project/ustmesh branch January 22, 2022 10:45
@yungyuc yungyuc restored the project/ustmesh branch January 22, 2022 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

2 participants