Git Product home page Git Product logo

Comments (6)

dengwirda avatar dengwirda commented on August 23, 2024

@austinherrema Yes, there are some new options OPTS.REF1 and OPTS.REF2 that can be set to preserve (rather than the default refine) to preserve the boundary cells as you've specified them. Of course, this can lead to some potential compromises in terms of mesh quality constraints; specifically, it's not possible to guarantee that cells in the 'neighbourhood' of unrefinable boundary segments satisfy their requested bounds... In practice though, as long as your boundary discretisation matches the interior constraints reasonably well enough, you should get a good mesh that preserves an existing boundary.

from mesh2d.

austinherrema avatar austinherrema commented on August 23, 2024

@dengwirda Thanks for the help. I updated mesh2d and tried to use the new OPTS.REF1 and OPTS.REF2 options (setting them both to preserve). Unfortunately, refine2 still appears to introduce new nodes. See the below figure, which shows a portion of the geometry for which I am generating a mesh. The input nodes are indicated by red markers.

image

Are there any other options I can change to achieve the desired behavior? Oddly, tweaking RHO2, SIZ1, and SIZ2 seems to have no effect on the final mesh.

Obviously the final mesh for this geometry will be quite odd if no new nodes are introduced, but this is acceptable for my application.

from mesh2d.

dengwirda avatar dengwirda commented on August 23, 2024

@austinherrema I've had a chance to look into this, but am having trouble reproducing the behaviour you've shown. Can you email me the geometry, etc that you're specifying, along with details on the MATLAB / OCTAVE release that you're using?

from mesh2d.

austinherrema avatar austinherrema commented on August 23, 2024

@dengwirda I sent an email; please let me know if you do not receive anything or need more info!

from mesh2d.

dengwirda avatar dengwirda commented on August 23, 2024

@austinherrema Ah -- easy I think! MATLAB is case-sensitive, so opts.REF1 isn't quite the same thing as opts.ref1... (the lower-case version is what you're looking for here and seems to behave as expected I think).

I should perhaps change the error-checking that's done on the opts structure to catch these kind of cases with unrecognised fieldnames.

from mesh2d.

austinherrema avatar austinherrema commented on August 23, 2024

@dengwirda Sure enough--using lowercase opts.ref1 and opts.ref2 produces the desired result. Thank you! I definitely should have tried that earlier, but I'm glad it was a straightforward solution.

For what it's worth, I think I used capitalized versions of the options because that is how they are presented in the refine2 help (OPTS.REF1 = {'REFINE'}, 'PRESERVE'...). Of course, I see now that that the capitalization was simply intended to set each option apart from its description.

Thanks for your great work on this tool!

from mesh2d.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.