NEURON
rxd_vol.cpp File Reference
#include <../../nrnconf.h>
#include <stdio.h>
#include <assert.h>
#include "grids.h"
#include "rxd.h"
#include <pthread.h>
#include <nrnwrap_Python.h>

Go to the source code of this file.

Macros

#define DcX(x, y, z)   (g->dc_x*PERM(x,y,z))
 
#define DcY(x, y, z)   (g->dc_y*PERM(x,y,z))
 
#define DcZ(x, y, z)   (g->dc_z*PERM(x,y,z))
 
#define Fxx(x1, x2)   (ALPHA(x1,y,z)*ALPHA(x2,y,z)*DcX(x1,y,z)*(g->states[IDX(x1,y,z)] - g->states[IDX(x2,y,z)])/((ALPHA(x1,y,z)+ALPHA(x2,y,z))))
 
#define Fxy(y1, y1d, y2)   (ALPHA(x,y1,z)*ALPHA(x,y2,z)*DcY(x,y1d,z)*(g->states[IDX(x,y1,z)] - g->states[IDX(x,y2,z)])/((ALPHA(x,y1,z)+ALPHA(x,y2,z))))
 
#define Fxz(z1, z1d, z2)   (ALPHA(x,y,z1)*ALPHA(x,y,z2)*DcZ(x,y,z1d)*(g->states[IDX(x,y,z1)] - g->states[IDX(x,y,z2)])/((ALPHA(x,y,z1)+ALPHA(x,y,z2))))
 
#define Fyy(y1, y2)   (ALPHA(x,y1,z)*ALPHA(x,y2,z)*DcY(x,y1,z)*(g->states[IDX(x,y1,z)] - g->states[IDX(x,y2,z)])/((ALPHA(x,y1,z)+ALPHA(x,y2,z))))
 
#define Fzz(z1, z2)   (ALPHA(x,y,z1)*ALPHA(x,y,z2)*DcZ(x,y,z1)*(g->states[IDX(x,y,z1)] - g->states[IDX(x,y,z2)])/((ALPHA(x,y,z1)+ALPHA(x,y,z2))))
 
#define FLUX(pidx, idx)   (VOLFRAC(pidx)*VOLFRAC(idx)*(states[pidx] - states[idx]))/(0.5*(VOLFRAC(pidx)+VOLFRAC(idx)))
 

Functions

static int solve_dd_tridiag (int N, const double *l_diag, const double *diag, const double *u_diag, double *b, double *c)
 
static void ecs_dg_adi_vol_x (ECS_Grid_node *g, const double dt, const int y, const int z, double const *const state, double *const RHS, double *const scratch)
 
static void ecs_dg_adi_vol_y (ECS_Grid_node *g, double const dt, int const x, int const z, double const *const state, double *const RHS, double *const scratch)
 
static void ecs_dg_adi_vol_z (ECS_Grid_node *g, double const dt, int const x, int const y, double const *const state, double *const RHS, double *const scratch)
 
void ecs_set_adi_vol (ECS_Grid_node *g)
 
static void ecs_dg_adi_tort_x (ECS_Grid_node *g, const double dt, const int y, const int z, double const *const state, double *const RHS, double *const scratch)
 
static void ecs_dg_adi_tort_y (ECS_Grid_node *g, double const dt, int const x, int const z, double const *const state, double *const RHS, double *const scratch)
 
static void ecs_dg_adi_tort_z (ECS_Grid_node *g, double const dt, int const x, int const y, double const *const state, double *const RHS, double *const scratch)
 
void ecs_set_adi_tort (ECS_Grid_node *g)
 
void _rhs_variable_step_helper_tort (Grid_node *g, double const *const states, double *ydot)
 
void _rhs_variable_step_helper_vol (Grid_node *g, double const *const states, double *ydot)
 

Variables

int NUM_THREADS
 

Macro Definition Documentation

◆ DcX

#define DcX (   x,
  y,
 
)    (g->dc_x*PERM(x,y,z))

Definition at line 10 of file rxd_vol.cpp.

◆ DcY

#define DcY (   x,
  y,
 
)    (g->dc_y*PERM(x,y,z))

Definition at line 11 of file rxd_vol.cpp.

◆ DcZ

#define DcZ (   x,
  y,
 
)    (g->dc_z*PERM(x,y,z))

Definition at line 12 of file rxd_vol.cpp.

◆ FLUX

#define FLUX (   pidx,
  idx 
)    (VOLFRAC(pidx)*VOLFRAC(idx)*(states[pidx] - states[idx]))/(0.5*(VOLFRAC(pidx)+VOLFRAC(idx)))

Definition at line 23 of file rxd_vol.cpp.

◆ Fxx

