Group Abstract Group Abstract

Message Boards Message Boards

How to use NMinimize on a mesh?

Posted 11 years ago
POSTED BY: Jonatan Lehtonen
4 Replies

This will be easier in the next release, but for now something like the following may work:

NMinimize[{Norm[{u0 - uif[x, y], v0 - vif[x, y]}], 
  SignedRegionDistance[MeshRegion[mesh]][{x, y}] <= 0}, {x, y}]
POSTED BY: Ilian Gachevski
POSTED BY: Ilian Gachevski
POSTED BY: Jonatan Lehtonen

Thank you for the quick response! Just tried your solution and it seems to work fine.

POSTED BY: Jonatan Lehtonen
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard