36 #include "AbstractBoxDomainPdeModifier.hpp" 37 #include "ReplicatableVector.hpp" 38 #include "LinearBasisFunction.hpp" 40 template<
unsigned DIM>
43 bool isNeumannBoundaryCondition,
49 isNeumannBoundaryCondition,
51 mpMeshCuboid(pMeshCuboid),
53 mSetBcsOnBoxBoundary(true)
63 template<
unsigned DIM>
68 template<
unsigned DIM>
74 template<
unsigned DIM>
80 template<
unsigned DIM>
86 template<
unsigned DIM>
94 template<
unsigned DIM>
120 c_vector<double,DIM> centre_of_coarse_mesh = zero_vector<double>(DIM);
131 template<
unsigned DIM>
138 cell_iter != rCellPopulation.
End();
142 double solution_at_cell = 0.0;
152 for (
unsigned i=0; i<DIM+1; i++)
155 solution_at_cell += nodal_value * weights(i);
163 c_vector<double, DIM> solution_gradient = zero_vector<double>(DIM);
166 c_matrix<double, DIM, DIM> jacobian, inverse_jacobian;
170 c_matrix<double, DIM, DIM+1> grad_phi;
173 for (
unsigned node_index=0; node_index<DIM+1; node_index++)
177 for (
unsigned j=0; j<DIM; j++)
179 solution_gradient(j) += nodal_value* grad_phi(j, node_index);
204 template<
unsigned DIM>
211 cell_iter != rCellPopulation.
End();
220 template<
unsigned DIM>
225 cell_iter != rCellPopulation.
End();
234 template<
unsigned DIM>
AbstractBoxDomainPdeModifier(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, boost::shared_ptr< ChasteCuboid< DIM > > pMeshCuboid=boost::shared_ptr< ChasteCuboid< DIM > >(), double stepSize=1.0, Vec solution=nullptr)
void InitialiseCellPdeElementMap(AbstractCellPopulation< DIM, DIM > &rCellPopulation)
c_vector< double, DIM > & rGetLocation()
boost::shared_ptr< ChasteCuboid< DIM > > mpMeshCuboid
unsigned GetNodeGlobalIndex(unsigned localIndex) const
void UpdateCellPdeElementMap(AbstractCellPopulation< DIM, DIM > &rCellPopulation)
unsigned GetContainingElementIndexWithInitialGuess(const ChastePoint< SPACE_DIM > &rTestPoint, unsigned startingElementGuess, bool strict=false)
virtual void Translate(const c_vector< double, SPACE_DIM > &rDisplacement)
void ConstructRegularSlabMesh(double spaceStep, double width, double height=0, double depth=0)
Node< SPACE_DIM > * GetNode(unsigned index) const
virtual void GetInverseJacobianForElement(unsigned elementIndex, c_matrix< double, SPACE_DIM, ELEMENT_DIM > &rJacobian, double &rJacobianDeterminant, c_matrix< double, ELEMENT_DIM, SPACE_DIM > &rInverseJacobian) const
bool mSetBcsOnBoxBoundary
virtual void SetupSolve(AbstractCellPopulation< DIM, DIM > &rCellPopulation, std::string outputDirectory)
Element< ELEMENT_DIM, SPACE_DIM > * GetElement(unsigned index) const
std::string mDependentVariableName
virtual unsigned GetNumNodes() const
virtual ~AbstractBoxDomainPdeModifier()
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)
std::map< CellPtr, unsigned > mCellPdeElementMap
void OutputSimulationModifierParameters(out_stream &rParamsFile)
unsigned GetContainingElementIndex(const ChastePoint< SPACE_DIM > &rTestPoint, bool strict=false, std::set< unsigned > testElements=std::set< unsigned >(), bool onlyTryWithTestElements=false)
virtual c_vector< double, SPACE_DIM > GetLocationOfCellCentre(CellPtr pCell)=0
void SetBcsOnBoxBoundary(bool setBcsOnBoxBoundary)
bool AreBcsSetOnBoxBoundary()
void GenerateFeMesh(boost::shared_ptr< ChasteCuboid< DIM > > pMeshCuboid, double stepSize)
void UpdateCellData(AbstractCellPopulation< DIM, DIM > &rCellPopulation)
c_vector< double, SPACE_DIM+1 > CalculateInterpolationWeights(const ChastePoint< SPACE_DIM > &rTestPoint)
virtual void SetupSolve(AbstractCellPopulation< DIM, DIM > &rCellPopulation, std::string outputDirectory)
TetrahedralMesh< DIM, DIM > * mpFeMesh