Welcome! Log In Create A New Profile

Advanced

[Solved] Non-local data processor

Posted by swang251swang251  
[Solved] Non-local data processor
April 04, 2018 12:47AM
Hi everyone,

I am interested in implementing some simple spatial filters and trying to write a functional for it. I am now facing some problems and was wondering if anyone has any idea about it:

- As descript in the documentation:
Quote
Rule 0 of data processors: A data processor must always be written in such a way that executing the data processor on a given domain has the same effect as splitting the domain into two sub-domains, and then executing the data processor consecutively on each of these sub-domains.

Does it mean, there is no way to treat the boundary separately?

- Also, as written in the documentation:
Quote
On nearest-neighbor lattices (D2Q9, D3Q19, etc.), you can be non-local by one cell but no more

If so, what can I do if I want to access two or even more cells further neighbors? Does it mean this is no way to write a functional for such operation?

I will very appreciate your answers,

With best,
Song



Edited 1 time(s). Last edit at 05/21/2018 08:39PM by swang251.
Re: Non-local data processor
April 05, 2018 10:16AM
Hi Song,

To the first point: There is way to create a data processors that handles boundaries separately. You have to use a boundedBoxProcessingFunctional for that. Therein, depending on the dimension of the problem, you have specify separate methods for every corner/edge and the bulk of the domain.
The best way to find out how this works is to look at the computeGradient() Function, which is located in

src/dataprocessors/dataAnalysisWrapper2D

with the corresponding Functional in

src/dataprocessors/dataAnalysisFunctional2D

To the second point: In the lattice Descriptors (D2Q9, D3Q19), there is a parameter called 'vicinity' which specifies 'how local' you have to be (for D2Q9 and D3Q19 it is set to 1). If you want to access two cells further away, you have change it. I have had a similar problem so you might also check out

[www.palabos.org]

for that.

Hope this helps.

Regards,

Knut
Re: Non-local data processor
April 06, 2018 06:45PM
Dear Knut,

I really appreciate your answers which are helpful. I am going to have a try.

Here I have another two questions:
    [*] Does the boundedBoxProcessingFunctional work for the periodic boundary condition? I tried to write a functional inherits from boundedBoxProcessingFunctional. However, when I toggle on the periodicity of the boundary, there seem to be no effects. Does this mean that I have to write another functional inheriting from BoxProcessingFunctional with the bulk version process alone?
    [*] Thank you for telling me the parameter "vicinity". I was wondering if my non-local operation is global, would it still be possible to use the multiblock data structure?
Thank you again for your help.

With best,
Song
Re: Non-local data processor
April 07, 2018 03:26PM
Dear Song,

1) I do not think so, as the name suggests it is used for domains that are bounded. If you need something like that, I would suggest to use a "normal" BoxProcessingFunctionalXXX and then check the nodetype inside the dataprocessor (via getDynamics() ) and apply different routines depending on the type of node. However, this does not seem to be the optimal solution.
2) Yes, you can of course still use the multiblock data structure.

Regards,

Knut
Re: Non-local data processor
April 08, 2018 12:10AM
Dear Knut,

Thank you again for your answers. I will try some further tests.

With best,
Song
Sorry, you do not have permission to post/reply in this forum.