ug4
ug::ConnectionViewer Namespace Reference

Functions

bool AddMarkers (std::string filename, std::string markfilename)
 
bool AddMarkers (string filename, string markfilename)
 
std::string GetParallelName (std::string name)
 
std::string GetParallelName (std::string name, const pcl::ProcessCommunicator &pc, bool bWriteHeader=true)
 
string GetParallelName (string name, const pcl::ProcessCommunicator &pc, bool bWriteHeader)
 
template<typename T >
std::string GetParallelName (T &t, std::string name)
 
template<typename matrix_type >
bool ReadMatrix (std::string filename, matrix_type &matrix, std::vector< MathVector< 3 > > &grid, int &dimension)
 
template<typename vector_type >
bool ReadVector (std::string filename, vector_type &vec)
 
template<typename TPosition >
bool WriteGridHeader (std::ostream &f, const TPosition &positions, int dimension)
 
template<typename TPosition >
bool WriteGridHeader (std::ostream &f, const TPosition &positions, size_t N, int dimension)
 
bool WriteMarkers (std::string markfilename, std::vector< bool > markers, float r, float g, float b, float alpha, int size)
 
bool WriteMarkers (string markfilename, vector< bool > markers, float r, float g, float b, float alpha, int size)
 
template<typename Matrix_type , typename postype >
void WriteMatrix (std::ostream &file, const Matrix_type &A, postype *positions, int dimensions)
 writes to a file in somewhat SparseMatrix-market format (for connection viewer) More...
 
template<typename Matrix_type , typename postype >
bool WriteMatrix (std::string filename, const Matrix_type &A, const std::vector< postype > &positionsFrom, const std::vector< postype > &positionsTo, size_t dimensions)
 
template<typename Matrix_type , typename postype >
void WriteMatrix (std::string filename, const Matrix_type &A, postype *positions, int dimensions)
 
template<typename Matrix_type , typename postype >
bool WriteMatrixPar (std::string filename, const Matrix_type &A, const std::vector< postype > &positionsFrom, const std::vector< postype > &positionsTo, size_t dimensions)
 
template<typename Matrix_type , typename postype >
void WriteMatrixPar (std::string name, const Matrix_type &A, const postype *positions, int dimensions)
 
template<typename Matrix_type , typename Vector_type , typename postype >
void WriteVector (std::string filename, const Matrix_type &A, const Vector_type &v, postype *positions, int dimensions, const Vector_type *compareVec=NULL)
 
template<typename Vector_type , typename postype >
void WriteVector (std::string filename, const Vector_type &b, const postype *positions, int dimensions, const Vector_type *compareVec=NULL)
 writes to a file in somewhat SparseMatrix-market format (for connection viewer) More...
 
template<typename Matrix_type , typename Vector_type , typename postype >
void WriteVectorPar (std::string filename, const Matrix_type &A, const Vector_type &v, postype *positions, int dimensions, const Vector_type *compareVec=NULL)
 
template<typename Vector_type , typename postype >
void WriteVectorPar (std::string filename, const Vector_type &b, const postype *positions, int dimensions, const Vector_type *compareVec=NULL)
 

Variables

bool g_parallelConnectionViewer =false
 

Function Documentation

◆ AddMarkers() [1/2]

bool ug::ConnectionViewer::AddMarkers ( std::string  filename,
std::string  markfilename 
)

◆ AddMarkers() [2/2]

bool ug::ConnectionViewer::AddMarkers ( string  filename,
string  markfilename 
)

◆ GetParallelName() [1/4]

std::string ug::ConnectionViewer::GetParallelName ( std::string  name)
inline

References GetParallelName(), and name.

◆ GetParallelName() [2/4]

std::string ug::ConnectionViewer::GetParallelName ( std::string  name,
const pcl::ProcessCommunicator pc,
bool  bWriteHeader = true 
)

extends the filename (add p000X extension in parallel) and writes a parallel pvec/pmat "header" file

◆ GetParallelName() [3/4]

string ug::ConnectionViewer::GetParallelName ( string  name,
const pcl::ProcessCommunicator pc,
bool  bWriteHeader 
)

◆ GetParallelName() [4/4]

template<typename T >
std::string ug::ConnectionViewer::GetParallelName ( T &  t,
std::string  name 
)
inline

References GetParallelName(), and name.

◆ ReadMatrix()

template<typename matrix_type >
bool ug::ConnectionViewer::ReadMatrix ( std::string  filename,
matrix_type matrix,
std::vector< MathVector< 3 > > &  grid,
int &  dimension 
)

References PROGRESS_START, and PROGRESS_UPDATE.

◆ ReadVector()

template<typename vector_type >
bool ug::ConnectionViewer::ReadVector ( std::string  filename,
vector_type vec 
)

