This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/applications/solvers/solidMechanics/elasticOrthoAcpSolidFoam/setReference.H

37 lines
958 B
C++
Raw Normal View History

{
// Set reference
for (label regI = 0; regI < mesh.regions().nRegions(); regI++)
{
if (needRef[regI])
{
UEqn.source()[refCells[regI]] +=
UEqn.diag()[refCells[regI]]*vector::zero;
UEqn.diag()[refCells[regI]] +=
UEqn.diag()[refCells[regI]];
}
}
// Set value for dead cells (small particles or regions)
// label size = mesh.nCells() - label(sum(gamma.internalField()));
if (deadCells.size())
{
labelList curRefCell(deadCells.size(), -1);
label index = 0;
forAll(deadCells, cellI)
{
curRefCell[index++] = deadCells[cellI];
// if (gamma.internalField()[cellI] < 1 - SMALL)
// {
// curRefCell[index++] = cellI;
// }
}
vectorField curRefValue(curRefCell.size(), vector::zero);
UEqn.setValues(curRefCell, curRefValue);
}
}