예제 #1
0
파일: Cgns.cs 프로젝트: xyuan/BoSSS
            internal Elements_t(Zone_t Owner, CgnsDriver cg, int index_file, int index_base, int index_zone, int index_section)
            {
                m_Owner = Owner;

                char[] secname = new char[1000];
                if (cg.section_read(index_file, index_base, index_zone, index_section, secname, out element_type, out start, out end, out nbndry, out parent_flag) != (int)Error.CG_OK)
                {
                    ThrowError(index_file, cg);
                }
                this.Name = secname.FromNullTermCharAry();

                ielem = new int[end - start + 1, element_type.NoOfNodes()];

                if (cg.elements_read2(index_file, index_base, index_zone, index_section, ielem, null) != (int)Error.CG_OK)
                {
                    ThrowError(index_file, cg);
                }
            }
예제 #2
0
파일: Cgns.cs 프로젝트: xyuan/BoSSS
            internal BC_t(Zone_t Owner, CgnsDriver cg, int index_file, int index_base, int index_zone, int index_bc)
            {
                m_Owner = Owner;

                char[] boconame = new char[1000];
                normal_index = new int[3];
                int        normal_list_flag, nbcelement, ndataset; // bc definition
                DataType_t data_type;

                if (cg.boco_info(index_file, index_base, index_zone, index_bc, boconame, out bc_type, out pointset_type, out nbcelement, normal_index, out normal_list_flag, out data_type, out ndataset) != (int)Error.CG_OK)
                {
                    ThrowError(index_file, cg);
                }
                Name = boconame.FromNullTermCharAry();

                bcelement = new int[nbcelement];
                if (cg.boco_read1(index_file, index_base, index_zone, index_bc, bcelement, null) != (int)Error.CG_OK)
                {
                    ThrowError(index_file, cg);
                }
            }