VMTK
Loading...
Searching...
No Matches
vtkvmtkPolyDataFVFELaplaceBeltramiStencil Class Reference

Apply finite-volume, finite-element LB weighting to the neighborhood connections of a surface. More...

#include <vtkvmtkPolyDataFVFELaplaceBeltramiStencil.h>

Inheritance diagram for vtkvmtkPolyDataFVFELaplaceBeltramiStencil:
[legend]
Collaboration diagram for vtkvmtkPolyDataFVFELaplaceBeltramiStencil:
[legend]

Public Types

typedef vtkvmtkPolyDataLaplaceBeltramiStencil Superclass
Public Types inherited from vtkvmtkPolyDataLaplaceBeltramiStencil
typedef vtkvmtkPolyDataManifoldStencil Superclass
Public Types inherited from vtkvmtkPolyDataManifoldStencil
typedef vtkvmtkStencil Superclass
Public Types inherited from vtkvmtkStencil
typedef vtkvmtkNeighborhood Superclass
Public Types inherited from vtkvmtkNeighborhood
typedef vtkvmtkDataSetItem Superclass
Public Types inherited from vtkvmtkDataSetItem
typedef vtkvmtkItem Superclass
Public Types inherited from vtkvmtkItem
typedef vtkObject Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkvmtkPolyDataFVFELaplaceBeltramiStencil * NewInstance () const
virtual vtkIdType GetItemType () override
Public Member Functions inherited from vtkvmtkPolyDataLaplaceBeltramiStencil
vtkvmtkPolyDataLaplaceBeltramiStencil * NewInstance () const
void Build () override
void BuildBoundaryWeights (vtkIdType boundaryPointId, vtkIdType boundaryNeighborPointId, double &boundaryWeight, double &boundaryNeighborWeight)
Public Member Functions inherited from vtkvmtkPolyDataManifoldStencil
vtkvmtkPolyDataManifoldStencil * NewInstance () const
virtual double GetArea ()
virtual void ComputeArea ()
void DeepCopy (vtkvmtkPolyDataManifoldStencil *src)
virtual int GetUseExtendedNeighborhood ()
virtual void SetUseExtendedNeighborhood (int)
virtual void UseExtendedNeighborhoodOn ()
virtual void UseExtendedNeighborhoodOff ()
Public Member Functions inherited from vtkvmtkStencil
vtkvmtkStencil * NewInstance () const
vtkIdType GetNumberOfWeights ()
void ScaleWeights (double factor)
const double * GetCenterWeightTuple ()
virtual void DeepCopy (vtkvmtkItem *src) override
virtual void SetNumberOfComponents (vtkIdType)
virtual vtkIdType GetNumberOfComponents ()
double GetWeight (vtkIdType i)
void SetWeight (vtkIdType i, double weight)
double GetWeight (vtkIdType i, vtkIdType component)
void SetWeight (vtkIdType i, vtkIdType component, double weight)
double GetCenterWeight ()
void SetCenterWeight (double weight)
double GetCenterWeight (vtkIdType component)
void SetCenterWeight (vtkIdType component, double weightComponent)
virtual void SetWeightScaling (int)
virtual int GetWeightScaling ()
virtual void WeightScalingOn ()
virtual void WeightScalingOff ()
virtual void SetNegateWeights (int)
virtual int GetNegateWeights ()
virtual void NegateWeightsOn ()
virtual void NegateWeightsOff ()
Public Member Functions inherited from vtkvmtkNeighborhood
vtkvmtkNeighborhood * NewInstance () const
virtual bool GetIsBoundary ()
vtkIdType GetNumberOfPoints ()
vtkIdType GetPointId (vtkIdType i)
vtkIdType * GetPointer (vtkIdType i)
Public Member Functions inherited from vtkvmtkDataSetItem
vtkvmtkDataSetItem * NewInstance () const
void SetDataSet (vtkDataSet *dataSet)
vtkDataSet * GetDataSet ()
virtual void SetDataSetPointId (vtkIdType)
virtual vtkIdType GetDataSetPointId ()
virtual void SetReallocateOnBuild (int)
virtual int GetReallocateOnBuild ()
virtual void ReallocateOnBuildOn ()
virtual void ReallocateOnBuildOff ()
Public Member Functions inherited from vtkvmtkItem
vtkvmtkItem * NewInstance () const

Static Public Member Functions

