GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
stream-euler.cc File Reference
#include "defun.h"
#include "error.h"
#include "ovl.h"
Include dependency graph for stream-euler.cc:

Go to the source code of this file.

Classes

struct  Cell2
 
struct  Cell3
 
struct  Vector2
 
struct  Vector3
 

Functions

static Vector2 add2d (const Cell2 X, const Vector2 Y)
 
static Vector3 add3d (const Cell3 X, const Vector3 Y)
 
static double bilinear (const double u11, const double u21, const double u12, const double u22, const double x, const double y)
 
static Vector2 calculate_step_vector2d (const Cell2 X, const Vector2 V, const RowVector &tx, const RowVector &ty, const octave_idx_type cols, const octave_idx_type rows, const double h)
 
static Vector3 calculate_step_vector3d (const Cell3 X, const Vector3 V, const RowVector &tx, const RowVector &ty, const RowVector &tz, const octave_idx_type nx, const octave_idx_type ny, const octave_idx_type nz, const double h)
 
static void euler2d (const octave_idx_type cols, const octave_idx_type rows, const Matrix &u, const Matrix &v, const RowVector &tx, const RowVector &ty, const double zeta, const double xi, const double h, const octave_idx_type maxnverts, Matrix &buffer, octave_idx_type *nverts)
 
static void euler3d (const octave_idx_type nx, const octave_idx_type ny, const octave_idx_type nz, const NDArray &u, const NDArray &v, const NDArray &w, const RowVector &tx, const RowVector &ty, const RowVector &tz, const double zeta, const double xi, const double rho, const double h, const octave_idx_type maxnverts, Matrix &buffer, octave_idx_type *nverts)
 
OCTAVE_EXPORT octave_value_list F__streameuler2d__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__streameuler3d__ (const octave_value_list &args, int)
 
static void handle_border (octave_idx_type *id2, double *fc2, const octave_idx_type id1, const double fc1, const octave_idx_type N)
 
static octave_idx_type handle_border_index (const octave_idx_type id, const octave_idx_type N)
 
static bool is_in_definition_set2d (const Cell2 X, const octave_idx_type cols, const octave_idx_type rows)
 
static bool is_in_definition_set3d (const Cell3 X, const octave_idx_type nx, const octave_idx_type ny, const octave_idx_type nz)
 
static bool is_singular2d (const Vector2 V)
 
static bool is_singular3d (const Vector3 V)
 
static void number_to_fractional (signed long *id, double *fc, const double u)
 
static octave_value streameuler2d_internal (const octave_value_list &args)
 
static octave_value streameuler3d_internal (const octave_value_list &args, const char *fcn)
 
static double trilinear (const double u111, const double u211, const double u121, const double u221, const double u112, const double u212, const double u122, const double u222, const double x, const double y, const double z)
 
static Vector2 vector_interpolation2d (const Cell2 X, const Matrix &u, const Matrix &v, const octave_idx_type cols, const octave_idx_type rows)
 
static Vector3 vector_interpolation3d (const Cell3 X, const NDArray &u, const NDArray &v, const NDArray &w, const octave_idx_type nx, const octave_idx_type ny, const octave_idx_type nz)
 
static Cell2 vector_to_cell2d (const Vector2 X)
 
static Cell3 vector_to_cell3d (const Vector3 X)
 

Function Documentation

◆ add2d()

static Vector2 add2d ( const Cell2  X,
const Vector2  Y 
)
inlinestatic

Definition at line 147 of file stream-euler.cc.

References Cell2::fcx, Cell2::fcy, Cell2::idx, Cell2::idy, Vector2::x, Vector2::y, and Z.

Referenced by euler2d().

◆ add3d()

static Vector3 add3d ( const Cell3  X,
const Vector3  Y 
)
inlinestatic

Definition at line 307 of file stream-euler.cc.

References Cell3::fcx, Cell3::fcy, Cell3::fcz, Cell3::idx, Cell3::idy, Cell3::idz, Vector3::x, Vector3::y, Vector3::z, and Z.

Referenced by euler3d().

◆ bilinear()

static double bilinear ( const double  u11,
const double  u21,
const double  u12,
const double  u22,
const double  x,
const double  y 
)
inlinestatic

Definition at line 116 of file stream-euler.cc.

References x.

Referenced by vector_interpolation2d().

◆ calculate_step_vector2d()

static Vector2 calculate_step_vector2d ( const Cell2  X,
const Vector2  V,
const RowVector tx,
const RowVector ty,
const octave_idx_type  cols,
const octave_idx_type  rows,
const double  h 
)
inlinestatic

Definition at line 179 of file stream-euler.cc.

References handle_border_index(), Cell2::idx, Cell2::idy, n, V, Vector2::x, x, and Vector2::y.

Referenced by euler2d().

◆ calculate_step_vector3d()

static Vector3 calculate_step_vector3d ( const Cell3  X,
const Vector3  V,
const RowVector tx,
const RowVector ty,
const RowVector tz,
const octave_idx_type  nx,
const octave_idx_type  ny,
const octave_idx_type  nz,
const double  h 
)
inlinestatic

Definition at line 350 of file stream-euler.cc.

References handle_border_index(), Cell3::idx, Cell3::idy, Cell3::idz, n, V, Vector3::x, x, Vector3::y, and Vector3::z.

