Canoe
Comprehensive Atmosphere N' Ocean Engine
Variable< _Scalar, 2 > Class Template Reference

#include <Variable.h>

Inheritance diagram for Variable< _Scalar, 2 >:
[legend]

Public Member Functions

 Variable ()
 
template<typename OtherDerived >
 Variable (const Eigen::DenseBase< OtherDerived > &other)
 
template<typename OtherDerived >
Variableoperator= (const Eigen::ArrayBase< OtherDerived > &other)
 
 Variable (const Variable &other)
 
Variableoperator= (const Variable &other)
 
 Variable (const RectGrid< Scalar, Dimension > &grid, std::string name="", std::string longname="", std::string units="")
 
void set_boundary (int id, BoundaryType type, Scalar value)
 
void write_binary (const char *filename) const
 
void write_file (const char *filename) const
 
void finish ()
 
const dealii::SparseMatrix< Scalar > & neumann () const
 
const dealii::Vector< Scalar > & dirichlet () const
 
Eigen::Block< Base > & val ()
 
Scalarval (int i, int j)
 
const Eigen::Block< Base > & val () const
 
const Scalarval (int i, int j) const
 
std::string get_name () const
 
std::string get_longname () const
 
std::string get_units () const
 

Protected Types

enum  { Dimension = 2 }
 
typedef _Scalar Scalar
 
typedef Eigen::Array< Scalar, Eigen::Dynamic, Eigen::Dynamic > Base
 

Protected Attributes

const RectGrid< Scalar, Dimension > & m_grid
 
Eigen::Block< Basem_value
 
std::string m_name
 
std::string m_longname
 
std::string m_units
 
std::array< BoundaryInfo< Scalar >, 4 > m_boundary
 
dealii::SparsityPattern m_pattern
 
dealii::SparseMatrix< Scalarm_neumann
 
dealii::Vector< Scalarm_dirichlet
 

Friends

template<typename STREAM >
STREAM & operator<< (STREAM &os, const Variable &var)
 

Detailed Description

template<typename _Scalar>
class Variable< _Scalar, 2 >

Definition at line 19 of file Variable.h.

Member Typedef Documentation

◆ Scalar

template<typename _Scalar >
typedef _Scalar Variable< _Scalar, 2 >::Scalar
protected

Definition at line 42 of file Variable.h.

◆ Base

template<typename _Scalar >
typedef Eigen::Array<Scalar, Eigen::Dynamic, Eigen::Dynamic> Variable< _Scalar, 2 >::Base
protected

Definition at line 43 of file Variable.h.

Member Enumeration Documentation

◆ anonymous enum

template<typename _Scalar >
anonymous enum
protected
Enumerator
Dimension 

Definition at line 44 of file Variable.h.

Constructor & Destructor Documentation

◆ Variable() [1/4]

template<typename _Scalar >
Variable< _Scalar, 2 >::Variable ( )
inline

Definition at line 61 of file Variable.h.

◆ Variable() [2/4]

template<typename _Scalar >
template<typename OtherDerived >
Variable< _Scalar, 2 >::Variable ( const Eigen::DenseBase< OtherDerived > &  other)
inlineexplicit

Definition at line 64 of file Variable.h.

◆ Variable() [3/4]

template<typename _Scalar >
Variable< _Scalar, 2 >::Variable ( const Variable< _Scalar, 2 > &  other)
inline

Definition at line 73 of file Variable.h.

◆ Variable() [4/4]

template<typename _Scalar >
Variable< _Scalar, 2 >::Variable ( const RectGrid< Scalar, Dimension > &  grid,
std::string  name = "",
std::string  longname = "",
std::string  units = "" 
)
inline

Definition at line 95 of file Variable.h.

Member Function Documentation

◆ operator=() [1/2]

template<typename _Scalar >
template<typename OtherDerived >
Variable& Variable< _Scalar, 2 >::operator= ( const Eigen::ArrayBase< OtherDerived > &  other)
inline

Definition at line 68 of file Variable.h.

◆ operator=() [2/2]

template<typename _Scalar >
Variable& Variable< _Scalar, 2 >::operator= ( const Variable< _Scalar, 2 > &  other)
inline

Definition at line 90 of file Variable.h.

◆ set_boundary()

