3030#include " CGeometry.hpp"
3131#include " meshreader/CMeshReaderBase.hpp"
3232#include " ../containers/C2DContainer.hpp"
33+ #include " ../toolboxes/classes_multiple_integers.hpp"
34+ #include " ../toolboxes/fem/CFaceOfElement.hpp"
3335
3436/* !
3537 * \class CPhysicalGeometry
@@ -497,6 +499,34 @@ class CPhysicalGeometry final : public CGeometry {
497499 */
498500 void SetColorFEMGrid_Parallel (CConfig* config) override ;
499501
502+ /* !
503+ * \brief Determine the donor elements for the boundary elements on viscous
504+ wall boundaries when wall functions are used.
505+ * \param[in] config - Definition of the particular problem.
506+ */
507+ void DetermineDonorElementsWallFunctions (CConfig* config);
508+
509+ #ifdef HAVE_MPI
510+ #ifdef HAVE_PARMETIS
511+ /* !
512+ * \brief Function, which converts the input the format for ParMETIS and calls
513+ * ParMETIS to determine the actual colors of the elements.
514+ * \param[in] adjacency - Adjacency information of the elements.
515+ * \param[in] vwgt - Weights of the vertices of the graph, which are the elements.
516+ * \param[in] adjwgt - Weights of the adjacencies of the graph.
517+ */
518+ void DetermineFEMColorsViaParMETIS (vector<vector<unsigned long > >& adjacency, vector<passivedouble>& vwgt,
519+ vector<vector<passivedouble> >& adjwgt);
520+ #endif
521+ #endif
522+
523+ /* !
524+ * \brief Determine whether or not the Jacobians of the elements and faces
525+ are constant and a length scale of the elements.
526+ * \param[in] config - Definition of the particular problem.
527+ */
528+ void DetermineFEMConstantJacobiansAndLenScale (CConfig* config);
529+
500530 /* !
501531 * \brief Compute the weights of the FEM graph for ParMETIS.
502532 * \param[in] config - Definition of the particular problem.
@@ -507,24 +537,44 @@ class CPhysicalGeometry final : public CGeometry {
507537 * \param[out] vwgt - Weights of the vertices of the graph, i.e. the elements.
508538 * \param[out] adjwgt - Weights of the edges of the graph.
509539 */
510- void ComputeFEMGraphWeights (CConfig* config, const vector<CFaceOfElement>& localFaces,
511- const vector<vector<unsigned long > >& adjacency,
512- const map<unsigned long , CUnsignedShort2T>& mapExternalElemIDToTimeLevel,
513- vector<su2double >& vwgt, vector<vector<su2double > >& adjwgt);
540+ void DetermineFEMGraphWeights (CConfig* config, const vector<CFaceOfElement>& localFaces,
541+ const vector<vector<unsigned long > >& adjacency,
542+ const map<unsigned long , CUnsignedShort2T>& mapExternalElemIDToTimeLevel,
543+ vector<passivedouble >& vwgt, vector<vector<passivedouble > >& adjwgt);
514544
515545 /* !
516- * \brief Determine the donor elements for the boundary elements on viscous
517- wall boundaries when wall functions are used.
518- * \param[in] config - Definition of the particular problem.
546+ * \brief Function, which determines the adjacency information of the graph
547+ * representation of the grid.
548+ * \param[in] localFaces - Vector containing the local matching faces of the FEM grid.
549+ * \param[out] adjacency - Vector of vectors to store the adjacency.
519550 */
520- void DetermineDonorElementsWallFunctions (CConfig* config );
551+ void DetermineGraphAdjacency ( const vector<CFaceOfElement>& localFaces, vector<vector< unsigned long > >& adjacency );
521552
522553 /* !
523- * \brief Determine whether or not the Jacobians of the elements and faces
524- are constant and a length scale of the elements.
525- * \param[in] config - Definition of the particular problem.
554+ * \brief Function, which determines the matching faces of a FEM grid.
555+ * \param[in] config - Definition of the particular problem.
556+ * \param[out] localFaces - Vector containing the local faces of the FEM grid.
557+ * On output the matching faces are stored as one face.
526558 */
527- void DetermineFEMConstantJacobiansAndLenScale (CConfig* config);
559+ void DetermineMatchingFacesFEMGrid (const CConfig* config, vector<CFaceOfElement>& localFaces);
560+
561+ /* !
562+ * \brief Function, which determines the non-matching faces of a FEM grid.
563+ * \param[in] config - Definition of the particular problem.
564+ * \param[in,out] localMatchingFaces - Vector containing the local faces of the FEM grid.
565+ * On output the non-matching faces are removed.
566+ */
567+ void DetermineNonMatchingFacesFEMGrid (const CConfig* config, vector<CFaceOfElement>& localMatchingFaces);
568+
569+ /* !
570+ * \brief Function, which determines the owner of the internal faces, i.e. which element
571+ * is responsible for computing the fluxes through the face.
572+ * \param[in] localFaces - Vector, which contains the element faces of this rank.
573+ * \param[out] mapExternalElemIDToTimeLevel - Map from the external element ID's to their time level and number of
574+ * DOFs.
575+ */
576+ void DetermineOwnershipInternalFaces (vector<CFaceOfElement>& localFaces,
577+ map<unsigned long , CUnsignedShort2T>& mapExternalElemIDToTimeLevel);
528578
529579 /* !
530580 * \brief Determine the neighboring information for periodic faces of a FEM grid.
@@ -543,6 +593,13 @@ class CPhysicalGeometry final : public CGeometry {
543593 void DetermineTimeLevelElements (CConfig* config, const vector<CFaceOfElement>& localFaces,
544594 map<unsigned long , CUnsignedShort2T>& mapExternalElemIDToTimeLevel);
545595
596+ /* !
597+ * \brief Function, which stores the information of the local matching faces in the
598+ * data structures of the local elements.
599+ * \param[in] localFaces - Vector, which contains the internal matching faces of this rank.
600+ */
601+ void StoreFaceInfoInLocalElements (const vector<CFaceOfElement>& localFaces);
602+
546603 /* !
547604 * \brief Compute 3 grid quality metrics: orthogonality angle, dual cell aspect ratio, and dual cell volume ratio.
548605 * \param[in] config - Definition of the particular problem.
0 commit comments