Skip to content

Commit

Permalink
Merge pull request #280 from prisms-center/development
Browse files Browse the repository at this point in the history
2.4 Release
  • Loading branch information
landinjm authored Oct 31, 2024
2 parents 01ebc57 + 447778c commit 2de053b
Show file tree
Hide file tree
Showing 550 changed files with 17,689 additions and 35,698 deletions.
12 changes: 12 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Setting file for clang-tidy

Checks: >
-*,
boost-*,
modernize-*,
-modernize-avoid-c-arrays,
-modernize-use-trailing-return-type,
mpi-*,
performance-*
WarningsAsErrors: '*'
33 changes: 33 additions & 0 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Clang-Format Check

on:
push:
branches:
- master
pull_request:
branches:
- master
- development

concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request'}}

permissions:
contents: read

jobs:
clang-format-check:

runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 30

- name: Run Clang-Format
uses: jidicula/[email protected]
with:
clang-format-version: '16'
52 changes: 52 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI-Linux

on:
push:
branches:
- master
pull_request:
branches:
- master
- development
types:
- opened
- reopened
- synchronize
- ready_for_review
paths-ignore:
- 'applications/**'

concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request'}}

permissions:
contents: read

jobs:
CI-Linux:
runs-on: [ubuntu-22.04]
timeout-minutes: 120

