Coder Social home page Coder Social logo

lbsmoothing's Introduction

Laplace-Beltrami mesh enhancement Python3 code for unstructured meshes. The mesh is currently assumed to be quadrilaterals with node and element numbers beginning with 1 instead of 0 as in C++. The enhancement method is described in Hansen, Douglass, Zardecki, Mesh Enhancement: Selected Elliptic Methods, Foundations, and Applications, Imperial College Press, 2005 specifically in sections 9.2 and 9.3. There is also a matplotlib capability to plot initial and final unstructured meshes.

To execute the code, simply download it and type: python3 LB.py. A test problem will run (one of 2 tests in the code; remove """ - in 2 places and place them around the other test data). Execution runs through the first plot, then pauses until the plot is deleted. Execution continues in a similar vein through the plotting of the final mesh. When trhe plot is removed, execution terminates. Both plots are saved as .pdf files. There are 2 constants in the function LBsmoother which may be adjusted: epsilon and maxIter which are used to stop the solution iteration.

There are 4 variables needed to setup a new mesh problem: dofs, edofs, coords, and bdyNodes. This nomenclature is from calfem, a mesh generation code available from github.com. It is based in the solid mechanics area.

  1. dofs - (degrees of freedom) contains the node numbers. Node numbering should first list all boundary nodes; then the internal nodes.
  2. edof - (element degrees of freedom) contains the node numbers for each element (assuming counterclockwise listing)
  3. coords - contains the x,y coordinate pairs for each node as given in dofs
  4. bdyNodes - lists the boundary node numbers, the first BN nodes in dofs where BN is the number of boundary nodes.

lbsmoothing's People

Contributors

rwdlnk avatar

Watchers

 avatar

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.