All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
MBSimFlexibleBody::FlexibleBody1SReferenceCurveFE Class Reference

Finite-Element class for the body FlexibleBody1SReferenceCurve. More...

#include <finite_element_1S_reference_curve.h>

Inheritance diagram for MBSimFlexibleBody::FlexibleBody1SReferenceCurveFE:
MBSimFlexibleBody::DiscretizationInterface

Public Member Functions

 FlexibleBody1SReferenceCurveFE (FlexibleBody1SReferenceCurve *parent, int eleNo, Vec2 alpha, int order, int nodeDofs)
 standard constructor
 
virtual void init (MBSim::Element::InitStage stage)
 initialize the FE
 
virtual int getqSize () const
 
virtual fmatvec::Vec getq () const
 
virtual int getuSize () const
 
virtual const fmatvec::SymMatgetM () const
 
virtual const fmatvec::Vecgeth () const
 
virtual const fmatvec::SqrMatgetdhdq () const
 
virtual const fmatvec::SqrMatgetdhdu () const
 
virtual void computeM (const fmatvec::Vec &q)
 compute mass matrix More...
 
virtual void computeh (const fmatvec::Vec &q, const fmatvec::Vec &u)
 compute smooth right hand side More...
 
virtual void computedhdz (const fmatvec::Vec &q, const fmatvec::Vec &u)
 compute Jacobian for implicit integration More...
 
virtual double computeKineticEnergy (const fmatvec::Vec &q, const fmatvec::Vec &u)
 compute kinetic energy More...
 
virtual double computeGravitationalEnergy (const fmatvec::Vec &q)
 compute gravitational energy More...
 
virtual double computeElasticEnergy (const fmatvec::Vec &q)
 compute elastic energy More...
 
virtual fmatvec::Vec computePosition (const fmatvec::Vec &q, const MBSim::ContourPointData &data)
 
virtual fmatvec::SqrMat computeOrientation (const fmatvec::Vec &q, const MBSim::ContourPointData &data)
 
virtual fmatvec::Vec computeVelocity (const fmatvec::Vec &q, const fmatvec::Vec &u, const MBSim::ContourPointData &data)
 
virtual fmatvec::Vec computeAngularVelocity (const fmatvec::Vec &q, const fmatvec::Vec &u, const MBSim::ContourPointData &data)
 
virtual fmatvec::Mat computeJacobianOfMotion (const fmatvec::Vec &q, const MBSim::ContourPointData &data)
 
virtual void setDofDir (fmatvec::VecInt dofDirElement_)
 
virtual fmatvec::VecInt getDofDirs ()
 
virtual int getAddDoFSizeMax () const
 get the number of possible degrees of freedom (some may be locked, but this is not covered in the number)
 
virtual int getNodesSize () const
 get the number of Nodes
 
FlexibleBody1SReferenceCurvegetParent ()
 
const std::vector< int > getFreeDofs ()
 
const fmatvec::Vec2 getAlpha ()
 
int findLocalDof (int globalDof)
 
virtual double computeXiLoc (double xiGlob)
 compute the local position
 
virtual double computeXiGlob (double xiLoc)
 compute the global position
 
fmatvec::Vec3 computer (double xi, int derXi=0, int derTheta=0)
 compute the position and/or its derivative w.r.t. xi and/or theta
 
fmatvec::Vec3 computev (double xi, int derXi=0)
 compute the velocity and/or its derivative w.r.t. xi and/or theta
 
fmatvec::Vec3 computedrdqk (double xi, int derXi, int qIndLoc)
 computes the derivative wrt the generalized position of the local element
 
virtual double computeN (int j, double xiLoc, int derXi)
 compute the result of the ansatz function N of number j Here hierarchical basis is used. More...
 
virtual double computeLegendre (int j, double xiLoc, int derXi)
 compute Legendre Polynomial
 
fmatvec::Vec3 computeB (int dofDirLocal, double xiGlob, int derXi, int derTheta)
 compute the column i of the B matrix (the column that is connected to the localDOF) More...
 
fmatvec::Vec3 computeBqf (double xi, int derXi, int derTheta)
 compute the multiplication of the B matrix with qf
 
fmatvec::Vec3 computeBuf (double xi, int derXi, int derTheta)
 compute the multiplication of the B matrix with uf
 
virtual fmatvec::Vec3 computeS (int columnEle, double xiGlob, int derXi)
 return the column of DOF with column i More...
 
virtual fmatvec::Vec3 computeSTimeslocVec (double xiGlob, int derXi, const fmatvec::Vec &locVec)
 compute S times the given vector
 
