Coder Social home page Coder Social logo

grideyes-2010 / amovemesh Goto Github PK

View Code? Open in Web Editor NEW

This project forked from slaedr/amovemesh

0.0 0.0 0.0 155.5 MB

C++ libraries for mesh movement and curved mesh generation

License: GNU General Public License v3.0

C++ 96.38% Python 0.10% GLSL 2.68% Makefile 0.20% Fortran 0.13% CMake 0.32% PLSQL 0.18%

amovemesh's Introduction

AMoCurve

C++ programs for mesh movement and curved mesh generation.

Several methods of mesh movement have been implemented, including spring analogies, linear elasticity, Delaunay graph mapping, radial basis function mapping etc.

Curved meshes can be generated, from linear meshes, for both 2D and 3D cases. Currently, 3D cases require specification of boundary displacements.

Building

Requires the Eigen matrix library version 3.2.8 or newer. An environment variable EIGEN_DIR needs to be set to the top-level Eigen directory, if it is not in a standard include location.

Create a directory for binaries, eg, build, and then run CMake for the AMoCurve/src directory. This creates makefiles in the bin directory. The compiler to be used should be set in the environment variable CXX, or can be passed as an argument to the CMake command via -DCMAKE_CXX_COMPILER=path_to_compiler. If the compiler is not GNU, you may have to edit the top-level CMakeLists.txt file to set debug and optimization flags. C++ 11 support is required. GCC 5 series is known to work.

So assuming you are currently in the top level AMoCurve directory, and a (GNU) compiler is set in CXX,

mkdir build
cd build
cmake ../src -DCMAKE_BUILD_TYPE=Release
make

will build an optimized version of the binaries. To compile a debug version with all warnings during compile time, and without aggressive optimization for a quick and light compilation, use `-DCMAKE_BUILD_TYPE=Debug' instead. Note that the release version runs significantly faster than the debug version, though. For a parallel build using, for example, 4 threads, use

make -j4

instead of just `make'.

Usage

If you do not have access to displacements for high-order nodes, use the executable amc for 3D meshes and curveh for hybrid 2D meshes. If you have access to a quadratic mesh with boundaries already curved (but perhaps containing invalid elements), use cmg or cmg2d for 2D and 3D meshes respectively. Note that the 3D mesh class currently only supports meshes with a single type of element, while a hybrid mesh capability is available for 2D.

See test-cases/ for example control files for the programs. You must stick to the format specified in the example control files, until such time as more advanced control-file-parsing is incorporated.

Documentation

For documentation related to the methodology used for this project, see the docs/thesis directory. To build the code's reference documentation, issue

doxygen builddoc.cfg

from within the docs/ directory. This will generate html documentation from source code comments in docs/html/.

Things to do

  • Write 3D hybrid mesh class
  • Remove old classes such as UTriMeshCurved etc
  • Test the 3D Delaunay triangulation more extensively
  • Speed up the 3D Delaunay triangulation implemenation by using more efficient data structures and by bin-sorting the points.
  • Make ndim a template parameter to the mesh classes - this will result in performance gains through loop-unrolling, hopefully.
  • Use YAML-cpp (or something similar) for processing control files
  • In the mesh classes, extend compute_topological() to high-order elements

amovemesh's People

Contributors

adityakashi avatar slaedr 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.