| 1 |
// @HEADER |
| 2 |
// ***************************************************************************** |
| 3 |
// Panzer: A partial differential equation assembly |
| 4 |
// engine for strongly coupled complex multiphysics systems |
| 5 |
// |
| 6 |
// Copyright 2011 NTESS and the Panzer contributors. |
| 7 |
// SPDX-License-Identifier: BSD-3-Clause |
| 8 |
// ***************************************************************************** |
| 9 |
// @HEADER |
| 10 |
|
| 11 |
#include <string> |
| 12 |
#include <iostream> |
| 13 |
#include <Teuchos_ConfigDefs.hpp> |
| 14 |
#include <Teuchos_UnitTestHarness.hpp> |
| 15 |
#include "Teuchos_DefaultComm.hpp" |
| 16 |
#include <Teuchos_RCP.hpp> |
| 17 |
// #include "Panzer_Traits.hpp" |
| 18 |
#include "Panzer_IntrepidFieldPattern.hpp" |
| 19 |
#include "Panzer_Interpolation.hpp" |
| 20 |
#include "Panzer_IntrepidBasisFactory.hpp" |
| 21 |
#include "Panzer_STK_MeshFactory.hpp" |
| 22 |
#include "Panzer_STK_LineMeshFactory.hpp" |
| 23 |
#include "Panzer_STK_SquareQuadMeshFactory.hpp" |
| 24 |
#include "Panzer_STK_SquareTriMeshFactory.hpp" |
| 25 |
#include "Panzer_STK_CubeHexMeshFactory.hpp" |
| 26 |
#include "Panzer_STK_CubeTetMeshFactory.hpp" |
| 27 |
#include "Panzer_STKConnManager.hpp" |
| 28 |
#include "Teko_Utilities.hpp" |
| 29 |
|
| 30 |
using Teuchos::rcp; |
| 31 |
using Teuchos::rcp_dynamic_cast; |
| 32 |
using Teuchos::RCP; |
| 33 |
using Teuchos::rcpFromRef; |
| 34 |
|
| 35 |
// #define PANZER_INTERPOLATION_WRITE_MATRICES_TO_FILE = 1 |
| 36 |
|
| 37 |
namespace panzer { |
| 38 |
|
| 39 |
Teuchos::RCP<panzer_stk::STK_Interface> getMesh(Teuchos::RCP<const Teuchos::MpiComm<int> > &comm, |
| 40 |
const std::string &mesh_type) { |
| 41 |
|
| 42 |
int x_elements = 4; |
| 43 |
int y_elements = 2; |
| 44 |
int z_elements = 2; |
| 45 |
// build mesh |
| 46 |
Teuchos::RCP<panzer_stk::STK_MeshFactory> mesh_factory; |
| 47 |
if (mesh_type == "tet") |
| 48 |
mesh_factory = rcp(new panzer_stk::CubeTetMeshFactory()); |
| 49 |
else if (mesh_type == "hex") |
| 50 |
mesh_factory = rcp(new panzer_stk::CubeHexMeshFactory()); |
| 51 |
else if (mesh_type == "tri") |
| 52 |
mesh_factory = rcp(new panzer_stk::SquareTriMeshFactory()); |
| 53 |
else if (mesh_type == "quad") |
| 54 |
mesh_factory = rcp(new panzer_stk::SquareQuadMeshFactory()); |
| 55 |
else if (mesh_type == "line") |
| 56 |
mesh_factory = rcp(new panzer_stk::LineMeshFactory()); |
| 57 |
else |
| 58 |
throw; |
| 59 |
RCP<Teuchos::ParameterList> pl = rcp(new Teuchos::ParameterList()); |
| 60 |
pl->set<int>("X Elements", x_elements); |
| 61 |
if (mesh_type != "line") |
| 62 |
pl->set<int>("Y Elements",y_elements); |
| 63 |
if (mesh_type == "tet" || mesh_type == "hex") |
| 64 |
pl->set<int>("Z Elements",z_elements); |
| 65 |
if (mesh_type != "line") { |
| 66 |
pl->set<int>("X Procs", -1); |
| 67 |
pl->set<int>("Y Procs", -1); |
| 68 |
} |
| 69 |
if (mesh_type == "tet" || mesh_type == "hex") |
| 70 |
pl->set<int>("Z Procs",-1); |
| 71 |
mesh_factory->setParameterList(pl); |
| 72 |
auto mesh = mesh_factory->buildUncommitedMesh((*comm->getRawMpiComm())()); |
| 73 |
mesh_factory->completeMeshConstruction(*mesh,(*comm->getRawMpiComm())()); |
| 74 |
return mesh; |
| 75 |
} |
| 76 |
|
| 77 |
Teuchos::RCP<const panzer::FieldPattern> buildFieldPattern(const std::string basis_type, int basis_order, const shards::CellTopology & cell_topology) |
| 78 |
{ |
| 79 |
|
| 80 |
// build a geometric pattern from a single basis |
| 81 |
RCP<Intrepid2::Basis<PHX::exec_space, double, double> > basis = panzer::createIntrepid2Basis<PHX::exec_space, double, double>(basis_type, basis_order, cell_topology); |
| 82 |
RCP<const panzer::FieldPattern> pattern = rcp(new panzer::Intrepid2FieldPattern(basis)); |
| 83 |
return pattern; |
| 84 |
} |
| 85 |
|
| 86 |
Teuchos::RCP<const panzer::BlockedDOFManager> buildBlockedIndexer64(Teuchos::RCP<const Teuchos::MpiComm<int> > &comm, |
| 87 |
const std::string &mesh_type, |
| 88 |
const std::string &space, |
| 89 |
const std::vector<int>& orders) |
| 90 |
{ |
| 91 |
Teuchos::RCP<panzer_stk::STK_Interface> mesh = getMesh(comm, mesh_type); |
| 92 |
const Teuchos::RCP<panzer::ConnManager> connManager = rcp(new panzer_stk::STKConnManager(mesh)); |
| 93 |
|
| 94 |
RCP<panzer::BlockedDOFManager> indexer = rcp(new panzer::BlockedDOFManager()); |
| 95 |
indexer->setConnManager(connManager, (*comm->getRawMpiComm())()); |
| 96 |
indexer->setOrientationsRequired(true); |
| 97 |
|
| 98 |
std::vector<shards::CellTopology> topologies; |
| 99 |
connManager->getElementBlockTopologies(topologies); |
| 100 |
shards::CellTopology topology = topologies[0]; |
| 101 |
|
| 102 |
const int numBlocks = orders.size(); |
| 103 |
std::vector<std::vector<std::string> > fieldOrder(numBlocks); |
| 104 |
|
| 105 |
for (size_t j = 0; j<orders.size(); ++j) { |
| 106 |
int order = orders[j]; |
| 107 |
Teuchos::RCP<const FieldPattern> pattern = buildFieldPattern(space, order, topology); |
| 108 |
indexer->addField(std::to_string(order), pattern); |
| 109 |
fieldOrder[j].push_back(std::to_string(order)); |
| 110 |
} |
| 111 |
|
| 112 |
indexer->setFieldOrder(fieldOrder); |
| 113 |
indexer->buildGlobalUnknowns(); |
| 114 |
|
| 115 |
return indexer; |
| 116 |
} |
| 117 |
|
| 118 |
Teuchos::RCP<const panzer::BlockedDOFManager> buildDeRhamBlockedIndexer64(Teuchos::RCP<const Teuchos::MpiComm<int> > &comm, |
| 119 |
const std::string &mesh_type, |
| 120 |
int order) |
| 121 |
{ |
| 122 |
Teuchos::RCP<panzer_stk::STK_Interface> mesh = getMesh(comm, mesh_type); |
| 123 |
const Teuchos::RCP<panzer::ConnManager> connManager = rcp(new panzer_stk::STKConnManager(mesh)); |
| 124 |
|
| 125 |
RCP<panzer::BlockedDOFManager> indexer = rcp(new panzer::BlockedDOFManager()); |
| 126 |
indexer->setConnManager(connManager, (*comm->getRawMpiComm())()); |
| 127 |
|
| 128 |
std::vector<shards::CellTopology> topologies; |
| 129 |
connManager->getElementBlockTopologies(topologies); |
| 130 |
shards::CellTopology topology = topologies[0]; |
| 131 |
int dim = static_cast<int>(topology.getDimension()); |
| 132 |
|
| 133 |
TEUCHOS_ASSERT(dim == 2 || dim == 3); |
| 134 |
|
| 135 |
const int numBlocks = dim + 1; |
| 136 |
std::vector<std::vector<std::string> > fieldOrder(numBlocks); |
| 137 |
|
| 138 |
int j = 0; |
| 139 |
|
| 140 |
// HGRAD |
| 141 |
Teuchos::RCP<const FieldPattern> patternHGrad = buildFieldPattern("HGrad", order, topology); |
| 142 |
indexer->addField("HGRAD", patternHGrad); |
| 143 |
fieldOrder[j++].push_back("HGRAD"); |
| 144 |
|
| 145 |
// HCURL |
| 146 |
Teuchos::RCP<const FieldPattern> patternHCURL = buildFieldPattern("HCurl", order, topology); |
| 147 |
indexer->addField("HCURL", patternHCURL); |
| 148 |
fieldOrder[j++].push_back("HCURL"); |
| 149 |
|
| 150 |
if (dim == 3) { |
| 151 |
// HDIV |
| 152 |
Teuchos::RCP<const FieldPattern> patternHDIV = buildFieldPattern("HDiv", order, topology); |
| 153 |
indexer->addField("HDIV", patternHDIV); |
| 154 |
fieldOrder[j++].push_back("HDIV"); |
| 155 |
} |
| 156 |
|
| 157 |
// HVOL |
| 158 |
Teuchos::RCP<const FieldPattern> patternHVOL = buildFieldPattern("HVol", order-1, topology); |
| 159 |
indexer->addField("HVOL", patternHVOL); |
| 160 |
fieldOrder[j++].push_back("HVOL"); |
| 161 |
|
| 162 |
indexer->setFieldOrder(fieldOrder); |
| 163 |
indexer->buildGlobalUnknowns(); |
| 164 |
|
| 165 |
return indexer; |
| 166 |
} |
| 167 |
|
| 168 |
|
| 169 |
Teuchos::RCP<panzer::DOFManager> getDOFManager(RCP<const panzer::BlockedDOFManager> blockedDOFMngr, const std::string basisName) { |
| 170 |
using UGI = panzer::GlobalIndexer; |
| 171 |
std::vector<RCP<UGI> > fieldDOFMngrs = blockedDOFMngr->getFieldDOFManagers(); |
| 172 |
int fieldNum = blockedDOFMngr->getFieldNum(basisName); |
| 173 |
int blockIndex = blockedDOFMngr->getFieldBlock(fieldNum); |
| 174 |
RCP<panzer::DOFManager> ugi = rcp_dynamic_cast<panzer::DOFManager>(fieldDOFMngrs[blockIndex], true); |
| 175 |
return ugi; |
| 176 |
} |
| 177 |
|
| 178 |
//////////////////////////////////////////////////////////////////////////// |
| 179 |
// Construct FE spaces of different order and check that the product of |
| 180 |
// interpolations between them matches the interpolation between lowest |
| 181 |
// and highest order space. |
| 182 |
void checkInterpolations(const std::string &mesh_type, |
| 183 |
const std::string &space, |
| 184 |
const std::vector<int> &orders, |
| 185 |
Teuchos::FancyOStream& out, |
| 186 |
bool &success) |
| 187 |
{ |
| 188 |
|
| 189 |
TEUCHOS_ASSERT(orders.size() >= 3); |
| 190 |
|
| 191 |
Teuchos::RCP<const Teuchos::MpiComm<int> > comm = rcp_dynamic_cast<const Teuchos::MpiComm<int> >(Teuchos::DefaultComm<int>::getComm()); |
| 192 |
|
| 193 |
RCP<const panzer::BlockedDOFManager> blkIndexer = buildBlockedIndexer64(comm, mesh_type, space, orders); |
| 194 |
|
| 195 |
RCP<const panzer::ConnManager> conn = blkIndexer->getConnManager(); |
| 196 |
std::vector<shards::CellTopology> topologies; |
| 197 |
conn->getElementBlockTopologies(topologies); |
| 198 |
|
| 199 |
std::vector<Teko::LinearOp> interpolations; |
| 200 |
|
| 201 |
for (size_t j = 0; j < orders.size() - 1; ++j) { |
| 202 |
out << "Building interpolation " << orders[j+1] << " " << orders[j] << std::endl; |
| 203 |
interpolations.push_back(buildInterpolation(conn, |
| 204 |
getDOFManager(blkIndexer, std::to_string(orders[j])), |
| 205 |
getDOFManager(blkIndexer, std::to_string(orders[j+1])), |
| 206 |
std::to_string(orders[j]), std::to_string(orders[j+1]), |
| 207 |
Intrepid2::OPERATOR_VALUE)); |
| 208 |
#ifdef PANZER_INTERPOLATION_WRITE_MATRICES_TO_FILE |
| 209 |
Teko::writeMatrix("interpolation_"+mesh_type+"_"+space+"_"+std::to_string(orders[j])+std::to_string(orders[j+1]), interpolations[j]); |
| 210 |
#endif |
| 211 |
} |
| 212 |
|
| 213 |
out << "Building interpolation " << orders[orders.size()-1] << " " << orders[0] << std::endl; |
| 214 |
auto interp = buildInterpolation(conn, |
| 215 |
getDOFManager(blkIndexer, std::to_string(orders[0])), |
| 216 |
getDOFManager(blkIndexer, std::to_string(orders[orders.size()-1])), |
| 217 |
std::to_string(orders[0]), |
| 218 |
std::to_string(orders[orders.size()-1]), |
| 219 |
Intrepid2::OPERATOR_VALUE); |
| 220 |
#ifdef PANZER_INTERPOLATION_WRITE_MATRICES_TO_FILE |
| 221 |
Teko::writeMatrix("interpolation_"+mesh_type+"_"+space+"_"+std::to_string(orders[0])+std::to_string(orders[orders.size()-1]), interp); |
| 222 |
#endif |
| 223 |
|
| 224 |
Teko::LinearOp diff, temp; |
| 225 |
double diffNorm; |
| 226 |
|
| 227 |
temp = interpolations[0]; |
| 228 |
for (size_t j = 1; j<interpolations.size(); ++j) { |
| 229 |
temp = Teko::explicitMultiply(interpolations[j], temp); |
| 230 |
} |
| 231 |
|
| 232 |
diff = Teko::explicitAdd(interp, Teko::scale(-1.0, temp)); |
| 233 |
diffNorm = Teko::infNorm(diff); |
| 234 |
out << diffNorm << std::endl; |
| 235 |
TEST_ASSERT(diffNorm < 1.0e-8); |
| 236 |
} |
| 237 |
|
| 238 |
TEUCHOS_UNIT_TEST(tInterpolation, line_hgrad_123) |
| 239 |
{ |
| 240 |
std::vector<int> orders = {1, 2, 3}; |
| 241 |
checkInterpolations("line", "HGrad", orders, out, success); |
| 242 |
} |
| 243 |
|
| 244 |
TEUCHOS_UNIT_TEST(tInterpolation, tri_hgrad_123) |
| 245 |
{ |
| 246 |
std::vector<int> orders = {1, 2, 3}; |
| 247 |
checkInterpolations("tri", "HGrad", orders, out, success); |
| 248 |
} |
| 249 |
|
| 250 |
TEUCHOS_UNIT_TEST(tInterpolation, tri_hcurl_123) |
| 251 |
{ |
| 252 |
std::vector<int> orders = {1, 2, 3}; |
| 253 |
checkInterpolations("tri", "HCurl", orders, out, success); |
| 254 |
} |
| 255 |
|
| 256 |
TEUCHOS_UNIT_TEST(tInterpolation, tri_hvol_012) |
| 257 |
{ |
| 258 |
std::vector<int> orders = {0, 1, 2}; |
| 259 |
checkInterpolations("tri", "HVol", orders, out, success); |
| 260 |
} |
| 261 |
|
| 262 |
TEUCHOS_UNIT_TEST(tInterpolation, quad_hgrad_123) |
| 263 |
{ |
| 264 |
std::vector<int> orders = {1, 2, 3}; |
| 265 |
checkInterpolations("quad", "HGrad", orders, out, success); |
| 266 |
} |
| 267 |
|
| 268 |
TEUCHOS_UNIT_TEST(tInterpolation, quad_hcurl_123) |
| 269 |
{ |
| 270 |
std::vector<int> orders = {1, 2, 3}; |
| 271 |
checkInterpolations("quad", "HCurl", orders, out, success); |
| 272 |
} |
| 273 |
|
| 274 |
TEUCHOS_UNIT_TEST(tInterpolation, quad_hvol_012) |
| 275 |
{ |
| 276 |
std::vector<int> orders = {0, 1, 2}; |
| 277 |
checkInterpolations("quad", "HVol", orders, out, success); |
| 278 |
} |
| 279 |
|
| 280 |
TEUCHOS_UNIT_TEST(tInterpolation, tet_hgrad_123) |
| 281 |
{ |
| 282 |
std::vector<int> orders = {1, 2, 3}; |
| 283 |
checkInterpolations("tet", "HGrad", orders, out, success); |
| 284 |
} |
| 285 |
|
| 286 |
TEUCHOS_UNIT_TEST(tInterpolation, tet_hcurl_123) |
| 287 |
{ |
| 288 |
std::vector<int> orders = {1, 2, 3}; |
| 289 |
checkInterpolations("tet", "HCurl", orders, out, success); |
| 290 |
} |
| 291 |
|
| 292 |
TEUCHOS_UNIT_TEST(tInterpolation, tet_hdiv_123) |
| 293 |
{ |
| 294 |
std::vector<int> orders = {1, 2, 3}; |
| 295 |
checkInterpolations("tet", "HDiv", orders, out, success); |
| 296 |
} |
| 297 |
|
| 298 |
TEUCHOS_UNIT_TEST(tInterpolation, tet_hvol_012) |
| 299 |
{ |
| 300 |
std::vector<int> orders = {0, 1, 2}; |
| 301 |
checkInterpolations("tet", "HVol", orders, out, success); |
| 302 |
} |
| 303 |
|
| 304 |
TEUCHOS_UNIT_TEST(tInterpolation, hex_hgrad_123) |
| 305 |
{ |
| 306 |
std::vector<int> orders = {1, 2, 3}; |
| 307 |
checkInterpolations("hex", "HGrad", orders, out, success); |
| 308 |
} |
| 309 |
|
| 310 |
TEUCHOS_UNIT_TEST(tInterpolation, hex_hcurl_123) |
| 311 |
{ |
| 312 |
std::vector<int> orders = {1, 2, 3}; |
| 313 |
checkInterpolations("hex", "HCurl", orders, out, success); |
| 314 |
} |
| 315 |
|
| 316 |
TEUCHOS_UNIT_TEST(tInterpolation, hex_hdiv_123) |
| 317 |
{ |
| 318 |
std::vector<int> orders = {1, 2, 3}; |
| 319 |
checkInterpolations("hex", "HDiv", orders, out, success); |
| 320 |
} |
| 321 |
|
| 322 |
TEUCHOS_UNIT_TEST(tInterpolation, hex_hvol_012) |
| 323 |
{ |
| 324 |
std::vector<int> orders = {0, 1, 2}; |
| 325 |
checkInterpolations("hex", "HVol", orders, out, success); |
| 326 |
} |
| 327 |
|
| 328 |
//////////////////////////////////////////////////////////////////////////// |
| 329 |
// Construct the discrete deRham complex and check that the range of |
| 330 |
// derivatives are in the kernel of the next derivative. |
| 331 |
void checkDerivatives(const int basis_order, |
| 332 |
const std::string &mesh_type, |
| 333 |
Teuchos::FancyOStream& out, |
| 334 |
bool &success) |
| 335 |
{ |
| 336 |
|
| 337 |
Teuchos::RCP<const Teuchos::MpiComm<int> > comm = rcp_dynamic_cast<const Teuchos::MpiComm<int> >(Teuchos::DefaultComm<int>::getComm()); |
| 338 |
|
| 339 |
RCP<const panzer::BlockedDOFManager> blkIndexer = buildDeRhamBlockedIndexer64(comm, mesh_type, basis_order); |
| 340 |
|
| 341 |
RCP<const panzer::ConnManager> conn = blkIndexer->getConnManager(); |
| 342 |
std::vector<shards::CellTopology> topologies; |
| 343 |
conn->getElementBlockTopologies(topologies); |
| 344 |
shards::CellTopology topology = topologies[0]; |
| 345 |
int dim = static_cast<int>(topology.getDimension()); |
| 346 |
|
| 347 |
Teko::LinearOp grad; |
| 348 |
Teko::LinearOp curl; |
| 349 |
Teko::LinearOp div; |
| 350 |
|
| 351 |
out << "Build gradient\n"; |
| 352 |
grad = buildInterpolation(conn, |
| 353 |
getDOFManager(blkIndexer, "HGRAD"), |
| 354 |
getDOFManager(blkIndexer, "HCURL"), |
| 355 |
"HGRAD", "HCURL", Intrepid2::OPERATOR_GRAD); |
| 356 |
#ifdef PANZER_INTERPOLATION_WRITE_MATRICES_TO_FILE |
| 357 |
Teko::writeMatrix("grad_"+mesh_type+"_"+std::to_string(basis_order), grad); |
| 358 |
#endif |
| 359 |
if (dim == 2) { |
| 360 |
out << "Build curl\n"; |
| 361 |
curl = buildInterpolation(conn, |
| 362 |
getDOFManager(blkIndexer, "HCURL"), |
| 363 |
getDOFManager(blkIndexer, "HVOL"), |
| 364 |
"HCURL", "HVOL", Intrepid2::OPERATOR_CURL); |
| 365 |
#ifdef PANZER_INTERPOLATION_WRITE_MATRICES_TO_FILE |
| 366 |
Teko::writeMatrix("curl_"+mesh_type+"_"+std::to_string(basis_order), curl); |
| 367 |
#endif |
| 368 |
} |
| 369 |
else if (dim == 3) { |
| 370 |
out << "Build curl\n"; |
| 371 |
curl = buildInterpolation(conn, |
| 372 |
getDOFManager(blkIndexer, "HCURL"), |
| 373 |
getDOFManager(blkIndexer, "HDIV"), |
| 374 |
"HCURL", "HDIV", Intrepid2::OPERATOR_CURL); |
| 375 |
#ifdef PANZER_INTERPOLATION_WRITE_MATRICES_TO_FILE |
| 376 |
Teko::writeMatrix("curl_"+mesh_type+"_"+std::to_string(basis_order), curl); |
| 377 |
#endif |
| 378 |
out << "Build div\n"; |
| 379 |
div = buildInterpolation(conn, |
| 380 |
getDOFManager(blkIndexer, "HDIV"), |
| 381 |
getDOFManager(blkIndexer, "HVOL"), |
| 382 |
"HDIV", "HVOL", Intrepid2::OPERATOR_DIV); |
| 383 |
#ifdef PANZER_INTERPOLATION_WRITE_MATRICES_TO_FILE |
| 384 |
Teko::writeMatrix("div_"+mesh_type+"_"+std::to_string(basis_order), div); |
| 385 |
#endif |
| 386 |
} |
| 387 |
|
| 388 |
Teko::LinearOp diff; |
| 389 |
double diffNorm; |
| 390 |
|
| 391 |
diff = Teko::explicitMultiply(curl, grad); |
| 392 |
diffNorm = Teko::infNorm(diff); |
| 393 |
out << "|curl * grad| = " << diffNorm << std::endl; |
| 394 |
TEST_ASSERT(diffNorm < 1.0e-8); |
| 395 |
|
| 396 |
if (dim == 3) { |
| 397 |
diff = Teko::explicitMultiply(div, curl); |
| 398 |
diffNorm = Teko::infNorm(diff); |
| 399 |
out << "|div * curl| = " << diffNorm << std::endl; |
| 400 |
TEST_ASSERT(diffNorm < 1.0e-8); |
| 401 |
} |
| 402 |
|
| 403 |
} |
| 404 |
|
| 405 |
TEUCHOS_UNIT_TEST(tDerivatives, tri_order1) |
| 406 |
{ |
| 407 |
checkDerivatives( /*basis_order=*/1, "tri", out, success); |
| 408 |
} |
| 409 |
|
| 410 |
TEUCHOS_UNIT_TEST(tDerivatives, quad_order1) |
| 411 |
{ |
| 412 |
checkDerivatives( /*basis_order=*/1, "quad", out, success); |
| 413 |
} |
| 414 |
|
| 415 |
TEUCHOS_UNIT_TEST(tDerivatives, tet_order1) |
| 416 |
{ |
| 417 |
checkDerivatives( /*basis_order=*/1, "tet", out, success); |
| 418 |
} |
| 419 |
|
| 420 |
TEUCHOS_UNIT_TEST(tDerivatives, hex_order1) |
| 421 |
{ |
| 422 |
checkDerivatives( /*basis_order=*/1, "hex", out, success); |
| 423 |
} |
| 424 |
|
| 425 |
TEUCHOS_UNIT_TEST(tDerivatives, tri_order2) |
| 426 |
{ |
| 427 |
checkDerivatives( /*basis_order=*/2, "tri", out, success); |
| 428 |
} |
| 429 |
|
| 430 |
TEUCHOS_UNIT_TEST(tDerivatives, quad_order2) |
| 431 |
{ |
| 432 |
checkDerivatives( /*basis_order=*/2, "quad", out, success); |
| 433 |
} |
| 434 |
|
| 435 |
TEUCHOS_UNIT_TEST(tDerivatives, tet_order2) |
| 436 |
{ |
| 437 |
checkDerivatives( /*basis_order=*/2, "tet", out, success); |
| 438 |
} |
| 439 |
|
| 440 |
TEUCHOS_UNIT_TEST(tDerivatives, hex_order2) |
| 441 |
{ |
| 442 |
checkDerivatives( /*basis_order=*/2, "hex", out, success); |
| 443 |
} |
| 444 |
|
| 445 |
TEUCHOS_UNIT_TEST(tDerivatives, tri_order3) |
| 446 |
{ |
| 447 |
checkDerivatives( /*basis_order=*/3, "tri", out, success); |
| 448 |
} |
| 449 |
|
| 450 |
TEUCHOS_UNIT_TEST(tDerivatives, quad_order3) |
| 451 |
{ |
| 452 |
checkDerivatives( /*basis_order=*/3, "quad", out, success); |
| 453 |
} |
| 454 |
|
| 455 |
TEUCHOS_UNIT_TEST(tDerivatives, tet_order3) |
| 456 |
{ |
| 457 |
checkDerivatives( /*basis_order=*/3, "tet", out, success); |
| 458 |
} |
| 459 |
|
| 460 |
TEUCHOS_UNIT_TEST(tDerivatives, hex_order3) |
| 461 |
{ |
| 462 |
checkDerivatives( /*basis_order=*/3, "hex", out, success); |
| 463 |
} |
| 464 |
|
| 465 |
|
| 466 |
void diffOperators(const Teko::LinearOp &A, |
| 467 |
const Teko::LinearOp &B, |
| 468 |
Teuchos::FancyOStream& out, |
| 469 |
bool &success) { |
| 470 |
using Scalar = double; |
| 471 |
using ThyLinOp = Thyra::TpetraLinearOp<Scalar,LocalOrdinal,GlobalOrdinal>; |
| 472 |
using CrsMatrix = Tpetra::CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal>; |
| 473 |
using Operator = Tpetra::Operator<Scalar,LocalOrdinal,GlobalOrdinal>; |
| 474 |
using MV = Tpetra::MultiVector<Scalar,LocalOrdinal,GlobalOrdinal>; |
| 475 |
|
| 476 |
const RCP<const ThyLinOp> opA = rcp_dynamic_cast<const ThyLinOp>(A, true); |
| 477 |
const RCP<const CrsMatrix> tpA = rcp_dynamic_cast<const CrsMatrix>(opA->getConstTpetraOperator(),true); |
| 478 |
const RCP<const ThyLinOp> opB = rcp_dynamic_cast<const ThyLinOp>(B, true); |
| 479 |
const RCP<const Operator> tpB = opB->getConstTpetraOperator(); |
| 480 |
|
| 481 |
auto tp_domainmap = tpA->getDomainMap(); |
| 482 |
auto tp_rangemap = tpA->getRangeMap(); |
| 483 |
|
| 484 |
auto testX = rcp(new MV(tp_domainmap, 1)); |
| 485 |
auto testY1 = rcp(new MV(tp_rangemap, 1)); |
| 486 |
auto testY2 = rcp(new MV(tp_rangemap, 1)); |
| 487 |
testX->randomize(); |
| 488 |
testY1->putScalar(1.); |
| 489 |
testY2->putScalar(1.); |
| 490 |
|
| 491 |
double diffNorm; |
| 492 |
|
| 493 |
tpA->apply(*testX, *testY1, Teuchos::NO_TRANS, 3.0, 2.0); |
| 494 |
tpB->apply(*testX, *testY2, Teuchos::NO_TRANS, 3.0, 2.0); |
| 495 |
testY1->update(-1.0,*testY2,1.0); |
| 496 |
diffNorm = testY1->getVector(0)->norm2(); |
| 497 |
out << "norm difference for 3 * M * X + 2 Y: " << diffNorm << std::endl; |
| 498 |
TEST_ASSERT(diffNorm < 1.0e-8); |
| 499 |
|
| 500 |
tpA->apply(*testX, *testY1); |
| 501 |
tpB->apply(*testX, *testY2); |
| 502 |
testY1->update(-1.0, *testY2, 1.0); |
| 503 |
diffNorm = testY1->getVector(0)->norm2(); |
| 504 |
out << "norm difference for M * X: " << diffNorm << std::endl; |
| 505 |
TEST_ASSERT(diffNorm < 1.0e-8); |
| 506 |
|
| 507 |
testX = rcp(new MV(tp_rangemap, 1)); |
| 508 |
testY1 = rcp(new MV(tp_domainmap, 1)); |
| 509 |
testY2 = rcp(new MV(tp_domainmap, 1)); |
| 510 |
testX->randomize(); |
| 511 |
testY1->putScalar(1.); |
| 512 |
testY2->putScalar(1.); |
| 513 |
|
| 514 |
tpA->apply(*testX, *testY1, Teuchos::TRANS, 3.0, 2.0); |
| 515 |
tpB->apply(*testX, *testY2, Teuchos::TRANS, 3.0, 2.0); |
| 516 |
testY1->update(-1.0, *testY2, 1.0); |
| 517 |
diffNorm = testY1->getVector(0)->norm2(); |
| 518 |
out << "norm difference for 3 * M^T * X + 2 Y: " << diffNorm << std::endl; |
| 519 |
TEST_ASSERT(diffNorm < 1.0e-8); |
| 520 |
|
| 521 |
tpA->apply(*testX, *testY1, Teuchos::TRANS); |
| 522 |
tpB->apply(*testX, *testY2, Teuchos::TRANS); |
| 523 |
|
| 524 |
#ifdef PANZER_INTERPOLATION_WRITE_MATRICES_TO_FILE |
| 525 |
static int counter = 0; |
| 526 |
Tpetra::MatrixMarket::Writer<Tpetra::CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal> >::writeDenseFile("X_" + std::to_string(counter)+".mm", *testX); |
| 527 |
Tpetra::MatrixMarket::Writer<Tpetra::CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal> >::writeDenseFile("Y1_" + std::to_string(counter)+".mm", *testY1); |
| 528 |
Tpetra::MatrixMarket::Writer<Tpetra::CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal> >::writeDenseFile("Y2_" + std::to_string(counter)+".mm", *testY2); |
| 529 |
++counter; |
| 530 |
#endif |
| 531 |
|
| 532 |
testY1->update(-1.0, *testY2, 1.0); |
| 533 |
diffNorm = testY1->getVector(0)->norm2(); |
| 534 |
out << "norm difference for M^T * X: " << diffNorm << std::endl; |
| 535 |
TEST_ASSERT(diffNorm < 1.0e-8); |
| 536 |
} |
| 537 |
|
| 538 |
//////////////////////////////////////////////////////////////////////////// |
| 539 |
// Construct FE spaces of different order and check that assembled and |
| 540 |
// matrix-free operators match. |
| 541 |
void checkMatrixFreeInterpolations(const std::string &mesh_type, |
| 542 |
const std::string &space, |
| 543 |
const std::vector<int> &orders, |
| 544 |
Teuchos::FancyOStream& out, |
| 545 |
bool &success) |
| 546 |
{ |
| 547 |
|
| 548 |
Teuchos::RCP<const Teuchos::MpiComm<int> > comm = rcp_dynamic_cast<const Teuchos::MpiComm<int> >(Teuchos::DefaultComm<int>::getComm()); |
| 549 |
|
| 550 |
RCP<const panzer::BlockedDOFManager> blkIndexer = buildBlockedIndexer64(comm, mesh_type, space, orders); |
| 551 |
|
| 552 |
RCP<const panzer::ConnManager> conn = blkIndexer->getConnManager(); |
| 553 |
std::vector<shards::CellTopology> topologies; |
| 554 |
conn->getElementBlockTopologies(topologies); |
| 555 |
|
| 556 |
const size_t worksetSize = 2000; |
| 557 |
const bool forceVectorial = false; |
| 558 |
const bool useTpetra = true; |
| 559 |
|
| 560 |
for (size_t j = 0; j < orders.size() - 1; ++j) { |
| 561 |
out << "Building interpolation " << orders[j+1] << " " << orders[j] << std::endl; |
| 562 |
auto interpolation = buildInterpolation(conn, |
| 563 |
getDOFManager(blkIndexer, std::to_string(orders[j])), |
| 564 |
getDOFManager(blkIndexer, std::to_string(orders[j+1])), |
| 565 |
std::to_string(orders[j]), std::to_string(orders[j+1]), |
| 566 |
Intrepid2::OPERATOR_VALUE, |
| 567 |
worksetSize, |
| 568 |
forceVectorial, |
| 569 |
useTpetra, |
| 570 |
/*matrixFree=*/false); |
| 571 |
auto matrixFreeinterpolation = buildInterpolation(conn, |
| 572 |
getDOFManager(blkIndexer, std::to_string(orders[j])), |
| 573 |
getDOFManager(blkIndexer, std::to_string(orders[j+1])), |
| 574 |
std::to_string(orders[j]), std::to_string(orders[j+1]), |
| 575 |
Intrepid2::OPERATOR_VALUE, |
| 576 |
worksetSize, |
| 577 |
forceVectorial, |
| 578 |
useTpetra, |
| 579 |
/*matrixFree=*/true); |
| 580 |
diffOperators(interpolation, matrixFreeinterpolation, out, success); |
| 581 |
} |
| 582 |
|
| 583 |
out << "Building interpolation " << orders[orders.size()-1] << " " << orders[0] << std::endl; |
| 584 |
auto interpolation = buildInterpolation(conn, |
| 585 |
getDOFManager(blkIndexer, std::to_string(orders[0])), |
| 586 |
getDOFManager(blkIndexer, std::to_string(orders[orders.size()-1])), |
| 587 |
std::to_string(orders[0]), |
| 588 |
std::to_string(orders[orders.size()-1]), |
| 589 |
Intrepid2::OPERATOR_VALUE, |
| 590 |
worksetSize, |
| 591 |
forceVectorial, |
| 592 |
useTpetra, |
| 593 |
/*matrixFree=*/false); |
| 594 |
auto matrixFreeinterpolation = buildInterpolation(conn, |
| 595 |
getDOFManager(blkIndexer, std::to_string(orders[0])), |
| 596 |
getDOFManager(blkIndexer, std::to_string(orders[orders.size()-1])), |
| 597 |
std::to_string(orders[0]), |
| 598 |
std::to_string(orders[orders.size()-1]), |
| 599 |
Intrepid2::OPERATOR_VALUE, |
| 600 |
worksetSize, |
| 601 |
forceVectorial, |
| 602 |
useTpetra, |
| 603 |
/*matrixFree=*/true); |
| 604 |
diffOperators(interpolation, matrixFreeinterpolation, out, success); |
| 605 |
} |
| 606 |
|
| 607 |
|
| 608 |
TEUCHOS_UNIT_TEST(tMatrixFreeInterpolation, line_hgrad_123) |
| 609 |
{ |
| 610 |
std::vector<int> orders = {1, 2, 3}; |
| 611 |
checkMatrixFreeInterpolations("line", "HGrad", orders, out, success); |
| 612 |
} |
| 613 |
|
| 614 |
TEUCHOS_UNIT_TEST(tMatrixFreeInterpolation, tri_hgrad_123) |
| 615 |
{ |
| 616 |
std::vector<int> orders = {1, 2, 3}; |
| 617 |
checkMatrixFreeInterpolations("tri", "HGrad", orders, out, success); |
| 618 |
} |
| 619 |
|
| 620 |
TEUCHOS_UNIT_TEST(tMatrixFreeInterpolation, tri_hcurl_123) |
| 621 |
{ |
| 622 |
std::vector<int> orders = {1, 2, 3}; |
| 623 |
checkMatrixFreeInterpolations("tri", "HCurl", orders, out, success); |
| 624 |
} |
| 625 |
|
| 626 |
TEUCHOS_UNIT_TEST(tMatrixFreeInterpolation, tri_hvol_012) |
| 627 |
{ |
| 628 |
std::vector<int> orders = {0, 1, 2}; |
| 629 |
checkMatrixFreeInterpolations("tri", "HVol", orders, out, success); |
| 630 |
} |
| 631 |
|
| 632 |
TEUCHOS_UNIT_TEST(tMatrixFreeInterpolation, quad_hgrad_123) |
| 633 |
{ |
| 634 |
std::vector<int> orders = {1, 2, 3}; |
| 635 |
checkMatrixFreeInterpolations("quad", "HGrad", orders, out, success); |
| 636 |
} |
| 637 |
|
| 638 |
TEUCHOS_UNIT_TEST(tMatrixFreeInterpolation, quad_hcurl_123) |
| 639 |
{ |
| 640 |
std::vector<int> orders = {1, 2, 3}; |
| 641 |
checkMatrixFreeInterpolations("quad", "HCurl", orders, out, success); |
| 642 |
} |
| 643 |
|
| 644 |
TEUCHOS_UNIT_TEST(tMatrixFreeInterpolation, quad_hvol_012) |
| 645 |
{ |
| 646 |
std::vector<int> orders = {0, 1, 2}; |
| 647 |
checkMatrixFreeInterpolations("quad", "HVol", orders, out, success); |
| 648 |
} |
| 649 |
|
| 650 |
TEUCHOS_UNIT_TEST(tMatrixFreeInterpolation, tet_hgrad_123) |
| 651 |
{ |
| 652 |
std::vector<int> orders = {1, 2, 3}; |
| 653 |
checkMatrixFreeInterpolations("tet", "HGrad", orders, out, success); |
| 654 |
} |
| 655 |
|
| 656 |
TEUCHOS_UNIT_TEST(tMatrixFreeInterpolation, tet_hcurl_123) |
| 657 |
{ |
| 658 |
std::vector<int> orders = {1, 2, 3}; |
| 659 |
checkMatrixFreeInterpolations("tet", "HCurl", orders, out, success); |
| 660 |
} |
| 661 |
|
| 662 |
TEUCHOS_UNIT_TEST(tMatrixFreeInterpolation, tet_hdiv_123) |
| 663 |
{ |
| 664 |
std::vector<int> orders = {1, 2, 3}; |
| 665 |
checkMatrixFreeInterpolations("tet", "HDiv", orders, out, success); |
| 666 |
} |
| 667 |
|
| 668 |
TEUCHOS_UNIT_TEST(tMatrixFreeInterpolation, tet_hvol_012) |
| 669 |
{ |
| 670 |
std::vector<int> orders = {0, 1, 2}; |
| 671 |
checkMatrixFreeInterpolations("tet", "HVol", orders, out, success); |
| 672 |
} |
| 673 |
|
| 674 |
TEUCHOS_UNIT_TEST(tMatrixFreeInterpolation, hex_hgrad_123) |
| 675 |
{ |
| 676 |
std::vector<int> orders = {1, 2, 3}; |
| 677 |
checkMatrixFreeInterpolations("hex", "HGrad", orders, out, success); |
| 678 |
} |
| 679 |
|
| 680 |
TEUCHOS_UNIT_TEST(tMatrixFreeInterpolation, hex_hcurl_123) |
| 681 |
{ |
| 682 |
std::vector<int> orders = {1, 2, 3}; |
| 683 |
checkMatrixFreeInterpolations("hex", "HCurl", orders, out, success); |
| 684 |
} |
| 685 |
|
| 686 |
TEUCHOS_UNIT_TEST(tMatrixFreeInterpolation, hex_hdiv_123) |
| 687 |
{ |
| 688 |
std::vector<int> orders = {1, 2, 3}; |
| 689 |
checkMatrixFreeInterpolations("hex", "HDiv", orders, out, success); |
| 690 |
} |
| 691 |
|
| 692 |
TEUCHOS_UNIT_TEST(tMatrixFreeInterpolation, hex_hvol_012) |
| 693 |
{ |
| 694 |
std::vector<int> orders = {0, 1, 2}; |
| 695 |
checkMatrixFreeInterpolations("hex", "HVol", orders, out, success); |
| 696 |
} |
| 697 |
|
| 698 |
|
| 699 |
//////////////////////////////////////////////////////////////////////////// |
| 700 |
// Construct the discrete deRham complex and check that assembled and |
| 701 |
// matrix-free operators match. |
| 702 |
void checkMatrixFreeDerivatives(const int basis_order, |
| 703 |
const std::string &mesh_type, |
| 704 |
Teuchos::FancyOStream& out, |
| 705 |
bool &success) |
| 706 |
{ |
| 707 |
|
| 708 |
Teuchos::RCP<const Teuchos::MpiComm<int> > comm = rcp_dynamic_cast<const Teuchos::MpiComm<int> >(Teuchos::DefaultComm<int>::getComm()); |
| 709 |
|
| 710 |
RCP<const panzer::BlockedDOFManager> blkIndexer = buildDeRhamBlockedIndexer64(comm, mesh_type, basis_order); |
| 711 |
|
| 712 |
RCP<const panzer::ConnManager> conn = blkIndexer->getConnManager(); |
| 713 |
std::vector<shards::CellTopology> topologies; |
| 714 |
conn->getElementBlockTopologies(topologies); |
| 715 |
shards::CellTopology topology = topologies[0]; |
| 716 |
int dim = static_cast<int>(topology.getDimension()); |
| 717 |
|
| 718 |
const size_t worksetSize = 2000; |
| 719 |
const bool forceVectorial = false; |
| 720 |
const bool useTpetra = true; |
| 721 |
|
| 722 |
out << "Build gradient\n"; |
| 723 |
auto grad = buildInterpolation(conn, |
| 724 |
getDOFManager(blkIndexer, "HGRAD"), |
| 725 |
getDOFManager(blkIndexer, "HCURL"), |
| 726 |
"HGRAD", "HCURL", Intrepid2::OPERATOR_GRAD, |
| 727 |
worksetSize, |
| 728 |
forceVectorial, |
| 729 |
useTpetra, |
| 730 |
/*matrixFree=*/false); |
| 731 |
auto grad_mf = buildInterpolation(conn, |
| 732 |
getDOFManager(blkIndexer, "HGRAD"), |
| 733 |
getDOFManager(blkIndexer, "HCURL"), |
| 734 |
"HGRAD", "HCURL", Intrepid2::OPERATOR_GRAD, |
| 735 |
worksetSize, |
| 736 |
forceVectorial, |
| 737 |
useTpetra, |
| 738 |
/*matrixFree=*/true); |
| 739 |
diffOperators(grad, grad_mf, out, success); |
| 740 |
|
| 741 |
if (dim == 2) { |
| 742 |
out << "Build curl\n"; |
| 743 |
auto curl = buildInterpolation(conn, |
| 744 |
getDOFManager(blkIndexer, "HCURL"), |
| 745 |
getDOFManager(blkIndexer, "HVOL"), |
| 746 |
"HCURL", "HVOL", Intrepid2::OPERATOR_CURL, |
| 747 |
worksetSize, |
| 748 |
forceVectorial, |
| 749 |
useTpetra, |
| 750 |
/*matrixFree=*/false); |
| 751 |
auto curl_mf = buildInterpolation(conn, |
| 752 |
getDOFManager(blkIndexer, "HCURL"), |
| 753 |
getDOFManager(blkIndexer, "HVOL"), |
| 754 |
"HCURL", "HVOL", Intrepid2::OPERATOR_CURL, |
| 755 |
worksetSize, |
| 756 |
forceVectorial, |
| 757 |
useTpetra, |
| 758 |
/*matrixFree=*/true); |
| 759 |
diffOperators(curl, curl_mf, out, success); |
| 760 |
} |
| 761 |
else if (dim == 3) { |
| 762 |
out << "Build curl\n"; |
| 763 |
auto curl = buildInterpolation(conn, |
| 764 |
getDOFManager(blkIndexer, "HCURL"), |
| 765 |
getDOFManager(blkIndexer, "HDIV"), |
| 766 |
"HCURL", "HDIV", Intrepid2::OPERATOR_CURL, |
| 767 |
worksetSize, |
| 768 |
forceVectorial, |
| 769 |
useTpetra, |
| 770 |
/*matrixFree=*/false); |
| 771 |
auto curl_mf = buildInterpolation(conn, |
| 772 |
getDOFManager(blkIndexer, "HCURL"), |
| 773 |
getDOFManager(blkIndexer, "HDIV"), |
| 774 |
"HCURL", "HDIV", Intrepid2::OPERATOR_CURL, |
| 775 |
worksetSize, |
| 776 |
forceVectorial, |
| 777 |
useTpetra, |
| 778 |
/*matrixFree=*/true); |
| 779 |
diffOperators(curl, curl_mf, out, success); |
| 780 |
|
| 781 |
out << "Build div\n"; |
| 782 |
auto div = buildInterpolation(conn, |
| 783 |
getDOFManager(blkIndexer, "HDIV"), |
| 784 |
getDOFManager(blkIndexer, "HVOL"), |
| 785 |
"HDIV", "HVOL", Intrepid2::OPERATOR_DIV, |
| 786 |
worksetSize, |
| 787 |
forceVectorial, |
| 788 |
useTpetra, |
| 789 |
/*matrixFree=*/false); |
| 790 |
auto div_mf = buildInterpolation(conn, |
| 791 |
getDOFManager(blkIndexer, "HDIV"), |
| 792 |
getDOFManager(blkIndexer, "HVOL"), |
| 793 |
"HDIV", "HVOL", Intrepid2::OPERATOR_DIV, |
| 794 |
worksetSize, |
| 795 |
forceVectorial, |
| 796 |
useTpetra, |
| 797 |
/*matrixFree=*/true); |
| 798 |
diffOperators(div, div_mf, out, success); |
| 799 |
} |
| 800 |
} |
| 801 |
|
| 802 |
TEUCHOS_UNIT_TEST(tMatrixFreeDerivatives, tri_order1) |
| 803 |
{ |
| 804 |
checkMatrixFreeDerivatives( /*basis_order=*/1, "tri", out, success); |
| 805 |
} |
| 806 |
|
| 807 |
TEUCHOS_UNIT_TEST(tMatrixFreeDerivatives, quad_order1) |
| 808 |
{ |
| 809 |
checkMatrixFreeDerivatives( /*basis_order=*/1, "quad", out, success); |
| 810 |
} |
| 811 |
|
| 812 |
TEUCHOS_UNIT_TEST(tMatrixFreeDerivatives, tet_order1) |
| 813 |
{ |
| 814 |
checkMatrixFreeDerivatives( /*basis_order=*/1, "tet", out, success); |
| 815 |
} |
| 816 |
|
| 817 |
TEUCHOS_UNIT_TEST(tMatrixFreeDerivatives, hex_order1) |
| 818 |
{ |
| 819 |
checkMatrixFreeDerivatives( /*basis_order=*/1, "hex", out, success); |
| 820 |
} |
| 821 |
|
| 822 |
TEUCHOS_UNIT_TEST(tMatrixFreeDerivatives, tri_order2) |
| 823 |
{ |
| 824 |
checkMatrixFreeDerivatives( /*basis_order=*/2, "tri", out, success); |
| 825 |
} |
| 826 |
|
| 827 |
TEUCHOS_UNIT_TEST(tMatrixFreeDerivatives, quad_order2) |
| 828 |
{ |
| 829 |
checkMatrixFreeDerivatives( /*basis_order=*/2, "quad", out, success); |
| 830 |
} |
| 831 |
|
| 832 |
TEUCHOS_UNIT_TEST(tMatrixFreeDerivatives, tet_order2) |
| 833 |
{ |
| 834 |
checkMatrixFreeDerivatives( /*basis_order=*/2, "tet", out, success); |
| 835 |
} |
| 836 |
|
| 837 |
TEUCHOS_UNIT_TEST(tMatrixFreeDerivatives, hex_order2) |
| 838 |
{ |
| 839 |
checkMatrixFreeDerivatives( /*basis_order=*/2, "hex", out, success); |
| 840 |
} |
| 841 |
|
| 842 |
TEUCHOS_UNIT_TEST(tMatrixFreeDerivatives, tri_order3) |
| 843 |
{ |
| 844 |
checkMatrixFreeDerivatives( /*basis_order=*/3, "tri", out, success); |
| 845 |
} |
| 846 |
|
| 847 |
TEUCHOS_UNIT_TEST(tMatrixFreeDerivatives, quad_order3) |
| 848 |
{ |
| 849 |
checkMatrixFreeDerivatives( /*basis_order=*/3, "quad", out, success); |
| 850 |
} |
| 851 |
|
| 852 |
TEUCHOS_UNIT_TEST(tMatrixFreeDerivatives, tet_order3) |
| 853 |
{ |
| 854 |
checkMatrixFreeDerivatives( /*basis_order=*/3, "tet", out, success); |
| 855 |
} |
| 856 |
|
| 857 |
TEUCHOS_UNIT_TEST(tMatrixFreeDerivatives, hex_order3) |
| 858 |
{ |
| 859 |
checkMatrixFreeDerivatives( /*basis_order=*/3, "hex", out, success); |
| 860 |
} |
| 861 |
|
| 862 |
} |