36 #include "AbstractGrowingDomainPdeModifier.hpp" 37 #include "VertexBasedCellPopulation.hpp" 38 #include "MeshBasedCellPopulation.hpp" 39 #include "CaBasedCellPopulation.hpp" 40 #include "NodeBasedCellPopulation.hpp" 41 #include "ReplicatableVector.hpp" 42 #include "LinearBasisFunction.hpp" 44 template <
unsigned DIM>
47 bool isNeumannBoundaryCondition,
51 isNeumannBoundaryCondition,
56 template<
unsigned DIM>
61 template<
unsigned DIM>
83 template<
unsigned DIM>
90 unsigned cell_index = 0;
92 unsigned index_in_solution_repl = 0;
94 cell_iter != rCellPopulation.
End();
108 tet_node_index = cell_index;
113 tet_node_index = index_in_solution_repl;
114 index_in_solution_repl++;
117 double solution_at_node = solution_repl[tet_node_index];
124 c_vector<double, DIM> solution_gradient = zero_vector<double>(DIM);
130 element_iter != p_tet_node->ContainingElementsEnd();
134 c_matrix<double, DIM, DIM> jacobian, inverse_jacobian;
138 c_matrix<double, DIM, DIM+1> grad_phi;
142 for (
unsigned node_index=0; node_index<DIM+1; node_index++)
144 double nodal_value = solution_repl[this->
mpFeMesh->
GetElement(*element_iter)->GetNodeGlobalIndex(node_index)];
146 for (
unsigned j=0; j<DIM; j++)
148 solution_gradient(j) += nodal_value* grad_phi(j, node_index);
154 solution_gradient /= p_tet_node->GetNumContainingElements();
177 template<
unsigned DIM>
AbstractGrowingDomainPdeModifier(boost::shared_ptr< AbstractLinearPde< DIM, DIM > > pPde=boost::shared_ptr< AbstractLinearPde< DIM, DIM > >(), boost::shared_ptr< AbstractBoundaryCondition< DIM > > pBoundaryCondition=boost::shared_ptr< AbstractBoundaryCondition< DIM > >(), bool isNeumannBoundaryCondition=true, Vec solution=nullptr)
unsigned GetLocationIndexUsingCell(CellPtr pCell)
Node< SPACE_DIM > * GetNode(unsigned index) const
void UpdateCellData(AbstractCellPopulation< DIM, DIM > &rCellPopulation)
virtual void GetInverseJacobianForElement(unsigned elementIndex, c_matrix< double, SPACE_DIM, ELEMENT_DIM > &rJacobian, double &rJacobianDeterminant, c_matrix< double, ELEMENT_DIM, SPACE_DIM > &rInverseJacobian) const
Element< ELEMENT_DIM, SPACE_DIM > * GetElement(unsigned index) const
std::string mDependentVariableName
void OutputSimulationModifierParameters(out_stream &rParamsFile)
static void ComputeTransformedBasisFunctionDerivatives(const ChastePoint< ELEMENT_DIM > &rPoint, const c_matrix< double, ELEMENT_DIM, ELEMENT_DIM > &rInverseJacobian, c_matrix< double, ELEMENT_DIM, ELEMENT_DIM+1 > &rReturnValue)
void OutputSimulationModifierParameters(out_stream &rParamsFile)
void GenerateFeMesh(AbstractCellPopulation< DIM, DIM > &rCellPopulation)
virtual ~AbstractGrowingDomainPdeModifier()
virtual TetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * GetTetrahedralMeshForPdeModifier()=0
virtual unsigned GetNumNodes()=0
TetrahedralMesh< DIM, DIM > * mpFeMesh