MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Vec3 Class Reference

#include <matvec3.h>

Collaboration diagram for Vec3:

Public Member Functions

 Vec3 (void)
 
 Vec3 (const doublereal &v1, const doublereal &v2, const doublereal &v3)
 
 Vec3 (const Vec3 &v)
 
 Vec3 (const doublereal *pd)
 
 Vec3 (const VectorHandler &vh, integer iFirstIndex)
 
 Vec3 (const Vec3_Manip &Manip, const Mat3x3 &m)
 
 ~Vec3 (void)
 
const doublerealpGetVec (void) const
 
doublerealpGetVec (void)
 
Mat3x3 Tens (const Vec3 &v) const
 
Mat3x3 Tens (void) const
 
Vec3 Cross (const Vec3 &v) const
 
Vec3 EBEMult (const Vec3 &v) const
 
Mat3x3 Cross (const Mat3x3 &m) const
 
doublereal Dot (const Vec3 &v) const
 
doublereal Dot (void) const
 
doublereal Norm (void) const
 
void Put (unsigned short int iRow, const doublereal &dCoef)
 
const doublerealdGet (unsigned short int iRow) const
 
doublerealoperator() (unsigned short int iRow)
 
const doublerealoperator() (unsigned short int iRow) const
 
doublerealoperator[] (unsigned short int iRow)
 
const doublerealoperator[] (unsigned short int iRow) const
 
void AddTo (doublereal *pd) const
 
void SubFrom (doublereal *pd) const
 
void PutTo (doublereal *pd) const
 
void GetFrom (const doublereal *pd)
 
Vec3operator= (const Vec3 &v)
 
Vec3 operator+ (const Vec3 &v) const
 
Vec3operator+= (const Vec3 &v)
 
Vec3 operator- (const Vec3 &v) const
 
Vec3operator-= (const Vec3 &v)
 
Vec3 operator* (const doublereal &d) const
 
Vec3operator*= (const doublereal &d)
 
doublereal operator* (const Vec3 &v) const
 
Vec3 operator* (const Mat3x3 &m) const
 
Vec3 operator/ (const doublereal &d) const
 
Vec3operator/= (const doublereal &d)
 
bool IsNull (void) const
 
bool IsExactlySame (const Vec3 &v) const
 
bool IsSame (const Vec3 &v, const doublereal &dTol) const
 
void Reset (void)
 
std::ostream & Write (std::ostream &out, const char *sFill=" ") const
 

Private Attributes

doublereal pdVec [3]
 

Friends

class Mat3x3
 
class VecN
 
class Mat3xN
 
class MatNx3
 
Vec3 operator- (const Vec3 &v)
 

Detailed Description

Definition at line 98 of file matvec3.h.

Constructor & Destructor Documentation

Vec3::Vec3 ( void  )
inline

Definition at line 121 of file matvec3.h.

References NO_OP.

Referenced by Cross(), EBEMult(), operator*(), operator+(), operator-(), and operator/().

121  {
122  NO_OP;
123  };
#define NO_OP
Definition: myassert.h:74
Vec3::Vec3 ( const doublereal v1,
const doublereal v2,
const doublereal v3 
)
inline

Definition at line 129 of file matvec3.h.

References pdVec, V1, V2, and V3.

