本文整理汇总了C++中CFieldWorld::IsIdNA方法的典型用法代码示例。如果您正苦于以下问题:C++ CFieldWorld::IsIdNA方法的具体用法?C++ CFieldWorld::IsIdNA怎么用?C++ CFieldWorld::IsIdNA使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFieldWorld
的用法示例。
在下文中一共展示了CFieldWorld::IsIdNA方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddPattern_Field
// 対角にパターンを追加
bool CZLinearSystem::AddPattern_Field(const unsigned int id_field, const CFieldWorld& world)
{
if( !world.IsIdField(id_field) ) return false;
const CField& field = world.GetField(id_field);
unsigned int id_field_parent;
{
if( field.GetIDFieldParent() == 0 ){ id_field_parent = id_field; }
else{ id_field_parent = field.GetIDFieldParent(); }
}
unsigned int nlen_value;
{ // 複素数の場合は2で割る
const unsigned int nlen = field.GetNLenValue();
assert( nlen % 2 == 0 );
nlen_value = nlen / 2;
}
int ESType2iLS[3];
{ // Bubbleブロックを作る
unsigned int id_na_val = field.GetNodeSegInNodeAry(BUBBLE).id_na_va;
if( id_na_val != 0 ){
assert( world.IsIdNA(id_na_val) );
const CNodeAry& na = world.GetNA(id_na_val);
CLinSysSeg seg;
{
seg.id_field = id_field_parent; seg.node_config = BUBBLE;
seg.len=nlen_value; seg.nnode=na.Size();
}
ESType2iLS[2] = this->AddLinSysSeg(seg);
}
else{ ESType2iLS[2] = -1; }
}
{ // Edgeブロックを作る
unsigned int id_na_val = field.GetNodeSegInNodeAry(EDGE).id_na_va;
if( id_na_val != 0 ){
assert( world.IsIdNA(id_na_val) );
const CNodeAry& na = world.GetNA(id_na_val);
CLinSysSeg seg;
{
seg.id_field = id_field_parent; seg.node_config = EDGE;
seg.len=nlen_value; seg.nnode=na.Size();
}
ESType2iLS[1] = this->AddLinSysSeg(seg);
}
else{ ESType2iLS[1] = -1; }
}
{ // Cornerブロックを作る
unsigned int id_na_val = field.GetNodeSegInNodeAry(CORNER).id_na_va;
if( id_na_val != 0 ){
assert( world.IsIdNA(id_na_val) );
const CNodeAry& na = world.GetNA(id_na_val);
CLinSysSeg seg;
{
seg.id_field = id_field_parent; seg.node_config = CORNER;
seg.len=nlen_value; seg.nnode=na.Size();
}
ESType2iLS[0] = this->AddLinSysSeg(seg);
}
else{ ESType2iLS[0] = -1; }
}
////////////////////////////////
const std::vector<unsigned int> aIdEA = field.GetAryIdEA();
if( aIdEA.size() == 0 ){ // 剛体モードのための行列
unsigned int ils0 = ESType2iLS[0];
if( m_Matrix_Dia[ils0] == 0 ){
m_Matrix_Dia[ils0] = new CZMatDia_BlkCrs(1, nlen_value);
}
return true;
}
for(unsigned int iiea=0;iiea<aIdEA.size();iiea++)
{
const unsigned int id_ea = aIdEA[iiea];
const CElemAry& ea = world.GetEA(id_ea);
// CORNER節点について
if( field.GetIdElemSeg(id_ea,CORNER,true,world) != 0 ){
assert( world.IsIdEA(id_ea) );
const unsigned int id_es_c = field.GetIdElemSeg(id_ea,CORNER,true,world);
assert( ea.IsSegID(id_es_c) );
const unsigned int ils0 = ESType2iLS[0];
this->AddMat_Dia(ils0, ea, id_es_c ); // cc行列を作る
if( field.GetIdElemSeg(id_ea,BUBBLE,true,world) != 0 ){ // CORNER-BUBBLE
const unsigned int id_es_b = field.GetIdElemSeg(id_ea,BUBBLE,true,world);
assert( ea.IsSegID(id_es_b) );
const unsigned int ils1 = ESType2iLS[2];
Com::CIndexedArray crs;
ea.MakePattern_FEM(id_es_c,id_es_b,crs);
assert( crs.CheckValid() );
this->AddMat_NonDia(ils0,ils1, crs); // cb行列を作る
const unsigned int nnode1 = m_aSeg[ils1].nnode;
Com::CIndexedArray crs_inv;
crs_inv.SetTranspose(nnode1,crs);
this->AddMat_NonDia(ils1,ils0, crs_inv); // bc行列を作る
}
if( field.GetIdElemSeg(id_ea,EDGE,true,world) != 0 ){ // CONRER-EDGE
const unsigned int id_es_e = field.GetIdElemSeg(id_ea,EDGE,true,world);
assert( ea.IsSegID(id_es_e) );
const unsigned int ils1 = ESType2iLS[1];
Com::CIndexedArray crs;
//.........这里部分代码省略.........