How can you assemble matrix once, and apply for different boundary conditions to have an efficent ensemble simulation

  1. Please use the search button before posting, otherwise we may end up closing your post due to violation of the discourse rules. Assuming that you are using dolfinx, there was a recent message by @federicobetti with the same question. Search for it, and then post the resulting link in an answer.
  2. Again, according to the discourse rules this post is too vague: you do not specificy if you are using dolfin or dolfinx, you do not give an attempt of what you tried. I’ll give you one answer to rectify this. Failure to do so will result in me closing down the post.