First off, thank you for considering contributing to ONSAS! It's people like you that make this open-source solver a great tool for the structural engineering and academic community.
This document provides guidelines and instructions for contributing to this repository.
- Code of Conduct
- Getting Started
- How to Contribute
- Development Environment Setup
- Coding Style and Guidelines
- Testing
By participating in this project, you are expected to uphold a welcoming and collaborative environment. Please treat all maintainers, contributors, and users with respect.
Before you begin contributing, please ensure you have a basic understanding of how ONSAS operates. You can familiarize yourself with the solver by checking out the examples directory and running some of the predefined structural analysis cases (e.g., the static von mises truss, propeller, or the Euler column model).
If you find a bug in the code, please open an issue in the GitHub repository. When creating an issue, please include:
- A clear and descriptive title.
- The version of ONSAS you are using.
- Your environment details (GNU-Octave or MATLAB version, operating system).
- Steps to reproduce the behavior, ideally with a minimal reproducible script.
- Any relevant error messages or screenshots.
If you have ideas to improve the solver—whether it's a new finite element formulation, a new integration method, or performance optimizations—please open an issue to discuss it before you start coding. This ensures your proposed changes align with the project's roadmap and current academic goals.
- Fork the repository and create your branch from
master. - Create a descriptive branch name (e.g.,
feature/new-element,bugfix/stiffness-matrix). - Make your changes following the coding guidelines.
- Ensure the test suite passes completely.
- Update documentation if your changes affect how users interact with the solver.
- Submit a Pull Request with a clear title and description of the changes you've made. Link any relevant issues.
To set up a local development environment for ONSAS:
- Clone your forked repository:
git clone [https://github.com/YOUR_USERNAME/ONSAS.git](https://github.com/YOUR_USERNAME/ONSAS.git) cd ONSAS - Ensure you have GNU-Octave or MATLAB installed on your system.
- (Optional but recommended) Install Paraview for visualizing output files and Gmsh if you are working on meshing components.
- Add the
srcfolder (and relevant subdirectories) to your MATLAB/Octave path.
Maintaining a consistent codebase is crucial for a project of this scale.
- Language Compatibility: The code must remain fully compatible with both GNU-Octave and MATLAB. Avoid using toolboxes or functions that are exclusive to only one of the environments.
- Formatting and Linting: The project uses
miss_hitfor code quality and style checking. Please ensure your code complies with the rules defined in themiss_hit.cfgfile located in the root directory. - Documentation: Document all new functions thoroughly. Include comments explaining the mathematical or structural formulations used, citing relevant literature when applicable.
- Variable Naming: Use descriptive names for variables and matrices (e.g.,
stiffnessMatrix,nodalDisplacements) to maintain readability.
ONSAS uses an automated testing suite to prevent regressions. Before submitting a pull request, you must ensure that all tests pass.
- Navigate to the
testdirectory within your Octave/MATLAB environment. - Run the master test script.
- If you are adding a new feature or fixing a bug, please add a corresponding test case to the
testdirectory to verify your changes. - Check that your changes do not break the continuous integration (CI) workflows defined in the
.github/workflowsdirectory.
Thank you for contributing to ONSAS and helping advance open-source structural analysis!