Class MLSMeshInterpolation

Inheritance Relationships

Base Type

Class Documentation

class MLSMeshInterpolation : public pcms::InterpolationBase

Moving Least Square (MLS) Interpolation with adjacency search.

Supports two modes:

  • Vertex to Vertex interpolation between two meshes

  • Centroid to Vertex interpolation within a single mesh

Public Functions

virtual void eval(pcms::Rank1View<double, pcms::HostMemorySpace> source_field, pcms::Rank1View<double, pcms::HostMemorySpace> target_field) override

Evaluate the interpolation.

Note

User is responsible for ensuring that the source and target fields are sustained during the evaluation. The size of the source and target fields must match the sizes returned by getSourceSize() and getTargetSize() respectively.

Parameters:
  • source_field – The field to interpolate from

  • target_field – The field to interpolate to

MLSMeshInterpolation(Omega_h::Mesh &source_mesh, Omega_h::Mesh &target_mesh, double radius, unsigned min_req_supports = 10, unsigned degree = 3, bool adapt_radius = true, double lambda = 0.0, double decay_factor = 5.0)

Vertex to Vertex interpolation between two meshes.

For more details about MLS interpolation parameters, refer to the documentation of mls_interpolation and RadialBasisFunction.

@Note Both source and target meshes must have the same spatial dimension.

Parameters:
  • source_mesh – Source mesh

  • target_mesh – Target mesh

  • radius – The cutoff radius for the MLS interpolation

  • min_req_supports – Min number of source locations required (max is set to 3x min)

  • degree – The degree of the polynomial used in the MLS interpolation

  • adapt_radius – Whether to adapt the radius based on the local density

  • lambda – Regularization parameter for the MLS interpolation

  • decay_factor – Decay factor for the weight function in the MLS interpolation

MLSMeshInterpolation(Omega_h::Mesh &source_mesh, double radius, unsigned min_req_supports = 10, unsigned degree = 3, bool adapt_radius = true, double lambda = 0.0, double decay_factor = 5.0)

Centroid to Vertex interpolation within a single mesh.

For more details about MLS interpolation parameters, refer to the documentation of mls_interpolation and RadialBasisFunction.

Parameters:
  • source_mesh – The mesh to interpolate within

  • radius – The cutoff radius for the MLS interpolation

  • min_req_supports – Min number of source locations required (max is set to 3x min)

  • degree – The degree of the polynomial used in the MLS interpolation

  • adapt_radius – Whether to adapt the radius based on the local density

  • lambda – Regularization parameter for the MLS interpolation

  • decay_factor – Decay factor for the weight function in the MLS interpolation

virtual size_t getSourceSize() const override

Get the size of the source field.

Returns:

size_t The size of the source field

virtual size_t getTargetSize() const override

Get the size of the target field.

Returns:

size_t The size of the target field

inline SupportResults getSupports()