#define Fxx (   x1,
  x2 
)    (ALPHA(x1,y,z)*ALPHA(x2,y,z)*DcX(x1,y,z)*(g->states[IDX(x1,y,z)] - g->states[IDX(x2,y,z)])/((ALPHA(x1,y,z)+ALPHA(x2,y,z))))

Definition at line 16 of file rxd_vol.cpp.

◆ Fxy

#define Fxy (   y1,
  y1d,
  y2 
)    (ALPHA(x,y1,z)*ALPHA(x,y2,z)*DcY(x,y1d,z)*(g->states[IDX(x,y1,z)] - g->states[IDX(x,y2,z)])/((ALPHA(x,y1,z)+ALPHA(x,y2,z))))

Definition at line 17 of file rxd_vol.cpp.

◆ Fxz

#define Fxz (   z1,
  z1d,
  z2 
)    (ALPHA(x,y,z1)*ALPHA(x,y,z2)*DcZ(x,y,z1d)*(g->states[IDX(x,y,z1)] - g->states[IDX(x,y,z2)])/((ALPHA(x,y,z1)+ALPHA(x,y,z2))))

Definition at line 18 of file rxd_vol.cpp.

◆ Fyy

#define Fyy (   y1,
  y2 
)    (ALPHA(x,y1,z)*ALPHA(x,y2,z)*DcY(x,y1,z)*(g->states[IDX(x,y1,z)] - g->states[IDX(x,y2,z)])/((ALPHA(x,y1,z)+ALPHA(x,y2,z))))

Definition at line 19 of file rxd_vol.cpp.

◆ Fzz

#define Fzz (   z1,
  z2 
)    (ALPHA(x,y,z1)*ALPHA(x,y,z2)*DcZ(x,y,z1)*(g->states[IDX(x,y,z1)] - g->states[IDX(x,y,z2)])/((ALPHA(x,y,z1)+ALPHA(x,y,z2))))

Definition at line 20 of file rxd_vol.cpp.

Function Documentation

◆ _rhs_variable_step_helper_tort()

void _rhs_variable_step_helper_tort ( Grid_node g,
double const *const  states,
double *  ydot 
)

Definition at line 762 of file rxd_vol.cpp.

◆ _rhs_variable_step_helper_vol()

void _rhs_variable_step_helper_vol ( Grid_node g,
double const *const  states,
double *  ydot 
)

Definition at line 870 of file rxd_vol.cpp.

◆ ecs_dg_adi_tort_x()

static void ecs_dg_adi_tort_x ( ECS_Grid_node g,
const double  dt,
const int  y,
const int  z,
double const *const  state,
double *const  RHS,
double *const  scratch 
)
static

Definition at line 430 of file rxd_vol.cpp.

◆ ecs_dg_adi_tort_y()

static void ecs_dg_adi_tort_y ( ECS_Grid_node g,
double const  dt,
int const  x,
int const  z,
double const *const  state,
double *const  RHS,
double *const  scratch 
)
static

Definition at line 572 of file rxd_vol.cpp.

◆ ecs_dg_adi_tort_z()

static void ecs_dg_adi_tort_z ( ECS_Grid_node g,
double const  dt,
int const  x,
int const  y,
double const *const  state,
double *const  RHS,
double *const  scratch 
)
static

Definition at line 665 of file rxd_vol.cpp.

◆ ecs_dg_adi_vol_x()

static void ecs_dg_adi_vol_x ( ECS_Grid_node g,
const double  dt,
const int  y,
const int  z,
double const *const  state,
double *const  RHS,
double *const  scratch 
)
static

Definition at line 71 of file rxd_vol.cpp.

◆ ecs_dg_adi_vol_y()

static void ecs_dg_adi_vol_y ( ECS_Grid_node g,
double const  dt,
int const  x,
int const  z,
double const *const  state,
double *const  RHS,
double *const  scratch 
)
static

Definition at line 225 of file rxd_vol.cpp.

◆ ecs_dg_adi_vol_z()

static void ecs_dg_adi_vol_z ( ECS_Grid_node g,
double const  dt,
int const  x,
int const  y,
double const *const  state,
double *const  RHS,
double *const  scratch 
)
static

Definition at line 324 of file rxd_vol.cpp.

◆ ecs_set_adi_tort()

void ecs_set_adi_tort ( ECS_Grid_node g)

Definition at line 748 of file rxd_vol.cpp.

◆ ecs_set_adi_vol()

void ecs_set_adi_vol ( ECS_Grid_node g)

Definition at line 412 of file rxd_vol.cpp.

◆ solve_dd_tridiag()

static int solve_dd_tridiag ( int  N,
const double *  l_diag,
const double *  diag,
const double *  u_diag,
double *  b,
double *  c 
)
static

Definition at line 36 of file rxd_vol.cpp.

Variable Documentation

◆ NUM_THREADS

int NUM_THREADS

Definition at line 26 of file rxd.cpp.