TexGen
Classes | Namespaces | Macros | Enumerations | Functions
Misc.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TexGen::LessPairDoubleInt
 Used to sort double-int pairs. More...
 
struct  TexGen::LessPairDoubleXYZ
 Used to sort double-XYZ pairs. More...
 
struct  TexGen::COLOR
 
struct  TexGen::POINT_INFO
 Structure used to retreive information about a particular point in space. More...
 
struct  TexGen::MESHER_ELEMENT_DATA
 

Namespaces

namespace  TexGen
 Namespace containing a series of customised math operations not found in the standard c++ library.
 

Macros

#define CLASS_DECLSPEC
 
#define FOR_EACH_TIXMLELEMENT(CHILDELEMENT, PARENTELEMENT, ELEMENTNAME)    for (TiXmlElement* CHILDELEMENT = (PARENTELEMENT).FirstChildElement(ELEMENTNAME); CHILDELEMENT; CHILDELEMENT = CHILDELEMENT->NextSiblingElement(ELEMENTNAME))
 Macro to enable looping over tinyxml easier. More...
 

Enumerations

enum  TexGen::OUTPUT_TYPE { TexGen::OUTPUT_MINIMAL , TexGen::OUTPUT_STANDARD , TexGen::OUTPUT_FULL }
 
enum  TexGen::EXPORT_TYPE { TexGen::INP_EXPORT , TexGen::VTU_EXPORT , TexGen::SCIRUN_EXPORT }
 
enum  TexGen::DOMAIN_TYPE { TexGen::BOX_DOMAIN , TexGen::SHEARED_DOMAIN , TexGen::ROTATED_DOMAIN , TexGen::PRISM_DOMAIN }
 
enum  TexGen::PERIODIC_BOUNDARY_CONDITIONS {
  TexGen::MATERIAL_CONTINUUM , TexGen::SINGLE_LAYER_RVE , TexGen::STAGGERED_BC , TexGen::SHEARED_BC ,
  TexGen::ROTATED_BC , TexGen::BENDING_BC , TexGen::NO_BOUNDARY_CONDITIONS
}
 

Functions

template<typename T >
std::string TexGen::stringify (const T &x, int iPrecision=12, bool bScientific=true)
 Function to convert a value (e.g. int, double, etc...) to a string. More...
 
template<typename T >
TexGen::valueify (const std::string &x)
 Function to convert a string to a value (e.g. int, double, etc...) More...
 
template<typename T >
TexGen::valueify (const char *x)
 Function to convert a string to a value (e.g. int, double, etc...) More...
 
COLOR TexGen::GetIndexedColor (int iIndex)
 
void TexGen::CopyToRange (vector< XYZ > &Offsets, XYZ Vector, int iLowerLimit, int iUpperLimit)
 
double TexGen::ConvertUnits (double dValue, std::string SourceUnits, std::string TargetUnits)
 
bool TexGen::CompatibleUnits (std::string SourceUnits, std::string TargetUnits, std::string *pErrorMessage)
 
std::string TexGen::ReduceUnits (std::string Units)
 
void TexGen::AddNewUnits (std::string NewUnit, std::string BaseUnits)
 
std::string TexGen::StripPath (std::string Filename)
 Strip the path from the filename (e.g. "c:\folder\file.ext -> file.ext") More...
 
void TexGen::AddExtensionIfMissing (std::string &Filename, std::string Extension)
 Adds an extension to the filename if it is missing otherwise do nothing (e.g. picture -> picture.png) More...
 
std::string TexGen::ReplaceFilenameSpaces (std::string Filename)
 Replaces spaces in filename with underscore. More...
 
std::string TexGen::RemoveExtension (std::string &Filename, std::string Extension)
 Strip the extension from the filename. More...
 
void TexGen::WriteOrientationsHeader (std::ostream &Output)
 Write orientations header for ABAQUS .ori files. More...
 
void TexGen::WriteElementsHeader (std::ostream &Output)
 Write elements header for ABAQUS .eld files. More...
 
template<typename T >
TexGen::GetInterpedValue (const std::vector< std::pair< double, T > > &InterpValues, double fraction)
 Get an interpolated value. More...
 
template<typename T >
std::pair< double, std::pair< T, T > > TexGen::GetClosestValues (const std::vector< std::pair< double, T > > &InterpValues, double fraction)
 Get the two closest values to fraction in the vector InterpValues. More...
 
void TexGen::GetMinMaxXY (const std::vector< XY > &Points, XY &Min, XY &Max)
 
template<typename T >
void TexGen::WriteValues (std::ostream &Output, T &Values, int iMaxPerLine)
 

Detailed Description

This file contains miscellaneous global functions that do not belong anywhere else

Definition in file Misc.h.

Macro Definition Documentation

◆ CLASS_DECLSPEC

#define CLASS_DECLSPEC

Definition at line 35 of file Misc.h.

◆ FOR_EACH_TIXMLELEMENT

#define FOR_EACH_TIXMLELEMENT (   CHILDELEMENT,
  PARENTELEMENT,
  ELEMENTNAME 
)     for (TiXmlElement* CHILDELEMENT = (PARENTELEMENT).FirstChildElement(ELEMENTNAME); CHILDELEMENT; CHILDELEMENT = CHILDELEMENT->NextSiblingElement(ELEMENTNAME))

Macro to enable looping over tinyxml easier.

Parameters
CHILDELEMENTIs the name of the TiXmlElement pointer that will be created used as an iterator
PARENTELEMENTThe parent TiXmlElement to loop over
ELEMENTNAMEThe name of the element type to loop over given as an array of characters

Definition at line 45 of file Misc.h.