Skip to content

Commit

Permalink
Merge develop-3d into feature-restart
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-griesbach committed Feb 26, 2024
2 parents 59c51df + a5d7a18 commit 4c34e7b
Show file tree
Hide file tree
Showing 725 changed files with 33,716 additions and 25,736 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:


mac:
runs-on: macos-11
runs-on: macos-14
name: CMake build on MacOS
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
Expand Down
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.13...3.20)
cmake_minimum_required(VERSION 3.14...3.28)

include(cmake/GitVersionGen.cmake)

Expand Down Expand Up @@ -158,4 +158,9 @@ if(applications)
add_subdirectory(applications)
endif(applications)

include(cmake/documentation.cmake)
include(cmake/documentation.cmake)

# --- auto-ignore build directory
if(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
file(GENERATE OUTPUT .gitignore CONTENT "*")
endif()
2 changes: 1 addition & 1 deletion Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.

EXCLUDE =
EXCLUDE = src/fclaw2d_to_3d.h

# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
Expand Down
52 changes: 23 additions & 29 deletions applications/clawpack/acoustics/2d/interface/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "interface_user.h"

#include <fclaw2d_clawpatch_options.h>
#include <fclaw2d_clawpatch.h>
#include <fclaw_clawpatch_options.h>
#include <fclaw_clawpatch.h>

#include <fc2d_clawpack46_options.h>
#include <fc2d_clawpack5_options.h>
Expand All @@ -35,38 +35,32 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <fc2d_clawpack5.h>

static void
create_domain_map (fclaw2d_global_t * glob)
create_domain_map (fclaw_global_t * glob)
{
const fclaw_options_t* fclaw_opt = fclaw2d_get_options(glob);
const fclaw_options_t* fclaw_opt = fclaw_get_options(glob);

fclaw2d_domain_t *domain =
fclaw2d_domain_new_unitsquare (glob->mpicomm, fclaw_opt->minlevel);
fclaw_domain_t *domain =
fclaw_domain_new_unitsquare (glob->mpicomm, fclaw_opt->minlevel);

/* Create "empty" mapping */
fclaw2d_map_context_t* cont = fclaw2d_map_new_nomap();
fclaw_map_context_t* cont = fclaw_map_new_nomap();

/* Store the domain in the glob struct */
fclaw2d_global_store_domain(glob, domain);
fclaw_global_store_domain(glob, domain);

/* Store the mapping context in the glob */
fclaw2d_global_store_map(glob, cont);
fclaw_map_store(glob, cont);

/* List some info */
fclaw2d_domain_list_levels (domain, FCLAW_VERBOSITY_ESSENTIAL);
fclaw2d_domain_list_neighbors (domain, FCLAW_VERBOSITY_DEBUG);
fclaw_domain_list_levels (domain, FCLAW_VERBOSITY_ESSENTIAL);
fclaw_domain_list_neighbors (domain, FCLAW_VERBOSITY_DEBUG);
}

static
void run_program(fclaw2d_global_t* glob)
void run_program(fclaw_global_t* glob)
{
/* ---------------------------------------------------------------
Set domain data.
--------------------------------------------------------------- */
fclaw2d_domain_data_new(glob->domain);


/* Initialize virtual table for ForestClaw */
fclaw2d_vtables_initialize(glob);
fclaw_vtables_initialize(glob);

/* Initialize virtual tables for solvers */
const user_options_t *user_opt = interface_get_options(glob);
Expand All @@ -84,9 +78,9 @@ void run_program(fclaw2d_global_t* glob)
/* ---------------------------------------------------------------
Run
--------------------------------------------------------------- */
fclaw2d_initialize(glob);
fclaw2d_run(glob);
fclaw2d_finalize(glob);
fclaw_initialize(glob);
fclaw_run(glob);
fclaw_finalize(glob);
}


Expand All @@ -100,14 +94,14 @@ main (int argc, char **argv)
/* Options */
user_options_t *user_opt;
fclaw_options_t *fclaw_opt;
fclaw2d_clawpatch_options_t *clawpatch_opt;
fclaw_clawpatch_options_t *clawpatch_opt;
fc2d_clawpack46_options_t *claw46_opt;
fc2d_clawpack5_options_t *claw5_opt;


/* Create new options packages */
fclaw_opt = fclaw_options_register(app, NULL, "fclaw_options.ini");
clawpatch_opt = fclaw2d_clawpatch_options_register(app, "clawpatch", "fclaw_options.ini");
clawpatch_opt = fclaw_clawpatch_2d_options_register(app, "clawpatch", "fclaw_options.ini");
claw46_opt = fc2d_clawpack46_options_register(app, "clawpack46", "fclaw_options.ini");
claw5_opt = fc2d_clawpack5_options_register(app, "clawpack5", "fclaw_options.ini");
user_opt = interface_options_register(app, "fclaw_options.ini");
Expand All @@ -125,12 +119,12 @@ main (int argc, char **argv)
/* Create global structure which stores the domain, timers, etc */
int size, rank;
sc_MPI_Comm mpicomm = fclaw_app_get_mpi_size_rank (app, &size, &rank);
fclaw2d_global_t *glob =
fclaw2d_global_new_comm (mpicomm, size, rank);
fclaw_global_t *glob =
fclaw_global_new_comm (mpicomm, size, rank);

/* Store option packages in glob */
fclaw2d_options_store (glob, fclaw_opt);
fclaw2d_clawpatch_options_store (glob, clawpatch_opt);
fclaw_options_store (glob, fclaw_opt);
fclaw_clawpatch_options_store (glob, clawpatch_opt);
fc2d_clawpack46_options_store (glob, claw46_opt);
fc2d_clawpack5_options_store (glob, claw5_opt);
interface_options_store (glob, user_opt);
Expand All @@ -140,7 +134,7 @@ main (int argc, char **argv)

run_program(glob);

fclaw2d_global_destroy(glob);
fclaw_global_destroy(glob);
}

fclaw_app_destroy (app);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ user_options_t* interface_options_register (fclaw_app_t * app,
return user;
}

void interface_options_store (fclaw2d_global_t* glob, user_options_t* user)
void interface_options_store (fclaw_global_t* glob, user_options_t* user)
{
fclaw2d_global_options_store(glob, "user", user);
fclaw_global_options_store(glob, "user", user);
}

const user_options_t* interface_get_options(fclaw2d_global_t* glob)
const user_options_t* interface_get_options(fclaw_global_t* glob)
{
return (user_options_t*) fclaw2d_global_get_options(glob, "user");
return (user_options_t*) fclaw_global_get_options(glob, "user");
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "interface_user.h"

#include <fclaw2d_clawpatch.h>
#include <fclaw_clawpatch.h>
#include <fclaw2d_clawpatch46_fort.h>
#include <fclaw2d_clawpatch5_fort.h>

Expand All @@ -35,15 +35,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../rp/acoustics_user_fort.h"


void interface_problem_setup(fclaw2d_global_t* glob)
void interface_problem_setup(fclaw_global_t* glob)
{
const user_options_t* user = interface_get_options(glob);
INTERFACE_SETPROB(&user->rhol,&user->cl,&user->rhor,&user->cr);
}

void interface_link_solvers(fclaw2d_global_t *glob)
void interface_link_solvers(fclaw_global_t *glob)
{
fclaw2d_vtable_t *vt = fclaw2d_vt(glob);
fclaw_vtable_t *vt = fclaw_vt(glob);

vt->problem_setup = &interface_problem_setup; /* Version-independent */

Expand Down
12 changes: 6 additions & 6 deletions applications/clawpack/acoustics/2d/interface/interface_user.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INTERFACE_USER_H
#define INTERFACE_USER_H

#include <fclaw2d_include_all.h>
#include <fclaw_include_all.h>

#ifdef __cplusplus
extern "C"
Expand All @@ -53,16 +53,16 @@ typedef struct user_options
user_options_t* interface_options_register (fclaw_app_t * app,
const char *configfile);

void interface_options_store (fclaw2d_global_t* glob, user_options_t* user);
void interface_options_store (fclaw_global_t* glob, user_options_t* user);

const user_options_t* interface_get_options(fclaw2d_global_t* glob);
const user_options_t* interface_get_options(fclaw_global_t* glob);

void interface_problem_setup(fclaw2d_global_t* glob);
void interface_problem_setup(fclaw_global_t* glob);


void interface_link_solvers(fclaw2d_global_t *glob);
void interface_link_solvers(fclaw_global_t *glob);

fclaw2d_map_context_t* fclaw2d_map_new_nomap();
fclaw_map_context_t* fclaw_map_new_nomap();

/* ----------------------------- Fortran code ----------------------------------------- */

Expand Down
44 changes: 22 additions & 22 deletions applications/clawpack/acoustics/2d/radial/fclaw2d_map_pillowdisk.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Spherical disk in xy plane. Matches p4est_connectivity_new_disk (). */

#include <fclaw2d_map.h>
#include <fclaw_map.h>

#ifdef __cplusplus
extern "C"
Expand All @@ -12,39 +12,39 @@ extern "C"


static int
fclaw2d_map_query_pillowdisk (fclaw2d_map_context_t * cont, int query_identifier)
fclaw2d_map_query_pillowdisk (fclaw_map_context_t * cont, int query_identifier)
{
switch (query_identifier)
{
case FCLAW2D_MAP_QUERY_IS_USED:
case FCLAW_MAP_QUERY_IS_USED:
return 1;
case FCLAW2D_MAP_QUERY_IS_SCALEDSHIFT:
case FCLAW_MAP_QUERY_IS_SCALEDSHIFT:
return 0;
case FCLAW2D_MAP_QUERY_IS_AFFINE:
case FCLAW_MAP_QUERY_IS_AFFINE:
return 0;
case FCLAW2D_MAP_QUERY_IS_NONLINEAR:
case FCLAW_MAP_QUERY_IS_NONLINEAR:
return 1;
case FCLAW2D_MAP_QUERY_IS_GRAPH:
case FCLAW_MAP_QUERY_IS_GRAPH:
return 0;
case FCLAW2D_MAP_QUERY_IS_PLANAR:
case FCLAW_MAP_QUERY_IS_PLANAR:
return 1;
case FCLAW2D_MAP_QUERY_IS_ALIGNED:
case FCLAW_MAP_QUERY_IS_ALIGNED:
return 0;
case FCLAW2D_MAP_QUERY_IS_FLAT:
case FCLAW_MAP_QUERY_IS_FLAT:
return 1;
case FCLAW2D_MAP_QUERY_IS_DISK:
case FCLAW_MAP_QUERY_IS_DISK:
return 1;
case FCLAW2D_MAP_QUERY_IS_SPHERE:
case FCLAW_MAP_QUERY_IS_SPHERE:
return 1;
case FCLAW2D_MAP_QUERY_IS_PILLOWDISK:
case FCLAW_MAP_QUERY_IS_PILLOWDISK:
return 1;
case FCLAW2D_MAP_QUERY_IS_SQUAREDDISK:
case FCLAW_MAP_QUERY_IS_SQUAREDDISK:
return 0;
case FCLAW2D_MAP_QUERY_IS_PILLOWSPHERE:
case FCLAW_MAP_QUERY_IS_PILLOWSPHERE:
return 0;
case FCLAW2D_MAP_QUERY_IS_CUBEDSPHERE:
case FCLAW_MAP_QUERY_IS_CUBEDSPHERE:
return 0;
case FCLAW2D_MAP_QUERY_IS_BRICK:
case FCLAW_MAP_QUERY_IS_BRICK:
return 0;
default:
printf("\n");
Expand All @@ -59,11 +59,11 @@ fclaw2d_map_query_pillowdisk (fclaw2d_map_context_t * cont, int query_identifier


static void
fclaw2d_map_c2m_pillowdisk(fclaw2d_map_context_t * cont, int blockno,
fclaw2d_map_c2m_pillowdisk(fclaw_map_context_t * cont, int blockno,
double xc, double yc,
double *xp, double *yp, double *zp)
{
MAPC2M_PILLOWDISK(&blockno,&xc,&yc,xp,yp,zp);
FCLAW_MAP_2D_C2M_PILLOWDISK(&blockno,&xc,&yc,xp,yp,zp);

/* These can probably be replaced by C functions at some point. */
scale_map(cont, xp,yp,zp);
Expand All @@ -73,13 +73,13 @@ fclaw2d_map_c2m_pillowdisk(fclaw2d_map_context_t * cont, int blockno,
}


fclaw2d_map_context_t* fclaw2d_map_new_pillowdisk(const double scale[],
fclaw_map_context_t* fclaw2d_map_new_pillowdisk(const double scale[],
const double shift[],
const double rotate[])
{
fclaw2d_map_context_t *cont;
fclaw_map_context_t *cont;

cont = FCLAW_ALLOC_ZERO (fclaw2d_map_context_t, 1);
cont = FCLAW_ALLOC_ZERO (fclaw_map_context_t, 1);
cont->query = fclaw2d_map_query_pillowdisk;
cont->mapc2m = fclaw2d_map_c2m_pillowdisk;

Expand Down
Loading

0 comments on commit 4c34e7b

Please sign in to comment.