Skip to content

Commit

Permalink
Updated include file (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbetcke authored Jul 29, 2024
1 parent 8d44865 commit d007ec7
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions include/green_kernels.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,45 @@ typedef enum GreenKernelEvalType {

typedef struct GreenKernelEvaluator GreenKernelEvaluator;

/**
* Return the type of the kernel.
*
* # Safety
* Pointer must be valid.
*/
enum GreenKernelCType green_kernel_get_ctype(struct GreenKernelEvaluator *kernel_p);

/**
* Free the kernel.
*
* # Safety
* Pointer must be valid.
*/
void green_kernel_free(struct GreenKernelEvaluator *kernel_p);

/**
* Create a new Laplace kernel.
*/
struct GreenKernelEvaluator *green_kernel_laplace_3d_alloc(enum GreenKernelCType ctype);

/**
* Create a new Modified Helmholtz kernel.
*/
struct GreenKernelEvaluator *green_kernel_modified_helmholtz_3d_alloc(enum GreenKernelCType ctype,
double omega);

/**
* Create a new Helmholtz kernel.
*/
struct GreenKernelEvaluator *green_kernel_helmholtz_3d_alloc(enum GreenKernelCType ctype,
double wavenumber);

/**
* Evaluate a kernel.
*
* # Safety
* Pointer must be valid.
*/
void green_kernel_evaluate(struct GreenKernelEvaluator *kernel_p,
enum GreenKernelEvalType eval_type,
uintptr_t nsources,
Expand All @@ -48,6 +75,12 @@ void green_kernel_evaluate(struct GreenKernelEvaluator *kernel_p,
void *result,
bool multithreaded);

/**
* Assemble a kernel.
*
* # Safety
* Pointer must be valid.
*/
void green_kernel_assemble(struct GreenKernelEvaluator *kernel_p,
enum GreenKernelEvalType eval_type,
uintptr_t nsources,
Expand All @@ -57,13 +90,50 @@ void green_kernel_assemble(struct GreenKernelEvaluator *kernel_p,
void *result,
bool multithreaded);

/**
* Pairwise assembly of sources and targets.
*
* # Safety
* Pointer must be valid.
*/
void green_kernel_pairwise_assemble(struct GreenKernelEvaluator *kernel_p,
enum GreenKernelEvalType eval_type,
uintptr_t npoints,
const void *sources,
const void *targets,
void *result);

/**
* Return the range component count.
*
* # Safety
* Pointer must be valid.
*/
uint32_t green_kernel_range_component_count(struct GreenKernelEvaluator *kernel_p,
enum GreenKernelEvalType eval_type);

/**
* Return the domain component count.
*
* # Safety
* Pointer must be valid.
*/
uint32_t green_kernel_domain_component_count(struct GreenKernelEvaluator *kernel_p);

/**
* Return the space dimension.
*
* # Safety
* Pointer must be valid.
*/
uint32_t green_kernel_space_dimension(struct GreenKernelEvaluator *kernel_p);

/**
* Evaluate the Greens function for a single source/target pair.
*
* # Safety
* Pointer must be valid.
*/
void greens_fct(struct GreenKernelEvaluator *kernel_p,
enum GreenKernelEvalType eval_type,
const void *source,
Expand Down

0 comments on commit d007ec7

Please sign in to comment.