scimba_torch.integration.mesh_based_quadrature

Implements the rectangle method for cube-like domains.

Classes

RectangleMethod(domain, **kwargs)

Implements the rectangle method for cube-like domains.

class RectangleMethod(domain, **kwargs)[source]

Bases: object

Implements the rectangle method for cube-like domains.

This sampler manages a primary volumetric sampler. At the moment, boundary samplers are not supported.

Parameters:
  • domain (Cuboid) – The volumetric domain to sample.

  • **kwargs (Any) – Additional configuration options.

domain

The volumetric domain to be sampled.

sample(n)[source]

Get equidistant points in the domain.

Parameters:

n (int) – The number of points.

Return type:

LabelTensor

Returns:

The points.

bc_sample(n)[source]

Get equidistant points on the domain boundary.

Parameters:

n (int) – The number of points.

Return type:

LabelTensor

Returns:

The points.

Raises:

NotImplementedError – Boundary sampling is not supported for the rectangle method.