Skip to content

Commit

Permalink
add doc for field mirroring
Browse files Browse the repository at this point in the history
  • Loading branch information
uturuncoglu committed Nov 22, 2024
1 parent f51a999 commit 6994904
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/addon/NUOPC/doc/NUOPC_FieldMirror.tex
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

The field mirror capability is also useful with NUOPC Mediators since these components often exactly reflect, in separate States, the sets of fields of each of the connected components. The field mirroring capability, therefore, can be used to ensure that a Mediator is always capable of accepting fields from connected components, and removes the need to specify field lists in multiple places, i.e., both within a set of Model components connected to a Mediator and within the Mediator itself.

To access the field mirror capability, a component sets the {\tt FieldTransferPolicy} attribute during {\tt label\_Advertise}. The attribute is set on the Import- and/or Export- States to trigger field mirroring for each state, respectively. The default value of "TransferNone" indicates that no fields should be mirrored. The other option, "TransferAll", indicates that fields should be mirrored in the State of a connected component.
To access the field mirror capability, a component sets the {\tt FieldTransferPolicy} attribute during {\tt label\_Advertise}. The attribute is set on the Import- and/or Export- States to trigger field mirroring for each state, respectively. The default value of "TransferNone" indicates that no fields should be mirrored. The other options, "TransferAll", indicates that fields should be mirrored in the State of a connected component and "TransferAllAsNests", also indicates that fields should be mirrored in the State of a connected component but in this case, fields are added to nested state for each provider component.

Each Connector consider the {\tt FieldTransferPolicy} Attribute on both its import and export States. If {\em both} States have a {\tt FieldTransferPolicy} of "TransferAll", then fields are transferred between the States in both directions (i.e., import to export and export to import). The transfer process works as follows: First, the {\tt TransferOfferGoemObject} attribute is reversed between the providing side and accepting side. Intuitively, if a field from the providing component is to be mirrored and it can provide its own geometric object, then the mirrored field on the accepting side should be set to accept a geometric object. Then, the field to be mirrored is advertised in the accepting State using a call to {\tt NUOPC\_Advertise()} such that the mirrored field shares the same Standard Name.
Each Connector consider the {\tt FieldTransferPolicy} Attribute on both its import and export States. If {\em both} States have a {\tt FieldTransferPolicy} of "TransferAll" or "TransferAllAsNests", then fields are transferred between the States in both directions (i.e., import to export and export to import). In case of "TransferAllAsNests", the received State by acceptor will have nested states for each provider. The transfer process works as follows: First, the {\tt TransferOfferGoemObject} attribute is reversed between the providing side and accepting side. Intuitively, if a field from the providing component is to be mirrored and it can provide its own geometric object, then the mirrored field on the accepting side should be set to accept a geometric object. Then, the field to be mirrored is advertised in the accepting State using a call to {\tt NUOPC\_Advertise()} such that the mirrored field shares the same Standard Name. The accepting State will have nested states if {\tt FieldTransferPolicy} is set to "TransferAllAsNests".

Components have the opportunity, using specialiozation point {\tt label\_ModifyAdvertised}, to modify any of the mirrored Fields in their Import/ExportState. After this the initialization sequence continues as usual. Since fields to be mirrored have been advertised with matching Standard Names, the field pairing algorithm will now match them in the usual way thereby establishing a connection between the original and mirrored fields.

0 comments on commit 6994904

Please sign in to comment.