Function component in field
On the explaination of laplacianFoam
This is extracted from the blog dyfluid.com.
Function component is defined in class GeometricField.H (but in class GeometricBoudnaryField). It takes a
and return a component typed GeometricField.
Well, since it is declared in GeometricBoudnaryField (not really class GeometricField). Let's see the mother class of GeometricField which is DimensionedField and she has a function component which does practically the same thing except that a DimensionedField is returned instead of GeometricField.
So, going back to the construction of object gradTx. I found one constructor corresponding to what is written above
Is it legal to pass a mother class object to son class by reference ?
Maybe this one explains https://manski.net/2012/02/cpp-refer...d-inheritance/
This is extracted from the blog dyfluid.com.
Code:
volVectorField gradT(fvc::grad(T));//创建gradT场,其值为fvc::grad(T),即为∇T显性离散的值 volScalarField gradTx ( IOobject ("gradTx", runTime.timeName(), DimensionedFieldmesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), gradT.component(vector::X) );//创建gradTx场,其值为矢量gradT的x的值
Code:
const direction
Well, since it is declared in GeometricBoudnaryField (not really class GeometricField). Let's see the mother class of GeometricField which is DimensionedField and she has a function component which does practically the same thing except that a DimensionedField is returned instead of GeometricField.
So, going back to the construction of object gradTx. I found one constructor corresponding to what is written above
Code:
//- Construct as copy resetting IO parameters GeometricField ( const IOobject&, const GeometricField<Type, PatchField, GeoMesh>& );
Maybe this one explains https://manski.net/2012/02/cpp-refer...d-inheritance/
Total Comments 0