Skip to main content

py bindings for conmech: a C++ lib for 3D frame elastis deformation analysis.

Project description

conmech

conmech is a stiffness checker that performs elastic deformation analysis for 3D frame structures. It is designed for construction sequencing applications, which involves testing the partially assembled structure (subset of element permutation) many times.

conmech is written in C++11 and wrapped friendly with Python via pybind11.

Installation

pip install pyconmech

Build from source

Build python bindings

Prerequisites

The following dependencies come from pybind11 for building the python wrappers.

On Unix (Linux, OS X)

  • A compiler with C++11 support

  • CMake >= 3.1

On Windows

  • Visual Studio 2015 (required for all Python versions, see notes below)

  • CMake >= 3.1

Then, clone this repository and pip install.

cd conmech
python pip install .
# or python3

With the setup.py file included in the base folder, the pip install command will invoke CMake and build the pybind11 module as specified in CMakeLists.txt.

Note:

conmech’s python bindings are built with a CMake-based build system via pybind11. Take a look at cmake_example for pybind11 if you want to learn more about this.

conmech depends on Eigen for linear algebra and nlohmann::json for json (de-)serialization, both of which are handled automatically by cmake for downloading.

Build C++ code

mkdir build
cd build
cmake ..
make -j2 # Unix

Or on Windows, replace the last line with

cmake --build .

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

0.4.3

Changed

  • Changed -DCONMECH_BUILD_TESTS=OFF in setup_cmake_utils.py to disable cpp test building in python setup.py build

0.4.0

Added

  • Added StiffnessChecker class method, directly construct from frame data, without saving data to a temp json

  • Added some initial cpp unit tests, test data fed in by CMake and tests organized by Catch2

Changed

  • Changed rapidjson to nlohmann::json

Removed

  • Removed the Frame data structure in Stiffness checker’s cpp backend

  • Removed all the git submodule and used CMake download external instead

Fixed

  • Fixed the memory leak caused by the smart pointer cycle dependency in Frame

0.3.1

Added

  • Added unit tests for std::throw in parsing material properties

0.3.0

Changed

  • Changed try/catch in the C++ file parsing to std::throw

0.2.0

Changed

  • The original stiffness_checker extension module is wrapper as _stiffness_checker. All the cpp modules are wrapper under a top-level python classes/functions, to give more flexibility.

  • API change: stiffness_checker class is renamed to StiffnessChecker to conform

    to the class naming convention. All other APIs within this class are left unchanged.

  • Delete radius entry from material_properties.

Added

  • documentation is hosted on readthedocs!

  • add grasshopper examples - parse/save files, karamba comparsion, solve/get result in GH via ghpython-remote

  • supports material / cross sectional properties for each element.

  • supports uniformly distributed load

  • add gravity magnitude and direction

0.1.0

Initial version

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyconmech-0.4.3.tar.gz (688.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page