v0.14.0
Classes | Namespaces | Functions
Tensor3_value.hpp File Reference
#include "Tensor3_contracted.hpp"
#include <ostream>

Go to the source code of this file.

Classes

class  FTensor::Tensor3< T, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >
 

Namespaces

 FTensor
 JSON compatible output.
 

Functions

template<class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
std::ostream & FTensor::Tensor3_ostream_row (std::ostream &os, const FTensor::Tensor3< T, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > &t, const int &i, const int &j)
 
template<class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
std::ostream & FTensor::Tensor3_ostream_block (std::ostream &os, const FTensor::Tensor3< T, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > &t, const int &i)
 
template<class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
std::ostream & operator<< (std::ostream &os, const FTensor::Tensor3< T, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > &t)
 
template<class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
std::istream & FTensor::Tensor3_istream_row (std::istream &is, FTensor::Tensor3< T, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > &t, const int &i, const int &j)
 
template<class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
std::istream & FTensor::Tensor3_istream_block (std::istream &is, FTensor::Tensor3< T, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > &t, const int &i)
 
template<class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
std::istream & operator>> (std::istream &is, FTensor::Tensor3< T, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > &t)
 

Function Documentation

◆ operator<<()

template<class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
std::ostream& operator<< ( std::ostream &  os,
const FTensor::Tensor3< T, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > &  t 
)

Definition at line 495 of file Tensor3_value.hpp.

497 {
498  os << '[';
499  for(int i = 0; i + 1 < Tensor_Dim0; ++i)
500  {
502  os << ',';
503  }
504  if(Tensor_Dim0 > 0)
505  {
506  FTensor::Tensor3_ostream_block(os, t, Tensor_Dim0 - 1);
507  }
508  os << ']';
509  return os;
510 }

◆ operator>>()

template<class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
std::istream& operator>> ( std::istream &  is,
FTensor::Tensor3< T, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > &  t 
)

Definition at line 566 of file Tensor3_value.hpp.

568 {
569  char c;
570  is >> c;
571  for(int i = 0; i + 1 < Tensor_Dim0; ++i)
572  {
574  is >> c;
575  }
576  if(Tensor_Dim0 > 0)
577  {
578  FTensor::Tensor3_istream_block(is, t, Tensor_Dim0 - 1);
579  }
580  is >> c;
581  return is;
582 }
FTensor::Tensor3_ostream_block
std::ostream & Tensor3_ostream_block(std::ostream &os, const FTensor::Tensor3< T, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > &t, const int &i)
Definition: Tensor3_value.hpp:473
c
const double c
speed of light (cm/ns)
Definition: initial_diffusion.cpp:39
t
constexpr double t
plate stiffness
Definition: plate.cpp:58
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
FTensor::Tensor3_istream_block
std::istream & Tensor3_istream_block(std::istream &is, FTensor::Tensor3< T, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > &t, const int &i)
Definition: Tensor3_value.hpp:543