Basilisk CFD
Adaptive Cartesian mesh PDE framework
Loading...
Searching...
No Matches
cartesian1D.h File Reference
#include "variables.h"
#include "cartesian-common.h"
Include dependency graph for cartesian1D.h:

Go to the source code of this file.

Data Structures

struct  Cartesian
 
struct  _Point
 

Macros

#define GRIDNAME   "Cartesian 1D"
 
#define dimension   1
 
#define GHOSTS   1
 
#define _I   (point.i - 1)
 
#define _DELTA   (1./point.n)
 
#define cartesian   ((Cartesian *)grid)
 

Typedefs

typedef double real
 

Functions

define data (k, l, m)((double *) &((Cartesian *) grid) -> d[(point.i+k) *datasize]) @define allocated(...) true macro POINT_VARIABLES(Point point=point)
 
macro2 foreach (char flags=0, Reduce reductions=None)
 
macro2 foreach_face_generic (char flags=0, Reduce reductions=None, const char *order="xyz")
 
macro1 is_face_x ()
 
static void box_boundary_level_normal (const Boundary *b, scalar *list, int l)
 
static double periodic_bc (Point point, Point neighbor, scalar s, bool *data)
 
static void box_boundary_level (const Boundary *b, scalar *list, int l)
 
static void periodic_boundary_level_x (const Boundary *b, scalar *list, int l)
 
void free_grid (void)
 
if TRASH undef trash define trash (list) reset(list
 
if TRASH undef trash define undefined endif void reset (void *alist, double val)
 
void init_grid (int n)
 
void realloc_scalar (int size)
 
Point locate (double xp=0, double yp=0, double zp=0)
 
macro2 for (int _i=0;_i< _N;_i++)
 
void cartesian1D_methods ()
 

Variables

static Point last_point
 
static int _ig [] = {1,-1}
 

Macro Definition Documentation

◆ _DELTA

#define _DELTA   (1./point.n)

Definition at line 10 of file cartesian1D.h.

◆ _I

#define _I   (point.i - 1)

Definition at line 9 of file cartesian1D.h.

◆ cartesian

#define cartesian   ((Cartesian *)grid)

Definition at line 23 of file cartesian1D.h.

◆ dimension

#define dimension   1

Definition at line 6 of file cartesian1D.h.

◆ GHOSTS

#define GHOSTS   1

Definition at line 7 of file cartesian1D.h.

◆ GRIDNAME

#define GRIDNAME   "Cartesian 1D"

Definition at line 5 of file cartesian1D.h.

Typedef Documentation

◆ real

Definition at line 3 of file cartesian1D.h.

Function Documentation

◆ box_boundary_level()

static void box_boundary_level ( const Boundary b,
scalar list,
int  l 
)
static

Definition at line 89 of file cartesian1D.h.

References _ig, b, box_boundary_level_normal(), cartesian, d, free(), GHOSTS, Point::i, l, list_add(), neighbor(), normal, periodic_bc(), point, right, s, val(), and x.

Referenced by init_grid().

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

◆ box_boundary_level_normal()

static void box_boundary_level_normal ( const Boundary b,
scalar list,
int  l 
)
static

Definition at line 68 of file cartesian1D.h.

References _ig, assert, b, cartesian, d, GHOSTS, Point::i, left, list, neighbor(), point, right, s, val(), and x.

Referenced by box_boundary_level().

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

◆ cartesian1D_methods()

void cartesian1D_methods ( )

Definition at line 237 of file cartesian1D.h.

References cartesian_methods().

Here is the call graph for this function:

◆ data()

define data ( k  ,
l  ,
m   
) & -> d[(point.i + k)*datasize]) @define allocated(...) true macro POINT_VARIABLES (Point point = point)

Definition at line 25 of file cartesian1D.h.

References VARIABLES().

Here is the call graph for this function:

◆ for()

macro2 for ( )

Definition at line 229 of file cartesian1D.h.

References flags, foreach_face_generic(), reductions, and x.

Here is the call graph for this function:

◆ foreach()

macro2 foreach ( char  flags = 0,
Reduce  reductions = None 
)

Definition at line 30 of file cartesian1D.h.

References _k, cartesian, Point::i, OMP_PARALLEL(), point, reductions, and x.

Here is the call graph for this function:

◆ foreach_face_generic()

macro2 foreach_face_generic ( char  flags = 0,
Reduce  reductions = None,
const char order = "xyz" 
)

Definition at line 45 of file cartesian1D.h.

References _k, cartesian, Point::i, OMP_PARALLEL(), point, reductions, and x.

Referenced by for().

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

◆ free_grid()

void free_grid ( void  )

Definition at line 146 of file cartesian1D.h.

References cartesian, free(), free_boundaries(), grid, and x.

Referenced by init_grid().

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

◆ init_grid()

void init_grid ( int  n)

Definition at line 173 of file cartesian1D.h.

References add_boundary(), all, b, box(), box_boundary_level(), cartesian, d, datasize, free_grid(), grid, i, _Boundary::level, Grid::n, N, n, p, periodic_boundary_level_x(), qcalloc, qmalloc, reset, Grid::tn, undefined(), v, and x.

Here is the call graph for this function:

◆ is_face_x()

macro1 is_face_x ( )

Definition at line 61 of file cartesian1D.h.

References x.

◆ locate()

Point locate ( double  xp = 0,
double  yp = 0,
double  zp = 0 
)

Definition at line 216 of file cartesian1D.h.

References a, cartesian, Point::i, L0, Point::level, point, x, and X0.

◆ periodic_bc()

static double periodic_bc ( Point  point,
Point  neighbor,
scalar  s,
bool data 
)
static

Referenced by box_boundary_level(), and periodic_boundary_level_x().

Here is the caller graph for this function:

◆ periodic_boundary_level_x()

static void periodic_boundary_level_x ( const Boundary b,
scalar list,
int  l 
)
static

Definition at line 125 of file cartesian1D.h.

References free(), GHOSTS, grid, i, Point::i, list_add(), N, periodic_bc(), point, right, s, and x.

Referenced by init_grid().

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

◆ realloc_scalar()

void realloc_scalar ( int  size)

Definition at line 205 of file cartesian1D.h.

References cartesian, data, datasize, i, p, size, and x.

◆ reset()

if TRASH undef trash define undefined endif void reset ( void alist,
double  val 
)

Definition at line 161 of file cartesian1D.h.

References cartesian, data, datasize, scalar::i, i, list, s, v, val(), and x.

Here is the call graph for this function:

◆ trash()

if TRASH undef trash define trash ( list  )

Variable Documentation

◆ _ig

◆ last_point

Point last_point
static

Definition at line 21 of file cartesian1D.h.