proteus.Domain module
A class hierarchy and tools for building domains of PDE’s.
- class proteus.Domain.D_base(nd, name='defaultDomain', units='m')[source]
Bases:
objectThe base class for domains
Set dimensions (nd), name string, and units string
- writeAsymptote(fileprefix)[source]
Write a representation of the domain to file using the Asymptote vector graphics language.
- writeGeo(fileprefix, group_names=False, he_max=None)[source]
Writes a Gmsh .geo file based on the geometrical information of the Domain.
- Parameters:
fileprefix (str) – Name of the file to save (prefix without .geo)
group_names (Optional[bool]) – True to write name of physical groups in .geo (default: False)
he_max (Optional[double]) – Size of the maximum characteristic element size. Should be set for meshes using a uniform refinement.
lc (Optional[double]) – target mesh size
- gmsh2proteus(geofile, BC_class)[source]
Populates the boundaryTags and BC dictionaries of the domain by importing tag and flags from .geo file.
- Parameters:
geofile (str) – Name of the geofile
BC_class (proteus.BoundaryConditions.BC_Base) – Bounday Conditions class to populate BC dictionaries
- class proteus.Domain.RectangularDomain(L=[1.0, 1.0, 1.0], x=[0.0, 0.0, 0.0], name='DefaultRectangularDomain', units='m')[source]
Bases:
D_baseRectangular domains in 1,2, or 3D specified by the lower left hand corner and dimensions.
Set dimensions (nd), name string, and units string
- proteus.Domain.unitSimplex(nd=2)[source]
Builds a 2 or 3 dimension reference element.
- Parameters:
nd (int) – The elements dimension (must be 2 or 3)
- Return type:
reference_element
- class proteus.Domain.GMSH_3D_Domain(geofile, he, name='GMSH_Domain', units='m', length_scale=1.0, permute_dims=[0, 1, 2])[source]
Bases:
D_baseA domain described by a gmsh .geo file
- Parameters:
Set dimensions (nd), name string, and units string
- class proteus.Domain.PlanarStraightLineGraphDomain(fileprefix=None, vertices=None, segments=None, facets=None, holes=None, regions=None, vertexFlags=None, segmentFlags=None, regionFlags=None, regionConstraints=None, bc=None, name='DefaultPSLGDomain', units='m')[source]
Bases:
D_base2D domains described by planar straight line graphs.
Construct the PSLG from lists of vertices, segments, etc. If no vertex or segment flags are given, then they are assigned as zero.
- class proteus.Domain.InterpolatedBathymetryDomain(fileprefix=None, vertices=None, segments=None, holes=None, regions=None, vertexFlags=None, segmentFlags=None, regionFlags=None, name='DefaultInterpolatedBathymetry', units='m', bathy=None, bathyGridDim=None)[source]
Bases:
PlanarStraightLineGraphDomain2D domains with an attached bathymetry data set. Meshes are generated by locally refining the PSLG until the interpolation error for a bathymetry point cloud meets a prescribed tolerance.
Intial support measures interpolation error in the \(L_{\infty}\) norm.
Construct the PSLG from lists of vertices, segments, etc. If no vertex or segment flags are given, then they are assigned as zero.
- class proteus.Domain.TriangulatedSurfaceDomain(vertices, triangles, name='DefaultTriangulatedSurfaceDomain', units='m')[source]
Bases:
D_base3D domains described by closed surfaces made up of triangular facets.
Set dimensions (nd), name string, and units string
- class proteus.Domain.Mesh2DMDomain(fileprefix)[source]
Bases:
D_base2D domains from ADH mesh files
Set dimensions (nd), name string, and units string
- class proteus.Domain.Mesh3DMDomain(fileprefix)[source]
Bases:
D_base3D domains from ADH mesh files
Set dimensions (nd), name string, and units string
- class proteus.Domain.MeshHexDomain(fileprefix)[source]
Bases:
D_base3D domains from Hex mesh files
Set dimensions (nd), name string, and units string
- class proteus.Domain.MeshTetgenDomain(fileprefix)[source]
Bases:
D_base3D domains from tetgen mesh files
Set dimensions (nd), name string, and units string
- class proteus.Domain.PUMIDomain(name='PUMIDomain', dim=3, manager=None)[source]
Bases:
D_base3d domains from PUMI mesh files
faceList – defines face classification in simmetrix mesh PUMIMesh – the MeshAdapt object
Set dimensions (nd), name string, and units string
- class proteus.Domain.PiecewiseLinearComplexDomain(fileprefix=None, vertices=None, facets=None, facetHoles=None, holes=None, regions=None, vertexFlags=None, facetFlags=None, regionFlags=None, regionConstraints=None, bc=None, name='PLCDomain', units='m')[source]
Bases:
D_base3D domains desribed by closed surfaces made up of general polygonal facets.
Read the PLC domain from lists. If no flags are given, then default flags of 0 are assigned.
- class proteus.Domain.ExtrudedTriangulation(tri, top_z, top_f, bottom_f)[source]
Bases:
PiecewiseLinearComplexDomainRead the PLC domain from lists. If no flags are given, then default flags of 0 are assigned.