10 #ifndef _ZOLTAN2_ALGSPECTRAL_HPP_
11 #define _ZOLTAN2_ALGSPECTRAL_HPP_
26 template <
typename Adapter>
35 const RCP<Teuchos::ParameterList> &pl,
36 const RCP<
const Teuchos::Comm<int> > &comm
39 #ifndef INCLUDE_ZOLTAN2_EXPERIMENTAL
42 "experimental software "
43 "while it is being developed and tested.")
45 #else //INCLUDE_ZOLTAN2_EXPERIMENTAL
49 typedef typename Adapter::offset_t offset_t;
50 typedef typename Adapter::scalar_t scalar_t;
57 bool localOrder =
true;
59 const size_t nVtx = model->getLocalNumVertices();
60 lno_t *perm = solution->getPermutationView();
61 for (lno_t i=0; i<nVtx; i++){
66 ArrayView<const gno_t> edgeIds;
67 ArrayView<const offset_t> offsets;
68 ArrayView<StridedData<lno_t, scalar_t> > wgts;
70 model->getEdgeList(edgeIds, offsets, wgts);
84 solution->setHavePerm(
true);
86 #endif // INCLUDE_ZOLTAN2_EXPERIMENTAL
map_t::global_ordinal_type gno_t
Defines the OrderingSolution class.
int AlgSpectral(const RCP< GraphModel< Adapter > > &model, const RCP< LocalOrderingSolution< typename Adapter::lno_t > > &solution, const RCP< Teuchos::ParameterList > &pl, const RCP< const Teuchos::Comm< int > > &comm)
map_t::local_ordinal_type lno_t
#define Z2_THROW_EXPERIMENTAL(mystr)
Throw an error when experimental code is requested but not compiled.
GraphModel defines the interface required for graph models.
Defines the GraphModel interface.