diff --git a/.conda/fierro/cpu/build.sh b/.conda/fierro/cpu/build.sh index 58a902ee3..4e6db1c0b 100755 --- a/.conda/fierro/cpu/build.sh +++ b/.conda/fierro/cpu/build.sh @@ -21,4 +21,4 @@ cmake .. \ -D MPI_CXX_COMPILER="$BUILD_PREFIX/bin/mpicxx" \ -D VECTOR_ARCH_FLAGS="$VECTOR_ARCH_FLAGS" \ -make -j 10 install \ No newline at end of file +make -j 10 install diff --git a/.etc/conda_build_environment.yaml b/.etc/conda_build_environment.yaml index a4bf88c4c..3db6dbf36 100644 --- a/.etc/conda_build_environment.yaml +++ b/.etc/conda_build_environment.yaml @@ -7,3 +7,4 @@ dependencies: - boa # For building - conda-build - anaconda-client # For uploading + - python=3.8 diff --git a/.github/workflows/build-conda-package.yaml b/.github/workflows/build-conda-package.yaml index 84f6b2174..161f8c7bd 100644 --- a/.github/workflows/build-conda-package.yaml +++ b/.github/workflows/build-conda-package.yaml @@ -53,7 +53,7 @@ jobs: # conda-${{ runner.os }}--${{ runner.arch }}--${{ steps.get-date.outputs.today }}-${{ hashFiles('.etc/conda_build_environment.yaml') }}-${{ env.CACHE_NUMBER }} # env: # CACHE_NUMBER: 1 - # id: cache + # id: cached - name: Update environment run: diff --git a/.github/workflows/fierro-test-no-implicit.yml b/.github/workflows/fierro-test-no-implicit.yml new file mode 100644 index 000000000..b829b5e06 --- /dev/null +++ b/.github/workflows/fierro-test-no-implicit.yml @@ -0,0 +1,86 @@ +name: Fierro Test (No Implicit) + +# Workflow runs on following successful conda distribution +on: + workflow_run: + workflows: [Publish Test, Publish All, Publish Elements, Publish EVPFFT-CPU, Publish EVPFFT-dev, Publish EVPFFT-GPU, Publish FIERRO GUI, Publish Fierro-CPU, Publish Fierro-dev, Publish Heffte, Publish Heffte CUDA, Publish Trilinos-CPU] + types: + - completed + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: print trigger event + run: | + echo "::workflow triggering event name is::" ${{ github.event_name }} + - name: update the package list + run: + sudo apt-get update + shell: bash + - name: Install build tools + run: + sudo apt-get install build-essential + shell: bash + - name: Install LaPack + run: + sudo apt-get install libblas-dev liblapack-dev + shell: bash + - name: Install MPI + run: | + sudo apt-get install libopenmpi-dev openmpi-bin + echo "MPI_OPTS=--oversubscribe" >> $GITHUB_ENV + - name: Install cmake + run: + sudo apt-get -y install cmake + shell: bash + - name: Install python + run: + sudo apt-get install python3.6 + shell: bash + + - name: Set up Miniconda + uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + python-version: 3.8 + + - name: Create conda environment + run: conda env create -f ./.etc/conda_build_environment.yaml + + - name: Initialize conda + run: conda init bash + + - name: Activate conda environment, install Fierro anaconda packages + run: | + source ~/.bashrc + conda activate build-env + conda install --solver=classic conda-forge::conda-libmamba-solver conda-forge::libmamba conda-forge::libmambapy conda-forge::libarchive + conda install -c conda-forge -c fierromechanics fierro-cpu + conda install -c conda-forge -c fierromechanics evpfft + conda install -c conda-forge -c fierromechanics fierro_gui + + - name: Verify package dependencies + run: | + conda info --envs + conda list + + - name: Test fierro-parallel-explicit + run: | + source ~/.bashrc + conda activate build-env + fierro-parallel-explicit ./src/Parallel-Solvers/Parallel-Explicit/Example_Yaml_Scripts/example_simple.yaml + shell: bash + + - name: Test fierro-mesh-builder + run: | + source ~/.bashrc + conda activate build-env + fierro-mesh-builder ./src/Mesh-Builder/examples/mesh_Box_16_p3.yaml + shell: bash + + diff --git a/.github/workflows/fierro-test.yml b/.github/workflows/fierro-test.yml new file mode 100644 index 000000000..55da1845e --- /dev/null +++ b/.github/workflows/fierro-test.yml @@ -0,0 +1,106 @@ +name: Fierro Test + +# Workflow runs on following successful conda distribution +on: + workflow_run: + workflows: [Publish Test, Publish All, Publish Elements, Publish EVPFFT-CPU, Publish EVPFFT-dev, Publish EVPFFT-GPU, Publish FIERRO GUI, Publish Fierro-CPU, Publish Fierro-dev, Publish Heffte, Publish Heffte CUDA, Publish Trilinos-CPU] + types: + - completed + workflow_dispatch: + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: update the package list + run: + sudo apt-get update + shell: bash + - name: Install build tools + run: + sudo apt-get install build-essential + shell: bash + - name: Install LaPack + run: + sudo apt-get install libblas-dev liblapack-dev + shell: bash + - name: Install MPI + run: | + sudo apt-get install libopenmpi-dev openmpi-bin + echo "MPI_OPTS=--oversubscribe" >> $GITHUB_ENV + - name: Install cmake + run: + sudo apt-get -y install cmake + shell: bash + - name: Install python + run: + sudo apt-get install python3.6 + shell: bash + - name: Install dos2unix + run: + sudo apt-get install dos2unix + shell: bash + + - name: Set up Miniconda + uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + python-version: 3.8 + + - name: Create conda environment + run: conda env create -f ./.etc/conda_build_environment.yaml + + - name: Initialize conda + run: conda init bash + + - name: Activate conda environment, install Fierro anaconda packages + run: | + source ~/.bashrc + conda activate build-env + conda install --solver=classic conda-forge::conda-libmamba-solver conda-forge::libmamba conda-forge::libmambapy conda-forge::libarchive + conda install -c conda-forge -c fierromechanics fierro-cpu + conda install -c conda-forge -c fierromechanics evpfft + conda install -c conda-forge -c fierromechanics fierro_gui + + - name: Verify package dependencies + run: | + conda info --envs + conda list + + - name: Test fierro-parallel-explicit + run: | + source ~/.bashrc + conda activate build-env + export OMP_PROC_BIND=spread + export OMP_NUM_THREADS=1 + export OMP_PLACES=threads + mpirun -np 1 --bind-to core fierro-parallel-explicit ./src/Parallel-Solvers/Parallel-Explicit/Example_Yaml_Scripts/example_simple.yaml + shell: bash + + - name: Test fierro-mesh-builder + run: | + source ~/.bashrc + conda activate build-env + fierro-mesh-builder ./src/Mesh-Builder/examples/mesh_Box_16_p3.yaml + shell: bash + + - name: Test fierro-parallel-implicit + run: | + source ~/.bashrc + conda activate build-env + dos2unix ./Example_Yaml_Scripts/example_implicit_basic.yaml + export OMP_PROC_BIND=spread + export OMP_NUM_THREADS=1 + export OMP_PLACES=threads + mpirun -np 1 --bind-to core fierro-parallel-implicit ./Example_Yaml_Scripts/example_implicit_basic.yaml + working-directory: ./src/Parallel-Solvers/Implicit-Lagrange + shell: bash + + + + diff --git a/.github/workflows/publish-all.yml b/.github/workflows/publish-all.yml new file mode 100644 index 000000000..dc98e0e29 --- /dev/null +++ b/.github/workflows/publish-all.yml @@ -0,0 +1,37 @@ +name: Publish All + +on: workflow_dispatch + +jobs: + elements: + uses: ./.github/workflows/publish-elements.yml + + evpfft-cpu: + uses: ./.github/workflows/publish-evpfft-cpu.yml + + evpfft-dev: + uses: ./.github/workflows/publish-evpfft-dev.yml + + evpfft-gui: + uses: ./.github/workflows/publish-evpfft-gui.yml + + fierro-cpu: + uses: ./.github/workflows/publish-fierro-cpu.yml + + fierro-dev: + uses: ./.github/workflows/publish-fierro-dev.yml + + fierro-gui: + uses: ./.github/workflows/publish-fierro-gui.yml + + heffte-cpu: + uses: ./.github/workflows/publish-heffte-cpu.yml + + heffte-cuda: + uses: ./.github/workflows/publish-heffte-cuda.yml + + trilinos: + uses: ./.github/workflows/publish-trillinos.yml + + voxelizer: + uses: ./.github/workflows/publish-voxelizer.yml diff --git a/.github/workflows/publish-fierro-cpu.yaml b/.github/workflows/publish-fierro-cpu.yaml index 561447e42..a3aeff01b 100644 --- a/.github/workflows/publish-fierro-cpu.yaml +++ b/.github/workflows/publish-fierro-cpu.yaml @@ -13,3 +13,6 @@ jobs: with: recipe_dir: .conda/fierro/cpu secrets: inherit + + + diff --git a/.github/workflows/publish-test.yml b/.github/workflows/publish-test.yml new file mode 100644 index 000000000..8b5561645 --- /dev/null +++ b/.github/workflows/publish-test.yml @@ -0,0 +1,19 @@ +name: Publish Test +on: + workflow_dispatch + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: update the package list + run: + sudo apt-get update + shell: bash + + diff --git a/src/Parallel-Solvers/Implicit-Lagrange/Example_Yaml_Scripts/example_implicit_basic.yaml b/src/Parallel-Solvers/Implicit-Lagrange/Example_Yaml_Scripts/example_implicit_basic.yaml new file mode 100644 index 000000000..6093d542f --- /dev/null +++ b/src/Parallel-Solvers/Implicit-Lagrange/Example_Yaml_Scripts/example_implicit_basic.yaml @@ -0,0 +1,99 @@ +# input file +num_dims: 3 + +mesh_generation_options: + type: Box + origin: [0, 0, 0] + length: [10, 10, 100] + num_elems: [5, 5, 50] + +materials: + - id: 0 + elastic_modulus: 200000000000 + poisson_ratio: 0.3 + density: 7850 + thermal_conductivity: 10 + specific_internal_energy_rate: 1.0 + initial_temperature: 293 + +fea_module_parameters: + - type: Inertial + material_id: 0 + inertia_center_x: 0 + inertia_center_y: 0 + inertia_center_z: 0 + + - type: Elasticity + material_id: 0 + # Dirichlet conditions + boundary_conditions: + - surface: + type: z_plane + plane_position: 0.0 + type: displacement + value: 0.0 + + # Loading/Neumann Conditions + loading_conditions: + - surface: + type: z_plane + plane_position: 100.0 + type: surface_traction + component_x: 500 + component_y: 0 + component_z: 0 + + - type: Heat_Conduction + material_id: 0 + # Dirichlet conditions + boundary_conditions: + - surface: + type: z_plane + plane_position: 0.0 + type: temperature + value: 293.0 + + # Loading/Neumann Conditions + loading_conditions: + - surface: + type: z_plane + plane_position: 100.0 + type: surface_heat_flux + #can be normal (q dot n) or coordinated (vector q) for curved surfaces + specification: normal + flux_value: -0.1 + +optimization_options: + optimization_process: topology_optimization + method_of_moving_asymptotes: false + density_epsilon: 0.001 + simp_penalty_power: 3 + rol_params: + subproblem_algorithm: trust_region + initial_constraint_penalty: 1.e1 + step_tolerance: 1.e-5 + gradient_tolerance: 1.e-5 + constraint_tolerance: 1.e-5 + iteration_limit: 5 + optimization_objective: multi_objective + #Weight coefficients should add up to 1 + multi_objective_structure: linear + multi_objective_modules: + - type: minimize_thermal_resistance + weight_coefficient: 0.25 + - type: minimize_compliance + weight_coefficient: 0.75 + + constraints: + - type: mass + relation: equality + value: 0.25 + - type: moment_of_inertia + relation: equality + component: yy + value: 0.35 + - type: moment_of_inertia + relation: equality + component: xy + value: 0.0 +