Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
faPatch Class Reference

Finite area patch class. Used for 2-D non-Euclidian finite area method. More...

Inheritance diagram for faPatch:
Inheritance graph
[legend]
Collaboration diagram for faPatch:
Collaboration graph
[legend]

Public Types

typedef faBoundaryMesh BoundaryMesh
 
- Public Types inherited from List
typedef SubList< TsubList
 

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< faPatchclone (const faBoundaryMesh &bm, const labelList &edgeLabels, const label index, const label ngbPolyPatchIndex) const
 
virtual ~faPatch ()
 
const labelListedgeLabels () const noexcept
 
void edgeLabels (const UList< label > &newEdgeLabels)
 
label nPoints () const
 
label nEdges () const noexcept
 
label ngbPolyPatchIndex () const noexcept
 
const faBoundaryMeshboundaryMesh () 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< labelPairboundaryConnections () const
 
labelList boundaryProcs () const
 
List< labelPairboundaryProcSizes () const
 
const labelListpointLabels () const
 
const labelListListpointEdges () const
 
tmp< vectorFieldngbPolyPatchFaceNormals () const
 
tmp< vectorFieldngbPolyPatchPointNormals () const
 
const labelUListedgeFaces () const
 
const vectorFieldedgeCentres () const
 
const vectorFieldedgeLengths () const
 
const scalarFieldmagEdgeLengths () const
 
tmp< vectorFieldedgeNormals () const
 
tmp< vectorFieldedgeFaceCentres () const
 
virtual tmp< vectorFielddelta () const
 
virtual void makeWeights (scalarField &) const
 
const scalarFieldweights () const
 
virtual void makeDeltaCoeffs (scalarField &) const
 
void makeCorrectionVectors (vectorField &) const
 
const scalarFielddeltaCoeffs () 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::PatchpatchField (const GeometricField &) const
 
template<class GeometricField , class Type >
const GeometricField::PatchlookupPatchField (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
 
- Public Member Functions inherited from patchIdentifier
 patchIdentifier (const patchIdentifier &)=default
 
patchIdentifieroperator= (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 wordname () const noexcept
 
wordname () noexcept
 
label index () const noexcept
 
label & index () noexcept
 
const wordphysicalType () const noexcept
 
wordphysicalType () noexcept
 
const wordListinGroups () const noexcept
 
wordListinGroups () noexcept
 
bool inGroup (const word &name) const
 
void write (Ostream &os) const
 
- Public Member Functions inherited from List
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)
 
TnewElmt (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)
 
IstreamreadList (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)
 
IstreamreadList (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)
 
IstreamreadList (Istream &is)
 

Static Public Member Functions

static autoPtr< faPatchNew (const word &name, const dictionary &dict, const label index, const faBoundaryMesh &bm)
 
- Static Public Member Functions inherited from patchIdentifier
static word defaultName (const label n=-1)
 
- Static Public Member Functions inherited from List
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
 
Ostreamoperator<< (Ostream &, const faPatch &)
 

Detailed Description

Finite area patch class. Used for 2-D non-Euclidian finite area method.

Author Zeljko Tukovic, FMENA Hrvoje Jasak, Wikki Ltd.

Source files

Definition at line 65 of file faPatch.H.

Member Typedef Documentation

◆ BoundaryMesh

Definition at line 139 of file faPatch.H.

Constructor & Destructor Documentation

◆ faPatch() [1/3]

faPatch ( const word name,
const labelList edgeLabels,
const label  index,
const faBoundaryMesh bm,
const label  ngbPolyPatchIndex 
)

Definition at line 55 of file faPatch.C.

◆ faPatch() [2/3]

faPatch ( const word name,
const dictionary dict,
const label  index,
const faBoundaryMesh bm 
)

Definition at line 74 of file faPatch.C.

◆ faPatch() [3/3]

faPatch ( const faPatch p,
const faBoundaryMesh bm 
)

Definition at line 91 of file faPatch.C.

◆ ~faPatch()

~faPatch ( )
virtual

Definition at line 105 of file faPatch.C.

Member Function Documentation

◆ calcPointLabels()

void calcPointLabels ( ) const
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.

Here is the call graph for this function:

◆ calcPointEdges()

void calcPointEdges ( ) const
protected

Definition at line 274 of file faPatch.C.

References List::append(), Foam::constant::electromagnetic::e, forAll, mesh, and pointLabels().

Here is the call graph for this function:

◆ initGeometry()

virtual void initGeometry ( )
inlineprotectedvirtual

Reimplemented in coupledFaPatch, cyclicFaPatch, and processorFaPatch.

Definition at line 114 of file faPatch.H.

Referenced by cyclicFaPatch::initGeometry().

Here is the caller graph for this function:

◆ calcGeometry()

virtual void calcGeometry ( )
inlineprotectedvirtual

Reimplemented in coupledFaPatch, cyclicFaPatch, and processorFaPatch.

Definition at line 118 of file faPatch.H.

Referenced by cyclicFaPatch::calcGeometry().

Here is the caller graph for this function:

◆ initMovePoints()

virtual void initMovePoints ( const pointField )
inlineprotectedvirtual

Reimplemented in coupledFaPatch, cyclicFaPatch, and processorFaPatch.

Definition at line 122 of file faPatch.H.

Referenced by cyclicFaPatch::initMovePoints().

Here is the caller graph for this function:

◆ movePoints()

void movePoints ( const pointField points)
protectedvirtual

Reimplemented in coupledFaPatch, cyclicFaPatch, and processorFaPatch.

Definition at line 456 of file faPatch.C.

Referenced by processorFaPatch::initMovePoints(), and cyclicFaPatch::movePoints().

Here is the caller graph for this function:

◆ initUpdateMesh()

virtual void initUpdateMesh ( )
inlineprotectedvirtual

Reimplemented in processorFaPatch.

Definition at line 129 of file faPatch.H.

Referenced by processorFaPatch::initUpdateMesh().

Here is the caller graph for this function:

◆ updateMesh()

virtual void updateMesh ( )
inlineprotectedvirtual

Reimplemented in processorFaPatch.

Definition at line 133 of file faPatch.H.

Referenced by processorFaPatch::updateMesh().

Here is the caller graph for this function:

◆ TypeName()

TypeName ( "patch"  )

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
faPatch  ,
dictionary  ,
(const word &name, const dictionary &dict, const label index, const faBoundaryMesh &bm)  ,
(name, dict, index, bm)   
)

◆ clone()

virtual autoPtr<faPatch> clone ( const faBoundaryMesh bm,
const labelList edgeLabels,
const label  index,
const label  ngbPolyPatchIndex 
) const
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().

Here is the call graph for this function:

◆ New()

Foam::autoPtr< Foam::faPatch > New ( const word name,
const dictionary dict,
const label  index,
const faBoundaryMesh bm 
)
static

Definition at line 28 of file faPatchNew.C.

References DebugInFunction, dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, and Foam::name().

Here is the call graph for this function:

◆ edgeLabels() [1/2]

const labelList& edgeLabels ( ) const
inlinenoexcept

Definition at line 221 of file faPatch.H.

Referenced by faPatchData::assign(), symmetryFaPatch::clone(), emptyFaPatch::clone(), and faPatch::clone().

Here is the caller graph for this function:

◆ edgeLabels() [2/2]

void edgeLabels ( const UList< label > &  newEdgeLabels)

◆ nPoints()

label nPoints ( ) const
inline

Definition at line 230 of file faPatch.H.

References faPatch::pointLabels().

Here is the call graph for this function:

◆ nEdges()

label nEdges ( ) const
inlinenoexcept

Definition at line 236 of file faPatch.H.

◆ ngbPolyPatchIndex()

label ngbPolyPatchIndex ( ) const
inlinenoexcept

Definition at line 242 of file faPatch.H.

Referenced by faPatchData::assign(), symmetryFaPatch::clone(), emptyFaPatch::clone(), and faPatch::clone().

Here is the caller graph for this function:

◆ boundaryMesh()

const Foam::faBoundaryMesh & boundaryMesh ( ) const
noexcept

Definition at line 113 of file faPatch.C.

◆ coupled()

virtual bool coupled ( ) const
inlinevirtual

Reimplemented in processorFaPatch, and coupledFaPatch.

Definition at line 251 of file faPatch.H.

◆ start()

Foam::label start ( ) const

Definition at line 119 of file faPatch.C.

References boundaryMesh::mesh().

Referenced by faPatch::patchSlice(), and faPatch::whichEdge().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ size()

virtual label size ( ) const
inlinevirtual

Reimplemented in emptyFaPatch.

Definition at line 260 of file faPatch.H.

Referenced by faMeshDecomposition::decomposeMesh(), processorFaPatch::interfaceSize(), faPatch::patchSlice(), and faPatchMapper::size().

Here is the caller graph for this function:

◆ whichEdge()

label whichEdge ( const label  l) const
inline

Definition at line 266 of file faPatch.H.

References faPatch::start().

Here is the call graph for this function:

◆ patchSlice()

List<T>::subList patchSlice ( const List< T > &  l) const
inline

Definition at line 273 of file faPatch.H.

References faPatch::size(), and faPatch::start().

Referenced by faFieldDecomposer::reset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write()

void write ( Ostream os) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ boundaryConnections()

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().

Here is the call graph for this function:

◆ boundaryProcs()

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().

Here is the call graph for this function:

◆ boundaryProcSizes()

Foam::List< Foam::labelPair > boundaryProcSizes ( ) const

