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

How to make a mapper that takes nearest vertex instead of interpolating?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 25, 2017, 06:10
Default How to make a mapper that takes nearest vertex instead of interpolating?
  #1
New Member
 
Lukas Lebovitz
Join Date: Mar 2017
Location: Zürich, Switzerland
Posts: 25
Rep Power: 9
lukas.lebo is on a distinguished road
Hi Foamers

I'm modifying an InletGenerator that currently uses a mapper to interpolate values from a virtual Grid onto the mesh at the inlet.

Code:
// mapper is created like this for mapping Virtual Field to Patch Field

mapperVP_Ptr_.reset
    (
        new pointToPointPlanarInterpolation
        (
            virtualGridPoints_,
            this->patch().patch().faceCentres(),
            perturb_
        )
    );


// it is used like this

uFluctFiltered = mapperVP_Ptr_().interpolate(virtualFilteredField_);
Is there any simple change I can make so it will just take the value of the nearest virtualGridPoint to map onto the patch instead of interpolating?

Thanks so much!
lukas.lebo is offline   Reply With Quote

Reply


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
Installation OF1.5-dev ttdtud OpenFOAM Installation 46 May 5, 2009 03:32
Regarding FoamX running Kindly help out hariya03 OpenFOAM Pre-Processing 0 April 18, 2008 05:26
OpenFOAM with IBM AIX matthias OpenFOAM Installation 20 March 25, 2008 03:36
a way to make lots of money quick and easy no lies Dob Main CFD Forum 0 October 10, 2006 17:45
FOAM installation error gcc amp g hanks OpenFOAM Installation 9 January 26, 2006 15:14


All times are GMT -4. The time now is 07:53.