-
Notifications
You must be signed in to change notification settings - Fork 0
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
Nodal fields redesign #77
Open
biancagi
wants to merge
58
commits into
main
Choose a base branch
from
nodal-field
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
biancagi
commented
Jun 9, 2024
- Redesign of nodal fields as maps from a node to a tensor (scalar, vector, second-order tensor, ...)
- Redesign of summit and vtk writers accordingly
- Implement summit reader for a DG mesh
… {constexpr} function
…ribute Fields should have immutable names.
Define {HAVE_TENSOR} and {HAVE_COMPACT_PACKINGS} before including {pyre}.
Here, we pass down to the writer a {fields::field} which is then evaluated on the nodes.
…odes and field values
Fixed bug for which nodes in {NodalField} were duplicated across adjacent elements. When nodes are inserted in a mesh with mesh.insert({node0, node1, node2}), nodes are copied. Therefore, a hash function and {operator==} based on the nodes addresses will create copies for each instance of a node in a mesh (that is for the same node appearing in adjacent elements). For now, the problem is fixed by setting nodes equal if their underlying vertex and points are equal and by editing the hash function to trivially combine the hashes of vertex and point (this needs to be improved to reduce the chance of clash). However, these choices will be revisited when we implement discontinuous Galerkin.
…oudWriter} classes This is necessary because writing nodal fields requires to store the vtu grid as state.
…r to {summit} directory
No need to use a {map}.
No need to use a map, as the 'value' (that is the sequential index of the point stored) can be retrieved by the distance of a given point from the beginning of the set memory allocation.
A bug in gcc does not make the (protected!) attributes of the parent class visible in the derived class scope.
… design of class {MeshWriter}
Directly access {dim} when possible.
This is necessary so as to avoid having the same node being copied into different nodes when inserting a geometric simplex in a mesh. Copying a node now results in copying its shared pointer. The current implementation has some issues, though: 1) While originally the {SharedPointer} class was designed for not owning the resource, now a {SharedPointer} may instantiate a resource. This breaks the design and a mechanism for deletion of the resource should be implemented. 2) Nodes are now 'special' geometric simplices, in that they do reference counting while the other geometric simplices do not. This implies that sometimes they need to be treated as special cases (for example in the extraction of the boundary of a segment).
This class extends the {std::shared_ptr} in order to provide a constructor with a suitable argument list, as well as an id, which enables hashing and <==> operators.
Instead of implementing two almost identical methods for fetching the boundary of a mesh of segments and of any other mesh, devise the suitable type of the boundary (either a cloud of nodes or a proper boundary mesh) at compile time.
Remove {requires} from {concept} definition when possible.
…he same code for segments, triangles and tets
This will make it easier to generalize the reader / writer to the case of nonsimplicial elements.
The new design is informed of the difference between points and nodes. This prepares the ground for supporting both CG and DG meshes.
… the original and reread mesh
…turning a discontinuous Galerkin mesh
…ts relocated headers can be handled gracefully
Deriving {StdSharedPointer} from {std::shared_ptr} leads to memory leaks (in this case, memory not being freed).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.