79 [[maybe_unused]]
const std::map<
Node<SPACE_DIM>*, c_vector<double, SPACE_DIM> >& rOldLocations)
81 if constexpr ((SPACE_DIM == 2) || (SPACE_DIM == 3))
86 EXCEPTION(
"PlaneBoundaryCondition requires a subclass of AbstractOffLatticeCellPopulation.");
93 double max_jiggle = 1e-4;
98 cell_iter != this->mpCellPopulation->End();
101 unsigned node_index = this->mpCellPopulation->GetLocationIndexUsingCell(*cell_iter);
104 c_vector<double, SPACE_DIM> node_location = p_node->
rGetLocation();
106 double signed_distance = inner_prod(node_location - mPointOnPlane, mNormalToPlane);
107 if (signed_distance > 0.0)
110 c_vector<double, SPACE_DIM> nearest_point;
111 if (mUseJiggledNodesOnPlane)
117 nearest_point = node_location - signed_distance*mNormalToPlane;
125 assert(SPACE_DIM == ELEMENT_DIM);
129 unsigned num_nodes = this->mpCellPopulation->GetNumNodes();
130 for (
unsigned node_index=0; node_index<num_nodes; node_index++)
133 c_vector<double, SPACE_DIM> node_location = p_node->
rGetLocation();
135 double signed_distance = inner_prod(node_location - mPointOnPlane, mNormalToPlane);
136 if (signed_distance > 0.0)
139 c_vector<double, SPACE_DIM> nearest_point;
140 if (mUseJiggledNodesOnPlane)
146 nearest_point = node_location - signed_distance*mNormalToPlane;
190 *rParamsFile <<
"\t\t\t<PointOnPlane>";
191 for (
unsigned index=0; index != SPACE_DIM-1U; index++)
193 *rParamsFile << mPointOnPlane[index] <<
",";
195 *rParamsFile << mPointOnPlane[SPACE_DIM-1] <<
"</PointOnPlane>\n";
197 *rParamsFile <<
"\t\t\t<NormalToPlane>";
198 for (
unsigned index=0; index != SPACE_DIM-1U; index++)
200 *rParamsFile << mNormalToPlane[index] <<
",";
202 *rParamsFile << mNormalToPlane[SPACE_DIM-1] <<
"</NormalToPlane>\n";
203 *rParamsFile <<
"\t\t\t<UseJiggledNodesOnPlane>" << mUseJiggledNodesOnPlane <<
"</UseJiggledNodesOnPlane>\n";