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

New SFC Discussion #829

Draft
wants to merge 42 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
ad6c93c
added new scheme
ililikakis Jun 14, 2023
bfac539
destroy mempool
lukasdreyer Jun 14, 2023
cba66b5
replace c-array by c++ array
lukasdreyer Jun 14, 2023
76c5853
Remove layer of abstraction for level function, others to follow
lukasdreyer Jun 15, 2023
661a1e7
replace type int by bitset
lukasdreyer Jun 15, 2023
f60a9f2
remove no longer needed if constexpr vertex statements
lukasdreyer Jun 15, 2023
4b7938a
introduce shorter helper types
lukasdreyer Jun 15, 2023
ab07393
Add new cmesh, with one of each 3D eclass types, not connected
lukasdreyer Jun 19, 2023
c9652a5
Adapt fixed values for pyramid
lukasdreyer Jun 19, 2023
ead453d
Small fixes
lukasdreyer Jun 19, 2023
af18b06
Document element type
lukasdreyer Jun 19, 2023
4e38915
Introduce Lookup tables
lukasdreyer Jun 19, 2023
07fe283
Adapt child to types
lukasdreyer Jun 19, 2023
897b258
Adapt parent to types
lukasdreyer Jun 19, 2023
29575c5
Cleanup
lukasdreyer Jun 19, 2023
1a396da
Adapt ancestor to types
lukasdreyer Jun 19, 2023
7dab06b
Adapt linear id to types
lukasdreyer Jun 19, 2023
0951fa3
Adapt vertex information to types
lukasdreyer Jun 19, 2023
e45fc11
Adapt inside_roo to types
lukasdreyer Jun 19, 2023
d420c3e
Add benchmark for forest_new for different schemes
lukasdreyer Jun 19, 2023
e5a849d
Merge branch 'main' into enhancement_standalone_scheme
lukasdreyer Jul 31, 2023
20a5488
Merge branch 'main' into enhancement_standalone_scheme
lukasdreyer Jul 31, 2023
a1fede6
SFC changes for face connectivity
lukasdreyer Aug 14, 2023
591cf11
adapt geometry of tet cmesh to standalone scheme. Now default scheme …
lukasdreyer Aug 14, 2023
3ab3d93
add new cmesh examples
lukasdreyer Aug 14, 2023
ebc7e89
adapt tests for new scheme
lukasdreyer Aug 14, 2023
5ce6a43
adapt example for standalone scheme
lukasdreyer Aug 14, 2023
01df6ac
remove no longer needed header
lukasdreyer Aug 14, 2023
c3a32ff
Merge branch 'main' into enhancement_standalone_scheme
lukasdreyer Aug 14, 2023
a149830
Merge branch 'main' into enhancement_standalone_scheme
lukasdreyer Nov 3, 2023
492d351
spellcheck and indent
lukasdreyer Nov 3, 2023
dfda315
temporarily disable cmesh negative volume check
lukasdreyer Nov 3, 2023
66f3c6d
indent tests
lukasdreyer Nov 3, 2023
d86322d
reinclude Makefile
lukasdreyer Nov 3, 2023
e7e697b
revert geometry tryouts
lukasdreyer Nov 3, 2023
b988ee0
Enforce c++ 17
lukasdreyer Nov 3, 2023
d56f46e
fix compiler warnings
lukasdreyer Nov 3, 2023
12e8a29
fix spelling
lukasdreyer Nov 3, 2023
73b0c05
fix compiler error
lukasdreyer Nov 3, 2023
285157c
really fix compiler error
lukasdreyer Nov 3, 2023
68ef640
Restrict parallelism of make check to 8 procs
lukasdreyer Nov 9, 2023
80611bf
Remove output, because tests are currently failing
lukasdreyer Nov 9, 2023
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
6 changes: 3 additions & 3 deletions .github/workflows/tests_t8code_linkage_parallel_debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ jobs:
- name: make install
run: cd build_netcdf && make install -j
- name: make check
run: cd build_netcdf && make check -j V=0 CFLAGS="$CFLAGS_var -Werror" CXXFLAGS="$CXXFLAGS_var -Werror"
run: cd build_netcdf && make check -j8 V=0 CFLAGS="$CFLAGS_var -Werror" CXXFLAGS="$CXXFLAGS_var -Werror"
- name: OnFailUploadLog
if: failure()
uses: actions/upload-artifact@v3
Expand All @@ -215,7 +215,7 @@ jobs:
- name: make install
run: cd build_occ && make install -j
- name: make check
run: cd build_occ && make check -j V=0 CFLAGS="$CFLAGS_var -Werror -I/usr/include/opencascade" CXXFLAGS="$CXXFLAGS_var -Werror -I/usr/include/opencascade"
run: cd build_occ && make check -j8 V=0 CFLAGS="$CFLAGS_var -Werror -I/usr/include/opencascade" CXXFLAGS="$CXXFLAGS_var -Werror -I/usr/include/opencascade"
- name: OnFailUploadLog
if: failure()
uses: actions/upload-artifact@v3
Expand All @@ -238,7 +238,7 @@ jobs:
- name: make install
run: cd build_vtk && make install -j
- name: make check
run: cd build_vtk && make check -j V=0 CFLAGS="$CFLAGS_var -Werror -isystem/usr/local/include/vtk-9.1" CXXFLAGS="$CXXFLAGS_var -Werror -isystem/usr/local/include/vtk-9.1"
run: cd build_vtk && make check -j8 V=0 CFLAGS="$CFLAGS_var -Werror -isystem/usr/local/include/vtk-9.1" CXXFLAGS="$CXXFLAGS_var -Werror -isystem/usr/local/include/vtk-9.1"
- name: OnFailUploadLog
if: failure()
uses: actions/upload-artifact@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests_t8code_linkage_parallel_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ jobs:
- name: make install
run: cd build_netcdf && make install -j
- name: make check
run: cd build_netcdf && make check -j V=0 CFLAGS="$CFLAGS_var -Werror" CXXFLAGS="$CXXFLAGS_var -Werror"
run: cd build_netcdf && make check -j8 V=0 CFLAGS="$CFLAGS_var -Werror" CXXFLAGS="$CXXFLAGS_var -Werror"
- name: OnFailUploadLog
if: failure()
uses: actions/upload-artifact@v3
Expand All @@ -215,7 +215,7 @@ jobs:
- name: make install
run: cd build_occ && make install -j
- name: make check
run: cd build_occ && make check -j V=0 CFLAGS="$CFLAGS_var -Werror -I/usr/include/opencascade" CXXFLAGS="$CXXFLAGS_var -Werror -I/usr/include/opencascade"
run: cd build_occ && make check -j8 V=0 CFLAGS="$CFLAGS_var -Werror -I/usr/include/opencascade" CXXFLAGS="$CXXFLAGS_var -Werror -I/usr/include/opencascade"
- name: OnFailUploadLog
if: failure()
uses: actions/upload-artifact@v3
Expand All @@ -238,7 +238,7 @@ jobs:
- name: make install
run: cd build_vtk && make install -j
- name: make check
run: cd build_vtk && make check -j V=0 CFLAGS="$CFLAGS_var -Werror -isystem/usr/local/include/vtk-9.1" CXXFLAGS="$CXXFLAGS_var -Werror -isystem/usr/local/include/vtk-9.1"
run: cd build_vtk && make check -j8 V=0 CFLAGS="$CFLAGS_var -Werror -isystem/usr/local/include/vtk-9.1" CXXFLAGS="$CXXFLAGS_var -Werror -isystem/usr/local/include/vtk-9.1"
- name: OnFailUploadLog
if: failure()
uses: actions/upload-artifact@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests_t8code_parallel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ jobs:
- name: make install
run: cd build_release && make install -j
- name: make check
run: cd build_release && make check -j V=0 CFLAGS="$CFLAGS_var_release -Werror" CXXFLAGS="$CXXFLAGS_var_release -Werror"
run: cd build_release && make check -j8 V=0 CFLAGS="$CFLAGS_var_release -Werror" CXXFLAGS="$CXXFLAGS_var_release -Werror"
- name: OnFailUploadLog
if: failure()
uses: actions/upload-artifact@v3
Expand All @@ -244,7 +244,7 @@ jobs:
- name: make install
run: cd build_debug && make install -j
- name: make check
run: cd build_debug && make check -j V=0 CFLAGS="$CFLAGS_var_debug -Werror" CXXFLAGS="$CXXFLAGS_var_debug -Werror"
run: cd build_debug && make check -j8 V=0 CFLAGS="$CFLAGS_var_debug -Werror" CXXFLAGS="$CXXFLAGS_var_debug -Werror"
- name: OnFailUploadLog
if: failure()
uses: actions/upload-artifact@v3
Expand All @@ -267,7 +267,7 @@ jobs:
- name: make install
run: cd build_release_cpp && make install -j
- name: make check
run: cd build_release_cpp && make check -j V=0 CFLAGS="$CFLAGS_var_release -Werror" CXXFLAGS="$CXXFLAGS_var_release -Werror"
run: cd build_release_cpp && make check -j8 V=0 CFLAGS="$CFLAGS_var_release -Werror" CXXFLAGS="$CXXFLAGS_var_release -Werror"
- name: OnFailUploadLog
if: failure()
uses: actions/upload-artifact@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests_t8code_serial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ jobs:
- name: make install
run: cd build_serial_release && make install -j
- name: make check
run: cd build_serial_release && make check -j V=0 CFLAGS="$CFLAGS_var_release -Werror" CXXFLAGS="$CXXFLAGS_var_release -Werror"
run: cd build_serial_release && make check -j8 V=0 CFLAGS="$CFLAGS_var_release -Werror" CXXFLAGS="$CXXFLAGS_var_release -Werror"
- name: OnFailUploadLog
if: failure()
uses: actions/upload-artifact@v3
Expand All @@ -238,7 +238,7 @@ jobs:
- name: make install
run: cd build_serial_debug && make install -j
- name: make check
run: cd build_serial_debug && make check -j V=0 CFLAGS="$CFLAGS_var_debug -Werror" CXXFLAGS="$CXXFLAGS_var_debug -Werror"
run: cd build_serial_debug && make check -j8 V=0 CFLAGS="$CFLAGS_var_debug -Werror" CXXFLAGS="$CXXFLAGS_var_debug -Werror"
- name: OnFailUploadLog
if: failure()
uses: actions/upload-artifact@v3
Expand Down
2 changes: 2 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Makefile.t8.mk : Makefile.t8.pre
# install t8code m4 macros in the correct directory
t8aclocaldir = $(datadir)/aclocal
dist_t8aclocal_DATA = config/t8_include.m4 \
config/ax_cxx_compile_stdcxx.m4 \
config/t8_stdpp.m4 \
config/t8_netcdf.m4 \
config/t8_vtk.m4 \
Expand Down Expand Up @@ -71,6 +72,7 @@ DISTCLEANFILES += \
# non-recursive build
include src/Makefile.am
include src/t8_schemes/t8_default/Makefile.am
include src/t8_schemes/t8_standalone/Makefile.am
include test/Makefile.am
include example/Makefile.am
include tutorials/Makefile.am
Expand Down
2 changes: 2 additions & 0 deletions benchmarks/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

