highLevelProgramming-5
highLevelProgramming-5
Example:
11 12 13
A tensor T = 21 22 23 is defined line-by-line:
31 32 33
tensor T( 11, 12, 13, 21, 22, 23, 31, 32, 33);
Examples:
dimensionedTensor sigma
(
"sigma",
dimensionSet( 1, -1, -2, 0, 0, 0, 0),
tensor( 1e6, 0, 0, 0, 1e6, 0, 0, 0, 1e6)
);
Info<< "Sigma: " << sigma << endl;
You see that the object sigma that belongs to the dimensionedTensor class
contains both the name, the dimensions and values.
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< p << endl;
Info<< p.boundaryField()[0] << endl;
laplacianSchemes
{
default none;
laplacian(DT,T) Gauss linear corrected;
}
Boundary conditions:
Part of class volScalarField object T, read from file:
boundaryField{
patch1{ type zeroGradient;}
patch2{ type fixedValue; value uniform 273;}}