131  {
132  pdVec[V1] = v1;
133  pdVec[V2] = v2;
134  pdVec[V3] = v3;
135  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
Definition: matvec3.h:49
Vec3::Vec3 ( const Vec3 v)
inline

Definition at line 140 of file matvec3.h.

References pdVec, V1, V2, and V3.

140  {
141  pdVec[V1] = v.pdVec[V1];
142  pdVec[V2] = v.pdVec[V2];
143  pdVec[V3] = v.pdVec[V3];
144  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
Definition: matvec3.h:49
Vec3::Vec3 ( const doublereal pd)
inline

Definition at line 150 of file matvec3.h.

References ASSERT, pdVec, V1, V2, and V3.

150  {
151  ASSERT(pd != NULL);
152 
153  pdVec[V1] = pd[0];
154  pdVec[V2] = pd[1];
155  pdVec[V3] = pd[2];
156  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
#define ASSERT(expression)
Definition: colamd.c:977
Definition: matvec3.h:49
Vec3::Vec3 ( const VectorHandler vh,
integer  iFirstIndex 
)
inline

Definition at line 163 of file matvec3.h.

References ASSERT, VectorHandler::iGetSize(), pdVec, V1, V2, and V3.

163  {
164  ASSERT(iFirstIndex > 0 && iFirstIndex <= vh.iGetSize()-2);
165  pdVec[V1] = vh(iFirstIndex);
166  pdVec[V2] = vh(++iFirstIndex);
167  pdVec[V3] = vh(++iFirstIndex);
168  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
virtual integer iGetSize(void) const =0
Definition: matvec3.h:51
#define ASSERT(expression)
Definition: colamd.c:977
Definition: matvec3.h:49

Here is the call graph for this function:

Vec3::Vec3 ( const Vec3_Manip Manip,
const Mat3x3 m 
)
inline

Definition at line 175 of file matvec3.h.

References Vec3_Manip::Manipulate().

175  {
176  Manip.Manipulate(*this, m);
177  };
virtual void Manipulate(Vec3 &v, const Mat3x3 &m) const =0

Here is the call graph for this function:

Vec3::~Vec3 ( void  )
inline

Definition at line 182 of file matvec3.h.

References NO_OP.

182  {
183  NO_OP;
184  };
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

void Vec3::AddTo ( doublereal pd) const
inline

Definition at line 317 of file matvec3.h.

References ASSERT, pdVec, V1, V2, and V3.

317  {
318  ASSERT(pd != NULL);
319  pd[0] += pdVec[V1];
320  pd[1] += pdVec[V2];
321  pd[2] += pdVec[V3];
322  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
#define ASSERT(expression)
Definition: colamd.c:977
Definition: matvec3.h:49
Vec3 Vec3::Cross ( const Vec3 v) const
inline

Definition at line 218 of file matvec3.h.

References pdVec, V1, V2, V3, and Vec3().

Referenced by ViscousBody::AfterPredict(), StructDispNode::AfterPredict(), ViscoElasticBeam2::AfterPredict(), ViscousDispJoint::AfterPredict(), ViscousJoint::AfterPredict(), ViscoElasticDispJoint::AfterPredict(), ViscoElasticJoint::AfterPredict(), ViscoElasticBeam::AfterPredict(), StructNode::AfterPredict(), DataManager::AssConstrRes(), HydrodynamicPlainBearing::AssJac(), Accelerometer::AssJac(), InlineFriction::AssJac(), Actuator::AssJac(), asynchronous_machine::AssJac(), RodBezier::AssJac(), Motor::AssJac(), TranslAccel::AssJac(), BeamSliderJoint::AssJac(), TotalEquation::AssJac(), TotalJoint::AssJac(), DistanceJointWithOffset::AssJac(), ViscoElasticRod::AssJac(), Modal::AssJac(), RodWithOffset::AssJac(), FollowerForce::AssJac(), Wheel4::AssJac(), Shell4EAS::AssJac(), AerodynamicBeam::AssJac(), AxialRotationJoint::AssJac(), AerodynamicBeam2::AssJac(), LoadIncForce::AssJac(), PointSurfaceContact::AssMat(), DeformableJoint::AssMatElastic(), DeformableDispJoint::AssMatFDE(), DeformableDispJoint::AssMatFDEPrime(), DeformableHingeJoint::AssMatMInv(), ViscousBody::AssMats(), DynamicVariableBody::AssMats(), DynamicBody::AssMats(), VariableBody::AssMatsRBK_int(), Body::AssMatsRBK_int(), DeformableJoint::AssMatViscous(), ModuleIMU::AssRes(), InlineFriction::AssRes(), UniversalHingeJoint::AssRes(), Actuator::AssRes(), Wheel2::AssRes(), TranslAccel::AssRes(), AutomaticStructDispElem::AssRes(), PlaneHingeJoint::AssRes(), BeamSliderJoint::AssRes(), TotalEquation::AssRes(), TotalJoint::AssRes(), PinJoint::AssRes(), InPlaneWithOffsetJoint::AssRes(), StaticVariableBody::AssRes(), AutomaticStructElem::AssRes(), Modal::AssRes(), FollowerForce::AssRes(), Wheel4::AssRes(), TotalReaction::AssRes(), ModuleIMUConstraint::AssRes(), TotalPinJoint::AssRes(), ModalBody::AssRes(), AxialRotationJoint::AssRes(), StaticBody::AssRes(), TotalForce::AssRes(), LoadIncForce::AssRes(), PlanePinJoint::AssRes(), FollowerInternalForce::AssRes(), Beam2::AssStiffnessMat(), HBeam::AssStiffnessMat(), ViscoElasticBeam2::AssStiffnessMat(), ViscoElasticBeam2::AssStiffnessVec(), ViscoElasticBeam::AssStiffnessVec(), DriveDisplacementJoint::AssVec(), ViscousBody::AssVec(), PointSurfaceContact::AssVec(), GenericAerodynamicForce::AssVec(), RodBezier::AssVec(), DriveDisplacementPinJoint::AssVec(), ElasticJoint::AssVec(), AerodynamicBody::AssVec(), RodWithOffset::AssVec(), ElasticJointInv::AssVec(), AerodynamicBeam::AssVec(), ViscousDispJoint::AssVec(), ViscousJoint::AssVec(), AerodynamicBeam2::AssVec(), ViscoElasticJoint::AssVec(), ViscoElasticDispJoint::AssVec(), VariableBody::AssVecRBK_int(), Body::AssVecRBK_int(), StructDispNode::BeforePredict(), StructNode::BeforePredict(), Wheel4::CalculateR_e(), CenterOfMass::Collect_int(), Compute(), AutomaticStructElem::ComputeAccelerations(), ComputeFullInterpolation(), Membrane4EAS::ComputeInitialIptOrientation(), Shell4EAS::ComputeInitialNodeAndIptOrientation(), Shell4EASANS::ComputeInitialNodeOrientation(), HydrodynamicPlainBearing::ComputeResidual(), VecExp::Cross(), NodeDistDriveCaller::dGetP(), VariableBody::dGetPrivData(), ViscousBody::dGetPrivData(), DeformableDispJoint::dGetPrivData(), TotalEquation::dGetPrivData(), TotalJoint::dGetPrivData(), Body::dGetPrivData(), Modal::dGetPrivData(), TotalReaction::dGetPrivData(), TotalPinJoint::dGetPrivData(), Mat3x3::EigSym(), RotManip::Elle(), DynamicVariableBody::GetG_int(), PosRel::GetVelAbs(), MBDynParser::GetVelAbs(), PosRel::GetVelGlob(), AirProperties::GetVelocity(), MBDynParser::GetVelRel(), InlineFriction::InitialAssJac(), UniversalHingeJoint::InitialAssJac(), SphericalHingeJoint::InitialAssJac(), RodBezier::InitialAssJac(), PlaneHingeJoint::InitialAssJac(), DynamicVariableBody::InitialAssJac(), AngularVelocityJoint::InitialAssJac(), InLineWithOffsetJoint::InitialAssJac(), DistanceJointWithOffset::InitialAssJac(), UniversalRotationJoint::InitialAssJac(), TotalEquation::InitialAssJac(), InPlaneWithOffsetJoint::InitialAssJac(), TotalJoint::InitialAssJac(), ViscoElasticRod::InitialAssJac(), UniversalPinJoint::InitialAssJac(), PlaneRotationJoint::InitialAssJac(), Modal::InitialAssJac(), RodWithOffset::InitialAssJac(), TotalReaction::InitialAssJac(), DynamicBody::InitialAssJac(), TotalPinJoint::InitialAssJac(), AxialRotationJoint::InitialAssJac(), TotalForce::InitialAssJac(), PlanePinJoint::InitialAssJac(), InlineFriction::InitialAssRes(), UniversalHingeJoint::InitialAssRes(), PrismaticJoint::InitialAssRes(), SphericalHingeJoint::InitialAssRes(), DriveDisplacementJoint::InitialAssRes(), PlaneHingeJoint::InitialAssRes(), InLineWithOffsetJoint::InitialAssRes(), DistanceJointWithOffset::InitialAssRes(), PinJoint::InitialAssRes(), TotalEquation::InitialAssRes(), InPlaneWithOffsetJoint::InitialAssRes(), TotalJoint::InitialAssRes(), DriveDisplacementPinJoint::InitialAssRes(), UniversalPinJoint::InitialAssRes(), Modal::InitialAssRes(), TotalReaction::InitialAssRes(), TotalPinJoint::InitialAssRes(), AxialRotationJoint::InitialAssRes(), TotalForce::InitialAssRes(), ViscoElasticDispJoint::InitialAssRes(), PlanePinJoint::InitialAssRes(), MatR2vec(), MultVCrossMat(), MultVCrossTMat(), StructExtForce::Output(), ReadElectric(), ReadModal(), ReadStructMappingExtForce(), MBDynParser::Reference_int(), ModalMappingExt::Send(), StructExtForce::SendToFileDes(), StructMappingExtForce::SendToFileDes(), StructMembraneMappingExtForce::SendToFileDes(), StructExtEDGEForce::SendToStream(), StructExtForce::SendToStream(), StructMappingExtForce::SendToStream(), StructMembraneMappingExtForce::SendToStream(), TranslAccel::SetValue(), StructDispNode::SetValue(), ModuleIMUConstraint::SetValue(), StructNode::SetValue(), InlineFriction::SlidingVelocity(), OffsetDummyStructNode::Update_int(), RelFrameDummyStructNode::Update_int(), PivotRelFrameDummyStructNode::Update_int(), and RotManip::VecRot().

218  {
219  return Vec3(pdVec[V2]*v.pdVec[V3]-pdVec[V3]*v.pdVec[V2],
220  pdVec[V3]*v.pdVec[V1]-pdVec[V1]*v.pdVec[V3],
221  pdVec[V1]*v.pdVec[V2]-pdVec[V2]*v.pdVec[V1]);
222  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
Vec3(void)
Definition: matvec3.h:121
Definition: matvec3.h:49

Here is the call graph for this function:

Mat3x3 Vec3::Cross ( const Mat3x3 m) const

Definition at line 75 of file matvec3.cc.

References M11, M12, M13, M21, M22, M23, M31, M32, M33, Mat3x3, Mat3x3::pdMat, pdVec, V1, V2, and V3.

75  {
76  return Mat3x3(pdVec[V2]*m.pdMat[M31]-pdVec[V3]*m.pdMat[M21],
77  pdVec[V3]*m.pdMat[M11]-pdVec[V1]*m.pdMat[M31],
78  pdVec[V1]*m.pdMat[M21]-pdVec[V2]*m.pdMat[M11],
79  pdVec[V2]*m.pdMat[M32]-pdVec[V3]*m.pdMat[M22],
80  pdVec[V3]*m.pdMat[M12]-pdVec[V1]*m.pdMat[M32],
81  pdVec[V1]*m.pdMat[M22]-pdVec[V2]*m.pdMat[M12],
82  pdVec[V2]*m.pdMat[M33]-pdVec[V3]*m.pdMat[M23],
83  pdVec[V3]*m.pdMat[M13]-pdVec[V1]*m.pdMat[M33],
84  pdVec[V1]*m.pdMat[M23]-pdVec[V2]*m.pdMat[M13]);
85 }
Definition: matvec3.h:59
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:58
Definition: matvec3.h:51
Definition: matvec3.h:55
Definition: matvec3.h:56
Definition: matvec3.h:63
Definition: matvec3.h:62
Definition: matvec3.h:61
Definition: matvec3.h:57
Definition: matvec3.h:49
doublereal pdMat[9]
Definition: matvec3.h:559
Definition: matvec3.h:60
friend class Mat3x3
Definition: matvec3.h:99
const doublereal& Vec3::dGet ( unsigned short int  iRow) const
inline

Definition at line 285 of file matvec3.h.

References ASSERT, and pdVec.

Referenced by MyVectorHandler::Add(), Brake::AfterConvergence(), Accelerometer::AssJac(), LinearAccelerationJoint::AssJac(), InLineJoint::AssJac(), LinearVelocityJoint::AssJac(), DistanceJoint::AssJac(), InPlaneJoint::AssJac(), Actuator::AssJac(), TranslAccel::AssJac(), Brake::AssJac(), PlaneHingeJoint::AssJac(), AngularAccelerationJoint::AssJac(), BeamSliderJoint::AssJac(), InLineWithOffsetJoint::AssJac(), AngularVelocityJoint::AssJac(), DistanceJointWithOffset::AssJac(), RotAccel::AssJac(), InPlaneWithOffsetJoint::AssJac(), PlaneRotationJoint::AssJac(), Modal::AssJac(), AxialRotationJoint::AssJac(), PlanePinJoint::AssJac(), LinearAccelerationJoint::AssRes(), Brake::AssRes(), ContactJoint::AssRes(), PlaneHingeJoint::AssRes(), AngularAccelerationJoint::AssRes(), PlaneRotationJoint::AssRes(), AxialRotationJoint::AssRes(), PlanePinJoint::AssRes(), Vec6::dGet(), DriveDisplacementJoint::dGetPrivData(), DriveHingeJoint::dGetPrivData(), DriveDisplacementPinJoint::dGetPrivData(), Beam2::dGetPrivData(), Beam::dGetPrivData(), StdAirProperties::GetAirProps(), DistanceJoint::InitialAssJac(), LinearVelocityJoint::InitialAssJac(), PlaneHingeJoint::InitialAssJac(), AngularVelocityJoint::InitialAssJac(), InLineWithOffsetJoint::InitialAssJac(), DistanceJointWithOffset::InitialAssJac(), InPlaneWithOffsetJoint::InitialAssJac(), PlaneRotationJoint::InitialAssJac(), AxialRotationJoint::InitialAssJac(), PlanePinJoint::InitialAssJac(), PlaneHingeJoint::InitialAssRes(), PlaneRotationJoint::InitialAssRes(), AxialRotationJoint::InitialAssRes(), PlanePinJoint::InitialAssRes(), operator<<(), ModalForce::Output(), MyVectorHandler::Put(), PlaneHingeJoint::Restart(), PlanePinJoint::Restart(), Brake::SetValue(), PlaneHingeJoint::SetValue(), AxialRotationJoint::SetValue(), MyVectorHandler::Sub(), DoubleLinearElasticConstitutiveLaw< Vec3, Mat3x3 >::Update(), DoubleLinearViscoElasticConstitutiveLaw< Vec3, Mat3x3 >::Update(), Vec6::Write(), and VecExp::Write().

285  {
286  ASSERT(iRow >= 1 && iRow <= 3);
287  return pdVec[--iRow];
288  };
doublereal pdVec[3]
Definition: matvec3.h:109
#define ASSERT(expression)
Definition: colamd.c:977
doublereal Vec3::Dot ( const Vec3 v) const
inline

Definition at line 243 of file matvec3.h.

References pdVec, V1, V2, and V3.

Referenced by Wheel4::AfterConvergence(), angvel(), angvrel(), HydrodynamicPlainBearing::AssJac(), DistanceJoint::AssJac(), Actuator::AssJac(), DistanceJointWithOffset::AssJac(), ViscoElasticRod::AssJac(), Wheel4::AssJac(), Rod::AssMat(), LinearAccelerationJoint::AssRes(), InlineFriction::AssRes(), InLineJoint::AssRes(), LinearVelocityJoint::AssRes(), Actuator::AssRes(), asynchronous_machine::AssRes(), Wheel2::AssRes(), TranslAccel::AssRes(), PlaneHingeJoint::AssRes(), AngularAccelerationJoint::AssRes(), InLineWithOffsetJoint::AssRes(), RotAccel::AssRes(), InPlaneWithOffsetJoint::AssRes(), ViscoElasticRod::AssRes(), PlaneRotationJoint::AssRes(), Modal::AssRes(), Wheel4::AssRes(), Shell4EASANS::AssRes(), AxialRotationJoint::AssRes(), PointSurfaceContact::AssVec(), Rod::AssVec(), RodBezier::AssVec(), RodWithOffset::AssVec(), Wheel4::CalculateR_e(), HydrodynamicPlainBearing::ComputeResidual(), ContactJoint::ContactJoint(), NodeDistDriveCaller::dGet(), NodeDistDriveCaller::dGetP(), Mass::dGetPrivData(), VariableBody::dGetPrivData(), Body::dGetPrivData(), distance(), Vec6::Dot(), HBeam::DsDxi(), Beam2::DsDxi(), Beam::DsDxi(), DxDcsi2N(), DxDcsi3N(), MBDynParser::GetUnitVecAbs(), MBDynParser::GetUnitVecRel(), DistanceJoint::InitialAssJac(), DistanceJointWithOffset::InitialAssJac(), ViscoElasticRod::InitialAssJac(), InlineFriction::InitialAssRes(), LinearVelocityJoint::InitialAssRes(), InLineJoint::InitialAssRes(), AngularVelocityJoint::InitialAssRes(), InLineWithOffsetJoint::InitialAssRes(), DistanceJointWithOffset::InitialAssRes(), InPlaneWithOffsetJoint::InitialAssRes(), ViscoElasticRod::InitialAssRes(), CGR_Rot::MatR_Manip::Manipulate(), CGR_Rot::MatG_Manip::Manipulate(), MatR2vec(), position(), Rod::Rod(), RodWithOffset::RodWithOffset(), DistanceJoint::SetInitialValue(), DistanceJointWithOffset::SetInitialValue(), DistanceJoint::SetValue(), DistanceJointWithOffset::SetValue(), InlineFriction::SlidingVelocity(), velocity(), vrel(), Wheel2::Wheel2(), and Wheel4::Wheel4().

243  {
244  return
245  pdVec[V1]*v.pdVec[V1]+
246  pdVec[V2]*v.pdVec[V2]+
247  pdVec[V3]*v.pdVec[V3];
248  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
Definition: matvec3.h:49
doublereal Vec3::Dot ( void  ) const
inline

Definition at line 253 of file matvec3.h.

References pdVec, V1, V2, and V3.

253  {
254  return
255  pdVec[V1]*pdVec[V1]+
256  pdVec[V2]*pdVec[V2]+
257  pdVec[V3]*pdVec[V3];
258  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
Definition: matvec3.h:49
Vec3 Vec3::EBEMult ( const Vec3 v) const
inline

Definition at line 227 of file matvec3.h.

References pdVec, V1, V2, V3, and Vec3().

Referenced by Wheel4::AssRes().

227  {
228  return Vec3(pdVec[V1]*v.pdVec[V1],
229  pdVec[V2]*v.pdVec[V2],
230  pdVec[V3]*v.pdVec[V3]);
231  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
Vec3(void)
Definition: matvec3.h:121
Definition: matvec3.h:49

Here is the call graph for this function:

void Vec3::GetFrom ( const doublereal pd)
inline

Definition at line 350 of file matvec3.h.

References ASSERT, pdVec, V1, V2, and V3.

350  {
351  ASSERT(pd != NULL);
352  pdVec[V1] = pd[0];
353  pdVec[V2] = pd[1];
354  pdVec[V3] = pd[2];
355  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
#define ASSERT(expression)
Definition: colamd.c:977
Definition: matvec3.h:49
bool Vec3::IsExactlySame ( const Vec3 v) const
inline

Definition at line 476 of file matvec3.h.

References pdVec, V1, V2, and V3.

476  {
477  return (pdVec[V1] == v.pdVec[V1]
478  && pdVec[V2] == v.pdVec[V2]
479  && pdVec[V3] == v.pdVec[V3]);
480  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
Definition: matvec3.h:49
bool Vec3::IsNull ( void  ) const
inline

Definition at line 472 of file matvec3.h.

References pdVec, V1, V2, and V3.

Referenced by ModuleIMU::AssRes(), Inertia::Inertia(), LoadIncForce::LoadIncForce(), and DataManager::ReadControl().

472  {
473  return (pdVec[V1] == 0. && pdVec[V2] == 0. && pdVec[V3] == 0.);
474  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
Definition: matvec3.h:49
bool Vec3::IsSame ( const Vec3 v,
const doublereal dTol 
) const
inline

Definition at line 482 of file matvec3.h.

References pdVec, and grad::sqrt().

482  {
483  doublereal d2 = 0.;
484 
485  for (int i = 0; i < 3; i++) {
486  doublereal d = pdVec[i] - v.pdVec[i];
487  d2 += d*d;
488  }
489 
490  return sqrt(d2) <= dTol;
491  };
doublereal pdVec[3]
Definition: matvec3.h:109
GradientExpression< UnaryExpr< FuncSqrt, Expr > > sqrt(const GradientExpression< Expr > &u)
Definition: gradient.h:2974
double doublereal
Definition: colamd.c:52

Here is the call graph for this function:

doublereal Vec3::Norm ( void  ) const
inline

Definition at line 263 of file matvec3.h.

References pdVec, grad::sqrt(), V1, V2, and V3.

Referenced by AeroDynModule::AeroDynModule(), PlaneHingeJoint::AfterConvergence(), AxialRotationJoint::AfterConvergence(), angle(), anglerel(), AngularAccelerationJoint::AngularAccelerationJoint(), angvel(), angvrel(), RodBezier::AssJac(), PlaneHingeJoint::AssJac(), AxialRotationJoint::AssJac(), PlaneHingeJoint::AssRes(), AxialRotationJoint::AssRes(), RodBezier::AssVec(), Membrane4EAS::ComputeInitialIptOrientation(), Shell4EAS::ComputeInitialNodeAndIptOrientation(), Shell4EASANS::ComputeInitialNodeOrientation(), AirProperties::dGetPrivData(), distance(), Mat3x3::EigSym(), CentralGravity::GetAcceleration(), getelemparams(), AeroData::GetForcesJacCenteredDiff_int(), AeroData::GetForcesJacForwardDiff_int(), RodBezier::InitialAssJac(), LinearAccelerationJoint::LinearAccelerationJoint(), main(), MatManip_test(), MatR2vec(), ModuleNonsmoothNode::mbs_get_force(), position(), NodeDistDCR::Read(), AxialCLR::Read(), ReadElectric(), ReadStructMappingExtForce(), RodBezier::RodBezier(), StructMembraneMappingExtForce::SendToFileDes(), unitvec(), Unwrap(), StructNode::Update(), RotManip::VecRot(), velocity(), and vrel().

263  {
264  return
265  sqrt(pdVec[V1]*pdVec[V1]+
266  pdVec[V2]*pdVec[V2]+
267  pdVec[V3]*pdVec[V3]);
268  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
GradientExpression< UnaryExpr< FuncSqrt, Expr > > sqrt(const GradientExpression< Expr > &u)
Definition: gradient.h:2974
Definition: matvec3.h:49

Here is the call graph for this function:

doublereal& Vec3::operator() ( unsigned short int  iRow)
inline

Definition at line 290 of file matvec3.h.

References ASSERT, and pdVec.

290  {
291  ASSERT(iRow >= 1 && iRow <= 3);
292  return pdVec[--iRow];
293  };
doublereal pdVec[3]
Definition: matvec3.h:109
#define ASSERT(expression)
Definition: colamd.c:977
const doublereal& Vec3::operator() ( unsigned short int  iRow) const
inline

Definition at line 295 of file matvec3.h.

References ASSERT, and pdVec.

295  {
296  ASSERT(iRow >= 1 && iRow <= 3);
297  return pdVec[--iRow];
298  };
doublereal pdVec[3]
Definition: matvec3.h:109
#define ASSERT(expression)
Definition: colamd.c:977
Vec3 Vec3::operator* ( const doublereal d) const
inline

Definition at line 416 of file matvec3.h.

References pdVec, V1, V2, V3, and Vec3().

416  {
417  return Vec3(pdVec[V1]*d,
418  pdVec[V2]*d,
419  pdVec[V3]*d);
420  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
Vec3(void)
Definition: matvec3.h:121
Definition: matvec3.h:49

Here is the call graph for this function:

doublereal Vec3::operator* ( const Vec3 v) const
inline

Definition at line 437 of file matvec3.h.

References pdVec, V1, V2, and V3.

437  {
438  return pdVec[V1]*v.pdVec[V1]
439  +pdVec[V2]*v.pdVec[V2]
440  +pdVec[V3]*v.pdVec[V3];
441  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
Definition: matvec3.h:49
Vec3 Vec3::operator* ( const Mat3x3 m) const

Scalar product multiplies self by matrix m; equivalent to m.Transpose() * this.

Definition at line 93 of file matvec3.cc.

References M11, M12, M13, M21, M22, M23, M31, M32, M33, Mat3x3::pdMat, pdVec, V1, V2, V3, and Vec3().

94 {
95  return
96  Vec3(
97  m.pdMat[M11]*pdVec[V1]
98  + m.pdMat[M21]*pdVec[V2]
99  + m.pdMat[M31]*pdVec[V3],
100  m.pdMat[M12]*pdVec[V1]
101  + m.pdMat[M22]*pdVec[V2]
102  + m.pdMat[M32]*pdVec[V3],
103  m.pdMat[M13]*pdVec[V1]
104  + m.pdMat[M23]*pdVec[V2]
105  + m.pdMat[M33]*pdVec[V3]);
106 }
Definition: matvec3.h:59
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:58
Definition: matvec3.h:51
Definition: matvec3.h:55
Definition: matvec3.h:56
Definition: matvec3.h:63
Vec3(void)
Definition: matvec3.h:121
Definition: matvec3.h:62
Definition: matvec3.h:61
Definition: matvec3.h:57
Definition: matvec3.h:49
doublereal pdMat[9]
Definition: matvec3.h:559
Definition: matvec3.h:60

Here is the call graph for this function:

Vec3& Vec3::operator*= ( const doublereal d)
inline

Definition at line 426 of file matvec3.h.

References pdVec, V1, V2, and V3.

426  {
427  pdVec[V1] *= d;
428  pdVec[V2] *= d;
429  pdVec[V3] *= d;
430  return *this;
431  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
Definition: matvec3.h:49
Vec3 Vec3::operator+ ( const Vec3 v) const
inline

Definition at line 374 of file matvec3.h.

References pdVec, V1, V2, V3, and Vec3().

374  {
375  return Vec3(pdVec[V1]+v.pdVec[V1],
376  pdVec[V2]+v.pdVec[V2],
377  pdVec[V3]+v.pdVec[V3]);
378  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
Vec3(void)
Definition: matvec3.h:121
Definition: matvec3.h:49

Here is the call graph for this function:

Vec3& Vec3::operator+= ( const Vec3 v)
inline

Definition at line 384 of file matvec3.h.

References pdVec, V1, V2, and V3.

384  {
385  pdVec[V1] += v.pdVec[V1];
386  pdVec[V2] += v.pdVec[V2];
387  pdVec[V3] += v.pdVec[V3];
388  return *this;
389  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
Definition: matvec3.h:49
Vec3 Vec3::operator- ( const Vec3 v) const
inline

Definition at line 395 of file matvec3.h.

References pdVec, V1, V2, V3, and Vec3().

395  {
396  return Vec3(pdVec[V1]-v.pdVec[V1],
397  pdVec[V2]-v.pdVec[V2],
398  pdVec[V3]-v.pdVec[V3]);
399  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
Vec3(void)
Definition: matvec3.h:121
Definition: matvec3.h:49

Here is the call graph for this function:

Vec3& Vec3::operator-= ( const Vec3 v)
inline

Definition at line 405 of file matvec3.h.

References pdVec, V1, V2, and V3.

405  {
406  pdVec[V1] -= v.pdVec[V1];
407  pdVec[V2] -= v.pdVec[V2];
408  pdVec[V3] -= v.pdVec[V3];
409  return *this;
410  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
Definition: matvec3.h:49
Vec3 Vec3::operator/ ( const doublereal d) const
inline

Definition at line 453 of file matvec3.h.

References ASSERT, pdVec, V1, V2, V3, and Vec3().

453  {
454  ASSERT(d != 0.);
455  return Vec3(pdVec[V1]/d,
456  pdVec[V2]/d,
457  pdVec[V3]/d);
458  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
Vec3(void)
Definition: matvec3.h:121
#define ASSERT(expression)
Definition: colamd.c:977
Definition: matvec3.h:49

Here is the call graph for this function:

Vec3& Vec3::operator/= ( const doublereal d)
inline

Definition at line 464 of file matvec3.h.

References ASSERT, pdVec, V1, V2, and V3.

464  {
465  ASSERT(d != 0.);
466  pdVec[V1] /= d;
467  pdVec[V2] /= d;
468  pdVec[V3] /= d;
469  return *this;
470  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
#define ASSERT(expression)
Definition: colamd.c:977
Definition: matvec3.h:49
Vec3& Vec3::operator= ( const Vec3 v)
inline

Definition at line 362 of file matvec3.h.

References pdVec, V1, V2, and V3.

362  {
363  pdVec[V1] = v.pdVec[V1];
364  pdVec[V2] = v.pdVec[V2];
365  pdVec[V3] = v.pdVec[V3];
366 
367  return *this;
368  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
Definition: matvec3.h:49
doublereal& Vec3::operator[] ( unsigned short int  iRow)
inline

Definition at line 300 of file matvec3.h.

References ASSERT, and pdVec.

300  {
301  ASSERT(iRow <= 2);
302  return pdVec[iRow];
303  };
doublereal pdVec[3]
Definition: matvec3.h:109
#define ASSERT(expression)
Definition: colamd.c:977
const doublereal& Vec3::operator[] ( unsigned short int  iRow) const
inline

Definition at line 305 of file matvec3.h.

References ASSERT, and pdVec.

305  {
306  ASSERT(iRow <= 2);
307  return pdVec[iRow];
308  };
doublereal pdVec[3]
Definition: matvec3.h:109
#define ASSERT(expression)
Definition: colamd.c:977
const doublereal* Vec3::pGetVec ( void  ) const
inline

Definition at line 192 of file matvec3.h.

References pdVec.

Referenced by FullMatrixHandler::Add(), FullMatrixHandler::AddT(), DummyConstitutiveLaw< Vec3, Mat3x3 >::AfterConvergence(), grad::Vec3DirectExpr::bHaveReferenceTo(), NoRotor::Init(), UniformRotor::Init(), GlauertRotor::Init(), ManglerRotor::Init(), DynamicInflowRotor::Init(), PetersHeRotor::Init(), Beam2::InterpDeriv(), Beam::InterpDeriv(), Beam2::InterpState(), Beam::InterpState(), Mat3x3Diag_Manip::Manipulate(), MatCross_Manip::Manipulate(), MatCrossCross_Manip::Manipulate(), operator<<(), AbsoluteDispForce::Output(), InLineJoint::Output(), PrismaticJoint::Output(), SphericalHingeJoint::Output(), DeformableDispJoint::Output(), DeformableHingeJoint::Output(), DeformableJoint::Output(), Rod::Output(), Inertia::Output(), AbsoluteInternalDispForce::Output(), AutomaticStructDispElem::Output(), PlaneHingeJoint::Output(), UniversalRotationJoint::Output(), TotalJoint::Output(), StructDispNode::Output(), AbsoluteForce::Output(), Beam2::Output(), AutomaticStructElem::Output(), PlaneRotationJoint::Output(), Wheel4::Output(), Beam::Output(), AbsoluteCouple::Output(), TotalPinJoint::Output(), FollowerCouple::Output(), AxialRotationJoint::Output(), AbsoluteInternalForce::Output(), FollowerInternalForce::Output(), AbsoluteInternalCouple::Output(), FollowerInternalCouple::Output(), StructNode::Output(), Aerodynamic2DElem< iNN >::Output_int(), DataManager::OutputEigenvectors(), DataManager::OutputEigNaiveMatrices(), DataManager::OutputEigSparseMatrices(), Vec6::pGetVec(), FullMatrixHandler::Put(), FullSubMatrixHandler::PutCross(), SparseSubMatrixHandler::PutCross(), FullSubMatrixHandler::PutDiag(), SparseSubMatrixHandler::PutDiag(), FullMatrixHandler::PutT(), ExtModalForce::RecvFromFileDes(), StructExtForce::RecvFromStream(), StructMappingExtForce::RecvFromStream(), StructMembraneMappingExtForce::RecvFromStream(), StructExtForce::SendToFileDes(), StructMappingExtForce::SendToFileDes(), ExtModalForce::SendToFileDes(), StructMembraneMappingExtForce::SendToFileDes(), Mat3x3::Solve(), FullMatrixHandler::Sub(), FullMatrixHandler::SubT(), and DummyConstitutiveLaw< Vec3, Mat3x3 >::Update().

192  {
193  return pdVec;
194  };
doublereal pdVec[3]
Definition: matvec3.h:109
doublereal* Vec3::pGetVec ( void  )
inline

Definition at line 196 of file matvec3.h.

References pdVec.

196  {
197  return pdVec;
198  };
doublereal pdVec[3]
Definition: matvec3.h:109
void Vec3::Put ( unsigned short int  iRow,
const doublereal dCoef 
)
inline

Definition at line 276 of file matvec3.h.

References ASSERT, and pdVec.

Referenced by InLineJoint::AssRes(), BeamSliderJoint::AssRes(), InLineWithOffsetJoint::AssRes(), AerodynamicModal::AssVec(), InLineJoint::InitialAssRes(), InLineWithOffsetJoint::InitialAssRes(), and Vec6::Put().

276  {
277  ASSERT(iRow >= 1 && iRow <= 3);
278  pdVec[--iRow] = dCoef;
279  };
doublereal pdVec[3]
Definition: matvec3.h:109
#define ASSERT(expression)
Definition: colamd.c:977
void Vec3::PutTo ( doublereal pd) const
inline

Definition at line 339 of file matvec3.h.

References ASSERT, pdVec, V1, V2, and V3.

Referenced by AerodynamicBody::AssJac(), AerodynamicBeam::AssJac(), AerodynamicBeam2::AssJac(), AerodynamicBody::AssVec(), AerodynamicBeam::AssVec(), AerodynamicBeam2::AssVec(), and Vec6::PutTo().

339  {
340  ASSERT(pd != NULL);
341  pd[0] = pdVec[V1];
342  pd[1] = pdVec[V2];
343  pd[2] = pdVec[V3];
344  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
#define ASSERT(expression)
Definition: colamd.c:977
Definition: matvec3.h:49
void Vec3::Reset ( void  )

Definition at line 109 of file matvec3.cc.

References pdVec, V1, V2, and V3.

Referenced by AerodynamicBody::AssVec(), AerodynamicBeam::AssVec(), AerodynamicBeam2::AssVec(), Vec6::operator*=(), and Vec6::Reset().

110 {
111  pdVec[V1] = 0.;
112  pdVec[V2] = 0.;
113  pdVec[V3] = 0.;
114 }
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
Definition: matvec3.h:49
void Vec3::SubFrom ( doublereal pd) const
inline

Definition at line 328 of file matvec3.h.

References ASSERT, pdVec, V1, V2, and V3.

328  {
329  ASSERT(pd != NULL);
330  pd[0] -= pdVec[V1];
331  pd[1] -= pdVec[V2];
332  pd[2] -= pdVec[V3];
333  };
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
#define ASSERT(expression)
Definition: colamd.c:977
Definition: matvec3.h:49
Mat3x3 Vec3::Tens ( const Vec3 v) const

Definition at line 53 of file matvec3.cc.

References Mat3x3, pdVec, V1, V2, and V3.

Referenced by HydrodynamicPlainBearing::AssJac(), InlineFriction::AssJac(), RodBezier::AssJac(), ViscoElasticRod::AssJac(), RodWithOffset::AssJac(), PointSurfaceContact::AssMat(), Rod::AssMat(), Shell4EASANS::AssRes(), RodBezier::InitialAssJac(), ViscoElasticRod::InitialAssJac(), RodWithOffset::InitialAssJac(), CGR_Rot::MatGm1_Manip::Manipulate(), and VecExp::Tens().

54 {
55  return Mat3x3(pdVec[V1]*v.pdVec[V1],
56  pdVec[V2]*v.pdVec[V1],
57  pdVec[V3]*v.pdVec[V1],
58  pdVec[V1]*v.pdVec[V2],
59  pdVec[V2]*v.pdVec[V2],
60  pdVec[V3]*v.pdVec[V2],
61  pdVec[V1]*v.pdVec[V3],
62  pdVec[V2]*v.pdVec[V3],
63  pdVec[V3]*v.pdVec[V3]);
64 }
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
Definition: matvec3.h:49
friend class Mat3x3
Definition: matvec3.h:99
Mat3x3 Vec3::Tens ( void  ) const

Definition at line 68 of file matvec3.cc.

69 {
70  return Tens(*this);
71 }
Mat3x3 Tens(void) const
Definition: matvec3.cc:68
std::ostream & Vec3::Write ( std::ostream &  out,
const char *  sFill = " " 
) const

Definition at line 738 of file matvec3.cc.

References pdVec, V1, V2, and V3.

Referenced by AerodynamicBody::Output(), AerodynamicBeam::Output(), AerodynamicBeam2::Output(), ReadJoint(), ReadStructNode(), Vec3DriveOwner::Restart(), DispMeasure::Restart(), Accelerometer::Restart(), LinearVelocityJoint::Restart(), UniversalHingeJoint::Restart(), SphericalHingeJoint::Restart(), InPlaneJoint::Restart(), AutomaticStructDispElem::Restart(), DriveDisplacementJoint::Restart(), Gust1D::Restart(), ViscousBody::Restart(), RodBezier::Restart(), Brake::Restart(), PlaneHingeJoint::Restart(), DeformableDispJoint::Restart(), TotalEquation::Restart(), TotalJoint::Restart(), TranslAccel::Restart(), DeformableJoint::Restart(), AngularVelocityJoint::Restart(), DistanceJointWithOffset::Restart(), StructDispNode::Restart(), PinJoint::Restart(), RotAccel::Restart(), InPlaneWithOffsetJoint::Restart(), CentralGravity::Restart(), AutomaticStructElem::Restart(), DriveDisplacementPinJoint::Restart(), AbsoluteForce::Restart(), UniversalPinJoint::Restart(), ClampJoint::Restart(), RodWithOffset::Restart(), AerodynamicBody::Restart(), TotalReaction::Restart(), FollowerForce::Restart(), Body::Restart(), TotalPinJoint::Restart(), AerodynamicBeam::Restart(), AxialRotationJoint::Restart(), AerodynamicBeam2::Restart(), AbsoluteInternalForce::Restart(), TotalForce::Restart(), PlanePinJoint::Restart(), FollowerInternalForce::Restart(), StructNode::Restart(), HBeam::Restart_(), Beam2::Restart_(), Beam::Restart_(), and Write().

739 {
740  out << pdVec[V1] << sFill << pdVec[V2] << sFill << pdVec[V3];
741 
742  return out;
743 }
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
Definition: matvec3.h:49

Friends And Related Function Documentation

friend class Mat3x3
friend

Definition at line 99 of file matvec3.h.

Referenced by Cross(), and Tens().

friend class Mat3xN
friend

Definition at line 103 of file matvec3.h.

friend class MatNx3
friend

Definition at line 104 of file matvec3.h.

Vec3 operator- ( const Vec3 v)
friend

Definition at line 651 of file matvec3.cc.

652 {
653  return Vec3(-v.pdVec[V1],
654  -v.pdVec[V2],
655  -v.pdVec[V3]);
656 }
Definition: matvec3.h:50
doublereal pdVec[3]
Definition: matvec3.h:109
Definition: matvec3.h:51
Vec3(void)
Definition: matvec3.h:121
Definition: matvec3.h:49
friend class VecN
friend

Definition at line 102 of file matvec3.h.

Member Data Documentation


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