Ejemplo n.º 1
0
 def from_file(filename):
     """
     filename : str
         The name of the IGA domain file.
     """
     data = io.read_iga_data(filename)
     name = op.splitext(filename)[0]
     return IGDomain.from_data(*(data + (name,)))
Ejemplo n.º 2
0
 def from_file(filename):
     """
     filename : str
         The name of the IGA domain file.
     """
     data = io.read_iga_data(filename)
     name = op.splitext(filename)[0]
     return IGDomain.from_data(*(data + (name, )))
Ejemplo n.º 3
0
    def read_domain_from_hdf5(fd, group):
        """
        Create a domain from the given hdf5 data group.

        fd: tables.File
            HDF5 file handle to read the mesh from.
        group: tables.group.Group
            HDF5 data group (of file fd) to read the mesh from.
        """
        data = io.read_iga_data(fd, group)
        return IGDomain.from_data(*data)
Ejemplo n.º 4
0
    def read_domain_from_hdf5(fd, group):
        """
        Create a domain from the given hdf5 data group.

        fd: tables.File
            HDF5 file handle to read the mesh from.
        group: tables.group.Group
            HDF5 data group (of file fd) to read the mesh from.
        """
        data = io.read_iga_data(fd, group)
        return IGDomain.from_data(*data)
Ejemplo n.º 5
0
    def from_file(filename):
        """
        filename : str
            The name of the IGA domain file.
        """
        (knots, degrees, cps, weights, cs, conn,
         bcps, bweights, bconn, regions) = io.read_iga_data(filename)

        nurbs = NurbsPatch(knots, degrees, cps, weights, cs, conn)
        bmesh = Struct(name='bmesh', cps=bcps, weights=bweights, conn=bconn)

        name = op.splitext(filename)[0]
        domain = IGDomain(name, nurbs=nurbs, bmesh=bmesh, regions=regions)
        return domain
Ejemplo n.º 6
0
    def from_file(filename):
        """
        filename : str
            The name of the IGA domain file.
        """
        (knots, degrees, cps, weights, cs, conn, bcps, bweights, bconn,
         regions) = io.read_iga_data(filename)

        nurbs = NurbsPatch(knots, degrees, cps, weights, cs, conn)
        bmesh = Struct(name='bmesh', cps=bcps, weights=bweights, conn=bconn)

        name = op.splitext(filename)[0]
        domain = IGDomain(name, nurbs=nurbs, bmesh=bmesh, regions=regions)
        return domain