[MueLu] Working example of xml for exporting aggregates when using BlockedRAPFactory? #12143
-
Hi, I have a working example of exporting aggregates with a regular non-block matrix. With the block system, it is also not clear how one should pass the coordinates to the hierarchy level 0. I tried with the "user data" in the parameter list and with the hierarchy object itself. Does anyone have experience with this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I manage to get this working. Here are some note about it.
The Coordinates can be passed to the hierarchy object. hierarchy->GetLevel(0)->Set("Coordinates", xcoordinates); Then, in the tentative prolongation operator construction, it depends on the null space of the finer level2. The null space factory can request coordinates if
Without this option, the tentative prolongation factory itself can request for coordinates if the option to generate coarse levels coordinates is true
In this case, the tentative prolongation factory for a block is looking for the <ParameterList name="myInputCoordsFact">
<Parameter name="factory" type="string" value="FineLevelInputDataFactory"/>
<Parameter name="Variable" type="string" value="Coordinates"/>
<Parameter name="Variable type" type="string" value="MultiVector"/>
<Parameter name="Fine level factory" type="string" value="NoFactory"/>
</ParameterList>
<ParameterList name="myFirstGroup">
<Parameter name="group" type="string" value="FactoryManager"/>
<Parameter name="A" type="string" value="mySubBlockAFactory1"/>
<Parameter name="P" type="string" value="myTentativePFact1"/>
<Parameter name="R" type="string" value="myRFact1"/>
<Parameter name="Aggregates" type="string" value="myAggFact1"/>
<Parameter name="Nullspace" type="string" value="myNspFact1"/>
<Parameter name="CoarseMap" type="string" value="myCoarseMap1"/>
<Parameter name="Coordinates" type="string" value="myInputCoordsFact"/>
</ParameterList> The aggregate export factory needs to declared as a Transfer factory in the blocked RAP factory, <ParameterList name="myBlockedRAPFact">
<!-- Just use the blocked prolongation and restriction -->
<Parameter name="factory" type="string" value="BlockedRAPFactory"/>
<Parameter name="P" type="string" value="myBlockedPFact"/>
<Parameter name="R" type="string" value="myBlockedRFact"/>
<!-- RAP factory is responsible to CREATE THE COARSER level matrices. -->
<!-- It contains "TransferFactories" that transfer information from fine to coarse levels. -->
<ParameterList name="TransferFactories">
<Parameter name="For Coordinates" type="string" value="myTransferCoordinatesFact"/>
<Parameter name="AggregationExportFactory" type="string" value="myAggExport"/>
</ParameterList>
</ParameterList> Footnotes1 file:~/.local/src/Trilinos/packages/muelu/src/Utils/MueLuAggregationExportFactorydef.hpp:://Only pull in coordinates if the user explicitly requests direct VTK output, so as not to break uses of old code 2 file:~/.local/src/Trilinos/packages/muelu/src/Transfers/Smoothed-Aggregation/MueLuTentativePFactorydef.hpp::pName; 3 file:~/.local/src/Trilinos/packages/muelu/src/Transfers/Smoothed-Aggregation/MueLuTentativePFactorydef.hpp::if 4 file:~/.local/src/Trilinos/packages/muelu/src/MueCentral/MueLuMasterList.cpp::"<Parameter name=\"tentative: build coarse coordinates\" type=\"bool\" value=\"true\"/>" |
Beta Was this translation helpful? Give feedback.
-
@nasseralkmim Thank you for posting notes on how you got it to work. We're currently all on travel and unable to look into it. |
Beta Was this translation helpful? Give feedback.
I manage to get this working. Here are some note about it.
The AggregationExportFactory1 requires the Coordinates on level 0.
The Coordinates can be passed to the hierarchy object.
Then, in the tentative prolongation operator construction, it depends on the nu…