Referenced by euler3d().

◆ euler2d()

static void euler2d ( const octave_idx_type  cols,
const octave_idx_type  rows,
const Matrix u,
const Matrix v,
const RowVector tx,
const RowVector ty,
const double  zeta,
const double  xi,
const double  h,
const octave_idx_type  maxnverts,
Matrix buffer,
octave_idx_type nverts 
)
static

◆ euler3d()

static void euler3d ( const octave_idx_type  nx,
const octave_idx_type  ny,
const octave_idx_type  nz,
const NDArray u,
const NDArray v,
const NDArray w,
const RowVector tx,
const RowVector ty,
const RowVector tz,
const double  zeta,
const double  xi,
const double  rho,
const double  h,
const octave_idx_type  maxnverts,
Matrix buffer,
octave_idx_type nverts 
)
static

◆ F__streameuler2d__()

OCTAVE_EXPORT octave_value_list F__streameuler2d__ ( const octave_value_list args,
int   
)

Definition at line 521 of file stream-euler.cc.

References streameuler2d_internal().

◆ F__streameuler3d__()

OCTAVE_EXPORT octave_value_list F__streameuler3d__ ( const octave_value_list args,
int   
)

Definition at line 536 of file stream-euler.cc.

References streameuler3d_internal().

◆ handle_border()

static void handle_border ( octave_idx_type id2,
double *  fc2,
const octave_idx_type  id1,
const double  fc1,
const octave_idx_type  N 
)
inlinestatic

Definition at line 100 of file stream-euler.cc.

References N.

Referenced by vector_interpolation2d(), and vector_interpolation3d().

◆ handle_border_index()

static octave_idx_type handle_border_index ( const octave_idx_type  id,
const octave_idx_type  N 
)
inlinestatic

Definition at line 94 of file stream-euler.cc.

References N.

Referenced by calculate_step_vector2d(), and calculate_step_vector3d().

◆ is_in_definition_set2d()

static bool is_in_definition_set2d ( const Cell2  X,
const octave_idx_type  cols,
const octave_idx_type  rows 
)
inlinestatic

Definition at line 137 of file stream-euler.cc.

References Cell2::fcx, Cell2::fcy, Cell2::idx, and Cell2::idy.

Referenced by euler2d().

◆ is_in_definition_set3d()

static bool is_in_definition_set3d ( const Cell3  X,
const octave_idx_type  nx,
const octave_idx_type  ny,
const octave_idx_type  nz 
)
inlinestatic

Definition at line 295 of file stream-euler.cc.

References Cell3::fcx, Cell3::fcy, Cell3::fcz, Cell3::idx, Cell3::idy, and Cell3::idz.

Referenced by euler3d().

◆ is_singular2d()

static bool is_singular2d ( const Vector2  V)
inlinestatic

Definition at line 199 of file stream-euler.cc.

References isnan(), and V.

Referenced by euler2d().

◆ is_singular3d()

static bool is_singular3d ( const Vector3  V)
inlinestatic

Definition at line 373 of file stream-euler.cc.

References isnan(), and V.

Referenced by euler3d().

◆ number_to_fractional()

static void number_to_fractional ( signed long *  id,
double *  fc,
const double  u 
)
inlinestatic

Definition at line 87 of file stream-euler.cc.

References floor().

Referenced by vector_to_cell2d(), and vector_to_cell3d().

◆ streameuler2d_internal()

static octave_value streameuler2d_internal ( const octave_value_list args)
static

◆ streameuler3d_internal()

static octave_value streameuler3d_internal ( const octave_value_list args,
const char *  fcn 
)
static

◆ trilinear()

static double trilinear ( const double  u111,
const double  u211,
const double  u121,
const double  u221,
const double  u112,
const double  u212,
const double  u122,
const double  u222,
const double  x,
const double  y,
const double  z 
)
inlinestatic

Definition at line 267 of file stream-euler.cc.

References x.

Referenced by vector_interpolation3d().

◆ vector_interpolation2d()

static Vector2 vector_interpolation2d ( const Cell2  X,
const Matrix u,
const Matrix v,
const octave_idx_type  cols,
const octave_idx_type  rows 
)
inlinestatic

Definition at line 157 of file stream-euler.cc.

References bilinear(), Cell2::fcx, Cell2::fcy, handle_border(), Cell2::idx, Cell2::idy, and V.

Referenced by euler2d().

◆ vector_interpolation3d()

static Vector3 vector_interpolation3d ( const Cell3  X,
const NDArray u,
const NDArray v,
const NDArray w,
const octave_idx_type  nx,
const octave_idx_type  ny,
const octave_idx_type  nz 
)
inlinestatic

◆ vector_to_cell2d()

static Cell2 vector_to_cell2d ( const Vector2  X)
inlinestatic

Definition at line 126 of file stream-euler.cc.

References number_to_fractional(), Vector2::x, Vector2::y, and Z.

Referenced by euler2d().

◆ vector_to_cell3d()

static Cell3 vector_to_cell3d ( const Vector3  X)
inlinestatic

Definition at line 283 of file stream-euler.cc.

References number_to_fractional(), Vector3::x, Vector3::y, Vector3::z, and Z.

Referenced by euler3d().