/** * Does the projection between ... space and the ... space. Also checks for Q-inflow boundary * conditions at the inflow of the current arterial segment and applies the Q-inflow if specified */ void PulseWavePropagation::SetPulseWaveBoundaryConditions( const Array<OneD,const Array<OneD, NekDouble> >&inarray, Array<OneD, Array<OneD, NekDouble> >&outarray, const NekDouble time) { int omega; Array<OneD, MultiRegions::ExpListSharedPtr> vessel(2); int offset=0; //This will be moved to the RCR boundary condition once factory is setup if (time == 0) { m_Boundary = Array<OneD,PulseWaveBoundarySharedPtr>(2*m_nDomains); for(omega = 0; omega < m_nDomains; ++omega) { vessel[0] = m_vessels[2*omega]; for(int j = 0; j < 2; ++j) { std::string BCType =vessel[0]->GetBndConditions()[j]->GetUserDefined(); if(BCType.empty()) // if not condition given define it to be NoUserDefined { BCType = "NoUserDefined"; } m_Boundary[2*omega+j]=GetBoundaryFactory().CreateInstance(BCType,m_vessels,m_session,m_pressureArea); // turn on time depedent BCs if(BCType == "Q-inflow") { vessel[0]->GetBndConditions()[j]->SetIsTimeDependent(true); } else if(BCType == "RCR-terminal") { vessel[0]->GetBndConditions()[j]->SetIsTimeDependent(true); } } } } SetBoundaryConditions(time); // Loop over all vessesls and set boundary conditions for(omega = 0; omega < m_nDomains; ++omega) { for(int n = 0; n < 2; ++n) { m_Boundary[2*omega+n]->DoBoundary(inarray,m_A_0,m_beta,time,omega,offset,n); } offset += m_vessels[2*omega]->GetTotPoints(); } }
void TreeConstruct(const mist::array3<short>& image, tmatsu::artery::Tree& tree, tmatsu::Point seedPoint ) { tmatsu::artery::CTImage vessel(image); tmatsu::artery::ThicknessImage centerline; vessel.thinning(centerline); tree.construct(centerline, seedPoint); vessel.clear(); centerline.clear(); }