MFEM  v4.6.0
Finite element discretization library
Public Member Functions | List of all members
mfem::DenseTensor Class Reference

Rank 3 tensor (array of matrices) More...

#include <densemat.hpp>

Public Member Functions

 DenseTensor ()
 
 DenseTensor (int i, int j, int k)
 
 DenseTensor (double *d, int i, int j, int k)
 
 DenseTensor (int i, int j, int k, MemoryType mt)
 
 DenseTensor (const DenseTensor &other)
 Copy constructor: deep copy. More...
 
int SizeI () const
 
int SizeJ () const
 
int SizeK () const
 
int TotalSize () const
 
void SetSize (int i, int j, int k, MemoryType mt_=MemoryType::PRESERVE)
 
void UseExternalData (double *ext_data, int i, int j, int k)
 
DenseTensoroperator= (double c)
 Sets the tensor elements equal to constant c. More...
 
DenseTensoroperator= (const DenseTensor &other)
 Copy assignment operator (performs a deep copy) More...
 
DenseMatrixoperator() (int k)
 
const DenseMatrixoperator() (int k) const
 
double & operator() (int i, int j, int k)
 
const double & operator() (int i, int j, int k) const
 
double * GetData (int k)
 
const double * GetData (int k) const
 
double * Data ()
 
const double * Data () const
 
Memory< double > & GetMemory ()
 
const Memory< double > & GetMemory () const
 
void AddMult (const Table &elem_dof, const Vector &x, Vector &y) const
 
void Clear ()
 
std::size_t MemoryUsage () const
 
const double * Read (bool on_dev=true) const
 Shortcut for mfem::Read( GetMemory(), TotalSize(), on_dev). More...
 
const double * HostRead () const
 Shortcut for mfem::Read(GetMemory(), TotalSize(), false). More...
 
double * Write (bool on_dev=true)
 Shortcut for mfem::Write(GetMemory(), TotalSize(), on_dev). More...
 
double * HostWrite ()
 Shortcut for mfem::Write(GetMemory(), TotalSize(), false). More...
 
double * ReadWrite (bool on_dev=true)
 Shortcut for mfem::ReadWrite(GetMemory(), TotalSize(), on_dev). More...
 
double * HostReadWrite ()
 Shortcut for mfem::ReadWrite(GetMemory(), TotalSize(), false). More...
 
void Swap (DenseTensor &t)
 
 ~DenseTensor ()
 

Detailed Description

Rank 3 tensor (array of matrices)

Definition at line 1096 of file densemat.hpp.

Constructor & Destructor Documentation

◆ DenseTensor() [1/5]

mfem::DenseTensor::DenseTensor ( )
inline

Definition at line 1104 of file densemat.hpp.

◆ DenseTensor() [2/5]

mfem::DenseTensor::DenseTensor ( int  i,
int  j,
int  k 
)
inline

Definition at line 1109 of file densemat.hpp.

◆ DenseTensor() [3/5]

mfem::DenseTensor::DenseTensor ( double *  d,
int  i,
int  j,
int  k 
)
inline

Definition at line 1116 of file densemat.hpp.

◆ DenseTensor() [4/5]

mfem::DenseTensor::DenseTensor ( int  i,
int  j,
int  k,
MemoryType  mt 
)
inline

Definition at line 1123 of file densemat.hpp.

◆ DenseTensor() [5/5]

mfem::DenseTensor::DenseTensor ( const DenseTensor other)
inline

Copy constructor: deep copy.

Definition at line 1131 of file densemat.hpp.

◆ ~DenseTensor()

mfem::DenseTensor::~DenseTensor ( )
inline

Definition at line 1260 of file densemat.hpp.

Member Function Documentation

◆ AddMult()

void mfem::DenseTensor::AddMult ( const Table elem_dof,
const Vector x,
Vector y 
) const

Matrix-vector product from unassembled element matrices, assuming both 'x' and 'y' use the same elem_dof table.

Definition at line 4239 of file densemat.cpp.

◆ Clear()

void mfem::DenseTensor::Clear ( )
inline

Definition at line 1224 of file densemat.hpp.

◆ Data() [1/2]

double* mfem::DenseTensor::Data ( )
inline

Definition at line 1213 of file densemat.hpp.

◆ Data() [2/2]

const double* mfem::DenseTensor::Data ( ) const
inline

Definition at line 1215 of file densemat.hpp.

◆ GetData() [1/2]

double* mfem::DenseTensor::GetData ( int  k)
inline

Definition at line 1201 of file densemat.hpp.

◆ GetData() [2/2]

const double* mfem::DenseTensor::GetData ( int  k) const
inline

Definition at line 1207 of file densemat.hpp.

◆ GetMemory() [1/2]

Memory<double>& mfem::DenseTensor::GetMemory ( )
inline

Definition at line 1217 of file densemat.hpp.

◆ GetMemory() [2/2]

const Memory<double>& mfem::DenseTensor::GetMemory ( ) const
inline

Definition at line 1218 of file densemat.hpp.

◆ HostRead()

const double* mfem::DenseTensor::HostRead ( ) const
inline

Shortcut for mfem::Read(GetMemory(), TotalSize(), false).

Definition at line 1234 of file densemat.hpp.

◆ HostReadWrite()

double* mfem::DenseTensor::HostReadWrite ( )
inline

Shortcut for mfem::ReadWrite(GetMemory(), TotalSize(), false).

Definition at line 1250 of file densemat.hpp.

◆ HostWrite()

double* mfem::DenseTensor::HostWrite ( )
inline

Shortcut for mfem::Write(GetMemory(), TotalSize(), false).

Definition at line 1242 of file densemat.hpp.

◆ MemoryUsage()

std::size_t mfem::DenseTensor::MemoryUsage ( ) const
inline

Definition at line 1227 of file densemat.hpp.

◆ operator()() [1/4]

DenseMatrix& mfem::DenseTensor::operator() ( int  k)
inline

Definition at line 1171 of file densemat.hpp.

◆ operator()() [2/4]

const DenseMatrix& mfem::DenseTensor::operator() ( int  k) const
inline

Definition at line 1177 of file densemat.hpp.

◆ operator()() [3/4]

double& mfem::DenseTensor::operator() ( int  i,
int  j,
int  k 
)
inline

Definition at line 1185 of file densemat.hpp.

◆ operator()() [4/4]

const double& mfem::DenseTensor::operator() ( int  i,
int  j,
int  k 
) const
inline

Definition at line 1193 of file densemat.hpp.

◆ operator=() [1/2]

DenseTensor & mfem::DenseTensor::operator= ( double  c)

Sets the tensor elements equal to constant c.

Definition at line 4294 of file densemat.cpp.

◆ operator=() [2/2]

DenseTensor & mfem::DenseTensor::operator= ( const DenseTensor other)

Copy assignment operator (performs a deep copy)

Definition at line 4304 of file densemat.cpp.

◆ Read()

const double* mfem::DenseTensor::Read ( bool  on_dev = true) const
inline

Shortcut for mfem::Read( GetMemory(), TotalSize(), on_dev).

Definition at line 1230 of file densemat.hpp.

◆ ReadWrite()

double* mfem::DenseTensor::ReadWrite ( bool  on_dev = true)
inline

Shortcut for mfem::ReadWrite(GetMemory(), TotalSize(), on_dev).

Definition at line 1246 of file densemat.hpp.

◆ SetSize()

void mfem::DenseTensor::SetSize ( int  i,
int  j,
int  k,
MemoryType  mt_ = MemoryType::PRESERVE 
)
inline

Definition at line 1148 of file densemat.hpp.

◆ SizeI()

int mfem::DenseTensor::SizeI ( ) const
inline

Definition at line 1142 of file densemat.hpp.

◆ SizeJ()

int mfem::DenseTensor::SizeJ ( ) const
inline

Definition at line 1143 of file densemat.hpp.

◆ SizeK()

int mfem::DenseTensor::SizeK ( ) const
inline

Definition at line 1144 of file densemat.hpp.

◆ Swap()

void mfem::DenseTensor::Swap ( DenseTensor t)
inline

Definition at line 1253 of file densemat.hpp.

◆ TotalSize()

int mfem::DenseTensor::TotalSize ( ) const
inline

Definition at line 1146 of file densemat.hpp.

◆ UseExternalData()

void mfem::DenseTensor::UseExternalData ( double *  ext_data,
int  i,
int  j,
int  k 
)
inline

Definition at line 1157 of file densemat.hpp.

◆ Write()

double* mfem::DenseTensor::Write ( bool  on_dev = true)
inline

Shortcut for mfem::Write(GetMemory(), TotalSize(), on_dev).

Definition at line 1238 of file densemat.hpp.


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