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

Constructors in OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 2 Post By geth03
  • 1 Post By geth03

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   November 18, 2020, 08:13
Default Constructors in OpenFOAM
  #1
New Member
 
Join Date: Nov 2020
Posts: 6
Rep Power: 5
user92 is on a distinguished road
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
user92 is offline   Reply With Quote

 


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
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


All times are GMT -4. The time now is 06:56.