bin_PROGRAMS += \
benchmarks/t8_time_partition \
benchmarks/t8_time_new_compare \
benchmarks/t8_time_forest_partition \
benchmarks/t8_time_prism_adapt \
benchmarks/t8_time_fractal \
Expand All @@ -16,6 +17,7 @@ bin_PROGRAMS += \
benchmarks_t8_time_partition_SOURCES = benchmarks/time_partition.cxx
benchmarks_t8_time_forest_partition_SOURCES = benchmarks/time_forest_partition.cxx
benchmarks_t8_time_prism_adapt_SOURCES = benchmarks/t8_time_prism_adapt.cxx
benchmarks_t8_time_new_compare_SOURCES = benchmarks/t8_time_new_compare.cxx
benchmarks_t8_time_fractal_SOURCES = benchmarks/t8_time_fractal.cxx
benchmarks_t8_time_set_join_by_vertices_SOURCES = benchmarks/t8_time_set_join_by_vertices.cxx

Expand Down
124 changes: 124 additions & 0 deletions benchmarks/t8_time_new_compare.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
/*
This file is part of t8code.
t8code is a C library to manage a collection (a forest) of multiple
connected adaptive space-trees of general element types in parallel.

Copyright (C) 2015 the developers

t8code is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

t8code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with t8code; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

#include <t8.h>
#include <t8_cmesh.h>
#include <t8_cmesh/t8_cmesh_examples.h>
#include <t8_forest/t8_forest_general.h>
#include <t8_forest/t8_forest_io.h>
#include <t8_forest/t8_forest_geometrical.h>
#include <t8_schemes/t8_default/t8_default_cxx.hxx>
#include <t8_schemes/t8_standalone/t8_standalone_cxx.hxx>
#include <t8_cmesh_vtk_writer.h>
#include <sc_flops.h>
#include <sc_statistics.h>
#include <sc_options.h>


int
t8_adapt_callback (t8_forest_t forest,
t8_forest_t forest_from,
t8_locidx_t which_tree,
t8_locidx_t lelement_id,
t8_eclass_scheme_c *ts,
const int is_family,
const int num_elements, t8_element_t *elements[])
{
return 1;
}


void
t8_time_new_uniform (t8_cmesh_t cmesh, t8_scheme_cxx_t *scheme, int level, sc_MPI_Comm comm)
{
sc_flopinfo_t fi, snapshot;
sc_statinfo_t stats[1];
t8_forest_t forest;

/* Start timer */
sc_flops_start (&fi);
sc_flops_snap (&fi, &snapshot);
/* commit (= partition) the new cmesh */
forest = t8_forest_new_uniform (cmesh, scheme, level, 0, comm);
/* measure passed time */
sc_flops_shot (&fi, &snapshot);
sc_stats_set1 (&stats[0], snapshot.iwtime, "New uniform");
/* print stats */
sc_stats_compute (sc_MPI_COMM_WORLD, 1, stats);
sc_stats_print (t8_get_package_id (), SC_LP_STATISTICS, 1, stats, 1, 1);

