Skip to content

Commit

Permalink
MueLu: GeometricInterpolationPFactory, see issue trilinos#3179
Browse files Browse the repository at this point in the history
adding the stokhos files, modifying the input parameters and modifying the
structured poisson example in trilinosCouplings to test the new geometric
interpolation factory. I mainly needed to provide us with coordinates for
the piece-wise linear interpolation. This example can also be used to exert
 the hybrid aggregation capabilities now.

Rewrite of parts of structured aggregation to use CrsGraph for piece-wise
constant aggregation. This eventually allows to write a simplified version
of the piece-wise constant interpolation prolongator as maps are transfered
 from aggregation to prolongator via the CrsGraph.
  • Loading branch information
lucbv committed Jul 27, 2018
1 parent 8bb257b commit 9a0d65e
Show file tree
Hide file tree
Showing 38 changed files with 1,691 additions and 137 deletions.
19 changes: 18 additions & 1 deletion packages/muelu/doc/UsersGuide/masterList.xml
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,24 @@
<name-ML>eigen-analysis: iterations</name-ML>
</parameter>

<parameter>
<name>gmg: interpolation order</name>
<type>int</type>
<default>1</default>
<description>Interpolation order used to interpolate values from coarse points to fine points. Possible values are 0 for piece-wise constant interpolation and 1 for piece-wise linear interpolation. This parameter is set to 1 by default.</description>
<visible></visible>
<comment-ML>parameter not existing in ML</comment-ML>
</parameter>

<parameter>
<name>gmg: build coarse coordinates</name>
<type>bool</type>
<default>true</default>
<description>If false, skip the calculation of coarse coordinates.</description>
<visible>false</visible>
<comment-ML>not supported by ML</comment-ML>
</parameter>

<parameter>
<name>transfer: params</name>
<type>\parameterlist</type>
Expand All @@ -797,7 +815,6 @@
<visible>false</visible>
</parameter>


<parameter>
<name>pcoarsen: schedule</name>
<type>string</type>
Expand Down
4 changes: 4 additions & 0 deletions packages/muelu/doc/UsersGuide/paramlist_hidden.tex
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@

\cbb{sa: eigenvalue estimate num iterations}{int}{10}{Number of power iterations to use to estimate max eigenvalue. This has effect only if estimation occurs during prolongator smoothing.}

\cbb{gmg: interpolation order}{int}{1}{Interpolation order used to interpolate values from coarse points to fine points. Possible values are 0 for piece-wise constant interpolation and 1 for piece-wise linear interpolation. This parameter is set to 1 by default.}

\cbb{gmg: build coarse coordinates}{bool}{true}{If false, skip the calculation of coarse coordinates.}

\cba{transfer: params}{\parameterlist}{Sublist of options for use by transfer.}

\cbb{pcoarsen: element}{string}{""}{Element class for IntrepidPCoarsening}
Expand Down
1 change: 1 addition & 0 deletions packages/muelu/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -472,3 +472,4 @@ TRIBITS_ADD_LIBRARY(
# touch CMakeLists.txt because a new file was created in Utils/ExplicitInstantiation of Utils/ForwardDeclaration
# touch CMakeLists.txt because a new file was created in Utils/ExplicitInstantiation of Utils/ForwardDeclaration
# touch CMakeLists.txt because a new file was created in Utils/ExplicitInstantiation of Utils/ForwardDeclaration
# touch CMakeLists.txt because a new file was created in Utils/ExplicitInstantiation of Utils/ForwardDeclaration
2 changes: 1 addition & 1 deletion packages/muelu/src/Graph/MueLu_Aggregates_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ namespace MueLu {
This has to be done by the aggregation factory.
*/
RCP<IndexManager> & GetIndexManager() { return geoData_; }
RCP<IndexManager>& GetIndexManager() { return geoData_; }

/*! @brief Get the index manager used by structured aggregation algorithms.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,28 @@ namespace MueLu {

/*! @brief Local aggregation. */

void BuildAggregates(const ParameterList& params, const GraphBase& graph, Aggregates& aggregates,
std::vector<unsigned>& aggStat, LO& numNonAggregatedNodes) const;
void BuildAggregates(const Teuchos::ParameterList& params, const GraphBase& graph,
Aggregates& aggregates, std::vector<unsigned>& aggStat,
LO& numNonAggregatedNodes) const;

/*! @brief Local aggregation. */

void BuildAggregates(const ParameterList& params, const GraphBase& graph,
RCP<IndexManager>& geoData, RCP<CrsGraph>& myGraph) const;
void BuildAggregates(const GraphBase& graph, RCP<IndexManager>& geoData,
RCP<CrsGraph>& myGraph) const;
//@}

std::string description() const { return "Aggretation: structured algorithm"; }

private:

void ComputeGraphDataConstant(const GraphBase& graph, RCP<IndexManager>& geoData,
const int numInterpolationPoints, ArrayRCP<size_t>& nnzOnRow,
Array<size_t>& rowPtr, Array<LO>& colIndex) const;

void ComputeGraphDataLinear(const GraphBase& graph, RCP<IndexManager>& geoData,
const int numInterpolationPoints, ArrayRCP<size_t>& nnzOnRow,
Array<size_t>& rowPtr, Array<LO>& colIndex) const;

};

} //namespace MueLu
Expand Down
Loading

0 comments on commit 9a0d65e

Please sign in to comment.