Skip to content

Branch H - DO NOT MERGE - DO NOT REVIEW #1407

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

Draft
wants to merge 188 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
188 commits
Select commit Hold shift + click to select a range
d0a95a8
first ghost-interface draft
antjeHP Jun 24, 2024
4d72771
work status
antjeHP Jun 24, 2024
b8c6e37
update ghost_interface_unref, update set_ghost (not final), add debug…
antjeHP Jul 1, 2024
11db7f3
updated ghost_interface_face
antjeHP Jul 4, 2024
3786648
edit balance for ghost_interface
antjeHP Jul 4, 2024
cfa63f1
updated ghost_creat_ext to ghost_interface
antjeHP Jul 4, 2024
65fc4e4
delete unnecesssary prints
antjeHP Jul 4, 2024
c61a5a4
commed out the members ghost_type and ghost_algorithm in forest
antjeHP Jul 4, 2024
4bca580
fix ghost interface bug in blanace
antjeHP Aug 5, 2024
bf5add2
header for ghost interface
antjeHP Aug 5, 2024
d548aec
change includes for ghost interface
antjeHP Aug 5, 2024
b5ba195
update t8_forest_ghost_create_ext for ghost interface
antjeHP Aug 5, 2024
9b693d4
remove debuging print statmens
antjeHP Aug 5, 2024
dbfb924
add hypercube hybrid to benchmarks
antjeHP Aug 5, 2024
ce0a928
update Makefile for ghost_interface
antjeHP Aug 11, 2024
c47c536
fix benachmark bug
antjeHP Aug 11, 2024
a52d1f6
Merge remote-tracking branch 'origin/main' into feature-ghost_interface
antjeHP Aug 12, 2024
06fd2e2
add ghost_interface implemenation
antjeHP Aug 12, 2024
ba64acb
add ghost interface to makefile
antjeHP Aug 12, 2024
137c189
add more cubetests
antjeHP Aug 26, 2024
cd88e76
add ghost stencil
antjeHP Sep 9, 2024
0d74a11
update function name of step 2 of ghost interface
antjeHP Sep 9, 2024
53de48d
update ghost stencil
antjeHP Sep 11, 2024
febd5b1
add stencil find owner function
antjeHP Sep 16, 2024
c9bb0f4
typos
antjeHP Sep 30, 2024
5010b09
Detailed description of ghost interface functions
antjeHP Oct 7, 2024
39ca690
deleted unused file t8_forest_ghost_interface_faces.hxx
antjeHP Oct 23, 2024
b83d99a
Merge branch 'main' into feature-ghost_interface
antjeHP Oct 24, 2024
af2926a
remove unused variable in add_stencil
antjeHP Oct 29, 2024
6cc10ee
proper abort message when using lfn with unbalanced forest
holke Nov 13, 2024
a390ed6
change leaf parameter name. Add ghost todo comments
holke Nov 13, 2024
a12e38e
adapt iterate face example
holke Nov 14, 2024
413b23d
fix deleted bracket
holke Nov 14, 2024
0d5fe2a
use RAII where possible
holke Nov 14, 2024
e6969d5
update iterate face example to ghost face iterate
holke Nov 14, 2024
3257123
more const for split_array functions
holke Nov 14, 2024
8118b95
add ghost check functionality to t8_forest_element_is_leaf
holke Nov 14, 2024
6c331bd
comment and remove empty lines
holke Nov 14, 2024
6f2b7b7
iterate faces now supports ghosts
holke Nov 14, 2024
6226b68
add ghost check functionality to t8_forest_element_is_leaf
holke Nov 14, 2024
0fa3f7b
comment and remove empty lines
holke Nov 14, 2024
108664c
extend is leaf test to ghosts
holke Nov 14, 2024
9402ee6
activate parallel testing for is leaf check
holke Nov 14, 2024
8f1b4d0
debug guards around check used only in debug mode
holke Nov 14, 2024
562cd4a
debug guards around check used only in debug mode
holke Nov 14, 2024
6cf5c42
Merge branch 'feature-more_const' into feature-extend_lfn_to_ghosts
holke Nov 14, 2024
07d250b
Merge branch 'feature-element_is_ghost' into feature-extend_lfn_to_gh…
holke Nov 14, 2024
1734d0f
make comment of bin search clearer
holke Nov 15, 2024
26a28a3
start with lfn extension for ghost, have structure done and know what…
holke Nov 15, 2024
6ee399a
remove TODO comment
holke Nov 15, 2024
abdff17
todo comments
holke Nov 21, 2024
be072c0
Add face iterate callback to leaf face neighbor
holke Nov 21, 2024
716097d
is_leaf_or_ghost correct assertion
holke Nov 21, 2024
68fb1e9
Apply suggestions from code review for const
antjeHP Nov 26, 2024
bea8572
assertion in t8_forest_set_ghost_ext_new
antjeHP Nov 26, 2024
11fbc50
updated year in copyright notice
antjeHP Nov 26, 2024
e93e2e9
add const
antjeHP Nov 26, 2024
d8bdecc
adaptations in face iterate callback
holke Dec 3, 2024
554ab7b
add ghost support to t8_forest_element_neighbor_eclass
holke Dec 3, 2024
39a9bf0
final extensions of lfn to ghost elements
holke Dec 3, 2024
1a39eb8
t8_forest_element_neighbor_eclass adaptation to declaration
holke Dec 3, 2024
7e9c27e
user data parameter handling for iterate faces
holke Dec 3, 2024
2f68110
Remove is_balanced parameter from lfn function since no longer required.
holke Dec 3, 2024
58369cb
improve function documentation
holke Dec 3, 2024
17c869b
fix abort if incomplete forest
holke Dec 3, 2024
f4d50df
return when no neighbors are found
holke Dec 3, 2024
dce66ae
only compute ghost tree if ghosts exists
holke Dec 3, 2024
591d2ff
skip if case when no neighbors found in search
holke Dec 3, 2024
731c062
comments
holke Dec 3, 2024
86bcfdd
fix wrongly placed brace
holke Dec 3, 2024
6b61f19
add first test case
holke Dec 3, 2024
bdbf825
update comments
antjeHP Dec 5, 2024
3582bc2
unused varable in realise
antjeHP Dec 5, 2024
a4d2b4e
add doc file
antjeHP Dec 5, 2024
b0d73ba
only do face neighbors when default quad or hex
holke Dec 5, 2024
b9a6eea
fix user data pointer in callback
holke Dec 5, 2024
e009667
fix memory counting and handling for computed neighbors
holke Dec 5, 2024
963c4d2
face iterate use is leaf check
holke Dec 5, 2024
59533d9
adjustments to face neighbor computation
holke Dec 11, 2024
c7654ea
extend lfn test
holke Dec 11, 2024
b8c3a67
add more doc
antjeHP Dec 17, 2024
7d9a6a9
comments
holke Jan 15, 2025
7e7dd6b
Face iteration requires view into partial leaf array
holke Jan 15, 2025
13cf0a5
store local or ghost tree info with leaf arrays for face iteration
holke Jan 15, 2025
2930add
add doc to t8_forest_ghost_tree_num_elements
antjeHP Jan 17, 2025
6b1d87b
change ghost_interface to ghost_definiton in files
antjeHP Jan 17, 2025
328b312
Merge branch 'feature-ghost_interface' of github.com:DLR-AMR/t8code i…
antjeHP Jan 21, 2025
f4ef4b7
change ghost_interface to ghost_deinition
antjeHP Jan 21, 2025
30c6f6b
doc
antjeHP Jan 21, 2025
cd7ac01
extend forest_element_face_neighbor to ghosts
holke Jan 27, 2025
b3c19d7
extend leaf_face_neighbors_iterate to ghosts
holke Jan 27, 2025
3c53f03
new check elements for ancestor function
holke Jan 27, 2025
f584941
In face neighbor computation check whether neighbors would exist befo…
holke Jan 27, 2025
b5ec551
more output in test
holke Jan 27, 2025
35843c5
indent
holke Jan 27, 2025
841e3ce
index checks in face neighbor test
holke Jan 27, 2025
f9a5f17
Add own test file for reusable adapt callbacks
holke Jan 28, 2025
d96348d
add testing of adapted forest to face neighbor test
holke Jan 28, 2025
9ab0b11
clean up custom assertion test header
holke Jan 28, 2025
8d751e2
fix pointer arithmetic
holke Jan 28, 2025
13ec5ca
extend checks in test for adaptive forest
holke Jan 28, 2025
eab1b42
temporarily skip adapted forest in test
holke Jan 31, 2025
60e84ad
debugging output
holke Jan 31, 2025
b2f45d2
proper conversion of pointer output
holke Jan 31, 2025
812ddad
Update benchmarks/time_forest_partition.cxx
antjeHP Feb 6, 2025
a4d8dfe
Update src/t8_forest/t8_forest.cxx
antjeHP Feb 6, 2025
a0b55ab
Update src/t8_forest/t8_forest.cxx
antjeHP Feb 6, 2025
5089a0d
Update src/t8_forest/t8_forest_balance.cxx
antjeHP Feb 6, 2025
bf15785
Update src/t8_forest/t8_forest_general.h
antjeHP Feb 6, 2025
e1eb4e2
Update src/t8_forest/t8_forest_general.h
antjeHP Feb 6, 2025
b9f52d4
Apply suggestions from code review
antjeHP Feb 6, 2025
c75f44c
changes from review
antjeHP Feb 6, 2025
a12f1e3
typo
antjeHP Feb 6, 2025
0ff6b4e
Merge branch 'main' into feature-extend_lfn_to_ghosts
lukasdreyer Feb 7, 2025
5033098
leafs -> leaves
lukasdreyer Feb 7, 2025
06de973
fix CI
lukasdreyer Feb 7, 2025
7412720
adapt test parameter
lukasdreyer Feb 7, 2025
28fbbaf
universal return value for success
antjeHP Feb 12, 2025
7fb763e
remove stencil
antjeHP Feb 12, 2025
7213c0f
solve merge conflicts
antjeHP Feb 12, 2025
59cfa28
resolve conflict
antjeHP Feb 12, 2025
96ce4ca
indent
antjeHP Feb 12, 2025
de1980c
update do_ghost for new scheme
antjeHP Feb 12, 2025
91ec4fe
Merge branch 'main' into feature-ghost_interface
sandro-elsweijer Feb 13, 2025
de40d50
Merge branch 'main' into feature-extend_lfn_to_ghosts
lukasdreyer Feb 13, 2025
cccd74b
indent
lukasdreyer Feb 13, 2025
4184f91
Merge branch 'feature-extend_lfn_to_ghosts' of github.com:DLR-AMR/t8c…
lukasdreyer Feb 13, 2025
ee8f0af
update set_ghost_ext
antjeHP Feb 13, 2025
00c1b0a
add stencil and nodestring ghost
antjeHP Feb 13, 2025
302a374
Merge branch 'main' into feature-ghost_interface
sandro-elsweijer Feb 17, 2025
7e7b632
Merge branch 'feature-ghost_interface' into feature-ghost_nodestring
sandro-elsweijer Feb 17, 2025
6644a45
Merge branch 'main' into feature-extend_lfn_to_ghosts
sandro-elsweijer Feb 17, 2025
a8b7641
Merge branch 'feature-ghost_nodestring' into Branch_H
sandro-elsweijer Feb 17, 2025
8cd0d35
Update src/Makefile.am
holke Feb 19, 2025
12553b9
typos
antjeHP Feb 24, 2025
4dd5c07
add algorithm inlcude to support std::is_sorted
holke Feb 24, 2025
23c7858
allow neighbor computation to skip element pointer computation
holke Jan 31, 2025
b34db13
Add new function to compute neighbor index from element index for uni…
holke Jan 31, 2025
852479d
change usage according to scheme changes
holke Feb 24, 2025
003044e
prevent memory leak in skipped test by allocating scheme after skip
holke Feb 24, 2025
2011c42
add doc
antjeHP Mar 10, 2025
59b551b
add gtest for nodestring
antjeHP Mar 10, 2025
cc4757a
fix wrong retrieving of the tree class. [run ci]
Davknapp Mar 11, 2025
b839459
spell check [run ci]
Davknapp Mar 12, 2025
3b04568
move tree_is_local inside debug again
Davknapp Mar 12, 2025
3bd79dc
Run CI on Branch_H
Davknapp Mar 12, 2025
53e5b49
[run ci]
Davknapp Mar 12, 2025
8ea0512
update CI to main
Davknapp Mar 12, 2025
9f4c924
Merge branch 'Branch_H' into fix-forest_leave_face_neigh
Davknapp Mar 12, 2025
8c2ed80
update linkage tests
Davknapp Mar 12, 2025
6d67315
Merge remote-tracking branch 'origin/fix-forest_leave_face_neigh' int…
Davknapp Mar 12, 2025
9bfe18f
Update linkage tests to main
Davknapp Mar 12, 2025
73a38ad
update tarball CI to main
Davknapp Mar 12, 2025
f5274af
Update API-CI to main
Davknapp Mar 12, 2025
dffa0aa
Update submodules-CI to main
Davknapp Mar 12, 2025
a433779
update test-CI
Davknapp Mar 12, 2025
ff0c59e
Merge branch 'main' into Branch_H
Davknapp Mar 12, 2025
893397f
Fix typo
Davknapp Mar 12, 2025
79d7dfa
Merge remote-tracking branch 'origin/Branch_H' into Branch_H
Davknapp Mar 12, 2025
0794c34
Revert "Merge remote-tracking branch 'origin/Branch_H' into Branch_H"
Davknapp Mar 12, 2025
87f2bc0
Revert "Fix typo"
Davknapp Mar 12, 2025
44dcea3
Revert "Merge branch 'main' into Branch_H"
Davknapp Mar 12, 2025
ad6f240
fix another typo
Davknapp Mar 12, 2025
2a0b9c6
Update cmake-testsuite CI to main
Davknapp Mar 12, 2025
fccdb4b
[run ci]
Davknapp Mar 12, 2025
ffb1f1e
Merge branch 'Branch_H' into fix-forest_leave_face_neigh
Davknapp Mar 12, 2025
0af3973
Debug push
Davknapp Mar 12, 2025
2ae0a48
Fix memory allocation for search arrays
holke Mar 12, 2025
9eb3aff
add assertion
holke Mar 12, 2025
476b642
Start fixing neighbor allocation bug
holke Mar 12, 2025
07f0b04
Merge branch 'feature-ghost_nodestring' of github.com:DLR-AMR/t8code …
antjeHP Mar 13, 2025
4bdee93
typos
antjeHP Mar 13, 2025
363d040
assertion in bin search lower
holke Mar 13, 2025
d446f42
fix memory handling in face neighbor computation
holke Mar 13, 2025
24535f1
fix typo in docstring
holke Mar 13, 2025
b63f91b
Merge remote-tracking branch 'origin/Branch_H' into fix-forest_leave_…
holke Mar 13, 2025
61ac3e6
remove debugging code
holke Mar 13, 2025
6ddcd37
Change Realloc comment. I checked that this works
holke Mar 13, 2025
9482495
remove false assertion
lukasdreyer Mar 13, 2025
85d1a64
add branch H for indentation check
lukasdreyer Mar 14, 2025
7d38d14
improve comments
holke Mar 17, 2025
96e6e74
properly clean up memory
holke Mar 17, 2025
820f6b3
delete comment
holke Mar 17, 2025
65bcd69
typo
holke Mar 17, 2025
f040fae
Merge pull request #1473 from DLR-AMR/fix-forest_leave_face_neigh
lukasdreyer Mar 18, 2025
d8921d6
disable nodestring tests
sandro-elsweijer Mar 21, 2025
d640c76
Merge branch 'Branch_H' into feature-ghost_nodestring-merge_in_Branch_H
sandro-elsweijer Mar 21, 2025
9e953b5
Merge pull request #1503 from DLR-AMR/feature-ghost_nodestring-merge_…
ole-alb Mar 21, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/add_release_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
&& echo CXXFLAGS_var="-Wall -pedantic -O3" >> $GITHUB_ENV
- name: build config variables
if: ${{ env.MINOR_RELEASE == 'true' }}
run: export CONFIG_OPTIONS="--without-blas ${TEST_LEVEL_FLAG}"
run: export CONFIG_OPTIONS="--without-blas ${LESS_TEST_OPTION}"
&& export CONFIG_SERIAL_DEBUG="$CONFIG_OPTIONS --enable-debug --with-sc=$SC_SERIAL_DEBUG/install --with-p4est=$P4EST_SERIAL_DEBUG/install"
- name: Check vars
if: ${{ env.MINOR_RELEASE == 'true' }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build_cmake_tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,3 @@ jobs:
name: build_tar.log
path: build_tar/test-suite.log


14 changes: 11 additions & 3 deletions .github/workflows/check_indentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,20 @@ name: t8code indentation check
# It is triggered for pull requests into main and develop and will also run once a day
# on main.
#
# The script runs the scripts/check_if_all_files_indented.sh script of t8code.
# The script runs the scripts/check_if_all_files_indented.scp script of t8code.
# The output is uploaded as an artifact to the github page.

on:
merge_group:
push:
branches:
- main
- develop
- feature-*CI* # for testing this script, all feature branches with "CI" in their name
pull_request:
branches:
- main
- develop
- Branch_H
workflow_dispatch: # Be able to trigger this manually on github.com
# Run every night at 1:05
schedule:
Expand All @@ -57,7 +65,7 @@ jobs:
- name: Install indent
run: pip install clang-format==17.0.1
- name: Indentation check
run: cd scripts/ && ./check_if_all_files_indented.sh &> >(tee -a indent_script_output.txt)
run: cd scripts/ && ./check_if_all_files_indented.scp &> >(tee -a indent_script_output.txt)
- name: Archive script output
# Do this regardess of the result of the previous step.
# We especially want to upload the result when the check fails.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mattermost_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ name: Mattermost_message_pull_request
on:
# Triggers the workflow on pull request events on the feature-CI_mattermost_messages, develop or main branch
pull_request:
branches:
branches: [ feature-CI_mattermost_messages, develop, main ]
types: [ opened, synchronize, reopened, closed]

# Allows you to run this workflow manually from the Actions tab
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/spell_check.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: spell_check

on:
merge_group:
push:
branches:
- main
- feature-*CI* # for testing this script, all feature branches with "CI" in their name
pull_request:
workflow_dispatch: # Be able to trigger this manually on github.com

Expand All @@ -14,14 +17,3 @@ jobs:
uses: actions/checkout@v4
- name: Check spelling
uses: crate-ci/typos@master
- name: check macros
run: |
for file in $(git diff --name-only --diff-filter=A); do
./scripts/check_macros.sh "$file" &>> check_macros.txt
done
- name: Archive script output
if: failure()
uses: actions/upload-artifact@v4
with:
name: t8code check macros report
path: check_macros.txt
2 changes: 1 addition & 1 deletion .github/workflows/tests_cmake_t8code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: test-suite_${{ inputs.BUILD_TYPE }}_MPI_${{ inputs.MPI }}.log
path: build/Testing/Temporary/LastTest.log
path: build/Testing/Temporary/LastTest.log
2 changes: 1 addition & 1 deletion .github/workflows/tests_cmake_t8code_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: test-suite_${{ inputs.BUILD_TYPE }}_MPI_${{ inputs.MPI }}_fortran.log
path: build_fortran/Testing/Temporary/LastTest.log
path: build_fortran/Testing/Temporary/LastTest.log
2 changes: 1 addition & 1 deletion .github/workflows/tests_cmake_t8code_linkage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: test-suite_${{ inputs.BUILD_TYPE }}_MPI_${{ inputs.MPI }}_VTK.log
path: build_vtk/Testing/Temporary/LastTest.log
path: build_vtk/Testing/Temporary/LastTest.log
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: test-suite_w_submodules_${{ inputs.BUILD_TYPE }}_MPI_${{ inputs.MPI }}.log
path: build/Testing/Temporary/LastTest.log
path: build/Testing/Temporary/LastTest.log
2 changes: 1 addition & 1 deletion .github/workflows/tests_cmake_testsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,4 @@ jobs:
uses: ./.github/workflows/build_cmake_tarball.yml
needs: [preparation, sc_p4est_tests, t8code_tests, t8code_linkage_tests, t8code_api_tests, t8code_w_shipped_submodules_tests]
with:
TEST_LEVEL: ${{ github.event_name == 'pull_request' && 1 || 0 }} # Set TEST_LEVEL to 1 if the event is a PR, otherwise 0.
TEST_LEVEL: ${{ github.event_name == 'pull_request' && 1 || 0 }} # Set TEST_LEVEL to 1 if the event is a PR, otherwise 0.
2 changes: 1 addition & 1 deletion .github/workflows/update_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
run: echo CFLAGS_var="-Wall -pedantic -O3" >> $GITHUB_ENV
&& echo CXXFLAGS_var="-Wall -pedantic -O3" >> $GITHUB_ENV
- name: build config variables
run: export CONFIG_OPTIONS="--without-blas ${TEST_LEVEL_FLAG}"
run: export CONFIG_OPTIONS="--without-blas ${LESS_TEST_OPTION}"
&& export CONFIG_SERIAL_DEBUG="$CONFIG_OPTIONS --enable-debug --with-sc=$SC_SERIAL_DEBUG/install --with-p4est=$P4EST_SERIAL_DEBUG/install"
- name: Check vars
run: echo "[$CONFIG_SERIAL_DEBUG]"
Expand Down
2 changes: 1 addition & 1 deletion .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ eles = "eles"
packageid = "packageid"

[files]
extend-exclude = ["scripts/t8indent.sh", "thirdparty/", "t8code_logo.png", "cmake/FindOpenCASCADE.cmake"]
extend-exclude = ["scripts/t8indent", "thirdparty/", "t8code_logo.png", "cmake/FindOpenCASCADE.cmake"]
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ option( T8CODE_EXPORT_COMPILE_COMMANDS "Export the compile commands as json. Can

option( T8CODE_BUILD_TESTS "Build t8code's automated tests" ON )
cmake_dependent_option( T8CODE_BUILD_TPL_TESTS "Build the tests from libsc and p4est" ON "T8CODE_BUILD_TESTS" OFF )
cmake_dependent_option( T8CODE_ENABLE_LESS_TESTS "Tests not as thoroughly to speed up the test suite. Tests the same functionality. (WARNING: Use with care.)" OFF "T8CODE_BUILD_TESTS" OFF )

option( T8CODE_BUILD_EXAMPLES "Build t8code's examples" ON )
cmake_dependent_option( T8CODE_BUILD_TPL_EXAMPLES "Build the examples from libsc and p4est" OFF "T8CODE_BUILD_EXAMPLES" OFF )
Expand All @@ -40,8 +41,6 @@ option( T8CODE_USE_SYSTEM_P4EST "Use system-installed p4est library" OFF )
option( T8CODE_BUILD_DOCUMENTATION "Build t8code's documentation" OFF )
cmake_dependent_option( T8CODE_BUILD_DOCUMENTATION_SPHINX "Build t8code's documentation using sphinx" OFF "T8CODE_BUILD_DOCUMENTATION" OFF )

set(T8CODE_TEST_LEVEL 0 CACHE STRING "Test level: 0 for full tests, 1 for less thorough tests, 2 for minimal tests. (WARNING: Use with care.)")
add_definitions(-DT8CODE_TEST_LEVEL=${T8CODE_TEST_LEVEL})
set(T8CODE_CUSTOM_PARALLEL_TEST_COMMAND "" CACHE STRING "Define a custom command for parallel tests , e.g.: mpirun -np 8 (overwrites standard mpirun -np 4 if build with mpi)")
set(T8CODE_CUSTOM_SERIAL_TEST_COMMAND "" CACHE STRING "Define a custom command for serial tests.")

Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ A list of all renamings (without considering the deletion of the prefix) is here
- `t8_element_vertex_integer_coords` -> `element_get_vertex_integer_coords`
- `t8_element_vertex_reference_coords` -> `element_get_vertex_reference_coords`
- `t8_element_refines_irregular` -> `refines_irregular`
- `t8_element_root` -> `t8_element_set_to_root`
- `t8_element_root` -> `t8_element_get_root`


### Usage of the default scheme
Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,15 @@ We provide a short guide to install t8code in our Wiki [Installation guide](http

### Documentation

t8code uses [Doxygen](https://doxygen.nl/) to generate the code documentation.
You can find the documentation of our releases on the [t8code website](https://dlr-amr.github.io/t8code/pages/documentation.html).
Follow the steps described in our Wiki [Documentation](https://github.com/DLR-AMR/t8code/wiki/Documentation) to create the documentation locally.
t8code uses [Doxygen](https://doxygen.nl/) to generate the code documentation. You can build the documentation with

```
make doxygen
```

and then find the generated files in the `/doc` subfolder.

You can also find the documentation of our releases on the [t8code website](https://dlr-amr.github.io/t8code/pages/documentation.html).

### License and contributing
t8code is licensed under GPLv2 (see [COPYING](COPYING)). We appreciate
Expand Down
79 changes: 61 additions & 18 deletions benchmarks/t8_time_forest_partition.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
#include <t8_forest/t8_forest_geometrical.h>
#include <t8_forest/t8_forest_profiling.h>
#include <t8_schemes/t8_default/t8_default.hxx>
#include <example/common/t8_example_common.hxx>
#include <t8_types/t8_vec.hxx>
#include <example/common/t8_example_common.h>

/* This is the user defined data used to define the
* region in which we partition.
Expand All @@ -49,11 +48,29 @@
typedef struct
{
double c_min, c_max; /* constants that define the thickness of the refinement region */
t8_3D_vec normal; /* normal vector to the plane E */
double normal[3]; /* normal vector to the plane E */
int base_level; /* A given level that is not coarsend further, see -l argument */
int max_level; /* A max level that is not refined further, see -L argument */
} adapt_data_t;

/* Simple 3 dimensional vector product */
static double
t8_vec3_dot (double *v1, double *v2)
{
return v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2];
}

/* Set x = x - alpha*y
* for 2 3dim vectors x,y and a constant alpha */
static void
t8_vec3_xmay (double *x, double alpha, double *y)
{
int i;
for (i = 0; i < 3; i++) {
x[i] -= alpha * y[i];
}
}

#if 0
/* TODO: deprecated. was replaced by t8_common_midpoint. */
static void
Expand Down Expand Up @@ -85,36 +102,37 @@ t8_anchor_element (t8_forest_t forest, t8_locidx_t which_tree,
* c_min, c_max. We refine the cells in the band c_min*E, c_max*E */
static int
t8_band_adapt (t8_forest_t forest, t8_forest_t forest_from, t8_locidx_t which_tree, t8_eclass_t tree_class,
[[maybe_unused]] t8_locidx_t lelement_id, const t8_scheme *scheme, const int is_family,
[[maybe_unused]] const int num_elements, t8_element_t *elements[])
t8_locidx_t lelement_id, const t8_scheme *scheme, const int is_family, const int num_elements,
t8_element_t *elements[])
{
int level, base_level, max_level;
t8_3D_vec elem_midpoint;
double elem_midpoint[3];
double *normal;
adapt_data_t *adapt_data;

T8_ASSERT (!is_family || num_elements == scheme->element_get_num_children (tree_class, elements[0]));
level = scheme->element_get_level (tree_class, elements[0]);
/* Get the minimum and maximum x-coordinate from the user data pointer of forest */
adapt_data = (adapt_data_t *) t8_forest_get_user_data (forest);
t8_3D_vec normal = adapt_data->normal;
normal = adapt_data->normal;
base_level = adapt_data->base_level;
max_level = adapt_data->max_level;
/* Compute the coordinates of the anchor node. */
t8_forest_element_centroid (forest_from, which_tree, elements[0], elem_midpoint.data ());
t8_forest_element_centroid (forest_from, which_tree, elements[0], elem_midpoint);

/* Calculate elem_midpoint - c_min n */
t8_axy (elem_midpoint, normal, adapt_data->c_min);
t8_vec3_xmay (elem_midpoint, adapt_data->c_min, normal);

/* The purpose of the factor C*h is that the levels get smaller, the
* closer we get to the interface. We refine a cell if it is at most
* C times its own height away from the interface */
if (t8_dot (elem_midpoint, normal) >= 0) {
if (t8_vec3_dot (elem_midpoint, normal) >= 0) {
/* if the anchor node is to the right of c_min*E,
* check if it is to the left of c_max*E */

/* set elem_midpoint to the original anchor - c_max*normal */
t8_axy (elem_midpoint, normal, adapt_data->c_max - adapt_data->c_min);
if (t8_dot (elem_midpoint, normal) <= 0) {
t8_vec3_xmay (elem_midpoint, adapt_data->c_max - adapt_data->c_min, normal);
if (t8_vec3_dot (elem_midpoint, normal) <= 0) {
if (level < max_level) {
/* We do refine if level smaller 1+base level and the anchor is
* to the left of c_max*E */
Expand All @@ -136,6 +154,16 @@ t8_band_adapt (t8_forest_t forest, t8_forest_t forest_from, t8_locidx_t which_tr
return 0;
}

static void
t8_vec3_normalize (double *v)
{
double norm = sqrt (t8_vec3_dot (v, v));

v[0] /= norm;
v[1] /= norm;
v[2] /= norm;
}

/* Create a cmesh from a .msh files uniform level 0
* partitioned. */
static void
Expand Down Expand Up @@ -184,7 +212,7 @@ t8_time_forest_cmesh_mshfile (t8_cmesh_t cmesh, const char *vtu_prefix, sc_MPI_C
adapt_data.normal[0] = 0.8;
adapt_data.normal[1] = 0.3;
adapt_data.normal[2] = 0.0;
t8_normalize (adapt_data.normal);
t8_vec3_normalize (adapt_data.normal);
adapt_data.base_level = init_level;
adapt_data.max_level = max_level;
/* Start the time loop, in each time step the refinement front moves
Expand Down Expand Up @@ -313,7 +341,7 @@ main (int argc, char *argv[])
int level, level_diff;
int help = 0, no_vtk, do_ghost, do_balance, use_cad;
int dim, num_files;
int test_tet, test_linear_cylinder, test_cad_cylinder;
int test_tet, test_linear_cylinder, test_cad_cylinder, test_hybrid_cube, test_hex_cube;
int stride;
int cmesh_level;
double T, delta_t, cfl;
Expand Down Expand Up @@ -363,6 +391,12 @@ main (int argc, char *argv[])
sc_options_add_switch (opt, 'O', "test-cad-cylinder", &test_cad_cylinder,
"Use a cad cmesh to compare linear and cad geometry performance."
" If this option is used -o is enabled automatically. Not allowed with -f and -c.");
sc_options_add_switch (opt, 'C', "test-hybridcube", &test_hybrid_cube,
"Use a hypercube with Tet, Prism and Hex elements as cmesh."
" If this option is used -o is enabled automatically. Not allowed with -f and -c.");
sc_options_add_switch (opt, 'H', "test-hexcube", &test_hex_cube,
"Use a hypercube with Hex elements as cmesh."
" If this option is used -o is enabled automatically. Not allowed with -f and -c.");
sc_options_add_int (opt, 'l', "level", &level, 0, "The initial uniform refinement level of the forest.");
sc_options_add_int (opt, 'r', "rlevel", &level_diff, 1,
"The number of levels that the forest is refined from the initial level.");
Expand All @@ -388,11 +422,12 @@ main (int argc, char *argv[])
/* check for wrong usage of arguments */
if (first_argc < 0 || first_argc != argc || dim < 2 || dim > 3
|| (cmeshfileprefix == NULL && mshfileprefix == NULL && test_tet == 0 && test_cad_cylinder == 0
&& test_linear_cylinder == 0)
&& test_linear_cylinder == 0 && test_hybrid_cube == 0 && test_hex_cube == 0)
|| stride <= 0 || (num_files - 1) * stride >= mpisize || cfl < 0 || T <= 0
|| test_tet + test_linear_cylinder + test_cad_cylinder > 1
|| (cmesh_level >= 0 && (!test_linear_cylinder && !test_cad_cylinder))
|| ((mshfileprefix != NULL || cmeshfileprefix != NULL) && (test_linear_cylinder || test_cad_cylinder || test_tet))
|| test_tet + test_linear_cylinder + test_cad_cylinder + test_hybrid_cube + test_hex_cube > 1
|| (cmesh_level >= 0 && (!test_linear_cylinder && !test_cad_cylinder && !test_hybrid_cube && !test_hex_cube))
|| ((mshfileprefix != NULL || cmeshfileprefix != NULL)
&& (test_linear_cylinder || test_cad_cylinder || test_tet || test_hybrid_cube || test_hex_cube))
|| (mshfileprefix == NULL && use_cad)) {
sc_options_print_usage (t8_get_package_id (), SC_LP_ERROR, opt, NULL);
return 1;
Expand Down Expand Up @@ -427,6 +462,14 @@ main (int argc, char *argv[])
sc_intpow (2, cmesh_level), sc_intpow (2, cmesh_level), test_cad_cylinder);
test_linear_cylinder ? vtu_prefix = "test_linear_cylinder" : vtu_prefix = "test_cad_cylinder";
}
else if (test_hybrid_cube) {
cmesh = t8_cmesh_new_hypercube_hybrid (sc_MPI_COMM_WORLD, 0, 0);
vtu_prefix = "test_hypercube_hybrid";
}
else if (test_hex_cube) {
cmesh = t8_cmesh_new_hypercube (T8_ECLASS_HEX, sc_MPI_COMM_WORLD, 0, 0, 0);
vtu_prefix = "test_hypercube_hex";
}
else {
T8_ASSERT (cmeshfileprefix != NULL);
cmesh
Expand Down
Loading