Skip to content

Commit

Permalink
Merge branch 'main' into cleanup_more
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasdreyer authored Feb 28, 2025
2 parents 8ab5509 + f4562f2 commit ac9d251
Show file tree
Hide file tree
Showing 16 changed files with 29 additions and 220 deletions.
9 changes: 6 additions & 3 deletions example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,18 @@ add_t8_example( NAME t8_example_geometries SOURCES geometry/t8_exam
add_t8_example( NAME t8_cmesh_load_save SOURCES IO/cmesh/t8_cmesh_load_save.cxx )
add_t8_example( NAME t8_read_msh_file SOURCES IO/cmesh/gmsh/t8_read_msh_file.cxx )
add_t8_example( NAME t8_load_and_refine_square_w_hole SOURCES IO/cmesh/gmsh/t8_load_and_refine_square_w_hole.cxx )
add_t8_example( NAME t8_write_cmesh_netcdf SOURCES IO/cmesh/netcdf/t8_write_cmesh_netcdf.cxx )
add_t8_example( NAME t8_read_tetgen SOURCES IO/cmesh/tetgen/t8_read_tetgen_file.cxx )
add_t8_example( NAME t8_time_tetgen SOURCES IO/cmesh/tetgen/t8_time_tetgen_file.cxx )
add_t8_example( NAME t8_forest_tetgen SOURCES IO/cmesh/tetgen/t8_forest_from_tetgen.cxx )
add_t8_example( NAME t8_read_triangle SOURCES IO/cmesh/triangle/t8_read_triangle_file.cxx )
add_t8_example( NAME t8_cmesh_read_from_vtk SOURCES IO/cmesh/vtk/t8_cmesh_read_from_vtk.cxx )

add_t8_example( NAME t8_netcdf_compilation_status SOURCES IO/forest/netcdf/t8_netcdf_status.c )
add_t8_example( NAME t8_write_forest_netcdf SOURCES IO/forest/netcdf/t8_write_forest_netcdf.cxx )
if(T8CODE_ENABLE_NETCDF)
add_t8_example( NAME t8_write_cmesh_netcdf SOURCES IO/cmesh/netcdf/t8_write_cmesh_netcdf.cxx )
add_t8_example( NAME t8_netcdf_compilation_status SOURCES IO/forest/netcdf/t8_netcdf_status.c )
add_t8_example( NAME t8_write_forest_netcdf SOURCES IO/forest/netcdf/t8_write_forest_netcdf.cxx )
endif()

add_t8_example( NAME t8_gmsh_to_vtk SOURCES IO/forest/gmsh/t8_gmsh_to_vtk.cxx )

add_t8_example( NAME t8_example_spheres SOURCES remove/t8_example_spheres.cxx )
Expand Down
18 changes: 10 additions & 8 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ if( T8CODE_ENABLE_NETCDF )
target_compile_definitions(T8 PUBLIC
T8_WITH_NETCDF
$<$<AND:$<BOOL:${NETCDF_HAVE_NETCDF_PAR}>,$<BOOL:${T8CODE_ENABLE_MPI}>>:T8_WITH_NETCDF_PAR> )
target_sources( T8 PRIVATE
t8_netcdf.c
t8_cmesh/t8_cmesh_netcdf.c
t8_forest/t8_forest_netcdf.cxx
)
install( FILES
t8_cmesh_netcdf.h
t8_forest_netcdf.h
t8_netcdf.h
DESTINATION include)
endif()

set_target_properties( T8 PROPERTIES OUTPUT_NAME t8 )
Expand Down Expand Up @@ -88,8 +98,6 @@ target_sources( T8 PRIVATE
t8_eclass.c
t8_element_shape.c
t8_element.cxx
t8_mesh.c
t8_netcdf.c
t8_refcount.c
t8_version.c
t8_vtk.c
Expand All @@ -99,7 +107,6 @@ target_sources( T8 PRIVATE
t8_cmesh/t8_cmesh_stash.c
t8_cmesh/t8_cmesh_vtk_reader.cxx
t8_cmesh/t8_cmesh_save.cxx
t8_cmesh/t8_cmesh_netcdf.c
t8_cmesh/t8_cmesh_trees.cxx
t8_cmesh/t8_cmesh_commit.cxx
t8_cmesh/t8_cmesh_partition.cxx
Expand All @@ -118,7 +125,6 @@ target_sources( T8 PRIVATE
t8_forest/t8_forest_ghost.cxx
t8_forest/t8_forest_iterate.cxx
t8_forest/t8_forest_balance.cxx
t8_forest/t8_forest_netcdf.cxx
t8_forest/t8_forest_search/t8_forest_search.cxx
t8_geometry/t8_geometry.cxx
t8_geometry/t8_geometry_helpers.c
Expand Down Expand Up @@ -185,18 +191,14 @@ install( FILES
t8.h
t8_cmesh.h
t8_cmesh.hxx
t8_cmesh_netcdf.h
t8_cmesh_readmshfile.h
t8_cmesh_tetgen.h
t8_cmesh_triangle.h
t8_cmesh_vtk_reader.hxx
t8_eclass.h
t8_element.h
t8_element_shape.h
t8_forest_netcdf.h
t8_mat.h
t8_mesh.h
t8_netcdf.h
t8_refcount.h
t8_types/t8_vec.hxx
t8_version.h
Expand Down
4 changes: 2 additions & 2 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ defaultpyramidincludedir = $(schemesdefaultincludedir)/t8_default_pyramid

libt8_generated_headers = src/t8_config.h
libt8_installed_headers = \
src/t8.h src/t8_eclass.h src/t8_mesh.h \
src/t8.h src/t8_eclass.h \
src/t8_element.hxx src/t8_element.h \
src/t8_element_c_interface.h \
src/t8_refcount.h src/t8_cmesh.hxx src/t8_cmesh.h src/t8_cmesh_triangle.h \
Expand Down Expand Up @@ -108,7 +108,7 @@ libt8_internal_headers = \
src/t8_vtk/t8_vtk_writer_helper.hxx \
src/t8_vtk/t8_vtk_write_ASCII.hxx
libt8_compiled_sources = \
src/t8.c src/t8_eclass.c src/t8_mesh.c \
src/t8.c src/t8_eclass.c \
src/t8_element.cxx \
src/t8_vec.cxx \
src/t8_element_c_interface.cxx \
Expand Down
2 changes: 1 addition & 1 deletion src/t8_cmesh/t8_cmesh_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ typedef struct t8_cmesh

int set_partition; /**< If nonzero the cmesh is partitioned.
If zero each process has the whole cmesh. */
int face_knowledge; /**< If partitioned the level of face knowledge that is expected. \ref t8_mesh_set_partitioned;
int face_knowledge; /**< If partitioned the level of face knowledge that is expected. \ref t8_cmesh_set_partitioned;
see \ref t8_cmesh_set_partition.
*/

Expand Down
51 changes: 0 additions & 51 deletions src/t8_mesh.c

This file was deleted.

130 changes: 0 additions & 130 deletions src/t8_mesh.h

This file was deleted.

16 changes: 1 addition & 15 deletions src/t8_netcdf.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ t8_netcdf_variable_t *
t8_netcdf_create_var (t8_netcdf_variable_type_t var_type, const char *var_name, const char *var_long_name,
const char *var_unit, sc_array_t *var_data)
{
#if T8_WITH_NETCDF
T8_ASSERT ((var_type == T8_NETCDF_INT && var_data->elem_size == 4)
|| (var_type == T8_NETCDF_INT64 && var_data->elem_size == 8)
|| (var_type == T8_NETCDF_DOUBLE && var_data->elem_size == 8));
Expand All @@ -39,39 +38,26 @@ t8_netcdf_create_var (t8_netcdf_variable_type_t var_type, const char *var_name,
netcdf_variable->variable_units = var_unit;
netcdf_variable->var_user_data = var_data;
return netcdf_variable;
#else
t8_global_errorf ("This version of t8code is not compiled with netCDF support.\n");
return NULL;
#endif
}

/* Create an extern NetCDF integer variable */
t8_netcdf_variable_t *
t8_netcdf_create_integer_var (const char *var_name, const char *var_long_name, const char *var_unit,
sc_array_t *var_data)
{
#if T8_WITH_NETCDF
t8_netcdf_variable_type_t var_type;
/* Check whether 32-bit (4-byte) integer or 64-bit integer data sholud be written */
var_type = (var_data->elem_size > 4) ? T8_NETCDF_INT64 : T8_NETCDF_INT;
return t8_netcdf_create_var (var_type, var_name, var_long_name, var_unit, var_data);
#else
t8_global_errorf ("This version of t8code is not compiled with netCDF support.\n");
return NULL;
#endif
}

/* Create an extern NetCDF double variable */
t8_netcdf_variable_t *
t8_netcdf_create_double_var (const char *var_name, const char *var_long_name, const char *var_unit,
sc_array_t *var_data)
{
#if T8_WITH_NETCDF

return t8_netcdf_create_var (T8_NETCDF_DOUBLE, var_name, var_long_name, var_unit, var_data);
#else
t8_global_errorf ("This version of t8code is not compiled with netCDF support.\n");
return NULL;
#endif
}

/* Free the memory of the allocated NetCDF variable */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <t8_schemes/t8_default/t8_default_common/t8_default_common.hxx>

/* Forward declaration of the scheme so we can use it as an argument in the eclass schemes function. */
struct t8_scheme;
class t8_scheme;

/** The class holding a hexahedral element in the default scheme.
* We make this definition public for interoperability of element classes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <t8_schemes/t8_default/t8_default_line/t8_dline_bits.h>

/* Forward declaration of the scheme so we can use it as an argument in the eclass schemes function. */
struct t8_scheme;
class t8_scheme;

/** Provide an implementation for the line element class.
* It is written as a self-contained library in the t8_dline_* files.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include <t8_schemes/t8_default/t8_default_prism/t8_dprism_bits.h>

/* Forward declaration of the scheme so we can use it as an argument in the eclass schemes function. */
struct t8_scheme;
class t8_scheme;

/** Provide an implementation for the prism element class.
* It is written as a self-contained library in the t8_dprism_* files.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <t8_schemes/t8_default/t8_default_pyramid/t8_dpyramid_bits.h>

/* Forward declaration of the scheme so we can use it as an argument in the eclass schemes function. */
struct t8_scheme;
class t8_scheme;

/** Provide an implementation for the pyramid element class. It is written as a self-contained library in the
* t8_dpyramid_* files.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <t8_schemes/t8_default/t8_default_common/t8_default_common.hxx>

/* Forward declaration of the scheme so we can use it as an argument in the eclass schemes function. */
struct t8_scheme;
class t8_scheme;

/** The structure holding a quadrilateral element in the default scheme.
* We make this definition public for interoperability of element classes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include <t8_schemes/t8_default/t8_default_tet/t8_dtet_bits.h>

/* Forward declaration of the scheme so we can use it as an argument in the eclass schemes function. */
struct t8_scheme;
class t8_scheme;

class t8_default_scheme_tet: public t8_default_scheme_common<t8_default_scheme_tet> {
public:
Expand Down
Loading

0 comments on commit ac9d251

Please sign in to comment.