MAST
MAST::FEMOperatorMatrix Class Reference

#include <fem_operator_matrix.h>

Public Member Functions

 FEMOperatorMatrix ()
 
virtual ~FEMOperatorMatrix ()
 
void clear ()
 clears the data structures More...
 
unsigned int m () const
 
unsigned int n () const
 
void print (std::ostream &o)
 
void reinit (unsigned int n_interpolated_vars, unsigned int n_discrete_vars, unsigned int n_discrete_dofs_per_var)
 this initializes the operator for number of rows and variables, assuming that all variables has the same number of dofs. More...
 
void set_shape_function (unsigned int interpolated_var, unsigned int discrete_var, const RealVectorX &shape_func)
 sets the shape function values for the block corresponding to interpolated_var and discrete_var. More...
 
void reinit (unsigned int n_interpolated_vars, const RealVectorX &shape_func)
 this initializes all variables to use the same interpolation function. More...
 
template<typename T >
void vector_mult (T &res, const T &v) const
 res = [this] * v More...
 
template<typename T >
void vector_mult_transpose (T &res, const T &v) const
 res = v^T * [this] More...
 
template<typename T >
void right_multiply (T &r, const T &m) const
 [R] = [this] * [M] More...
 
template<typename T >
void right_multiply_transpose (T &r, const T &m) const
 [R] = [this]^T * [M] More...
 
template<typename T >
void right_multiply_transpose (T &r, const MAST::FEMOperatorMatrix &m) const
 [R] = [this]^T * [M] More...
 
template<typename T >
void left_multiply (T &r, const T &m) const
 [R] = [M] * [this] More...
 
template<typename T >
void left_multiply_transpose (T &r, const T &m) const
 [R] = [M] * [this]^T More...
 

Protected Attributes

unsigned int _n_interpolated_vars
 number of rows of the operator More...
 
unsigned int _n_discrete_vars
 number of discrete variables in the system More...
 
unsigned int _n_dofs_per_var
 number of dofs for each variable More...
 
std::vector< RealVectorX * > _var_shape_functions
 stores the shape function values that defines the coupling of i_th interpolated var and j_th discrete var. More...
 

Detailed Description

Definition at line 35 of file fem_operator_matrix.h.

Constructor & Destructor Documentation

MAST::FEMOperatorMatrix::FEMOperatorMatrix ( )

Definition at line 24 of file fem_operator_matrix.cpp.

MAST::FEMOperatorMatrix::~FEMOperatorMatrix ( )
virtual

Definition at line 33 of file fem_operator_matrix.cpp.

Here is the call graph for this function:

Member Function Documentation

void MAST::FEMOperatorMatrix::clear ( )
inline

clears the data structures

Definition at line 187 of file fem_operator_matrix.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T >
void MAST::FEMOperatorMatrix::left_multiply ( T &  r,
const T &  m 
) const
inline

[R] = [M] * [this]

Definition at line 415 of file fem_operator_matrix.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T >
void MAST::FEMOperatorMatrix::left_multiply_transpose ( T &  r,
const T &  m 
) const
inline

[R] = [M] * [this]^T

Definition at line 442 of file fem_operator_matrix.h.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int MAST::FEMOperatorMatrix::m ( ) const
inline

Definition at line 50 of file fem_operator_matrix.h.

Here is the caller graph for this function:

unsigned int MAST::FEMOperatorMatrix::n ( ) const
inline

Definition at line 52 of file fem_operator_matrix.h.

Here is the call graph for this function:

Here is the caller graph for this function:

void MAST::FEMOperatorMatrix::print ( std::ostream &  o)
inline

Definition at line 166 of file fem_operator_matrix.h.

Here is the caller graph for this function:

void MAST::FEMOperatorMatrix::reinit ( unsigned int  n_interpolated_vars,
unsigned int  n_discrete_vars,
unsigned int  n_discrete_dofs_per_var 
)
inline

this initializes the operator for number of rows and variables, assuming that all variables has the same number of dofs.

This is typically the case for structural strain operator matrices. Note that when this method is used the user must set the matrix entries by calling set_shape_functions

Definition at line 210 of file fem_operator_matrix.h.

Here is the call graph for this function:

void MAST::FEMOperatorMatrix::reinit ( unsigned int  n_interpolated_vars,
const RealVectorX shape_func 
)
inline

this initializes all variables to use the same interpolation function.

It is assumed that the number of discrete vars is same as the number of interpolated vars. This is typically the case for fluid elements and for structural element inertial matrix calculations

Definition at line 256 of file fem_operator_matrix.h.

Here is the call graph for this function:

template<typename T >
void MAST::FEMOperatorMatrix::right_multiply ( T &  r,
const T &  m 
) const
inline

[R] = [this] * [M]

Definition at line 327 of file fem_operator_matrix.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T >
void MAST::FEMOperatorMatrix::right_multiply_transpose ( T &  r,
const T &  m 
) const
inline

[R] = [this]^T * [M]

Definition at line 355 of file fem_operator_matrix.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T >
void MAST::FEMOperatorMatrix::right_multiply_transpose ( T &  r,
const MAST::FEMOperatorMatrix m 
) const
inline

[R] = [this]^T * [M]

Definition at line 382 of file fem_operator_matrix.h.

Here is the call graph for this function:

void MAST::FEMOperatorMatrix::set_shape_function ( unsigned int  interpolated_var,
unsigned int  discrete_var,
const RealVectorX shape_func 
)
inline

sets the shape function values for the block corresponding to interpolated_var and discrete_var.

This means that the row interpolated_var, the value in columns discrete_vars*n_discrete_dofs_per_var - (discrete_vars+1)*n_discrete_dofs_per_var-1) will be set equal to shape_func .

Definition at line 228 of file fem_operator_matrix.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T >
void MAST::FEMOperatorMatrix::vector_mult ( T &  res,
const T &  v 
) const
inline

res = [this] * v

Definition at line 280 of file fem_operator_matrix.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T >
void MAST::FEMOperatorMatrix::vector_mult_transpose ( T &  res,
const T &  v 
) const
inline

res = v^T * [this]

Definition at line 303 of file fem_operator_matrix.h.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

unsigned int MAST::FEMOperatorMatrix::_n_discrete_vars
protected

number of discrete variables in the system

Definition at line 145 of file fem_operator_matrix.h.

unsigned int MAST::FEMOperatorMatrix::_n_dofs_per_var
protected

number of dofs for each variable

Definition at line 150 of file fem_operator_matrix.h.

unsigned int MAST::FEMOperatorMatrix::_n_interpolated_vars
protected

number of rows of the operator

Definition at line 140 of file fem_operator_matrix.h.

std::vector<RealVectorX*> MAST::FEMOperatorMatrix::_var_shape_functions
protected

stores the shape function values that defines the coupling of i_th interpolated var and j_th discrete var.

Stored in column major format. nullptr, if values are zero, otherwise the value is set in the vector.

Definition at line 158 of file fem_operator_matrix.h.


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