-
Notifications
You must be signed in to change notification settings - Fork 62
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
Use of PWMatrixCoefficient to define matrix coefficients per attribute #253
Comments
One option, as discussed in #57, may be to derive your own class from Unfortunately, I don't know if one can create an equivalent of |
@mdavids-cfs, @v-dobrev This is going to be address in https://github.com/mfem/PyMFEM/tree/coefficient-arrray-dev, where MatrixCoefficientPtrArray is available. The second option may work in the current master, if you keep the argument |
Hi @v-dobrev and @sshiraiwa |
Hi all,
I have been trying to implement a
PWMatrixCoefficient
but I am having trouble with the interface (also couldn't find an example for this). The goal is to assign aMatrixConstantCoefficient
per mesh attribute.In normal MFEM (C++) this is done by creating an Array
Array<MatrixCoefficient *> coefs(0);
and then assigning the matrix coefficients. I thought that PyMFEM can interpret normal lists of tuples as list-equivalents, i.e., I tried something like this:which fails when calling the
mfem.PWMatrixCoefficient
constructor. Also tried another approach:which fails when attempting to assemble a bilinear operator, that utilizes the
PWMatrixCoefficient
.Any thoughts on how this could be achieved?
Big thanks and warm regards,
Mathias
The text was updated successfully, but these errors were encountered: