#include <MatrixFuncs.h>
|
static unsigned int | CalculateIndex (unsigned int curRow, unsigned int curColumn) |
|
template<typename DataType > |
static void | Invert (unsigned int rows, unsigned int columns, Array< OneD, DataType > &data) |
|
static boost::tuples::tuple
< unsigned int, unsigned int > | Advance (const unsigned int totalRows, const unsigned int totalColumns, const unsigned int curRow, const unsigned int curColumn) |
|
Definition at line 199 of file MatrixFuncs.h.
boost::tuples::tuple< unsigned int, unsigned int > Nektar::SymmetricMatrixFuncs::Advance |
( |
const unsigned int |
totalRows, |
|
|
const unsigned int |
totalColumns, |
|
|
const unsigned int |
curRow, |
|
|
const unsigned int |
curColumn |
|
) |
| |
|
static |
Definition at line 296 of file MatrixFuncs.cpp.
References ASSERTL1.
Referenced by Nektar::NekMatrix< DataType, StandardMatrixTag >::Advance().
299 ASSERTL1(totalRows == totalColumns,
"Symmetric matrices must be square.");
300 ASSERTL1(curRow < totalRows,
"Attemping to iterate through an element on row " +
301 boost::lexical_cast<std::string>(curRow) +
" of a (" +
302 boost::lexical_cast<std::string>(totalRows) +
", " +
303 boost::lexical_cast<std::string>(totalColumns) +
" symmetric matrix.");
304 ASSERTL1(curColumn < totalColumns,
"Attemping to iterate through an element on row " +
305 boost::lexical_cast<std::string>(curColumn) +
" of a (" +
306 boost::lexical_cast<std::string>(totalRows) +
", " +
307 boost::lexical_cast<std::string>(totalColumns) +
" symmetric matrix.");
309 unsigned int nextRow = curRow;
310 unsigned int nextColumn = curColumn;
312 if( nextRow < totalRows )
317 if( nextRow >= totalRows )
323 if( nextColumn >= totalColumns )
325 nextRow = std::numeric_limits<unsigned int>::max();
326 nextColumn = std::numeric_limits<unsigned int>::max();
329 return boost::tuples::tuple<unsigned int, unsigned int>(nextRow, nextColumn);
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
unsigned int Nektar::SymmetricMatrixFuncs::CalculateIndex |
( |
unsigned int |
curRow, |
|
|
unsigned int |
curColumn |
|
) |
| |
|
static |
template<typename DataType >
static void Nektar::SymmetricMatrixFuncs::Invert |
( |
unsigned int |
rows, |
|
|
unsigned int |
columns, |
|
|
Array< OneD, DataType > & |
data |
|
) |
| |
|
inlinestatic |
Definition at line 206 of file MatrixFuncs.h.
References ASSERTL0, and Nektar::Array< OneD, DataType >::get().
Referenced by Nektar::NekMatrix< DataType, StandardMatrixTag >::Invert().
209 #ifdef NEKTAR_USING_BLAS
210 ASSERTL0(rows==columns,
"Only square matrices can be inverted.");
214 Array<OneD, int> ipivot(n);
215 Array<OneD, DataType> work(n);
217 Lapack::Dsptrf(
'U', n, data.get(), ipivot.get(), info);
221 std::string message =
"ERROR: The " + boost::lexical_cast<std::string>(-info) +
"th parameter had an illegal parameter for dsptrf";
226 std::string message =
"ERROR: Element u_" + boost::lexical_cast<std::string>(info) + boost::lexical_cast<std::string>(info) +
" is 0 from dsptrf";
230 Lapack::Dsptri(
'U', n, data.get(), ipivot.get(),
235 std::string message =
"ERROR: The " + boost::lexical_cast<std::string>(-info) +
"th parameter had an illegal parameter for dsptri";
240 std::string message =
"ERROR: Element u_" + boost::lexical_cast<std::string>(info) + boost::lexical_cast<std::string>(info) +
" is 0 from dsptri";
246 BOOST_STATIC_ASSERT(
sizeof(DataType) == 0);
#define ASSERTL0(condition, msg)