G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Input/Output module

Detailed Description

This module is responsible for input and output of G+Smo objects to files.

The Input/Output module is responsible for visualization as well as file reading and writing. For visualization, we employ Paraview or Axel (which are in turn based on VTK). An important feature is file format support. G+Smo can read and write popular CAD formats, which include the 3DM file format of Rhinoceros 3D modeler, the X_T format of Siemens' NX platform, provided that the related extensions are enabled.

Classes

class  gsCmdLine
 Class for command-line argument parsing. More...
 
class  gsFileData< T >
 This class represents an XML data tree which can be read from or written to a (file) stream. More...
 
class  gsFileManager
 File-system related functionality. More...
 
class  gsOptionList
 Class which holds a list of parameters/options, and provides easy access to them. More...
 
class  gsParaviewCollection
 This class is used to create a Paraview .pvd (collection) file. More...
 
class  gsParaviewDataSet
 This class represents a group of vtk (Paraview) files that refer to one multiPatch, for one timestep. More...
 

Functions

template<class T >
void gsWriteCsv (std::string const &filename, const gsMatrix< T > &matrix, const std::vector< std::string > &headers=std::vector< std::string >())
 Export a gsMatrix to a .csv (comma separated values) file. More...
 
template<short_t d, typename T >
void gsWriteGoToolsBodySpline (const gsTensorBSpline< d, T > &bspl, std::ofstream &out)
 Writes body part of GoTools (.g2) format to a file. More...
 
template<class T >
void gsWriteParaview (const gsGeometry< T > &Geo, std::string const &fn, unsigned npts=NS, bool mesh=false, bool ctrlNet=false)
 Export a gsGeometry (without scalar information) to paraview file. More...
 

Function Documentation

void gismo::gsWriteCsv ( std::string const &  filename,
const gsMatrix< T > &  matrix,
const std::vector< std::string > &  headers = std::vector<std::string>() 
)

Export a gsMatrix to a .csv (comma separated values) file.

Template Parameters
T
Parameters
filenamepath of output file
matrixa gsMatrix to be written to the file
headersoptionally, a vector of strings to be used as column headers
void gismo::gsWriteGoToolsBodySpline ( const gsTensorBSpline< d, T > &  bspl,
std::ofstream &  out 
)

Writes body part of GoTools (.g2) format to a file.

Parameters
bspltensor B-Spline
outfile stream
void gsWriteParaview ( const gsGeometry< T > &  Geo,
std::string const &  fn,
unsigned  npts = NS,
bool  mesh = false,
bool  ctrlNet = false 
)

Export a gsGeometry (without scalar information) to paraview file.

Export a Geometry without scalar information.

Parameters
Geoa geometry object
fnfilename where paraview file is written
nptsnumber of points used for sampling each patch
meshif true, the parameter mesh is plotted as well
ctrlNetif true, the control net is plotted as well