muMECH  1.0
Classes | Enumerations | Functions
gelibspace Namespace Reference

Classes

class  Array
 
class  Array1d
 
class  Dmtrx
 
class  Dscal
 
class  Dvctr
 
struct  Elem3D
 
class  Lmtrx
 
class  Lvctr
 
struct  MatriX
 
struct  PoinT
 
class  Stream
 
struct  VectoR
 
class  Xmtrx
 
class  Xscal
 
class  Xvctr
 

Enumerations

enum  arrayClassType { DvctrClass, LvctrClass, DscalClass }
 
enum  arrayTypedef { ATlong, ATdouble }
 
enum  ETCLR {
  ETC_VOID, ETC_B_BLACK, ETC_D_BLACK, ETC_B_RED,
  ETC_D_RED, ETC_B_GREEN, ETC_D_GREEN, ETC_B_YELLOW,
  ETC_D_YELLOW, ETC_B_BLUE, ETC_D_BLUE, ETC_B_VIOLET,
  ETC_D_VIOLET, ETC_B_CYAN, ETC_D_CYAN, ETC_B_WHITE,
  ETC_D_WHITE, ETC_DEFAULT
}
 enum More...
 
enum  VTKrange {
  VTKR_void, VTKR_points, VTKR_cells, VTKR_lines,
  VTKR_polygs, VTKR_pred, VTKR_pd, VTKR_cd,
  VTKR_data, VTKR_fields
}
 
enum  Stream_type { STRM_void, STRM_file, STRM_tixel, STRM_string }
 

*** *** *** *** CLASS STREAM *** *** *** ***


More...
 

Functions

double give_copy_r2z (double a, double zero)
 
double * give_copy_r2z (double *a, long n, double zero)
 
void pprint_symtensor (char *stream, int precision, const long *a)
 
void pprint_symtensor_zeroL (char *stream, int precision)
 
void pprint_symtensor (FILE *stream, int precision, const long *a)
 
void pprint_symtensor_zeroL (FILE *stream, int precision)
 
void pprint_tensor (FILE *stream, int precision, const double *a)
 
void pprint_symtensor (char *stream, int precision, const double *a)
 
void pprint_symtensor (FILE *stream, int precision, const double *a)
 
void pprint_tensor_zero (char *stream, int precision)
 
void pprint_tensor_zero (FILE *stream, int precision)
 
void errorr (const char *file, int line, const char *format,...)
 

*** *** *** *** ERROR FCE *** *** *** ***


More...
 
void warningg (const char *file, int line, const char *format,...)
 
void openFileTest (const FILE *stream, const char *name)
 

*** *** *** *** FILE FCE *** *** *** ***


More...
 
FILE * openFileN (const char *File, int Line, const char *mode, const char *key, const char *name)
 
FILE * openFilePN (const char *File, int Line, const char *mode, const char *key, const char *path, const char *name)
 
FILE * openFilePNS (const char *File, int Line, const char *mode, const char *key, const char *path, const char *name, const char *suff)
 
FILE * openFilePNSS (const char *File, int Line, const char *mode, const char *key, const char *path, const char *name, const char *suff, const char *suff2)
 
const char * trmt_clr_int2clr (ETCLR clr)
 
void change_console_colour (FILE *stream, ETCLR clr)
 
template<class ArgType >
void allocate (ArgType *&p, long a)
 

*** *** *** *** ALLOCATE TEMPLATES *** *** *** ***


More...
 
template<class ArgType >
void allocate (ArgType **&p, long a, long b)
 
template<class ArgType >
void allocate (ArgType ***&p, long a, long b, long c)
 
template<class ArgType >
void deallocateCheck (ArgType *p, bool check=true)
 

*** *** *** *** DEALLOCATE TEMPLATES *** *** *** ***


More...
 
template<class ArgType >
void deallocateCheckUno (ArgType *p, bool check=true)
 
template<class ArgType >
void deallocateCheck (ArgType **p, long a, bool check=true)
 
template<class ArgType >
void deallocateCheckUno (ArgType **p, long a, bool check=true)
 
template<class ArgType >
void deallocateCheck (ArgType ***p, long a, long b, bool check=true)
 
template<class ArgType >
void deallocateCheckUno (ArgType ***p, long a, long b, bool check=true)
 
template<class ArgType >
void deallocateCheck (ArgType ***p, long a, long *b, bool check=true)
 
template<class ArgType >
void fill_all_by (ArgType *p, long a, ArgType value)
 

*** *** *** *** FILL TEMPLATES *** *** *** ***


More...
 
template<class ArgType >
void fill_all_by (ArgType **p, long a, long b, ArgType value)
 
template<class ArgType >
void fill_all_by (ArgType ***p, long a, long b, long c, ArgType value)
 
template<class ArgType >
void fill_row_by (ArgType **p, long i, long m, ArgType value)
 
template<class ArgType >
void fill_col_by (ArgType **p, long n, long j, ArgType value)
 
template<class ArgType >
void allocate_another_val (long n, ArgType *&old_field)
 

*** *** *** *** REALLOCATE TEMPLATES *** *** *** ***


More...
 
template<class ArgType >
void allocate_another_uno_ptr (long n, ArgType **&old_field, long add=1)
 
template<class ArgType >
void setadd_another_uno_ptr (long &n, ArgType **&field, ArgType *p)
 
template<class ArgType >
void shake_down_ptr_array (long &n, ArgType *array)
 

*** *** *** *** VARIOUS TEMPLATES *** *** *** ***


More...
 
template<class ArgType >
long arrays_arenot_identical (long n, ArgType *a1, ArgType *a2)
 
template<class ArgType >
long is_member_of_array (ArgType val, long n, const ArgType *array)
 check out "val" is member of "array" More...
 
template<class ArgType >
bool members_are_unique (long n, const ArgType *array)
 check out all members of array "a" are uniq More...
 
template<class ArgType >
bool same_array_elements_asym (long nx, const ArgType *x, long ny, const ArgType *y, bool same_dim=false)
 Function finds out whether every element of the array 'x' is in the array 'y'. More...
 
template<class ArgType >
bool same_array_elements_sym (long nx, const ArgType *x, long ny, const ArgType *y, bool same_dim=false)
 Function finds out whether every element of the array 'x' is in the array 'y', and symmetrically every element of the array 'y' is in the array 'x'. More...
 
template<class ArgType >
void add_array (long &n1, ArgType *&array1, long n2, const ArgType *array2)
 
template<class ArgType >
void add_array_unique (long &n1, ArgType *&array1, long n2, const ArgType *array2)
 
template<class ArgType >
void interchange2 (ArgType &a, ArgType &b)
 
bool file_exist (const char *name)
 
bool file_delete_if_exist (const char *name)
 
void file_delete_if_exist_exit (const char *name)
 
bool get_confirm (const char *s, bool expected)
 
bool isWordChar (char C)
 

*** *** *** *** GENERAL FUNCTIONS *** *** *** ***


return true if character C is "normal" char –> C != ' ' '' '
' '\0' '' More...

 
bool isLineChar (char C)
 return true if character C is "normal" char or "space" char –> C != '
' '\0' '' More...
 
bool isSpaceChar (char C)
 return true if character C is "space" char –> C == ' ' '' More...
 
bool isDigitChar (char C)
 
long giveLineLength (const char *src)
 return length of line == sting compount of "line chars" More...
 
char * strdupl (const char *src)
 standard strdup - Memory for the new string is obtained with malloc(3), and can be freed with free(3). More...
 
char * strdupl (const char *src1, const char *src2)
 
char * strdupl (const char *src1, const char *src2, const char *src3)
 
char * pathstrdupl (const char *src)
 
long AP_find_option (int argc, char *argv[], const char *s)
 

*** *** *** *** ARGUMENTS PROCESSING *** *** *** ***


terminology: tar -cz -f archiv.tgz archiv/ /// fce name | arguments /// fce name | options | parameters /// fce name | opt | opt | opt argum. More...

 
void AP_fprint_arguments (FILE *stream, int argc, char *argv[])
 print arguments to stream More...
 
bool FP_skip_comment (FILE *stream)
 

*** *** *** *** FILE PROCESSING *** *** *** ***


general rules for file processing: More...

 
void FP_skip_line_commented (FILE *stream)
 move file descriptor to the start of the new noncommented line, without checking of EOF More...
 
void FP_skip_line_fast_skip_commented (FILE *stream, int n)
 move file descriptor to the start of the n-th new line, without checking of EOF More...
 
bool FP_skip_line (FILE *stream, int n)
 move file descriptor to the start of the n-th new line //[former read_line] More...
 
bool FP_skip_behind_line_starting_with (FILE *stream, const char *string, bool cs)
 move file descriptor to the start of the new line after the one starting with string More...
 
bool FP_skip_to_line_starting_with (FILE *stream, const char *string, bool cs)
 move file descriptor to the line starting with string, exactly behind the string; white space can be before string More...
 
bool FP_skip_to_line_starting_With (FILE *stream, const char *string, bool cs)
 move file descriptor to the line starting with string, exactly behind the string; NO white space can be before string More...
 
void FP_copy_file (FILE *sour, FILE *dest)
 [former copy_file] More...
 
bool FP_cmp_files (const char *file1, const char *file2)
 Return false if no differences. More...
 
bool FP_copy_behind_line (FILE *sour, FILE *dest, int n)
 copy from file to file behind the line [former copy_line] More...
 
bool FP_copy_behind_line_starting_with (FILE *src, FILE *dest, const char *expctd, bool cs)
 copy from file to file behind the line starting with string More...
 
bool FP_skip_to_line_starting_with (FILE *stream, char C)
 replacement of old function "read_contiguous_star" move file descriptor to the line starting with character, directly to this char More...
 
bool FP_scan_array (FILE *stream, int n, int *dest)
 scan/copy array of numbers from src to dest, src pointer is shifted over the field More...
 
bool FP_scan_array (FILE *stream, int n, long *dest)
 
bool FP_scan_array (FILE *stream, int n, double *dest)
 
long FP_number_of_words (FILE *stream)
 count number of words (see isWordChar) in file More...
 
long FP_number_of_lines (FILE *stream, bool rwd)
 count number of lines in file More...
 
bool FP_skip_nonword (FILE *stream)
 

*** *** *** SKIPING *** *** ***


skiping == shift stream pointer at the first char which is not ... More...

 
bool FP_skip_space (FILE *stream)
 ... space More...
 
bool FP_skip_word (FILE *stream)
 ... word More...
 
long FP_scan_line_skip_emptyORcommented (FILE *stream, char *dest)
 

*** *** *** SCANNING *** *** ***


scanning == scan ... More...

 
long FP_scan_line (FILE *stream, char *dest)
 scan/copy line == string without '
' from stream More...
 
long FP_scan_line_alloc (FILE *stream, char *&dest)
 scan/copy line == string without '
' from stream; dest is NULL and allocated here More...
 
int FP_scan_word (FILE *src, char *dest)
 ... word; return value is length of the word More...
 
bool FP_skip_expected_string (FILE *src, const char *expctd, bool cs)
 ... word and compare with expected one More...
 
bool FP_scan_expected_word (FILE *src, const char *expctd, bool cs)
 ... word and compare with expected one More...
 
void FP_scan_expected_word_FL (const char *file, int line, FILE *src, const char *expctd, const char *msg, bool cs)
 ... word and compare with expected one, exit if false More...
 
bool FP_scan_expected_line (FILE *src, const char *expctd, bool cs)
 ... line and compare with expected one More...
 
void FP_scan_expected_line_FL (const char *file, int line, FILE *src, const char *expctd, const char *msg, bool cs)
 ... line and compare with expected one, exit if false More...
 
bool FP_scan_expected_number (FILE *src, long expctd)
 ... number and compare with expected one More...
 
void errorr_expected (const char *file, int line, const char *msg, const char *expctd, const char *src)
 

*** *** *** *** STRING PROCESSING *** *** *** ***


src pointer is always shifted over the skipped/scanned/printed word/number/array word is string separated by ' ', '', '
' or '\0' More...

 
void errorr_expected (const char *file, int line, const char *msg, int expctd, const char *src)
 
void errorr_expected (const char *file, int line, const char *msg, long expctd, const char *src)
 
void errorr_expected (const char *file, int line, const char *msg, double expctd, const char *src)
 
bool SP_cutcomment (char *src)
 cut of comment == end of line starting by '#' More...
 
bool SP_replace_char (char *str, char s, char d)
 replace src char to dest char More...
 
bool SP_unskip_space (const char *&src)
 

*** *** *** SKIPING *** *** ***


(un)skiping == shift src pointer at the end(start) of ... More...

 
bool SP_skip_space (const char *&src)
 ... space == ' ' and '' characters More...
 
bool SP_skip_word (const char *&src, int n)
 ... word and space before More...
 
bool SP_skip_int (const char *&src)
 ... word compound of digits and space before More...
 
void SP_unscan_word (const char *&src, const char *w)
 

*** *** *** SCANNING *** *** ***


unscan word == shift pointer back over word More...

 
bool SP_scan_character (const char *&src, char &dest)
 scanning == scan ... to variable dest and shift src pointer at the end of ... More...
 
long SP_scan_word (const char *&src, char *dest)
 ... word; return value is length of the word More...
 
long SP_scan_line (const char *&src, char *dest)
 ... line; return value is length of the line More...
 
long SP_scan_line_alloc (const char *&src, char *&dest)
 ... line; return value is length of the line; dest is NULL and allocated here More...
 
bool SP_scan_expected_word (const char *&src, const char *expctd, bool cs)
 ... word and compare with expected one More...
 
void SP_scan_expected_word_FL (const char *file, int line, const char *&src, const char *expctd, const char *msg, bool cs)
 ... word and compare with expected one/two/three, exit if false More...
 
void SP_scan_expected_word_FL (const char *file, int line, const char *&src, const char *expctd1, const char *expctd2, const char *msg, bool cs)
 
void SP_scan_expected_word_FL (const char *file, int line, const char *&src, const char *expctd1, const char *expctd2, const char *expctd3, const char *msg, bool cs)
 
bool SP_scan_number (const char *&src, int &dest)
 ... number of type int/long/double More...
 
bool SP_scan_number (const char *&src, long &dest)
 
bool SP_scan_number (const char *&src, double &dest)
 
bool SP_scan_array_L (const char *&src, int L, double *a)
 
bool SP_scan_Dvctr_exit (const char *&src, int n, Dvctr *v)
 
bool SP_print_space (const char *&src, FILE *stream)
 

*** *** *** PRINTING *** *** ***


printing == print ... More...

 
bool SP_print_word (const char *&src, FILE *stream)
 ... word More...
 
long find_double (long n, long *p)
 

*** *** *** *** OBSOLETE FUNCTIONS *** *** *** ***


More...
 
void sprint_param (char *s, char *argv[], int n)
 
void read_star_end (FILE *stream, int n)
 
void read_star (FILE *stream)
 
void copy_star_end (FILE *sour, FILE *dest, int n=1)
 read line of file until
, no save, dava bacha na EOF More...
 
void copy_star (FILE *sour, FILE *dest)
 
void copy_to_end_line (FILE *sour, FILE *dest)
 
int extract_long (const char *s1, const char *s2, long &a)
 
int extract_double (const char *s1, const char *s2, double &a)
 v retezci s1 se najde key retezec s2 a za nim se precte double More...
 
void extract_double_array (const char *s1, const char *s2, long n, double *a)
 
void ad_line (FILE *stream, char *s)
 
template<class ArgType >
void FP_scan_expected_number_FL (const char *file, int line, FILE *src, ArgType expctd, const char *msg)
 ... number and compare with expected one, exit if false More...
 
template<class ArgType >
bool SP_scan_expected_number (const char *&src, ArgType expctd)
 ... number and compare with expected one More...
 
template<class ArgType >
void SP_scan_expected_number_FL (const char *file, int line, const char *&src, ArgType expctd, const char *msg)
 ... number and compare with expected one, exit if false More...
 
template<class ArgType >
bool SP_scan_array (const char *&src, int n, ArgType *a)
 ... array of numbers More...
 
template<class ArgType >
bool SP_scan_array (const char *&src, long n, ArgType *a)
 
