Example #1
0
////////////////////////////////////////////////////////////////////////////////
// 読み込み処理のメイン
cpm_ErrorCode
cpm_TextParserDomainLMR::ReadMain( std::string filename, S_OCT_DOMAIN_INFO &domainInfo )
{
  int errorcode = TP_NO_ERROR;

  // デフォルトの読み込み処理
  if( (errorcode = cpm_TextParser::Read( filename )) != TP_NO_ERROR )
  {
    return CPM_ERROR_TP_LMR_DOMAINFILE;
  }

  // Domainの読み込み
  if( (errorcode = ReadDomain( domainInfo )) != TP_NO_ERROR )
  {
    return CPM_ERROR_TP_LMR_DOMAIN;
  }

  // BCMTreeの読み込み
  if( (errorcode = ReadBCMTree( domainInfo, filename )) != TP_NO_ERROR )
  {
    return CPM_ERROR_TP_LMR_BCMTREE;
  }

  // LeafBlockの読み込み
  if( (errorcode = ReadLeafBlock( domainInfo )) != TP_NO_ERROR )
  {
    return CPM_ERROR_TP_LMR_LEAFBLOCK;
  }

  return CPM_SUCCESS;
}
Example #2
0
        // \brief Read segments (and general MeshGraph) given TiXmlDocument.
        void MeshGraph2D::ReadGeometry(TiXmlDocument &doc)
        {
            // Read mesh first
            MeshGraph::ReadGeometry(doc);
            TiXmlHandle docHandle(&doc);

            TiXmlElement* mesh = NULL;

            /// Look for all geometry related data in GEOMETRY block.
            mesh = docHandle.FirstChildElement("NEKTAR").FirstChildElement("GEOMETRY").Element();

            ASSERTL0(mesh, "Unable to find GEOMETRY tag in file.");
            
            ReadCurves(doc);
            ReadEdges(doc);
            ReadElements(doc);
            ReadComposites(doc);
            ReadDomain(doc);
        }