Seismo-VLAB  1.3
An Open-Source Finite Element Software for Meso-Scale Simulations
Constraint Class Reference

Class for creating a linear kinematic relations between degree-of-freedom in the model. More...

#include <Constraint.hpp>

Collaboration diagram for Constraint:

Public Member Functions

 Constraint ()
 Creates a empty Constraint to a degree-of-freedom. More...
 
 Constraint (unsigned int slave, std::vector< unsigned int > master, std::vector< double > factors)
 Creates a Constraint to be applied to a degree-of-freedom. More...
 
 ~Constraint ()
 Destroys this Constraint. More...
 
void SetSlaveInformation (unsigned int slave)
 Sets the slave's node degree-of-freedom. More...
 
void SetMasterInformation (std::vector< unsigned int > master)
 Sets the master's free degree-of-freedom list numbering. More...
 
void SetCombinationFactors (std::vector< double > factors)
 Sets the master's combinational factors applied to degree-of-freedom list numbering. More...
 
unsigned int GetNumberOfConstraints () const
 Gets the number of combinations applied to this slave degree-of-freedom. More...
 
unsigned int GetSlaveInformation () const
 Gets the slave free degree-of-freedom of this constraint. More...
 
const std::vector< unsigned int > GetMasterInformation () const
 Gets the master list of total degree-of-freedom to be combined. More...
 
const std::vector< double > GetCombinationFactors () const
 Gets the combinational factor list for each degree-of-freedom. More...
 

Private Attributes

unsigned int Slave
 The slave total degree-of-freedom. More...
 
std::vector< unsigned int > Master
 The list of master free degree-of-freedom. More...
 
std::vector< double > Coefficients
 The combination coefficient vector. More...
 

Detailed Description

Class for creating a linear kinematic relations between degree-of-freedom in the model.

See also
Node.hpp Mesh.hpp

Constructor & Destructor Documentation

◆ Constraint() [1/2]

Constraint::Constraint ( )

Creates a empty Constraint to a degree-of-freedom.

◆ Constraint() [2/2]

Constraint::Constraint ( unsigned int  slave,
std::vector< unsigned int >  master,
std::vector< double >  factors 
)

Creates a Constraint to be applied to a degree-of-freedom.

Parameters
slave'Total' degree-of-freedom number to which the constraint will be applied.
masterList of 'free' degree-of-freedom a.k.a master (or combinational) numbering.
factorsList of combinational values.
Note
More details can be found at Constraint.
See also
Constraint::Slave, Constraint::Master, Constraint::Coefficients.

◆ ~Constraint()

Constraint::~Constraint ( )

Destroys this Constraint.

Member Function Documentation

◆ GetCombinationFactors()

const std::vector<double> Constraint::GetCombinationFactors ( ) const

Gets the combinational factor list for each degree-of-freedom.

Returns
The coefficient values applied to the master nodes.
Note
More details can be found at Constraint.
See also
Constraint::Coefficients.

◆ GetMasterInformation()

const std::vector<unsigned int> Constraint::GetMasterInformation ( ) const

Gets the master list of total degree-of-freedom to be combined.

Returns
List of 'free' degree-of-freedom a.k.a master (or combinational) numbering.
Note
More details can be found at Constraint.
See also
Constraint::Master.

◆ GetNumberOfConstraints()

unsigned int Constraint::GetNumberOfConstraints ( ) const

Gets the number of combinations applied to this slave degree-of-freedom.

Returns
Number of combinational factors.

◆ GetSlaveInformation()

unsigned int Constraint::GetSlaveInformation ( ) const

Gets the slave free degree-of-freedom of this constraint.

Returns
The slave total degree-of-freedom number.
See also
Constraint::Slave.

◆ SetCombinationFactors()

void Constraint::SetCombinationFactors ( std::vector< double >  factors)

Sets the master's combinational factors applied to degree-of-freedom list numbering.

Parameters
factorsList of combinational values.
Note
More details can be found at Constraint.
See also
Constraint::Coefficients.

◆ SetMasterInformation()

void Constraint::SetMasterInformation ( std::vector< unsigned int >  master)

Sets the master's free degree-of-freedom list numbering.

Parameters
masterList of 'free' degree-of-freedom a.k.a master (or combinational) numbering.
Note
More details can be found at Constraint.
See also
Constraint::Master.

◆ SetSlaveInformation()

void Constraint::SetSlaveInformation ( unsigned int  slave)

Sets the slave's node degree-of-freedom.

Parameters
slave'Total' degree-of-freedom number to which the constraint will be applied.
Note
More details can be found at Constraint.
See also
Constraint::Slave.

Member Data Documentation

◆ Coefficients

std::vector<double> Constraint::Coefficients
private

The combination coefficient vector.

◆ Master

std::vector<unsigned int> Constraint::Master
private

The list of master free degree-of-freedom.

◆ Slave

unsigned int Constraint::Slave
private

The slave total degree-of-freedom.