|
[Sponsors] |
November 18, 2020, 08:13 |
Constructors in OpenFOAM
|
#1 |
New Member
Join Date: Nov 2020
Posts: 6
Rep Power: 5 |
Hello!
I appreciate any direct help with the topic below ... or a reference/guide/video which explains the full story for beginners ________________________________________________ my understanding of constructors in C++ is the following: Class name (parameter list) : Member initializer list {statement} I tried to match with OpenFOAM using Lines 37 to 47 below from the code here ------------------------------------------------- Foam:: prghPressureFvPatchScalarField:: prghPressureFvPatchScalarField ( const fvPatch& p, const DimensionedField<scalar, volMesh>& iF ) : fixedValueFvPatchScalarField(p, iF), rhoName_("rho"), p_(p.size(), Zero) {} ------------------------------------------------- My guess (please correct me if I'm wrong) - Class name is prghPressureFvPatchScalarField - fvPatch and DimensionedField<scalar, volMesh> are parameters and they were given aliases p and iF my questions - what is fixedValueFvPatchScalarField(p, iF) - {} is empty, I'm not sure what the constructor is doing overall - what is the first line Foam::X::X (I've seen this frequently in different codes) Thank you |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Frequently Asked Questions about Installing OpenFOAM | wyldckat | OpenFOAM Installation | 3 | November 14, 2023 11:58 |
OpenFOAM Foundation Releases OpenFOAM v2.3.0 | opencfd | OpenFOAM Announcements from OpenFOAM Foundation | 3 | December 23, 2014 03:43 |
Suggestion for a new sub-forum at OpenFOAM's Forum | wyldckat | Site Help, Feedback & Discussions | 20 | October 28, 2014 09:04 |
[Gmsh] 2D Mesh Generation Tutorial for GMSH | aeroslacker | OpenFOAM Meshing & Mesh Conversion | 12 | January 19, 2012 03:52 |
The OpenFOAM extensions project | mbeaudoin | OpenFOAM | 16 | October 9, 2007 09:33 |