template<class ArgType >
bool SP_scan_array_alloc (const char *&src, long &n, ArgType *&a)
 
template<class ArgType >
bool SP_scan_Xvctr (const char *&src, ArgType *dest)
 bool SP_scan_Dvctr (const char *&src, Dvctr *dest); More...
 
void give_line (FILE *stream, char *&s)
 
void shaker (long &n, long *a)
 zlikviduje vicenasobne cifry pro long in <0;..> More...
 
void sort_4 (long *x)
 Function sorts first four members of array with ascending order. More...
 
void sort_3 (long *x)
 Function sorts first three members of array with ascending order. More...
 
void sort_2 (long *x)
 Function sorts first two members of array with ascending order. More...
 
void solve_3 (const double *m, const double *r, double *l)
 Function solves the system of linear equations. More...
 
void solve_3 (const double **m, const double *r, double *l)
 Function solves the system of linear equations. More...
 
long solv_2nle (double zero, const double *a, const double *b, const double *c, const double *d, double *x, double *y)
 function solves system of two non-linear equations: a[0]*x*y + b[0]*x + c[0]*y + d[0] = 0 a[1]*x*y + b[1]*x + c[1]*y + d[1] = 0 answer: -1 = infinite number of results 0,1,2 = number of results More...
 
long solv_2le (double zero, const double *a, const double *b, const double *c, double &x, double &y)
 function solves system of two linear equations: a[0]*x + b[0]*y + c[0] = 0 a[1]*x + b[1]*y + c[1] = 0 answer: -1 = infinite number of results 0,1 = number of results More...
 
long solv_1le (double zero, double a, double b, double &x)
 function solves linear equation: a*x + b = 0 answer: -1 = infinite number of results 0,1 = number of results More...
 
void nilling (double zero, double &a)
 
double nillret (double zero, double a)
 
bool isZero (double zero, double a)
 
bool isZero (double abszero, double relzero, double a)
 
bool areSame (double abszero, double relzero, double a, double b)
 
long solv_polynom_2 (double zero, double a, double b, double c, double &r1, double &r2)
 function searchs roots of polynom of 2nd order = quadratic equation a*x^2 + b*x + c = 0 answer: -1 = infinite number of results 0,1,2 = no,one,two results More...
 
long div_dd (double d1, double d2, const char *s1, const char *s2, const long line)
 
long div_dd (long &answer, double d1, double d2)
 
long div_dd (int &answer, double d1, double d2)
 
int decomp_int (int answer[], int n, int l, int rad)
 
long decomp_int (int answer[], int n, long l, long rad)
 
long long decomp_int (int answer[], int n, long long l, long long rad)
 
bool isNonZero (double x, double tolerance)
 
double sgn (double i)
 Returns the signum of given value (if value is < 0 returns -1, otherwise returns 1) More...
 
bool ST_scan_number (Stream *src, int &dest)
 

*** *** *** *** TINYXML FCE *** *** *** ***


More...
 
bool ST_scan_number (Stream *src, long &dest)
 
bool ST_scan_number (Stream *src, double &dest)
 
bool ST_scan_array (Stream *src, int n, int *dest)
 scan/copy array of numbers from src to dest, src pointer is shifted over the field More...
 
bool ST_scan_array (Stream *src, int n, long *dest)
 
bool ST_scan_array (Stream *src, int n, double *dest)
 
bool ST_scan_expected_number (Stream *src, long expctd)
 ... number and compare with expected one More...
 
long GP_scan_line (Stream *stream, char *dest)
 ... line; return value is length of the line More...
 
long GP_scan_line_alloc (Stream *stream, char *&dest)
 ... line; return value is length of the line; dest is NULL and allocated here More...
 
long GP_scan_line_alloc_skip_commented (Stream *stream, char *&dest)
 
long GP_scan_word (Stream *stream, char *dest)
 ... word; return value is length of the word More...
 
const XMLElementXP_give_unique_expected_elem (const XMLNode *xelem, const char *name, bool uniq)
 
void XP_check_expected_attribute (const XMLNode *xelem, const char *name, const char *value)
 
const char * XP_giveDAtext (const XMLNode *xelem, int n, bool last, const char *format, const char *type, const char *name, int *noc)
 
XMLDocumentopenTXdcPN (const char *path, const char *name)
 

*** *** *** *** TINYXML FCE *** *** *** ***


More...
 
XMLDocumentopenTXdcPNSS (const char *path, const char *name, const char *suff, const char *suff2)
 
template<class ArgType >
void ST_scan_expected_number_FL (const char *file, int line, Stream *src, ArgType expctd, const char *msg)
 ... number and compare with expected one, exit if false More...
 

Enumeration Type Documentation

Enumerator
DvctrClass 
LvctrClass 
DscalClass 

Definition at line 296 of file arrays.h.

Enumerator
ATlong 
ATdouble 

Definition at line 297 of file arrays.h.

enum

Enumerator
ETC_VOID 
ETC_B_BLACK 
ETC_D_BLACK 
ETC_B_RED 
ETC_D_RED 
ETC_B_GREEN 
ETC_D_GREEN 
ETC_B_YELLOW 
ETC_D_YELLOW 
ETC_B_BLUE 
ETC_D_BLUE 
ETC_B_VIOLET 
ETC_D_VIOLET 
ETC_B_CYAN 
ETC_D_CYAN 
ETC_B_WHITE 
ETC_D_WHITE 
ETC_DEFAULT 

Definition at line 98 of file gelib.h.


*** *** *** *** CLASS STREAM *** *** *** ***


Enumerator
STRM_void 
STRM_file 
STRM_tixel 
STRM_string 

Definition at line 44 of file tixy2.h.

Enumerator
VTKR_void 
VTKR_points 
VTKR_cells 
VTKR_lines 
VTKR_polygs 
VTKR_pred 
VTKR_pd 
VTKR_cd 
VTKR_data 
VTKR_fields 

Definition at line 29 of file tixy2.h.

Function Documentation

void gelibspace::ad_line ( FILE *  stream,
char *  s 
)

Definition at line 846 of file librw.cpp.

Referenced by SP_scan_Xvctr().

template<class ArgType >
void gelibspace::add_array ( long &  n1,
ArgType *&  array1,
long  n2,
const ArgType *  array2 
)

Definition at line 373 of file gelib.h.

template<class ArgType >
void gelibspace::add_array_unique ( long &  n1,
ArgType *&  array1,
long  n2,
const ArgType *  array2 
)

Definition at line 389 of file gelib.h.

References is_member_of_array().

template<class ArgType >
void gelibspace::allocate ( ArgType *&  p,
long  a 
)


*** *** *** *** ALLOCATE TEMPLATES *** *** *** ***


Definition at line 192 of file gelib.h.

Referenced by allocate().

template<class ArgType >
void gelibspace::allocate ( ArgType **&  p,
long  a,
long  b 
)

Definition at line 193 of file gelib.h.

References allocate().

template<class ArgType >
void gelibspace::allocate ( ArgType ***&  p,
long  a,
long  b,
long  c 
)

Definition at line 194 of file gelib.h.

References allocate().

template<class ArgType >
void gelibspace::allocate_another_uno_ptr ( long  n,
ArgType **&  old_field,
long  add = 1 
)

Definition at line 271 of file gelib.h.

Referenced by setadd_another_uno_ptr().

template<class ArgType >
void gelibspace::allocate_another_val ( long  n,
ArgType *&  old_field 
)


*** *** *** *** REALLOCATE TEMPLATES *** *** *** ***


Definition at line 260 of file gelib.h.

References _errorr.

long gelibspace::AP_find_option ( int  argc,
char *  argv[],
const char *  s 
)


*** *** *** *** ARGUMENTS PROCESSING *** *** *** ***


terminology: tar -cz -f archiv.tgz archiv/ /// fce name | arguments /// fce name | options | parameters /// fce name | opt | opt | opt argum.

pass through arguments looking for option "s" [former find_param]

| parameters /// argv[0] argv[1] ... ... argv[argc-1] pass through arguments looking for option "s" return position of the option, 0 if not found

Definition at line 108 of file librw.cpp.

References _STRCASECMP.

Referenced by main(), and parameters().

