Lagrange
Loading...
Searching...
No Matches
SmoothDirectionFieldOptions Struct Reference

Options for compute_smooth_direction_field(). More...

#include <lagrange/polyddg/compute_smooth_direction_field.h>

Public Attributes

uint8_t nrosy = 4
 Symmetry order of the direction field (e.g.
 
AttributeElement output_element_type = AttributeElement::Vertex
 Controls where the output direction field is stored.
 
double lambda = 1.0
 Stabilization weight for the VEM projection term in the connection Laplacian (vertex-based path only).
 
std::string_view alignment_attribute = ""
 Name of an alignment constraint attribute used as soft constraints.
 
std::optional< std::string_view > direction_field_attribute
 Output attribute name for the smooth direction field.
 
double alignment_lambda = 0.0
 Alignment tradeoff parameter λ_t balancing smoothness against alignment strength in the constrained solve (L_reg − λ_t M) u = M q (Knöppel et al.
 

Detailed Description

Options for compute_smooth_direction_field().

Member Data Documentation

◆ nrosy

uint8_t nrosy = 4

Symmetry order of the direction field (e.g.

1 = vector field, 2 = line field, 4 = cross field).

◆ output_element_type

Controls where the output direction field is stored.

  • AttributeElement::Vertex (default): stores a per-vertex 3-D tangent vector attribute using the vertex-based connection Laplacian (Knöppel et al. 2013).
  • AttributeElement::Facet: stores a per-facet 3-D tangent vector attribute using the face-based connection Laplacian.

◆ alignment_attribute

std::string_view alignment_attribute = ""

Name of an alignment constraint attribute used as soft constraints.

Each non-zero entry is softly constrained to align to that direction; zero entries are unconstrained. If empty (the default), no constraints are applied and the globally smoothest field is computed.

Must match the element type selected by output_element_type:

  • AttributeElement::Vertex: a per-vertex 3-D tangent vector attribute (AttributeElement::Vertex, AttributeUsage::Vector, 3 channels).
  • AttributeElement::Facet: a per-facet 3-D tangent vector attribute (AttributeElement::Facet, AttributeUsage::Vector, 3 channels).

◆ direction_field_attribute

std::optional<std::string_view> direction_field_attribute

Output attribute name for the smooth direction field.

If not set (std::nullopt, the default), the canonical name depends on output_element_type:

  • AttributeElement::Vertex: @smooth_direction_field
  • AttributeElement::Facet: @smooth_direction_field_facets

◆ alignment_lambda

double alignment_lambda = 0.0

Alignment tradeoff parameter λ_t balancing smoothness against alignment strength in the constrained solve (L_reg − λ_t M) u = M q (Knöppel et al.

2013, Eq. 16 / Algorithm 3). Only used when alignment_attribute is set.

  • 0 (default): the paper's recommended balanced value.
  • Negative (toward −∞): stronger alignment, weaker smoothness.
  • Positive (toward λ₁, the smallest generalized eigenvalue): weaker alignment, smoother field. Must stay strictly below λ₁; values at or above it make the system indefinite and the solve fails.

The documentation for this struct was generated from the following file: