vtkbone
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkboneConstraint Class Reference

a constraint for a finite element mesh More...

#include <vtkboneConstraint.h>

Inheritance diagram for vtkboneConstraint:
Inheritance graph
[legend]
Collaboration diagram for vtkboneConstraint:
Collaboration graph
[legend]

Public Types

enum  ConstraintAppliedTo_t { NODES, ELEMENTS, NUMBER_OF_ConstraintAppliedTo }
 
enum  ConstraintType_t { FORCE, DISPLACEMENT, NUMBER_OF_ConstraintType }
 
enum  ConstraintSense_t { SENSE_X = 0, SENSE_Y = 1, SENSE_Z = 2 }
 
enum  Distribution_t {
  FACE_X0_DISTRIBUTION, FACE_X1_DISTRIBUTION, FACE_Y0_DISTRIBUTION, FACE_Y1_DISTRIBUTION,
  FACE_Z0_DISTRIBUTION, FACE_Z1_DISTRIBUTION, BODY_DISTRIBUTION, NUMBER_OF_Distribution
}
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent)
 
void Initialize ()
 
unsigned long int GetMTime ()
 
vtkDataSetAttributesGetAttributes ()
 
virtual int CheckAttributes ()
 
virtual int Merge (vtkboneConstraint *other)
 
virtual void SetName (const char *)
 
virtual char * GetName ()
 
virtual void SetIndices (vtkIdTypeArray *)
 
virtual vtkIdTypeArrayGetIndices ()
 
virtual void SetConstraintAppliedTo (int)
 
virtual int GetConstraintAppliedTo ()
 
virtual void SetConstraintType (int)
 
virtual int GetConstraintType ()
 
virtual vtkIdType GetNumberOfValues ()
 
virtual void RemoveValue (vtkIdType id)
 
virtual void RemoveLastValue ()
 
virtual void ShallowCopy (vtkboneConstraint *constraint)
 
virtual void DeepCopy (vtkboneConstraint *constraint)
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 
void PrintRevisions (ostream &)
 

Static Public Member Functions

static vtkboneConstraintNew ()
 
static int IsTypeOf (const char *type)
 
static vtkboneConstraintSafeDownCast (vtkObject *o)
 
static const char * GetConstraintAppliedToAsString (int ConstraintAppliedTo)
 
static const char * GetConstraintTypeAsString (int ConstraintType)
 
static const char * GetDistributionAsString (int Distribution)
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 
static vtkObjectBaseNew ()
 

Protected Member Functions

 vtkboneConstraint ()
 
 ~vtkboneConstraint ()
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

char * Name
 
vtkIdTypeArrayIndices
 
vtkDataSetAttributesAttributes
 
int ConstraintAppliedTo
 
int ConstraintType
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

a constraint for a finite element mesh

Stores a constrain on a vtkboneFiniteElementModel. A constraint is a generalization of a boundary condition and an applied load, and encompases both those cases. Constraints consist of values assigned to a set of nodes or elements, together with some characteristics of those values.

Contains a vtkIdTypeArray 'Indices' that specifies the list of node or element IDs.

This class contains a vtkDataSetAttributes object, accessed with the method GetAttributes, that can store scalars and vectors.

Constraints on nodes, which may be either Displacement or Force constraints, require two scalar arrays. The first is the dimension that is displaced (0=x, 1=y, 2=z), and must be named SENSE, and the second is gives the displacement or force and must be named VALUE. Note that of course you can have multiple entries for the same node, but with different SENSE values.

Constraints on elements, which are typically Force constraints, require an additional scalar array to specify the Distribution of the force across the nodes of the element; this array must be named DISTRIBUTION.

Note that, although Force constraints may be assigned to either nodes or to elements, in most cases you should assign force constraints to elements, as this will typically give the expected results.