void gelibspace::AP_fprint_arguments ( FILE *  stream,
int  argc,
char *  argv[] 
)

print arguments to stream

print arguments to stream [former print_command_line]

Definition at line 117 of file librw.cpp.

bool gelibspace::areSame ( double  abszero,
double  relzero,
double  a,
double  b 
)

Definition at line 319 of file mathlib.cpp.

References isZero().

Referenced by mumech::cmp_vtk_file(), and compare_grafs().

template<class ArgType >
long gelibspace::arrays_arenot_identical ( long  n,
ArgType *  a1,
ArgType *  a2 
)

Definition at line 309 of file gelib.h.

void gelibspace::change_console_colour ( FILE *  stream,
ETCLR  clr 
)
inline

Definition at line 138 of file gelib.h.

References CHANGE_CONSOLE_COLOUR, errorr(), trmt_clr_int2clr(), and warningg().

void gelibspace::copy_star ( FILE *  sour,
FILE *  dest 
)

Definition at line 804 of file librw.cpp.

Referenced by copy_star_end(), and SP_scan_Xvctr().

void gelibspace::copy_star_end ( FILE *  sour,
FILE *  dest,
int  n 
)

read line of file until
, no save, dava bacha na EOF

Definition at line 800 of file librw.cpp.

References copy_star(), and FP_copy_behind_line().

Referenced by SP_scan_Xvctr().

void gelibspace::copy_to_end_line ( FILE *  sour,
FILE *  dest 
)

Definition at line 811 of file librw.cpp.

Referenced by SP_scan_Xvctr().

template<class ArgType >
void gelibspace::deallocateCheck ( ArgType *  p,
bool  check = true 
)


*** *** *** *** DEALLOCATE TEMPLATES *** *** *** ***


Definition at line 201 of file gelib.h.

References _warningg.

Referenced by deallocateCheck().

template<class ArgType >
void gelibspace::deallocateCheck ( ArgType **  p,
long  a,
bool  check = true 
)

Definition at line 213 of file gelib.h.

References _warningg, and deallocateCheck().

template<class ArgType >
void gelibspace::deallocateCheck ( ArgType ***  p,
long  a,
long  b,
bool  check = true 
)

Definition at line 225 of file gelib.h.

References _warningg, and deallocateCheck().

template<class ArgType >
void gelibspace::deallocateCheck ( ArgType ***  p,
long  a,
long *  b,
bool  check = true 
)

Definition at line 235 of file gelib.h.

References _warningg, and deallocateCheck().

template<class ArgType >
void gelibspace::deallocateCheckUno ( ArgType *  p,
bool  check = true 
)

Definition at line 206 of file gelib.h.

References _warningg.

Referenced by deallocateCheckUno().

template<class ArgType >
void gelibspace::deallocateCheckUno ( ArgType **  p,
long  a,
bool  check = true 
)

Definition at line 218 of file gelib.h.

References _warningg, and deallocateCheckUno().

template<class ArgType >
void gelibspace::deallocateCheckUno ( ArgType ***  p,
long  a,
long  b,
bool  check = true 
)

Definition at line 230 of file gelib.h.

References _warningg, and deallocateCheckUno().

int gelibspace::decomp_int ( int  answer[],
int  n,
int  l,
int  rad 
)

Definition at line 388 of file mathlib.cpp.

long gelibspace::decomp_int ( int  answer[],
int  n,
long  l,
long  rad 
)

Definition at line 393 of file mathlib.cpp.

long long gelibspace::decomp_int ( int  answer[],
int  n,
long long  l,
long long  rad 
)

Definition at line 398 of file mathlib.cpp.

long gelibspace::div_dd ( double  d1,
double  d2,
const char *  s1,
const char *  s2,
const long  line 
)

Definition at line 364 of file mathlib.cpp.

Referenced by div_dd().

long gelibspace::div_dd ( long &  answer,
double  d1,
double  d2 
)

Definition at line 371 of file mathlib.cpp.

long gelibspace::div_dd ( int &  answer,
double  d1,
double  d2 
)

Definition at line 378 of file mathlib.cpp.

References div_dd().

void gelibspace::errorr ( const char *  file,
int  line,
const char *  format,
  ... 
)


*** *** *** *** ERROR FCE *** *** *** ***


Definition at line 10 of file gelib.cpp.

References CHANGE_CONSOLE_COLOUR, MAX_MSG_LENGTH, TC_D_RED, and TC_DEFAULT.

Referenced by change_console_colour(), errorr_expected(), openFileN(), and SP_scan_expected_word_FL().

void gelibspace::errorr_expected ( const char *  file,
int  line,
const char *  msg,
const char *  expctd,
const char *  src 
)


*** *** *** *** STRING PROCESSING *** *** *** ***


src pointer is always shifted over the skipped/scanned/printed word/number/array word is string separated by ' ', '', '
' or '\0'

Definition at line 537 of file librw.cpp.

References errorr().

Referenced by FP_scan_expected_line_FL(), FP_scan_expected_number_FL(), FP_scan_expected_word_FL(), SP_scan_expected_number_FL(), SP_scan_expected_word_FL(), and ST_scan_expected_number_FL().

void gelibspace::errorr_expected ( const char *  file,
int  line,
const char *  msg,
int  expctd,
const char *  src 
)

Definition at line 538 of file librw.cpp.

References errorr().

void gelibspace::errorr_expected ( const char *  file,
int  line,
const char *  msg,
long  expctd,
const char *  src 
)

Definition at line 539 of file librw.cpp.

References errorr().

void gelibspace::errorr_expected ( const char *  file,
int  line,
const char *  msg,
double  expctd,
const char *  src 
)

Definition at line 540 of file librw.cpp.

References errorr().

int gelibspace::extract_double ( const char *  s1,
const char *  s2,
double &  a 
)

v retezci s1 se najde key retezec s2 a za nim se precte double

Definition at line 829 of file librw.cpp.

Referenced by SP_scan_Xvctr().

void gelibspace::extract_double_array ( const char *  s1,
const char *  s2,
long  n,
double *  a 
)

Definition at line 838 of file librw.cpp.

References SP_scan_array_L().

Referenced by SP_scan_Xvctr().

int gelibspace::extract_long ( const char *  s1,
const char *  s2,
long &  a 
)

Definition at line 819 of file librw.cpp.

Referenced by SP_scan_Xvctr().

bool gelibspace::file_delete_if_exist ( const char *  name)
inline

Definition at line 427 of file gelib.h.

References file_exist().

Referenced by clanek_homog_grid(), Ellipse(), and file_delete_if_exist_exit().

void gelibspace::file_delete_if_exist_exit ( const char *  name)
inline

Definition at line 437 of file gelib.h.

References _errorr2, and file_delete_if_exist().

Referenced by cmp_txt_file_delete_first(), and cmp_vtk_file_delete_first().

bool gelibspace::file_exist ( const char *  name)
inline

Definition at line 418 of file gelib.h.

Referenced by file_delete_if_exist().

template<class ArgType >
void gelibspace::fill_all_by ( ArgType *  p,
long  a,
ArgType  value 
)


*** *** *** *** FILL TEMPLATES *** *** *** ***


Definition at line 247 of file gelib.h.

Referenced by fill_all_by(), and fill_row_by().

template<class ArgType >
void gelibspace::fill_all_by ( ArgType **  p,
long  a,
long  b,
ArgType  value 
)

Definition at line 248 of file gelib.h.

References fill_all_by().

template<class ArgType >
void gelibspace::fill_all_by ( ArgType ***  p,
long  a,
long  b,
long  c,
ArgType  value 
)

Definition at line 249 of file gelib.h.

References fill_all_by().

template<class ArgType >
void gelibspace::fill_col_by ( ArgType **  p,
long  n,
long  j,
ArgType  value 
)

Definition at line 253 of file gelib.h.

template<class ArgType >
void gelibspace::fill_row_by ( ArgType **  p,
long  i,
long  m,
ArgType  value 
)

Definition at line 252 of file gelib.h.

References fill_all_by().

long gelibspace::find_double ( long  n,
long *  p 
)


*** *** *** *** OBSOLETE FUNCTIONS *** *** *** ***


Definition at line 770 of file librw.cpp.

Referenced by SP_scan_Xvctr().

bool gelibspace::FP_cmp_files ( const char *  file1,
const char *  file2 
)

Return false if no differences.

Definition at line 230 of file librw.cpp.

References _openFileN.

Referenced by cmp_txt_file_delete_first().

bool gelibspace::FP_copy_behind_line ( FILE *  sour,
FILE *  dest,
int  n 
)

copy from file to file behind the line [former copy_line]

Definition at line 259 of file librw.cpp.

Referenced by copy_star_end(), and FP_copy_behind_line_starting_with().

bool gelibspace::FP_copy_behind_line_starting_with ( FILE *  src,
FILE *  dest,
const char *  expctd,
bool  cs 
)

copy from file to file behind the line starting with string

Definition at line 276 of file librw.cpp.

References FP_copy_behind_line().

void gelibspace::FP_copy_file ( FILE *  sour,
FILE *  dest 
)

[former copy_file]

Definition at line 223 of file librw.cpp.

long gelibspace::FP_number_of_lines ( FILE *  stream,
bool  rwd 
)

count number of lines in file

Definition at line 339 of file librw.cpp.

long gelibspace::FP_number_of_words ( FILE *  stream)

count number of words (see isWordChar) in file

Definition at line 319 of file librw.cpp.

References isWordChar().

Referenced by parameters().

bool gelibspace::FP_scan_array ( FILE *  stream,
int  n,
int *  dest 
)

scan/copy array of numbers from src to dest, src pointer is shifted over the field

Definition at line 313 of file librw.cpp.

Referenced by mumech::Problem::read_input_file(), mumech::MatrixRecord::scan_Remote_strains(), and ST_scan_array().

bool gelibspace::FP_scan_array ( FILE *  stream,
int  n,
long *  dest 
)

Definition at line 314 of file librw.cpp.

bool gelibspace::FP_scan_array ( FILE *  stream,
int  n,
double *  dest 
)

Definition at line 315 of file librw.cpp.

bool gelibspace::FP_scan_expected_line ( FILE *  src,
const char *  expctd,
bool  cs 
)

... line and compare with expected one

Definition at line 503 of file librw.cpp.

References FP_skip_expected_string(), and FP_skip_space().

Referenced by FP_scan_expected_line_FL().

void gelibspace::FP_scan_expected_line_FL ( const char *  file,
int  line,
FILE *  src,
const char *  expctd,
const char *  msg,
bool  cs 
)

... line and compare with expected one, exit if false

Definition at line 518 of file librw.cpp.

References errorr_expected(), and FP_scan_expected_line().

bool gelibspace::FP_scan_expected_number ( FILE *  src,
long  expctd 
)

... number and compare with expected one

Definition at line 524 of file librw.cpp.

Referenced by FP_scan_expected_number_FL().

template<class ArgType >
void gelibspace::FP_scan_expected_number_FL ( const char *  file,
int  line,
FILE *  src,
ArgType  expctd,
const char *  msg 
)

... number and compare with expected one, exit if false

Definition at line 148 of file librw.h.

References errorr_expected(), and FP_scan_expected_number().

bool gelibspace::FP_scan_expected_word ( FILE *  src,
const char *  expctd,
bool  cs 
)

... word and compare with expected one

Definition at line 487 of file librw.cpp.

References FP_skip_expected_string(), FP_skip_nonword(), and FP_skip_word().

Referenced by mumech::cmp_vtk_file(), and FP_scan_expected_word_FL().

void gelibspace::FP_scan_expected_word_FL ( const char *  file,
int  line,
FILE *  src,
const char *  expctd,
const char *  msg,
bool  cs 
)

... word and compare with expected one, exit if false

Definition at line 497 of file librw.cpp.

References errorr_expected(), and FP_scan_expected_word().

long gelibspace::FP_scan_line ( FILE *  stream,
char *  dest 
)

scan/copy line == string without '
' from stream

Definition at line 420 of file librw.cpp.

References isLineChar().

Referenced by FP_scan_line_alloc(), FP_scan_line_skip_emptyORcommented(), and GP_scan_line().

long gelibspace::FP_scan_line_alloc ( FILE *  stream,
char *&  dest 
)

scan/copy line == string without '
' from stream; dest is NULL and allocated here

Definition at line 439 of file librw.cpp.

References _errorr, and FP_scan_line().

Referenced by GP_scan_line_alloc().

long gelibspace::FP_scan_line_skip_emptyORcommented ( FILE *  stream,
char *  dest 
)


*** *** *** SCANNING *** *** ***


scanning == scan ...

scan/copy line == string without '
' from stream, skip lines commented by '#' at the first position

to variable dest and shift src pointer at the end of ... scan/copy line == string without '
' from stream, skip lines commented by '#' at the first position and empty lines

Definition at line 408 of file librw.cpp.

References FP_scan_line(), FP_skip_line(), and FP_skip_space().

int gelibspace::FP_scan_word ( FILE *  src,
char *  dest 
)

... word; return value is length of the word

Definition at line 455 of file librw.cpp.

References FP_skip_nonword(), and isWordChar().

Referenced by mumech::cmp_vtk_file(), GP_scan_word(), parameters(), mumech::Mesh::read_geometry_file_vtk(), and mumech::Problem::read_input_file().

bool gelibspace::FP_skip_behind_line_starting_with ( FILE *  stream,
const char *  string,
bool  cs 
)

move file descriptor to the start of the new line after the one starting with string

Definition at line 192 of file librw.cpp.

References FP_skip_expected_string(), FP_skip_line(), and FP_skip_space().

bool gelibspace::FP_skip_comment ( FILE *  stream)


*** *** *** *** FILE PROCESSING *** *** *** ***


general rules for file processing:

move file descriptor to the start of the new noncommented word(digit) == skip nonword chars and comment

  • EOF (end of file) is reached - char EOF is pushed back, information about reached EOF is returned move file descriptor to the start of the new noncommented word(digit) == skip nonword chars and comment

Definition at line 141 of file librw.cpp.

References FP_skip_line(), and isWordChar().

bool gelibspace::FP_skip_expected_string ( FILE *  src,
const char *  expctd,
bool  cs 
)

... word and compare with expected one

move file descriptor behind expected string

Definition at line 475 of file librw.cpp.

Referenced by FP_scan_expected_line(), FP_scan_expected_word(), FP_skip_behind_line_starting_with(), FP_skip_to_line_starting_with(), FP_skip_to_line_starting_With(), read_ansys_displ_plot(), and read_ansys_strain_stress_plot().

bool gelibspace::FP_skip_line ( FILE *  stream,
int  n 
)
void gelibspace::FP_skip_line_commented ( FILE *  stream)

move file descriptor to the start of the new noncommented line, without checking of EOF

Definition at line 156 of file librw.cpp.

References FP_skip_line().

Referenced by GP_scan_line_alloc_skip_commented(), and parameters().

void gelibspace::FP_skip_line_fast_skip_commented ( FILE *  stream,
int  n 
)

move file descriptor to the start of the n-th new line, without checking of EOF

Definition at line 166 of file librw.cpp.

bool gelibspace::FP_skip_nonword ( FILE *  stream)


*** *** *** SKIPING *** *** ***


skiping == shift stream pointer at the first char which is not ...

... nonword == ' ', '
', '' and '' characters

... nonword

Definition at line 363 of file librw.cpp.

References isWordChar().

Referenced by FP_scan_expected_word(), FP_scan_word(), and parameters().

bool gelibspace::FP_skip_space ( FILE *  stream)

... space

... space == ' ' and '' characters

Definition at line 376 of file librw.cpp.

References isSpaceChar().

Referenced by FP_scan_expected_line(), FP_scan_line_skip_emptyORcommented(), FP_skip_behind_line_starting_with(), and FP_skip_to_line_starting_with().

bool gelibspace::FP_skip_to_line_starting_with ( FILE *  stream,
const char *  string,
bool  cs 
)

move file descriptor to the line starting with string, exactly behind the string; white space can be before string

move file descriptor to the line starting with string, exactly behind the string

Definition at line 202 of file librw.cpp.

References FP_skip_expected_string(), FP_skip_line(), and FP_skip_space().