container:
image: dealii/dealii:v9.6.0-jammy
options: --user root

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Compile PRISMS-PF
run: |
cmake .
make -j $(nproc)
- name: Run PRISMS-PF tests
timeout-minutes: 60
run: |
export OMPI_ALLOW_RUN_AS_ROOT=1
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
cd tests/automatic_tests
python3 run_automatic_tests.py
20 changes: 19 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# Build folder
build/*

# VS Code
.vscode/*

# Python virtual environments
.venv/*
*.venv/

# clangd
.clangd

# misc
compile_commands.json

# Compiled Object files
*.slo
*.lo
Expand All @@ -19,6 +35,7 @@
*.exe
*.out
*.app
*.pbs

#Output files
*vtk
Expand Down Expand Up @@ -82,10 +99,11 @@ DoxygenWarningLog.txt
freeEnergy.txt
output.txt

restart*
# Output files
integratedFields.txt

# Checkpoint/restart files
restart*
restart.mesh
restart.mesh.info
restart.mesh.info.old
Expand Down
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

54 changes: 21 additions & 33 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
# CMake script for the PRISMS-PF applications:
##

CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)

# Find deal.II installation
FIND_PACKAGE(deal.II 8.3.0 REQUIRED
find_package(deal.II 9.2.0 QUIET REQUIRED
HINTS ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR})

DEAL_II_INITIALIZE_CACHED_VARIABLES()

# Set up the debug, release, and run targets
Expand All @@ -25,38 +24,30 @@ ADD_CUSTOM_TARGET(release

ADD_CUSTOM_TARGET(run COMMAND main
COMMENT "Run with ${CMAKE_BUILD_TYPE} configuration"
)
)


# Set up the paths to the library files
INCLUDE_DIRECTORIES(include)

FILE(GLOB headers include/*.h)
FILE(GLOB matrixfree_sources src/matrixfree/*.cc)

FILE(GLOB userinputparameters_sources src/userInputParameters/*.cc)

FILE(GLOB solverparameters_sources src/SolverParameters/*.cc)

FILE(GLOB equationdependencyparser_sources src/EquationDependencyParser/*.cc)

FILE(GLOB floodfiller_sources src/FloodFiller/*.cc)

FILE(GLOB orderparameterremapper_sources src/OrderParameterRemapper/*.cc)

FILE(GLOB simplifiedgrainrepresentation_sources src/SimplifiedGrainRepresentation/*.cc)


include_directories(include)

file(GLOB headers include/*.h)
file(GLOB matrixfree_sources src/matrixfree/*.cc)
file(GLOB userinputparameters_sources src/userInputParameters/*.cc)
file(GLOB solverparameters_sources src/SolverParameters/*.cc)
file(GLOB equationdependencyparser_sources src/EquationDependencyParser/*.cc)
file(GLOB floodfiller_sources src/FloodFiller/*.cc)
file(GLOB orderparameterremapper_sources src/OrderParameterRemapper/*.cc)
file(GLOB simplifiedgrainrepresentation_sources src/SimplifiedGrainRepresentation/*.cc)

# Add main project
PROJECT(prisms_pf)
SET(CMAKE_BUILD_TYPE Release)
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# Append extra flags for the GNU compiler to suppress some warnings
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
#set(DEAL_II_CXX_FLAGS_DEBUG "${DEAL_II_CXX_FLAGS_DEBUG} -Wno-maybe-uninitialized -Wno-unused-parameter -Wno-extra")
#set(DEAL_II_CXX_FLAGS_RELEASE "${DEAL_II_CXX_FLAGS_RELEASE} -Wno-maybe-uninitialized -Wno-unused-parameter -Wno-extra")
set(DEAL_II_CXX_FLAGS_DEBUG "${DEAL_II_CXX_FLAGS_DEBUG} -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comment -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable")
set(DEAL_II_CXX_FLAGS_RELEASE "${DEAL_II_CXX_FLAGS_RELEASE} -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comment -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable")
#set(CMAKE_CXX_FLAGS "-Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comment -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable")
set(DEAL_II_CXX_FLAGS_DEBUG "${DEAL_II_CXX_FLAGS_DEBUG} -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comment -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable")
set(DEAL_II_CXX_FLAGS_RELEASE "${DEAL_II_CXX_FLAGS_RELEASE} -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comment -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable")
endif()

ADD_LIBRARY(${PROJECT_NAME} ${matrixfree_sources} ${userinputparameters_sources} ${solverparameters_sources} ${equationdependencyparser_sources} ${floodfiller_sources} ${orderparameterremapper_sources} ${simplifiedgrainrepresentation_sources} src/utilities/sortIndexEntryPairList.cc src/variableAttributeLoader/variableAttributeLoader.cc src/utilities/vectorBCFunction.cc src/inputFileReader/inputFileReader.cc src/parallelNucleationList/parallelNucleationList.cc src/variableContainer/variableContainer.cc)
Expand All @@ -67,11 +58,8 @@ SET(CMAKE_BUILD_TYPE Debug)

# Append extra flags for the GNU compiler to suppress some warnings
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
#set(DEAL_II_CXX_FLAGS_DEBUG "${DEAL_II_CXX_FLAGS_DEBUG} -Wno-maybe-uninitialized -Wno-unused-parameter -Wno-extra")
#set(DEAL_II_CXX_FLAGS_RELEASE "${DEAL_II_CXX_FLAGS_RELEASE} -Wno-maybe-uninitialized -Wno-unused-parameter -Wno-extra")
set(DEAL_II_CXX_FLAGS_DEBUG "${DEAL_II_CXX_FLAGS_DEBUG} -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comment -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable")
set(DEAL_II_CXX_FLAGS_RELEASE "${DEAL_II_CXX_FLAGS_RELEASE} -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comment -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable")
#set(CMAKE_CXX_FLAGS "-Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comment -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable")
set(DEAL_II_CXX_FLAGS_DEBUG "${DEAL_II_CXX_FLAGS_DEBUG} -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comment -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable")
set(DEAL_II_CXX_FLAGS_RELEASE "${DEAL_II_CXX_FLAGS_RELEASE} -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comment -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable")
endif()

ADD_LIBRARY(${PROJECT_NAME} ${matrixfree_sources} ${userinputparameters_sources} ${solverparameters_sources} ${equationdependencyparser_sources} ${floodfiller_sources} ${orderparameterremapper_sources} ${simplifiedgrainrepresentation_sources} src/utilities/sortIndexEntryPairList.cc src/variableAttributeLoader/variableAttributeLoader.cc src/utilities/vectorBCFunction.cc src/inputFileReader/inputFileReader.cc src/parallelNucleationList/parallelNucleationList.cc src/variableContainer/variableContainer.cc)
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
![](logo_v2.png)

[![Build Status](https://travis-ci.org/prisms-center/phaseField.svg?branch=master)](https://travis-ci.org/prisms-center/phaseField)
[![GitHub Linux](https://github.com/prisms-center/phaseField/actions/workflows/linux.yml/badge.svg)](https://github.com/prisms-center/phaseField/actions/workflows/linux.yml)
[![Clang-Format](https://github.com/prisms-center/phaseField/actions/workflows/clang-format.yml/badge.svg)](https://github.com/prisms-center/phaseField/actions/workflows/clang-format.yml)


[![License: LGPL v2.1](https://img.shields.io/badge/License-lgpl-blue.svg)](https://www.gnu.org/licenses/lgpl-2.1)
[![DOI](https://zenodo.org/badge/22602327.svg)](https://zenodo.org/badge/latestdoi/22602327)

Expand Down
75 changes: 31 additions & 44 deletions applications/CHAC_anisotropy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,80 +2,67 @@
# CMake script for the PRISMS-PF applications:
##

CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.1.0)
project(myapp)

# Find deal.II installation
FIND_PACKAGE(deal.II 9.2.0 REQUIRED
find_package(deal.II 9.2.0 QUIET REQUIRED
HINTS ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR})

# Check to make sure deal.II is configured with p4est
IF(NOT ${DEAL_II_WITH_P4EST})
MESSAGE(FATAL_ERROR "\n"
"*** deal.II was not installed with p4est. ***\n\n"
“The p4est library is a mandatory prerequisite for PRISMS-PF. Please consult the \n”
“user guide to confirm that deal.II and p4est were installed and configured correctly.”
)
ENDIF()
if(NOT ${DEAL_II_WITH_P4EST})
message(FATAL_ERROR "deal.II must be installed with p4est.")
endif()

DEAL_II_INITIALIZE_CACHED_VARIABLES()

# Set default build type
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Build type" FORCE)
endif()

# Set up the debug, release, and run targets
ADD_CUSTOM_TARGET(debug
add_custom_target(debug
COMMAND +env ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug ${CMAKE_SOURCE_DIR}
COMMAND +env ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target all
COMMENT "Switch CMAKE_BUILD_TYPE to Debug"
)

ADD_CUSTOM_TARGET(release
add_custom_target(release
COMMAND +env ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Release ${CMAKE_SOURCE_DIR}
COMMAND +env ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target all
COMMENT "Switch CMAKE_BUILD_TYPE to Release"
)

ADD_CUSTOM_TARGET(run COMMAND main
add_custom_target(run COMMAND main
COMMENT "Run with ${CMAKE_BUILD_TYPE} configuration"
)

PROJECT(myapp)
if (${CMAKE_BUILD_TYPE} MATCHES DebugRelease)
SET(CMAKE_BUILD_TYPE Debug)
endif()

# Check if postprocess.cc and nucleation.cc exist and set preprocessor variables
if (EXISTS "postprocess.cc")
# Add postprocess.cc and nucleation.cc if they exist
if(EXISTS "postprocess.cc")
add_definitions(-DPOSTPROCESS_FILE_EXISTS)
endif()
if (EXISTS "nucleation.cc")
if(EXISTS "nucleation.cc")
add_definitions(-DNUCLEATION_FILE_EXISTS)
endif()

# Append extra flags for the GNU compiler to suppress some warnings
#if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
#set(DEAL_II_CXX_FLAGS_DEBUG "${DEAL_II_CXX_FLAGS_DEBUG} -Wno-maybe-uninitialized -Wno-unused-parameter -Wno-extra")
set(DEAL_II_CXX_FLAGS_RELEASE "${DEAL_II_CXX_FLAGS_RELEASE} -Wno-uninitialized -Wno-unused-parameter -Wno-extra")
#set(DEAL_II_CXX_FLAGS_DEBUG "${DEAL_II_CXX_FLAGS_DEBUG} -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comment -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable")
#set(DEAL_II_CXX_FLAGS_RELEASE "${DEAL_II_CXX_FLAGS_RELEASE} -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comment -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable")
#endif()

ADD_EXECUTABLE(main main.cc )
# Set location of files
include_directories(${CMAKE_SOURCE_DIR}/../../include)
include_directories(${CMAKE_SOURCE_DIR}/../../src)
include_directories(${CMAKE_SOURCE_DIR})

DEAL_II_SETUP_TARGET(main)
# Set the location of the main.cc file
set(MAIN "${CMAKE_SOURCE_DIR}/../main.cc")

set(cmd "cmake")
set(arg "CMakeLists.txt")
set(dir ${PROJECT_SOURCE_DIR}/../..)
EXECUTE_PROCESS(COMMAND ${cmd} ${arg}
WORKING_DIRECTORY ${dir})
# Add main.cc for executable target
add_executable(main ${MAIN})

set(cmd "make")

EXECUTE_PROCESS(COMMAND ${cmd}
WORKING_DIRECTORY ${dir})
# deal.II linker
DEAL_II_SETUP_TARGET(main)

# Link libraries for the build type
if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
TARGET_LINK_LIBRARIES(main ${CMAKE_SOURCE_DIR}/../../libprisms_pf.a)
target_link_libraries(main ${CMAKE_SOURCE_DIR}/../../libprisms_pf.a)
elseif(${CMAKE_BUILD_TYPE} STREQUAL "DebugRelease")
TARGET_LINK_LIBRARIES(main ${CMAKE_SOURCE_DIR}/../../libprisms_pf.a)
target_link_libraries(main ${CMAKE_SOURCE_DIR}/../../libprisms_pf.a)
else()
TARGET_LINK_LIBRARIES(main ${CMAKE_SOURCE_DIR}/../../libprisms_pf_debug.a)
target_link_libraries(main ${CMAKE_SOURCE_DIR}/../../libprisms_pf_debug.a)
endif()
Loading

0 comments on commit 2de053b

Please sign in to comment.