CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Nearest internal point to a point on patch

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 18, 2021, 06:31
Default Nearest internal point to a point on patch
  #1
New Member
 
Jérémy Chevalier
Join Date: Feb 2021
Posts: 10
Rep Power: 5
JeremyChvlr is on a distinguished road
Hi,
For the implementation of a gradient method, I need to manage the edges in a certain way. To do so, I need to have access to the closest internal point to the points on the boundary. Currently I am able to get all the indexes of the points on the patch.

Sorry for the rough English
thank you in advance !

Jérémy



Code:
const labelListList& pointPoints = mesh.pointPoints();
forAll(mesh.boundary(),patch)
{
   const labelList& patchPoints = mesh.boundaryMesh()[patch].meshPoints(); //list of points at boundary
  const word& patchName = mesh.boundary()[patch].name();

   if(patchName != "defaultFaces")  //need to change it
  forAll(patchPoints, point)
  {
   //Here i'm able to get all point index at boundaries
   //Need to find the nearest internal point of patchPoints[point]

  }
}
JeremyChvlr is offline   Reply With Quote

Reply

Tags
index, nearest, point


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Commercial meshers] Fluent3DMeshToFoam simvun OpenFOAM Meshing & Mesh Conversion 50 January 19, 2020 16:33
snappyhexmesh remove blockmesh geometry philipp1 OpenFOAM Running, Solving & CFD 2 December 12, 2014 11:58
CheckMeshbs errors ivanyao OpenFOAM Running, Solving & CFD 2 March 11, 2009 03:34
[Gmsh] Gmsh and samplesurface touf OpenFOAM Meshing & Mesh Conversion 2 December 10, 2007 03:27
Multicomponent fluid Andrea CFX 2 October 11, 2004 06:12


All times are GMT -4. The time now is 04:36.