Referenced by read_ansys_displ_plot(), and read_ansys_strain_stress_plot().

bool gelibspace::FP_skip_to_line_starting_With ( FILE *  stream,
const char *  string,
bool  cs 
)

move file descriptor to the line starting with string, exactly behind the string; NO white space can be before string

Definition at line 212 of file librw.cpp.

References FP_skip_expected_string(), and FP_skip_line().

bool gelibspace::FP_skip_to_line_starting_with ( FILE *  stream,
char  C 
)

replacement of old function "read_contiguous_star" move file descriptor to the line starting with character, directly to this char

move file descriptor to the line starting with character, directly to this char

Definition at line 299 of file librw.cpp.

bool gelibspace::FP_skip_word ( FILE *  stream)

... word

Definition at line 389 of file librw.cpp.

References isWordChar().

Referenced by FP_scan_expected_word().

bool gelibspace::get_confirm ( const char *  s,
bool  expected 
)

Definition at line 17 of file librw.cpp.

double gelibspace::give_copy_r2z ( double  a,
double  zero 
)
double* gelibspace::give_copy_r2z ( double *  a,
long  n,
double  zero 
)

Definition at line 17 of file arrays.cpp.

References give_copy_r2z().

void gelibspace::give_line ( FILE *  stream,
char *&  s 
)

Referenced by SP_scan_Xvctr().

long gelibspace::giveLineLength ( const char *  src)

return length of line == sting compount of "line chars"

Definition at line 54 of file librw.cpp.

References isLineChar().

Referenced by SP_scan_line_alloc().

long gelibspace::GP_scan_line ( Stream stream,
char *  dest 
)

... line; return value is length of the line


*** *** *** *** STREAM PROCESSING *** *** *** ***


...

line; return value is length of the line

Definition at line 84 of file tixy2.cpp.

References gelibspace::Stream::file(), FP_scan_line(), tinyxml2::XMLElement::GetText(), gelibspace::Stream::isFile(), SP_scan_line(), and gelibspace::Stream::tixel().

long gelibspace::GP_scan_line_alloc ( Stream stream,
char *&  dest 
)

... line; return value is length of the line; dest is NULL and allocated here

Definition at line 95 of file tixy2.cpp.

References gelibspace::Stream::file(), FP_scan_line_alloc(), tinyxml2::XMLElement::GetText(), gelibspace::Stream::isFile(), SP_scan_line_alloc(), and gelibspace::Stream::tixel().

Referenced by GP_scan_line_alloc_skip_commented().

long gelibspace::GP_scan_line_alloc_skip_commented ( Stream stream,
char *&  dest 
)
long gelibspace::GP_scan_word ( Stream stream,
char *  dest 
)

... word; return value is length of the word

Definition at line 112 of file tixy2.cpp.

References gelibspace::Stream::file(), FP_scan_word(), tinyxml2::XMLElement::GetText(), gelibspace::Stream::isFile(), SP_scan_word(), and gelibspace::Stream::tixel().

template<class ArgType >
void gelibspace::interchange2 ( ArgType &  a,
ArgType &  b 
)

Definition at line 409 of file gelib.h.

template<class ArgType >
long gelibspace::is_member_of_array ( ArgType  val,
long  n,
const ArgType *  array 
)

check out "val" is member of "array"

Definition at line 320 of file gelib.h.

Referenced by add_array_unique(), and gelibspace::Lvctr::is_member().

bool gelibspace::isDigitChar ( char  C)

Definition at line 48 of file librw.cpp.

Referenced by SP_skip_int().

bool gelibspace::isLineChar ( char  C)

return true if character C is "normal" char or "space" char –> C != '
' '\0' ''

Definition at line 37 of file librw.cpp.

Referenced by FP_scan_line(), giveLineLength(), and SP_scan_line().

bool gelibspace::isNonZero ( double  x,
double  tolerance 
)

Definition at line 405 of file mathlib.cpp.

bool gelibspace::isSpaceChar ( char  C)

return true if character C is "space" char –> C == ' ' ''

Definition at line 43 of file librw.cpp.

Referenced by FP_skip_space(), and SP_print_space().

bool gelibspace::isWordChar ( char  C)


*** *** *** *** GENERAL FUNCTIONS *** *** *** ***


return true if character C is "normal" char –> C != ' ' '' '
' '\0' ''

non-word chars == ' ' '' '
' '\0' '' word chars == !non-word chars

return true if character C is "normal" char –> C != ' ' '' '
' '\0' ''

Definition at line 31 of file librw.cpp.

Referenced by FP_number_of_words(), FP_scan_word(), FP_skip_comment(), FP_skip_nonword(), FP_skip_word(), SP_print_word(), SP_scan_word(), and SP_skip_word().

bool gelibspace::isZero ( double  zero,
double  a 
)

Definition at line 308 of file mathlib.cpp.

Referenced by areSame(), gelibspace::Elem3D::is_identical_to(), and isZero().

bool gelibspace::isZero ( double  abszero,
double  relzero,
double  a 
)

Definition at line 314 of file mathlib.cpp.

References isZero().

template<class ArgType >
bool gelibspace::members_are_unique ( long  n,
const ArgType *  array 
)

check out all members of array "a" are uniq

Definition at line 328 of file gelib.h.

void gelibspace::nilling ( double  zero,
double &  a 
)

Definition at line 297 of file mathlib.cpp.

double gelibspace::nillret ( double  zero,
double  a 
)

Definition at line 302 of file mathlib.cpp.

Referenced by solv_1le(), solv_2le(), solv_2nle(), and solv_polynom_2().

FILE * gelibspace::openFileN ( const char *  File,
int  Line,
const char *  mode,
const char *  key,
const char *  name 
)

Definition at line 67 of file gelib.cpp.

References errorr().

Referenced by openFilePN(), openFilePNS(), and openFilePNSS().

FILE * gelibspace::openFilePN ( const char *  File,
int  Line,
const char *  mode,
const char *  key,
const char *  path,
const char *  name 
)

Definition at line 77 of file gelib.cpp.

References openFileN().

FILE * gelibspace::openFilePNS ( const char *  File,
int  Line,
const char *  mode,
const char *  key,
const char *  path,
const char *  name,
const char *  suff 
)

Definition at line 86 of file gelib.cpp.

References openFileN().

FILE * gelibspace::openFilePNSS ( const char *  File,
int  Line,
const char *  mode,
const char *  key,
const char *  path,
const char *  name,
const char *  suff,
const char *  suff2 
)

Definition at line 95 of file gelib.cpp.

References openFileN().

void gelibspace::openFileTest ( const FILE *  stream,
const char *  name 
)


*** *** *** *** FILE FCE *** *** *** ***


Definition at line 61 of file gelib.cpp.

References _errorr2.

XMLDocument* gelibspace::openTXdcPN ( const char *  path,
const char *  name 
)


*** *** *** *** TINYXML FCE *** *** *** ***


XMLDocument* gelibspace::openTXdcPNSS ( const char *  path,
const char *  name,
const char *  suff,
const char *  suff2 
)
char * gelibspace::pathstrdupl ( const char *  src)

Definition at line 84 of file librw.cpp.

References DIRSEPARATOR.

void gelibspace::pprint_symtensor ( char *  stream,
int  precision,
const long *  a 
)
void gelibspace::pprint_symtensor ( FILE *  stream,
int  precision,
const long *  a 
)

Definition at line 228 of file arrays.cpp.

void gelibspace::pprint_symtensor ( char *  stream,
int  precision,
const double *  a 
)

Definition at line 601 of file arrays.cpp.

void gelibspace::pprint_symtensor ( FILE *  stream,
int  precision,
const double *  a 
)

Definition at line 607 of file arrays.cpp.

void gelibspace::pprint_symtensor_zeroL ( char *  stream,
int  precision 
)

Definition at line 222 of file arrays.cpp.

Referenced by gelibspace::Lvctr::print_symtensor().

void gelibspace::pprint_symtensor_zeroL ( FILE *  stream,
int  precision 
)

Definition at line 234 of file arrays.cpp.

void gelibspace::pprint_tensor ( FILE *  stream,
int  precision,
const double *  a 
)

Definition at line 595 of file arrays.cpp.

Referenced by gelibspace::Dmtrx::print_tensor().

