Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

e_block.h File Reference

Header file for the 3D block data structure. More...

#include <stdio.h>
#include "../../util/source/useful.h"
#include "../../geometry/source/geom.h"
#include "../../gas_models/source/gas.h"
#include "../../flux_calc/source/flux_calc.h"
#include "../../mb_cns/source/cns_cell.h"

Go to the source code of this file.

Data Structures

struct  block_data_3D
 Single 3D-block data structure. More...

Defines

#define NGHOST   2
 Number of ghost cells surrounding the active cells.
#define BLOCK_3D_DIM   200
 Maximum allowable number of blocks.
#define MAX_FLOW_CONDITION   20
 Maximum number of flow conditions that can be stored for initial and boundary conditions.
#define IVTX0   (i)
#define JVTX0   (j)
#define KVTX0   (k)
#define IVTX1   (i+1)
#define JVTX1   (j)
#define KVTX1   (k)
#define IVTX2   (i+1)
#define JVTX2   (j+1)
#define KVTX2   (k)
#define IVTX3   (i)
#define JVTX3   (j+1)
#define KVTX3   (k)
#define IVTX4   (i)
#define JVTX4   (j)
#define KVTX4   (k+1)
#define IVTX5   (i+1)
#define JVTX5   (j)
#define KVTX5   (k+1)
#define IVTX6   (i+1)
#define JVTX6   (j+1)
#define KVTX6   (k+1)
#define IVTX7   (i)
#define JVTX7   (j+1)
#define KVTX7   (k+1)
#define IA   (i)
#define JA   (j)
#define KA   (k+1)
#define IB   (i+1)
#define JB   (j)
#define KB   (k+1)
#define IC   (i+1)
#define JC   (j)
#define KC   (k)
#define ID   (i)
#define JD   (j)
#define KD   (k)
#define IE   (i)
#define JE   (j+1)
#define KE   (k+1)
#define IF   (i+1)
#define JF   (j+1)
#define KF   (k+1)
#define IG   (i+1)
#define JG   (j+1)
#define KG   (k)
#define IH   (i)
#define JH   (j+1)
#define KH   (k)
#define IFACE_NORTH   (ifj[i][j+1][k])
#define IFACE_SOUTH   (ifj[i][j][k])
#define IFACE_EAST   (ifi[i+1][j][k])
#define IFACE_WEST   (ifi[i][j][k])
#define IFACE_TOP   (ifk[i][j][k+1])
#define IFACE_BOTTOM   (ifk[i][j][k])
#define NORTH   4
#define EAST   3
#define SOUTH   0
#define WEST   2
#define TOP   5
#define BOTTOM   1
#define E_BLOCK_HEADER_ALREADY_INCLUDED

Functions

int set_neighbour_blockId_for_face (struct block_data_3D *this_blk, int face_index, int other_blockId)
int get_neighbour_blockId_for_face (struct block_data_3D *this_blk, int face_index)
int set_neighbour_vertex (struct block_data_3D *this_blk, int face_index, int vertex_index, int other_vertex)
int get_neighbour_vertex (struct block_data_3D *this_blk, int face_index, int vertex_index)
int set_corner_vertex_location (struct block_data_3D *this_blk, int vertex_index, double x, double y, double z)
int set_edge_polyline (struct block_data_3D *this_blk, int edge_index, struct GPathPolyLine *plp, int end0, int end1, double beta)
int set_bc_index_for_boundary (struct block_data_3D *this_blk, int ibndy, int value)
int get_bc_index_for_boundary (struct block_data_3D *this_blk, int ibndy)
int set_inflow_index_for_boundary (struct block_data_3D *this_blk, int ibndy, int value)
int set_sponge_flag_for_boundary (struct block_data_3D *this_blk, int ibndy, int value)
double set_Twall_for_boundary (struct block_data_3D *this_blk, int ibndy, double value)
cell_centerget_cell_center_ptr (struct block_data_3D *this_blk, int i, int j, int k)
cell_interfaceget_ifi_ptr (struct block_data_3D *this_blk, int i, int j, int k)
cell_interfaceget_ifj_ptr (struct block_data_3D *this_blk, int i, int j, int k)
cell_interfaceget_ifk_ptr (struct block_data_3D *this_blk, int i, int j, int k)
int array_alloc_3D (struct block_data_3D *A)
 Allocate memory for the internal arrays of the block. Returns total bytes allocated if successful, -1 otherwise.
int allocate_send_and_receive_buffers_3D (struct block_data_3D *bp)
 Allocate memory for the MPI send and receive buffers.
int fill_block_flow_data_3D (struct block_data_3D *bp)
 Fill the flow field for this block with the initial flow condition.
int compute_block_geometry_data_3D (struct block_data_3D *bp)
 Compute the geometry data for each cell in this block.
int add_history_cell_to_block (struct block_data_3D *bp, int i, int j, int k)
 Add the indices for a history cell to the arrays within the block_data_3D structure.


Detailed Description

Header file for the 3D block data structure.

Author:
PJ
Version:
05-Aug-04 extracted from cns_block.h

Define Documentation

#define IFACE_NORTH   (ifj[i][j+1][k])
 

Cell interface indices.

#define IVTX0   (i)
 

Indexing Macros for the 3D data -- see page 8 in 3D CFD workbook.

These macros should make indexing over the vertices and over the interfaces more readable. We shall use VTK notation and define the macros with respect to the [i][j][k] cell. Ian Johnston's notation is also defined so that we might reuse some of the sf3d code.

#define NGHOST   2
 

Number of ghost cells surrounding the active cells.

This sets the size of the ghost-cell buffer around a block.

#define NORTH   4
 

Interface numbering to match Gmsh face ordering for a hex-cell. Note that this is base 0 indexing while Gmsh is base 1.

These are also the identifiers for the block boundaries.


Function Documentation

int add_history_cell_to_block struct block_data_3D bp,
int  i,
int  j,
int  k
 

Add the indices for a history cell to the arrays within the block_data_3D structure.

The user specifies the history cell indices as integers 1 through nni, 1 through nnj and 1 through nnk for each block.

Returns the number of history cells if successful, -1 otherwise.

int allocate_send_and_receive_buffers_3D struct block_data_3D bp  ) 
 

Allocate memory for the MPI send and receive buffers.

Parameters:
bd : a pointer to the block_data structure
Returns:
total_bytes if successful, -1 otherwise.

int array_alloc_3D struct block_data_3D A  ) 
 

Allocate memory for the internal arrays of the block. Returns total bytes allocated if successful, -1 otherwise.

Parameters:
A : a pointer to the single-block data structure

int compute_block_geometry_data_3D struct block_data_3D bp  ) 
 

Compute the geometry data for each cell in this block.

Parameters:
bp : pointer to the block_data_3D structure.

int fill_block_flow_data_3D struct block_data_3D bp  ) 
 

Fill the flow field for this block with the initial flow condition.

Parameters:
bp : pointer to the block_data_3D structure.
Todo:
Andrew, should all boundaries be checked for the SUP_OUT flow condition?

int set_neighbour_blockId_for_face struct block_data_3D this_blk,
int  face_index,
int  other_blockId
 

Accessor functions.


Generated on Tue Oct 25 10:24:12 2005 for CFCFD by  doxygen 1.4.4