Open nasseralkmim opened 4 weeks ago
Automatic mention of the @trilinos/muelu team
Depending on how you build the fine level operator, an alternative approach could be of interest. https://github.com/trilinos/Trilinos/blob/master/packages/panzer/disc-fe/src/Panzer_Interpolation.cpp This idea is to build the prolongator outside of MueLu and then pass it in on preconditioner construction. We use this in MiniEM for higher order https://github.com/trilinos/Trilinos/blob/master/packages/panzer/mini-em/example/BlockPrec/main.cpp
@cgcgcg Thanks, I will look into it.
Do you know anything about the multiple dof per node in intrepid2?
@mperego @CamelliaDPG ?
@nasseralkmim Can you explain why you want multiple dofs per node? Is it that you have multiple variables defined with the same basis? The usual thing for this is to use the single-dof basis multiple times. Intrepid2 would support multiple dofs per node through subclassing, but this seems like a much more complicated approach than just using the single-dof basis multiple times.
@CamelliaDPG I'm doing standard elasticity with multiple translations per node. Single dof basis multiple times seems the way to go in this case. I couldn't find an example of this though, are you aware of it?
In MueLu I need to pass a string with the basis, for example:
<Parameter name="pcoarsen: hi basis" type="string" value="hgrad_quad_i2"/>
<Parameter name="pcoarsen: lo basis" type="string" value="hgrad_quad_c1"/>
Then, the PCoarsenFactory
instantiates the Intrepid2
basis. For example1:
if (deriv == "hgrad" && el == "quad" && poly == "c") {
if (degree == 1)
return rcp(new Intrepid2::Basis_HGRAD_QUAD_C1_FEM<KokkosExecutionSpace, Scalar, Scalar>());
else
return rcp(new Intrepid2::Basis_HGRAD_QUAD_Cn_FEM<KokkosExecutionSpace, Scalar, Scalar>(degree, Intrepid2::POINTTYPE_EQUISPACED));
Any idea on how to use single dof basis multiple times?
1 From MueLu_IntrepidPCoarsenFactory_def.hpp
@nasseralkmim How you manage this will depend on how you're doing your local to global mapping. Are you using the Panzer DofManager? I'm not too familiar with the examples we have, but I do see that there is one at packages/panzer/dof-mgr/example/CartesianScaling/main.cpp
which involves a pressure and temperature field both discretized with an H^1 hexahedral basis.
This example doesn't involve MueLu directly; perhaps @cgcgcg can weigh in on whether there's anything special you need to do with MueLu for this case and/or what a good multivariate MueLu examples to imitate would be.
@CamelliaDPG I'm not using panzer::DOFManager
. Fine level operator is built in an independent application with custom element and material formulation.
I see the DOF manager is capable of managing multiple dofs per node and it is also used in the function mentioned by @cgcgcg.
The question now is how to integrate this panzer::buildInterpolation
interpolation function1 with the Muelu PCoarsenFactory
. If it is possible. In MueLu, the interpolation is done with this function2 GenerateLinearCoarsening_pn_kirby_to_p1
, but I think it is limited to one dof per node.
1 https://github.com/trilinos/Trilinos/blob/master/packages/panzer/disc-fe/src/Panzer_Interpolation.cpp
2 https://github.com/trilinos/Trilinos/blob/fb58dc8b5611d9606664cebd251de0b8949892ed/packages/muelu/src/Transfers/PCoarsen/MueLu_IntrepidPCoarsenFactory_def.hpp#L546
Maybe @csiefer2 can help.
IntrepidPCoarsenFactory, as it currently exists, is restricted to nodal single-dof basis functions supported by Intrepid/Intrepid2.
Question
Hi, I would like to try the Pcoarsen factory to create a 2-level hierarchy from a quadratic element to a linear element.
I noticed that Serendipity quad elements were introduced here https://github.com/trilinos/Trilinos/commit/c3b1a94753b3611e3f931a1a1b6e9f026b30ecb8.
But the interface in MueLu apparently is not updated to parse those https://github.com/trilinos/Trilinos/blob/fb58dc8b5611d9606664cebd251de0b8949892ed/packages/muelu/src/Transfers/PCoarsen/MueLu_IntrepidPCoarsenFactory_def.hpp#L180. Not sure if the rest of the PCoarsen factory is capable of supporting those elements.
Some questions:
BasisFactory
seems straight forward).Best regards, Nasser