FEBio  1.5.0
FEBio/FETriphasicDomain.h
00001 #pragma once
00002 #include "FEElasticSolidDomain.h"
00003 
00004 //-----------------------------------------------------------------------------
00009 class FETriphasicDomain : public FEElasticSolidDomain
00010 {
00011 public:
00013         FETriphasicDomain(FEMesh* pm, FEMaterial* pmat) : FEElasticSolidDomain(pm, pmat) { m_ntype = FE_TRIPHASIC_DOMAIN; }
00014         
00015         FEDomain* Clone()
00016         {
00017                 FETriphasicDomain* pd = new FETriphasicDomain(m_pMesh, m_pMat);
00018                 pd->m_Elem = m_Elem; pd->m_pMesh = m_pMesh; pd->m_Node = m_Node;
00019                 return pd;
00020         }
00021         
00023         void InitElements();
00024         
00026         void StiffnessMatrix(FESolidSolver* psolver);
00027         
00029         void Residual(FESolidSolver* psolver, vector<double>& R);
00030         
00032         bool Initialize(FEModel& fem);
00033         
00034         // update stresses
00035         void UpdateStresses(FEModel& fem);
00036         
00038         void ElementStiffness(FEM& fem, int iel, matrix& ke) {
00039                 FESolidElement& el = Element(iel);
00040                 ElementTriphasicStiffness(fem, el, ke);
00041         }
00042         
00043 protected:
00045         bool InternalFluidWork(FEM& fem, FESolidElement& elem, vector<double>& fe);
00046         
00048         bool InternalFluidWorkSS(FEM& fem, FESolidElement& elem, vector<double>& fe);
00049         
00051         bool InternalSoluteWork(FEM& fem, FESolidElement& elem, vector<double>& fe, const int ion);
00052         
00054         bool InternalSoluteWorkSS(FEM& fem, FESolidElement& elem, vector<double>& fe, const int ion);
00055         
00057         bool ElementTriphasicStiffness(FEM& fem, FESolidElement& el, matrix& ke);
00058         
00060         bool ElementTriphasicStiffnessSS(FEM& fem, FESolidElement& el, matrix& ke);
00061         
00063         void SolidElementStiffness(FEM& fem, FESolidElement& el, matrix& ke);
00064         
00066         void TriphasicMaterialStiffness(FEM& fem, FESolidElement& el, matrix& ke);
00067         
00068 };