degenerateMatcher.C
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "degenerateMatcher.H"
00028
00029
00030
00031 Foam::hexMatcher Foam::degenerateMatcher::hex;
00032 Foam::wedgeMatcher Foam::degenerateMatcher::wedge;
00033 Foam::prismMatcher Foam::degenerateMatcher::prism;
00034 Foam::tetWedgeMatcher Foam::degenerateMatcher::tetWedge;
00035 Foam::pyrMatcher Foam::degenerateMatcher::pyr;
00036 Foam::tetMatcher Foam::degenerateMatcher::tet;
00037
00038
00039 Foam::cellShape Foam::degenerateMatcher::match
00040 (
00041 const faceList& faces,
00042 const labelList& owner,
00043 const label cellI,
00044 const labelList& cellFaces
00045 )
00046 {
00047
00048
00049 if (hex.matchShape(false, faces, owner, cellI, cellFaces))
00050 {
00051 return cellShape(hex.model(), hex.vertLabels());
00052 }
00053 else if (tet.matchShape(false, faces, owner, cellI, cellFaces))
00054 {
00055 return cellShape(tet.model(), tet.vertLabels());
00056 }
00057 else if (prism.matchShape(false, faces, owner, cellI, cellFaces))
00058 {
00059 return cellShape(prism.model(), prism.vertLabels());
00060 }
00061 else if (pyr.matchShape(false, faces, owner, cellI, cellFaces))
00062 {
00063 return cellShape(pyr.model(), pyr.vertLabels());
00064 }
00065 else if (wedge.matchShape(false, faces, owner, cellI, cellFaces))
00066 {
00067 return cellShape(wedge.model(), wedge.vertLabels());
00068 }
00069 else if (tetWedge.matchShape(false, faces, owner, cellI, cellFaces))
00070 {
00071 return cellShape(tetWedge.model(), tetWedge.vertLabels());
00072 }
00073 else
00074 {
00075 return cellShape(*(cellModeller::lookup(0)), labelList(0));
00076 }
00077 }
00078
00079
00080 Foam::cellShape Foam::degenerateMatcher::match(const faceList& faces)
00081 {
00082
00083
00084 return match
00085 (
00086 faces,
00087 labelList(faces.size(), 0),
00088 0,
00089 labelList(cellMatcher::makeIdentity(faces.size()))
00090
00091 );
00092 }
00093
00094
00095 Foam::cellShape Foam::degenerateMatcher::match(const cellShape& shape)
00096 {
00097 return match(shape.collapsedFaces());
00098 }
00099
00100
00101 Foam::cellShape Foam::degenerateMatcher::match
00102 (
00103 const primitiveMesh& mesh,
00104 const label cellI
00105 )
00106 {
00107 return match
00108 (
00109 mesh.faces(),
00110 mesh.faceOwner(),
00111 cellI,
00112 mesh.cells()[cellI]
00113 );
00114 }
00115
00116
00117
Copyright © 2000-2009 OpenCFD Ltd