/* cleanup */
t8_forest_unref (&forest);
}

int
main (int argc, char **argv)
{
int mpiret;
int level;
sc_MPI_Comm comm;
sc_options_t *opt;
t8_cmesh_t cmesh;
int eclass;

mpiret = sc_MPI_Init (&argc, &argv);
SC_CHECK_MPI (mpiret);

sc_init (sc_MPI_COMM_WORLD, 1, 1, NULL, SC_LP_ESSENTIAL);
t8_init (SC_LP_STATISTICS);
comm = sc_MPI_COMM_WORLD;

/** OPTIONS */
opt = sc_options_new (argv[0]);

sc_options_add_int (opt, 'l', "level", &level, 1,
"Refinement level.");
sc_options_add_int (opt, 'e', "eclass", &eclass, T8_ECLASS_HEX,
"Element Class");
/* parse command line options */
int first_argc = sc_options_parse (t8_get_package_id (), SC_LP_DEFAULT,
opt, argc, argv);
/* check for wrong usage of arguments */
if (first_argc < 0 || first_argc != argc || level < 0) {
sc_options_print_usage (t8_get_package_id (), SC_LP_ERROR, opt, NULL);
return 1;
}
sc_options_destroy (opt);


cmesh = t8_cmesh_new_from_class ((t8_eclass_t) eclass, comm);
// cmesh = t8_cmesh_new_multi_class_3D (comm);
t8_cmesh_ref(cmesh);

t8_scheme_cxx_t *scheme_standalone = t8_scheme_new_standalone_cxx ();
t8_scheme_cxx_t *scheme_default = t8_scheme_new_default_cxx ();
t8_time_new_uniform(cmesh, scheme_standalone, level, comm);
t8_time_new_uniform(cmesh, scheme_default, level, comm);


sc_finalize ();

mpiret = sc_MPI_Finalize ();
SC_CHECK_MPI (mpiret);

return 0;
}
Loading
Loading