OpenCMISS / iron

Source code repository for OpenCMISS-Iron
9 stars 62 forks source link

For avoiding global_to_local_map: Allow faces on nearly adjacent domains seperated by one element to be transferred. #154

Closed farg967 closed 6 years ago

farg967 commented 6 years ago

When domains are separated by one element they are not specified as adjacentDomains, therefore, there is no face and node communication between the domains. In some cases the ghost node/face may be owned by the nearly adjacent domain and should be sent to the active domain.

farg967 commented 6 years ago

Fixed

hsorby commented 6 years ago

Umm, could you elaborate on how this was fixed?

farg967 commented 6 years ago

Sure, I should note that this isn't an issue in the main Iron repo, as the node mappings are done globally rather than locally. Also, I have only fixed the issue for faces, as I am creating the mappings for faces in a local way so that it can be integrated in when the full local implementation is merged.

The issue was that faces on the boundary between two domains should also be sent to domains that are one element separated (nearly adjacent domain). It turns out that in elements mapping these domains are specified as adjacent domains, they just do not have any ghost_send or ghost_recieve elements, therefore there is no information of the elements in nearly adjacent domains.

To find the domains that a face has to be sent to I fill a domainsOfFaceList, by iterating over its surrounding elements and checking if the elements are ghost elements of another domain (ELEMENTS_MAPPING%ADJACENT_DOMAINS%LOCAL_GHOST_SEND_INDICES). The problem arose because the nearly adjacent domain doesn't have any local ghost send indices, as elements are not transferred between the domains. To fix this I iterate over the adjacent elements of the elements surrounding the face and check their domain, if the domain is different to the elements that surround the face, I add this domain to domainsOfFaceList, as it is a nearly adjacent domain.

One issue with this fix is that I have to use...

domainNo2=decomposition%ELEMENT_DOMAIN(adjacentElementGlobalNo2)

to find the elements domain, this isn't ideal as decomposition%ELEMENT_DOMAIN has global information which we might eventually want to get rid of.