Skip to content
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

Degree-of-freedom Manager #86

Closed
joshua-white opened this issue Jul 13, 2018 · 5 comments
Closed

Degree-of-freedom Manager #86

joshua-white opened this issue Jul 13, 2018 · 5 comments
Assignees
Labels
type: feature New feature or request

Comments

@joshua-white
Copy link
Contributor

We need a DoFManager to handle global degree-of-freedom index assignment. Ideally, user would identify the solution fields to index, perhaps by providing the field keys. A very general case would be displacements on the nodes, pressures in the cells, and Lagrange multipliers on the faces. The DoFManager would loop through the element regions and create global_index field(s) in the data repository with unique global numbers. The dof numbers can then be readily accessed by the physics solver during assembly.

Suggested implementation:
(1) User indicates (somehow) they need global dof numbers for a few existing fields in the dataRepository. For example, a node-based array<R1Tensor> displacements and a cell-based array<real64> pressures.
(2) The DofManager loops over elements and allocates integer index storage next to the fields being indexed, using some agreed on ordering convention. In this example, each node gets a 3-integer vector (array2d<global_index>) for the displacement dofs, numbered 0 to n_displacements-1. Each cell gets a single integer index for the pressures (array<global_index>) numbered n_displacements to n_displacements+n_pressures-1. Index fields can be synchronized using standard MPI communications.
(3) During assembly, user can then access global index data in the same manner as they access the field data, and in a one-to-one way because they live on the same objects.

Once a global_index field is available, linear algebra classes can handle more sophisticated indexing issues, like block-partitioning the matrices.

@andrea-franceschini
Copy link
Contributor

Thanks to the suggestions by Randy and Josh, I was able to deal with ghost elements on the boundary of inactive regions.
Moreover, I added a methods that permute the global Jacobian pattern from a field-based ordering to a process-based one.
Following colors of the mesh (one color per process) we can recognize the block of unknowns in the matrix for each process (fields are displacement, pressure and mass matrix).
mesh
matrix

@joshua-white
Copy link
Contributor Author

Nice! I think we can merge this soon, and then start working on refactoring the LaplaceFEM as a test case. Francois is also close on having wells set up.

We should also do a few (big) parallel performance tests, just to make sure there are no scaling bottlenecks.

@rrsettgast
Copy link
Member

Excellent. Looking forward to integration.

@rrsettgast
Copy link
Member

@joshua-white can we close this?

@joshua-white
Copy link
Contributor Author

Yes, this is too general now to be useful. We can add specific DoFManager upgrades as new issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants