-
Notifications
You must be signed in to change notification settings - Fork 536
NURBSExtension Constructor and edge_to_knot mapping #4835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…ges to unique knotvectors
…que knotvector indices
Tagging @JacobLotz because this changes the |
This PR is now under review (see the table in the PR description). To help with the review process, please do not force push to the branch. |
@tzanio, could you take a look when you get a chance? @justinlaughlin mentioned needing this for other work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @justinlaughlin !
Merged in |
Adjust a tolerance in miniapps/nurbs/nurbs_solenoidal.cpp for macOS. Fix typos in the miniapps/nurbs/makefile in the nurbs_solenoidal tests. Re-formatting some long lines.
Resolved conflicts: miniapps/nurbs/makefile
Re-merged in |
Summary
This PR
Mesh::GetEdgeToUniqueKnotvector
, to calculate theedge_to_knot
map (now renamededge_to_ukv
, whereukv
is the "unique knot vector" index) used by NURBS meshesMesh::GetEdgeToUniqueKnotvector
also produces the intermediary index maps. For now the only one that is needed/returned isukv_to_rpkv
, used by the patch-basedNURBSExtension
constructor.NURBSExtension
constructor usingNURBSPatch
(es) andpatchTopo
to useMesh::GetEdgeToUniqueKnotvector
NURBSExtension
constructorminiapps/nurbs/plus-nurbs-permuted.mesh
is an example mesh that would not work previously but now does.miniapps/nurbs
CMakeLists so thatminiapps/nurbs/meshes
is copied over on buildsBackground
This work began while implementing code to automatically create a low-order version of a NURBS mesh — keeping the number of DOFS and placing the new knots at e.g. Greville abscissa of the higher order mesh. The cleanest approach in my opinion is to grab the
NURBSPatch
(es) andpatchTopo
of aMesh
, make adjustments, then feed that into the newNURBSExtension
constructor introduced in #4566.Doing so, I found that we'd often get a
Inconsistent edge-to-knot mapping
error. The setting ofedge_to_knot
in the constructor was 1) not accounting for the sign-conventionif (v[0] > v[1]) { edge_to_knot[j] = -1 - edge_to_knot[j]; }
and 2) using the "patch knot vector index",pkv = p*dim + d
(p
is the patch index,dim
is the total number of dimensions, andd
is the local dimension index) rather than the "unique knot vector index". E.g. 3 patches in 3d joined on the same axis would have 5 "unique knot vectors", but 9 "patch knot vectors".edge_to_knot
is typically set viaMesh::LoadPatchTopo
; it is either set by theedges
field in a.mesh
file, or it is solved for by an algorithm. This algorithm worked for the test casesminiapps/nurbs/meshes/two-cubes-nurbs-autoedge.mesh
andminiapps/nurbs/meshes/two-squares-nurbs-autoedge.mesh
but gave "inconsistent edge-to-knot mappings" for other meshes such asdata/beam-hex-nurbs.mesh
.PR Checklist
make style
.CHANGELOG
:CHANGELOG
to group with other related features?INSTALL
:make
orcmake
have a new target?.github
.appveyor.yml
.gitignore
:make distclean; git status
shows any files that were generated from the source by the project (not an IDE) but we don't want to track in the repository.examples/makefile
:SEQ_EXAMPLES
andPAR_EXAMPLES
variables.clean
target..gitignore
file.examples/CMakeLists.txt
:ALL_EXE_SRCS
variable.THIS_TEST_OPTIONS
is set correctly for the new example.doc/CodeDocumentation.dox
.examples/pumi
), list it indoc/CodeDocumentation.conf.in
src/examples.md
.src/examples.md
andsrc/img
.examples.md
, list the example under the appropriate categories, add new categories if necessary.features.md
.makefile
andmakefile
in corresponding miniapp directory..gitignore
file.CMakeLists.txt
file in theminiapps
directory, if the new miniapp is in a new directory.CMakeLists.txt
file in the new miniapp directory.doc/CodeDocumentation.dox
miniapps/nurbs
), add it toMINIAPP_SUBDIRS
in themakefile
.miniapps/nurbs
), list it indoc/CodeDocumentation.conf.in
src/meshing.md
andsrc/electromagnetics.md
files.src/examples.md
andsrc/img
.features.md
.mfem/web
repo.README
(rare).doc/CodeDocumentation.dox
(rare).make unittest
to make sure all unit tests pass.tests/scripts
.