Finite area patch class. Used for 2-D non-Euclidian finite area method. More...
Public Types | |
typedef faBoundaryMesh | BoundaryMesh |
![]() | |
typedef SubList< T > | subList |
Public Member Functions | |
TypeName ("patch") | |
declareRunTimeSelectionTable (autoPtr, faPatch, dictionary,(const word &name, const dictionary &dict, const label index, const faBoundaryMesh &bm),(name, dict, index, bm)) | |
faPatch (const word &name, const labelList &edgeLabels, const label index, const faBoundaryMesh &bm, const label ngbPolyPatchIndex) | |
faPatch (const word &name, const dictionary &dict, const label index, const faBoundaryMesh &bm) | |
faPatch (const faPatch &, const faBoundaryMesh &) | |
virtual autoPtr< faPatch > | clone (const faBoundaryMesh &bm, const labelList &edgeLabels, const label index, const label ngbPolyPatchIndex) const |
virtual | ~faPatch () |
const labelList & | edgeLabels () const noexcept |
void | edgeLabels (const UList< label > &newEdgeLabels) |
label | nPoints () const |
label | nEdges () const noexcept |
label | ngbPolyPatchIndex () const noexcept |
const faBoundaryMesh & | boundaryMesh () const noexcept |
virtual bool | coupled () const |
label | start () const |
virtual label | size () const |
label | whichEdge (const label l) const |
template<class T > | |
List< T >::subList | patchSlice (const List< T > &l) const |
virtual void | write (Ostream &) const |
List< labelPair > | boundaryConnections () const |
labelList | boundaryProcs () const |
List< labelPair > | boundaryProcSizes () const |
const labelList & | pointLabels () const |
const labelListList & | pointEdges () const |
tmp< vectorField > | ngbPolyPatchFaceNormals () const |
tmp< vectorField > | ngbPolyPatchPointNormals () const |
const labelUList & | edgeFaces () const |
const vectorField & | edgeCentres () const |
const vectorField & | edgeLengths () const |
const scalarField & | magEdgeLengths () const |
tmp< vectorField > | edgeNormals () const |
tmp< vectorField > | edgeFaceCentres () const |
virtual tmp< vectorField > | delta () const |
virtual void | makeWeights (scalarField &) const |
const scalarField & | weights () const |
virtual void | makeDeltaCoeffs (scalarField &) const |
void | makeCorrectionVectors (vectorField &) const |
const scalarField & | deltaCoeffs () const |
void | resetEdges (const UList< label > &newEdges) |
void | resetEdges (labelList &&newEdges) |
template<class Type > | |
tmp< Field< Type > > | patchInternalField (const UList< Type > &) const |
template<class Type > | |
tmp< Foam::Field< Type > > | patchInternalField (const UList< Type > &f, const labelUList &edgeFaces) const |
template<class GeometricField , class Type > | |
const GeometricField::Patch & | patchField (const GeometricField &) const |
template<class GeometricField , class Type > | |
const GeometricField::Patch & | lookupPatchField (const word &name, const GeometricField *=nullptr, const Type *=nullptr) const |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | patchInternalField (const UList< Type > &f) const |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | patchInternalField (const UList< Type > &f, const labelUList &edgeFaces) const |
![]() | |
patchIdentifier (const patchIdentifier &)=default | |
patchIdentifier & | operator= (const patchIdentifier &)=default |
virtual | ~patchIdentifier ()=default |
patchIdentifier () | |
patchIdentifier (const word &name, const label index) | |
patchIdentifier (const word &name, const label index, const word &physicalType, const wordList &inGroups=wordList()) | |
patchIdentifier (const word &name, const dictionary &dict, const label index) | |
patchIdentifier (const patchIdentifier &ident, const label index) | |
const word & | name () const noexcept |
word & | name () noexcept |
label | index () const noexcept |
label & | index () noexcept |
const word & | physicalType () const noexcept |
word & | physicalType () noexcept |
const wordList & | inGroups () const noexcept |
wordList & | inGroups () noexcept |
bool | inGroup (const word &name) const |
void | write (Ostream &os) const |
![]() | |
constexpr | List () noexcept |
List (const label len) | |
List (const label len, const T &val) | |
List (const label len, const Foam::zero) | |
List (const Foam::one, const T &val) | |
List (const Foam::one, T &&val) | |
List (const Foam::one, const Foam::zero) | |
List (const List< T > &a) | |
List (const UList< T > &a) | |
List (List< T > &a, bool reuse) | |
List (const UList< T > &list, const labelUList &indices) | |
template<unsigned N> | |
List (const UList< T > &list, const FixedList< label, N > &indices) | |
template<unsigned N> | |
List (const FixedList< T, N > &list) | |
List (const PtrList< T > &list) | |
List (const SLList< T > &list) | |
template<class Addr > | |
List (const IndirectListBase< T, Addr > &list) | |
List (std::initializer_list< T > list) | |
List (List< T > &&list) | |
template<int SizeMin> | |
List (DynamicList< T, SizeMin > &&list) | |
List (SortableList< T > &&list) | |
List (SLList< T > &&list) | |
List (Istream &is) | |
autoPtr< List< T > > | clone () const |
~List () | |
void | clear () |
void | resize (const label len) |
void | resize (const label len, const T &val) |
void | resize_nocopy (const label len) |
void | setSize (const label n) |
void | setSize (const label n, const T &val) |
void | append (const T &val) |
void | append (T &&val) |
void | append (const UList< T > &list) |
template<class Addr > | |
void | append (const IndirectListBase< T, Addr > &list) |
label | appendUniq (const T &val) |
void | transfer (List< T > &list) |
template<int SizeMin> | |
void | transfer (DynamicList< T, SizeMin > &list) |
void | transfer (SortableList< T > &list) |
T & | newElmt (const label i) |
void | operator= (const UList< T > &a) |
void | operator= (const List< T > &list) |
void | operator= (const SLList< T > &list) |
template<class Addr > | |
void | operator= (const IndirectListBase< T, Addr > &list) |
template<unsigned N> | |
void | operator= (const FixedList< T, N > &list) |
void | operator= (std::initializer_list< T > list) |
void | operator= (const T &val) |
void | operator= (const Foam::zero) |
void | operator= (List< T > &&list) |
template<int SizeMin> | |
void | operator= (DynamicList< T, SizeMin > &&list) |
void | operator= (SortableList< T > &&list) |
void | operator= (SLList< T > &&list) |
Istream & | readList (Istream &is) |
void | shallowCopy (const UList< T > &)=delete |
template<class TypeT = T> | |
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type | set (const label i, bool val=true) |
template<class T > | |
List (const label len) | |
template<class T > | |
List (const label len, const T &val) | |
template<class T > | |
List (const label len, const Foam::zero) | |
template<class T > | |
List (const Foam::one, const T &val) | |
template<class T > | |
List (const Foam::one, T &&val) | |
template<class T > | |
List (const Foam::one, const Foam::zero) | |
template<class T > | |
List (const UList< T > &a) | |
template<class T > | |
List (const List< T > &a) | |
template<class T > | |
List (List< T > &a, bool reuse) | |
template<class T > | |
List (const UList< T > &list, const labelUList &indices) | |
template<class T > | |
List (const PtrList< T > &list) | |
template<class T > | |
List (const SLList< T > &list) | |
template<class T > | |
List (std::initializer_list< T > list) | |
template<class T > | |
List (List< T > &&list) | |
template<class T > | |
List (SortableList< T > &&list) | |
template<class T > | |
List (SLList< T > &&list) | |
template<class T > | |
void | transfer (List< T > &list) |
template<class T > | |
void | transfer (SortableList< T > &list) |
template<class T > | |
void | operator= (const UList< T > &a) |
template<class T > | |
void | operator= (const List< T > &list) |
template<class T > | |
void | operator= (const SLList< T > &list) |
template<class T > | |
void | operator= (std::initializer_list< T > list) |
template<class T > | |
void | operator= (List< T > &&list) |
template<class T > | |
void | operator= (SortableList< T > &&list) |
template<class T > | |
void | operator= (SLList< T > &&list) |
Istream & | readList (Istream &is) |
template<class T > | |
constexpr | List () noexcept |
void | resize (const label newLen) |
template<class T > | |
void | append (const T &val) |
template<class T > | |
void | append (T &&val) |
template<class T > | |
void | append (const UList< T > &list) |
template<class T > | |
void | operator= (const T &val) |
template<class T > | |
void | operator= (const Foam::zero) |
template<class T > | |
List (Istream &is) | |
Istream & | readList (Istream &is) |
Static Public Member Functions | |
static autoPtr< faPatch > | New (const word &name, const dictionary &dict, const label index, const faBoundaryMesh &bm) |
![]() | |
static word | defaultName (const label n=-1) |
![]() | |
static const List< T > & | null () |
Protected Member Functions | |
void | calcPointLabels () const |
void | calcPointEdges () const |
virtual void | initGeometry () |
virtual void | calcGeometry () |
virtual void | initMovePoints (const pointField &) |
virtual void | movePoints (const pointField &) |
virtual void | initUpdateMesh () |
virtual void | updateMesh () |
Friends | |
class | faBoundaryMesh |
Ostream & | operator<< (Ostream &, const faPatch &) |
Finite area patch class. Used for 2-D non-Euclidian finite area method.
typedef faBoundaryMesh BoundaryMesh |
faPatch | ( | const word & | name, |
const labelList & | edgeLabels, | ||
const label | index, | ||
const faBoundaryMesh & | bm, | ||
const label | ngbPolyPatchIndex | ||
) |
faPatch | ( | const word & | name, |
const dictionary & | dict, | ||
const label | index, | ||
const faBoundaryMesh & | bm | ||
) |
faPatch | ( | const faPatch & | p, |
const faBoundaryMesh & | bm | ||
) |
|
protected |
const labelList& edgePoints = *pointLabelsPtr_;
// Cannot use invertManyToMany - we have non-local edge numbering
// Intermediate storage for pointEdges. // Points on the boundary will normally connect 1 or 2 edges only. List<DynamicList<label,2>> dynPointEdges(edgePoints.size());
forAll(edges, edgei) { const edge& e = edges[edgei];
dynPointEdges[markedPoints[e.first()]].append(edgei); dynPointEdges[markedPoints[e.second()]].append(edgei); }
// Flatten to regular list pointEdgesPtr_ = new labelListList(edgePoints.size()); auto& pEdges = *pointEdgesPtr_;
forAll(pEdges, pointi) { pEdges[pointi] = std::move(dynPointEdges[pointi]); }
Definition at line 217 of file faPatch.C.
References DynamicList::append(), Foam::constant::electromagnetic::e, HashSet::insert(), and mesh.
|
protected |
Definition at line 274 of file faPatch.C.
References List::append(), Foam::constant::electromagnetic::e, forAll, mesh, and pointLabels().
|
inlineprotectedvirtual |
Reimplemented in coupledFaPatch, cyclicFaPatch, and processorFaPatch.
Definition at line 114 of file faPatch.H.
Referenced by cyclicFaPatch::initGeometry().
|
inlineprotectedvirtual |
Reimplemented in coupledFaPatch, cyclicFaPatch, and processorFaPatch.
Definition at line 118 of file faPatch.H.
Referenced by cyclicFaPatch::calcGeometry().
|
inlineprotectedvirtual |
Reimplemented in coupledFaPatch, cyclicFaPatch, and processorFaPatch.
Definition at line 122 of file faPatch.H.
Referenced by cyclicFaPatch::initMovePoints().
|
protectedvirtual |
Reimplemented in coupledFaPatch, cyclicFaPatch, and processorFaPatch.
Definition at line 456 of file faPatch.C.
Referenced by processorFaPatch::initMovePoints(), and cyclicFaPatch::movePoints().
|
inlineprotectedvirtual |
Reimplemented in processorFaPatch.
Definition at line 129 of file faPatch.H.
Referenced by processorFaPatch::initUpdateMesh().
|
inlineprotectedvirtual |
Reimplemented in processorFaPatch.
Definition at line 133 of file faPatch.H.
Referenced by processorFaPatch::updateMesh().
TypeName | ( | "patch" | ) |
declareRunTimeSelectionTable | ( | autoPtr | , |
faPatch | , | ||
dictionary | , | ||
(const word &name, const dictionary &dict, const label index, const faBoundaryMesh &bm) | , | ||
(name, dict, index, bm) | |||
) |
|
inlinevirtual |
Reimplemented in emptyFaPatch, and symmetryFaPatch.
Definition at line 188 of file faPatch.H.
References faPatch::edgeLabels(), patchIdentifier::index(), patchIdentifier::name(), autoPtr::New(), and faPatch::ngbPolyPatchIndex().
|
static |
Definition at line 28 of file faPatchNew.C.
References DebugInFunction, dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, and Foam::name().
|
inlinenoexcept |
Definition at line 221 of file faPatch.H.
Referenced by faPatchData::assign(), symmetryFaPatch::clone(), emptyFaPatch::clone(), and faPatch::clone().
void edgeLabels | ( | const UList< label > & | newEdgeLabels | ) |
|
inline |
Definition at line 230 of file faPatch.H.
References faPatch::pointLabels().
|
inlinenoexcept |
Definition at line 242 of file faPatch.H.
Referenced by faPatchData::assign(), symmetryFaPatch::clone(), emptyFaPatch::clone(), and faPatch::clone().
|
noexcept |
|
inlinevirtual |
Reimplemented in processorFaPatch, and coupledFaPatch.
Foam::label start | ( | ) | const |
Definition at line 119 of file faPatch.C.
References boundaryMesh::mesh().
Referenced by faPatch::patchSlice(), and faPatch::whichEdge().
|
inlinevirtual |
Reimplemented in emptyFaPatch.
Definition at line 260 of file faPatch.H.
Referenced by faMeshDecomposition::decomposeMesh(), processorFaPatch::interfaceSize(), faPatch::patchSlice(), and faPatchMapper::size().
|
inline |
Definition at line 266 of file faPatch.H.
References faPatch::start().
Definition at line 273 of file faPatch.H.
References faPatch::size(), and faPatch::start().
Referenced by faFieldDecomposer::reset().
|
virtual |
Reimplemented in processorFaPatch.
Definition at line 474 of file faPatch.C.
References os(), Foam::type(), patchIdentifier::write(), and Ostream::writeEntry().
Referenced by processorFaPatch::write().
Foam::List< Foam::labelPair > boundaryConnections | ( | ) | const |
Definition at line 125 of file faPatch.C.
References Foam::BitOps::count(), boundaryMesh::mesh(), PrimitivePatch< FaceList, PointField >::nInternalEdges(), and Foam::output().
Foam::labelList boundaryProcs | ( | ) | const |
Definition at line 145 of file faPatch.C.
References HashSet::insert(), boundaryMesh::mesh(), UPstream::myProcNo(), PrimitivePatch< FaceList, PointField >::nInternalEdges(), and UPstream::nProcs().
Foam::List< Foam::labelPair > boundaryProcSizes | ( | ) | const |
Definition at line 165 of file faPatch.C.
References Foam::BitOps::count(), boundaryMesh::mesh(), UPstream::myProcNo(), PrimitivePatch< FaceList, PointField >::nInternalEdges(), UPstream::nProcs(), and Foam::output().
const Foam::labelList & pointLabels | ( | ) | const |
Definition at line 195 of file faPatch.C.
Referenced by faPatch::nPoints(), and faGlobalMeshData::updateMesh().
const Foam::labelListList & pointEdges | ( | ) | const |
Foam::tmp< Foam::vectorField > ngbPolyPatchFaceNormals | ( | ) | const |
Definition at line 305 of file faPatch.C.
References boundaryMesh::mesh(), and tmp::New().
Foam::tmp< Foam::vectorField > ngbPolyPatchPointNormals | ( | ) | const |
Definition at line 316 of file faPatch.C.
References faceNormals(), forAll, mesh, n, tmp::New(), and Foam::Zero.
const Foam::labelUList & edgeFaces | ( | ) | const |
Definition at line 351 of file faPatch.C.
References mesh.
Referenced by contactAngleForce::correct(), faMeshDecomposition::decomposeMesh(), and coupledFaPatch::faceCells().
const Foam::vectorField & edgeCentres | ( | ) | const |
Definition at line 365 of file faPatch.C.
References boundaryMesh::mesh().
const Foam::vectorField & edgeLengths | ( | ) | const |
Definition at line 371 of file faPatch.C.
References boundaryMesh::mesh().
const Foam::scalarField & magEdgeLengths | ( | ) | const |
Definition at line 377 of file faPatch.C.
References boundaryMesh::mesh().
Foam::tmp< Foam::vectorField > edgeNormals | ( | ) | const |
Definition at line 383 of file faPatch.C.
References n, and tmp::New().
Foam::tmp< Foam::vectorField > edgeFaceCentres | ( | ) | const |
Definition at line 396 of file faPatch.C.
References forAll, boundaryMesh::mesh(), and tmp::New().
|
virtual |
Reimplemented in coupledFaPatch, processorFaPatch, and cyclicFaPatch.
Definition at line 416 of file faPatch.C.
Referenced by cyclicFaPatch::delta(), processorFaPatch::delta(), cyclicFaPatch::makeDeltaCoeffs(), processorFaPatch::makeDeltaCoeffs(), cyclicFaPatch::makeWeights(), and processorFaPatch::makeWeights().
|
virtual |
Reimplemented in coupledFaPatch, processorFaPatch, and cyclicFaPatch.
const Foam::scalarField & weights | ( | ) | const |
Definition at line 450 of file faPatch.C.
References boundaryMesh::mesh().
|
virtual |
Reimplemented in coupledFaPatch, processorFaPatch, and cyclicFaPatch.
Definition at line 422 of file faPatch.C.
References delta.
void makeCorrectionVectors | ( | vectorField & | k | ) | const |
Definition at line 428 of file faPatch.C.
References delta, k, and Foam::mag().
const Foam::scalarField & deltaCoeffs | ( | ) | const |
Definition at line 438 of file faPatch.C.
References boundaryMesh::mesh().
tmp<Foam::Field<Type> > patchInternalField | ( | const UList< Type > & | f, |
const labelUList & | edgeFaces | ||
) | const |
const GeometricField::Patch & patchField | ( | const GeometricField & | gf | ) | const |
Definition at line 57 of file faPatchTemplates.C.
References GeometricField::boundaryField().
const GeometricField::Patch & lookupPatchField | ( | const word & | name, |
const GeometricField * | = nullptr , |
||
const Type * | = nullptr |
||
) | const |
Definition at line 28 of file faPatchFaMeshTemplates.C.
References mesh, and Foam::name().
Foam::tmp<Foam::Field<Type> > patchInternalField | ( | const UList< Type > & | f | ) | const |
Definition at line 28 of file faPatchTemplates.C.
References f().
Foam::tmp<Foam::Field<Type> > patchInternalField | ( | const UList< Type > & | f, |
const labelUList & | edgeFaces | ||
) | const |
Definition at line 38 of file faPatchTemplates.C.
References f(), forAll, and Foam::New().
|
friend |
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.