virtual fmatvec::Vec3 computeAnodeTimesSTimeslocVec (double xiGlob, int derXi, int derTheta, const fmatvec::Vec &locVec)
 compute A of the node times the respective shape functions times the given vector
 
fmatvec::Mat3xV computeP (double xi, int derXi)
 compute the P matrix
 
fmatvec::Mat3xV computedPdqk (double xi, int dofDirLocal)
 compute the P matrix derived wrt the generalized position
 
double computeeps (double xiGlob)
 compute the local elongation
 
double computedepsdqk (int localDofDir, double xiGlob)
 compute the derivative of the local elongation w.r.t. local Dof direction
 
double computeKappan (double xiGlob)
 compute the bending in t/n-plane
 
double computeKappab (double xiGlob)
 compute the bending in t/b-plane
 
double computedKappandqk (double xiGlob, int qIndLocal)
 compute derivative of kappan w.r.t. the given DoF
 
double computedKappabdqk (double xiGlob, int qIndLocal)
 compute derivative of kappab w.r.t. the given DoF
 
double dWndqk (double xiGlob, int qInd)
 compute the change of bending energy in the t/n-plane at the position w.r.t the given DoF
 
void updateIntegrationBorders (double t)
 update the borders as
 
- Public Member Functions inherited from MBSimFlexibleBody::DiscretizationInterface
 DiscretizationInterface ()
 constructor
 
virtual ~DiscretizationInterface ()
 destructor
 

Private Member Functions

std::vector< double > getLagrangeCoeffs (int nodeNo)
 function that holds the coefficient for the lagrange polynoms
 
std::vector< double > getHermiteCoeffs (int nodeNo)
 function that holds the coefficient for the hermite polynoms
 
fmatvec::SymMatV integratePTP ()
 computes the integral needed for the mass matrix ( P^T P)
 
