示例#1
0
文件: MoabMesh.C 项目: ChaliZhg/moose
//---------------------------------------------------------------------------//
void MoabMesh::tag(std::string var_name, const ArrayField& data)
{
    assert( data.size() == d_vertices.size() );

    moab::ErrorCode error;
    moab::Tag tag;

    error = d_moab->tag_get_handle( var_name.c_str(), 1, moab::MB_TYPE_DOUBLE,
				    tag, moab::MB_TAG_CREAT|moab::MB_TAG_DENSE );
    assert( error == moab::MB_SUCCESS );

    error = d_moab->tag_set_data( tag,
				  d_vertices.getRawPtr(),
				  d_vertices.size(),
				  &data[0] );
    assert( error == moab::MB_SUCCESS );
}
 static inline const_iterator end( const ArrayField& field )
 { return field.end(); }
 static inline iterator end( ArrayField& field )
 { return field.end(); }
 static inline const_iterator begin( const ArrayField& field )
 { return field.begin(); }
 static inline iterator begin( ArrayField& field )
 { return field.begin(); }
 static inline bool empty( const ArrayField& field )
 { return field.empty(); }
 static inline size_type size( const ArrayField& field )
 { return field.size(); }
 static inline size_type dim( const ArrayField& field )
 { return field.dim(); }