![]() |
MoDeNa
1.0
Software framework facilitating sequential multi-scale modelling
|
Helpful geometric and mathematical functions. More...
#include "globals.hh"Go to the source code of this file.
Functions | |
| bool | in_domain (double x, double y, double z) |
| True if the point is in the domain, False otherwise. More... | |
| double * | CrossProduct (double a[], double b[]) |
| Cross product of two points in 3D. More... | |
| bool | SameSide (double p1[], double p2[], double a[], double b[]) |
| True if two points are in the same half-plane defined by other two points. More... | |
| bool | PointInTriangle (double p[], double a[], double b[], double c[]) |
| True if point lies in the triangle. More... | |
| double | porosity (int ***amat) |
| Calculates porosity. More... | |
Helpful geometric and mathematical functions.
Definition in file geometry.cc.
| double* CrossProduct | ( | double | a[], |
| double | b[] | ||
| ) |
Cross product of two points in 3D.
| [in] | a | 1st point |
| [in] | b | 2nd point |
Definition at line 20 of file geometry.cc.
References globals::cp.
Referenced by SameSide().
| bool in_domain | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) |
True if the point is in the domain, False otherwise.
| [in] | x | x position |
| [in] | y | x position |
| [in] | z | x position |
Definition at line 9 of file geometry.cc.
References globals::nz.
Referenced by importFoamSkeleton(), makeEdgeStruts(), makeNodeStruts(), and saveToGnuplot().
| bool PointInTriangle | ( | double | p[], |
| double | a[], | ||
| double | b[], | ||
| double | c[] | ||
| ) |
True if point lies in the triangle.
| [in] | p | the point |
| [in] | a | 1st point defining triangle |
| [in] | b | 2nd point defining triangle |
| [in] | c | 3rd point defining triangle |
Definition at line 56 of file geometry.cc.
Referenced by makeEdgeStruts().
| double porosity | ( | int *** | amat | ) |
Calculates porosity.
| [in] | amat | matrix |
Definition at line 70 of file geometry.cc.
References globals::nx, globals::ny, globals::nz, and constants::por.
Referenced by main(), and phys_prop::porosity().
| bool SameSide | ( | double | p1[], |
| double | p2[], | ||
| double | a[], | ||
| double | b[] | ||
| ) |
True if two points are in the same half-plane defined by other two points.
| [in] | p1 | 1st point |
| [in] | p2 | 2nd point |
| [in] | a | 1st point defining half-plane |
| [in] | b | 2nd point defining half-plane |
Definition at line 32 of file geometry.cc.
References CrossProduct().