Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • nektar/nektar
  • dmoxey/nektar
  • meshing/nektar
  • gm2511/nektar
  • mvymaza1/nektar
  • ssherw/nektar
  • hongfu2233/nektar
  • lackhove/nektar
  • zbhui/nektar
  • hectordo/nektar
  • kayarre/nektar
  • li12242/nektar
  • Russ/nektar
  • MMFSolver/nektar
  • JDocampo/nektar
  • jkr/nektar
  • Xulia/nektar
  • dperry/nektar
  • dav/nektar
  • bing/nektar
  • mt4313/nektar
  • Dappur/nektar
  • castigli/nektar
  • ARSanderson/nektar
  • tz722/nektar
  • tim48/nektar
  • hl2323/nektar-phys-deriv
  • fei/nektar
  • Leileiji/nektar
  • tsb121/nektar-fyp-thilak
  • victorballester7/nektar
  • mb321/nektar-cu-blas-mika
32 results
Show changes
Commits on Source (11098)
Showing
with 4691 additions and 218 deletions
BasedOnStyle: LLVM
AlignAfterOpenBracket: true
AlignConsecutiveAssignments: true
IndentWidth: 4
AlwaysBreakAfterDefinitionReturnType: None
PenaltyReturnTypeOnItsOwnLine: 9999999
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
AllowShortBlocksOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortCaseLabelsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
IndentCaseLabels: true
Standard: c++17
AccessModifierOffset: -4
BinPackParameters: true
NamespaceIndentation: None
Checks: "-*,\
readability-braces-around-statements,\
modernize-concat-nested-namespaces,\
modernize-raw-string-literal,\
modernize-use-nullptr,\
modernize-use-override"
# Exclude the usual build environment stuff.
.clang-format
.git
.gitignore
.gitlab-ci.yml
ThirdParty
build
builds
.DS_Store
# Make sure Dockerfiles aren't included in build context to
# improve caching.
docker/nektar/Dockerfile
docker/nektar-dev/Dockerfile
docker/nektar-workbook/Dockerfile
docker/nektar-env/Dockerfile
# Files to ignore for export
.gitlab-ci.yml export-ignore
.gitlab-ci/ export-ignore
.gitignore export-ignore
.gitattributes export-ignore
.gitmodules export-ignore
/docs/tutorial export-ignore
/library/Demos/MultiRegions/ExtraDemos/ export-ignore
/solvers/ImageWarpingSolver/ export-ignore
/solvers/VortexWaveInteraction/ export-ignore
/solvers/CardiacEPSolver/Utilities/CellMLToNektar/ export-ignore
/solvers/IncNavierStokesSolver/Utilities/HybridPerformanceModel/ export-ignore
/utilities/Extras/ export-ignore
# Attempt union merges with CHANGELOG to avoid conflicts.
CHANGELOG.md merge=union
.*
!.gitignore
!.gitlab-ci.yml
!.gitattributes
!.clang-format
!.clang-tidy
!.dockerignore
!.gitlab-ci
# Ignore builds and ThirdParty directories
build
buildDebug
builds
ThirdParty
# Ignore .DS_Store sometimes created by OS X.
.DS_Store
# for the userguide
*.pdf
# Kdevelop project files
*.kdev4
# Sublime project files
*.sublime-project
*.sublime-workspace
# CLion build directories
cmake-build-*
# Any python cache directories
__pycache__
This diff is collapsed.
FROM %%BASE_IMAGE%%
ADD --chown=nektar:nektar . /home/nektar/nektar
#!/bin/bash -x
declare -a CMAKEARGS
[[ $OS_VERSION != "macos" ]] && ccache -s && ccache -M 5G
echo "Running build with:"
echo " - BUILD_CC : $BUILD_CC"
echo " - BUILD_CXX : $BUILD_CXX"
echo " - BUILD_FC : $BUILD_FC"
echo " - BUILD_TYPE : $BUILD_TYPE"
echo " - BUILD_SIMD : $BUILD_SIMD"
echo " - DISABLE_MCA : $DISABLE_MCA"
echo " - EXPORT_COMPILE_COMMANDS : $EXPORT_COMPILE_COMMANDS"
echo " - NUM_CPUS : $NUM_CPUS"
echo " - OS_VERSION : $OS_VERSION"
echo " - PYTHON_EXECUTABLE : $PYTHON_EXECUTABLE"
if [[ $BUILD_TYPE == "default" ]]; then
CMAKEARGS=(..
"-DCMAKE_BUILD_TYPE=Release"
"-DNEKTAR_TEST_ALL=ON"
"-DNEKTAR_ERROR_ON_WARNINGS=OFF"
)
elif [[ $BUILD_TYPE == "full" ]]; then
CMAKEARGS=(..
"-DCMAKE_BUILD_TYPE:STRING=Debug"
"-DNEKTAR_FULL_DEBUG:BOOL=ON"
"-DNEKTAR_TEST_ALL:BOOL=ON"
"-DNEKTAR_USE_ARPACK:BOOL=ON"
"-DNEKTAR_USE_FFTW:BOOL=ON"
"-DNEKTAR_USE_MPI:BOOL=ON"
"-DNEKTAR_USE_SCOTCH:BOOL=ON"
"-DNEKTAR_USE_PETSC:BOOL=ON"
"-DNEKTAR_USE_HDF5:BOOL=ON"
"-DNEKTAR_USE_METIS:BOOL=ON"
"-DNEKTAR_USE_MESHGEN:BOOL=ON"
"-DNEKTAR_USE_CCM:BOOL=ON"
"-DNEKTAR_USE_CGNS:BOOL=ON"
"-DNEKTAR_CCMIO_URL=https://www.nektar.info/ccmio/libccmio-2.6.1.tar.gz"
"-DNEKTAR_USE_CWIPI:BOOL=ON"
"-DNEKTAR_USE_VTK:BOOL=ON"
"-DNEKTAR_USE_LST:BOOL=ON"
"-DNEKTAR_BUILD_PYTHON:BOOL=ON"
"-DNEKTAR_TEST_USE_HOSTFILE=ON"
"-DNEKTAR_UTILITY_EXTRAS=ON"
"-DNEKTAR_ERROR_ON_WARNINGS=OFF"
)
if [[ $BUILD_SIMD == "avx2" ]]; then
CMAKEARGS+=("-DNEKTAR_ENABLE_SIMD_AVX2:BOOL=ON")
elif [[ $BUILD_SIMD == "avx512" ]]; then
CMAKEARGS+=("-DNEKTAR_ENABLE_SIMD_AVX512:BOOL=ON")
fi
elif [[ $BUILD_TYPE == "performance" ]]; then
CMAKEARGS=(..
"-DCMAKE_BUILD_TYPE=Release"
"-DNEKTAR_BUILD_TESTS=OFF"
"-DNEKTAR_BUILD_UNIT_TESTS=OFF"
"-DNEKTAR_BUILD_PERFORMANCE_TESTS=ON"
"-DNEKTAR_ERROR_ON_WARNINGS=OFF"
)
fi
if [[ $DO_COVERAGE != "" ]]; then
CMAKEARGS+=("-DCMAKE_CXX_FLAGS=-fprofile-arcs -ftest-coverage")
pip3 install --user fastcov lxml
fi
if [[ $BUILD_TYPE != "performance" ]]; then
TEST_JOBS="$NUM_CPUS"
else
TEST_JOBS="1"
fi
if [[ $EXPORT_COMPILE_COMMANDS != "" ]]; then
CMAKEARGS+=("-DCMAKE_EXPORT_COMPILE_COMMANDS=ON")
fi
# Custom compiler
if [[ $BUILD_CC != "" ]]; then
CMAKEARGS+=("-DCMAKE_C_COMPILER=${BUILD_CC}")
fi
if [[ $BUILD_CXX != "" ]]; then
CMAKEARGS+=("-DCMAKE_CXX_COMPILER=${BUILD_CXX}")
fi
if [[ $BUILD_FC != "" ]]; then
CMAKEARGS+=("-DCMAKE_Fortran_COMPILER=${BUILD_FC}")
fi
# Custom Python executable
if [[ $PYTHON_EXECUTABLE != "" ]]; then
CMAKEARGS+=("-DPython_EXECUTABLE=${PYTHON_EXECUTABLE}")
fi
rm -rf build && mkdir -p build && (cd build && cmake -G 'Unix Makefiles' "${CMAKEARGS[@]}" ..)
if [[ $DISABLE_MCA != "" ]]; then
export OMPI_MCA_btl_base_warn_component_unused=0
fi
if [[ $EXPORT_COMPILE_COMMANDS != "" ]]; then
# If we are just exporting compile commands for clang-tidy, just build any
# third-party dependencies that we need.
make -C build -j $NUM_CPUS thirdparty 2>&1
exit_code=$?
else
# Otherwise build and test the code.
make -C build -j $NUM_CPUS all 2>&1 && make -C build -j $NUM_CPUS install && \
(cd build && ctest -j $TEST_JOBS --output-on-failure)
exit_code=$?
# Build coverage
if [[ $DO_COVERAGE != "" && $exit_code -eq 0 ]]; then
set -e
$HOME/.local/bin/fastcov --exclude '/usr' --lcov -o coverage.info
lcov --summary coverage.info
python3 cmake/python/lcov_cobertura.py coverage.info
mkdir coverage
python3 cmake/python/split_cobertura.py coverage.xml coverage
exit 0;
fi
fi
if [[ $exit_code -ne 0 ]]; then
[[ $OS_VERSION != "macos" ]] && rm -rf build/dist
exit $exit_code
fi
###############################################################################
##
## File: check-compiled-files.py
##
## For more information, please see: http://www.nektar.info
##
## The MIT License
##
## Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
## Department of Aeronautics, Imperial College London (UK), and Scientific
## Computing and Imaging Institute, University of Utah (USA).
##
## Permission is hereby granted, free of charge, to any person obtaining a
## copy of this software and associated documentation files (the "Software"),
## to deal in the Software without restriction, including without limitation
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
## and/or sell copies of the Software, and to permit persons to whom the
## Software is furnished to do so, subject to the following conditions:
##
## The above copyright notice and this permission notice shall be included
## in all copies or substantial portions of the Software.
##
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
## OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
## THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
## FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
## DEALINGS IN THE SOFTWARE.
##
## Description: Check for compiled files using compile_commands.json
##
###############################################################################
import json, sys, glob, os
# Should be run from root source directory.
cwd = os.getcwd()
# Folders and extensions to check
folders = ['library', 'solvers', 'tests', 'utilities']
exts = ['cpp', 'c']
# Presently some stuff is not in the CI.
ignore_sources = [
# CADfix API
"library/NekMesh/CADSystem/CFI/CADSystemCFI.cpp",
"library/NekMesh/CADSystem/CFI/CADSurfCFI.cpp",
"library/NekMesh/CADSystem/CFI/CADCurveCFI.cpp",
"library/NekMesh/CADSystem/CFI/CADVertCFI.cpp",
"library/NekMesh/Module/InputModules/InputCADfix.cpp",
"library/NekMesh/Module/OutputModules/OutputCADfix.cpp",
# Likwid
"solvers/CompressibleFlowSolver/Utilities/TimeRiemann.cpp",
"solvers/CompressibleFlowSolver/Utilities/TimeRoeKernel.cpp",
# Template for PWS
"solvers/PulseWaveSolver/EquationSystems/TemplatePressureArea.cpp",
]
ignore_sources = [ os.path.join(cwd, os.path.normpath(p)) for p in ignore_sources ]
with open(sys.argv[1], 'r') as f:
compilation_data = json.load(f)
compiled_files = [ entry['file'] for entry in compilation_data ]
# Search for all c/cpp files in library, solvers and utilities folder.
found_files = []
for folder in folders:
for ext in exts:
found_files += glob.glob(os.path.join(cwd, folder, '**', '*.{:s}'.format(ext)), recursive=True)
# Compare the lists of files.
all_good = True
for f in found_files:
if f in ignore_sources:
continue
if f not in compiled_files:
print('Uncompiled file: ' + f)
all_good = False
if not all_good:
exit(1)
#!/bin/bash
XML_INDEX=" " find -type f -name "*.xml" -print0 | xargs -0 -I % $(dirname "$0")/formatXMLfile.sh % --no-output
exit $?
#!/bin/bash
# Indentation level
if [[ $XML_INDENT ]]; then
indent=$XML_INDENT
else
indent=" "
fi
# Filename
if [[ $1 ]]; then
filename=$1
else
echo "Please specify xml filename"
exit 1 # exit with error
fi
# Exit if not xml file
[[ "$filename" =~ ^.*\.xml$ ]] || exit 1
# Format file
rm -f tmp
tab=""
dos2unix $filename 2> /dev/null
while read -r line || [[ -n "$line" ]]; do
# Print empty line
if [[ $line == "" ]]; then
echo "" >> tmp
continue
fi
# Just print line if comment
if [[ $line == "<!--"*"-->" ]]; then
echo "${tab}${line}" >> tmp
continue
fi
# Remove tab
if [[ $line == "</"*">"* ]] || [[ $line == "/>"* ]] ||
[[ $line == "-->" ]]; then
tab=${tab::-4}
fi
# Print line
echo "${tab}${line}" >> tmp
# Add tab
if [[ $line == "<!--" ]] || [[ $line == "<!--"* ]]; then
# Comment tag
tab=${tab}" "
elif [[ $line == "<"* ]] && [[ $line == !("</"*) ]]; then
# Opening tag
if [[ $line == !("<?"*"?>") ]]; then
tab=${tab}" "
fi
fi
# Remove tab
if [[ $line == "-->" ]]; then
# Comment tag
continue
elif [[ $line == *"-->" ]] && [[ $line == !(*">"*"-->") ]] &&
[[ $line == !(*"</"*"-->") ]]; then
tab=${tab::-4}
elif [[ $line == "<"*"</"*">"* ]] || [[ $line == "<"*"/>"* ]] ||
( [[ $line == !("<"*) ]] && [[ $line == !("/>"*) ]] && [[ $line == *"/>"* ]] ); then
# Closing tag
tab=${tab::-4}
fi
done < $filename
# Rename file
if [[ $2 == !(--no-output) ]]; then
if [[ $2 ]]; then
mv tmp $2
else
cat tmp
fi
else
if cmp -s tmp $filename; then
rm -f tmp
else
echo "$filename not formatted properly"
rm -f tmp
exit 2 # exit with error
fi
fi
rm -f tmp
# Exit script
exit 0
#!/bin/bash
error=0
for file in $(find $TARGETS -type f); do
filename=${file##*/}
if [[ ! $(grep -F "$filename" $file) ]]; then
if [[ "${filename##*.}" == "h" ]]; then
echo $file does not contains file name
error=1
fi
if [[ "${filename##*.}" == "cpp" ]]; then
echo $file does not contains file name
error=1
fi
if [[ "${filename##*.}" == "hpp" ]]; then
echo $file does not contains file name
error=1
fi
fi
done
if [[ $error -eq 1 ]]; then
exit 1 # exit with an error
fi
#!/bin/bash
error=0
for file in $(find $TARGETS -type f); do
filename=${file##*/}
if [[ ! $(grep -F "MIT License" $file) ]]; then
if [[ "${filename##*.}" == "h" ]]; then
echo $file does not contains MIT License
error=1
fi
if [[ "${filename##*.}" == "cpp" ]]; then
echo $file does not contains MIT License
error=1
fi
if [[ "${filename##*.}" == "hpp" ]]; then
echo $file does not contains MIT License
error=1
fi
fi
done
if [[ $error -eq 1 ]]; then
exit 1 # exit with an error
fi
build*
docs/tutorial
docker
pkg
ThirdParty
nektar++*.tar.gz
This diff is collapsed.
#!/bin/bash
rm -rf nektar/build/dist
tar czf nektar.tar.gz nektar
rm -rf nektar
[submodule "docs/tutorial"]
branch = master
path = docs/tutorial
url = https://gitlab.nektar.info/nektar/tutorial.git
ignore = all
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.