[MOAB-dev] r5517 - MOAB/trunk/src/io
tautges at mcs.anl.gov
tautges at mcs.anl.gov
Sat May 12 13:13:50 CDT 2012
Author: tautges
Date: 2012-05-12 13:13:50 -0500 (Sat, 12 May 2012)
New Revision: 5517
Modified:
MOAB/trunk/src/io/WriteDamsel.cpp
Log:
Updating damsel writer to latest damsel syntax.
Modified: MOAB/trunk/src/io/WriteDamsel.cpp
===================================================================
--- MOAB/trunk/src/io/WriteDamsel.cpp 2012-05-11 16:38:51 UTC (rev 5516)
+++ MOAB/trunk/src/io/WriteDamsel.cpp 2012-05-12 18:13:50 UTC (rev 5517)
@@ -212,7 +212,7 @@
DAMSEL_HANDLE_COLLECTION_TYPE_VECTOR);
// make a damsel collection
- dseth = DMSLcontainer_tree_create(dmslModel, (damsel_handle_ptr)&seth, coll_type);
+ dseth = DMSLcontainer_tree_create(dmslModel, coll_type);
if (DAMSEL_CONTAINER_INVALID == dseth) CHK_MB_ERR_2(MB_FAILURE, "Bad handle returned by Damsel for meshset %lu.", seth);
// get all the entities & add
@@ -250,8 +250,7 @@
// create a damsel container for these entity handles
damsel_container ent_cont;
- ent_cont = DMSLhandle_create_sequence(dmslModel, (damsel_handle)&ent_cont, (int)(end_ent-start_ent+1),
- start_ent, 1);
+ ent_cont = DMSLhandle_create_sequence(dmslModel, (int)(end_ent-start_ent+1), start_ent, 1);
if (DAMSEL_CONTAINER_INVALID == ent_cont)
CHK_MB_ERR(MB_FAILURE, "Bad sequence returned by Damsel.");
@@ -264,10 +263,6 @@
int num_connect = rsi.get_sequence()->values_per_entity();
assert(0 < num_connect);
- // define the entities to damsel
- err = DMSLentity_define(ent_cont, moab_to_damsel_entity_type[etype], num_connect);
- CHK_DMSL_ERR_2(err, "DMSLentity_define failed for entities starting with handle %lu.", rsi.get_start_handle());
-
// get the connectivity storage location and pass to damsel
Range ent_range(start_ent, end_ent);
int count;
@@ -279,19 +274,16 @@
CHK_MB_ERR_2(MB_FAILURE, "Entity subrange not in the same sequence for entities starting with handle %lu.",
rsi.get_start_handle());
- damsel_container conn_cont = DMSLhandle_create_vector(dmslModel, (damsel_handle) &conn_cont,
+ damsel_container conn_cont = DMSLhandle_create_vector(dmslModel,
count*verts_per_ent, (damsel_handle*)connect);
+ // define the entities to damsel
+ err = DMSLentity_define(ent_cont, moab_to_damsel_entity_type[etype], num_connect, conn_cont);
+ CHK_DMSL_ERR_2(err, "DMSLentity_define failed for entities starting with handle %lu.", rsi.get_start_handle());
+
// NOTE: THE FOLLOWING CALL SHOULDN'T BE NEEDED AFTER BEN FIXES WRITING SEQUENCES/VECTORS TO FILE
err = DMSLmodel_map_handles_inventing_file_handles(conn_cont);
- err = DMSLentity_set_connectivity(ent_cont, conn_cont);
- CHK_DMSL_ERR(err, "Failure creating connectivity vector container.");
More information about the moab-dev
mailing list