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/elasticIncrAcpSolidFoam/checkCohesivePatchOrdering.H

23 lines
510 B
C++
Raw Normal View History

{
label sizeByTwo = mesh.boundary()[cohesivePatchID].size()/2;
vectorField Cczm = mesh.boundary()[cohesivePatchID].Cf();
for(label i = 0; i < sizeByTwo; i++)
{
Cczm[i] -= Cczm[sizeByTwo + i];
Cczm[sizeByTwo + i] = Cczm[i];
}
scalar error = sum(mag(Cczm));
if(error < SMALL)
{
Info << "Cohesive patch face ordering: OK" << endl;
}
else
{
Info << "Cohesive patch face ordering: error (" << error << ")"
<< endl;
}
}