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/elasticAcpSolidFoam/checkCohesivePatchOrdering.H
2014-06-01 20:12:52 +02:00

22 lines
510 B
C++

{
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;
}
}