Example:
Here is an example of creating a boundary condition:
Example:
// Create Ids array
ids->SetValue(0, 3); // Node ID 3
ids->SetValue(1, 5); // Node ID 5
// Create SENSE array
senses->SetName("SENSE");
senses->SetNumberOfValues(2);
senses->SetValue(0, 0); // X axis
senses->SetValue(1, 2); // Z axis
// Create VALUE array
values->SetName("VALUE");
values->SetNumberOfValues(2);
values->SetValue(0, 0.1); // Displacement of 0.1 mm
values->SetValue(1, 0.1); // Displacement of 0.1 mm
// Create Constraint
constraint->SetName("a_custom_boundary_condition");
constraint->SetIndices(ids);
constraint->GetAttributes()->AddArray(senses);
constraint->GetAttributes()->AddArray(values);
Example:
Here is an example of creating an applied load:
Example:
// Create Ids array
ids->SetValue(0, 0); // Element ID 0
ids->SetValue(1, 3); // Element ID 3
// Create SENSE array
senses->SetName("SENSE");
senses->SetNumberOfValues(2);
senses->SetValue(0, 2); // Z axis
senses->SetValue(1, 2); // Z axis
// Create VALUE array
values->SetName("VALUE");
values->SetNumberOfValues(2);
values->SetValue(0, 69.0); // Force of 69 MPa per element
values->SetValue(1, 69.0); // Force of 69 MPa per element
distributions->SetName("DISTRIBUTION");
distributions->SetNumberOfValues(2);
// FACE_Z1_DISTRIBUTION is the top Z face.
distributions->SetValue(0, vtkboneConstraint::FACE_Z1_DISTRIBUTION);
distributions->SetValue(1, vtkboneConstraint::FACE_Z1_DISTRIBUTION);
// Create Constraint
constraint->SetName("a_custom_applied_load");
constraint->SetIndices(ids);
constraint->GetAttributes()->AddArray(distributions);
constraint->GetAttributes()->AddArray(senses);
constraint->GetAttributes()->AddArray(values);
See also
vtkboneFiniteElementModel vtkboneConstraintCollection

Definition at line 133 of file vtkboneConstraint.h.

Member Enumeration Documentation

Enumerator
NODES 
ELEMENTS 
NUMBER_OF_ConstraintAppliedTo 

Definition at line 142 of file vtkboneConstraint.h.

Enumerator
FORCE 
DISPLACEMENT 
NUMBER_OF_ConstraintType 

Definition at line 148 of file vtkboneConstraint.h.

Enumerator
SENSE_X 
SENSE_Y 
SENSE_Z 

Definition at line 154 of file vtkboneConstraint.h.

Enumerator
FACE_X0_DISTRIBUTION 
FACE_X1_DISTRIBUTION 
FACE_Y0_DISTRIBUTION 
FACE_Y1_DISTRIBUTION 
FACE_Z0_DISTRIBUTION 
FACE_Z1_DISTRIBUTION 
BODY_DISTRIBUTION 
NUMBER_OF_Distribution 

Definition at line 160 of file vtkboneConstraint.h.

Constructor & Destructor Documentation

vtkboneConstraint::vtkboneConstraint ( )
protected
vtkboneConstraint::~vtkboneConstraint ( )
protected

Member Function Documentation

static vtkboneConstraint* vtkboneConstraint::New ( )
static
virtual const char* vtkboneConstraint::GetClassName ( )
virtual
static int vtkboneConstraint::IsTypeOf ( const char *  type)
static
virtual int vtkboneConstraint::IsA ( const char *  type)
virtual

Reimplemented from vtkObjectBase.

static vtkboneConstraint* vtkboneConstraint::SafeDownCast ( vtkObject o)
static
void vtkboneConstraint::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Reimplemented from vtkObject.

void vtkboneConstraint::Initialize ( )
static const char* vtkboneConstraint::GetConstraintAppliedToAsString ( int  ConstraintAppliedTo)
static

Return a string describing the value of ConstraintAppliedTo

static const char* vtkboneConstraint::GetConstraintTypeAsString ( int  ConstraintType)
static