template<typename _Scalar >
void Variable< _Scalar, 2 >::set_boundary ( int  id,
BoundaryType  type,
Scalar  value 
)
inline

Definition at line 112 of file Variable.h.

◆ write_binary()

template<typename _Scalar >
void Variable< _Scalar, 2 >::write_binary ( const char *  filename) const
inline

Definition at line 121 of file Variable.h.

◆ write_file()

template<typename _Scalar >
void Variable< _Scalar, 2 >::write_file ( const char *  filename) const
inline

Definition at line 134 of file Variable.h.

◆ finish()

template<typename _Scalar >
void Variable< _Scalar, 2 >::finish

Definition at line 165 of file Variable.h.

◆ neumann()

template<typename _Scalar >
const dealii::SparseMatrix<Scalar>& Variable< _Scalar, 2 >::neumann ( ) const
inline

Definition at line 145 of file Variable.h.

◆ dirichlet()

template<typename _Scalar >
const dealii::Vector<Scalar>& Variable< _Scalar, 2 >::dirichlet ( ) const
inline

Definition at line 147 of file Variable.h.

◆ val() [1/4]

template<typename _Scalar >
Eigen::Block<Base>& Variable< _Scalar, 2 >::val ( )
inline

Definition at line 149 of file Variable.h.

◆ val() [2/4]

template<typename _Scalar >
Scalar& Variable< _Scalar, 2 >::val ( int  i,
int  j 
)
inline

Definition at line 151 of file Variable.h.

◆ val() [3/4]

template<typename _Scalar >
const Eigen::Block<Base>& Variable< _Scalar, 2 >::val ( ) const
inline

Definition at line 153 of file Variable.h.

◆ val() [4/4]

template<typename _Scalar >
const Scalar& Variable< _Scalar, 2 >::val ( int  i,
int  j 
) const
inline

Definition at line 155 of file Variable.h.

◆ get_name()

template<typename _Scalar >
std::string Variable< _Scalar, 2 >::get_name ( ) const
inline

Definition at line 157 of file Variable.h.

◆ get_longname()

template<typename _Scalar >
std::string Variable< _Scalar, 2 >::get_longname ( ) const
inline

Definition at line 159 of file Variable.h.

◆ get_units()

template<typename _Scalar >
std::string Variable< _Scalar, 2 >::get_units ( ) const
inline

Definition at line 161 of file Variable.h.

Friends And Related Function Documentation

◆ operator<<

template<typename _Scalar >
template<typename STREAM >
STREAM& operator<< ( STREAM &  os,
const Variable< _Scalar, 2 > &  var 
)
friend

Definition at line 22 of file Variable.h.

Member Data Documentation

◆ m_grid

template<typename _Scalar >
const RectGrid<Scalar, Dimension>& Variable< _Scalar, 2 >::m_grid
protected

Definition at line 46 of file Variable.h.

◆ m_value

template<typename _Scalar >
Eigen::Block<Base> Variable< _Scalar, 2 >::m_value
protected

Definition at line 48 of file Variable.h.

◆ m_name

template<typename _Scalar >
std::string Variable< _Scalar, 2 >::m_name
protected

Definition at line 50 of file Variable.h.

◆ m_longname

template<typename _Scalar >
std::string Variable< _Scalar, 2 >::m_longname
protected

Definition at line 50 of file Variable.h.

◆ m_units

template<typename _Scalar >
std::string Variable< _Scalar, 2 >::m_units
protected

Definition at line 50 of file Variable.h.

◆ m_boundary

template<typename _Scalar >
std::array<BoundaryInfo<Scalar>, 4> Variable< _Scalar, 2 >::m_boundary
protected

Definition at line 52 of file Variable.h.

◆ m_pattern

template<typename _Scalar >
dealii::SparsityPattern Variable< _Scalar, 2 >::m_pattern
protected

Definition at line 54 of file Variable.h.

◆ m_neumann

template<typename _Scalar >
dealii::SparseMatrix<Scalar> Variable< _Scalar, 2 >::m_neumann
protected

Definition at line 56 of file Variable.h.

◆ m_dirichlet

template<typename _Scalar >
dealii::Vector<Scalar> Variable< _Scalar, 2 >::m_dirichlet
protected

Definition at line 58 of file Variable.h.


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