Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thm segregate #3

Open
wants to merge 57 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
7ef2468
:construction: THM code
kks32 Nov 20, 2019
7d438ac
successful compiling
shyaan Nov 21, 2019
af2067b
:hammer: Fix run function in Geothermal and refactor typo in Geotherm…
kks32 Nov 21, 2019
6f53037
:hammer: :dart: Fix CircleCI compile with Dealii path
kks32 Nov 21, 2019
4d7a203
add setp-dof
shyaan Dec 10, 2019
aed4424
derivation
shyaan Jan 15, 2020
ea67808
add some new lines
shyaan Feb 4, 2020
531d086
Merge branch 'thm' of https://github.com/cb-geo/thm into thm
shyaan Feb 4, 2020
3306755
setup_dofs
shyaan Feb 5, 2020
8953baf
simlified
shyaan Mar 3, 2020
2a9edd1
add vscode
shyaan Mar 6, 2020
37378b8
add data collection
shyaan Mar 7, 2020
26973de
add new namespace
shyaan Mar 8, 2020
321774d
add new namespace
shyaan Mar 8, 2020
1ecc328
reorganaizing
shyaan Mar 8, 2020
4268735
change boundary
shyaan Mar 9, 2020
fdd4287
segregate
shyaan Mar 10, 2020
4de1472
revise
shyaan Mar 12, 2020
4da1d64
major reivise
shyaan Mar 15, 2020
051dd0a
bracket
shyaan Mar 15, 2020
c96b8db
ajust the form
shyaan Mar 15, 2020
6aff33b
ADD INITIAL CONDITION
shyaan Mar 16, 2020
04ebbf3
build
shyaan Mar 16, 2020
9b477c3
add quadratrue_points
shyaan Mar 17, 2020
34b5048
after debug
shyaan Mar 23, 2020
948ff88
:dart: Use THM container for CircleCI
kks32 Apr 1, 2020
7bded89
:pencil: :art: Fix formatting
kks32 Apr 1, 2020
5e7f419
:fire: Remove codecoverage in CI
kks32 Apr 1, 2020
de08307
Place the system matrix assembing outside
shyaan Apr 2, 2020
d103f92
ADD TIMER
shyaan Apr 2, 2020
e1a325e
:clock: Refactor timer class
kks32 Apr 2, 2020
a8213eb
:art: Fix formatting
kks32 Apr 2, 2020
2cbe6a2
add convection term and parameter with physical meaning
shyaan Apr 3, 2020
b20437c
Merge branch 'thm_segregate' of https://github.com/cb-geo/thm into th…
shyaan Apr 3, 2020
3c8b1c0
debug the rhs problem
shyaan Apr 10, 2020
baead91
add test
shyaan Apr 17, 2020
e685379
add GMRES and coupling effects
shyaan Apr 18, 2020
43a9c17
typo checking
shyaan Apr 28, 2020
3e9d699
add gravity and more boundary
shyaan May 4, 2020
3306a3e
input parameter from txt file
shyaan May 11, 2020
5bebcb3
inport parameter from parameter.txt
shyaan May 11, 2020
eb4af06
add get_parameter fucntion to get pamameter from txt file
shyaan May 12, 2020
6b8470a
change txt to csv
shyaan May 13, 2020
f545078
add distribution
shyaan May 15, 2020
3164158
:wrench: Fix CPP check error in boundary values
kks32 May 25, 2020
34dbe9a
:wrench: Fix CPP check error in boundary values temp boundary
kks32 May 25, 2020
fc43fb5
:pencil: :art: Fix clang-format errors
kks32 May 25, 2020
230bedd
:wrench: Fix missing csv in external
kks32 May 25, 2020
9e63672
change the parameters
shyaan May 25, 2020
96b4cb1
Merge branch 'thm_segregate' of https://github.com/cb-geo/thm into th…
shyaan May 25, 2020
a6e2ea1
amend all names of variables
shyaan May 26, 2020
cdca305
amend the format and add solver settins to input file
shyaan May 29, 2020
cd51db7
setup a benchmark case
shyaan Jun 4, 2020
1300f3c
adjust format
shyaan Jun 4, 2020
57f1df9
amend the constructor
shyaan Jun 4, 2020
7d5d18e
adjust format
shyaan Jun 4, 2020
dea94b7
remove idle sys matrix
shyaan Jun 14, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 4 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs:
build:
working_directory: /home/cbgeo/research/mpm
docker:
- image: quay.io/cbgeo/mpm
- image: quay.io/cbgeo/thm
steps:
- checkout
# GCC-8
Expand All @@ -17,7 +17,7 @@ jobs:
export MODULEPATH=$MODULEPATH:/usr/share/modulefiles
module load mpi/openmpi-x86_64
export CXX_COMPILER=mpicxx
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_EXPORT_COMPILE_COMMANDS=On ..
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DDEAL_II_DIR=/home/cbgeo/research/dealii/ ..
make -j2
ctest -VV
# Clang-6.0
Expand All @@ -27,7 +27,7 @@ jobs:
mkdir -p build
[ "$(ls -A build)" ] && rm -rf build/*
cd build
scan-build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_EXPORT_COMPILE_COMMANDS=On ..
scan-build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DDEAL_II_DIR=/home/cbgeo/research/dealii/ ..
scan-build make -j2
ctest -VV
# cppcheck
Expand All @@ -40,17 +40,4 @@ jobs:
- run:
name: clang-format
command: |
python3 ./clang-tools/run-clang-format.py -r include/* src/* tests/*
# codecoverage
- run:
name: codecov.io
command: |
mkdir -p build
[ "$(ls -A build)" ] && rm -rf build/*
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++ -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DENABLE_COVERAGE=On ..
make mpmtest_coverage -j2
./mpmtest_coverage
make gcov -j2 --ignore-errors
make lcov
bash <(curl -s https://codecov.io/bash) -X gcov
python3 ./clang-tools/run-clang-format.py -r include/* src/*
47 changes: 47 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
# BasedOnStyle: CUED GeoMechanics
AccessModifierOffset: -1
ConstructorInitializerIndentWidth: 4
AlignEscapedNewlinesLeft: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AlwaysBreakTemplateDeclarations: true
AlwaysBreakBeforeMultilineStrings: true
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BinPackParameters: true
ColumnLimit: 80
ConstructorInitializerAllOnOneLineOrOnePerLine: true
DerivePointerBinding: false
ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: true
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCSpaceBeforeProtocolList: false
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 60
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerBindsToType: true
SpacesBeforeTrailingComments: 2
Cpp11BracedListStyle: true
Standard: Auto
IndentWidth: 2
TabWidth: 8
UseTab: Never
BreakBeforeBraces: Attach
IndentFunctionDeclarationAfterType: true
SpacesInParentheses: false
SpacesInAngles: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpaceAfterControlStatementKeyword: true
SpaceBeforeAssignmentOperators: true
ContinuationIndentWidth: 4
...

8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,11 @@ configure.scan
*missing
*stamp-h1
benchmarks/
build/*
*copy*
*.geo*
*.db*
*.nas*
*.vscode/*
grid-1.eps
outputfiles/*
53 changes: 44 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
project(thm LANGUAGES CXX)
#project(thm LANGUAGES CXX)
# Set the name of the project and target:
SET(TARGET "thm")

# Require C++14-compliant compiler; only available for CMake v3.10 and up
set(CMAKE_CXX_STANDARD 14)
Expand Down Expand Up @@ -33,25 +35,58 @@ endif()
# so we provide an option similar to BUILD_TESTING, but just for THM.
option(THM_BUILD_TESTING "enable testing for thm" ON)

# Add -O0 to remove optimizations when using gcc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need this, please pass -DCMAKE_BUILD_TYPE=Debug when compiling

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make "DCMAKE_BUILD_TYPE=Debug" ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmake -DCMAKE_BUILD_TYPE=Debug

# IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0")
# ENDIF(CMAKE_COMPILER_IS_GNUCC)

# CMake Modules
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})

# Dealii
FIND_PACKAGE(deal.II 8.5.0 QUIET
HINTS ${deal.II_DIR} ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR}
)
if(NOT ${deal.II_FOUND})
MESSAGE(FATAL_ERROR "\n"
"*** Could not locate a (sufficiently recent) version of deal.II. ***\n\n"
"You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake\n"
"or set an environment variable \"DEAL_II_DIR\" that contains this path."
)
endif()

if (${deal.II_FOUND})
include_directories(${DEAL_II_DIR}/include/)
endif()

#thm executable
SET(thm_src
./src/main.cc
./src/get_parameter.cc
./src/interpolation1d.cc
./src/linspace.cc
)

# aux_source_directory(./src/ thm_src)

# Include directories
include_directories(BEFORE
${thm_SOURCE_DIR}/include/
${thm_SOURCE_DIR}/external/
include_directories(
./include/
./external/

)

# thm executable
#SET(thm_src
# ${thm_SOURCE_DIR}/src/thm.cc
#)
SET(TARGET_SRC ${thm_src})

DEAL_II_INITIALIZE_CACHED_VARIABLES()
PROJECT(${TARGET})
DEAL_II_INVOKE_AUTOPILOT()


#add_library(lthm SHARED ${thm_src})

add_executable(thm ${thm_SOURCE_DIR}/src/main.cc)
# add_executable(geothm ${thm_SOURCE_DIR}/src/main.cc)
#target_link_libraries(thm lthm)

# Unit test
Expand Down
2 changes: 1 addition & 1 deletion clang-tools/format.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
find ../include/ -iname *.h -o -iname *.tcc | xargs clang-format -i
find ../src/ -iname *.h -o -iname *.cc | xargs clang-format -i
find ../tests/ -iname *.h -o -iname *.cc | xargs clang-format -i
#find ../tests/ -iname *.h -o -iname *.cc | xargs clang-format -i
Loading