MueLu Version of the Day
Loading...
Searching...
No Matches
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
24namespace MueLu {
25
31template <class Scalar = DefaultScalar,
34 class Node = DefaultNode>
36#undef MUELU_LINEDETECTIONFACTORY_SHORT
38
39 public:
40 using coordinate_type = typename Teuchos::ScalarTraits<SC>::coordinateType;
41 using CoordinateMultiVector = typename Xpetra::MultiVector<coordinate_type, LO, GO, NO>;
42
44
45
48
51
52 RCP<const ParameterList> GetValidParameterList() const;
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
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
MueLu::DefaultNode Node
Class that holds all level-specific information.
Factory for building line detection information.
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
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
void ML_az_dsort2(coordinate_type dlist[], LO N, LO list2[]) const
void DeclareInput(Level &currentLevel) const
Input.
typename Xpetra::MultiVector< coordinate_type, LO, GO, NO > CoordinateMultiVector
typename Teuchos::ScalarTraits< SC >::coordinateType coordinate_type
void Build(Level &currentLevel) const
Build method.
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).
Namespace for MueLu classes and methods.
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar