SyFi 0.3
|
#include <Dof.h>
Public Member Functions | |
Dof (bool create_glob2dof=false, bool create_glob2loc=false) | |
~Dof () | |
void | clear () |
unsigned int | insert_dof (unsigned int e, unsigned int i, GiNaC::ex Li) |
unsigned int | size () const |
unsigned int | num_elements () const |
unsigned int | max_dofs_per_element () const |
unsigned int | glob_dof (unsigned int e, unsigned int i) |
unsigned int | glob_dof (GiNaC::ex Lj) |
GiNaC::ex | glob_dof (unsigned int j) |
vector_ii | glob2loc (unsigned int j) |
def | __init__ |
def | clear |
def | insert_dof |
def | size |
def | num_elements |
def | max_dofs_per_element |
def | glob_dof |
def | glob2loc |
Public Attributes | |
this | |
Protected Attributes | |
unsigned int | counter |
unsigned int | emax |
unsigned int | imax |
std::map< std::pair< unsigned int, unsigned int >, unsigned int > | loc2glob |
bool | create_glob2loc |
std::map< unsigned int, vector_ii > | glob2loc_map |
std::map< GiNaC::ex, unsigned int, GiNaC::ex_is_less > | dof2glob |
bool | create_glob2dof |
std::map< unsigned int, GiNaC::ex > | glob2dof |
Static Private Attributes | |
dictionary | __swig_setmethods__ = {} |
tuple | __setattr__ = lambdaself,name,value:_swig_setattr(self, Dof, name, value) |
dictionary | __swig_getmethods__ = {} |
tuple | __getattr__ = lambdaself,name:_swig_getattr(self, Dof, name) |
__repr__ = _swig_repr | |
__swig_destroy__ = _SyFi.delete_Dof | |
__del__ = lambdaself:None; |
SyFi::Dof::Dof | ( | bool | create_glob2dof = false , |
bool | create_glob2loc = false |
||
) | [inline] |
Definition at line 51 of file Dof.h.
: counter(0), emax(0), imax(0), create_glob2loc(create_glob2loc), create_glob2dof(create_glob2dof) { }
def SyFi::Dof::__init__ | ( | self, | |
create_glob2dof = False , |
|||
create_glob2loc = False |
|||
) |
__init__(self, bool create_glob2dof = False, bool create_glob2loc = False) -> Dof __init__(self, bool create_glob2dof = False) -> Dof __init__(self) -> Dof
Definition at line 2220 of file SyFi.py.
02220 : 02221 """ 02222 __init__(self, bool create_glob2dof = False, bool create_glob2loc = False) -> Dof 02223 __init__(self, bool create_glob2dof = False) -> Dof 02224 __init__(self) -> Dof 02225 """ 02226 this = _SyFi.new_Dof(create_glob2dof, create_glob2loc) 02227 try: self.this.append(this) 02228 except: self.this = this
void SyFi::Dof::clear | ( | ) |
def SyFi::Dof::clear | ( | self | ) |
def SyFi::Dof::glob2loc | ( | self, | |
args | |||
) |
vector_ii SyFi::Dof::glob2loc | ( | unsigned int | j | ) |
Definition at line 124 of file Dof.cpp.
Referenced by main().
{ if ( !create_glob2loc ) { throw std::runtime_error("This structure has not been created, you must turn on the create_glob2loc flag before initialization!"); } return glob2loc_map[j]; }
GiNaC::ex SyFi::Dof::glob_dof | ( | unsigned int | j | ) |
Definition at line 105 of file Dof.cpp.
{ if ( !create_glob2dof ) { throw std::runtime_error("This structure has not been created, you must turn on the create_glob2dof flag before initialization!"); } std::map<unsigned int, GiNaC::ex>::iterator iter = glob2dof.find(j); if ( iter == glob2dof.end() ) { //throw std::runtime_error("In glob_dof(j): Not found"); std::cerr << "In glob_dof(j): Not found" << std::endl; return GiNaC::ex(); } return iter->second; }
def SyFi::Dof::glob_dof | ( | self, | |
args | |||
) |
glob_dof(self, unsigned int e, unsigned int i) -> unsigned int glob_dof(self, GiNaC::ex Lj) -> unsigned int glob_dof(self, unsigned int j) -> GiNaC::ex
unsigned int SyFi::Dof::glob_dof | ( | unsigned int | e, |
unsigned int | i | ||
) |
Definition at line 78 of file Dof.cpp.
References run_all::res.
Referenced by SyFi::compute_mixed_Poisson_element_matrix(), compute_nlconvdiff_element_matrix(), SyFi::compute_Poisson_element_matrix(), compute_Poisson_element_matrix(), SyFi::compute_Stokes_element_matrix(), and main().
unsigned int SyFi::Dof::glob_dof | ( | GiNaC::ex | Lj | ) |
unsigned int SyFi::Dof::insert_dof | ( | unsigned int | e, |
unsigned int | i, | ||
GiNaC::ex | Li | ||
) |
Definition at line 23 of file Dof.cpp.
References test::e, and SyFi::p.
Referenced by SyFi::compute_mixed_Poisson_element_matrix(), compute_nlconvdiff_element_matrix(), SyFi::compute_Poisson_element_matrix(), compute_Poisson_element_matrix(), SyFi::compute_Stokes_element_matrix(), and main().
{ if (e > emax) emax = e; if (i > imax) imax = i; unsigned int return_dof; // check if the dof is new, if so // update counter, dof2glob and create // a new vector in glob2loc_map std::map< GiNaC::ex, unsigned int, GiNaC::ex_is_less >::iterator index_iter = dof2glob.find(Li); if( index_iter == dof2glob.end() ) { // define a new dof return_dof = counter; // count inserted global indices counter++; // the central "D -> global index" map dof2glob[Li] = return_dof; if ( create_glob2dof ) { std::pair<unsigned int, GiNaC::ex> p(return_dof, Li); glob2dof.insert(p); } if ( create_glob2loc ) { // initialize with empty vector glob2loc_map[return_dof] = vector_ii(); glob2loc_map[return_dof].reserve(imax); } } else // dof is not new { return_dof = index_iter->second; } // loc2glob should always be updated pair_ii index(e, i); loc2glob[index] = return_dof; // insert (e,i) in glob2loc_map[Li] if ( create_glob2loc ) { glob2loc_map[return_dof].push_back(index); } return return_dof; }
def SyFi::Dof::insert_dof | ( | self, | |
args | |||
) |
def SyFi::Dof::max_dofs_per_element | ( | self | ) |
unsigned int SyFi::Dof::max_dofs_per_element | ( | ) | const [inline] |
unsigned int SyFi::Dof::num_elements | ( | ) | const [inline] |
def SyFi::Dof::num_elements | ( | self | ) |
unsigned int SyFi::Dof::size | ( | ) | const [inline] |
def SyFi::Dof::size | ( | self | ) |
SyFi::Dof::__del__ = lambdaself:None; [static, private] |
tuple SyFi::Dof::__getattr__ = lambdaself,name:_swig_getattr(self, Dof, name) [static, private] |
SyFi::Dof::__repr__ = _swig_repr [static, private] |
tuple SyFi::Dof::__setattr__ = lambdaself,name,value:_swig_setattr(self, Dof, name, value) [static, private] |
SyFi::Dof::__swig_destroy__ = _SyFi.delete_Dof [static, private] |
dictionary SyFi::Dof::__swig_getmethods__ = {} [static, private] |
dictionary SyFi::Dof::__swig_setmethods__ = {} [static, private] |
unsigned int SyFi::Dof::counter [protected] |
bool SyFi::Dof::create_glob2dof [protected] |
bool SyFi::Dof::create_glob2loc [protected] |
std::map<GiNaC::ex , unsigned int, GiNaC::ex_is_less > SyFi::Dof::dof2glob [protected] |
unsigned int SyFi::Dof::emax [protected] |
Definition at line 28 of file Dof.h.
Referenced by num_elements().
std::map< unsigned int, GiNaC::ex > SyFi::Dof::glob2dof [protected] |
std::map< unsigned int, vector_ii > SyFi::Dof::glob2loc_map [protected] |
unsigned int SyFi::Dof::imax [protected] |
Definition at line 31 of file Dof.h.
Referenced by max_dofs_per_element().
std::map<std::pair<unsigned int,unsigned int>, unsigned int> SyFi::Dof::loc2glob [protected] |