Classes | |
| class | Funct |
| A simple class to parse real valued functions. More... | |
| class | Gauss |
| Calculate data for Gauss integration. More... | |
| class | Point< T_ > |
| Defines a point with arbitrary type coordinates. More... | |
| class | Point2D< T_ > |
| Defines a 2-D point with arbitrary type coordinates. More... | |
| class | Tabulation |
| To read and manipulate tabulated functions. More... | |
| class | Timer |
| To set time counting. More... | |
| class | UserData< T_ > |
| Abstract class to define by user various problem data. More... | |
Files | |
| file | OFELI.h |
Header file that includes all kernel classes of the library. | |
| file | OFELI_Config.h |
File that contains some macros. | |
| file | OFELI_Const.h |
File that contains some widely used constants. | |
Defines | |
| #define | OFELI_TOLERANCE OFELI_EPSMCH*10000 |
| #define | OFELI_IMAG std::complex<double>(0.,1.); |
| #define | PARSE(exp, var) theParser.Parse(exp,var) |
| #define | EVAL(d) theParser.Eval(d) |
Typedefs | |
| typedef unsigned long | lsize_t |
| typedef double | real_t |
| typedef std::complex< double > | complex_t |
Functions | |
| void | banner (const string &prog=" ") |
| Outputs a banner as header of any developed program. | |
| void | BSpline (size_t n, size_t t, Vect< Point< double > > &control, Vect< Point< double > > &output, size_t num_output) |
| Function to perform a B-spline interpolation. | |
| void | getBamg (const string &file, Mesh &mesh, size_t nb_dof=1) |
| Construct an instance of class Mesh from a mesh file stored in Bamg format. | |
| void | getEasymesh (const string &file, Mesh &mesh, size_t nb_dof=1) |
| Construct an instance of class Mesh from a mesh file stored in Easymesh format. | |
| void | getEMC2 (const string &file, Mesh &mesh, size_t nb_dof=1) |
| Construct an instance of class Mesh from a mesh file stored in EMC2 format. | |
| void | getGambit (const string &file, Mesh &mesh, size_t nb_dof=1) |
| Construct an instance of class Mesh from a mesh file stored in Gambit neutral format. | |
| void | getGmsh (const string &file, Mesh &mesh, size_t nb_dof=1) |
| Construct an instance of class Mesh from a mesh file stored in Gmsh format. | |
| void | getMatlab (const string &file, Mesh &mesh, size_t nb_dof=1) |
| Construct an instance of class Mesh from a Matlab mesh data. | |
| void | getNetgen (const string &file, Mesh &mesh, size_t nb_dof=1) |
| Construct an instance of class Mesh from a mesh file stored in Netgen format. | |
| void | getTetgen (const string &file, Mesh &mesh, size_t nb_dof=1) |
| Construct an instance of class Mesh from a mesh file stored in Tetgen format. | |
| void | getTriangle (const string &file, Mesh &mesh, size_t nb_dof=1) |
| Construct an instance of class Mesh from a mesh file stored in Triangle format. | |
| ostream & | operator<< (ostream &s, const std::complex< double > &x) |
| Output a complex number. | |
| ostream & | operator<< (ostream &s, const std::string &c) |
| Output a string. | |
| template<class T_ > | |
| ostream & | operator<< (ostream &s, const vector< T_ > &v) |
| Output a vector instance. | |
| template<class T_ > | |
| ostream & | operator<< (ostream &s, const valarray< T_ > &v) |
| Output a valarray instance. | |
| template<class T_ > | |
| ostream & | operator<< (ostream &s, const std::pair< T_, T_ > &a) |
| Output a pair instance. | |
| template<class T_ > | |
| bool | operator== (const Point< T_ > &a, const Point< T_ > &b) |
| Operator ==. | |
| template<class T_ > | |
| Point< T_ > | operator+ (const Point< T_ > &a, const Point< T_ > &b) |
| Operator +. | |
| template<class T_ > | |
| Point< T_ > | operator+ (const Point< T_ > &a, const T_ &x) |
| Operator +. | |
| template<class T_ > | |
| Point< T_ > | operator- (const Point< T_ > &a) |
| Unary Operator -. | |
| template<class T_ > | |
| Point< T_ > | operator- (const Point< T_ > &a, const Point< T_ > &b) |
| Operator -. | |
| template<class T_ > | |
| Point< T_ > | operator- (const Point< T_ > &a, const T_ &x) |
| Operator -. | |
| template<class T_ > | |
| Point< T_ > | operator* (const T_ &a, const Point< T_ > &b) |
| Operator *. | |
| template<class T_ > | |
| Point< T_ > | operator* (const int &a, const Point< T_ > &b) |
| Operator *. | |
| template<class T_ > | |
| Point< T_ > | operator* (const Point< T_ > &b, const T_ &a) |
| Operator /. | |
| template<class T_ > | |
| Point< T_ > | operator* (const Point< T_ > &b, const int &a) |
| Operator *. | |
| template<class T_ > | |
| T_ | operator* (const Point< T_ > &b, const Point< T_ > &a) |
| Operator *. | |
| template<class T_ > | |
| Point< T_ > | operator/ (const Point< T_ > &b, const T_ &a) |
| Operator /. | |
| bool | areClose (const Point< double > &a, const Point< double > &b, double toler=DBL_EPSILON *10000) |
| Return true if both instances of class Point<double> are distant with less then toler. | |
| double | SqrDistance (const Point< double > &a, const Point< double > &b) |
| Return squared euclidean distance between points a and b. | |
| double | Distance (const Point< double > &a, const Point< double > &b) |
| Return euclidean distance between points a and b. | |
| template<class T_ > | |
| std::ostream & | operator<< (std::ostream &s, const Point< T_ > &a) |
| Output point coordinates. | |
| template<class T_ > | |
| bool | operator== (const Point2D< T_ > &a, const Point2D< T_ > &b) |
| Operator ==. | |
| template<class T_ > | |
| Point2D< T_ > | operator+ (const Point2D< T_ > &a, const Point2D< T_ > &b) |
| Operator +. | |
| template<class T_ > | |
| Point2D< T_ > | operator+ (const Point2D< T_ > &a, const T_ &x) |
| Operator +. | |
| template<class T_ > | |
| Point2D< T_ > | operator- (const Point2D< T_ > &a) |
| Unary Operator -. | |
| template<class T_ > | |
| Point2D< T_ > | operator- (const Point2D< T_ > &a, const Point2D< T_ > &b) |
| Operator -. | |
| template<class T_ > | |
| Point2D< T_ > | operator- (const Point2D< T_ > &a, const T_ &x) |
| Operator -. | |
| template<class T_ > | |
| Point2D< T_ > | operator* (const T_ &a, const Point2D< T_ > &b) |
| Operator *. | |
| template<class T_ > | |
| Point2D< T_ > | operator* (const int &a, const Point2D< T_ > &b) |
| template<class T_ > | |
| Point2D< T_ > | operator* (const Point2D< T_ > &b, const T_ &a) |
| Operator /. | |
| template<class T_ > | |
| Point2D< T_ > | operator* (const Point2D< T_ > &b, const int &a) |
| Operator *. | |
| template<class T_ > | |
| T_ | operator* (const Point2D< T_ > &b, const Point2D< T_ > &a) |
| Operator *. | |
| template<class T_ > | |
| Point2D< T_ > | operator/ (const Point2D< T_ > &b, const T_ &a) |
| Operator /. | |
| bool | areClose (const Point2D< double > &a, const Point2D< double > &b, double toler=DBL_EPSILON *10000) |
| Return true if both instances of class Point2D<double> are distant with less then toler. | |
| double | SqrDistance (const Point2D< double > &a, const Point2D< double > &b) |
| Return squared euclidean distance between points a and b. | |
| double | Distance (const Point2D< double > &a, const Point2D< double > &b) |
| Return euclidean distance between points a and b. | |
| template<class T_ > | |
| std::ostream & | operator<< (std::ostream &s, const Point2D< T_ > &a) |
| Output point coordinates. | |
| template<class T_ > | |
| void | qksort (std::vector< T_ > &a, int begin, int end) |
| Function to sort a vector according to a key function. | |
| template<class T_ , class C_ > | |
| void | qksort (std::vector< T_ > &a, int begin, int end, C_ compare) |
| Function to sort a vector according to a key function. | |
| template<class T_ > | |
| void | QuickSort (std::vector< T_ > &a, int begin, int end) |
| Function to sort a vector. | |
| template<class T_ > | |
| void | qksort (std::valarray< T_ > &a, int begin, int end) |
| Function to sort a vector. | |
| template<class T_ , class C_ > | |
| void | qksort (std::valarray< T_ > &a, int begin, int end, C_ compare) |
| Function to sort a vector according to a key function. | |
| void | saveField (Vect< double > &v, string output_file, int opt) |
| void | saveField (Vect< double > &v, const Mesh &mesh, string output_file, int opt) |
| void | saveGnuplot (string input_file, string output_file, string mesh_file) |
| Convert an OFELI field file to an input Gnuplot file. | |
| void | saveTecplot (string input_file, string output_file, string mesh_file) |
| Convert an OFELI field file to an input Tecplot file. | |
| void | saveVTK (string input_file, string output_file, string mesh_file) |
| Convert an OFELI field file to an input VTK file. | |
| void | saveGmsh (string input_file, string output_file, string mesh_file) |
| Convert an OFELI field file to an input Gmsh file. | |
| void | saveGmsh (const string &gp_file, const Mesh &mesh) |
| This function outputs a Mesh instance in a file in Gmsh format. | |
| void | saveGnuplot (const string &file, const Mesh &mesh) |
| This function outputs a Mesh instance in a file in Gmsh format. | |
| void | saveMatlab (const string &file, const Mesh &mesh) |
| This function outputs a Mesh instance in a file in Matlab format. | |
| void | saveTecplot (const string &file, const Mesh &mesh) |
| This function outputs a Mesh instance in a file in Tecplot format. | |
| void | saveVTK (const string &file, const Mesh &mesh, int format=0) |
| This function outputs a Mesh instance in a file in VTK format. | |
| ostream & | operator<< (ostream &s, const Tabulation &t) |
| Output Tabulated function data. | |
| int | Sgn (double a) |
| Return sign of a. | |
| double | Abs2 (complex_t a) |
| Return square of modulus of complex number a. | |
| double | Abs2 (double a) |
| Return square of real number a. | |
| double | Abs (double a) |
| Return absolute value of a. | |
| double | Abs (complex_t a) |
| Return modulus of complex number a. | |
| double | Abs (const Point< double > &p) |
| Return Norm of vector a. | |
| double | Conjg (double a) |
| Return complex conjugate of real number a. | |
| complex_t | Conjg (complex_t a) |
| Return complex conjugate of complex number a. | |
| double | Max (double a, double b, double c) |
| Return maximum value of real numbers a, b and c. | |
| int | Max (int a, int b, int c) |
| Return maximum value of integer numbers a, b and c. | |
| double | Min (double a, double b, double c) |
| Return minimum value of real numbers a, b and c. | |
| int | Min (int a, int b, int c) |
| Return minimum value of integer numbers a, b and c. | |
| double | Max (double a, double b, double c, double d) |
| Return maximum value of integer numbers a, b, c and d. | |
| int | Max (int a, int b, int c, int d) |
| Return maximum value of integer numbers a, b, c and d. | |
| double | Min (double a, double b, double c, double d) |
| Return minimum value of real numbers a, b, c and d. | |
| int | Min (int a, int b, int c, int d) |
| Return minimum value of integer numbers a, b, c and d. | |
| double | Arg (complex_t x) |
| Return argument of complex number x. | |
| complex_t | Log (complex_t x) |
| Return principal determination of logarithm of complex number x. | |
| template<class T_ > | |
| T_ | Sqr (T_ &x) |
| Return square of value x. | |
| template<class T_ > | |
| void | Scale (T_ a, const vector< T_ > &x, vector< T_ > &y) |
| Mutiply vector x by a and save result in vector y. x and y are instances of class vector<T_> | |
| template<class T_ > | |
| void | Scale (T_ a, const valarray< T_ > &x, valarray< T_ > &y) |
| Mutiply vector x by a and save result in vector y. x and y are instances of class valarray<T_> | |
| template<class T_ > | |
| void | Scale (T_ a, vector< T_ > &x) |
| Mutiply vector x by a. x is an instance of class vector<T_> | |
| template<class T_ > | |
| void | Scale (T_ a, valarray< T_ > &x) |
| Mutiply vector x by a. x is an instance of class valarray<T_> | |
| template<class T_ > | |
| void | Xpy (size_t n, T_ *x, T_ *y) |
| Add array x to y. | |
| template<class T_ > | |
| void | Xpy (const vector< T_ > &x, vector< T_ > &y) |
| Add vector x to y. x and y are instances of class vector<T_> | |
| template<class T_ > | |
| void | Xpy (const valarray< T_ > &x, valarray< T_ > &y) |
| Add vector x to y. x and y are instances of class valarray<T_> | |
| template<class T_ > | |
| void | Axpy (size_t n, T_ a, T_ *x, T_ *y) |
| Multiply array x by a and add result to y. n is the arrays length. | |
| template<class T_ > | |
| void | Axpy (T_ a, const vector< T_ > &x, vector< T_ > &y) |
| Multiply vector x by a and add result to y. x and y are instances of class vector<T_> | |
| template<class T_ > | |
| void | Axpy (T_ a, const valarray< T_ > &x, valarray< T_ > &y) |
| Multiply vector x by a and add result to y. x and y are instances of class valarray<T_> | |
| template<class T_ > | |
| void | Copy (size_t n, T_ *x, T_ *y) |
| Copy array x to y. n is the arrays length. | |
| template<class T_ > | |
| void | Copy (const valarray< T_ > &x, valarray< T_ > &y) |
| Copy vector x to y. | |
| double | Error2 (const valarray< double > &x, const valarray< double > &y) |
| Return absolute L2 error between vectors x and y. | |
| double | RError2 (const valarray< double > &x, const valarray< double > &y) |
| Return absolute L2 error between vectors x and y. | |
| double | ErrorMax (const valarray< double > &x, const valarray< double > &y) |
| Return absolute Max. error between vectors x and y. | |
| double | RErrorMax (const valarray< double > &x, const valarray< double > &y) |
| Return relative Max. error between vectors x and y. | |
| template<class T_ > | |
| T_ | Dot (size_t n, T_ *x, T_ *y) |
| Return dot product of arrays x and y. n is the arrays length. | |
| template<class T_ > | |
| T_ | Dot (const vector< T_ > &x, const vector< T_ > &y) |
| Return dot product of vectors x and y. x and y are instances of class vector<T_> | |
| real_t | Dot (const valarray< real_t > &x, const valarray< real_t > &y) |
| Return dot product of vectors x and y. x and y are instances of class valarray<T_> | |
| complex_t | Dot (const valarray< complex_t > &x, const valarray< complex_t > &y) |
| Return dot product of vectors x and y. x and y are instances of class valarray<T_> | |
| template<class T_ > | |
| T_ | Dot (const Point< T_ > &x, const Point< T_ > &y) |
| Return dot product of x and y. | |
| complex_t | CDot (size_t n, const complex_t *x, const complex_t *y) |
| Return dot product of complex arrays x and y. n is the arrays length. | |
| complex_t | CDot (const valarray< complex_t > &x, valarray< complex_t > &y) |
| Return dot product of complex vectors x and y. | |
| double | Nrm2 (size_t n, double *x) |
| Return 2-norm of array x. | |
| double | Nrm2 (const valarray< double > &x) |
| Return 2-norm of vector x. | |
| template<class T_ > | |
| double | Nrm2 (const Point< T_ > &a) |
| Return 2-norm of a. | |
| bool | Equal (double x, double y, double toler=DBL_EPSILON) |
| Function to return true if numbers x and y are close up to a given tolerance toler. | |
| char | itoc (int i) |
| Function to convert an integer to a character. | |
| std::string | itos (int i) |
| Function to convert an integer to a string. | |
| std::string | dtos (double d) |
| Function to convert a double real to a string. | |
| std::string | ftos (float f) |
| Function to convert a float real to a string. | |
| template<class T_ > | |
| T_ | stringTo (const std::string &s) |
| Function to convert a string to a template type parameter. | |
| void | RTrim (char *s) |
| Function to remove blanks at the end of a string. | |
| void | LTrim (char *s) |
| Function to remove blanks at the beginning of a string. | |
| void | Trim (char *s) |
| Function to remove blanks at the beginning and end of a string. | |
| template<class T_ > | |
| void | Swap (T_ &a, T_ &b) |
| Swap elements a and b. | |
Detailed Description
A module that groups utility functions and classes
Define Documentation
| #define OFELI_TOLERANCE OFELI_EPSMCH*10000 |
Default tolerance for an iterative process = OFELI_EPSMCH * 10000
| #define OFELI_IMAG std::complex<double>(0.,1.); |
= Unit imaginary number (i)
| #define PARSE | ( | exp, | |
| var | |||
| ) | theParser.Parse(exp,var) |
A macro that parses a regular expression exp using the variables in the string var. For instance, to parse the function sin(x+y) one must declare PARSE("sin(x+y)","x,y")
| #define EVAL | ( | d | ) | theParser.Eval(d) |
A macro that evaluates a parsed regular expression For instance, with a declaration PARSE("sin(x+y)","x,y") the data x=1 and y=2 using this function must be evaluated as follows: EVAL(d) with d[0]=1, d[1]=2
Typedef Documentation
This type stands for type unsigned long
This type stands for type double
This type stands for type std::complex<double>
Function Documentation
| void banner | ( | const string & | prog = " " | ) |
Outputs a banner as header of any developed program.
- Parameters:
-
[in] prog Calling program name. Enables writing a copyright notice accompanying the program.
| BSpline | ( | size_t | n, |
| size_t | t, | ||
| Vect< Point< double > > & | control, | ||
| Vect< Point< double > > & | output, | ||
| size_t | num_output | ||
| ) |
Function to perform a B-spline interpolation.
This program is adapted from a free program ditributed by Keith Vertanen (vertankd@cda.mrs.umn.edu) in 1994.
- Parameters:
-
[in] n Number of control points minus 1. [in] t Degree of the polynomial plus 1. [in] control Control point array made up of Point stucture. [out] output Vector in which the calculated spline points are to be put. [in] num_output How many points on the spline are to be calculated.
- Note:
- Condition: n+2>t (No curve results if n+2<=t) Control vector contains the number of points specified by n Output array is the proper size to hold num_output point structures
| void getBamg | ( | const string & | file, |
| Mesh & | mesh, | ||
| size_t | nb_dof = 1 |
||
| ) |
Construct an instance of class Mesh from a mesh file stored in Bamg format.
- Parameters:
-
[in] file Name of a file written in the Bamg format.
- Note:
- Bamg is a 2-D mesh generator. It allows to construct adapted meshes from a given metric. It was developed at INRIA, France. Available information can be found in the site:
www-rocq1.inria.fr/gamma/cdrom/www/bamg/eng.htm
- Parameters:
-
[out] mesh Mesh instance created by the function. [in] nb_dof Number of degrees of freedom for each node. This information is not provided, in general, by mesh generators. Its default value here is 1.
| void getEasymesh | ( | const string & | file, |
| Mesh & | mesh, | ||
| size_t | nb_dof = 1 |
||
| ) |
Construct an instance of class Mesh from a mesh file stored in Easymesh format.
- Parameters:
-
[in] file Name of a file (without extension) written in Easymesh format. Actually, the function Easymesh2MDF attempts to read mesh data from files file.e,file.nandfile.sproduced by Easymesh.
- Note:
- Easymesh is a free program that generates 2-D, unstructured, Delaunay and constrained Delaunay triangulations in general domains. It can be downloaded from the site:
http://www-dinma.univ.trieste.it/nirftc/research/easymesh/Default.htm
- Parameters:
-
[in] mesh Mesh instance created by the function. [in] nb_dof Number of degrees of freedom for each node. This information is not provided, in general, by mesh generators. Its default value here is 1.
| void getEMC2 | ( | const string & | file, |
| Mesh & | mesh, | ||
| size_t | nb_dof = 1 |
||
| ) |
Construct an instance of class Mesh from a mesh file stored in EMC2 format.
- Parameters:
-
file [in] Name of a file written in the EMC2 format.
- Note:
- EMC2 is a portable, interactive and graphic software Edition of two dimensional geometry and mesh. It can be downloaded from the site:
http://www-rocq1.inria.fr/gamma/cdrom/www/emc2/eng.htm
- Parameters:
-
[out] mesh Mesh instance created by the function. [in] nb_dof Number of degrees of freedom for each node. This information is not provided, in general, by mesh generators. Its default value here is 1.
| void getGambit | ( | const string & | file, |
| Mesh & | mesh, | ||
| size_t | nb_dof = 1 |
||
| ) |
Construct an instance of class Mesh from a mesh file stored in Gambit neutral format.
- Note:
- Gambit is a commercial mesh generator associated to the CFD code Fluent. Informations about Gambit can be found in the site:
http://www.fluent.com/software/gambit/
- Parameters:
-
[in] file Name of a file written in the Gambit neutral format. [out] mesh Mesh instance created by the function. [in] nb_dof Number of degrees of freedom for each node. This information is not provided, in general, by mesh generators. Its default value here is 1.
| void getGmsh | ( | const string & | file, |
| Mesh & | mesh, | ||
| size_t | nb_dof = 1 |
||
| ) |
Construct an instance of class Mesh from a mesh file stored in Gmsh format.
- Note:
- Gmsh is a free mesh generator that can be downloaded from the site:
http://www.geuz.org/gmsh/
- Parameters:
-
[in] file Name of a file written in the Gmsh format. [out] mesh Mesh instance created by the function. [in] nb_dof Number of degrees of freedom for each node. This information is not provided, in general, by mesh generators. Its default value here is 1.
| void getMatlab | ( | const string & | file, |
| Mesh & | mesh, | ||
| size_t | nb_dof = 1 |
||
| ) |
Construct an instance of class Mesh from a Matlab mesh data.
- Note:
- Matlab is a language of scientific computing including visualization. It is developed by MathWorks. Available information can be found in the site:
http://www.mathworks.com/products/matlab/
- Parameters:
-
[in] file Name of a file created by Matlab by executing the script file Matlab2OFELI.m [out] mesh Mesh instance created by the function. [in] nb_dof Number of degrees of freedom for each node. This information is not provided, in general, by mesh generators. Its default value here is 1.
| void getNetgen | ( | const string & | file, |
| Mesh & | mesh, | ||
| size_t | nb_dof = 1 |
||
| ) |
Construct an instance of class Mesh from a mesh file stored in Netgen format.
- Note:
- Netgen is a tetrahedral mesh generator that can be downloaded from the site:
http://www.hpfem.jku.at/netgen/
- Parameters:
-
[in] file Name of a file written in the Netgen format. [out] mesh Mesh instance created by the function. [in] nb_dof Number of degrees of freedom for each node. This information is not provided, in general, by mesh generators. [ default = 1 ]
| void getTetgen | ( | const string & | file, |
| Mesh & | mesh, | ||
| size_t | nb_dof = 1 |
||
| ) |
Construct an instance of class Mesh from a mesh file stored in Tetgen format.
- Note:
- Tetgen is a free three-dimensional mesh generator that can be downloaded in the site:
http://tetgen.berlios.de/
- Parameters:
-
[in] file Name of a file written in the Tetgen format. [out] mesh Mesh instance created by the function. [in] nb_dof Number of degrees of freedom for each node. This information is not provided, in general, by mesh generators. Its default value here is 1.
| void getTriangle | ( | const string & | file, |
| Mesh & | mesh, | ||
| size_t | nb_dof = 1 |
||
| ) |
Construct an instance of class Mesh from a mesh file stored in Triangle format.
- Note:
- TRIANGLE is a C program that can generate meshes, Delaunay triangulations and Voronoi diagrams for 2D pointsets that can be downloaded in the site:
http://people.scs.fsu.edu/~burkardt/c_src/triangle/triangle.html/
- Parameters:
-
[in] file Name of a file written in the Tetgen format. [out] mesh Mesh instance created by the function. [in] nb_dof Number of degrees of freedom for each node. This information is not provided, in general, by mesh generators. Its default value here is 1.
| bool operator== | ( | const Point< T_ > & | a, |
| const Point< T_ > & | b | ||
| ) |
Operator ==.
Return true if a=b, false if not.
| Point< T_ > operator+ | ( | const Point< T_ > & | a, |
| const Point< T_ > & | b | ||
| ) |
Operator +.
Return sum of two points a and b.
| Point< T_ > operator+ | ( | const Point< T_ > & | a, |
| const T_ & | x | ||
| ) |
Operator +.
Translate by x.
| Point< T_ > operator- | ( | const Point< T_ > & | a | ) |
Unary Operator -.
Return minus a
| Point< T_ > operator- | ( | const Point< T_ > & | a, |
| const Point< T_ > & | b | ||
| ) |
Operator -.
Return point a minus point b.
| Point< T_ > operator- | ( | const Point< T_ > & | a, |
| const T_ & | x | ||
| ) |
Operator -.
Translate a by -x.
| Point< T_ > operator* | ( | const T_ & | a, |
| const Point< T_ > & | b | ||
| ) |
Operator *.
Return point b premultiplied by constant a.
| Point< T_ > operator* | ( | const int & | a, |
| const Point< T_ > & | b | ||
| ) |
Operator *.
Return point b divided by integer constant a
| Point< T_ > operator* | ( | const Point< T_ > & | b, |
| const T_ & | a | ||
| ) |
Operator /.
Return point b postmultiplied by constant a.
| Point< T_ > operator* | ( | const Point< T_ > & | b, |
| const int & | a | ||
| ) |
Operator *.
Return point b postmultiplied by constant a.
| T_ operator* | ( | const Point< T_ > & | b, |
| const Point< T_ > & | a | ||
| ) |
Operator *.
Return point b postmultiplied by integer constant a.
| Point< T_ > operator/ | ( | const Point< T_ > & | b, |
| const T_ & | a | ||
| ) |
Operator /.
Return point b divided by constant a
| bool operator== | ( | const Point2D< T_ > & | a, |
| const Point2D< T_ > & | b | ||
| ) |
Operator ==.
Return true if a=b, false if not.
| Point2D< T_ > operator+ | ( | const Point2D< T_ > & | a, |
| const Point2D< T_ > & | b | ||
| ) |
Operator +.
Return sum of two points a and b.
| Point2D< T_ > operator+ | ( | const Point2D< T_ > & | a, |
| const T_ & | x | ||
| ) |
Operator +.
Translate by x.
| Point2D< T_ > operator- | ( | const Point2D< T_ > & | a | ) |
Unary Operator -.
Return minus a
| Point2D< T_ > operator- | ( | const Point2D< T_ > & | a, |
| const Point2D< T_ > & | b | ||
| ) |
Operator -.
Return point a minus point b.
| Point2D< T_ > operator- | ( | const Point2D< T_ > & | a, |
| const T_ & | x | ||
| ) |
Operator -.
Translate a by -x.
| Point2D< T_ > operator* | ( | const T_ & | a, |
| const Point2D< T_ > & | b | ||
| ) |
Operator *.
Return point b premultiplied by constant a.
| Point2D< T_ > operator* | ( | const int & | a, |
| const Point2D< T_ > & | b | ||
| ) |
Operator *.
Return point b divided by integer constant a
| Point2D< T_ > operator* | ( | const Point2D< T_ > & | b, |
| const T_ & | a | ||
| ) |
Operator /.
Return point b postmultiplied by constant a.
| Point2D< T_ > operator* | ( | const Point2D< T_ > & | b, |
| const int & | a | ||
| ) |
Operator *.
Return point b postmultiplied by constant a.
| T_ operator* | ( | const Point2D< T_ > & | b, |
| const Point2D< T_ > & | a | ||
| ) |
Operator *.
Return point b postmultiplied by integer constant a.
| Point2D< T_ > operator/ | ( | const Point2D< T_ > & | b, |
| const T_ & | a | ||
| ) |
Operator /.
Return point b divided by constant a
| void qksort | ( | std::vector< T_ > & | a, |
| int | begin, | ||
| int | end | ||
| ) |
Function to sort a vector according to a key function.
qksort uses the famous quick sorting algorithm.
- Parameters:
-
[in] a Vector to sort. [in] begin index of starting iterator [in] end index of ending iterator
The calling program must provide the template function bool _less(const T_ &x, const T_ &y); that returns true if object x is ordered lower than object y and false if not.
| void qksort | ( | std::vector< T_ > & | a, |
| int | begin, | ||
| int | end, | ||
| C_ | compare | ||
| ) |
Function to sort a vector according to a key function.
qksort uses the famous quick sorting algorithm.
- Parameters:
-
[in,out] a Vector to sort. [in] begin index of starting iterator [in] end index of ending iterator [in] compare A function object that implements the ordering. The user must provide this function that returns a boolean function that is true if the first argument is less than the second and false if not.
| void QuickSort | ( | std::vector< T_ > & | a, |
| int | begin, | ||
| int | end | ||
| ) |
Function to sort a vector.
qksort uses the famous quick sorting algorithm.
- Parameters:
-
[in,out] a Vector to sort. [in] begin index of starting iterator [in] end index of ending iterator
The calling program must provide an overloading of the operator < for the type T_
| void qksort | ( | std::valarray< T_ > & | a, |
| int | begin, | ||
| int | end | ||
| ) |
Function to sort a vector.
qksort uses the famous quick sorting algorithm.
- Parameters:
-
[in,out] a Vector to sort. [in] begin index of starting index (default value is 0) [in] end index of ending index (default value is the vector size - 1)
| void qksort | ( | std::valarray< T_ > & | a, |
| int | begin, | ||
| int | end, | ||
| C_ | compare | ||
| ) |
Function to sort a vector according to a key function.
qksort uses the famous quick sorting algorithm.
- Parameters:
-
[in,out] a Vector to sort. [in] begin index of starting index (0 for the beginning of the vector) [in] end index of ending index [in] compare A function object that implements the ordering. The user must provide this function that returns a boolean function that is true if the first argument is less than the second and false if not.
| void saveField | ( | Vect< double > & | v, |
| string | output_file, | ||
| int | opt | ||
| ) |
- Parameters:
-
[in] v Vect instance to save [in] output_file Output file where to save the vector [in] opt Option to choose file format to save. This is to be chosen among enumerated values: GMSH GNUPLOT MATLAB TECPLOT VTK
| void saveField | ( | Vect< double > & | v, |
| const Mesh & | mesh, | ||
| string | output_file, | ||
| int | opt | ||
| ) |
| void saveGnuplot | ( | string | input_file, |
| string | output_file, | ||
| string | mesh_file | ||
| ) |
Convert an OFELI field file to an input Gnuplot file.
Gnuplot is a command-line driven program for producing 2D and 3D plots. It is under the GNU General Public License. Available information can be found in the site:
http://www.gnuplot.info/
- Parameters:
-
[in] input_file Input file (OFELI XML file containing a field). [in] output_file Output file (gnuplot format file) [in] mesh_file File containing mesh data
| void saveTecplot | ( | string | input_file, |
| string | output_file, | ||
| string | mesh_file | ||
| ) |
Convert an OFELI field file to an input Tecplot file.
Tecplot is high quality post graphical commercial processing program developed by Amtec. Available information can be found in the site: http://www.tecplot.com
- Parameters:
-
[in] input_file Input file (OFELI XML file containing a field). [in] output_file Output file (gnuplot format file) [in] mesh_file File containing mesh data
| saveVTK | ( | string | input_file, |
| string | output_file, | ||
| string | mesh_file | ||
| ) |
Convert an OFELI field file to an input VTK file.
The Visualization ToolKit (VTK) is an open source, freely available software system for 3D computer graphics. Available information can be found in the site:
http://public.kitware.com/VTK/
- Parameters:
-
[in] input_file Input file (OFELI XML file containing a field). [in] output_file Output file (gnuplot format file) [in] mesh_file File containing mesh data
| void saveGmsh | ( | string | input_file, |
| string | output_file, | ||
| string | mesh_file | ||
| ) |
Convert an OFELI field file to an input Gmsh file.
Gmsh is a free mesh generator and postprocessor that can be downloaded from the site:
http://www.geuz.org/gmsh/
- Parameters:
-
[in] input_file Input file (OFELI XML file containing a field). [in] output_file Output file (gnuplot format file) [in] mesh_file File containing mesh data
| void saveGmsh | ( | const string & | file, |
| const Mesh & | mesh | ||
| ) |
This function outputs a Mesh instance in a file in Gmsh format.
- Note:
- Gmsh is a free mesh generator that can be downloaded from the site: http://www.geuz.org/gmsh/
- Parameters:
-
[out] file Output file in Gmsh format. [in] mesh Mesh instance to save.
| void saveGnuplot | ( | const string & | file, |
| const Mesh & | mesh | ||
| ) |
This function outputs a Mesh instance in a file in Gmsh format.
- Note:
- Gnuplot is a command-line driven program for producing 2D and 3D plots. It is under the GNU General Public License. Available information can be found in the site:
http://www.gnuplot.info/
- Parameters:
-
[out] file Output file in Gnuplot format. [in] mesh Mesh instance to save.
| void saveMatlab | ( | const string & | file, |
| const Mesh & | mesh | ||
| ) |
This function outputs a Mesh instance in a file in Matlab format.
- Note:
- Matlab is a language of scientific computing including visualization. It is developed by MathWorks. Available information can be found in the site:
http://www.mathworks.com/products/matlab/
- Parameters:
-
[out] file Output file in Matlab format. [in] mesh Mesh instance to save.
| void saveTecplot | ( | const string & | file, |
| const Mesh & | mesh | ||
| ) |
This function outputs a Mesh instance in a file in Tecplot format.
- Note:
- Tecplot is high quality post graphical commercial processing program developed by Amtec. Available information can be found in the site:
http://www.tecplot.com
- Parameters:
-
[out] file Output file in Tecplot format. [in] mesh Mesh instance to save.
| void saveVTK | ( | const string & | file, |
| const Mesh & | mesh, | ||
| int | format = 0 |
||
| ) |
This function outputs a Mesh instance in a file in VTK format.
- Note:
- The Visualization ToolKit (VTK) is an open source, freely available software system for 3D computer graphics. Available information can be found in the site:
http://public.kitware.com/VTK/
- Parameters:
-
[out] file Output file in VTK format. [in] mesh Mesh instance to save. [in] format Option for output format.
| double Nrm2 | ( | size_t | n, |
| double * | x | ||
| ) |
Return 2-norm of array x.
- Parameters:
-
[in] n is Array length [in] x Array to treat
| bool Equal | ( | double | x, |
| double | y, | ||
| double | toler = DBL_EPSILON |
||
| ) |
Function to return true if numbers x and y are close up to a given tolerance toler.
Default value of tolerance is the constant OFELI_EPSMCH