qewton.geometries.continuous package

Module contents

Subpackages

Submodules

qewton.geometries.continuous.base module

class qewton.geometries.continuous.base.ContinuousGeometry(variable: Variable, shape: tuple[int | None, ...] | ~types.EllipsisType=Ellipsis, backend: type[ComputingBackend[TensorType]] = <class 'qewton.backends.base.DeepLearningBackend'>)[source]

Bases: Geometry[TensorType]

The parent class for all built-in continuous geometries. Can be used just like any other Geometry. They are allow for operations like union, intersection and cut with other continuous geometries. The are essentially Constructive Solid Geometry (CSG) objects, only defined by a small amount of parameters.

A continuous geometry can be discretized by creating a mesh.

create_boundary()[source]

Create the boundary of this geometry.

Returns:

A new boundary geometry.

Return type:

BoundaryGeometry

Raises:

NotImplementedError – If the geometry has no boundary implementation.

class qewton.geometries.continuous.base.ContinuousBoundaryGeometry(geometry)[source]

Bases: BoundaryGeometry[TensorType]

create_mesh(max_vertex_distance: float | None = None, device: Device = CPU())[source]

Mesh this geometry into a mesh geometry.

Parameters:
  • max_vertex_distance – The maximum distance between mesh vertices, which controls how fine the mesh is.

  • device – The device the mesh is created on.

Returns:

The meshed geometry.

Return type:

DiscreteGeometry

Raises:

NotImplementedError – If the geometry does not support meshing.

create_boundary()[source]

Raise, since a boundary has no boundary.

Raises:

NotImplementedError – Always.