MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_LineDetectionFactory_decl.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // MueLu: A package for multigrid based preconditioning
4 //
5 // Copyright 2012 NTESS and the MueLu contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef MUELU_LINEDETECTIONFACTORY_DECL_HPP
11 #define MUELU_LINEDETECTIONFACTORY_DECL_HPP
12 
13 // same as in SemiCoarsenPFactory (TODO rework this)
14 #define VERTICAL 1
15 #define HORIZONTAL 2
16 #define GRID_SUPPLIED -1
17 
18 #include "MueLu_ConfigDefs.hpp"
20 
21 #include "MueLu_Level_fwd.hpp"
23 
24 namespace MueLu {
25 
31 template <class Scalar = DefaultScalar,
34  class Node = DefaultNode>
36 #undef MUELU_LINEDETECTIONFACTORY_SHORT
37 #include "MueLu_UseShortNames.hpp"
38 
39  public:
42 
44 
45 
48 
50  virtual ~LineDetectionFactory() {}
51 
53 
55 
57 
58 
59  void DeclareInput(Level& currentLevel) const;
60 
62 
64 
65 
71  void Build(Level& currentLevel) const;
72 
74 
75  private:
76  void sort_coordinates(LO numCoords, LO* OrigLoc,
77  coordinate_type* xvals,
78  coordinate_type* yvals,
79  coordinate_type* zvals,
80  coordinate_type* xtemp,
81  coordinate_type* ytemp,
82  coordinate_type* ztemp,
83  bool flipXY = false) const;
84 
85  LO ML_compute_line_info(LO LayerId[], LO VertLineId[],
86  LO Ndof, LO DofsPerNode,
87  LO MeshNumbering, LO NumNodesPerVertLine,
88  coordinate_type* xvals, coordinate_type* yvals, coordinate_type* zvals,
89  const Teuchos::Comm<int>& comm) const;
90 
91  void ML_az_dsort2(coordinate_type dlist[], LO N, LO list2[]) const;
92 
97  mutable LO Zorientation_;
98 
99 }; // class LineDetectionFactory
100 
101 } // namespace MueLu
102 
103 #define MUELU_LINEDETECTIONFACTORY_SHORT
104 #endif // MUELU_LINEDETECTIONFACTORY_DECL_HPP
MueLu::DefaultLocalOrdinal LocalOrdinal
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
LocalOrdinal LO
typename Teuchos::ScalarTraits< SC >::coordinateType coordinate_type
MueLu::DefaultNode Node
void Build(Level &currentLevel) const
Build method.
void ML_az_dsort2(coordinate_type dlist[], LO N, LO list2[]) const
MueLu::DefaultScalar Scalar
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:63
void sort_coordinates(LO numCoords, LO *OrigLoc, coordinate_type *xvals, coordinate_type *yvals, coordinate_type *zvals, coordinate_type *xtemp, coordinate_type *ytemp, coordinate_type *ztemp, bool flipXY=false) const
Factory for building line detection information.
LO ML_compute_line_info(LO LayerId[], LO VertLineId[], LO Ndof, LO DofsPerNode, LO MeshNumbering, LO NumNodesPerVertLine, coordinate_type *xvals, coordinate_type *yvals, coordinate_type *zvals, const Teuchos::Comm< int > &comm) const
Base class for factories that use one level (currentLevel).
typename Xpetra::MultiVector< coordinate_type, LO, GO, NO > CoordinateMultiVector
void DeclareInput(Level &currentLevel) const
Input.