26 #include "libmesh/type_tensor.h"
43 os <<
"x=" << (*this)(0,0) << std::endl;
49 << std::setw(8) << (*this)(0,0) <<
", "
50 << std::setw(8) << (*this)(0,1) <<
")"
53 << std::setw(8) << (*this)(1,0) <<
", "
54 << std::setw(8) << (*this)(1,1) <<
")"
61 << std::setw(8) << (*this)(0,0) <<
", "
62 << std::setw(8) << (*this)(0,1) <<
", "
63 << std::setw(8) << (*this)(0,2) <<
")"
66 << std::setw(8) << (*this)(1,0) <<
", "
67 << std::setw(8) << (*this)(1,1) <<
", "
68 << std::setw(8) << (*this)(1,2) <<
")"
71 << std::setw(8) << (*this)(2,0) <<
", "
72 << std::setw(8) << (*this)(2,1) <<
", "
73 << std::setw(8) << (*this)(2,2) <<
")"
84 const bool newline)
const
86 libmesh_assert (out_stream);
88 out_stream << std::setiosflags(std::ios::showpoint)
89 << (*this)(0,0) <<
" "
90 << (*
this)(0,1) <<
" "
91 << (*
this)(0,2) <<
" ";
95 out_stream << std::setiosflags(std::ios::showpoint)
96 << (*this)(1,0) <<
" "
97 << (*
this)(1,1) <<
" "
98 << (*
this)(1,2) <<
" ";
102 out_stream << std::setiosflags(std::ios::showpoint)
103 << (*this)(2,0) <<
" "
104 << (*
this)(2,1) <<
" "
105 << (*
this)(2,2) <<
" ";
115 for (
unsigned int i=0; i<LIBMESH_DIM; i++)
116 for (
unsigned int j=0; j<LIBMESH_DIM; j++)
118 if ((*
this)(i,j) < rhs(i,j))
120 if ((*
this)(i,j) > rhs(i,j))
131 for (
unsigned int i=0; i<LIBMESH_DIM; i++)
132 for (
unsigned int j=0; j<LIBMESH_DIM; j++)
134 if ((*
this)(i,j) > rhs(i,j))
136 if ((*
this)(i,j) < rhs(i,j))
144 #ifdef LIBMESH_USE_COMPLEX_NUMBERS
148 for (
unsigned int i=0; i<LIBMESH_DIM; i++)
149 for (
unsigned int j=0; j<LIBMESH_DIM; j++)
151 if ((*
this)(i,j).
real() < rhs(i,j).
real())
153 if ((*
this)(i,j).
real() > rhs(i,j).
real())
155 if ((*
this)(i,j).
imag() < rhs(i,j).
imag())
157 if ((*
this)(i,j).
imag() > rhs(i,j).
imag())
168 for (
unsigned int i=0; i<LIBMESH_DIM; i++)
169 for (
unsigned int j=0; j<LIBMESH_DIM; j++)
171 if ((*
this)(i,j).
real() > rhs(i,j).
real())
173 if ((*
this)(i,j).
real() < rhs(i,j).
real())
175 if ((*
this)(i,j).
imag() > rhs(i,j).
imag())
177 if ((*
this)(i,j).
imag() < rhs(i,j).
imag())
193 #ifdef LIBMESH_USE_COMPLEX_NUMBERS
boost::multiprecision::float128 real(const boost::multiprecision::float128 in)
void write_unformatted(std::ostream &out_stream, const bool newline=true) const
无格式输出到流,默认为打印元素并以空格和换行符分隔。
void print(std::ostream &os=libMesh::out) const
格式化输出到流,默认为 libMesh::out。
This class defines a tensor in LIBMESH_DIM dimensional space of type T.
bool operator<(const TypeTensor< T > &rhs) const
检查该 Tensor 是否小于另一个 Tensor。 用于排序时很有用。
boost::multiprecision::float128 imag(const boost::multiprecision::float128)
bool operator>(const TypeTensor< T > &rhs) const
检查该 Tensor 是否大于另一个 Tensor。