fmatvec::SqrMatV integratePTdPdxi ()
 computes the integral for the first part of the h vector coming from the kinetic energy ( P^T * P')
 
fmatvec::SqrMatV integratePTdPdt ()
 computes the integral for the second part of the h vector coming from the kinetic energy ( P^T * dPdt)
 
fmatvec::SqrMatV integratePTdPdqk (int qInd)
 computes the integral for the third part of the h vector coming from the kinetic energy ( P^T * dPdqk)
 
double integrateForWgamma (int qInd)
 computes the integral for the first part of the h vector coming from the potential energy (intForWgamma)
 
double integrateForWn (int qIndLoc)
 computes the integral of the h vector coming from the potential energy (intForWn)
 
double integrateForWb (int qIndLoc)
 computes the integral for the second part of the h vector coming from the potential energy (intForWb)
 
double computeXiOfDOF (int dofDirLocal)
 

Private Attributes

FlexibleBody1SReferenceCurveparent
 parent body
 
int element
 number of the element
 
fmatvec::VecInt dofDirs
 vector that connects local DOFs of an element to the global DOFs More...
 
fmatvec::Vec2 alpha
 
std::vector< double > borders
 borders for the integration
 
int order
 degree of the element
 
int nodeDirs
 Degrees of freedom for one node (number of directions)
 
std::vector< int > freeDoFs
 number of free DoFs in the element
 
std::vector< std::vector
< std::vector< double > > > 
coeffs
 list of polynomial coefficients First index is the node Second index is the derivative third index is the actual coefficient
 
fmatvec::SymMat M
 Mass matrix of the element.
 
fmatvec::Vec h
 the right hand side vector
 
fmatvec::VecV hT1
 first part of h-vector coming from the kinetic energy
 
fmatvec::VecV hT2
 second part of h-vector coming from the kinetic energy
 
fmatvec::VecV hT3
 second part of h-vector coming from the kinetic energy
 
fmatvec::VecV hV1
 first part of h-vector coming from the potential energy (elongation)
 
fmatvec::VecV hV2
 second part of h-vector coming from the potential energy (normal bending)
 
fmatvec::VecV hV3
 third part of the h-vector coming from the potential energy (binormal bending)
 
fmatvec::VecV hV4
 fourth part of the h-vector coming from the potential energy (torsion)
 
int AVers = 2
 switch between different versions of the A-Matrix
 

Friends

class funcPTP
 
class funcPTdPdxi
 
class funcPTdPdt
 
class funcPTdPdqk
 
class funcForWgamma
 
class funcForWb
 

Detailed Description

Finite-Element class for the body FlexibleBody1SReferenceCurve.

Member Function Documentation

fmatvec::Vec3 MBSimFlexibleBody::FlexibleBody1SReferenceCurveFE::computeB ( int  dofDirLocal,
double  xiGlob,
int  derXi,
int  derTheta 
)

compute the column i of the B matrix (the column that is connected to the localDOF)

Remarks
here all columns can considered (also blocked DOFs)
virtual void MBSimFlexibleBody::FlexibleBody1SReferenceCurveFE::computedhdz ( const fmatvec::Vec q,
const fmatvec::Vec u 
)
inlinevirtual

compute Jacobian for implicit integration

Parameters
generalisedpositions
generalisedvelocities

Implements MBSimFlexibleBody::DiscretizationInterface.

virtual double MBSimFlexibleBody::FlexibleBody1SReferenceCurveFE::computeElasticEnergy ( const fmatvec::Vec q)
inlinevirtual

compute elastic energy

Parameters
generalisedpositions

Implements MBSimFlexibleBody::DiscretizationInterface.

virtual double MBSimFlexibleBody::FlexibleBody1SReferenceCurveFE::computeGravitationalEnergy ( const fmatvec::Vec q)
inlinevirtual

compute gravitational energy

Parameters
generalisedpositions

Implements MBSimFlexibleBody::DiscretizationInterface.

void MBSimFlexibleBody::FlexibleBody1SReferenceCurveFE::computeh ( const fmatvec::Vec q,
const fmatvec::Vec u 
)
virtual

compute smooth right hand side

Parameters
generalisedpositions
generalisedvelocities

Implements MBSimFlexibleBody::DiscretizationInterface.

virtual double MBSimFlexibleBody::FlexibleBody1SReferenceCurveFE::computeKineticEnergy ( const fmatvec::Vec q,
const fmatvec::Vec u 
)
inlinevirtual

compute kinetic energy

Parameters
generalisedpositions
generalisedvelocities

Implements MBSimFlexibleBody::DiscretizationInterface.

void MBSimFlexibleBody::FlexibleBody1SReferenceCurveFE::computeM ( const fmatvec::Vec q)
virtual

compute mass matrix

Parameters
generalisedpositions

Implements MBSimFlexibleBody::DiscretizationInterface.

double MBSimFlexibleBody::FlexibleBody1SReferenceCurveFE::computeN ( int  j,
double  xiLoc,
int  derXi 
)
virtual

compute the result of the ansatz function N of number j Here hierarchical basis is used.

Parameters
jNumber of DoF
xiLocLocal position on function
derXiDerivative w.r.t. Xi

! The following code uses the horner rule to evaluate the ansatz function that is a polynom with given coefficients!

Vec3 MBSimFlexibleBody::FlexibleBody1SReferenceCurveFE::computeS ( int  columnEle,
double  xiGlob,
int  derXi 
)
virtual

return the column of DOF with column i

Remarks
here all columns can considered (also blocked DOFs)
virtual const fmatvec::SqrMat& MBSimFlexibleBody::FlexibleBody1SReferenceCurveFE::getdhdq ( ) const
inlinevirtual
Returns
Jacobian of implicit integration regarding position

Implements MBSimFlexibleBody::DiscretizationInterface.

virtual const fmatvec::SqrMat& MBSimFlexibleBody::FlexibleBody1SReferenceCurveFE::getdhdu ( ) const
inlinevirtual
Returns
Jacobian of implicit integration regarding velocity

Implements MBSimFlexibleBody::DiscretizationInterface.

virtual const fmatvec::Vec& MBSimFlexibleBody::FlexibleBody1SReferenceCurveFE::geth ( ) const
inlinevirtual
Returns
smooth right hand side of discretization

Implements MBSimFlexibleBody::DiscretizationInterface.

virtual const fmatvec::SymMat& MBSimFlexibleBody::FlexibleBody1SReferenceCurveFE::getM ( ) const
inlinevirtual
Returns
mass matrix of discretization

Implements MBSimFlexibleBody::DiscretizationInterface.

virtual int MBSimFlexibleBody::FlexibleBody1SReferenceCurveFE::getqSize ( ) const
inlinevirtual
Returns
dimension of positions

Implements MBSimFlexibleBody::DiscretizationInterface.

virtual int MBSimFlexibleBody::FlexibleBody1SReferenceCurveFE::getuSize ( ) const
inlinevirtual
Returns
dimension of velocities

Implements MBSimFlexibleBody::DiscretizationInterface.

Member Data Documentation

fmatvec::VecInt MBSimFlexibleBody::FlexibleBody1SReferenceCurveFE::dofDirs
private

vector that connects local DOFs of an element to the global DOFs

Remarks
negative values mean that those are blocked DoFs and therefore not free

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

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML