Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
cburstedde committed Mar 11, 2021
2 parents fe10cf4 + 5290c45 commit 3a78fd2
Show file tree
Hide file tree
Showing 17 changed files with 134 additions and 45 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
name: Continuous integration
name: CI for Autotools

on: [push, pull_request]

jobs:

linux-multi:
runs-on: ubuntu-latest
name: Test builds on Linux
name: Autotools build on Linux
steps:
- name: Install system dependencies
run: |
sudo apt-get update -yq
sudo apt-get install -yq --no-install-recommends zlib1g-dev libmpich-dev mpich
sudo apt-get install -yq --no-install-recommends \
zlib1g-dev libmpich-dev mpich
- name: Checkout source code
uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -72,7 +73,8 @@ jobs:
- name: Install system dependencies
run: |
sudo apt-get update -yq
sudo apt-get install -yq --no-install-recommends zlib1g-dev libmpich-dev mpich
sudo apt-get install -yq --no-install-recommends \
zlib1g-dev libmpich-dev mpich
- name: Checkout source code
uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -105,14 +107,15 @@ jobs:
make -j install V=0
cd ..
tarball:
linux-tarball:
runs-on: ubuntu-latest
name: Pack tarball on Linux
steps:
- name: Install system dependencies
run: |
sudo apt-get update -yq
sudo apt-get install -yq --no-install-recommends zlib1g-dev libmpich-dev mpich
sudo apt-get install -yq --no-install-recommends \
zlib1g-dev libmpich-dev mpich
- name: Checkout source code
uses: actions/checkout@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ config/ltoptions.m4
config/ltsugar.m4
config/ltversion.m4
config/lt~obsolete.m4
config/p4est_autotools_config.h.in
configure
src/p4est_autotools_config.h.in
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ DIST_SUBDIRS = $(SUBDIRS)
EXTRA_DIST += \
bootstrap p4estindent build-aux/git-version-gen build-aux/git2cl bugs doc
DISTCLEANFILES += @P4EST_DISTCLEAN@ \
_configs.sed src/p4est_config.h config/p4est_autotools.pc
_configs.sed config/p4est_config.h config/p4est_autotools.pc

.PHONY: lint ChangeLog

Expand Down
6 changes: 4 additions & 2 deletions config/p4est_autotools.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ libdir=@libdir@
includedir=@includedir@

p4est_CC=@CC@
p4est_CFLAGS=@CPPFLAGS@ @CFLAGS@

Name: p4est
Description: p4est manages a collection---a forest---of octrees in parallel.
Expand All @@ -13,5 +14,6 @@ URL: https://www.p4est.org/

Requires: libsc >= 2.3

Cflags: @CPPFLAGS@ @CFLAGS@
Libs: @LDFLAGS@ @LIBS@
Cflags: -I@includedir@
Libs: -L@libdir@ -lp4est
Libs.private: @LDFLAGS@ @LIBS@
5 changes: 3 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ AC_INIT([p4est],
[m4_esyscmd([build-aux/git-version-gen .tarball-version])],
[[email protected]])
AC_PREREQ(2.61)
AC_CONFIG_HEADERS([src/p4est_autotools_config.h])
AC_CONFIG_HEADERS([config/p4est_autotools_config.h])
AC_CONFIG_SRCDIR([src/p4est.h])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([config])
AC_PREFIX_DEFAULT([$PWD/local])
AX_PREFIX_CONFIG_H([src/p4est_config.h])
AX_PREFIX_CONFIG_H([config/p4est_config.h])
AM_INIT_AUTOMAKE([parallel-tests subdir-objects])
AM_SILENT_RULES
AM_EXTRA_RECURSIVE_TARGETS([justlibs])
PKG_INSTALLDIR
SC_VERSION([P4EST])

Expand Down
1 change: 1 addition & 0 deletions doc/author_krasnansky.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I place my contributions to p4est under FreeBSD license. Juraj Krasnansky ([email protected])
2 changes: 1 addition & 1 deletion sc
3 changes: 2 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Makefile.am in src
# included non-recursively from toplevel directory

libp4est_generated_headers = src/p4est_config.h
libp4est_generated_headers = config/p4est_config.h
libp4est_installed_headers = src/p4est_base.h
libp4est_internal_headers =
libp4est_compiled_sources = src/p4est_base.c
Expand Down Expand Up @@ -74,6 +74,7 @@ endif
# this variable is used for headers that are not publicly installed
P4EST_CPPFLAGS =

justlibs-local: src/libp4est.la
lib_LTLIBRARIES += src/libp4est.la
src_libp4est_la_SOURCES = \
$(libp4est_internal_headers) \
Expand Down
5 changes: 4 additions & 1 deletion src/p4est.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,10 @@ void p4est_balance (p4est_t * p4est,
* for uniform partitioning.
* When running with mpisize == 1, never called.
* Otherwise, called in order for all quadrants
* if not NULL.
* if not NULL. A weighting function with constant
* weight 1 on each quadrant is equivalent
* to weight_fn == NULL but other constant weightings
* may result in different uniform partitionings.
*/
void p4est_partition (p4est_t * p4est,
int allow_for_coarsening,
Expand Down
9 changes: 5 additions & 4 deletions src/p4est_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,11 @@
/*------------------------ QUERY API CHANGES -------------------------*/
/*---- definitions to allow user code to query the p4est library -----*/

/** We do no longer dereference unneeded pointers in p4est_transfer_.
*/
/** We do no longer dereference unneeded pointers in p4est_transfer_. */
#define P4EST_COMM_TRANSFER_NULL

/** The \ref p4est_connectivity_new_disk function now accepts a bool arg.
* The same holds for \ref p4est_wrap_new_disk.
*/
* The same holds for \ref p4est_wrap_new_disk. */
#define P4EST_CONN_DISK_PERIODIC

/** The \ref p4est_search_local function replaces \ref p4est_search.
Expand All @@ -69,6 +67,9 @@
*/
#define P4EST_SEARCH_LOCAL

/** We expose the \ref p4est_vtk_write_cell_datav function. */
#define P4EST_VTK_CELL_DATAV

/*--------------------------------------------------------------------*/

SC_EXTERN_C_BEGIN;
Expand Down
6 changes: 5 additions & 1 deletion src/p4est_extended.h
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,11 @@ void p4est_balance_subtree_ext (p4est_t * p4est,
* \param [in] partition_for_coarsening If true, the partition
* is modified to allow one level of coarsening.
* \param [in] weight_fn A weighting function or NULL
* for uniform partitioning.
* for uniform partitioning. A weighting function
* with constant weight 1 on each quadrant is
* equivalent to weight_fn == NULL but other constant
* weightings may result in different uniform
* partitionings.
* \return The global number of shipped quadrants
*/
p4est_gloidx_t p4est_partition_ext (p4est_t * p4est,
Expand Down
1 change: 1 addition & 0 deletions src/p4est_to_p8est.h
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@
#define p4est_vtk_write_file p8est_vtk_write_file
#define p4est_vtk_write_header p8est_vtk_write_header
#define p4est_vtk_write_cell_dataf p8est_vtk_write_cell_dataf
#define p4est_vtk_write_cell_datav p8est_vtk_write_cell_datav
#define p4est_vtk_write_cell_data p8est_vtk_write_cell_data
#define p4est_vtk_write_point_dataf p8est_vtk_write_point_dataf
#define p4est_vtk_write_point_data p8est_vtk_write_point_data
Expand Down
23 changes: 2 additions & 21 deletions src/p4est_vtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1009,27 +1009,7 @@ p4est_vtk_write_point_dataf (p4est_vtk_context_t * cont,
return cont;
}

/** Write VTK cell data.
*
* This function exports custom cell data to the vtk file; it is functionally
* the same as \b p4est_vtk_write_cell_dataf with the only difference being
* that instead of a variable argument list, an initialized \a va_list is
* passed as the last argument. The \a va_list is initialized from the variable
* argument list of the calling function.
*
* \note This function is actually called from \b p4est_vtk_write_cell_dataf
* and does all of the work.
*
* \param [in,out] cont A vtk context created by \ref p4est_vtk_context_new.
* \param [in] num_point_scalars Number of point scalar datasets to output.
* \param [in] num_point_vectors Number of point vector datasets to output.
* \param [in,out] ap An initialized va_list used to access the
* scalar/vector data.
*
* \return On success, the context that has been passed in.
* On failure, returns NULL and deallocates the context.
*/
static p4est_vtk_context_t *
p4est_vtk_context_t *
p4est_vtk_write_cell_datav (p4est_vtk_context_t * cont,
int write_tree, int write_level,
int write_rank, int wrap_rank,
Expand Down Expand Up @@ -1064,6 +1044,7 @@ p4est_vtk_write_cell_datav (p4est_vtk_context_t * cont,
char vtkCellDataString[BUFSIZ] = "";
int printed = 0;

P4EST_ASSERT (num_cell_scalars >= 0 && num_cell_vectors >= 0);
P4EST_ASSERT (cont != NULL && cont->writing);
P4EST_ASSERT (wrap_rank >= 0);

Expand Down
42 changes: 42 additions & 0 deletions src/p4est_vtk.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,48 @@ p4est_vtk_context_t *p4est_vtk_write_cell_dataf (p4est_vtk_context_t * cont,
int num_cell_scalars,
int num_cell_vectors, ...);

/** Write VTK cell data.
*
* This function exports custom cell data to the vtk file; it is functionally
* the same as \b p4est_vtk_write_cell_dataf with the only difference being
* that instead of a variable argument list, an initialized \a va_list is
* passed as the last argument. That means \a va_start has already been called.
*
* The \a va_list is initialized from the variable argument list of the calling
* function. Elements of va_list are processed as "pairs" of (fieldname,
* fieldvalues). That means <va_list[0], va_list[1]> represents one pair,
* <va_list[2], va_list[3]> next one and so on.
* Each 'fieldname' shall be a char string containing the name of the data
* contained in the following 'fieldvalues'. Each of the 'fieldvalues'
* shall be an `sc_array_t *` holding double variables.
* The cell scalar pairs come first, followed by the cell vector pairs, followed
* by VTK context \a cont (same as the first argument).
* The number of sizeof (double) entries in each sc_array must be exactly \a
* p4est->local_num_quadrants for scalar data and \a
* 3*p4est->local_num_quadrants for vector data.
*
* \note This function is actually called from \b p4est_vtk_write_cell_dataf
* and does all of the work.
*
* \param [in,out] cont A VTK context created by \ref p4est_vtk_context_new.
* \param [in] write_tree Boolean to determine if the tree id should be output.
* \param [in] write_level Boolean to determine if the tree levels should be output.
* \param [in] write_rank Boolean to determine if the MPI rank should be output.
* \param [in] wrap_rank Number to wrap around the rank with a modulo operation.
* Can be 0 for no wrapping.
* \param [in] num_cell_scalars Number of cell scalar datasets to output.
* \param [in] num_cell_vectors Number of cell vector datasets to output.
* \param [in,out] ap An initialized va_list used to access the
* scalar/vector data.
*
* \return On success, the context that has been passed in.
* On failure, returns NULL and deallocates the context.
*/
p4est_vtk_context_t *p4est_vtk_write_cell_datav
(p4est_vtk_context_t * cont,
int write_tree, int write_level, int write_rank, int wrap_rank,
int num_cell_scalars, int num_cell_vectors, va_list ap);

/** This is an alternate version of the varargs function.
* Works exactly the same otherwise.
* TODO: implement, also for vectors and point data.
Expand Down
5 changes: 4 additions & 1 deletion src/p8est.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,10 @@ void p8est_balance (p8est_t * p8est,
* for uniform partitioning.
* When running with mpisize == 1, never called.
* Otherwise, called in order for all quadrants
* if not NULL.
* if not NULL. A weighting function with constant
* weight 1 on each quadrant is equivalent
* to weight_fn == NULL but other constant weightings
* may result in different uniform partitionings.
*/
void p8est_partition (p8est_t * p8est,
int allow_for_coarsening,
Expand Down
6 changes: 5 additions & 1 deletion src/p8est_extended.h
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,11 @@ void p8est_balance_subtree_ext (p8est_t * p8est,
* \param [in] partition_for_coarsening If true, the partition
* is modified to allow one level of coarsening.
* \param [in] weight_fn A weighting function or NULL
* for uniform partitioning.
* for uniform partitioning. A weighting function
* with constant weight 1 on each quadrant is
* equivalent to weight_fn == NULL but other constant
* weightings may result in different uniform
* partitionings.
* \return The global number of shipped quadrants
*/
p4est_gloidx_t p8est_partition_ext (p8est_t * p8est,
Expand Down
46 changes: 44 additions & 2 deletions src/p8est_vtk.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ p8est_vtk_context_t *p8est_vtk_write_header (p8est_vtk_context_t * cont);
* Each 'fieldname' argument shall be a char string containing the name of the data
* contained in the following 'fieldvalues'. Each of the 'fieldvalues'
* arguments shall be an sc_array_t * holding double variables. The number of
* doubles in each sc_array must be exactly \a p4est->local_num_quadrants for
* scalar data and \a 3*p4est->local_num_quadrants for vector data.
* doubles in each sc_array must be exactly \a p8est->local_num_quadrants for
* scalar data and \a 3*p8est->local_num_quadrants for vector data.
*
* \note The current p8est_vtk_context_t structure, \a cont, must be the first
* and the last argument
Expand All @@ -199,6 +199,48 @@ p8est_vtk_context_t *p8est_vtk_write_cell_dataf (p8est_vtk_context_t * cont,
int num_cell_scalars,
int num_cell_vectors, ...);

/** Write VTK cell data.
*
* This function exports custom cell data to the vtk file; it is functionally
* the same as \b p8est_vtk_write_cell_dataf with the only difference being
* that instead of a variable argument list, an initialized \a va_list is
* passed as the last argument. That means \a va_start has already been called.
*
* The \a va_list is initialized from the variable argument list of the calling
* function. Elements of va_list are processed as "pairs" of (fieldname,
* fieldvalues). That means <va_list[0], va_list[1]> represents one pair,
* <va_list[2], va_list[3]> next one and so on.
* Each 'fieldname' shall be a char string containing the name of the data
* contained in the following 'fieldvalues'. Each of the 'fieldvalues'
* shall be an `sc_array_t *` holding double variables.
* The cell scalar pairs come first, followed by the cell vector pairs, followed
* by VTK context \a cont (same as the first argument).
* The number of sizeof (double) entries in each sc_array must be exactly \a
* p8est->local_num_quadrants for scalar data and \a
* 3*p8est->local_num_quadrants for vector data.
*
* \note This function is actually called from \b p8est_vtk_write_cell_dataf
* and does all of the work.
*
* \param [in,out] cont A VTK context created by \ref p8est_vtk_context_new.
* \param [in] write_tree Boolean to determine if the tree id should be output.
* \param [in] write_level Boolean to determine if the tree levels should be output.
* \param [in] write_rank Boolean to determine if the MPI rank should be output.
* \param [in] wrap_rank Number to wrap around the rank with a modulo operation.
* Can be 0 for no wrapping.
* \param [in] num_cell_scalars Number of cell scalar datasets to output.
* \param [in] num_cell_vectors Number of cell vector datasets to output.
* \param [in,out] ap An initialized va_list used to access the
* scalar/vector data.
*
* \return On success, the context that has been passed in.
* On failure, returns NULL and deallocates the context.
*/
p8est_vtk_context_t *p8est_vtk_write_cell_datav
(p8est_vtk_context_t * cont,
int write_tree, int write_level, int write_rank, int wrap_rank,
int num_cell_scalars, int num_cell_vectors, va_list ap);

/** Write VTK point data.
*
* Writing a VTK file is split into a few routines.
Expand Down

0 comments on commit 3a78fd2

Please sign in to comment.