◆ pointLabels()

const Foam::labelList & pointLabels ( ) const

Definition at line 195 of file faPatch.C.

Referenced by faPatch::nPoints(), and faGlobalMeshData::updateMesh().

Here is the caller graph for this function:

◆ pointEdges()

const Foam::labelListList & pointEdges ( ) const

Definition at line 206 of file faPatch.C.

◆ ngbPolyPatchFaceNormals()

Foam::tmp< Foam::vectorField > ngbPolyPatchFaceNormals ( ) const

Definition at line 305 of file faPatch.C.

References boundaryMesh::mesh(), and tmp::New().

Here is the call graph for this function:

◆ ngbPolyPatchPointNormals()

Foam::tmp< Foam::vectorField > ngbPolyPatchPointNormals ( ) const

Definition at line 316 of file faPatch.C.

References faceNormals(), forAll, mesh, n, tmp::New(), and Foam::Zero.

Here is the call graph for this function:

◆ edgeFaces()

const Foam::labelUList & edgeFaces ( ) const

Definition at line 351 of file faPatch.C.

References mesh.

Referenced by contactAngleForce::correct(), faMeshDecomposition::decomposeMesh(), and coupledFaPatch::faceCells().

Here is the caller graph for this function:

◆ edgeCentres()

const Foam::vectorField & edgeCentres ( ) const

Definition at line 365 of file faPatch.C.

References boundaryMesh::mesh().

Here is the call graph for this function:

◆ edgeLengths()

const Foam::vectorField & edgeLengths ( ) const

Definition at line 371 of file faPatch.C.

References boundaryMesh::mesh().

Here is the call graph for this function:

◆ magEdgeLengths()

const Foam::scalarField & magEdgeLengths ( ) const

Definition at line 377 of file faPatch.C.

References boundaryMesh::mesh().

Here is the call graph for this function:

◆ edgeNormals()

Foam::tmp< Foam::vectorField > edgeNormals ( ) const

Definition at line 383 of file faPatch.C.

References n, and tmp::New().

Here is the call graph for this function:

◆ edgeFaceCentres()

Foam::tmp< Foam::vectorField > edgeFaceCentres ( ) const

Definition at line 396 of file faPatch.C.

References forAll, boundaryMesh::mesh(), and tmp::New().

Here is the call graph for this function:

◆ delta()

Foam::tmp< Foam::vectorField > delta ( ) const
virtual

◆ makeWeights()

void makeWeights ( scalarField w) const
virtual

Reimplemented in coupledFaPatch, processorFaPatch, and cyclicFaPatch.

Definition at line 444 of file faPatch.C.

◆ weights()

const Foam::scalarField & weights ( ) const

Definition at line 450 of file faPatch.C.

References boundaryMesh::mesh().

Here is the call graph for this function:

◆ makeDeltaCoeffs()

void makeDeltaCoeffs ( scalarField dc) const
virtual

Reimplemented in coupledFaPatch, processorFaPatch, and cyclicFaPatch.

Definition at line 422 of file faPatch.C.

References delta.

◆ makeCorrectionVectors()

void makeCorrectionVectors ( vectorField k) const

Definition at line 428 of file faPatch.C.

References delta, k, and Foam::mag().

Here is the call graph for this function:

◆ deltaCoeffs()

const Foam::scalarField & deltaCoeffs ( ) const

Definition at line 438 of file faPatch.C.

References boundaryMesh::mesh().

Here is the call graph for this function:

◆ resetEdges() [1/2]

void resetEdges ( const UList< label > &  newEdges)

Definition at line 460 of file faPatch.C.

◆ resetEdges() [2/2]

void resetEdges ( labelList &&  newEdges)

Definition at line 467 of file faPatch.C.

◆ patchInternalField() [1/4]

tmp<Field<Type> > patchInternalField ( const UList< Type > &  ) const

◆ patchInternalField() [2/4]

tmp<Foam::Field<Type> > patchInternalField ( const UList< Type > &  f,
const labelUList edgeFaces 
) const

◆ patchField()

const GeometricField::Patch & patchField ( const GeometricField gf) const

Definition at line 57 of file faPatchTemplates.C.

References GeometricField::boundaryField().

Here is the call graph for this function:

◆ lookupPatchField()

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().

Here is the call graph for this function:

◆ patchInternalField() [3/4]

Foam::tmp<Foam::Field<Type> > patchInternalField ( const UList< Type > &  f) const

Definition at line 28 of file faPatchTemplates.C.

References f().

Here is the call graph for this function:

◆ patchInternalField() [4/4]

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().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ faBoundaryMesh

friend class faBoundaryMesh
friend

Definition at line 105 of file faPatch.H.

◆ operator<<

Ostream& operator<< ( Ostream ,
const faPatch  
)
friend

The documentation for this class was generated from the following files: