NumericVector< T > Class Template Reference

#include <numeric_vector.h>

Public Member Functions

template<>
void print (std::ostream &os) const
 
template<>
void print_global (std::ostream &os) const
 

Detailed Description

template<typename T>
class NumericVector< T >

Definition at line 41 of file numeric_vector.h.

Member Function Documentation

template<>
void NumericVector< Complex >::print ( std::ostream &  os) const
inline

Definition at line 776 of file numeric_vector.h.

References libMesh::initialized().

{
libmesh_assert (this->initialized());
os << "Size\tglobal = " << this->size()
<< "\t\tlocal = " << this->local_size() << std::endl;
// std::complex<>::operator<<() is defined, but use this form
os << "#\tReal part\t\tImaginary part" << std::endl;
for (unsigned int i=this->first_local_index(); i<this->last_local_index(); i++)
os << i << "\t"
<< (*this)(i).real() << "\t\t"
<< (*this)(i).imag() << std::endl;
}
template<>
void NumericVector< Complex >::print_global ( std::ostream &  os) const
inline

Definition at line 809 of file numeric_vector.h.

References libMesh::initialized(), and libMesh::processor_id().

{
libmesh_assert (this->initialized());
std::vector<Complex> v(this->size());
this->localize(v);
// Right now we only want one copy of the output
return;
os << "Size\tglobal = " << this->size() << std::endl;
os << "#\tReal part\t\tImaginary part" << std::endl;
for (unsigned int i=0; i!=v.size(); i++)
os << i << "\t"
<< v[i].real() << "\t\t"
<< v[i].imag() << std::endl;
}

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

Site Created By: libMesh Developers
Last modified: January 12 2013 15:00:43 UTC

Hosted By:
SourceForge.net Logo