Skip to content

Commit

Permalink
Merge 'trilinos/Trilinos:develop' (98104b0) into 'tcad-charon/Trilino…
Browse files Browse the repository at this point in the history
…s:develop' (1683f23).

* trilinos-develop:
  MueLu: gold file rebase and change of logic for issue trilinos#6269
  MueLu: refactor of Dirichlet conditions handling and changes in UncoupledAggregation see issue trilinos#6269
  Intrepid2: tweaks to OrientationTools::modifyBasisByOrientation() to allow reference-space inputs.
  Tempus: Add Cleanup of Error Tolerances.
  SEACAS: kluge to get new lib::fmt maybe working with nvcc
  Intrepid2: fixing issues with hierarchical parallelism policies, revealed when Trilinos is built with KOKKOS_ENABLE_DEPRECATED_CODE=OFF. (trilinos#6310)
  SEACAS: Another try at fixing nvcc build
  MueLu: fix type handling in regionMG unit test
  MueLu: remove debug output from regionMG unit test
  SEACAS: Attempt to fix CUDA compile errors
  Attempt to fix NVCC / INTEL compiler errors
  MueLu: fix misleading comments in regionMG unit tests
  Automatic snapshot commit from seacas at a34490f
  MueLu: adding region vector unit-test. Added tests for regionalToComposite and compositeToRegional.
  • Loading branch information
Jenkins Pipeline committed Nov 22, 2019
2 parents 1683f23 + 98104b0 commit 03d0693
Show file tree
Hide file tree
Showing 277 changed files with 30,082 additions and 26,059 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -686,9 +686,8 @@ namespace Intrepid2
const int outputVectorSize = getVectorSizeForHierarchicalParallelism<OutputValueType>();
const int pointVectorSize = getVectorSizeForHierarchicalParallelism<PointValueType>();
const int vectorSize = std::max(outputVectorSize,pointVectorSize);
const int teamSize = basisCardinality2;

auto policy = Kokkos::TeamPolicy<ExecutionSpace>(basisCardinality1,teamSize,vectorSize);
auto policy = Kokkos::TeamPolicy<ExecutionSpace>(basisCardinality1,Kokkos::AUTO(),vectorSize);

double weight = 1.0;
using FunctorType = TensorViewFunctor<ExecutionSpace, OutputValueType, OutputViewType>;
Expand Down Expand Up @@ -840,9 +839,8 @@ namespace Intrepid2
const int outputVectorSize = getVectorSizeForHierarchicalParallelism<OutputValueType>();
const int pointVectorSize = getVectorSizeForHierarchicalParallelism<PointValueType>();
const int vectorSize = std::max(outputVectorSize,pointVectorSize);
const int teamSize = basisCardinality2;

auto policy = Kokkos::TeamPolicy<ExecutionSpace>(basisCardinality1,teamSize,vectorSize);
auto policy = Kokkos::TeamPolicy<ExecutionSpace>(basisCardinality1,Kokkos::AUTO(),vectorSize);

using FunctorType = TensorViewFunctor<ExecutionSpace, OutputValueType, OutputViewType>;

Expand Down Expand Up @@ -1342,9 +1340,8 @@ namespace Intrepid2
const int outputVectorSize = getVectorSizeForHierarchicalParallelism<OutputScalar>();
const int pointVectorSize = getVectorSizeForHierarchicalParallelism<PointScalar>();
const int vectorSize = std::max(outputVectorSize,pointVectorSize);
const int teamSize = basisCardinality2;

auto policy = Kokkos::TeamPolicy<ExecutionSpace>(basisCardinality1,teamSize,vectorSize);
auto policy = Kokkos::TeamPolicy<ExecutionSpace>(basisCardinality1,Kokkos::AUTO(),vectorSize);

using FunctorType = TensorBasis3_Functor<ExecutionSpace, OutputScalar, OutputViewType>;
FunctorType functor(outputValues, outputValues1, outputValues2, outputValues3, tensorPoints, weight);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ namespace Intrepid2 {
typedef typename inputViewType::non_const_value_type input_value_type;

auto out = Kokkos::subview(output, cell, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
auto in = Kokkos::subview(input, cell, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
auto in = (input.rank() == output.rank()) ?
Kokkos::subview(input, cell, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL())
: Kokkos::subview(input, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());

// vertex copy (no orientation)
for (ordinal_type vertId=0;vertId<numVerts;++vertId) {
Expand Down Expand Up @@ -276,13 +278,25 @@ namespace Intrepid2 {
const BasisPtrType basis ) {
#ifdef HAVE_INTREPID2_DEBUG
{
INTREPID2_TEST_FOR_EXCEPTION( input.rank() != output.rank(), std::invalid_argument,
">>> ERROR (OrientationTools::modifyBasisByOrientation): Input and output rank are not 3.");
for (size_type i=0;i<input.rank();++i)
INTREPID2_TEST_FOR_EXCEPTION( input.extent(i) != output.extent(i), std::invalid_argument,
">>> ERROR (OrientationTools::modifyBasisByOrientation): Input and output dimension does not match.");
if (input.rank() == output.rank())
{
for (size_type i=0;i<input.rank();++i)
INTREPID2_TEST_FOR_EXCEPTION( input.extent(i) != output.extent(i), std::invalid_argument,
">>> ERROR (OrientationTools::modifyBasisByOrientation): Input and output dimension does not match.");
}
else if (input.rank() == output.rank() - 1)
{
for (size_type i=0;i<input.rank();++i)
INTREPID2_TEST_FOR_EXCEPTION( input.extent(i) != output.extent(i+1), std::invalid_argument,
">>> ERROR (OrientationTools::modifyBasisByOrientation): Input dimensions must match output dimensions exactly, or else match all but the first dimension (in the case that input does not have a 'cell' dimension).");
}
else
{
INTREPID2_TEST_FOR_EXCEPTION(true, std::invalid_argument,
">>> ERROR (OrientationTools::modifyBasisByOrientation): input and output ranks must either match, or input rank must be one less than that of output.")
}

INTREPID2_TEST_FOR_EXCEPTION( static_cast<ordinal_type>(input.extent(1)) != basis->getCardinality(), std::invalid_argument,
INTREPID2_TEST_FOR_EXCEPTION( static_cast<ordinal_type>(output.extent(1)) != basis->getCardinality(), std::invalid_argument,
">>> ERROR (OrientationTools::modifyBasisByOrientation): Field dimension of input/output does not match to basis cardinality.");
}
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@ namespace

const bool hasADType = false;
const int vectorSize = hasADType ? FAD_VECTOR_SIZE : VECTOR_SIZE;
const int teamSize = view2.extent_int(0);

auto policy = Kokkos::TeamPolicy<ExecutionSpace>(view1.extent_int(0),teamSize,vectorSize);
auto policy = Kokkos::TeamPolicy<ExecutionSpace>(view1.extent_int(0),Kokkos::AUTO(),vectorSize);

using FunctorType = TensorViewFunctor<ExecutionSpace, Scalar, ScalarViewType>;

Expand Down
37 changes: 18 additions & 19 deletions packages/intrepid2/unit-test/Orientation/test_orientation_HEX.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@


/** \file
\brief Test for checking orientation tools for Hexaedral elements
\brief Test for checking orientation tools for Hexahedral elements
The test considers two hexahedra in the physical space sharing a common face.
In order to test significant configurations, we consider 6 mappings of the reference hexahedron
Expand Down Expand Up @@ -456,25 +456,26 @@ int OrientationHex(const bool verbose) {

//Testing Kronecker property of basis functions
{
DynRankView ConstructWithLabel(basisValuesAtDofCoords, numCells, basisCardinality, basisCardinality);
DynRankView ConstructWithLabel(basisValuesAtDofCoordsOriented, numCells, basisCardinality, basisCardinality);
DynRankView ConstructWithLabel(transformedBasisValuesAtDofCoordsOriented, numCells, basisCardinality, basisCardinality);
for(ordinal_type i=0; i<numCells; ++i) {
DynRankView ConstructWithLabel(basisValuesAtDofCoords, numCells, basisCardinality, basisCardinality);
DynRankView ConstructWithLabel(basisValuesAtDofCoordsOriented, numCells, basisCardinality, basisCardinality);
DynRankView ConstructWithLabel(transformedBasisValuesAtDofCoordsOriented, numCells, basisCardinality, basisCardinality);
auto inView = Kokkos::subview( dofCoordsOriented,i,Kokkos::ALL(),Kokkos::ALL());
auto outView =Kokkos::subview( basisValuesAtDofCoords,i,Kokkos::ALL(),Kokkos::ALL());
basis.getValues(outView, inView);
}

// modify basis values to account for orientations
ots::modifyBasisByOrientation(basisValuesAtDofCoordsOriented,
basisValuesAtDofCoords,
elemOrts,
&basis);

// transform basis values
deep_copy(transformedBasisValuesAtDofCoordsOriented,
basisValuesAtDofCoordsOriented);
// modify basis values to account for orientations
ots::modifyBasisByOrientation(basisValuesAtDofCoordsOriented,
basisValuesAtDofCoords,
elemOrts,
&basis);

// transform basis values
deep_copy(transformedBasisValuesAtDofCoordsOriented,
basisValuesAtDofCoordsOriented);

for(ordinal_type i=0; i<numCells; ++i) {
for(ordinal_type k=0; k<basisCardinality; ++k) {
for(ordinal_type j=0; j<basisCardinality; ++j){
ValueType dofValue = transformedBasisValuesAtDofCoordsOriented(i,k,j) * dofCoeffsPhys(i,j);
Expand All @@ -493,7 +494,7 @@ int OrientationHex(const bool verbose) {
}
}

//check function reproducbility
//check function reproducibility
Fun fun;
DynRankView ConstructWithLabel(funDofs, numCells, basisCardinality);
DynRankView ConstructWithLabel(funAtPhysRefCoords, numCells, numRefCoords);
Expand Down Expand Up @@ -555,17 +556,15 @@ int OrientationHex(const bool verbose) {
//check that fun values at reference points coincide with those computed using basis functions
DynRankView ConstructWithLabel(basisValuesAtRefCoordsOriented, numCells, basisCardinality, numRefCoords);
DynRankView ConstructWithLabel(transformedBasisValuesAtRefCoordsOriented, numCells, basisCardinality, numRefCoords);
DynRankView basisValuesAtRefCoordsCells("inValues", numCells, basisCardinality, numRefCoords);

DynRankView ConstructWithLabel(basisValuesAtRefCoords, basisCardinality, numRefCoords);
basis.getValues(basisValuesAtRefCoords, refPoints);
rst::clone(basisValuesAtRefCoordsCells,basisValuesAtRefCoords);

// modify basis values to account for orientations
ots::modifyBasisByOrientation(basisValuesAtRefCoordsOriented,
basisValuesAtRefCoordsCells,
elemOrts,
&basis);
basisValuesAtRefCoords,
elemOrts,
&basis);

// transform basis values
deep_copy(transformedBasisValuesAtRefCoordsOriented,
Expand Down
34 changes: 17 additions & 17 deletions packages/intrepid2/unit-test/Orientation/test_orientation_QUAD.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,25 +362,27 @@ int OrientationQuad(const bool verbose) {

//Testing Kronecker property of basis functions
{
DynRankView ConstructWithLabel(basisValuesAtDofCoords, numCells, basisCardinality, basisCardinality);
DynRankView ConstructWithLabel(basisValuesAtDofCoordsOriented, numCells, basisCardinality, basisCardinality);
DynRankView ConstructWithLabel(transformedBasisValuesAtDofCoordsOriented, numCells, basisCardinality, basisCardinality);

for(ordinal_type i=0; i<numCells; ++i) {
DynRankView ConstructWithLabel(basisValuesAtDofCoords, numCells, basisCardinality, basisCardinality);
DynRankView ConstructWithLabel(basisValuesAtDofCoordsOriented, numCells, basisCardinality, basisCardinality);
DynRankView ConstructWithLabel(transformedBasisValuesAtDofCoordsOriented, numCells, basisCardinality, basisCardinality);
auto inView = Kokkos::subview( dofCoordsOriented,i,Kokkos::ALL(),Kokkos::ALL());
auto outView =Kokkos::subview( basisValuesAtDofCoords,i,Kokkos::ALL(),Kokkos::ALL());
basis.getValues(outView, inView);
}

// modify basis values to account for orientations
ots::modifyBasisByOrientation(basisValuesAtDofCoordsOriented,
basisValuesAtDofCoords,
elemOrts,
&basis);

// transform basis values
deep_copy(transformedBasisValuesAtDofCoordsOriented,
basisValuesAtDofCoordsOriented);
// modify basis values to account for orientations
ots::modifyBasisByOrientation(basisValuesAtDofCoordsOriented,
basisValuesAtDofCoords,
elemOrts,
&basis);

// transform basis values
deep_copy(transformedBasisValuesAtDofCoordsOriented,
basisValuesAtDofCoordsOriented);

for(ordinal_type i=0; i<numCells; ++i) {
for(ordinal_type k=0; k<basisCardinality; ++k) {
for(ordinal_type j=0; j<basisCardinality; ++j){
ValueType dofValue = transformedBasisValuesAtDofCoordsOriented(i,k,j) * dofCoeffsPhys(i,j);
Expand Down Expand Up @@ -437,17 +439,15 @@ int OrientationQuad(const bool verbose) {
//check that fun values at reference points coincide with those computed using basis functions
DynRankView ConstructWithLabel(basisValuesAtRefCoordsOriented, numCells, basisCardinality, numRefCoords);
DynRankView ConstructWithLabel(transformedBasisValuesAtRefCoordsOriented, numCells, basisCardinality, numRefCoords);
DynRankView basisValuesAtRefCoordsCells("inValues", numCells, basisCardinality, numRefCoords);

DynRankView ConstructWithLabel(basisValuesAtRefCoords, basisCardinality, numRefCoords);
basis.getValues(basisValuesAtRefCoords, refPoints);
rst::clone(basisValuesAtRefCoordsCells,basisValuesAtRefCoords);

// modify basis values to account for orientations
ots::modifyBasisByOrientation(basisValuesAtRefCoordsOriented,
basisValuesAtRefCoordsCells,
elemOrts,
&basis);
basisValuesAtRefCoords,
elemOrts,
&basis);

// transform basis values
deep_copy(transformedBasisValuesAtRefCoordsOriented,
Expand Down
34 changes: 17 additions & 17 deletions packages/intrepid2/unit-test/Orientation/test_orientation_TET.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,25 +423,27 @@ int OrientationTet(const bool verbose) {

//Testing Kronecker property of basis functions
{
DynRankView ConstructWithLabel(basisValuesAtDofCoords, numCells, basisCardinality, basisCardinality);
DynRankView ConstructWithLabel(basisValuesAtDofCoordsOriented, numCells, basisCardinality, basisCardinality);
DynRankView ConstructWithLabel(transformedBasisValuesAtDofCoordsOriented, numCells, basisCardinality, basisCardinality);

for(ordinal_type i=0; i<numCells; ++i) {
DynRankView ConstructWithLabel(basisValuesAtDofCoords, numCells, basisCardinality, basisCardinality);
DynRankView ConstructWithLabel(basisValuesAtDofCoordsOriented, numCells, basisCardinality, basisCardinality);
DynRankView ConstructWithLabel(transformedBasisValuesAtDofCoordsOriented, numCells, basisCardinality, basisCardinality);
auto inView = Kokkos::subview( dofCoordsOriented,i,Kokkos::ALL(),Kokkos::ALL());
auto outView =Kokkos::subview( basisValuesAtDofCoords,i,Kokkos::ALL(),Kokkos::ALL());
basis.getValues(outView, inView);
}

// modify basis values to account for orientations
ots::modifyBasisByOrientation(basisValuesAtDofCoordsOriented,
basisValuesAtDofCoords,
elemOrts,
&basis);

// transform basis values
deep_copy(transformedBasisValuesAtDofCoordsOriented,
basisValuesAtDofCoordsOriented);
// modify basis values to account for orientations
ots::modifyBasisByOrientation(basisValuesAtDofCoordsOriented,
basisValuesAtDofCoords,
elemOrts,
&basis);

// transform basis values
deep_copy(transformedBasisValuesAtDofCoordsOriented,
basisValuesAtDofCoordsOriented);

for(ordinal_type i=0; i<numCells; ++i) {
for(ordinal_type k=0; k<basisCardinality; ++k) {
for(ordinal_type j=0; j<basisCardinality; ++j){
ValueType dofValue = transformedBasisValuesAtDofCoordsOriented(i,k,j) * dofCoeffsPhys(i,j);
Expand Down Expand Up @@ -522,17 +524,15 @@ int OrientationTet(const bool verbose) {
//check that fun values at reference points coincide with those computed using basis functions
DynRankView ConstructWithLabel(basisValuesAtRefCoordsOriented, numCells, basisCardinality, numRefCoords);
DynRankView ConstructWithLabel(transformedBasisValuesAtRefCoordsOriented, numCells, basisCardinality, numRefCoords);
DynRankView basisValuesAtRefCoordsCells("inValues", numCells, basisCardinality, numRefCoords);

DynRankView ConstructWithLabel(basisValuesAtRefCoords, basisCardinality, numRefCoords);
basis.getValues(basisValuesAtRefCoords, refPoints);
rst::clone(basisValuesAtRefCoordsCells,basisValuesAtRefCoords);

// modify basis values to account for orientations
ots::modifyBasisByOrientation(basisValuesAtRefCoordsOriented,
basisValuesAtRefCoordsCells,
elemOrts,
&basis);
basisValuesAtRefCoords,
elemOrts,
&basis);

// transform basis values
deep_copy(transformedBasisValuesAtRefCoordsOriented,
Expand Down
36 changes: 18 additions & 18 deletions packages/intrepid2/unit-test/Orientation/test_orientation_TRI.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,25 +362,27 @@ int OrientationTri(const bool verbose) {

//Testing Kronecker property of basis functions
{
DynRankView ConstructWithLabel(basisValuesAtDofCoords, numCells, basisCardinality, basisCardinality);
DynRankView ConstructWithLabel(basisValuesAtDofCoordsOriented, numCells, basisCardinality, basisCardinality);
DynRankView ConstructWithLabel(transformedBasisValuesAtDofCoordsOriented, numCells, basisCardinality, basisCardinality);

for(ordinal_type i=0; i<numCells; ++i) {
DynRankView ConstructWithLabel(basisValuesAtDofCoords, numCells, basisCardinality, basisCardinality);
DynRankView ConstructWithLabel(basisValuesAtDofCoordsOriented, numCells, basisCardinality, basisCardinality);
DynRankView ConstructWithLabel(transformedBasisValuesAtDofCoordsOriented, numCells, basisCardinality, basisCardinality);
auto inView = Kokkos::subview( dofCoordsOriented,i,Kokkos::ALL(),Kokkos::ALL());
auto outView =Kokkos::subview( basisValuesAtDofCoords,i,Kokkos::ALL(),Kokkos::ALL());
basis.getValues(outView, inView);
}

// modify basis values to account for orientations
ots::modifyBasisByOrientation(basisValuesAtDofCoordsOriented,
basisValuesAtDofCoords,
elemOrts,
&basis);

// transform basis values
deep_copy(transformedBasisValuesAtDofCoordsOriented,
basisValuesAtDofCoordsOriented);
// modify basis values to account for orientations
ots::modifyBasisByOrientation(basisValuesAtDofCoordsOriented,
basisValuesAtDofCoords,
elemOrts,
&basis);

// transform basis values
deep_copy(transformedBasisValuesAtDofCoordsOriented,
basisValuesAtDofCoordsOriented);

for(ordinal_type i=0; i<numCells; ++i) {
for(ordinal_type k=0; k<basisCardinality; ++k) {
for(ordinal_type j=0; j<basisCardinality; ++j){
ValueType dofValue = transformedBasisValuesAtDofCoordsOriented(i,k,j) * dofCoeffsPhys(i,j);
Expand Down Expand Up @@ -437,21 +439,19 @@ int OrientationTri(const bool verbose) {
//check that fun values at reference points coincide with those computed using basis functions
DynRankView ConstructWithLabel(basisValuesAtRefCoordsOriented, numCells, basisCardinality, numRefCoords);
DynRankView ConstructWithLabel(transformedBasisValuesAtRefCoordsOriented, numCells, basisCardinality, numRefCoords);
DynRankView basisValuesAtRefCoordsCells("inValues", numCells, basisCardinality, numRefCoords);

DynRankView ConstructWithLabel(basisValuesAtRefCoords, basisCardinality, numRefCoords);
basis.getValues(basisValuesAtRefCoords, refPoints);
rst::clone(basisValuesAtRefCoordsCells,basisValuesAtRefCoords);

// modify basis values to account for orientations
ots::modifyBasisByOrientation(basisValuesAtRefCoordsOriented,
basisValuesAtRefCoordsCells,
elemOrts,
&basis);
basisValuesAtRefCoords,
elemOrts,
&basis);

// transform basis values
deep_copy(transformedBasisValuesAtRefCoordsOriented,
basisValuesAtRefCoordsOriented);
basisValuesAtRefCoordsOriented);

DynRankView ConstructWithLabel(funAtRefCoordsOriented, numCells, numRefCoords);
for(ordinal_type i=0; i<numCells; ++i) {
Expand Down
Loading

0 comments on commit 03d0693

Please sign in to comment.