MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TestHSolve.h File Reference

Go to the source code of this file.

Functions

void makeFullMatrix (const vector< TreeNodeStruct > &tree, double dt, vector< vector< double > > &matrix)
 
template<class T >
void permute (vector< T > &g, const vector< unsigned int > &permutation)
 

Function Documentation

void makeFullMatrix ( const vector< TreeNodeStruct > &  tree,
double  dt,
vector< vector< double > > &  matrix 
)
template<class T >
void permute ( vector< T > &  g,
const vector< unsigned int > &  permutation 
)

Definition at line 19 of file TestHSolve.h.

22 {
23  assert( g.size() == permutation.size() );
24 
25  vector< T > copy( g.size() );
26 
27  for ( unsigned int i = 0; i < g.size(); i++ )
28  copy[ permutation[ i ] ] = g[ i ];
29 
30  for ( unsigned int i = 0; i < g.size(); i++ )
31  g[ i ] = copy[ i ];
32 }