Data Structures | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends
graph Class Reference

Class to create, store and output qgraph files. More...

Inheritance diagram for graph:
Inheritance graph
[legend]
Collaboration diagram for graph:
Collaboration graph
[legend]

Data Structures

class  writer
 Abstract base class for a graph writer. More...
 
struct  xy
 

Public Member Functions

 graph (const string &title, const string &xName, const string &yName, const scalarField &x)
 Construct from title and labels (no curves) More...
 
 graph (const string &title, const string &xName, const string &yName, const scalarField &x, const scalarField &y)
 Construct from title, labels and y data for 1 curve. More...
 
 graph (const string &title, const string &xName, const string &yName, Istream &is)
 Construct from Istream given title and labels. More...
 
 graph (Istream &is)
 Construct from Istream. More...
 
const stringtitle () const
 
const stringxName () const
 
const stringyName () const
 
const scalarFieldx () const
 
scalarFieldx ()
 
const scalarFieldy () const
 
scalarFieldy ()
 
void writeTable (Ostream &) const
 Write out graph data as a simple table. More...
 
void write (Ostream &, const word &format) const
 Write graph to stream in given format. More...
 
void write (const fileName &pName, const word &format) const
 Write graph to file in given path-name and format. More...
 
void write (const fileName &path, const word &name, const word &format) const
 Write graph to file in given path, name and format. More...
 
- Public Member Functions inherited from HashPtrTable< curve >
 HashPtrTable (const label size=128)
 Construct given initial table size. More...
 
 HashPtrTable (Istream &, const INew &)
 Construct from Istream using given Istream constructor class. More...
 
 HashPtrTable (Istream &)
 Construct from Istream using default Istream constructor class. More...
 
 HashPtrTable (const dictionary &)
 Construct from dictionary using default dictionary constructor. More...
 
 HashPtrTable (const HashPtrTable< T, Key, Hash > &)
 Construct as copy. More...
 
 ~HashPtrTable ()
 Destructor. More...
 
Tremove (iterator &)
 Remove and return the pointer specified by given iterator. More...
 
bool erase (iterator &)
 Erase an hashedEntry specified by given iterator. More...
 
void clear ()
 Clear all entries from table. More...
 
void write (Ostream &os) const
 Write. More...
 
void operator= (const HashPtrTable< T, Key, Hash > &)
 

Static Public Member Functions

static word wordify (const string &sname)
 Helper function to convert string name into appropriate word. More...
 

Private Member Functions

void readCurves (Istream &)
 

Private Attributes

string title_
 
string xName_
 
string yName_
 
scalarField x_
 

Friends

Ostreamoperator<< (Ostream &, const graph &)
 Ostream Operator. More...
 

Additional Inherited Members

- Public Types inherited from HashPtrTable< curve >
typedef HashTable< T *, Key, Hash >::iterator iterator
 
typedef HashTable< T *, Key, Hash >::const_iterator const_iterator
 

Detailed Description

Class to create, store and output qgraph files.

Source files

Definition at line 58 of file graph.H.

Constructor & Destructor Documentation

◆ graph() [1/4]

graph ( const string title,
const string xName,
const string yName,
const scalarField x 
)

Construct from title and labels (no curves)

Definition at line 79 of file graph.C.

◆ graph() [2/4]

graph ( const string title,
const string xName,
const string yName,
const scalarField x,
const scalarField y 
)

Construct from title, labels and y data for 1 curve.

Definition at line 94 of file graph.C.

References curve::curveStyle::CONTINUOUS, insert(), and y.

Here is the call graph for this function:

◆ graph() [3/4]

graph ( const string title,
const string xName,
const string yName,
Istream is 
)

Construct from Istream given title and labels.

Definition at line 112 of file graph.C.

◆ graph() [4/4]

graph ( Istream is)

Construct from Istream.

Definition at line 127 of file graph.C.

References graph::readCurves().

Here is the call graph for this function:

Member Function Documentation

◆ readCurves()

void readCurves ( Istream is)
private

Definition at line 55 of file graph.C.

References curve::curveStyle::CONTINUOUS, forAll, insert(), List::size(), and y.

Referenced by graph::graph().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ title()

const string& title ( ) const
inline

Definition at line 149 of file graph.H.

References graph::title_.

◆ xName()

const string& xName ( ) const
inline

Definition at line 154 of file graph.H.

References graph::xName_.

◆ yName()

const string& yName ( ) const
inline

Definition at line 159 of file graph.H.

References graph::yName_.

◆ x() [1/2]

const scalarField& x ( ) const
inline

Definition at line 165 of file graph.H.

References graph::x_.

Referenced by Foam::kShellIntegration(), noiseFFT::Ldelta(), noiseFFT::Lf(), and noiseFFT::Pdelta().

Here is the caller graph for this function:

◆ x() [2/2]

scalarField& x ( )
inline

Definition at line 170 of file graph.H.

References graph::x_.

◆ y() [1/2]

Foam::scalarField & y ( ) const

Definition at line 137 of file graph.C.

References Foam::exit(), Foam::FatalError, and FatalErrorInFunction.

Referenced by noiseFFT::Ldelta(), noiseFFT::Lf(), noiseFFT::Lsum(), and noiseFFT::Pdelta().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ y() [2/2]

scalarField& y ( )

◆ writeTable()

void writeTable ( Ostream os) const

Write out graph data as a simple table.

Definition at line 206 of file graph.C.

References Foam::endl(), forAll, forAllConstIter(), Foam::setw(), and token::SPACE.

Here is the call graph for this function:

◆ write() [1/3]

void write ( Ostream os,
const word format 
) const

Write graph to stream in given format.

Definition at line 221 of file graph.C.

References format(), writer< Type >::New(), and write().

Referenced by main(), Foam::makeGraph(), Foam::writeCellGraph(), and Foam::writePatchGraph().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write() [2/3]

void write ( const fileName pName,
const word format 
) const

Write graph to file in given path-name and format.

Definition at line 227 of file graph.C.

References Foam::endl(), format(), IOstream::good(), OFstream::name(), writer< Type >::New(), WarningInFunction, and write().

Here is the call graph for this function:

◆ write() [3/3]

void write ( const fileName path,
const word name,
const word format 
) const

Write graph to file in given path, name and format.

Definition at line 247 of file graph.C.

References format(), Foam::mkDir(), Foam::name(), path(), and write().

Here is the call graph for this function:

◆ wordify()

Foam::word wordify ( const string sname)
static

Helper function to convert string name into appropriate word.

Definition at line 44 of file graph.C.

References string::replace().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

Ostream& operator<< ( Ostream ,
const graph  
)
friend

Ostream Operator.

Field Documentation

◆ title_

string title_
private

Definition at line 64 of file graph.H.

Referenced by graph::title().

◆ xName_

string xName_
private

Definition at line 65 of file graph.H.

Referenced by graph::xName().

◆ yName_

string yName_
private

Definition at line 66 of file graph.H.

Referenced by graph::yName().

◆ x_

scalarField x_
private

Definition at line 68 of file graph.H.

Referenced by graph::x().


The documentation for this class was generated from the following files: