[MOAB-dev] Fwd: MOAB Help

Jason Kraftcheck kraftche at cae.wisc.edu
Thu Jun 24 07:24:55 CDT 2010


> 
> -------- Original Message --------
> Subject: MOAB Help
> Date: Tue, 22 Jun 2010 09:31:02 -0600
> From: Stanfield, Paul <pstanfi at sandia.gov>
> To: 'Tim Tautges' <tautges at mcs.anl.gov>
> 
> I was trying to create a tag and I am having some trouble. It doesn't
> seem to like the inputs I'm giving it.
> 
> ---------------------------------------------------------------------------------------------------------
> 
>    moab::Core moab;
>    moab::Interface& mb = moab;
>    moab::ErrorCode rval;
>    moab::Tag energy;
>    double def_val = 1.00;
>    double new_val=10.00;
> 
> 
> 
> rval=mb.tag_create("ENERGY", int(sizeof(double)), MB_TAG_DENSE,
> MB_TYPE_DOUBLE, energy, &def_val);
> /*(            const char* name,
>                const int size,
>                const TagType storage,
>                const DataType data,
>                      Tag& handle,
>                const void* def_val,
>                      bool use_existing = false ) = 0;
> */
> 
> KDMain.C(66): error: no instance of overloaded function
> "moab::Interface::tag_create" matches the argument list
>             argument types are: (const char [7], int, TagType, DataType,
> moab::Tag, double *)
  ^
  |
  +--- This looks wrong.  Why does the compiler want to pass this by copy
       rather than by reference?  Are you sure it isn't declared as const
       or something?


>             object type is: moab::Interface
>   rval=mb.tag_create("ENERGY", int(sizeof(double)), MB_TAG_DENSE,
> MB_TYPE_DOUBLE, energy, &def_val);



More information about the moab-dev mailing list