References p, PROGRESS_START, and PROGRESS_UPDATE.

◆ WriteGridHeader() [1/2]

template<typename TPosition >
bool ug::ConnectionViewer::WriteGridHeader ( std::ostream &  f,
const TPosition &  positions,
int  dimension 
)

References WriteGridHeader().

◆ WriteGridHeader() [2/2]

template<typename TPosition >
bool ug::ConnectionViewer::WriteGridHeader ( std::ostream &  f,
const TPosition &  positions,
size_t  N,
int  dimension 
)

◆ WriteMarkers() [1/2]

bool ug::ConnectionViewer::WriteMarkers ( std::string  markfilename,
std::vector< bool >  markers,
float  r,
float  g,
float  b,
float  alpha,
int  size 
)

◆ WriteMarkers() [2/2]

bool ug::ConnectionViewer::WriteMarkers ( string  markfilename,
vector< bool >  markers,
float  r,
float  g,
float  b,
float  alpha,
int  size 
)

References alpha.

◆ WriteMatrix() [1/3]

template<typename Matrix_type , typename postype >
void ug::ConnectionViewer::WriteMatrix ( std::ostream &  file,
const Matrix_type &  A,
postype *  positions,
int  dimensions 
)

writes to a file in somewhat SparseMatrix-market format (for connection viewer)

Parameters
filenameFilename to write matrix to
ASparseMatrix A.
positionsPositions, there has to be one position for each i in (0, ..., max(A.num_rows(), A.num_cols())).
dimensionsDimension of positions

References PROFILE_FUNC_GROUP, PROGRESS_START, PROGRESS_UPDATE, and WriteGridHeader().

Referenced by WriteMatrix(), and WriteMatrixPar().

◆ WriteMatrix() [2/3]

template<typename Matrix_type , typename postype >
bool ug::ConnectionViewer::WriteMatrix ( std::string  filename,
const Matrix_type &  A,
const std::vector< postype > &  positionsFrom,
const std::vector< postype > &  positionsTo,
size_t  dimensions 
)

** this version can handle different from and to spaces

References CONNECTION_VIEWER_VERSION, PROFILE_FUNC_GROUP, PROGRESS_START, PROGRESS_UPDATE, and UG_LOG.

◆ WriteMatrix() [3/3]

template<typename Matrix_type , typename postype >
void ug::ConnectionViewer::WriteMatrix ( std::string  filename,
const Matrix_type &  A,
postype *  positions,
int  dimensions 
)

References WriteMatrix().

◆ WriteMatrixPar() [1/2]

template<typename Matrix_type , typename postype >
bool ug::ConnectionViewer::WriteMatrixPar ( std::string  filename,
const Matrix_type &  A,
const std::vector< postype > &  positionsFrom,
const std::vector< postype > &  positionsTo,
size_t  dimensions 
)

References GetParallelName(), and WriteMatrix().

◆ WriteMatrixPar() [2/2]

◆ WriteVector() [1/2]

template<typename Matrix_type , typename Vector_type , typename postype >
void ug::ConnectionViewer::WriteVector ( std::string  filename,
const Matrix_type &  A,
const Vector_type &  v,
postype *  positions,
int  dimensions,
const Vector_type *  compareVec = NULL 
)

◆ WriteVector() [2/2]

template<typename Vector_type , typename postype >
void ug::ConnectionViewer::WriteVector ( std::string  filename,
const Vector_type &  b,
const postype *  positions,
int  dimensions,
const Vector_type *  compareVec = NULL 
)

writes to a file in somewhat SparseMatrix-market format (for connection viewer)

Parameters
filenameFilename to write matrix to
bVector
positionsPositions, there has to be one position for each i in (0, ..., max(A.num_rows(), A.num_cols())).
dimensionsDimensions of Positions

References PROFILE_FUNC_GROUP, and WriteGridHeader().

Referenced by WriteVectorPar().

◆ WriteVectorPar() [1/2]

template<typename Matrix_type , typename Vector_type , typename postype >
void ug::ConnectionViewer::WriteVectorPar ( std::string  filename,
const Matrix_type &  A,
const Vector_type &  v,
postype *  positions,
int  dimensions,
const Vector_type *  compareVec = NULL 
)

References GetParallelName(), and WriteVector().

◆ WriteVectorPar() [2/2]

template<typename Vector_type , typename postype >
void ug::ConnectionViewer::WriteVectorPar ( std::string  filename,
const Vector_type &  b,
const postype *  positions,
int  dimensions,
const Vector_type *  compareVec = NULL 
)

Variable Documentation

◆ g_parallelConnectionViewer

bool ug::ConnectionViewer::g_parallelConnectionViewer =false

Referenced by WriteMatrixPar().