Return a string describing the value of ConstraintType

static const char* vtkboneConstraint::GetDistributionAsString ( int  Distribution)
static

Return a string describing the value of Distribution

virtual void vtkboneConstraint::SetName ( const char *  )
virtual

Set/get the name of the constraint.

virtual char* vtkboneConstraint::GetName ( )
virtual

Set/get the name of the constraint.

virtual void vtkboneConstraint::SetIndices ( vtkIdTypeArray )
virtual

Set/get the node set or element set.

virtual vtkIdTypeArray* vtkboneConstraint::GetIndices ( )
virtual

Set/get the node set or element set.

unsigned long int vtkboneConstraint::GetMTime ( )
virtual

Datasets are composite objects and need to check each part for MTime

Reimplemented from vtkObject.

virtual void vtkboneConstraint::SetConstraintAppliedTo ( int  )
virtual

Set/Get whether constraints are applied to nodes or to elements.

virtual int vtkboneConstraint::GetConstraintAppliedTo ( )
virtual

Set/Get whether constraints are applied to nodes or to elements.

virtual void vtkboneConstraint::SetConstraintType ( int  )
virtual

Set/Get the type of constraint.

virtual int vtkboneConstraint::GetConstraintType ( )
virtual

Set/Get the type of constraint.

virtual vtkIdType vtkboneConstraint::GetNumberOfValues ( )
inlinevirtual

Return number of constraint values.

Definition at line 211 of file vtkboneConstraint.h.

virtual void vtkboneConstraint::RemoveValue ( vtkIdType  id)
virtual

These methods remove values from the data array. They shift data and resize array, so the data array is still valid after this operation. Note, this operation is fairly slow. Also removes corresponding entries from associated fields (e.g. Scalars and/or Vectors).

virtual void vtkboneConstraint::RemoveLastValue ( )
virtual

These methods remove values from the data array. They shift data and resize array, so the data array is still valid after this operation. Note, this operation is fairly slow. Also removes corresponding entries from associated fields (e.g. Scalars and/or Vectors).

vtkDataSetAttributes* vtkboneConstraint::GetAttributes ( )
inline

Return a pointer to the data attributes.

Definition at line 225 of file vtkboneConstraint.h.

virtual int vtkboneConstraint::CheckAttributes ( )
virtual

This method checks to see if the attributes match the geometry. Many filters will crash if the number of tuples in an array is less than the number of points. This method returns 1 if there is a mismatch, and 0 if everything is ok. It prints an error if an array is too short, and a warning if an array is too long.

virtual int vtkboneConstraint::Merge ( vtkboneConstraint other)
virtual

Merges the entries of another vtkConstraint into this one. ConstraintAppliedTo and ConstraintType must match.

virtual void vtkboneConstraint::ShallowCopy ( vtkboneConstraint constraint)
virtual

Shallow and Deep copy. WARNING: Using ShallowCopy will result in both this and the original object trying to manage the underlying data. I recommend that you either regard both as constants, or that you delete the original object after this call.

virtual void vtkboneConstraint::DeepCopy ( vtkboneConstraint constraint)
virtual

Shallow and Deep copy. WARNING: Using ShallowCopy will result in both this and the original object trying to manage the underlying data. I recommend that you either regard both as constants, or that you delete the original object after this call.

Member Data Documentation

char* vtkboneConstraint::Name
protected

Definition at line 251 of file vtkboneConstraint.h.

vtkIdTypeArray* vtkboneConstraint::Indices
protected

Definition at line 252 of file vtkboneConstraint.h.

vtkDataSetAttributes* vtkboneConstraint::Attributes
protected

Definition at line 253 of file vtkboneConstraint.h.

int vtkboneConstraint::ConstraintAppliedTo
protected

Definition at line 255 of file vtkboneConstraint.h.

int vtkboneConstraint::ConstraintType
protected

Definition at line 256 of file vtkboneConstraint.h.


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