Skip to content

Tensor coefficient Poisson equation #2086

Answered by v-dobrev
kaigaox asked this question in Q&A
Discussion options

You must be logged in to vote

You can define a custom MatrixCoefficicient, e.g. ElementwiseMatrixCoefficient, to use with the DiffusionIntegrator in a way very similar to Example 1.

For the ElementwiseMatrixCoefficient you just need to implement the virtual method Eval(DenseMatrix &K, ElementTransformation &T, const IntegrationPoint &ip) -- you need to set the output parameter K based on the input element index which is given by T.ElementNo.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by pazner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants