Basilisk CFD
Adaptive Cartesian mesh PDE framework
Loading...
Searching...
No Matches
kdt.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  KdtPoint
 
struct  KdtInterval
 
struct  KdtHeap
 
struct  KdtSumCore
 
struct  KdtSum
 

Macros

#define PADDING_32_BITS   int padding;
 

Typedefs

typedef KdtInterval KdtRect[2]
 
typedef struct _Kdt Kdt
 
typedef int(* KdtCheck) (const KdtRect rect, void *data)
 

Functions

FILEkdt_tmpfile (void)
 
void kdt_heap_create (KdtHeap *h, FILE *fp, long start, long len, long buflen)
 
void kdt_heap_resize (KdtHeap *h, long len)
 
int kdt_heap_get (KdtHeap *h, KdtPoint *p)
 
void kdt_heap_split (KdtHeap *h1, long len1, KdtHeap *h2)
 
void kdt_heap_put (KdtHeap *h, KdtPoint *p)
 
void kdt_heap_flush (KdtHeap *h)
 
void kdt_heap_free (KdtHeap *h)
 
void kdt_heap_rewind (KdtHeap *h)
 
int kdt_intersects (const KdtRect rect, const KdtRect query)
 
int kdt_includes (const KdtRect rect, const KdtRect query)
 
Kdtkdt_new (void)
 
int kdt_create (Kdt *kdt, const char *name, int blksize, KdtHeap *h, void(*progress)(float complete, void *data), void *data)
 
int kdt_open (Kdt *kdt, const char *name)
 
void kdt_destroy (Kdt *kdt)
 
long kdt_query (const Kdt *kdt, const KdtRect rect)
 
long kdt_query_sum (const Kdt *kdt, KdtCheck includes, KdtCheck intersects, void *data, const KdtRect query, KdtSum *sum)
 
void kdt_sum_init (KdtSum *s)
 

Macro Definition Documentation

◆ PADDING_32_BITS

#define PADDING_32_BITS   int padding;

Definition at line 27 of file kdt.h.

Typedef Documentation

◆ Kdt

Definition at line 97 of file kdt.h.

◆ KdtCheck

typedef int(* KdtCheck) (const KdtRect rect, void *data)

Definition at line 98 of file kdt.h.

◆ KdtRect

typedef KdtInterval KdtRect[2]

Definition at line 40 of file kdt.h.

Function Documentation

◆ kdt_create()

int kdt_create ( Kdt kdt,
const char name,
int  blksize,
KdtHeap h,
void(*)(float complete, void *data progress,
void data 
)

Definition at line 686 of file kdt.c.

References data, fwrite_check(), h, kdt_heap_resize(), kdt_heap_sort_cost(), kdt_init(), progress, sizeof(), split(), update_bounds(), and x.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kdt_destroy()

void kdt_destroy ( Kdt kdt)

Definition at line 757 of file kdt.c.

References free(), and x.

Referenced by delete_terrain(), and main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kdt_heap_create()

void kdt_heap_create ( KdtHeap h,
FILE fp,
long  start,
long  len,
long  buflen 
)

Definition at line 134 of file kdt.c.

References assert, buffer_new(), fp, h, heap_read(), scalar::i, and x.

Referenced by kdt_heap_split(), main(), and merge().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kdt_heap_flush()

void kdt_heap_flush ( KdtHeap h)

Definition at line 233 of file kdt.c.

References h, heap_write(), scalar::i, and x.

Referenced by kdt_heap_split(), main(), and merge().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kdt_heap_free()

void kdt_heap_free ( KdtHeap h)

Definition at line 239 of file kdt.c.

References assert, buffer_unref(), h, and x.

Referenced by kdt_heap_split(), merge(), and split().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kdt_heap_get()

int kdt_heap_get ( KdtHeap h,
KdtPoint p 
)

Definition at line 171 of file kdt.c.

References h, heap_read(), scalar::i, kdt_heap_get(), and p.

Referenced by kdt_heap_get(), kdt_heap_split(), kdt_write(), merge(), put(), update_bounds(), and update_sum().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kdt_heap_put()

void kdt_heap_put ( KdtHeap h,
KdtPoint p 
)

Definition at line 224 of file kdt.c.

References h, heap_write(), scalar::i, and p.

Referenced by kdt_heap_split(), main(), and put().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kdt_heap_resize()

void kdt_heap_resize ( KdtHeap h,
long  len 
)

Definition at line 91 of file kdt.c.

References assert, h, kdt_heap_rewind(), and x.

Referenced by kdt_create(), and kdt_heap_split().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kdt_heap_rewind()

void kdt_heap_rewind ( KdtHeap h)

Definition at line 157 of file kdt.c.

References assert, h, heap_read(), scalar::i, sizeof(), and x.

Referenced by kdt_heap_resize(), kdt_heap_split(), kdt_write(), merge(), update_bounds(), and update_sum().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kdt_heap_split()

void kdt_heap_split ( KdtHeap h1,
long  len1,
KdtHeap h2 
)

Definition at line 186 of file kdt.c.

References assert, buffer_ref(), h, i, kdt_heap_create(), kdt_heap_flush(), kdt_heap_free(), kdt_heap_get(), kdt_heap_put(), kdt_heap_resize(), kdt_heap_rewind(), kdt_tmpfile(), p, and x.

Referenced by kdt_heap_sort(), and split().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kdt_includes()

int kdt_includes ( const KdtRect  rect,
const KdtRect  query 
)

Definition at line 776 of file kdt.c.

References h, l, query(), and x.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kdt_intersects()

int kdt_intersects ( const KdtRect  rect,
const KdtRect  query 
)

Definition at line 770 of file kdt.c.

References h, l, query(), and x.

Referenced by kdt_query(), main(), and query().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kdt_new()

Kdt * kdt_new ( void  )

Definition at line 632 of file kdt.c.

References calloc(), and x.

Referenced by main(), and terrain().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kdt_open()

int kdt_open ( Kdt kdt,
const char name 
)

Definition at line 723 of file kdt.c.

References check_32_bits(), open_ext(), sizeof(), VERSION, and x.

Referenced by main(), and terrain().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kdt_query()

long kdt_query ( const Kdt kdt,
const KdtRect  rect 
)

Definition at line 834 of file kdt.c.

References h, kdt_intersects(), query(), and x.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kdt_query_sum()

long kdt_query_sum ( const Kdt kdt,
KdtCheck  includes,
KdtCheck  intersects,
void data,
const KdtRect  query,
KdtSum sum 
)

Definition at line 1025 of file kdt.c.

References data, f, h, includes(), intersects(), query(), query_sum(), sum, and x.

Referenced by main(), and terrain().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kdt_sum_init()

void kdt_sum_init ( KdtSum s)

Definition at line 1043 of file kdt.c.

References kdt_sum_core_init(), and s.

Referenced by main(), and terrain().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kdt_tmpfile()

FILE * kdt_tmpfile ( void  )

Definition at line 42 of file kdt.c.

References assert, fp, and x.

Referenced by kdt_heap_split(), and main().

Here is the caller graph for this function: