|
[Sponsors] |
Read from dictionary inside new smoother class |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 14, 2020, 06:07 |
Read from dictionary inside new smoother class
|
#1 |
New Member
Join Date: Mar 2016
Posts: 3
Rep Power: 10 |
Hi, I'm trying to develop a new smoother. The problem is that inside a smoother class I can't find any object, that has a reference to some dictionary so I am unable to read some parameters of the smoother.
For example the member function smooth for Gauss-Seidel smoother has the folowing arguments: Code:
void Foam::GaussSeidelSmoother::smooth ( const word& fieldName_, scalarField& psi, const lduMatrix& matrix_, const scalarField& source, const FieldField<Field, scalar>& interfaceBouCoeffs_, const lduInterfaceFieldPtrsList& interfaces_, const direction cmpt, const label nSweeps ) Code:
const dictionary& solverControls Thanks in advance |
|
May 20, 2020, 18:55 |
|
#2 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
Hi,
- Which parameters of the smoother exactly do you want to access? - If these are `the` parameters of the smoother, I assume they are members of the class? So, do you really need to access the dictionary?
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
May 21, 2020, 05:13 |
|
#3 |
New Member
Join Date: Mar 2016
Posts: 3
Rep Power: 10 |
It is supposed to be a variable parameter of the smoother, i.e. problem-dependent parameter like relaxation factor. Even if it will be a class member I need to read the actual value from dictionary (or set default one but I want to have a choice).
|
|
May 22, 2020, 19:08 |
|
#4 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
Hi,
- If it is a class member, it is initialised by the constructor or a read() function? so that you can access the dictionary content? - I am pretty sure, I'm missing something in my understanding. I'm sorry for that.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Field value inside a boundary condition class | pcaron | OpenFOAM Programming & Development | 14 | October 17, 2022 10:40 |
given a volScalarField object, how to read inputs from its dictionary | anon_q | OpenFOAM Programming & Development | 6 | August 9, 2019 03:07 |
Parallel computing error using multiple nodes | Jingxue Wang | OpenFOAM Running, Solving & CFD | 11 | January 14, 2018 11:51 |
How to read a list from a dictionary? | ivan_cozza | OpenFOAM Programming & Development | 6 | November 7, 2014 09:31 |
Phase locked average in run time | panara | OpenFOAM | 2 | February 20, 2008 15:37 |