本文整理汇总了C++中volVectorField::internalField方法的典型用法代码示例。如果您正苦于以下问题:C++ volVectorField::internalField方法的具体用法?C++ volVectorField::internalField怎么用?C++ volVectorField::internalField使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类volVectorField
的用法示例。
在下文中一共展示了volVectorField::internalField方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: vector
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void averagingModel::undoVectorAverage
(
volVectorField& fieldPrev,
volVectorField& fieldNext,
volScalarField& weightField,
double** const& value,
double** const& weight,
double**const& mask,
bool single
) const
{
// WARNING - not sure if this is valid for dilute model!!!
if(!single) fieldPrev.internalField() = fieldNext.internalField();
label cellI;
vector valueVec;
scalar weightP;
for(int index=0; index< particleCloud_.numberOfParticles(); index++)
{
if(mask[index][0])
{
for(int subCell=0;subCell<particleCloud_.voidFractionM().cellsPerParticle()[index][0];subCell++)
{
//Info << "subCell=" << subCell << endl;
cellI = particleCloud_.cellIDs()[index][subCell];
if (cellI >= 0)
{
for(int i=0;i<3;i++) valueVec[i] = value[index][i];
weightP = weight[index][subCell];
if(weightField[cellI] == weightP)
{
fieldNext[cellI] = vector(0,0,0);
}else
{
fieldNext[cellI] = (fieldNext[cellI]*weightField[cellI]-valueVec*weightP)/(weightField[cellI]-weightP);
}
}
}
}
}
// correct cell values to patches
fieldNext.correctBoundaryConditions();
}
示例2: resetVectorAverage
void averagingModel::resetVectorAverage(volVectorField& prev,volVectorField& next,bool single) const
{
if(!single) prev.internalField() = next.internalField();
next.internalField() = vector::zero;
}