KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
mpm_search_element_utility.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ \.
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Bodhinanda Chandra
11 //
12 
13 
14 #pragma once
15 
16 // System includes
17 
18 // External includes
19 
20 // Project includes
21 #include "includes/define.h"
25 #include "geometries/geometry.h"
26 #include "includes/model_part.h"
28 
30 {
31  // Standard types
32  typedef std::size_t IndexType;
33  typedef std::size_t SizeType;
34  typedef Node NodeType;
36 
37 
38  inline double CrossProductDet2D(
39  array_1d<double, 3> VectorA,
40  array_1d<double, 3> VectorB
41  )
42  {
43  return (VectorA[0] * VectorB[1] - VectorB[0] * VectorA[1]);
44  }
45 
46 
47  inline bool CheckIsInside(
48  const GeometryType& rGeom,
49  array_1d<double, 3>& LocalCoords,
50  const array_1d<double, 3>& Coords,
51  const double Tolerance
52  )
53  {
54  // TODO some optimisation for simple 2D shapes.
55  return rGeom.IsInside(Coords, LocalCoords, Tolerance);
56  }
57 
58 
60  GeometryType& rGeom,
61  const ModelPart& rBackgroundGridModelPart
62  )
63  {
64  std::vector<typename Geometry<Node>::Pointer> geometry_neighbours;
65  for (IndexType j = 0; j < rBackgroundGridModelPart.NumberOfElements(); j++)
66  {
67  auto p_geometry_neighbour = (rBackgroundGridModelPart.ElementsBegin() + j)->pGetGeometry();
68  if (p_geometry_neighbour->Id() != rGeom.Id()) // dont add the parent as its own neighbour
69  {
70  for (IndexType n = 0; n < p_geometry_neighbour->size(); n++)
71  {
72  for (IndexType k = 0; k < rGeom.size(); k++)
73  {
74  if (rGeom[k].Id() == (*p_geometry_neighbour)[n].Id()) {
75  // Prevent duplicate additions
76  bool add_entry = true;
77  for (size_t i = 0; i < geometry_neighbours.size(); i++)
78  {
79  if (geometry_neighbours[i]->Id() == p_geometry_neighbour->Id())
80  {
81  add_entry = false;
82  break;
83  }
84  }
85  if (add_entry) {
86  geometry_neighbours.push_back(p_geometry_neighbour);
87  }
88  break;
89  }
90  }
91  }
92  }
93  }
94  #pragma omp critical
95  rGeom.SetValue(GEOMETRY_NEIGHBOURS, geometry_neighbours);
96  }
97 
98 
100  GeometryType::Pointer pQuadraturePoint,
101  const ProcessInfo& rProcessInfo
102  )
103  {
104  if (rProcessInfo.Has(IS_FIX_EXPLICIT_MP_ON_GRID_EDGE)) {
105  if (rProcessInfo.GetValue(IS_FIX_EXPLICIT_MP_ON_GRID_EDGE)) {
106  if (pQuadraturePoint->IntegrationPointsNumber() == 1) {
107  for (size_t i = 0; i < pQuadraturePoint->ShapeFunctionsValues().size2(); ++i) {
108  if (pQuadraturePoint->ShapeFunctionsValues()(0, i) < std::numeric_limits<double>::epsilon()) {
109  return true;
110  }
111  }
112  }
113  }
114  }
115  return false;
116  }
117 
119  GeometryType& rParentGeom,
120  const ModelPart& rBackgroundGridModelPart,
121  const double Tolerance,
122  const array_1d<double, 3>& xg,
123  array_1d<double, 3>& rLocalCoords,
124  const ProcessInfo& rProcessInfo,
125  bool& IsFound
126  )
127  {
128  IsFound = false;
129  if (CheckIsInside(rParentGeom, rLocalCoords, xg, Tolerance)) {
130  IsFound = true;
131  return rParentGeom;
132  } else {
133  if (!rParentGeom.Has(GEOMETRY_NEIGHBOURS)) {
134  ConstructNeighbourRelations(rParentGeom, rBackgroundGridModelPart);
135  }
136  auto& geometry_neighbours = rParentGeom.GetValue(GEOMETRY_NEIGHBOURS);
137  for (IndexType k = 0; k < geometry_neighbours.size(); ++k) {
138  if (CheckIsInside(*geometry_neighbours[k], rLocalCoords, xg, Tolerance)) {
139  IsFound = true;
140  return *(geometry_neighbours[k].get());
141  }
142  }
143  }
144  return rParentGeom;
145  }
146 
147 
149  const ModelPart& rBackgroundGridModelPart,
150  const array_1d<double, 3>& rCoordinates,
151  Element& rMasterMaterialPoint,
152  typename GeometryType::Pointer pQuadraturePointGeometry,
153  const double Tolerance
154  )
155  {
156  KRATOS_TRY;
157 
158  array_1d<double, 3> local_coords;
159  pQuadraturePointGeometry->IsInside(rCoordinates, local_coords, Tolerance);
160  PQMPMPartitionUtilities::PartitionMasterMaterialPointsIntoSubPoints(rBackgroundGridModelPart, rCoordinates,
161  local_coords, rMasterMaterialPoint, pQuadraturePointGeometry, Tolerance);
162 
163  KRATOS_CATCH("");
164  }
165 
166 
168  const ModelPart& rMPMModelPart,
169  const ModelPart& rBackgroundGridModelPart,
170  std::vector<typename Element::Pointer>& rMissingElements,
171  const double Tolerance
172  )
173  {
174  #pragma omp parallel for
175  for (int i = 0; i < static_cast<int>(rMPMModelPart.Elements().size()); ++i) {
176  auto element_itr = (rMPMModelPart.ElementsBegin() + i);
177  array_1d<double, 3> local_coordinates;
178  bool is_found = false;
179  std::vector<array_1d<double, 3>> xg;
180  element_itr->CalculateOnIntegrationPoints(MP_COORD, xg, rBackgroundGridModelPart.GetProcessInfo());
181 
182  GeometryType& r_found_geom = FindGridGeom(element_itr->GetGeometry().GetGeometryParent(0),
183  rBackgroundGridModelPart, Tolerance, xg[0], local_coordinates,
184  rMPMModelPart.GetProcessInfo(), is_found);
185 
186  if (is_found) {
187  const bool is_pqmpm = (rBackgroundGridModelPart.GetProcessInfo().Has(IS_PQMPM))
188  ? rBackgroundGridModelPart.GetProcessInfo().GetValue(IS_PQMPM) : false;
189  if (is_pqmpm) {
190  // Updates the quadrature point geometry.
191  (*element_itr).GetGeometry().SetGeometryParent(&r_found_geom);
193  local_coordinates, *element_itr, element_itr->pGetGeometry(), Tolerance);
194  } else {
196  element_itr->pGetGeometry(), local_coordinates,
197  element_itr->GetGeometry().IntegrationPoints()[0].Weight(), r_found_geom);
198  }
199  if (IsExplicitAndNeedsCorrection(element_itr->pGetGeometry(), rBackgroundGridModelPart.GetProcessInfo())) {
200  is_found = false;
201  } else {
202  for (IndexType j = 0; j < r_found_geom.PointsNumber(); ++j) {
203  r_found_geom.Points()[j].Set(ACTIVE);
204  }
205  }
206  } else {
207  #pragma omp critical
208  rMissingElements.push_back(&*element_itr);
209  }
210  }
211  }
212 
213 
215  const ModelPart& rMPMModelPart,
216  const ModelPart& rBackgroundGridModelPart,
217  std::vector<typename Condition::Pointer>& rMissingConditions,
218  const double Tolerance
219  )
220  {
221  #pragma omp parallel for
222  for (int i = 0; i < static_cast<int>(rMPMModelPart.Conditions().size()); ++i) {
223  auto condition_itr = rMPMModelPart.Conditions().begin() + i;
224  std::vector<array_1d<double, 3>> xg;
225  condition_itr->CalculateOnIntegrationPoints(MPC_COORD, xg, rMPMModelPart.GetProcessInfo());
226 
227  if (xg.size() > 0 && condition_itr->Is(BOUNDARY)) {
228  array_1d<double, 3> local_coordinates;
229  bool is_found = false;
230 
231  GeometryType& r_found_geom = FindGridGeom(condition_itr->GetGeometry().GetGeometryParent(0),
232  rBackgroundGridModelPart, Tolerance, xg[0], local_coordinates,
233  rMPMModelPart.GetProcessInfo(), is_found);
234 
235  if (is_found) {
237  condition_itr->pGetGeometry(), local_coordinates,
238  condition_itr->GetGeometry().IntegrationPoints()[0].Weight(), r_found_geom);
239 
240  for (IndexType j = 0; j < r_found_geom.PointsNumber(); ++j) {
241  r_found_geom[j].Set(ACTIVE);
242  }
243  } else {
244  #pragma omp critical
245  rMissingConditions.push_back(&*condition_itr);
246  }
247  }
248  }
249  }
250 
251 
253  const Vector& N,
254  const ProcessInfo& rProcessInfo
255  )
256  {
257  if (rProcessInfo.Has(IS_FIX_EXPLICIT_MP_ON_GRID_EDGE)) {
258  if (rProcessInfo.GetValue(IS_FIX_EXPLICIT_MP_ON_GRID_EDGE)) {
259  // check if MP is exactly on the edge of the element, this gives spurious strains in explicit
260  for (SizeType i = 0; i < N.size(); ++i) {
261  if (std::abs(N[i]) < std::numeric_limits<double>::epsilon()) {
262  return true;
263  }
264  }
265  }
266  }
267  return false;
268  }
269 
270 
271  template <std::size_t TDimension>
273  ModelPart& rMPMModelPart,
274  ModelPart& rBackgroundGridModelPart,
275  std::vector<typename Element::Pointer>& rMissingElements,
276  std::vector<typename Condition::Pointer>& rMissingConditions,
277  const std::size_t MaxNumberOfResults,
278  const double Tolerance
279  )
280  {
281  const ProcessInfo& r_process_info = rBackgroundGridModelPart.GetProcessInfo();
282  bool is_pqmpm = (r_process_info.Has(IS_PQMPM))
283  ? r_process_info.GetValue(IS_PQMPM) : false;
284 
285  // Search background grid and make element active
286  Vector N;
287  const int max_result = 1000;
288 
289  #pragma omp parallel
290  {
291  BinBasedFastPointLocator<TDimension> SearchStructure(rBackgroundGridModelPart);
292  SearchStructure.UpdateSearchDatabase();
294 
295  // Element search and assign background grid
296  #pragma omp for
297  for (int i = 0; i < static_cast<int>(rMissingElements.size()); ++i) {
298  auto element_itr = *(rMissingElements.begin() + i);
299  std::vector<array_1d<double, 3>> xg;
300  element_itr->CalculateOnIntegrationPoints(MP_COORD, xg, rMPMModelPart.GetProcessInfo());
301  typename BinBasedFastPointLocator<TDimension>::ResultIteratorType result_begin = results.begin();
302  Element::Pointer pelem;
303 
304  // FindPointOnMesh find the background element in which a given point falls and the relative shape functions
305  bool is_found = SearchStructure.FindPointOnMesh(xg[0], N, pelem, result_begin, MaxNumberOfResults, Tolerance);
306 
307  if (is_found) {
308  pelem->Set(ACTIVE);
309 
310  if (IsFixExplicitAndOnElementEdge(N, r_process_info) && !is_pqmpm) {
311  // MP is exactly on the edge. Now we give it a little 'nudge'
312  array_1d<double, 3> xg_nudged = array_1d<double, 3>(xg[0]);
313  std::vector<array_1d<double, 3>> mp_vel;
314  element_itr->CalculateOnIntegrationPoints(MP_VELOCITY, mp_vel, rMPMModelPart.GetProcessInfo());
315  xg_nudged += r_process_info[DELTA_TIME] / 1000.0 * mp_vel[0];
316  if (SearchStructure.FindPointOnMesh(xg_nudged, N, pelem, result_begin, MaxNumberOfResults, Tolerance)) {
317  element_itr->SetValuesOnIntegrationPoints(MP_COORD, { xg_nudged }, rMPMModelPart.GetProcessInfo());
318  KRATOS_INFO("MPMSearchElementUtility") << "WARNING: To prevent spurious explicit stresses, Material Point "
319  << element_itr->Id() << " was nudged." << std::endl;
320  } else {
321  is_found = SearchStructure.FindPointOnMesh(xg[0], N, pelem, result_begin, MaxNumberOfResults, Tolerance);
322  KRATOS_INFO("MPMSearchElementUtility") << "WARNING: Material Point " << element_itr->Id()
323  << " lies exactly on an element edge and may give spurious results." << std::endl;
324  }
325  }
326  if (is_pqmpm) {
327  // Updates the quadrature point geometry.
328  (*element_itr).GetGeometry().SetGeometryParent((pelem->pGetGeometry().get()));
329  UpdatePartitionedQuadraturePoint(rBackgroundGridModelPart, xg[0],
330  *element_itr, pelem->pGetGeometry(), Tolerance);
331  } else {
332  auto p_quadrature_point_geometry = element_itr->pGetGeometry();
333  array_1d<double, 3> local_coordinates;
334  pelem->pGetGeometry()->PointLocalCoordinates(local_coordinates, xg[0]);
336  p_quadrature_point_geometry, local_coordinates,
337  p_quadrature_point_geometry->IntegrationPoints()[0].Weight(), pelem->GetGeometry());
338  }
339  auto& r_geometry = element_itr->GetGeometry();
340  for (IndexType j = 0; j < r_geometry.PointsNumber(); ++j) {
341  r_geometry[j].Set(ACTIVE);
342  }
343  } else {
344  KRATOS_INFO("MPMSearchElementUtility") << "WARNING: Search Element for Material Point: "
345  << element_itr->Id() << " is failed. Geometry is cleared." << std::endl;
346  element_itr->GetGeometry().clear();
347  element_itr->Reset(ACTIVE);
348  element_itr->Set(TO_ERASE);
349  }
350  }
351 
352  // Condition search and assign background grid
353  #pragma omp for
354  for (int i = 0; i < static_cast<int>(rMissingConditions.size()); ++i) {
355  auto condition_itr = *(rMissingConditions.begin() + i);
356  std::vector<array_1d<double, 3>> xg;
357  condition_itr->CalculateOnIntegrationPoints(MPC_COORD, xg, rMPMModelPart.GetProcessInfo());
358 
359  if (xg.size() > 0) {
360  // Only search for particle based BCs!
361  // Grid BCs are still applied on MP_model_part but we don't want to search for them.
362  typename BinBasedFastPointLocator<TDimension>::ResultIteratorType result_begin = results.begin();
363  Element::Pointer pelem;
364 
365  // FindPointOnMesh find the background element in which a given point falls and the relative shape functions
366  bool is_found = SearchStructure.FindPointOnMesh(xg[0], N, pelem, result_begin, MaxNumberOfResults, Tolerance);
367 
368  if (is_found) {
369  auto p_quadrature_point_geometry = condition_itr->pGetGeometry();
370  array_1d<double, 3> local_coordinates;
371  pelem->pGetGeometry()->PointLocalCoordinates(local_coordinates, xg[0]);
373  p_quadrature_point_geometry, local_coordinates,
374  p_quadrature_point_geometry->IntegrationPoints()[0].Weight(), pelem->GetGeometry());
375 
376  auto& r_geometry = condition_itr->GetGeometry();
377 
378  for (IndexType j = 0; j < r_geometry.PointsNumber(); ++j) {
379  r_geometry[j].Set(ACTIVE);
380  }
381  } else {
382  KRATOS_INFO("MPMSearchElementUtility") << "WARNING: Search Element for Material Point Condition: " << condition_itr->Id()
383  << " is failed. Geometry is cleared." << std::endl;
384  condition_itr->GetGeometry().clear();
385  condition_itr->Reset(ACTIVE);
386  condition_itr->Set(TO_ERASE);
387  }
388  }
389  }
390  }
391  }
392 
393 
394  inline void ResetElementsAndNodes(ModelPart& rBackgroundGridModelPart)
395  {
396  #pragma omp parallel for
397  for (int i = 0; i < static_cast<int>(rBackgroundGridModelPart.Elements().size()); ++i) {
398  auto element_itr = rBackgroundGridModelPart.Elements().begin() + i;
399  element_itr->Reset(ACTIVE);
400  auto& r_geometry = element_itr->GetGeometry();
401  for (IndexType j = 0; j < r_geometry.PointsNumber(); ++j) {
402  r_geometry[j].Reset(ACTIVE);
403  }
404  }
405  }
406 
407 
418  template<std::size_t TDimension>
420  ModelPart& rBackgroundGridModelPart,
421  ModelPart& rMPMModelPart,
422  const std::size_t MaxNumberOfResults,
423  const double Tolerance
424  )
425  {
426  ResetElementsAndNodes(rBackgroundGridModelPart);
427 
428  std::vector<typename Element::Pointer> missing_elements;
429  std::vector<typename Condition::Pointer> missing_conditions;
430 
431  if (!rMPMModelPart.GetProcessInfo()[IS_RESTARTED]) {
432  NeighbourSearchElements(rMPMModelPart, rBackgroundGridModelPart, missing_elements, Tolerance);
433  NeighbourSearchConditions(rMPMModelPart, rBackgroundGridModelPart, missing_conditions, Tolerance);
434  } else {
435  missing_elements.resize(rMPMModelPart.Elements().size());
436  IndexPartition(rMPMModelPart.Elements().size()).for_each([&](std::size_t i){
437  missing_elements[i] = &*(rMPMModelPart.ElementsBegin() + i); // maybe add/remove *&?
438  });
439 
440  missing_conditions.resize(rMPMModelPart.Conditions().size());
441  IndexPartition(rMPMModelPart.Conditions().size()).for_each([&](std::size_t i){
442  missing_conditions[i] = &*(rMPMModelPart.Conditions().begin() + i); // maybe add/remove *&?
443  });
444  }
445 
446  if (missing_conditions.size() > 0 || missing_elements.size() > 0) {
447  BinBasedSearchElementsAndConditions<TDimension>(rMPMModelPart,
448  rBackgroundGridModelPart, missing_elements, missing_conditions,
449  MaxNumberOfResults, Tolerance);
450  }
451  }
452 } // end namespace Kratos::MPMSearchElementUtility
This class is designed to allow the fast location of MANY points on the top of a 3D mesh.
Definition: binbased_fast_point_locator.h:68
ConfigureType::ResultIteratorType ResultIteratorType
Definition: binbased_fast_point_locator.h:82
ConfigureType::ResultContainerType ResultContainerType
Definition: binbased_fast_point_locator.h:81
static void UpdateFromLocalCoordinates(typename GeometryType::Pointer pGeometry, const array_1d< double, 3 > &rLocalCoordinates, const double rIntegrationWeight, GeometryType &rParentGeometry)
Definition: quadrature_points_utility.h:373
bool Has(const Variable< TDataType > &rThisVariable) const
Checks if the data container has a value associated with a given variable.
Definition: data_value_container.h:382
TDataType & GetValue(const Variable< TDataType > &rThisVariable)
Gets the value associated with a given variable.
Definition: data_value_container.h:268
Base class for all Elements.
Definition: element.h:60
Geometry base class.
Definition: geometry.h:71
SizeType PointsNumber() const
Definition: geometry.h:528
void SetValue(const TVariableType &rThisVariable, typename TVariableType::Type const &rValue)
Definition: geometry.h:617
void push_back(PointPointerType x)
Definition: geometry.h:548
SizeType size() const
Definition: geometry.h:518
IndexType const & Id() const
Id of this Geometry.
Definition: geometry.h:964
virtual bool IsInside(const CoordinatesArrayType &rPointGlobalCoordinates, CoordinatesArrayType &rResult, const double Tolerance=std::numeric_limits< double >::epsilon()) const
Checks if given point in global space coordinates is inside the geometry boundaries....
Definition: geometry.h:1918
const PointsArrayType & Points() const
Definition: geometry.h:1768
TVariableType::Type & GetValue(const TVariableType &rThisVariable)
Definition: geometry.h:627
bool Has(const Variable< TDataType > &rThisVariable) const
Definition: geometry.h:609
This class is useful for index iteration over containers.
Definition: parallel_utilities.h:451
void for_each(TUnaryFunction &&f)
Definition: parallel_utilities.h:514
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
ElementIterator ElementsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1169
GeometryType::Pointer pGetGeometry(IndexType GeometryId)
Returns the Geometry::Pointer corresponding to the Id.
Definition: model_part.h:1564
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
SizeType NumberOfElements(IndexType ThisIndex=0) const
Definition: model_part.h:1027
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
ElementsContainerType & Elements(IndexType ThisIndex=0)
Definition: model_part.h:1189
This class defines the node.
Definition: node.h:65
static void PartitionMasterMaterialPointsIntoSubPoints(const ModelPart &rBackgroundGridModelPart, const array_1d< double, 3 > &rCoordinates, const array_1d< double, 3 > &rLocalCoords, Element &rMasterMaterialPoint, typename GeometryType::Pointer pQuadraturePointGeometry, const double Tolerance)
Definition: pqmpm_partition_utilities.cpp:25
void push_back(const TPointerType &x)
Definition: pointer_vector.h:270
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Definition: search_structure.h:309
void Set(IndexVector const &IndexCell, SizeVector const &_MaxSize, IteratorIteratorType const &IteratorBegin)
Definition: search_structure.h:363
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_INFO(label)
Definition: logger.h:250
Definition: mpm_search_element_utility.h:30
Node NodeType
Definition: mpm_search_element_utility.h:34
bool IsExplicitAndNeedsCorrection(GeometryType::Pointer pQuadraturePoint, const ProcessInfo &rProcessInfo)
Definition: mpm_search_element_utility.h:99
bool IsFixExplicitAndOnElementEdge(const Vector &N, const ProcessInfo &rProcessInfo)
Definition: mpm_search_element_utility.h:252
void NeighbourSearchConditions(const ModelPart &rMPMModelPart, const ModelPart &rBackgroundGridModelPart, std::vector< typename Condition::Pointer > &rMissingConditions, const double Tolerance)
Definition: mpm_search_element_utility.h:214
void ResetElementsAndNodes(ModelPart &rBackgroundGridModelPart)
Definition: mpm_search_element_utility.h:394
bool CheckIsInside(const GeometryType &rGeom, array_1d< double, 3 > &LocalCoords, const array_1d< double, 3 > &Coords, const double Tolerance)
Definition: mpm_search_element_utility.h:47
std::size_t SizeType
Definition: mpm_search_element_utility.h:33
std::size_t IndexType
Definition: mpm_search_element_utility.h:32
void ConstructNeighbourRelations(GeometryType &rGeom, const ModelPart &rBackgroundGridModelPart)
Definition: mpm_search_element_utility.h:59
void SearchElement(ModelPart &rBackgroundGridModelPart, ModelPart &rMPMModelPart, const std::size_t MaxNumberOfResults, const double Tolerance)
Search element connectivity for each particle.
Definition: mpm_search_element_utility.h:419
GeometryType & FindGridGeom(GeometryType &rParentGeom, const ModelPart &rBackgroundGridModelPart, const double Tolerance, const array_1d< double, 3 > &xg, array_1d< double, 3 > &rLocalCoords, const ProcessInfo &rProcessInfo, bool &IsFound)
Definition: mpm_search_element_utility.h:118
void UpdatePartitionedQuadraturePoint(const ModelPart &rBackgroundGridModelPart, const array_1d< double, 3 > &rCoordinates, Element &rMasterMaterialPoint, typename GeometryType::Pointer pQuadraturePointGeometry, const double Tolerance)
Definition: mpm_search_element_utility.h:148
ModelPart::GeometryType GeometryType
Definition: mpm_search_element_utility.h:35
void BinBasedSearchElementsAndConditions(ModelPart &rMPMModelPart, ModelPart &rBackgroundGridModelPart, std::vector< typename Element::Pointer > &rMissingElements, std::vector< typename Condition::Pointer > &rMissingConditions, const std::size_t MaxNumberOfResults, const double Tolerance)
Definition: mpm_search_element_utility.h:272
void NeighbourSearchElements(const ModelPart &rMPMModelPart, const ModelPart &rBackgroundGridModelPart, std::vector< typename Element::Pointer > &rMissingElements, const double Tolerance)
Definition: mpm_search_element_utility.h:167
double CrossProductDet2D(array_1d< double, 3 > VectorA, array_1d< double, 3 > VectorB)
Definition: mpm_search_element_utility.h:38
int n
manufactured solution and derivatives (u=0 at z=0 dudz=0 at z=domain_height)
Definition: ode_solve.py:402
int k
Definition: quadrature.py:595
int j
Definition: quadrature.py:648
N
Definition: sensitivityMatrix.py:29
integer i
Definition: TensorModule.f:17