static vtkvmtkPolyDataFVFELaplaceBeltramiStencil * New ()
static int IsTypeOf (const char *type)
static vtkvmtkPolyDataFVFELaplaceBeltramiStencil * SafeDownCast (vtkObjectBase *o)
Static Public Member Functions inherited from vtkvmtkPolyDataLaplaceBeltramiStencil
static int IsTypeOf (const char *type)
static vtkvmtkPolyDataLaplaceBeltramiStencil * SafeDownCast (vtkObjectBase *o)
Static Public Member Functions inherited from vtkvmtkPolyDataManifoldStencil
static int IsTypeOf (const char *type)
static vtkvmtkPolyDataManifoldStencil * SafeDownCast (vtkObjectBase *o)
Static Public Member Functions inherited from vtkvmtkStencil
static int IsTypeOf (const char *type)
static vtkvmtkStencil * SafeDownCast (vtkObjectBase *o)
Static Public Member Functions inherited from vtkvmtkNeighborhood
static int IsTypeOf (const char *type)
static vtkvmtkNeighborhood * SafeDownCast (vtkObjectBase *o)
Static Public Member Functions inherited from vtkvmtkDataSetItem
static int IsTypeOf (const char *type)
static vtkvmtkDataSetItem * SafeDownCast (vtkObjectBase *o)
Static Public Member Functions inherited from vtkvmtkItem
static int IsTypeOf (const char *type)
static vtkvmtkItem * SafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 vtkvmtkPolyDataFVFELaplaceBeltramiStencil ()
 ~vtkvmtkPolyDataFVFELaplaceBeltramiStencil ()
void ComputeArea (vtkPolyData *data, vtkIdType pointId)
void ScaleWithArea () override
Protected Member Functions inherited from vtkvmtkPolyDataLaplaceBeltramiStencil
 vtkvmtkPolyDataLaplaceBeltramiStencil ()
 ~vtkvmtkPolyDataLaplaceBeltramiStencil ()
Protected Member Functions inherited from vtkvmtkPolyDataManifoldStencil
 vtkvmtkPolyDataManifoldStencil ()
 ~vtkvmtkPolyDataManifoldStencil ()
void ScaleWithAreaFactor (double factor)
Protected Member Functions inherited from vtkvmtkStencil
 vtkvmtkStencil ()
 ~vtkvmtkStencil ()
void ResizePointList (vtkIdType ptId, int size)
void ChangeWeightSign ()
Protected Member Functions inherited from vtkvmtkNeighborhood
 vtkvmtkNeighborhood ()
 ~vtkvmtkNeighborhood ()
void ResizePointList (vtkIdType ptId, int size)
Protected Member Functions inherited from vtkvmtkDataSetItem
 vtkvmtkDataSetItem ()
 ~vtkvmtkDataSetItem ()
Protected Member Functions inherited from vtkvmtkItem
 vtkvmtkItem ()
 ~vtkvmtkItem ()

Additional Inherited Members

Protected Attributes inherited from vtkvmtkPolyDataManifoldStencil
double Area
int UseExtendedNeighborhood
Protected Attributes inherited from vtkvmtkStencil
vtkIdType NumberOfComponents
double * Weights
double * CenterWeight
int WeightScaling
int NegateWeights
Protected Attributes inherited from vtkvmtkNeighborhood
vtkIdType NPoints
vtkIdType * PointIds
bool IsBoundary
Protected Attributes inherited from vtkvmtkDataSetItem
vtkDataSet * DataSet
vtkIdType DataSetPointId
int ReallocateOnBuild

Detailed Description

Apply finite-volume, finite-element LB weighting to the neighborhood connections of a surface.

vtkvmtkPolyDataFVFELaplaceBeltramiStencil is a specialization of vtkvmtkPolyDataLaplaceBeltramiStencil (which builds the cotangent-weight discrete Laplace-Beltrami stencil, see vtkvmtkPolyDataLaplaceBeltramiStencil::Build) that recomputes the normalizing area (ComputeArea) as a proper Voronoi finite-volume mixed area: for each incident triangle it adds the Voronoi sector area if the triangle is non-obtuse, or half/quarter of the triangle area if it is obtuse at the center point / at another vertex respectively (see vtkvmtkMath::IsTriangleObtuse, vtkvmtkMath::VoronoiSectorArea). ScaleWithArea then divides the cotangent weights by one third of this finite-volume area. UseExtendedNeighborhood is enabled by default. It is one of the stencil types selectable through vtkvmtkStencils and vtkvmtkPolyDataMeanCurvature (VTK_VMTK_FVFE_LAPLACE_BELTRAMI_STENCIL) for mesh smoothing and curvature estimation.

See also
vtkvmtkPolyDataLaplaceBeltramiStencil, vtkvmtkPolyDataFELaplaceBeltramiStencil, vtkvmtkStencils, vtkvmtkPolyDataMeanCurvature

Definition at line 46 of file vtkvmtkPolyDataFVFELaplaceBeltramiStencil.h.

Member Typedef Documentation

◆ Superclass

Constructor & Destructor Documentation

◆ vtkvmtkPolyDataFVFELaplaceBeltramiStencil()

vtkvmtkPolyDataFVFELaplaceBeltramiStencil::vtkvmtkPolyDataFVFELaplaceBeltramiStencil ( )
protected

◆ ~vtkvmtkPolyDataFVFELaplaceBeltramiStencil()

