Program Listing for File CECompoundSubhinge.h

Program Listing for File CECompoundSubhinge.h#

Return to documentation for file (include/Karana/SOADyn/CECompoundSubhinge.h)

/*
*Copyright(c)2024-2025KaranaDynamicsPtyLtd.Allrightsreserved.
*
*NOTICETOUSER:
*
*Thissourcecodeand/ordocumentation(the"LicensedMaterials")is
*theconfidentialandproprietaryinformationofKaranaDynamicsInc.
*UseoftheseLicensedMaterialsisgovernedbythetermsandconditions
*ofaseparatesoftwarelicenseagreementbetweenKaranaDynamicsandthe
*Licensee("LicenseAgreement").Unlessexpresslypermittedunderthat
*agreement,anyreproduction,modification,distribution,ordisclosure
*oftheLicensedMaterials,inwholeorinpart,toanythirdparty
*withoutthepriorwrittenconsentofKaranaDynamicsisstrictlyprohibited.
*
*THELICENSEDMATERIALSAREPROVIDED"ASIS"WITHOUTWARRANTYOFANYKIND.
*KARANADYNAMICSDISCLAIMSALLWARRANTIES,EXPRESSORIMPLIED,INCLUDING
*BUTNOTLIMITEDTOWARRANTIESOFMERCHANTABILITY,NON-INFRINGEMENT,AND
*FITNESSFORAPARTICULARPURPOSE.
*
*INNOEVENTSHALLKARANADYNAMICSBELIABLEFORANYDAMAGESWHATSOEVER,
*INCLUDINGBUTNOTLIMITEDTOLOSSOFPROFITS,DATA,ORUSE,EVENIF
*ADVISEDOFTHEPOSSIBILITYOFSUCHDAMAGES,WHETHERINCONTRACT,TORT,
*OROTHERWISEARISINGOUTOFORINCONNECTIONWITHTHELICENSEDMATERIALS.
*
*U.S.GovernmentEndUsers:TheLicensedMaterialsarea"commercialitem"
*asdefinedat48C.F.R.2.101,andareprovidedtotheU.S.Government
*onlyasacommercialenditemunderthetermsofthislicense.
*
*AnyuseoftheLicensedMaterialsinindividualorcommercialsoftwaremust
*include,intheuserdocumentationandinternalsourcecodecomments,
*thisNotice,Disclaimer,andU.S.GovernmentUseProvision.
*/


#pragmaonce

#include<map>
#include<memory>
#include<unordered_map>
#include<utility>

#include"Karana/SOADyn/CompoundSubhinge.h"

namespaceKarana::Dynamics{

namespacekc=Karana::Core;
namespacekm=Karana::Math;

classCompoundHinge;
classCompoundBody;
classPhysicalBody;

classCECompoundSubhinge:publicCompoundSubhinge{

/*foraccessto_setNu()*/
friendclassCECompoundBody;

public:
virtual~CECompoundSubhinge();

virtualconststd::string&typeString()constnoexceptoverride{
staticstd::stringtype_string="Karana::Dynamics::CECompoundSubhinge";
returntype_string;
}

//std::stringdumpString(conststd::string&prefix,
//constKarana::Core::Base::dumpOptions*options)constoverride;

voidsetQ(constEigen::Ref<constkm::Vec>&val)override;
//voidsetQ(doublefill_value)override;
constkm::Vec&getQ()constoverride;

voidsetU(constEigen::Ref<constkm::Vec>&val)override;
//voidsetU(doublefill_value)override;
constkm::Vec&getU()constoverride;

voidsetT(constEigen::Ref<constkm::Vec>&val)override;
//voidsetT(doublefill_value)override;
constkm::Vec&getT()constoverride;

voidsetUdot(constEigen::Ref<constkm::Vec>&val)override;
//voidsetUdot(doublefill_value)override;
constkm::Vec&getUdot()constoverride;

//virtualvoidsetQ(constkm::Vec&val)override;
constkm::Vec&getQdot()constoverride;

//constkm::Mat&coordMapMatrix()constoverride;

CECompoundSubhinge(kc::ks_ptr<CompoundHinge>hge,size_tindep_nU);

protected:
#if0
virtualkm::Vec_toDependentQ(constkm::Vecmin_Q)const=0;

virtualkm::Vec_toIndependentQ(constkm::Vecmin_Q)const=0;

virtualkm::Mat_constraintX()const=0;

virtualkm::Mat_constraintXdot()const=0;

virtualkm::Mat_invConstraintX()const=0;
#endif

/*Thenbodiessizerowmatrixwith\phi(vroot_pnode,pnode)6x6
matrixelementsforthe$\phi$matrixfromthephysicalvirtual
rootbody'spnodetothepnodeofeachaggregatedphysical
body.ThisisdenotedA(p,G)=E_GA_GinSection18.3.1.*/
//constkm::Mat&getE_Phi_G()const{return_E_Phi_G_cache->get();}

constkm::MatatbiCoordMapMatrix()constoverride;
//void_computeATBICoordMapMatrix(km::Mat&val);

//void_discard(kc::ks_ptr<Base>&base)override;

/*Foracompoundhingethisisthesameasthecoordmapmatrix*/
//void_computeATBICoordMapMatrix(km::Mat&val)constoverride;
//void_computeATBICoordMapMatrix(km::Mat&val)constoverride;
//km::MatatbiCoordMapMatrix();

//km::Mat66_getVrootPnodeATBIMatrixP();

//km::SpatialVector_getVrootPnodeATBIFilterZ();

//km::SpatialVector_getVrootPnodeInvDynF();

//km::Mat66_getBaseOnodeATBIMatrixPlus(kc::ks_ptr<HingeOnode>base_ond);
//km::SpatialVector_getBaseOnodeATBIFilterZplus(kc::ks_ptr<HingeOnode>base_ond);

/*setthe_nUforthesubhingetotheindependentcoordssizefor
theembeddedbody*/
//void_setNu(size_tnU);

protected:
/*CoordDatafortheindependentCoordBaseforthiscompound
body*/
kc::ks_ptr<CoordData>_indep_coord_data=nullptr;

//kc::ks_ptr<CompoundBody>_parent_body=nullptr;

//void_computeE_Phi_G(km::Mat&val);

mutablekm::Mat_dependent_coord_map_matrix;

protected:
size_t_dependents_nU=0;

mutablekm::Vec_getQ_min_cache;

//mutablekm::Vec_getQdot_min_cache;

mutablekm::Vec_getU_min_cache;

mutablekm::Vec_getUdot_min_cache;

mutablekm::Vec_getT_min_cache;

//std::map<std::pair<kc::id_t,kc::id_t>,bool>_body_pnodes_orientation_map;

//std::unordered_map<kc::id_t,kc::ks_ptr<kc::DataCache<km::SpatialVector>>>
//_aprime_caches;

//kc::ks_ptr<kc::DataCache<km::Mat>>_E_Phi_G_cache=nullptr;
};

}//namespaceKarana::Dynamics