void gelibspace::pprint_tensor_zero ( char *  stream,
int  precision 
)
void gelibspace::pprint_tensor_zero ( FILE *  stream,
int  precision 
)

Definition at line 620 of file arrays.cpp.

void gelibspace::read_star ( FILE *  stream)

Definition at line 793 of file librw.cpp.

Referenced by read_star_end(), and SP_scan_Xvctr().

void gelibspace::read_star_end ( FILE *  stream,
int  n 
)

Definition at line 789 of file librw.cpp.

References FP_skip_line(), and read_star().

Referenced by SP_scan_Xvctr().

template<class ArgType >
bool gelibspace::same_array_elements_asym ( long  nx,
const ArgType *  x,
long  ny,
const ArgType *  y,
bool  same_dim = false 
)

Function finds out whether every element of the array 'x' is in the array 'y'.

nx,ny - dimensions of arrays x, y

Definition at line 342 of file gelib.h.

Referenced by same_array_elements_sym().

template<class ArgType >
bool gelibspace::same_array_elements_sym ( long  nx,
const ArgType *  x,
long  ny,
const ArgType *  y,
bool  same_dim = false 
)

Function finds out whether every element of the array 'x' is in the array 'y', and symmetrically every element of the array 'y' is in the array 'x'.

!!! This in not perfect identical, because x(1,2,2) == y(1,1,2) !!! nx,ny - dimensions of arrays x, y

Definition at line 362 of file gelib.h.

References same_array_elements_asym().

template<class ArgType >
void gelibspace::setadd_another_uno_ptr ( long &  n,
ArgType **&  field,
ArgType *  p 
)

Definition at line 281 of file gelib.h.

References allocate_another_uno_ptr().

double gelibspace::sgn ( double  i)
inline

Returns the signum of given value (if value is < 0 returns -1, otherwise returns 1)

Definition at line 42 of file mathlib.h.

Referenced by mumech::polynomialRootSolution::GetCubicPolyRoots().

template<class ArgType >
void gelibspace::shake_down_ptr_array ( long &  n,
ArgType *  array 
)


*** *** *** *** VARIOUS TEMPLATES *** *** *** ***


Definition at line 292 of file gelib.h.

void gelibspace::shaker ( long &  n,
long *  a 
)

zlikviduje vicenasobne cifry pro long in <0;..>

Definition at line 19 of file mathlib.cpp.

long gelibspace::solv_1le ( double  zero,
double  a,
double  b,
double &  x 
)

function solves linear equation: a*x + b = 0 answer: -1 = infinite number of results 0,1 = number of results

Parameters
zero- accuracy of solving
a,b- coeficients of equation
x- result

created 4.4.2003, Ladislav Svoboda, termi.nosp@m.t@cm.nosp@m.l.fsv.nosp@m..cvu.nosp@m.t.cz

Definition at line 284 of file mathlib.cpp.

References nillret().

Referenced by solv_2nle().

long gelibspace::solv_2le ( double  zero,
const double *  a,
const double *  b,
const double *  c,
double &  x,
double &  y 
)

function solves system of two linear equations: a[0]*x + b[0]*y + c[0] = 0 a[1]*x + b[1]*y + c[1] = 0 answer: -1 = infinite number of results 0,1 = number of results

Parameters
zero- accuracy of solving
a,b,c- arrays of coeficients of equations, dimension is 2
x,y- results

created 4.4.2003, Ladislav Svoboda, termi.nosp@m.t@cm.nosp@m.l.fsv.nosp@m..cvu.nosp@m.t.cz

Definition at line 236 of file mathlib.cpp.

References nillret().

Referenced by solv_2nle().

long gelibspace::solv_2nle ( double  zero,
const double *  a,
const double *  b,
const double *  c,
const double *  d,
double *  x,
double *  y 
)

function solves system of two non-linear equations: a[0]*x*y + b[0]*x + c[0]*y + d[0] = 0 a[1]*x*y + b[1]*x + c[1]*y + d[1] = 0 answer: -1 = infinite number of results 0,1,2 = number of results

Parameters
zero- accuracy of solving
a,b,c,d- arrays of coeficients of equations, dimension is 2
x,y- arrays results, dimension is 2

created 4.4.2003, Ladislav Svoboda, termi.nosp@m.t@cm.nosp@m.l.fsv.nosp@m..cvu.nosp@m.t.cz

toto je prej chyba, ale nevim proc, ale muzu to prozkoumat casem, zatim vracim -2 a vejs to pak overim, stejne se tahle fce pouziva jen v jedne fci

Definition at line 169 of file mathlib.cpp.

References nillret(), solv_1le(), solv_2le(), and solv_polynom_2().

long gelibspace::solv_polynom_2 ( double  zero,
double  a,
double  b,
double  c,
double &  r1,
double &  r2 
)

function searchs roots of polynom of 2nd order = quadratic equation a*x^2 + b*x + c = 0 answer: -1 = infinite number of results 0,1,2 = no,one,two results

Parameters
zero- accuracy of solving
a,b,c- coeficients of quadratic equation
r1,r2- roots of quadratic equation

created 11.1.2003, Ladislav Svoboda, termi.nosp@m.t@cm.nosp@m.l.fsv.nosp@m..cvu.nosp@m.t.cz

Definition at line 335 of file mathlib.cpp.

References nillret().

Referenced by solv_2nle().

void gelibspace::solve_3 ( const double *  m,
const double *  r,
double *  l 
)

Function solves the system of linear equations.

Parameters
m- matrix of system contained in array
r- right hand side of system
l- left hand side of system - answer

created 28.3.2003, Ladislav Svoboda, termi.nosp@m.t@cm.nosp@m.l.fsv.nosp@m..cvu.nosp@m.t.cz

Definition at line 103 of file mathlib.cpp.

void gelibspace::solve_3 ( const double **  m,
const double *  r,
double *  l 
)

Function solves the system of linear equations.

Parameters
m- matrix of system
r- right hand side of system
l- left hand side of system - answer

created 28.3.2003, Ladislav Svoboda, termi.nosp@m.t@cm.nosp@m.l.fsv.nosp@m..cvu.nosp@m.t.cz

Definition at line 134 of file mathlib.cpp.

void gelibspace::sort_2 ( long *  x)

Function sorts first two members of array with ascending order.

Parameters
x- sorted array

created 27.3.2003, Ladislav Svoboda, termi.nosp@m.t@cm.nosp@m.l.fsv.nosp@m..cvu.nosp@m.t.cz

Definition at line 86 of file mathlib.cpp.

void gelibspace::sort_3 ( long *  x)

Function sorts first three members of array with ascending order.

Parameters
x- sorted array

created 27.3.2003, Ladislav Svoboda, termi.nosp@m.t@cm.nosp@m.l.fsv.nosp@m..cvu.nosp@m.t.cz

Definition at line 67 of file mathlib.cpp.

Referenced by sort_4().

void gelibspace::sort_4 ( long *  x)

Function sorts first four members of array with ascending order.

Parameters
x- sorted array

created 27.3.2003, Ladislav Svoboda, termi.nosp@m.t@cm.nosp@m.l.fsv.nosp@m..cvu.nosp@m.t.cz

Definition at line 44 of file mathlib.cpp.

References sort_3().

bool gelibspace::SP_cutcomment ( char *  src)

cut of comment == end of line starting by '#'

Definition at line 543 of file librw.cpp.

bool gelibspace::SP_print_space ( const char *&  src,
FILE *  stream 
)


*** *** *** PRINTING *** *** ***


printing == print ...

printing == print ... to stream and shift src pointer at the end of ...

to stream and shift src pointer at the end of ... ... space == ' ' and '' characters

... space == ' ' and '' characters

Definition at line 746 of file librw.cpp.

References isSpaceChar().

Referenced by SP_scan_Xvctr().

bool gelibspace::SP_print_word ( const char *&  src,
FILE *  stream 
)

... word

Definition at line 756 of file librw.cpp.

References isWordChar(), and SP_skip_space().

Referenced by SP_scan_Xvctr().

bool gelibspace::SP_replace_char ( char *  str,
char  s,
char  d 
)

replace src char to dest char

Definition at line 556 of file librw.cpp.

template<class ArgType >
bool gelibspace::SP_scan_array ( const char *&  src,
int  n,
ArgType *  a 
)
template<class ArgType >
bool gelibspace::SP_scan_array ( const char *&  src,
long  n,
ArgType *  a 
)

Definition at line 254 of file librw.h.

References SP_scan_number().

template<class ArgType >
bool gelibspace::SP_scan_array_alloc ( const char *&  src,
long &  n,
ArgType *&  a 
)

Definition at line 257 of file librw.h.

References SP_scan_array(), SP_scan_array_L(), SP_scan_Dvctr_exit(), and SP_scan_number().

bool gelibspace::SP_scan_array_L ( const char *&  src,
int  L,
double *  a 
)
bool gelibspace::SP_scan_character ( const char *&  src,
char &  dest 
)

scanning == scan ... to variable dest and shift src pointer at the end of ...

... one char

Definition at line 636 of file librw.cpp.

References SP_skip_space().

bool gelibspace::SP_scan_Dvctr_exit ( const char *&  src,
int  n,
Dvctr v 
)

Definition at line 731 of file librw.cpp.

Referenced by SP_scan_array_alloc(), and SP_scan_array_L().

template<class ArgType >
bool gelibspace::SP_scan_expected_number ( const char *&  src,
ArgType  expctd 
)

... number and compare with expected one

Definition at line 236 of file librw.h.

References SP_scan_number().

Referenced by SP_scan_array_L(), and SP_scan_expected_number_FL().

template<class ArgType >
void gelibspace::SP_scan_expected_number_FL ( const char *  file,
int  line,
const char *&  src,
ArgType  expctd,
const char *  msg 
)

... number and compare with expected one, exit if false

Definition at line 244 of file librw.h.

References errorr_expected(), and SP_scan_expected_number().

bool gelibspace::SP_scan_expected_word ( const char *&  src,
const char *  expctd,
bool  cs 
)

... word and compare with expected one

Definition at line 699 of file librw.cpp.

References SP_skip_space().

Referenced by SP_scan_expected_word_FL().

void gelibspace::SP_scan_expected_word_FL ( const char *  file,
int  line,
const char *&  src,
const char *  expctd,
const char *  msg,
bool  cs 
)

... word and compare with expected one/two/three, exit if false

Definition at line 709 of file librw.cpp.

References errorr_expected(), and SP_scan_expected_word().

void gelibspace::SP_scan_expected_word_FL ( const char *  file,
int  line,
const char *&  src,
const char *  expctd1,
const char *  expctd2,
const char *  msg,
bool  cs 
)

Definition at line 710 of file librw.cpp.

References errorr(), and SP_scan_expected_word().

void gelibspace::SP_scan_expected_word_FL ( const char *  file,
int  line,
const char *&  src,
const char *  expctd1,
const char *  expctd2,
const char *  expctd3,
const char *  msg,
bool  cs 
)

Definition at line 711 of file librw.cpp.

References errorr(), and SP_scan_expected_word().

long gelibspace::SP_scan_line ( const char *&  src,
char *  dest 
)

... line; return value is length of the line

Definition at line 663 of file librw.cpp.

References CHECK_DEST, and isLineChar().

Referenced by GP_scan_line().

long gelibspace::SP_scan_line_alloc ( const char *&  src,
char *&  dest 
)

... line; return value is length of the line; dest is NULL and allocated here

Definition at line 678 of file librw.cpp.

References _errorr, giveLineLength(), and SP_skip_space().

Referenced by GP_scan_line_alloc().

bool gelibspace::SP_scan_number ( const char *&  src,
int &  dest 
)
bool gelibspace::SP_scan_number ( const char *&  src,
long &  dest 
)

Definition at line 715 of file librw.cpp.

References SP_skip_int().

bool gelibspace::SP_scan_number ( const char *&  src,
double &  dest 
)

Definition at line 716 of file librw.cpp.

References SP_skip_word().

long gelibspace::SP_scan_word ( const char *&  src,
char *  dest 
)

... word; return value is length of the word

Definition at line 647 of file librw.cpp.

References isWordChar(), and SP_skip_space().

Referenced by mumech::cmp_vtk_file(), GP_scan_word(), mumech::Mesh::read_geometry_file_vtk(), and mumech::Problem::read_input_file().

template<class ArgType >
bool gelibspace::SP_scan_Xvctr ( const char *&  src,
ArgType *  dest 
)
bool gelibspace::SP_skip_int ( const char *&  src)

... word compound of digits and space before

Definition at line 605 of file librw.cpp.

References isDigitChar(), and SP_skip_space().

Referenced by SP_scan_number().

bool gelibspace::SP_skip_space ( const char *&  src)

... space == ' ' and '' characters

skiping == shift src pointer at the end of ...

... space == ' ' and '' characters

Definition at line 584 of file librw.cpp.

Referenced by SP_print_word(), SP_scan_character(), SP_scan_expected_word(), SP_scan_line_alloc(), SP_scan_word(), SP_skip_int(), and SP_skip_word().

bool gelibspace::SP_skip_word ( const char *&  src,
int  n 
)
void gelibspace::SP_unscan_word ( const char *&  src,
const char *  w 
)


*** *** *** SCANNING *** *** ***


unscan word == shift pointer back over word

unscan word == shift pointer back over word

Definition at line 623 of file librw.cpp.

References _errorr, and SP_unskip_space().

bool gelibspace::SP_unskip_space ( const char *&  src)


*** *** *** SKIPING *** *** ***


(un)skiping == shift src pointer at the end(start) of ...

... space == ' ' and '' characters

Definition at line 577 of file librw.cpp.

Referenced by SP_unscan_word().

void gelibspace::sprint_param ( char *  s,
char *  argv[],
int  n 
)

Definition at line 782 of file librw.cpp.

Referenced by parameters(), and SP_scan_Xvctr().

bool gelibspace::ST_scan_array ( Stream src,
int  n,
int *  dest 
)
bool gelibspace::ST_scan_array ( Stream src,
int  n,
long *  dest 
)
bool gelibspace::ST_scan_array ( Stream src,
int  n,
double *  dest 
)
bool gelibspace::ST_scan_expected_number ( Stream src,
long  expctd 
)

... number and compare with expected one

Definition at line 75 of file tixy2.cpp.

References ST_scan_number().

Referenced by gelibspace::Stream::checkin_type().

template<class ArgType >
void gelibspace::ST_scan_expected_number_FL ( const char *  file,
int  line,
Stream src,
ArgType  expctd,
const char *  msg 
)

... number and compare with expected one, exit if false

Definition at line 191 of file tixy2.h.

References errorr_expected().

bool gelibspace::ST_scan_number ( Stream src,
int &  dest 
)
bool gelibspace::ST_scan_number ( Stream src,
long &  dest 
)
bool gelibspace::ST_scan_number ( Stream src,
double &  dest 
)
char * gelibspace::strdupl ( const char *  src)

standard strdup - Memory for the new string is obtained with malloc(3), and can be freed with free(3).

my strdupl - new delete

Definition at line 64 of file librw.cpp.

char * gelibspace::strdupl ( const char *  src1,
const char *  src2 
)

Definition at line 71 of file librw.cpp.

char * gelibspace::strdupl ( const char *  src1,
const char *  src2,
const char *  src3 
)

Definition at line 77 of file librw.cpp.

const char* gelibspace::trmt_clr_int2clr ( ETCLR  clr)
inline
void gelibspace::warningg ( const char *  file,
int  line,
const char *  format,
  ... 
)

Definition at line 26 of file gelib.cpp.

References CHANGE_CONSOLE_COLOUR, MAX_MSG_LENGTH, TC_D_VIOLET, and TC_DEFAULT.

Referenced by change_console_colour().

void gelibspace::XP_check_expected_attribute ( const XMLNode xelem,
const char *  name,
const char *  value 
)
const XMLElement * gelibspace::XP_give_unique_expected_elem ( const XMLNode xelem,
const char *  name,
bool  uniq 
)
const char * gelibspace::XP_giveDAtext ( const XMLNode xelem,
int  n,
bool  last,
const char *  format,
const char *  type,
const char *  name,
int *  noc 
)