def __init__(self,classid='<STR_LIT:0>',components=None,comments=None):
if components is None:<EOL><INDENT>components = dict(positions=None,connections=None,data=None)<EOL><DEDENT>if comments is None:<EOL><INDENT>comments = ['<STR_LIT>',<EOL>'<STR_LIT>']<EOL><DEDENT>elif type(comments) is not list:<EOL><INDENT>comments = [str(comments)]<EOL><DEDENT>self.id = classid       <EOL>self.name = '<STR_LIT>'<EOL>self.component = None   <EOL>self.components = components<EOL>self.comments= comments<EOL>
OpenDX object, which is build from a list of components.

        Parameters
        ----------

        id : str
               arbitrary string
        components : dict
               dictionary of DXclass instances (no sanity check on the
               individual ids!) which correspond to

               * positions
               * connections
               * data

        comments : list
               list of strings; each string becomes a comment line
               prefixed with '#'. Avoid newlines.


        A field must have at least the components 'positions',
        'connections', and 'data'. Those components are associated
        with objects belonging to the field. When writing a dx file
        from the field, only the required objects are dumped to the file.

        (For a more general class that can use field:
        Because there could be more objects than components, we keep a
        separate object list. When dumping the dx file, first all
        objects are written and then the field object describes its
        components. Objects are referenced by their unique id.)

        .. Note:: uniqueness of the *id* is not checked.


        Example
        -------
        Create a new dx object::

           dx = OpenDX.field('density',[gridpoints,gridconnections,array])