[MBDyn-users] Blender+MBDyn-0.4.7_with_NetCDF_Interface-0.0.1.zip

doug at baldwintechnology.com doug at baldwintechnology.com
Tue May 10 17:22:24 CEST 2011


Looks good. Packaging NetCDF in a separate Python module is smart. As for
performance, I'd suggest first testing Python standalone for various
formats, block sizes, etc, assuming you later will write a C++ routine to
create such a data format. A better approach might be to compile in C++ a
Python module that presents the data to Python from C++ managed memory. As
you progress, test the Python code inside of Blender to see any
performance impacts or functional issues, especially if shared memory with
C++ is an option.

By the way, Python has an iterate() method, which is nice for traversing
AND indexing a list of objects (no need to keep track of a count++). I
expect we'll be able to seamlessly integrate into the import_mov and
display methods calls to your NetCDF module.


> Hi Doug,
> hello MBDyn users,
> please find attached version 0.4.7 of your scripts with a first draft of a
> Python NetCDF-interface included.
> I'm using the NetCDF-IO-routines included in  SciPy  .
> The interface is working on my machine but only on modified MBDyn - ".nc"
> - files that have no empty character variables
> any more. With unmodified MBDyn NetCDF output the  SciPy  routines fail
> for some unknown reason, though they should not:
> I checked  the .nc  files created from MBDyn  with  'ncdump'  and
> 'ncBrowse'  and both programs had no problem in
> reading (and displaying) the files, so it must be something specific to
> SciPy's  NetCDF routines.
> The variables causing the problems in MBDyn's .nc files are in the
> variables section e.g.
> variable:
>    ...
>    char node.struct.12(vec1) ;
>       node.struct.1:type = "dynamic" ;
> while in the data section the variable's data are empty (..what should be
> allowed in principal)
> data:
>    ...
>    node.struct.0 = "" ;
> Removing these variables from the .nc file fixed the problem (can be done
> using 'ncdump' or 'ncdump4mbdyn' and 'ncgen').
> Having removed these import is working also as either DOUBLE or FLOAT and
> even on larger files with many steps and variables.
> Maybe it's better/safer to change MBDyn's .nc output and rather define
> these informal kind of data as global attributes instead of variables,
> as the variables in MBDyn's nc-output should be more related to be
> time-dependent (i.e. having dimension 'time') in contrast to the char-vars
> which only reflect the structural node's type (dynamic/static).
> Another point that disappointed me is that I found the binary import in
> Python to be rather slow.
> Can you tell me if you get the same (bad) performance ?
> Best regards,
> Patrick.
> ________________________________
> Diese E-Mail enth?lt vertrauliche und/oder rechtlich gesch?tzte
> Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
> irrt?mlich erhalten haben, informieren Sie bitte umgehend den Absender und
> l?schen Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte
> Weitergabe der in dieser E-Mail enthaltenen Daten ist nicht gestattet. Wie
> Sie wissen, kann die Sicherheit von ?bermittlungen per E-Mail nicht
> gew?hrleistet werden, E-Mails k?nnen missbr?uchlich unter fremdem Namen
> erstellt oder ver?ndert werden. Aus diesem Grund bitten wir um Verst?ndnis
> daf?r, dass wir zu Ihrem und unserem Schutz die rechtliche Verbindlichkeit
> der vorstehenden Erkl?rungen ausschlie?en m?ssen. Diese Regelung gilt nur
> dann nicht, wenn wir mit Ihnen eine anderweitige schriftliche Vereinbarung
> ?ber die Einhaltung von Sicherheits- und Verschl?sselungsstandards
> getroffen haben.
> This e-mail contains confidential and/or privileged information. If you
> are not the intended recipient (or have received this e-mail in error)
> please notify the sender immediately and delete this e-mail. Any
> unauthorised copying, disclosure or distribution of the material in this
> e-mail is strictly forbidden. As you know, the security of e-mail
> transmissions can not be guaranteed. E-mails can be misused to be written
> or modified under false names. For that reason, we ask you to understand
> the necessity for us to rule out the legal obligation of the above
> statement, for your protection and ours. This regulation is only invalid
> if we have concluded a special written agreement with you about the
> compliance with security and encryption standards.
> REpower Systems AG Sitz: Hamburg Vorstand: Andreas Nauen (Vorsitz), Gregor
> Gn?dig, Derrick Noe, Matthias Schubert
> Aufsichtsratsvorsitzender: Tulsi Tanti Registergericht: AG Hamburg (Mitte)
> HRB Nr.: 75543

More information about the MBDyn-users mailing list