Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
4912857
bug-fixes for sensitivity analysis of stress evaluation. (#39)
manavbhatia Oct 10, 2019
d3e34d5
Bug-fix for restart of continuation solver (#44)
manavbhatia Nov 2, 2019
16ba918
Initial multi-libMesh version CI build.
jdeaton Nov 7, 2019
5d53276
Migrate before_install and install stages to scripts from .travis.yml.
jdeaton Nov 12, 2019
63dd108
Multi-libMesh build on OSX.
jdeaton Nov 12, 2019
acd9bf0
Separate CI docs build from code build for efficiency.
jdeaton Nov 15, 2019
c65b4b2
Added exit status to CI scripts, organized CI, added all cases.
jdeaton Nov 15, 2019
b47b366
Added README for the Travis CI build testing updates.
jdeaton Nov 15, 2019
c6f6a99
Setup both Debug and Release builds on Travis CI jobs.
jdeaton Nov 15, 2019
82f89e4
Remove Debug build from Travis CI for libMesh < v1.5.0 when using GCC.
jdeaton Nov 19, 2019
a40f601
Updates for compatibility with libMesh release v1.5.0.
jdeaton Nov 7, 2019
3ce18e5
Added support for reading in mesh from NastranBDF.
JohnDN90 Nov 21, 2019
a26b72a
Make NastranIO support optional in CMake build.
jdeaton Nov 22, 2019
28a836a
Check for pyNastran module dependency in CMake configure.
jdeaton Nov 22, 2019
9ce5ca9
Update CMake version on Travis CI Linux build.
jdeaton Nov 22, 2019
ea46295
Toggle on option for pyNastran build in CI scripts.
jdeaton Nov 22, 2019
92ffe34
Custom CMake module to find Python3.
jdeaton Nov 22, 2019
c8cb202
Configure Travis macOS to use Python with shared library.
jdeaton Nov 24, 2019
8a10c1f
Update CMake NastranIO support to find req'd Numpy header path.
jdeaton Nov 24, 2019
6bc3238
Travis CI Linux configuration for Python 3.6 & pyNastran.
jdeaton Nov 24, 2019
fb0d5cc
Added optional target to CMake build to run Cython.
jdeaton Nov 26, 2019
4201f2f
Merge pull request #49 from MASTmultiphysics/nastran_io-cmake
JohnDN90 Nov 26, 2019
5f6f833
Renamed Nastran mesh interface files to match existing MAST style.
jdeaton Nov 26, 2019
5791c93
Moved NastranIO into MAST namespace.
jdeaton Nov 26, 2019
1265e52
Update Travis CI integration to test build on multiple OS's/compilers…
jdeaton Dec 5, 2019
2f229ea
Update for compatibility with libMesh v1.5.0 (#48)
jdeaton Dec 5, 2019
6eb2e6a
Hotfix for CI deployment of documentation website.
jdeaton Dec 5, 2019
d6e13ec
Pull hot-fix from master into feature/nastran_io.
jdeaton Dec 12, 2019
65ecace
Refactored CI docs deployment so errors will be caught.
jdeaton Dec 12, 2019
a3eeed8
Added third party utility/source for tabular output to console.
jdeaton Dec 21, 2019
7144d51
Added capability to read nodal boundaries (SPC) domains from BDF.
jdeaton Dec 21, 2019
bf9bc43
NastranIO class refactoring and documentation updating.
jdeaton Dec 23, 2019
6702532
Removing doc/assets folder/files for conversion to submodule.
jdeaton Dec 27, 2019
36402d4
Git submodule setup for doc/assets.
jdeaton Dec 27, 2019
0baa695
Added example for structural modal analysis with NastranIO mesh input.
jdeaton Dec 27, 2019
94378b1
Fixed missing include for libmesh-v1.3.1 compatibility in struct ex 7.
jdeaton Jan 3, 2020
5b61795
fixed the indefinite mass matrix for beam element. Thanks to John Nei…
manavbhatia Jan 14, 2020
6930531
Re-organized external/contrib source.
jdeaton Jan 14, 2020
f99b98a
Merge pull request #50 from MASTmultiphysics/nastran_io
jdeaton Jan 14, 2020
cdfe27c
Fix documentation deployment error due to Travis-CI cache.
jdeaton Jan 15, 2020
e33b692
Merge pull request #56 from MASTmultiphysics/hotfix/ci-doc-deploy
jdeaton Jan 15, 2020
04f3389
Topology optimization with homogenized level set (#58)
manavbhatia Jan 30, 2020
b3ba8d7
Added catch2 header file for new unit tests using Catch2.
JohnDN90 Feb 5, 2020
34f5fce
Bug fixes and enhancements to CMake files.
JohnDN90 Feb 5, 2020
6ceabcf
Added option to CMake build to use libmesh_devel (development) version.
JohnDN90 Feb 5, 2020
86cd70e
Added catch2 tests for some MAST base functions.
JohnDN90 Feb 5, 2020
87403dd
Bug fixes for v2.0.1 (#65)
manavbhatia Feb 7, 2020
366d719
Moved catch header and normalized some CMake file formatting.
jdeaton Feb 7, 2020
976b85c
CI runs unit tests after building MAST library, examples, and tests.
jdeaton Feb 7, 2020
f08413e
Swapping Release/Debug build order in CI & a couple bug fixes.
jdeaton Feb 7, 2020
ff63f0f
Resolve feature/catch2-tests conflicts with 'master' for auto PR merge.
jdeaton Feb 7, 2020
76d931a
Add copyright and license statement to new unit test files.
jdeaton Feb 7, 2020
1af06ae
Merge pull request #60 from MASTmultiphysics/feature/catch2-tests
jdeaton Feb 7, 2020
ed35d91
Added PointLoad class for use with PointLoadCondition.
JohnDN90 Sep 26, 2019
5ac4064
Change PointLoad arguments to references & update structural example 1.
jdeaton Feb 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 1 addition & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,9 @@ build
# Files generated by CMake.
src/base/mast_config.h

# Files generated by Python example/documentation preprocessor.
doc/example_1.dox
doc/example_2.dox
doc/example_3.dox

# CLion IDE files.
.idea/
cmake-build-debug/
cmake-build*/
build2

# Visual Studio Code settings.
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "doc/assets"]
path = doc/assets
url = https://github.com/MASTmultiphysics/mast-assets.git
81 changes: 41 additions & 40 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,50 @@
language: cpp
dist: xenial

matrix:
include:
# macOS/Linux builds - libMesh version 1.5.0
- os: osx
osx_image: xcode10.2
env: LIBMESH_VERSION=1.5.0
- os: linux
dist: xenial
env: LIBMESH_VERSION=1.5.0

# Doxygen documentation build
# - this job also progresses to deployment when on master branch
- os: linux
dist: xenial
env: CI_BUILD_DOCS=true CI_DEPLOY_DOCS=true LIBMESH_VERSION=1.4.1

# macOS/Linux builds - libMesh version 1.4.1
- os: osx
osx_image: xcode10.2
env: LIBMESH_VERSION=1.4.1
- os: linux
dist: xenial
env: LIBMESH_VERSION=1.4.1

# macOS/Linux builds - libMesh version 1.3.1
- os: osx
osx_image: xcode10.2
env: LIBMESH_VERSION=1.3.1
- os: linux
dist: xenial
env: LIBMESH_VERSION=1.3.1

before_install:
- sudo apt-get -qq install -y gfortran wget m4
- sudo apt-get -qq install -y openmpi-bin libopenmpi-dev
- sudo apt-get -qq install -y libpetsc3.6 libpetsc3.6.2-dev
- sudo apt-get -qq install -y libslepc3.6 libslepc3.6.1-dev libparpack2-dev
- sudo apt-get -qq install -y libboost-all-dev
- sudo apt-get -qq install -y libeigen3-dev
- sudo apt-get -qq install -y doxygen graphviz rsync
- sudo apt-get -qq install -y texlive-latex-base dvi2ps ghostscript
- ci/build_dependencies.sh

install:
- cd ${HOME}
- wget -nv https://github.com/MASTmultiphysics/mast-ci-packages/releases/download/libmesh-1.3.1-1.deb/libmesh-1.3.1-1.deb
- sudo apt install ./libmesh-1.3.1-1.deb

before_script:
- export MAST_INSTALL_DIR=${HOME}/mast
- cd ${TRAVIS_BUILD_DIR}
- mkdir build
- cd build
- cmake ..
-DCMAKE_INSTALL_PREFIX=${MAST_INSTALL_DIR}
-DCMAKE_C_COMPILER=mpicc
-DCMAKE_CXX_COMPILER=mpic++
-DCMAKE_Fortran_COMPILER=mpifort
-DlibMesh_DIR=/usr/local
-DPETSc_DIR=/usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real
-DSLEPc_DIR=/usr/lib/slepcdir/3.6.1/x86_64-linux-gnu-real
-DEIGEN3_ROOT=/usr/include/eigen3
-DBOOST_ROOT=/usr
-DBUILD_DOC=ON
-DENABLE_DOT=OFF
-DENABLE_GCMMA=OFF
-DENABLE_SNOPT=OFF
- ci/get_libmesh.sh

script:
- make -j 2
- make -j 2 doc_doxygen
- cd ${TRAVIS_BUILD_DIR}
- ci/build_mast.sh

deploy:
provider: script
script: bash doc/deploy_docs.sh
skip_cleanup: true
on:
branch: master
provider: script
script: bash ci/deploy_docs.sh
skip_cleanup: true
on:
branch: master
condition: ${CI_DEPLOY_DOCS} = true
70 changes: 49 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# PREAMBLE
cmake_minimum_required(VERSION 3.2)
cmake_minimum_required(VERSION 3.13)
project(MAST
VERSION 0.3
LANGUAGES C CXX)
VERSION 2.0.1
LANGUAGES C CXX)

# PROJECT WIDE SETUP
# Get CMake modules and set language standards.
Expand All @@ -14,33 +14,34 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(GNUInstallDirs)

# Build options with defaults.
option(ENABLE_GCMMA "Build with GCMMA interface" OFF)
option(ENABLE_DOT "Build with DOT interface" OFF)
option(ENABLE_SNOPT "Build with SNOPT interface" OFF)
option(ENABLE_NLOPT "Build with NLOPT interface" OFF)
option(ENABLE_CYTHON "Build with CYTHON interface" OFF)
option(BUILD_DOC "Build documentation" OFF)

# Required dependency paths.
option(ENABLE_GCMMA "Build with GCMMA interface" OFF)
option(ENABLE_DOT "Build with DOT interface" OFF)
option(ENABLE_SNOPT "Build with SNOPT interface" OFF)
option(ENABLE_NLOPT "Build with NLOPT interface" OFF)
option(ENABLE_NASTRANIO "Build with support for reading Nastran meshes" OFF)
option(ENABLE_CYTHON "Build with support for Cython development" OFF)
option(BUILD_DOC "Build documentation" OFF)

# Dependency paths (optional) - these paths help CMake find dependencies.
set(MAST_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR})
set(libMesh_DIR "libMesh_DIR" CACHE PATH "Directory containing libMesh include/ and lib/")
set(PETSc_DIR "PETSc_DIR" CACHE PATH "Directory containing PETSc include/ and lib/")
set(PETSc_ARCH "PETSc_ARCH" CACHE STRING "Configuration/build of PETSc that should be used.")
set(SLEPc_DIR "SLEPc_DIR" CACHE PATH "Directory containing SLEPc include/ and lib/")
set(SLEPc_ARCH "SLEPc_ARCH" CACHE STRING "Configuration/build of SLEPc that should be used.")
set(EIGEN3_ROOT "Eigen_DIR" CACHE PATH "Directory containing eigen header files")
set(DOT_DIR "DOT_DIR" CACHE PATH "Directory containing DOT lib/")
set(SNOPT_DIR "SNOpt_DIR" CACHE PATH "Directory containing SNOPT lib/")
set(NLOPT_DIR "NLOpt_DIR" CACHE PATH "Directory containing NLOpt include/ and lib/")
set(DOT_DIR "DOT_DIR" CACHE PATH "Directory containing DOT lib/")
set(SNOPT_DIR "SNOpt_DIR" CACHE PATH "Directory containing SNOPT lib/")
set(NLOPT_DIR "NLOpt_DIR" CACHE PATH "Directory containing NLOpt include/ and lib/")

# EXTERNALLY PROVIDED CONTENT
# None. Use this if we pull something in during the build in the future.

# FIND DEPENDENCIES
find_package(MPI REQUIRED)
find_package(LAPACK REQUIRED)
message("-- Found BLAS libs: ${BLAS_LIBRARIES}")
message("-- Found LAPACK libs: ${LAPACK_LIBRARIES}")
message(STATUS "Found BLAS libs: ${BLAS_LIBRARIES}")
message(STATUS "Found LAPACK libs: ${LAPACK_LIBRARIES}")
find_package(PETSc REQUIRED)
find_package(SLEPc REQUIRED)
find_package(HDF5 REQUIRED)
Expand All @@ -52,8 +53,8 @@ find_package(Eigen3 REQUIRED)
# Boost CMake configuration in the FindBoost module for now.
set(Boost_NO_BOOST_CMAKE ON)
find_package(Boost COMPONENTS iostreams system filesystem unit_test_framework REQUIRED)
message("-- Found Boost include: ${Boost_INCLUDE_DIRS}") # To ensure the found Boost is what user expected
message("-- Found Boost libs: ${Boost_LIBRARY_DIRS}") # To ensure the found Boost is what user expected
message(STATUS "Found Boost include: ${Boost_INCLUDE_DIRS}") # To ensure the found Boost is what user expected
message(STATUS "Found Boost libs: ${Boost_LIBRARY_DIRS}") # To ensure the found Boost is what user expected

# Find optional packages.
if (ENABLE_GCMMA)
Expand Down Expand Up @@ -83,12 +84,37 @@ else()
set (MAST_ENABLE_NLOPT 0)
endif()

if (ENABLE_NASTRANIO)
find_package(Python3 REQUIRED)

# Make sure Python has pyNastran.
execute_process(COMMAND ${Python3_EXECUTABLE} -c "import pyNastran"
RESULT_VARIABLE PYNASTRAN_ERROR)
if(PYNASTRAN_ERROR)
message(FATAL_ERROR "Error finding pyNastran package for Python3_EXECUTABLE!")
else()
message(STATUS " pyNastran package found")
endif()

# Make sure Python has NumPy.
execute_process(COMMAND ${Python3_EXECUTABLE} -c "import numpy"
RESULT_VARIABLE NUMPY_ERROR)
if(NUMPY_ERROR)
message(FATAL_ERROR "Error finding pyNastran package for Python3_EXECUTABLE!")
else()
message(STATUS " Numpy package found")
endif()

endif()

# THIRD PARTY/CONTRIB
# - This directory contains files developed by third parties and are included in the
# MAST source for convenience.
add_subdirectory(contrib)

# MAIN TARGETS
add_subdirectory(src)

# EXAMPLES
add_subdirectory(examples)

# DOCUMENTATION
if(BUILD_DOC)
add_subdirectory(doc)
Expand All @@ -98,3 +124,5 @@ endif()
enable_testing()
add_subdirectory(tests)

# EXAMPLES
add_subdirectory(examples)
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
MAST: Multidisciplinary-design Adaptation and Sensitivity Toolkit
Copyright (C) 2013-2019 Manav Bhatia
Copyright (C) 2013-2020 Manav Bhatia and MAST authors

[![Build Status](https://travis-ci.com/MASTmultiphysics/mast-multiphysics.svg?branch=master)](https://travis-ci.com/MASTmultiphysics/mast-multiphysics)

This code was developed under funding from the Air Force Research Laboratory.
MAST was cleared for public release on 08 Nov 2016 with case number 88ABW-2016-5689.

Documentation for the code is available at [https://mastmultiphysics.github.io](https://mastmultiphysics.github.io).

## Submodules
To keep the size of this main MAST repository smaller, a git submodule is used
to store larger media/assets such as images and animations used for the documentation
in a separate repo (doc/assets). To build the documentation locally, you must update
the submodule. To do this, simply run the following commands from inside the root
level of this main repository:
```
git submodule init
git submodule update
```
48 changes: 48 additions & 0 deletions ci/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Travis CI Testing/Deployment

On the GitHub repository of MAST, Travis CI (https://travis-ci.com) is utilized for build testing on multiple OS's and
deployment of updated documentation online. In the future we will integrate the execution of both unit tests as well as
example problems for integration testing.

This directory contains scripts utilized by the Travis CI process.

## Travis CI Processes
When a commit is pushed to the MASTmultiphysics/mast-multiphysics GitHub repository, GitHub initiates the continuous
integration processes on Travis CI. What these processes do is controlled by the `.travis.yml` file in the root of the
repository. The different phases of a Travis CI are described at https://docs.travis-ci.com/user/job-lifecycle/. This
repository utilizes a relatively basic subset of the phases and overall capability of Travis CI.

The files in this directory are utilized in the main phases of the Travis CI lifecycle:

1. `before_install` - `build_dependencies.sh` - This script ensures that the Travis CI runner executing the current job
has the required dependencies for libMesh and building MAST.
2. `install` - `get_libmesh.sh` - This script fetches pre-built binaries of libMesh on Linux or the entire dependency
package on macOS. Travis CI jobs have a limited time for execution that is not long enough to build libMesh
(which is not available in job runners standard Linux/macOS package managers.)
3. `script` - `build_mast.sh` - Depending on the job, this script either builds the MAST library/examples or builds the
doxygen documentation.
4. `deploy` - `deploy_docs.sh` - For the job satisfying the appropriate conditions, this script pushes the documentation
website produced by doxygen to the hosting location.

## Multiple OS's/Jobs/Environments
The `matrix` section of the `.travis.yml` file allows for the definition of multiple jobs to be run that can be done
in different environments or on different workers. Each item under `matrix/include` causes the execution of different
Travis CI worker with the specified environment. In the current setup, we utilize both Linux and macOS to test builds
against different compilers as well as different versions of the libMesh dependency, which is periodically updated by
that projects maintainers. In this setup, Travis CI allows for the specification of system environment variables that
are utilized by the scripts in the `ci` folder for distinguishing work that is specific to each environment.

### Linux
The current Linux build environment utilizes Ubuntu 16.04. Dependencies available in the Ubuntu apt package repositories
are leveraged; however, in the future these may be updated as versions of PETSc/SLEPc are quite old. The current
compiler on Linux is GNU GCC-5.4.0. The libMesh dependencies are provided as external binaries that were built in an
identical environment and archived.

### macOS
The macOS build on Travis CI current utilizes macOS version 10.14.4 with the default clang C/C++ compiler (Apple LLVM
version 10.0.1). Travis CI suggests utilizing Homebrew to install dependencies, which currently does not contain many of
the packages required for libMesh/MAST. To overcome this, a complete set dependencies (including multiple versions of
libMesh) is built/archived using Spack on the same environment setup (macOS version/compiler) the Travis CI utilizes.
These dependencies are fetched by the Travis CI runner and MAST is built against them. Since macOS does not provide a
Fortran compiler, GCC-9.1.0 is first built via Spack. The compiler toolchain is then macOS-provided C/C++ and
gfortran-9.
55 changes: 55 additions & 0 deletions ci/build_dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/usr/bin/env bash

if [ "${TRAVIS_OS_NAME}" = linux ]; then # Ubuntu Linux

if [ "${TRAVIS_DIST}" = xenial ]; then # Ubuntu 16.04 Xenial Xerus
cd ${HOME} || exit

# Python 3.6 apt repository (since its not neatly included in Ubuntu 16.04)
sudo add-apt-repository -y ppa:deadsnakes/ppa

# Regular libMesh/MAST dependencies.
sudo apt-get -qq update
sudo apt-get -qq install -y gfortran wget m4
sudo apt-get -qq install -y openmpi-bin libopenmpi-dev
sudo apt-get -qq install -y libpetsc3.6 libpetsc3.6.2-dev
sudo apt-get -qq install -y libslepc3.6 libslepc3.6.1-dev libparpack2-dev
sudo apt-get -qq install -y libboost-all-dev
sudo apt-get -qq install -y libeigen3-dev
sudo apt-get -qq install -y doxygen graphviz rsync
sudo apt-get -qq install -y texlive-latex-base dvi2ps ghostscript
sudo apt-get -qq install -y python3.6 python3.6-dev libpython3.6

# Get pip working with external Python 3.6.
wget https://bootstrap.pypa.io/get-pip.py || exit
sudo python3.6 get-pip.py || exit

sudo python3.6 -m pip install numpy scipy docopt colorama pandas h5py matplotlib cpylog pyNastran
sudo python3.6 -m pip install Cython --install-option="--no-cython-compile"

# Update to later CMake release.
wget https://github.com/Kitware/CMake/releases/download/v3.15.5/cmake-3.15.5-Linux-x86_64.sh || exit
sudo mkdir /opt/cmake || exit
sudo sh cmake-3.15.5-Linux-x86_64.sh --prefix=/opt/cmake --skip-license || exit

# elif [ "${TRAVIS_DIST}" = bionic ]; then # Ubuntu 18.04 Bionic Beaver
# sudo apt-get -qq update
# sudo apt-get -qq install -y gfortran wget m4
# which gfortran
# gcc --version
# echo "Hello From BIONIC"

else
echo "INVALID LINUX DISTRO: ${TRAVIS_DIST}"
exit 1
fi

elif [ "${TRAVIS_OS_NAME}" = osx ]; then # macOS 10.14, XCode 10.2
# Currently we don't do anything here since we get all dependencies for macOS
# from the binary download with "ci/get_libmesh.sh" in the next stage.
echo "Hello From OSX"

else
echo "INVALID OS: ${TRAVIS_OS_NAME}"
exit 1
fi
Loading