vtkvmtkPolyDataFVFELaplaceBeltramiStencil::~vtkvmtkPolyDataFVFELaplaceBeltramiStencil ( )
inlineprotected

Definition at line 57 of file vtkvmtkPolyDataFVFELaplaceBeltramiStencil.h.

57{};

Member Function Documentation

◆ New()

vtkvmtkPolyDataFVFELaplaceBeltramiStencil * vtkvmtkPolyDataFVFELaplaceBeltramiStencil::New ( )
static

◆ IsTypeOf()

int vtkvmtkPolyDataFVFELaplaceBeltramiStencil::IsTypeOf ( const char * type)
static

◆ IsA()

virtual int vtkvmtkPolyDataFVFELaplaceBeltramiStencil::IsA ( const char * type)
virtual

◆ SafeDownCast()

vtkvmtkPolyDataFVFELaplaceBeltramiStencil * vtkvmtkPolyDataFVFELaplaceBeltramiStencil::SafeDownCast ( vtkObjectBase * o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase * vtkvmtkPolyDataFVFELaplaceBeltramiStencil::NewInstanceInternal ( ) const
protectedvirtual

◆ NewInstance()

vtkvmtkPolyDataFVFELaplaceBeltramiStencil * vtkvmtkPolyDataFVFELaplaceBeltramiStencil::NewInstance ( ) const

◆ GetItemType()

virtual vtkIdType vtkvmtkPolyDataFVFELaplaceBeltramiStencil::GetItemType ( )
inlineoverridevirtual

Get an identifier for the concrete item type (one of the VTK_VMTK_*_NEIGHBORHOOD / VTK_VMTK_*_STENCIL constants), used by owning vtkvmtkItems collections to instantiate the correct subclass.

Implements vtkvmtkItem.

Definition at line 53 of file vtkvmtkPolyDataFVFELaplaceBeltramiStencil.h.

@ VTK_VMTK_FVFE_LAPLACE_BELTRAMI_STENCIL

◆ ComputeArea()

void vtkvmtkPolyDataFVFELaplaceBeltramiStencil::ComputeArea ( vtkPolyData * data,
vtkIdType pointId )
protected

Definition at line 37 of file vtkvmtkPolyDataFVFELaplaceBeltramiStencil.cxx.

38 {
39 double point[3], point1[3], point2[3];
40 vtkIdType j, numberOfTriangles;
41 int triangleObtusity;
42
43 data->GetPoint(pointId,point);
44 this->Area = 0.0;
45
46 if (!this->IsBoundary)
47 numberOfTriangles = this->NPoints;
48 else
49 numberOfTriangles = this->NPoints-1;
50
51 for (j=0; j<numberOfTriangles; j++)
52 {
53 data->GetPoint(this->PointIds[j],point1);
54
55 data->GetPoint(this->PointIds[(j+1)%this->NPoints],point2);
56
57 triangleObtusity = vtkvmtkMath::IsTriangleObtuse(point2,point,point1);
58
59 if (triangleObtusity==VTK_VMTK_NON_OBTUSE)
60 this->Area += vtkvmtkMath::VoronoiSectorArea(point2,point,point1);
61 else if (triangleObtusity==VTK_VMTK_OBTUSE_IN_POINT)
62 this->Area += vtkvmtkMath::TriangleArea(point2,point,point1)/2.0;
63 else if (triangleObtusity==VTK_VMTK_OBTUSE_NOT_IN_POINT)
64 this->Area += vtkvmtkMath::TriangleArea(point2,point,point1)/4.0;
65 }
66 }
static double VoronoiSectorArea(double point0[3], double point1[3], double point2[3])
static int IsTriangleObtuse(double point0[3], double point1[3], double point2[3])
static double TriangleArea(double point0[3], double point1[3], double point2[3])
#define VTK_VMTK_OBTUSE_NOT_IN_POINT
Definition vtkvmtkMath.h:35
#define VTK_VMTK_NON_OBTUSE
Definition vtkvmtkMath.h:33
#define VTK_VMTK_OBTUSE_IN_POINT
Definition vtkvmtkMath.h:34

◆ ScaleWithArea()

void vtkvmtkPolyDataFVFELaplaceBeltramiStencil::ScaleWithArea ( )
overrideprotectedvirtual

Normalize the stencil's Weights/CenterWeight by the area computed by ComputeArea(), typically via the protected ScaleWithAreaFactor helper. Must be implemented by every concrete stencil subclass; called internally at the end of Build().

Implements vtkvmtkPolyDataManifoldStencil.

Definition at line 68 of file vtkvmtkPolyDataFVFELaplaceBeltramiStencil.cxx.

69 {
70// this->ScaleWithAreaFactor(1.0);
71 this->ScaleWithAreaFactor(1.0/3.0);
72 }

The documentation for this class was generated from the following files: