libMesh
Public Member Functions | List of all members
MeshInputTest Class Reference
Inheritance diagram for MeshInputTest:
[legend]

Public Member Functions

 LIBMESH_CPPUNIT_TEST_SUITE (MeshInputTest)
 
 CPPUNIT_TEST (testVTKPreserveElemIds)
 
 CPPUNIT_TEST (testVTKPreserveSubdomainIds)
 
 CPPUNIT_TEST (testExodusCopyNodalSolutionDistributed)
 
 CPPUNIT_TEST (testExodusCopyElementSolutionDistributed)
 
 CPPUNIT_TEST (testExodusCopyNodalSolutionReplicated)
 
 CPPUNIT_TEST (testExodusCopyElementSolutionReplicated)
 
 CPPUNIT_TEST (testExodusReadHeader)
 
 CPPUNIT_TEST (testExodusIGASidesets)
 
 CPPUNIT_TEST (testLowOrderEdgeBlocks)
 
 CPPUNIT_TEST (testExodusCopyElementVectorDistributed)
 
 CPPUNIT_TEST (testExodusCopyElementVectorReplicated)
 
 CPPUNIT_TEST (testExodusWriteElementDataFromDiscontinuousNodalData)
 
 CPPUNIT_TEST (testExodusWriteAddedSidesEdgeC0)
 
 CPPUNIT_TEST (testExodusDiscWriteAddedSidesEdgeC0)
 
 CPPUNIT_TEST (testExodusWriteAddedSidesMixedEdgeC0)
 
 CPPUNIT_TEST (testExodusDiscWriteAddedSidesMixedEdgeC0)
 
 CPPUNIT_TEST (testExodusWriteAddedSidesTriC0)
 
 CPPUNIT_TEST (testExodusDiscWriteAddedSidesTriC0)
 
 CPPUNIT_TEST (testExodusWriteAddedSidesMixedTriC0)
 
 CPPUNIT_TEST (testExodusDiscWriteAddedSidesMixedTriC0)
 
 CPPUNIT_TEST (testExodusWriteAddedSidesQuadC0)
 
 CPPUNIT_TEST (testExodusDiscWriteAddedSidesQuadC0)
 
 CPPUNIT_TEST (testExodusWriteAddedSidesMixedQuadC0)
 
 CPPUNIT_TEST (testExodusDiscWriteAddedSidesMixedQuadC0)
 
 CPPUNIT_TEST (testExodusWriteAddedSidesHexC0)
 
 CPPUNIT_TEST (testExodusDiscWriteAddedSidesHexC0)
 
 CPPUNIT_TEST (testExodusWriteAddedSidesMixedHexC0)
 
 CPPUNIT_TEST (testExodusDiscWriteAddedSidesMixedHexC0)
 
 CPPUNIT_TEST (testExodusWriteAddedSidesHexDisc)
 
 CPPUNIT_TEST (testExodusDiscWriteAddedSidesHexDisc)
 
 CPPUNIT_TEST (testExodusFileMappingsPlateWithHole)
 
 CPPUNIT_TEST (testExodusFileMappingsTwoBlocks)
 
 CPPUNIT_TEST (testExodusFileMappingsTwoElemIGA)
 
 CPPUNIT_TEST (testExodusFileMappingsCyl3d)
 
 CPPUNIT_TEST (testExodusDiscPlateWithHole)
 
 CPPUNIT_TEST (testExodusDiscTwoBlocks)
 
 CPPUNIT_TEST (testExodusDiscTwoElemIGA)
 
 CPPUNIT_TEST (testExodusDiscCyl3d)
 
 CPPUNIT_TEST (testNemesisReadReplicated)
 
 CPPUNIT_TEST (testNemesisReadDistributed)
 
 CPPUNIT_TEST (testNemesisCopyNodalSolutionDistributed)
 
 CPPUNIT_TEST (testNemesisCopyNodalSolutionReplicated)
 
 CPPUNIT_TEST (testNemesisCopyElementSolutionDistributed)
 
 CPPUNIT_TEST (testNemesisCopyElementSolutionReplicated)
 
 CPPUNIT_TEST (testNemesisSingleElementDistributed)
 
 CPPUNIT_TEST (testNemesisSingleElementReplicated)
 
 CPPUNIT_TEST (testNemesisCopyElementVectorDistributed)
 
 CPPUNIT_TEST (testNemesisCopyElementVectorReplicated)
 
 CPPUNIT_TEST (testAbaqusReadFirst)
 
 CPPUNIT_TEST (testAbaqusReadSecond)
 
 CPPUNIT_TEST (testDynaReadElem)
 
 CPPUNIT_TEST (testDynaNoSplines)
 
 CPPUNIT_TEST (testDynaReadPatch)
 
 CPPUNIT_TEST (testDynaFileMappingsFEMEx5)
 
 CPPUNIT_TEST (testDynaFileMappingsBlockWithHole)
 
 CPPUNIT_TEST (testDynaFileMappingsPlateWithHole)
 
 CPPUNIT_TEST (testDynaFileMappingsCyl3d)
 
 CPPUNIT_TEST (testTetgenIO)
 
 CPPUNIT_TEST_SUITE_END ()
 
void setUp ()
 
void tearDown ()
 
void testVTKPreserveElemIds ()
 
void testVTKPreserveSubdomainIds ()
 
void testExodusReadHeader ()
 
void testLowOrderEdgeBlocks ()
 
void testExodusIGASidesets ()
 
template<typename MeshType , typename IOType >
void testCopyNodalSolutionImpl (const std::string &filename)
 
void testExodusCopyNodalSolutionReplicated ()
 
void testExodusCopyNodalSolutionDistributed ()
 
void testNemesisCopyNodalSolutionReplicated ()
 
void testNemesisCopyNodalSolutionDistributed ()
 
template<typename MeshType , typename IOType >
void testCopyElementSolutionImpl (const std::string &filename)
 
void testExodusCopyElementSolutionReplicated ()
 
void testExodusCopyElementSolutionDistributed ()
 
void testNemesisCopyElementSolutionReplicated ()
 
void testNemesisCopyElementSolutionDistributed ()
 
template<typename MeshType , typename IOType >
void testSingleElementImpl (const std::string &filename)
 
void testNemesisSingleElementReplicated ()
 
void testNemesisSingleElementDistributed ()
 
template<typename MeshType , typename IOType >
void testCopyElementVectorImpl (const std::string &filename)
 
void testExodusCopyElementVectorReplicated ()
 
void testExodusCopyElementVectorDistributed ()
 
void testNemesisCopyElementVectorReplicated ()
 
void testNemesisCopyElementVectorDistributed ()
 
void testExodusWriteElementDataFromDiscontinuousNodalData ()
 
void testExodusWriteAddedSides (Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
 
void testExodusWriteAddedSidesEdgeC0 ()
 
void testExodusDiscWriteAddedSidesEdgeC0 ()
 
void testExodusWriteAddedSidesMixedEdgeC0 ()
 
void testExodusDiscWriteAddedSidesMixedEdgeC0 ()
 
void testExodusWriteAddedSidesEdgeDisc ()
 
void testExodusDiscWriteAddedSidesEdgeDisc ()
 
void testExodusWriteAddedSidesTriC0 ()
 
void testExodusDiscWriteAddedSidesTriC0 ()
 
void testExodusWriteAddedSidesMixedTriC0 ()
 
void testExodusDiscWriteAddedSidesMixedTriC0 ()
 
void testExodusWriteAddedSidesTriDisc ()
 
void testExodusDiscWriteAddedSidesTriDisc ()
 
void testExodusWriteAddedSidesQuadC0 ()
 
void testExodusDiscWriteAddedSidesQuadC0 ()
 
void testExodusWriteAddedSidesMixedQuadC0 ()
 
void testExodusDiscWriteAddedSidesMixedQuadC0 ()
 
void testExodusWriteAddedSidesQuadDisc ()
 
void testExodusDiscWriteAddedSidesQuadDisc ()
 
void testExodusWriteAddedSidesTetC0 ()
 
void testExodusDiscWriteAddedSidesTetC0 ()
 
void testExodusWriteAddedSidesTetDisc ()
 
void testExodusDiscWriteAddedSidesTetDisc ()
 
void testExodusWriteAddedSidesHexC0 ()
 
void testExodusDiscWriteAddedSidesHexC0 ()
 
void testExodusWriteAddedSidesMixedHexC0 ()
 
void testExodusDiscWriteAddedSidesMixedHexC0 ()
 
void testExodusWriteAddedSidesHexDisc ()
 
void testExodusDiscWriteAddedSidesHexDisc ()
 
template<typename MeshType >
void testNemesisReadImpl ()
 
void testNemesisReadReplicated ()
 
void testNemesisReadDistributed ()
 
void testMasterCenters (const MeshBase &mesh)
 
void helperTestingDynaQuad (const MeshBase &mesh)
 
void testAbaqusRead (const std::string &fname, dof_id_type n_elem, dof_id_type n_nodes)
 
void testAbaqusReadFirst ()
 
void testAbaqusReadSecond ()
 
void testDynaReadElem ()
 
void testTetgenIO ()
 
void testDynaNoSplines ()
 
void testDynaReadPatch ()
 
void testProjectionRegression (MeshBase &mesh, std::array< Real, 4 > expected_norms)
 
void testDynaFileMappings (const std::string &filename, std::array< Real, 4 > expected_norms)
 
void testDynaFileMappingsFEMEx5 ()
 
void testDynaFileMappingsBlockWithHole ()
 
void testDynaFileMappingsPlateWithHole ()
 
void testDynaFileMappingsCyl3d ()
 
void testExodusFileMappings (const std::string &filename, std::array< Real, 4 > expected_norms, bool use_disc_bex=false)
 
void testExodusFileMappingsPlateWithHole ()
 
void testExodusFileMappingsTwoBlocks ()
 
void testExodusFileMappingsTwoElemIGA ()
 
void testExodusFileMappingsCyl3d ()
 
void testExodusDiscPlateWithHole ()
 
void testExodusDiscTwoBlocks ()
 
void testExodusDiscTwoElemIGA ()
 
void testExodusDiscCyl3d ()
 

Detailed Description

Definition at line 96 of file mesh_input.C.

Member Function Documentation

◆ CPPUNIT_TEST() [1/58]

MeshInputTest::CPPUNIT_TEST ( testVTKPreserveElemIds  )

◆ CPPUNIT_TEST() [2/58]

MeshInputTest::CPPUNIT_TEST ( testVTKPreserveSubdomainIds  )

◆ CPPUNIT_TEST() [3/58]

MeshInputTest::CPPUNIT_TEST ( testExodusCopyNodalSolutionDistributed  )

◆ CPPUNIT_TEST() [4/58]

MeshInputTest::CPPUNIT_TEST ( testExodusCopyElementSolutionDistributed  )

◆ CPPUNIT_TEST() [5/58]

MeshInputTest::CPPUNIT_TEST ( testExodusCopyNodalSolutionReplicated  )

◆ CPPUNIT_TEST() [6/58]

MeshInputTest::CPPUNIT_TEST ( testExodusCopyElementSolutionReplicated  )

◆ CPPUNIT_TEST() [7/58]

MeshInputTest::CPPUNIT_TEST ( testExodusReadHeader  )

◆ CPPUNIT_TEST() [8/58]

MeshInputTest::CPPUNIT_TEST ( testExodusIGASidesets  )

◆ CPPUNIT_TEST() [9/58]

MeshInputTest::CPPUNIT_TEST ( testLowOrderEdgeBlocks  )

◆ CPPUNIT_TEST() [10/58]

MeshInputTest::CPPUNIT_TEST ( testExodusCopyElementVectorDistributed  )

◆ CPPUNIT_TEST() [11/58]

MeshInputTest::CPPUNIT_TEST ( testExodusCopyElementVectorReplicated  )

◆ CPPUNIT_TEST() [12/58]

MeshInputTest::CPPUNIT_TEST ( testExodusWriteElementDataFromDiscontinuousNodalData  )

◆ CPPUNIT_TEST() [13/58]

MeshInputTest::CPPUNIT_TEST ( testExodusWriteAddedSidesEdgeC0  )

◆ CPPUNIT_TEST() [14/58]

MeshInputTest::CPPUNIT_TEST ( testExodusDiscWriteAddedSidesEdgeC0  )

◆ CPPUNIT_TEST() [15/58]

MeshInputTest::CPPUNIT_TEST ( testExodusWriteAddedSidesMixedEdgeC0  )

◆ CPPUNIT_TEST() [16/58]

MeshInputTest::CPPUNIT_TEST ( testExodusDiscWriteAddedSidesMixedEdgeC0  )

◆ CPPUNIT_TEST() [17/58]

MeshInputTest::CPPUNIT_TEST ( testExodusWriteAddedSidesTriC0  )

◆ CPPUNIT_TEST() [18/58]

MeshInputTest::CPPUNIT_TEST ( testExodusDiscWriteAddedSidesTriC0  )

◆ CPPUNIT_TEST() [19/58]

MeshInputTest::CPPUNIT_TEST ( testExodusWriteAddedSidesMixedTriC0  )

◆ CPPUNIT_TEST() [20/58]

MeshInputTest::CPPUNIT_TEST ( testExodusDiscWriteAddedSidesMixedTriC0  )

◆ CPPUNIT_TEST() [21/58]

MeshInputTest::CPPUNIT_TEST ( testExodusWriteAddedSidesQuadC0  )

◆ CPPUNIT_TEST() [22/58]

MeshInputTest::CPPUNIT_TEST ( testExodusDiscWriteAddedSidesQuadC0  )

◆ CPPUNIT_TEST() [23/58]

MeshInputTest::CPPUNIT_TEST ( testExodusWriteAddedSidesMixedQuadC0  )

◆ CPPUNIT_TEST() [24/58]

MeshInputTest::CPPUNIT_TEST ( testExodusDiscWriteAddedSidesMixedQuadC0  )

◆ CPPUNIT_TEST() [25/58]

MeshInputTest::CPPUNIT_TEST ( testExodusWriteAddedSidesHexC0  )

◆ CPPUNIT_TEST() [26/58]

MeshInputTest::CPPUNIT_TEST ( testExodusDiscWriteAddedSidesHexC0  )

◆ CPPUNIT_TEST() [27/58]

MeshInputTest::CPPUNIT_TEST ( testExodusWriteAddedSidesMixedHexC0  )

◆ CPPUNIT_TEST() [28/58]

MeshInputTest::CPPUNIT_TEST ( testExodusDiscWriteAddedSidesMixedHexC0  )

◆ CPPUNIT_TEST() [29/58]

MeshInputTest::CPPUNIT_TEST ( testExodusWriteAddedSidesHexDisc  )

◆ CPPUNIT_TEST() [30/58]

MeshInputTest::CPPUNIT_TEST ( testExodusDiscWriteAddedSidesHexDisc  )

◆ CPPUNIT_TEST() [31/58]

MeshInputTest::CPPUNIT_TEST ( testExodusFileMappingsPlateWithHole  )

◆ CPPUNIT_TEST() [32/58]

MeshInputTest::CPPUNIT_TEST ( testExodusFileMappingsTwoBlocks  )

◆ CPPUNIT_TEST() [33/58]

MeshInputTest::CPPUNIT_TEST ( testExodusFileMappingsTwoElemIGA  )

◆ CPPUNIT_TEST() [34/58]

MeshInputTest::CPPUNIT_TEST ( testExodusFileMappingsCyl3d  )

◆ CPPUNIT_TEST() [35/58]

MeshInputTest::CPPUNIT_TEST ( testExodusDiscPlateWithHole  )

◆ CPPUNIT_TEST() [36/58]

MeshInputTest::CPPUNIT_TEST ( testExodusDiscTwoBlocks  )

◆ CPPUNIT_TEST() [37/58]

MeshInputTest::CPPUNIT_TEST ( testExodusDiscTwoElemIGA  )

◆ CPPUNIT_TEST() [38/58]

MeshInputTest::CPPUNIT_TEST ( testExodusDiscCyl3d  )

◆ CPPUNIT_TEST() [39/58]

MeshInputTest::CPPUNIT_TEST ( testNemesisReadReplicated  )

◆ CPPUNIT_TEST() [40/58]

MeshInputTest::CPPUNIT_TEST ( testNemesisReadDistributed  )

◆ CPPUNIT_TEST() [41/58]

MeshInputTest::CPPUNIT_TEST ( testNemesisCopyNodalSolutionDistributed  )

◆ CPPUNIT_TEST() [42/58]

MeshInputTest::CPPUNIT_TEST ( testNemesisCopyNodalSolutionReplicated  )

◆ CPPUNIT_TEST() [43/58]

MeshInputTest::CPPUNIT_TEST ( testNemesisCopyElementSolutionDistributed  )

◆ CPPUNIT_TEST() [44/58]

MeshInputTest::CPPUNIT_TEST ( testNemesisCopyElementSolutionReplicated  )

◆ CPPUNIT_TEST() [45/58]

MeshInputTest::CPPUNIT_TEST ( testNemesisSingleElementDistributed  )

◆ CPPUNIT_TEST() [46/58]

MeshInputTest::CPPUNIT_TEST ( testNemesisSingleElementReplicated  )

◆ CPPUNIT_TEST() [47/58]

MeshInputTest::CPPUNIT_TEST ( testNemesisCopyElementVectorDistributed  )

◆ CPPUNIT_TEST() [48/58]

MeshInputTest::CPPUNIT_TEST ( testNemesisCopyElementVectorReplicated  )

◆ CPPUNIT_TEST() [49/58]

MeshInputTest::CPPUNIT_TEST ( testAbaqusReadFirst  )

◆ CPPUNIT_TEST() [50/58]

MeshInputTest::CPPUNIT_TEST ( testAbaqusReadSecond  )

◆ CPPUNIT_TEST() [51/58]

MeshInputTest::CPPUNIT_TEST ( testDynaReadElem  )

◆ CPPUNIT_TEST() [52/58]

MeshInputTest::CPPUNIT_TEST ( testDynaNoSplines  )

◆ CPPUNIT_TEST() [53/58]

MeshInputTest::CPPUNIT_TEST ( testDynaReadPatch  )

◆ CPPUNIT_TEST() [54/58]

MeshInputTest::CPPUNIT_TEST ( testDynaFileMappingsFEMEx5  )

◆ CPPUNIT_TEST() [55/58]

MeshInputTest::CPPUNIT_TEST ( testDynaFileMappingsBlockWithHole  )

◆ CPPUNIT_TEST() [56/58]

MeshInputTest::CPPUNIT_TEST ( testDynaFileMappingsPlateWithHole  )

◆ CPPUNIT_TEST() [57/58]

MeshInputTest::CPPUNIT_TEST ( testDynaFileMappingsCyl3d  )

◆ CPPUNIT_TEST() [58/58]

MeshInputTest::CPPUNIT_TEST ( testTetgenIO  )

◆ CPPUNIT_TEST_SUITE_END()

MeshInputTest::CPPUNIT_TEST_SUITE_END ( )

◆ helperTestingDynaQuad()

void MeshInputTest::helperTestingDynaQuad ( const MeshBase mesh)
inline

Definition at line 1408 of file mesh_input.C.

References libMesh::MeshBase::default_mapping_data(), libMesh::MeshBase::default_mapping_type(), TIMPI::Communicator::max(), mesh, libMesh::NODEELEM, libMesh::QUAD9, libMesh::RATIONAL_BERNSTEIN_MAP, libMesh::Real, and TestCommWorld.

1409  {
1410  CPPUNIT_ASSERT_EQUAL(mesh.default_mapping_type(),
1412 
1413  unsigned char weight_index = mesh.default_mapping_data();
1414 
1415  bool found_the_quad = false;
1416 
1417  for (auto & elem : mesh.element_ptr_range())
1418  {
1419  if (elem->type() == NODEELEM)
1420  continue;
1421 
1422  CPPUNIT_ASSERT_EQUAL(elem->type(), QUAD9);
1423  found_the_quad = true;
1424 
1425  for (unsigned int n=0; n != 9; ++n)
1426  CPPUNIT_ASSERT_EQUAL
1427  (elem->node_ref(n).get_extra_datum<Real>(weight_index),
1428  Real(0.75));
1429 
1430  CPPUNIT_ASSERT_EQUAL(elem->point(0)(0), Real(0.5));
1431  CPPUNIT_ASSERT_EQUAL(elem->point(0)(1), Real(0.5));
1432  CPPUNIT_ASSERT_EQUAL(elem->point(1)(0), Real(1.5));
1433  CPPUNIT_ASSERT_EQUAL(elem->point(1)(1), Real(0.5));
1434  CPPUNIT_ASSERT_EQUAL(elem->point(2)(0), Real(1.5));
1435  CPPUNIT_ASSERT_EQUAL(elem->point(2)(1), Real(1.5));
1436  CPPUNIT_ASSERT_EQUAL(elem->point(3)(0), Real(0.5));
1437  CPPUNIT_ASSERT_EQUAL(elem->point(3)(1), Real(1.5));
1438  CPPUNIT_ASSERT(elem->has_affine_map());
1439 #if LIBMESH_DIM > 2
1440  for (unsigned int v=0; v != 4; ++v)
1441  CPPUNIT_ASSERT_EQUAL(elem->point(v)(2), Real(0));
1442 #endif
1443  }
1444 
1445  TestCommWorld->max(found_the_quad);
1446  CPPUNIT_ASSERT(found_the_quad);
1447 
1449  }
libMesh::Parallel::Communicator * TestCommWorld
Definition: driver.C:159
MeshBase & mesh
ElemMappingType default_mapping_type() const
Returns the default master space to physical space mapping basis functions to be used on newly added ...
Definition: mesh_base.h:791
unsigned char default_mapping_data() const
Returns any default data value used by the master space to physical space mapping.
Definition: mesh_base.h:809
void testMasterCenters(const MeshBase &mesh)
Definition: mesh_input.C:1367
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void max(const T &r, T &o, Request &req) const

◆ LIBMESH_CPPUNIT_TEST_SUITE()

MeshInputTest::LIBMESH_CPPUNIT_TEST_SUITE ( MeshInputTest  )

◆ setUp()

void MeshInputTest::setUp ( )
inline

Definition at line 203 of file mesh_input.C.

204  {}

◆ tearDown()

void MeshInputTest::tearDown ( )
inline

Definition at line 206 of file mesh_input.C.

207  {}

◆ testAbaqusRead()

void MeshInputTest::testAbaqusRead ( const std::string &  fname,
dof_id_type  n_elem,
dof_id_type  n_nodes 
)
inline

Definition at line 1452 of file mesh_input.C.

References libMesh::MeshCommunication::broadcast(), mesh, libMesh::MeshTools::n_elem(), libMesh::MeshBase::n_elem(), n_nodes, libMesh::MeshBase::n_nodes(), libMesh::MeshBase::prepare_for_use(), libMesh::ParallelObject::processor_id(), libMesh::AbaqusIO::read(), and TestCommWorld.

1455  {
1457 
1458  AbaqusIO abaqus(mesh);
1459 
1460  if (mesh.processor_id() == 0)
1461  abaqus.read(fname);
1463 
1465 
1466  CPPUNIT_ASSERT_EQUAL(mesh.n_elem(), n_elem);
1467  CPPUNIT_ASSERT_EQUAL(mesh.n_nodes(), n_nodes);
1468  }
The AbaqusIO class is a preliminary implementation for reading Abaqus mesh files in ASCII format...
Definition: abaqus_io.h:41
dof_id_type n_elem(const MeshBase::const_element_iterator &begin, const MeshBase::const_element_iterator &end)
Count up the number of elements of a specific type (as defined by an iterator range).
Definition: mesh_tools.C:850
libMesh::Parallel::Communicator * TestCommWorld
Definition: driver.C:159
void prepare_for_use(const bool skip_renumber_nodes_and_elements, const bool skip_find_neighbors)
Prepare a newly ecreated (or read) mesh for use.
Definition: mesh_base.C:710
MeshBase & mesh
const dof_id_type n_nodes
Definition: tecplot_io.C:67
This is the MeshCommunication class.
void broadcast(MeshBase &) const
Finds all the processors that may contain elements that neighbor my elements.
virtual dof_id_type n_elem() const =0
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
Definition: mesh.h:50
processor_id_type processor_id() const
virtual dof_id_type n_nodes() const =0

◆ testAbaqusReadFirst()

void MeshInputTest::testAbaqusReadFirst ( )
inline

Definition at line 1471 of file mesh_input.C.

1472  {
1473  LOG_UNIT_TEST;
1474  testAbaqusRead("meshes/tensile_sample_test1.inp.gz", 728, 1166);
1475  }
void testAbaqusRead(const std::string &fname, dof_id_type n_elem, dof_id_type n_nodes)
Definition: mesh_input.C:1452

◆ testAbaqusReadSecond()

void MeshInputTest::testAbaqusReadSecond ( )
inline

Definition at line 1478 of file mesh_input.C.

1479  {
1480  LOG_UNIT_TEST;
1481  testAbaqusRead("meshes/poly_sample_test2.inp.gz", 1280, 1625);
1482  }
void testAbaqusRead(const std::string &fname, dof_id_type n_elem, dof_id_type n_nodes)
Definition: mesh_input.C:1452

◆ testCopyElementSolutionImpl()

template<typename MeshType , typename IOType >
void MeshInputTest::testCopyElementSolutionImpl ( const std::string &  filename)
inline

Definition at line 573 of file mesh_input.C.

References libMesh::EquationSystems::add_system(), libMesh::System::add_variable(), libMesh::MeshBase::allow_renumbering(), libMesh::MeshCommunication::broadcast(), libMesh::MeshTools::Generation::build_square(), libMesh::CONSTANT, libMesh::EquationSystems::init(), libMesh::libmesh_real(), mesh, libMesh::MONOMIAL, libMesh::EquationSystems::parameters, libMesh::System::point_value(), libMesh::MeshBase::prepare_for_use(), libMesh::ParallelObject::processor_id(), libMesh::System::project_solution(), libMesh::Real, six_x_plus_sixty_y(), libMesh::MeshBase::skip_noncritical_partitioning(), TestCommWorld, and libMesh::TOLERANCE.

574  {
575  {
576  MeshType mesh(*TestCommWorld);
577 
578  EquationSystems es(mesh);
579  System &sys = es.add_system<System> ("SimpleSystem");
580  sys.add_variable("e", CONSTANT, MONOMIAL);
581 
583  3, 3,
584  0., 1., 0., 1.);
585 
586  es.init();
587  sys.project_solution(six_x_plus_sixty_y, nullptr, es.parameters);
588 
589  IOType meshinput(mesh);
590 
591  // Don't try to write element data as nodal data
592  std::set<std::string> sys_list;
593  meshinput.write_equation_systems(filename, es, &sys_list);
594 
595  // Just write it as element data
596  meshinput.write_element_data(es);
597  }
598 
599  {
600  MeshType mesh(*TestCommWorld);
601  IOType meshinput(mesh);
602 
603  // Avoid getting Nemesis solution values mixed up
604  if (meshinput.is_parallel_format())
605  {
606  mesh.allow_renumbering(false);
608  }
609 
610  EquationSystems es(mesh);
611  System &sys = es.add_system<System> ("SimpleSystem");
612  sys.add_variable("teste", CONSTANT, MONOMIAL);
613 
614  if (mesh.processor_id() == 0 || meshinput.is_parallel_format())
615  meshinput.read(filename);
616  if (!meshinput.is_parallel_format())
619 
620  es.init();
621 
622  // Read the solution e into variable teste.
623  //
624  // With complex numbers, we'll only bother reading the real
625  // part.
626 #ifdef LIBMESH_USE_COMPLEX_NUMBERS
627  meshinput.copy_elemental_solution(sys, "teste", "r_e");
628 #else
629  meshinput.copy_elemental_solution(sys, "teste", "e");
630 #endif
631 
632  // Exodus only handles double precision
633  Real exotol = std::max(TOLERANCE*TOLERANCE, Real(1e-12));
634 
635  for (Real x = Real(1.L/6.L); x < 1; x += Real(1.L/3.L))
636  for (Real y = Real(1.L/6.L); y < 1; y += Real(1.L/3.L))
637  {
638  Point p(x,y);
639  LIBMESH_ASSERT_FP_EQUAL(libmesh_real(sys.point_value(0,p)),
640  libmesh_real(6*x+60*y),
641  exotol);
642  }
643  }
644  }
T libmesh_real(T a)
This is the EquationSystems class.
void allow_renumbering(bool allow)
If false is passed in then this mesh will no longer be renumbered when being prepared for use...
Definition: mesh_base.h:1173
libMesh::Parallel::Communicator * TestCommWorld
Definition: driver.C:159
static constexpr Real TOLERANCE
void prepare_for_use(const bool skip_renumber_nodes_and_elements, const bool skip_find_neighbors)
Prepare a newly ecreated (or read) mesh for use.
Definition: mesh_base.C:710
Number six_x_plus_sixty_y(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition: mesh_input.C:27
MeshBase & mesh
Number point_value(unsigned int var, const Point &p, const bool insist_on_success=true, const NumericVector< Number > *sol=nullptr) const
Definition: system.C:2369
void skip_noncritical_partitioning(bool skip)
If true is passed in then the elements on this mesh will no longer be (re)partitioned, and the nodes on this mesh will only be repartitioned if they are found "orphaned" via coarsening or other removal of the last element responsible for their node/element processor id consistency.
Definition: mesh_base.h:1213
void build_square(UnstructuredMesh &mesh, const unsigned int nx, const unsigned int ny, const Real xmin=0., const Real xmax=1., const Real ymin=0., const Real ymax=1., const ElemType type=INVALID_ELEM, const bool gauss_lobatto_grid=false)
A specialized build_cube() for 2D meshes.
void project_solution(FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr) const
Projects arbitrary functions onto the current solution.
This is the MeshCommunication class.
Manages consistently variables, degrees of freedom, and coefficient vectors.
Definition: system.h:96
unsigned int add_variable(std::string_view var, const FEType &type, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
Adds the variable var to the list of variables for this system.
Definition: system.C:1305
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void broadcast(MeshBase &) const
Finds all the processors that may contain elements that neighbor my elements.
processor_id_type processor_id() const
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:39

◆ testCopyElementVectorImpl()

template<typename MeshType , typename IOType >
void MeshInputTest::testCopyElementVectorImpl ( const std::string &  filename)
inline

Definition at line 729 of file mesh_input.C.

References libMesh::EquationSystems::add_system(), libMesh::System::add_variable(), libMesh::MeshBase::allow_renumbering(), libMesh::MeshCommunication::broadcast(), libMesh::MeshTools::Generation::build_square(), libMesh::CONSTANT, libMesh::System::current_local_solution, libMesh::EquationSystems::init(), libMesh::libmesh_real(), mesh, libMesh::MONOMIAL, libMesh::MONOMIAL_VEC, libMesh::System::number(), libMesh::System::point_value(), libMesh::MeshBase::prepare_for_use(), libMesh::ParallelObject::processor_id(), libMesh::Real, sin_x_plus_cos_y(), six_x_plus_sixty_y(), libMesh::MeshBase::skip_noncritical_partitioning(), TestCommWorld, and libMesh::TOLERANCE.

730  {
731  {
732  MeshType mesh(*TestCommWorld);
733 
734  EquationSystems es(mesh);
735  System & sys = es.add_system<System> ("SimpleSystem");
736  auto e_var = sys.add_variable("e", CONSTANT, MONOMIAL_VEC);
737 
739  3, 3,
740  0., 1., 0., 1.);
741 
742  es.init();
743 
744  // Here, we're going to manually set up the solution because the 'project_solution()' and
745  // 'project_vector()' methods don't work so well with CONSTANT MONOMIAL_VEC variables. They
746  // each lead to an error downstream asserting positive-definiteness when Cholesky decomposing.
747  // Interestingly, the error is only invoked for CONSTANT MONOMIAL_VEC, and not, e.g.,
748  // CONSTANT MONOMIAL nor FIRST LAGRANGE_VEC.
749  //
750  // Anyways, the important thing here is that we test the ExodusII and Nemesis writers, how
751  // the solution is set is hardly important, and we're pretty much following the same
752  // philosophy as the 'test2DProjectVectorFE()' unit tester in 'systems_test.C'
753  Parameters params;
754  for (const auto & elem : mesh.active_local_element_ptr_range())
755  {
756  const Point & p = elem->vertex_average();
757 
758  // Set the x-component with the value from 'six_x_plus_sixty_y()' and the y-component
759  // with that from 'sin_x_plus_cos_y()' at the element centroid (vertex average)
760  sys.current_local_solution->set(
761  elem->dof_number(sys.number(), e_var, 0), six_x_plus_sixty_y(p, params, "", ""));
762  sys.current_local_solution->set(
763  elem->dof_number(sys.number(), e_var, 1), sin_x_plus_cos_y(p, params, "", ""));
764  }
765 
766  // After setting values, we need to assemble
767  sys.current_local_solution->close();
768 
769  IOType meshinput(mesh);
770 
771  // Don't try to write element data as nodal data
772  std::set<std::string> sys_list;
773  meshinput.write_equation_systems(filename, es, &sys_list);
774 
775  // Just write it as element data
776  meshinput.write_element_data(es);
777  }
778 
779  {
780  MeshType mesh(*TestCommWorld);
781  IOType meshinput(mesh);
782 
783  // Avoid getting Nemesis solution values mixed up
784  if (meshinput.is_parallel_format())
785  {
786  mesh.allow_renumbering(false);
788  }
789 
790  EquationSystems es(mesh);
791  System & sys = es.add_system<System> ("SimpleSystem");
792 
793  // We have to read the CONSTANT MONOMIAL_VEC var "e" into separate CONSTANT MONOMIAL vars
794  // "e_x" and "e_y" because 'copy_elemental_solution()' currently doesn't support vectors.
795  // Again, this isn't a test for reading/copying an elemental vector solution, only writing.
796  sys.add_variable("teste_x", CONSTANT, MONOMIAL);
797  sys.add_variable("teste_y", CONSTANT, MONOMIAL);
798 
799  if (mesh.processor_id() == 0 || meshinput.is_parallel_format())
800  meshinput.read(filename);
801  if (!meshinput.is_parallel_format())
804 
805  es.init();
806 
807  // Read the solution e_x and e_y into variable teste_x and teste_y, respectively.
808  meshinput.copy_elemental_solution(sys, "teste_x", "e_x");
809  meshinput.copy_elemental_solution(sys, "teste_y", "e_y");
810 
811  // Exodus only handles double precision
812  Real exotol = std::max(TOLERANCE*TOLERANCE, Real(1e-12));
813 
814  for (Real x = Real(1.L/6.L); x < 1; x += Real(1.L/3.L))
815  for (Real y = Real(1.L/6.L); y < 1; y += Real(1.L/3.L))
816  {
817  Point p(x,y);
818  LIBMESH_ASSERT_FP_EQUAL(libmesh_real(sys.point_value(0,p)),
819  libmesh_real(6*x+60*y),
820  exotol);
821  LIBMESH_ASSERT_FP_EQUAL(libmesh_real(sys.point_value(1,p)),
822  libmesh_real(sin(x)+cos(y)),
823  exotol);
824  }
825  }
826  }
T libmesh_real(T a)
This is the EquationSystems class.
This class provides the ability to map between arbitrary, user-defined strings and several data types...
Definition: parameters.h:67
void allow_renumbering(bool allow)
If false is passed in then this mesh will no longer be renumbered when being prepared for use...
Definition: mesh_base.h:1173
libMesh::Parallel::Communicator * TestCommWorld
Definition: driver.C:159
static constexpr Real TOLERANCE
void prepare_for_use(const bool skip_renumber_nodes_and_elements, const bool skip_find_neighbors)
Prepare a newly ecreated (or read) mesh for use.
Definition: mesh_base.C:710
Number six_x_plus_sixty_y(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition: mesh_input.C:27
MeshBase & mesh
Number point_value(unsigned int var, const Point &p, const bool insist_on_success=true, const NumericVector< Number > *sol=nullptr) const
Definition: system.C:2369
void skip_noncritical_partitioning(bool skip)
If true is passed in then the elements on this mesh will no longer be (re)partitioned, and the nodes on this mesh will only be repartitioned if they are found "orphaned" via coarsening or other removal of the last element responsible for their node/element processor id consistency.
Definition: mesh_base.h:1213
void build_square(UnstructuredMesh &mesh, const unsigned int nx, const unsigned int ny, const Real xmin=0., const Real xmax=1., const Real ymin=0., const Real ymax=1., const ElemType type=INVALID_ELEM, const bool gauss_lobatto_grid=false)
A specialized build_cube() for 2D meshes.
unsigned int number() const
Definition: system.h:2269
This is the MeshCommunication class.
Manages consistently variables, degrees of freedom, and coefficient vectors.
Definition: system.h:96
unsigned int add_variable(std::string_view var, const FEType &type, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
Adds the variable var to the list of variables for this system.
Definition: system.C:1305
Number sin_x_plus_cos_y(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition: mesh_input.C:39
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void broadcast(MeshBase &) const
Finds all the processors that may contain elements that neighbor my elements.
std::unique_ptr< NumericVector< Number > > current_local_solution
All the values I need to compute my contribution to the simulation at hand.
Definition: system.h:1585
processor_id_type processor_id() const
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:39

◆ testCopyNodalSolutionImpl()

template<typename MeshType , typename IOType >
void MeshInputTest::testCopyNodalSolutionImpl ( const std::string &  filename)
inline

Definition at line 488 of file mesh_input.C.

References libMesh::EquationSystems::add_system(), libMesh::System::add_variable(), libMesh::MeshBase::allow_renumbering(), libMesh::MeshCommunication::broadcast(), libMesh::MeshTools::Generation::build_square(), libMesh::FIRST, libMesh::EquationSystems::init(), libMesh::LAGRANGE, libMesh::libmesh_real(), mesh, libMesh::EquationSystems::parameters, libMesh::System::point_value(), libMesh::MeshBase::prepare_for_use(), libMesh::ParallelObject::processor_id(), libMesh::System::project_solution(), libMesh::Real, six_x_plus_sixty_y(), libMesh::MeshBase::skip_noncritical_partitioning(), TestCommWorld, and libMesh::TOLERANCE.

489  {
490  {
491  MeshType mesh(*TestCommWorld);
492 
493  EquationSystems es(mesh);
494  System &sys = es.add_system<System> ("SimpleSystem");
495  sys.add_variable("n", FIRST, LAGRANGE);
496 
498  3, 3,
499  0., 1., 0., 1.);
500 
501  es.init();
502  sys.project_solution(six_x_plus_sixty_y, nullptr, es.parameters);
503 
504  IOType meshoutput(mesh);
505 
506  meshoutput.write_equation_systems(filename, es);
507  }
508 
509  {
510  MeshType mesh(*TestCommWorld);
511  IOType meshinput(mesh);
512 
513  // Avoid getting Nemesis solution values mixed up
514  if (meshinput.is_parallel_format())
515  {
516  mesh.allow_renumbering(false);
518  }
519 
520  EquationSystems es(mesh);
521  System &sys = es.add_system<System> ("SimpleSystem");
522  sys.add_variable("testn", FIRST, LAGRANGE);
523 
524  if (mesh.processor_id() == 0 || meshinput.is_parallel_format())
525  meshinput.read(filename);
526  if (!meshinput.is_parallel_format())
529 
530  es.init();
531 
532  // Read the solution e into variable teste.
533  //
534  // With complex numbers, we'll only bother reading the real
535  // part.
536 #ifdef LIBMESH_USE_COMPLEX_NUMBERS
537  meshinput.copy_nodal_solution(sys, "testn", "r_n");
538 #else
539  meshinput.copy_nodal_solution(sys, "testn", "n");
540 #endif
541 
542  // Exodus only handles double precision
543  Real exotol = std::max(TOLERANCE*TOLERANCE, Real(1e-12));
544 
545  for (Real x = 0; x < 1 + TOLERANCE; x += Real(1.L/3.L))
546  for (Real y = 0; y < 1 + TOLERANCE; y += Real(1.L/3.L))
547  {
548  Point p(x,y);
549  LIBMESH_ASSERT_FP_EQUAL(libmesh_real(sys.point_value(0,p)),
550  libmesh_real(6*x+60*y),
551  exotol);
552  }
553  }
554  }
T libmesh_real(T a)
This is the EquationSystems class.
void allow_renumbering(bool allow)
If false is passed in then this mesh will no longer be renumbered when being prepared for use...
Definition: mesh_base.h:1173
libMesh::Parallel::Communicator * TestCommWorld
Definition: driver.C:159
static constexpr Real TOLERANCE
void prepare_for_use(const bool skip_renumber_nodes_and_elements, const bool skip_find_neighbors)
Prepare a newly ecreated (or read) mesh for use.
Definition: mesh_base.C:710
Number six_x_plus_sixty_y(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition: mesh_input.C:27
MeshBase & mesh
Number point_value(unsigned int var, const Point &p, const bool insist_on_success=true, const NumericVector< Number > *sol=nullptr) const
Definition: system.C:2369
void skip_noncritical_partitioning(bool skip)
If true is passed in then the elements on this mesh will no longer be (re)partitioned, and the nodes on this mesh will only be repartitioned if they are found "orphaned" via coarsening or other removal of the last element responsible for their node/element processor id consistency.
Definition: mesh_base.h:1213
void build_square(UnstructuredMesh &mesh, const unsigned int nx, const unsigned int ny, const Real xmin=0., const Real xmax=1., const Real ymin=0., const Real ymax=1., const ElemType type=INVALID_ELEM, const bool gauss_lobatto_grid=false)
A specialized build_cube() for 2D meshes.
void project_solution(FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr) const
Projects arbitrary functions onto the current solution.
This is the MeshCommunication class.
Manages consistently variables, degrees of freedom, and coefficient vectors.
Definition: system.h:96
unsigned int add_variable(std::string_view var, const FEType &type, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
Adds the variable var to the list of variables for this system.
Definition: system.C:1305
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void broadcast(MeshBase &) const
Finds all the processors that may contain elements that neighbor my elements.
processor_id_type processor_id() const
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:39

◆ testDynaFileMappings()

void MeshInputTest::testDynaFileMappings ( const std::string &  filename,
std::array< Real, 4 >  expected_norms 
)
inline

Definition at line 1680 of file mesh_input.C.

References libMesh::MeshCommunication::broadcast(), libMesh::MeshBase::default_mapping_type(), mesh, libMesh::MeshBase::prepare_for_use(), libMesh::ParallelObject::processor_id(), libMesh::RATIONAL_BERNSTEIN_MAP, libMesh::DynaIO::read(), and TestCommWorld.

1681  {
1683 
1684  DynaIO dyna(mesh);
1685  if (mesh.processor_id() == 0)
1686  dyna.read(filename);
1688 
1690 
1691  CPPUNIT_ASSERT_EQUAL(mesh.default_mapping_type(),
1693 
1694  // Useful when trying out different projection functions
1695  // std::cout << filename << ":" << std::endl;
1696 
1698 
1699  testProjectionRegression(mesh, expected_norms);
1700  }
Reading and writing meshes in (a subset of) LS-DYNA format.
Definition: dyna_io.h:52
libMesh::Parallel::Communicator * TestCommWorld
Definition: driver.C:159
void prepare_for_use(const bool skip_renumber_nodes_and_elements, const bool skip_find_neighbors)
Prepare a newly ecreated (or read) mesh for use.
Definition: mesh_base.C:710
MeshBase & mesh
ElemMappingType default_mapping_type() const
Returns the default master space to physical space mapping basis functions to be used on newly added ...
Definition: mesh_base.h:791
This is the MeshCommunication class.
void testMasterCenters(const MeshBase &mesh)
Definition: mesh_input.C:1367
void testProjectionRegression(MeshBase &mesh, std::array< Real, 4 > expected_norms)
Definition: mesh_input.C:1633
void broadcast(MeshBase &) const
Finds all the processors that may contain elements that neighbor my elements.
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
Definition: mesh.h:50
processor_id_type processor_id() const

◆ testDynaFileMappingsBlockWithHole()

void MeshInputTest::testDynaFileMappingsBlockWithHole ( )
inline

Definition at line 1712 of file mesh_input.C.

1713  {
1714  LOG_UNIT_TEST;
1715 
1716  testDynaFileMappings("meshes/BlockWithHole_Patch9.bxt.gz",
1717  // Regression values for sin_x_plus_cos_y
1718  {{3.22612556930183, 1.97405365384733,
1719  2.53376235803176, 1.41374070517223}});
1720  }
void testDynaFileMappings(const std::string &filename, std::array< Real, 4 > expected_norms)
Definition: mesh_input.C:1680

◆ testDynaFileMappingsCyl3d()

void MeshInputTest::testDynaFileMappingsCyl3d ( )
inline

Definition at line 1732 of file mesh_input.C.

1733  {
1734  LOG_UNIT_TEST;
1735 
1736  testDynaFileMappings("meshes/PressurizedCyl3d_Patch1_8Elem.bxt.gz",
1737  // Regression values for sin_x_plus_cos_y
1738  {{0.963612880188165, 1.82329452603503,
1739  0.707998701597943, 1.31399222566683}});
1740  }
void testDynaFileMappings(const std::string &filename, std::array< Real, 4 > expected_norms)
Definition: mesh_input.C:1680

◆ testDynaFileMappingsFEMEx5()

void MeshInputTest::testDynaFileMappingsFEMEx5 ( )
inline

Definition at line 1702 of file mesh_input.C.

1703  {
1704  LOG_UNIT_TEST;
1705 
1706  testDynaFileMappings("meshes/PressurizedCyl_Patch6_256Elem.bxt.gz",
1707  // Regression values for sin_x_plus_cos_y
1708  {{0.9639857809698268, 1.839870171669186,
1709  0.7089812562241862, 1.306121188539059}});
1710  }
void testDynaFileMappings(const std::string &filename, std::array< Real, 4 > expected_norms)
Definition: mesh_input.C:1680

◆ testDynaFileMappingsPlateWithHole()

void MeshInputTest::testDynaFileMappingsPlateWithHole ( )
inline

Definition at line 1722 of file mesh_input.C.

1723  {
1724  LOG_UNIT_TEST;
1725 
1726  testDynaFileMappings("meshes/PlateWithHole_Patch8.bxt.gz",
1727  // Regression values for sin_x_plus_cos_y
1728  {{2.2812154374012, 1.974049990211937,
1729  1.791640772215248, 1.413679237529376}});
1730  }
void testDynaFileMappings(const std::string &filename, std::array< Real, 4 > expected_norms)
Definition: mesh_input.C:1680

◆ testDynaNoSplines()

void MeshInputTest::testDynaNoSplines ( )
inline

Definition at line 1547 of file mesh_input.C.

References libMesh::MeshCommunication::broadcast(), mesh, libMesh::MeshBase::n_elem(), libMesh::MeshBase::n_nodes(), libMesh::MeshBase::prepare_for_use(), libMesh::ParallelObject::processor_id(), libMesh::DynaIO::read(), and TestCommWorld.

1548  {
1549  LOG_UNIT_TEST;
1550 
1552 
1553  DynaIO dyna(mesh, /* keep_spline_nodes = */ false);
1554 
1555  if (mesh.processor_id() == 0)
1556  dyna.read("meshes/1_quad.bxt.gz");
1558 
1560 
1561  // We have 1 QUAD9 finite element
1562  CPPUNIT_ASSERT_EQUAL(mesh.n_elem(), static_cast<dof_id_type>(1));
1563  CPPUNIT_ASSERT_EQUAL(mesh.n_nodes(), static_cast<dof_id_type>(9));
1564 
1566  }
Reading and writing meshes in (a subset of) LS-DYNA format.
Definition: dyna_io.h:52
libMesh::Parallel::Communicator * TestCommWorld
Definition: driver.C:159
void prepare_for_use(const bool skip_renumber_nodes_and_elements, const bool skip_find_neighbors)
Prepare a newly ecreated (or read) mesh for use.
Definition: mesh_base.C:710
MeshBase & mesh
This is the MeshCommunication class.
void helperTestingDynaQuad(const MeshBase &mesh)
Definition: mesh_input.C:1408
void broadcast(MeshBase &) const
Finds all the processors that may contain elements that neighbor my elements.
virtual dof_id_type n_elem() const =0
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
Definition: mesh.h:50
processor_id_type processor_id() const
virtual dof_id_type n_nodes() const =0
uint8_t dof_id_type
Definition: id_types.h:67

◆ testDynaReadElem()

void MeshInputTest::testDynaReadElem ( )
inline

Definition at line 1485 of file mesh_input.C.

References libMesh::MeshCommunication::broadcast(), mesh, libMesh::MeshBase::n_elem(), libMesh::MeshBase::n_nodes(), libMesh::MeshBase::prepare_for_use(), libMesh::ParallelObject::processor_id(), libMesh::DynaIO::read(), and TestCommWorld.

1486  {
1487  LOG_UNIT_TEST;
1488 
1490 
1491  DynaIO dyna(mesh);
1492 
1493  if (mesh.processor_id() == 0)
1494  dyna.read("meshes/1_quad.bxt.gz");
1496 
1498 
1499  // We have 1 QUAD9 finite element, attached via a trivial map to 9
1500  // spline Node+NodeElem objects
1501  CPPUNIT_ASSERT_EQUAL(mesh.n_elem(), static_cast<dof_id_type>(10));
1502  CPPUNIT_ASSERT_EQUAL(mesh.n_nodes(), static_cast<dof_id_type>(18));
1503 
1505  }
Reading and writing meshes in (a subset of) LS-DYNA format.
Definition: dyna_io.h:52
libMesh::Parallel::Communicator * TestCommWorld
Definition: driver.C:159
void prepare_for_use(const bool skip_renumber_nodes_and_elements, const bool skip_find_neighbors)
Prepare a newly ecreated (or read) mesh for use.
Definition: mesh_base.C:710
MeshBase & mesh
This is the MeshCommunication class.
void helperTestingDynaQuad(const MeshBase &mesh)
Definition: mesh_input.C:1408
void broadcast(MeshBase &) const
Finds all the processors that may contain elements that neighbor my elements.
virtual dof_id_type n_elem() const =0
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
Definition: mesh.h:50
processor_id_type processor_id() const
virtual dof_id_type n_nodes() const =0
uint8_t dof_id_type
Definition: id_types.h:67

◆ testDynaReadPatch()

void MeshInputTest::testDynaReadPatch ( )
inline

Definition at line 1569 of file mesh_input.C.

References libMesh::EquationSystems::add_system(), libMesh::System::add_variable(), libMesh::MeshCommunication::broadcast(), libMesh::MeshBase::default_mapping_data(), libMesh::MeshBase::default_mapping_type(), libMesh::System::get_dof_map(), libMesh::EquationSystems::init(), libMesh::libmesh_real(), mesh, libMesh::DofMap::n_constrained_dofs(), libMesh::MeshBase::n_elem(), libMesh::MeshBase::n_nodes(), libMesh::NODEELEM, libMesh::MeshBase::prepare_for_use(), libMesh::ParallelObject::processor_id(), libMesh::RATIONAL_BERNSTEIN_MAP, libMesh::DynaIO::read(), libMesh::Real, libMesh::SECOND, TestCommWorld, and libMesh::TOLERANCE.

1570  {
1571  LOG_UNIT_TEST;
1572 
1574 
1575  DynaIO dyna(mesh);
1576  if (mesh.processor_id() == 0)
1577  dyna.read("meshes/25_quad.bxt.gz");
1579 
1581 
1582  // We have 5^2 QUAD9 elements, with 11^2 nodes,
1583  // tied to 49 Node/NodeElem spline nodes
1584  CPPUNIT_ASSERT_EQUAL(mesh.n_elem(), static_cast<dof_id_type>(25+49));
1585  CPPUNIT_ASSERT_EQUAL(mesh.n_nodes(), static_cast<dof_id_type>(121+49));
1586 
1587  CPPUNIT_ASSERT_EQUAL(mesh.default_mapping_type(),
1589 
1590  unsigned char weight_index = mesh.default_mapping_data();
1591 
1592  for (const auto & elem : mesh.active_element_ptr_range())
1593  {
1594  if (elem->type() == NODEELEM)
1595  continue;
1596  LIBMESH_ASSERT_FP_EQUAL(libmesh_real(0.04), elem->volume(), TOLERANCE);
1597 
1598  for (unsigned int n=0; n != 9; ++n)
1599  CPPUNIT_ASSERT_EQUAL
1600  (elem->node_ref(n).get_extra_datum<Real>(weight_index),
1601  Real(1.0));
1602 
1603  unsigned int n_neighbors = 0, n_neighbors_expected = 2;
1604  for (unsigned int side=0; side != 4; ++side)
1605  if (elem->neighbor_ptr(side))
1606  n_neighbors++;
1607  Point c = elem->vertex_average();
1608 
1609  if (c(0) > 0.2 && c(0) < 0.8)
1610  n_neighbors_expected++;
1611  if (c(1) > 0.2 && c(1) < 0.8)
1612  n_neighbors_expected++;
1613 
1614  CPPUNIT_ASSERT_EQUAL(n_neighbors, n_neighbors_expected);
1615  }
1616 
1618 
1619 #ifdef LIBMESH_HAVE_SOLVER
1620 #ifdef LIBMESH_ENABLE_CONSTRAINTS
1621  // Now test whether we can assign the desired constraint equations
1622  EquationSystems es(mesh);
1623  System & sys = es.add_system<LinearImplicitSystem>("test");
1624  sys.add_variable("u", SECOND); // to match QUAD9
1625  es.init();
1626 
1627  // We should have a constraint on every FE dof
1628  CPPUNIT_ASSERT_EQUAL(sys.get_dof_map().n_constrained_dofs(), static_cast<dof_id_type>(121));
1629 #endif // LIBMESH_ENABLE_CONSTRAINTS
1630 #endif // LIBMESH_HAVE_SOLVER
1631  }
T libmesh_real(T a)
This is the EquationSystems class.
Reading and writing meshes in (a subset of) LS-DYNA format.
Definition: dyna_io.h:52
libMesh::Parallel::Communicator * TestCommWorld
Definition: driver.C:159
static constexpr Real TOLERANCE
Manages consistently variables, degrees of freedom, coefficient vectors, matrices and linear solvers ...
void prepare_for_use(const bool skip_renumber_nodes_and_elements, const bool skip_find_neighbors)
Prepare a newly ecreated (or read) mesh for use.
Definition: mesh_base.C:710
MeshBase & mesh
ElemMappingType default_mapping_type() const
Returns the default master space to physical space mapping basis functions to be used on newly added ...
Definition: mesh_base.h:791
This is the MeshCommunication class.
unsigned char default_mapping_data() const
Returns any default data value used by the master space to physical space mapping.
Definition: mesh_base.h:809
Manages consistently variables, degrees of freedom, and coefficient vectors.
Definition: system.h:96
unsigned int add_variable(std::string_view var, const FEType &type, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
Adds the variable var to the list of variables for this system.
Definition: system.C:1305
void testMasterCenters(const MeshBase &mesh)
Definition: mesh_input.C:1367
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
dof_id_type n_constrained_dofs() const
void broadcast(MeshBase &) const
Finds all the processors that may contain elements that neighbor my elements.
virtual dof_id_type n_elem() const =0
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
Definition: mesh.h:50
processor_id_type processor_id() const
const DofMap & get_dof_map() const
Definition: system.h:2293
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:39
virtual dof_id_type n_nodes() const =0
uint8_t dof_id_type
Definition: id_types.h:67

◆ testExodusCopyElementSolutionDistributed()

void MeshInputTest::testExodusCopyElementSolutionDistributed ( )
inline

Definition at line 650 of file mesh_input.C.

651  { LOG_UNIT_TEST; testCopyElementSolutionImpl<DistributedMesh,ExodusII_IO>("dist_with_elem_soln.e"); }

◆ testExodusCopyElementSolutionReplicated()

void MeshInputTest::testExodusCopyElementSolutionReplicated ( )
inline

Definition at line 647 of file mesh_input.C.

648  { LOG_UNIT_TEST; testCopyElementSolutionImpl<ReplicatedMesh,ExodusII_IO>("repl_with_elem_soln.e"); }

◆ testExodusCopyElementVectorDistributed()

void MeshInputTest::testExodusCopyElementVectorDistributed ( )
inline

Definition at line 831 of file mesh_input.C.

832  { LOG_UNIT_TEST; testCopyElementVectorImpl<DistributedMesh,ExodusII_IO>("dist_with_elem_vec.e"); }

◆ testExodusCopyElementVectorReplicated()

void MeshInputTest::testExodusCopyElementVectorReplicated ( )
inline

Definition at line 828 of file mesh_input.C.

829  { LOG_UNIT_TEST; testCopyElementVectorImpl<ReplicatedMesh, ExodusII_IO>("repl_with_elem_vec.e"); }

◆ testExodusCopyNodalSolutionDistributed()

void MeshInputTest::testExodusCopyNodalSolutionDistributed ( )
inline

Definition at line 560 of file mesh_input.C.

561  { LOG_UNIT_TEST; testCopyNodalSolutionImpl<DistributedMesh,ExodusII_IO>("dist_with_nodal_soln.e"); }

◆ testExodusCopyNodalSolutionReplicated()

void MeshInputTest::testExodusCopyNodalSolutionReplicated ( )
inline

Definition at line 557 of file mesh_input.C.

558  { LOG_UNIT_TEST; testCopyNodalSolutionImpl<ReplicatedMesh,ExodusII_IO>("repl_with_nodal_soln.e"); }

◆ testExodusDiscCyl3d()

void MeshInputTest::testExodusDiscCyl3d ( )
inline

Definition at line 1864 of file mesh_input.C.

1865  {
1866  LOG_UNIT_TEST;
1867 
1868  testExodusFileMappings("meshes/PressurizedCyl3d_Patch1_8Elem.e",
1869  {{0.963855209590556, 1.8234396424318,
1870  0.708286572453382, 1.31468940958327}},
1871  true);
1872  }
void testExodusFileMappings(const std::string &filename, std::array< Real, 4 > expected_norms, bool use_disc_bex=false)
Definition: mesh_input.C:1742

◆ testExodusDiscPlateWithHole()

void MeshInputTest::testExodusDiscPlateWithHole ( )
inline

Definition at line 1825 of file mesh_input.C.

1826  {
1827  LOG_UNIT_TEST;
1828 
1829  testExodusFileMappings("meshes/PlateWithHole_Patch8.e",
1830  // Regression values for sin_x_plus_cos_y
1831  //
1832  // These are *not* the same as for the continuous plate, because
1833  // we do the C^TKCx=C^Tf trick to pull back projections to the
1834  // spline nodes, and the pseudoinverse here minimizes the error in
1835  // a discretization-dependent norm, not in a Sobolev norm. For
1836  // these coarse meshes, our Sobolev norms can end up being ~0.1%
1837  // different.
1838  {{2.28234312456534, 1.97439548757586,
1839  1.79290449809266, 1.41075128955985}},
1840  true);
1841  }
void testExodusFileMappings(const std::string &filename, std::array< Real, 4 > expected_norms, bool use_disc_bex=false)
Definition: mesh_input.C:1742

◆ testExodusDiscTwoBlocks()

void MeshInputTest::testExodusDiscTwoBlocks ( )
inline

Definition at line 1843 of file mesh_input.C.

1844  {
1845  LOG_UNIT_TEST;
1846 
1847  testExodusFileMappings("meshes/two_quads_two_blocks.e",
1848  // Regression values for sin_x_plus_cos_y
1849  {{2.03496953073072, 1.97996853164955,
1850  1.18462134113435, 1.03085301158959}},
1851  true);
1852  }
void testExodusFileMappings(const std::string &filename, std::array< Real, 4 > expected_norms, bool use_disc_bex=false)
Definition: mesh_input.C:1742

◆ testExodusDiscTwoElemIGA()

void MeshInputTest::testExodusDiscTwoElemIGA ( )
inline

Definition at line 1853 of file mesh_input.C.

1854  {
1855  LOG_UNIT_TEST;
1856 
1857  testExodusFileMappings("meshes/two_element_iga_in.e",
1858  // Regression values for sin_x_plus_cos_y
1859  {{1.26877626663365, 1.42553698909339,
1860  1.54810114917177, 1.29792704408979}},
1861  true);
1862  }
void testExodusFileMappings(const std::string &filename, std::array< Real, 4 > expected_norms, bool use_disc_bex=false)
Definition: mesh_input.C:1742

◆ testExodusDiscWriteAddedSidesEdgeC0()

void MeshInputTest::testExodusDiscWriteAddedSidesEdgeC0 ( )
inline

Definition at line 1178 of file mesh_input.C.

References libMesh::EDGE3, libMesh::FIRST, libMesh::SECOND, and six_x_plus_sixty_y().

1179  {
1182  }
Number six_x_plus_sixty_y(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition: mesh_input.C:27
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930

◆ testExodusDiscWriteAddedSidesEdgeDisc()

void MeshInputTest::testExodusDiscWriteAddedSidesEdgeDisc ( )
inline

Definition at line 1201 of file mesh_input.C.

References designed_for_side_elems(), libMesh::EDGE3, and libMesh::SECOND.

1202  {
1204  }
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930
Number designed_for_side_elems(const Point &p, const Parameters &param, const std::string &, const std::string &)
Definition: mesh_input.C:52

◆ testExodusDiscWriteAddedSidesHexC0()

void MeshInputTest::testExodusDiscWriteAddedSidesHexC0 ( )
inline

Definition at line 1302 of file mesh_input.C.

References libMesh::FIRST, libMesh::HEX27, libMesh::SECOND, and six_x_plus_sixty_y().

1303  {
1306  }
Number six_x_plus_sixty_y(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition: mesh_input.C:27
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930

◆ testExodusDiscWriteAddedSidesHexDisc()

void MeshInputTest::testExodusDiscWriteAddedSidesHexDisc ( )
inline

Definition at line 1325 of file mesh_input.C.

References designed_for_side_elems(), libMesh::HEX27, and libMesh::SECOND.

1326  {
1328  }
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930
Number designed_for_side_elems(const Point &p, const Parameters &param, const std::string &, const std::string &)
Definition: mesh_input.C:52

◆ testExodusDiscWriteAddedSidesMixedEdgeC0()

void MeshInputTest::testExodusDiscWriteAddedSidesMixedEdgeC0 ( )
inline

Definition at line 1190 of file mesh_input.C.

References libMesh::EDGE3, libMesh::FIRST, libMesh::LAGRANGE, libMesh::SECOND, and six_x_plus_sixty_y().

1191  {
1194  }
Number six_x_plus_sixty_y(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition: mesh_input.C:27
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930

◆ testExodusDiscWriteAddedSidesMixedHexC0()

void MeshInputTest::testExodusDiscWriteAddedSidesMixedHexC0 ( )
inline

Definition at line 1314 of file mesh_input.C.

References libMesh::FIRST, libMesh::HEX27, libMesh::HIERARCHIC, libMesh::LAGRANGE, libMesh::SECOND, and six_x_plus_sixty_y().

1315  {
1318  }
Number six_x_plus_sixty_y(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition: mesh_input.C:27
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930

◆ testExodusDiscWriteAddedSidesMixedQuadC0()

void MeshInputTest::testExodusDiscWriteAddedSidesMixedQuadC0 ( )
inline

Definition at line 1258 of file mesh_input.C.

References libMesh::FIRST, libMesh::LAGRANGE, libMesh::QUAD9, libMesh::SECOND, and six_x_plus_sixty_y().

1259  {
1262  }
Number six_x_plus_sixty_y(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition: mesh_input.C:27
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930

◆ testExodusDiscWriteAddedSidesMixedTriC0()

void MeshInputTest::testExodusDiscWriteAddedSidesMixedTriC0 ( )
inline

Definition at line 1224 of file mesh_input.C.

References libMesh::FIRST, libMesh::HIERARCHIC, libMesh::SECOND, six_x_plus_sixty_y(), libMesh::SZABAB, and libMesh::TRI6.

1225  {
1228  }
Number six_x_plus_sixty_y(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition: mesh_input.C:27
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930

◆ testExodusDiscWriteAddedSidesQuadC0()

void MeshInputTest::testExodusDiscWriteAddedSidesQuadC0 ( )
inline

Definition at line 1246 of file mesh_input.C.

References libMesh::FIRST, libMesh::QUAD9, libMesh::SECOND, and six_x_plus_sixty_y().

1247  {
1250  }
Number six_x_plus_sixty_y(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition: mesh_input.C:27
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930

◆ testExodusDiscWriteAddedSidesQuadDisc()

void MeshInputTest::testExodusDiscWriteAddedSidesQuadDisc ( )
inline

Definition at line 1269 of file mesh_input.C.

References designed_for_side_elems(), libMesh::QUAD9, and libMesh::SECOND.

1270  {
1272  }
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930
Number designed_for_side_elems(const Point &p, const Parameters &param, const std::string &, const std::string &)
Definition: mesh_input.C:52

◆ testExodusDiscWriteAddedSidesTetC0()

void MeshInputTest::testExodusDiscWriteAddedSidesTetC0 ( )
inline

Definition at line 1280 of file mesh_input.C.

References libMesh::FIRST, libMesh::SECOND, six_x_plus_sixty_y(), and libMesh::TET14.

1281  {
1284  }
Number six_x_plus_sixty_y(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition: mesh_input.C:27
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930

◆ testExodusDiscWriteAddedSidesTetDisc()

void MeshInputTest::testExodusDiscWriteAddedSidesTetDisc ( )
inline

Definition at line 1291 of file mesh_input.C.

References designed_for_side_elems(), libMesh::SECOND, and libMesh::TET14.

1292  {
1294  }
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930
Number designed_for_side_elems(const Point &p, const Parameters &param, const std::string &, const std::string &)
Definition: mesh_input.C:52

◆ testExodusDiscWriteAddedSidesTriC0()

void MeshInputTest::testExodusDiscWriteAddedSidesTriC0 ( )
inline

Definition at line 1212 of file mesh_input.C.

References libMesh::FIRST, libMesh::SECOND, six_x_plus_sixty_y(), and libMesh::TRI6.

1213  {
1216  }
Number six_x_plus_sixty_y(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition: mesh_input.C:27
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930

◆ testExodusDiscWriteAddedSidesTriDisc()

void MeshInputTest::testExodusDiscWriteAddedSidesTriDisc ( )
inline

Definition at line 1235 of file mesh_input.C.

References designed_for_side_elems(), libMesh::SECOND, and libMesh::TRI6.

1236  {
1238  }
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930
Number designed_for_side_elems(const Point &p, const Parameters &param, const std::string &, const std::string &)
Definition: mesh_input.C:52

◆ testExodusFileMappings()

void MeshInputTest::testExodusFileMappings ( const std::string &  filename,
std::array< Real, 4 >  expected_norms,
bool  use_disc_bex = false 
)
inline

Definition at line 1742 of file mesh_input.C.

References libMesh::MeshCommunication::broadcast(), libMesh::MeshBase::default_mapping_type(), libMesh::ExodusII_IO::get_exodus_version(), mesh, libMesh::MeshBase::prepare_for_use(), libMesh::ParallelObject::processor_id(), libMesh::RATIONAL_BERNSTEIN_MAP, libMesh::ExodusII_IO::read(), libMesh::ExodusII_IO::set_discontinuous_bex(), TestCommWorld, libMesh::VTKIO::write(), and libMesh::ExodusII_IO::write().

1745  {
1747 
1748  ExodusII_IO exii(mesh);
1749  // IGA Exodus meshes require ExodusII 8 or higher
1750  if (exii.get_exodus_version() < 800)
1751  return;
1752 
1753  // This should default to false
1754  if (use_disc_bex)
1755  exii.set_discontinuous_bex(true);
1756 
1757  if (mesh.processor_id() == 0)
1758  exii.read(filename);
1760 
1762 
1763  CPPUNIT_ASSERT_EQUAL(mesh.default_mapping_type(),
1765 
1767 
1768  testProjectionRegression(mesh, expected_norms);
1769 
1770  // Test a write when we're done reading; I was getting weirdness
1771  // from NetCDF at this point in a Moose output test.
1772  {
1773  ExodusII_IO exii(mesh);
1774 
1775  exii.write("exodus_file_mapping_out.e");
1776  }
1777 
1778 #ifdef LIBMESH_HAVE_VTK
1779  {
1780  VTKIO vtkout(mesh);
1781 
1782  vtkout.write("vtk_file_mapping_out.pvtu");
1783  }
1784 #endif
1785  }
libMesh::Parallel::Communicator * TestCommWorld
Definition: driver.C:159
The ExodusII_IO class implements reading meshes in the ExodusII file format from Sandia National Labs...
Definition: exodusII_io.h:52
void prepare_for_use(const bool skip_renumber_nodes_and_elements, const bool skip_find_neighbors)
Prepare a newly ecreated (or read) mesh for use.
Definition: mesh_base.C:710
MeshBase & mesh
This class implements reading and writing meshes in the VTK format.
Definition: vtk_io.h:60
ElemMappingType default_mapping_type() const
Returns the default master space to physical space mapping basis functions to be used on newly added ...
Definition: mesh_base.h:791
This is the MeshCommunication class.
void testMasterCenters(const MeshBase &mesh)
Definition: mesh_input.C:1367
void testProjectionRegression(MeshBase &mesh, std::array< Real, 4 > expected_norms)
Definition: mesh_input.C:1633
void broadcast(MeshBase &) const
Finds all the processors that may contain elements that neighbor my elements.
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
Definition: mesh.h:50
processor_id_type processor_id() const

◆ testExodusFileMappingsCyl3d()

void MeshInputTest::testExodusFileMappingsCyl3d ( )
inline

Definition at line 1816 of file mesh_input.C.

1817  {
1818  LOG_UNIT_TEST;
1819 
1820  testExodusFileMappings("meshes/PressurizedCyl3d_Patch1_8Elem.e",
1821  {{0.963612880188165, 1.82329452603503,
1822  0.707998701597943, 1.31399222566683}});
1823  }
void testExodusFileMappings(const std::string &filename, std::array< Real, 4 > expected_norms, bool use_disc_bex=false)
Definition: mesh_input.C:1742

◆ testExodusFileMappingsPlateWithHole()

void MeshInputTest::testExodusFileMappingsPlateWithHole ( )
inline

Definition at line 1787 of file mesh_input.C.

1788  {
1789  LOG_UNIT_TEST;
1790 
1791  testExodusFileMappings("meshes/PlateWithHole_Patch8.e",
1792  // Regression values for sin_x_plus_cos_y
1793  {{2.2812154374012, 1.974049990211937,
1794  1.791640772215248, 1.413679237529376}});
1795  }
void testExodusFileMappings(const std::string &filename, std::array< Real, 4 > expected_norms, bool use_disc_bex=false)
Definition: mesh_input.C:1742

◆ testExodusFileMappingsTwoBlocks()

void MeshInputTest::testExodusFileMappingsTwoBlocks ( )
inline

Definition at line 1797 of file mesh_input.C.

1798  {
1799  LOG_UNIT_TEST;
1800 
1801  testExodusFileMappings("meshes/two_quads_two_blocks.e",
1802  // Regression values for sin_x_plus_cos_y
1803  {{2.03496953073072, 1.97996853164955,
1804  1.18462134113435, 1.03085301158959}});
1805  }
void testExodusFileMappings(const std::string &filename, std::array< Real, 4 > expected_norms, bool use_disc_bex=false)
Definition: mesh_input.C:1742

◆ testExodusFileMappingsTwoElemIGA()

void MeshInputTest::testExodusFileMappingsTwoElemIGA ( )
inline

Definition at line 1806 of file mesh_input.C.

1807  {
1808  LOG_UNIT_TEST;
1809 
1810  testExodusFileMappings("meshes/two_element_iga_in.e",
1811  // Regression values for sin_x_plus_cos_y
1812  {{1.26865962862531, 1.42562070158386,
1813  1.54905363492342, 1.29782906548366}});
1814  }
void testExodusFileMappings(const std::string &filename, std::array< Real, 4 > expected_norms, bool use_disc_bex=false)
Definition: mesh_input.C:1742

◆ testExodusIGASidesets()

void MeshInputTest::testExodusIGASidesets ( )
inline

Definition at line 397 of file mesh_input.C.

References libMesh::BoundaryInfo::boundary_ids(), libMesh::MeshCommunication::broadcast(), libMesh::ParallelObject::comm(), libMesh::BoundaryInfo::get_boundary_ids(), libMesh::MeshBase::get_boundary_info(), libMesh::ExodusII_IO::get_exodus_version(), libMesh::MeshBase::is_serial(), TIMPI::Communicator::max(), mesh, libMesh::BoundaryInfo::n_boundary_ids(), libMesh::MeshBase::n_elem(), libMesh::MeshBase::n_nodes(), libMesh::NODEELEM, libMesh::MeshBase::prepare_for_use(), libMesh::ParallelObject::processor_id(), libMesh::ExodusII_IO::read(), TIMPI::Communicator::sum(), TestCommWorld, and libMesh::ExodusII_IO::write().

398  {
399  LOG_UNIT_TEST;
400 
402 
403  // Block here so we trigger exii destructor early; I thought I
404  // might have had a bug in there at one point
405  {
406  ExodusII_IO exii(mesh);
407  // IGA Exodus meshes require ExodusII 8 or higher
408  if (exii.get_exodus_version() < 800)
409  return;
410 
411  if (mesh.processor_id() == 0)
412  exii.read("meshes/Cube_With_Sidesets.e");
413 
414  }
415 
418 
419  // 5^3 spline nodes + 7^3 Rational Bezier nodes
420  CPPUNIT_ASSERT_EQUAL(mesh.n_nodes(), static_cast<dof_id_type>(468));
421  // 5^3 spline elements + 3^3 Rational Bezier elements
422  CPPUNIT_ASSERT_EQUAL(mesh.n_elem(), static_cast<dof_id_type>(152));
423 
424  // Check that we see the boundary ids we expect
426 
427  // On a ReplicatedMesh, we should see all 6 boundary ids on each processor
428  if (mesh.is_serial())
429  CPPUNIT_ASSERT_EQUAL(static_cast<std::size_t>(6), bi.n_boundary_ids());
430 
431  // On any mesh, we should see each id on *some* processor
432  {
433  const std::set<boundary_id_type> & bc_ids = bi.get_boundary_ids();
434  // CoreForm gave me a file with 1-based numbering! (faints)
435  for (boundary_id_type i = 1 ; i != 7; ++i)
436  {
437  bool has_bcid = bc_ids.count(i);
438  mesh.comm().max(has_bcid);
439  CPPUNIT_ASSERT(has_bcid);
440  }
441  }
442 
443  // Indexed by bcid-1, because we count from 0, like God and
444  // Dijkstra intended!
445  std::vector<int> side_counts(6, 0);
446 
447  // Map from our side numbers to the file's BCIDs
448  const boundary_id_type libmesh_side_to_bcid[] = {1, 4, 6, 3, 5, 2};
449 
450  for (const auto & elem : mesh.active_local_element_ptr_range())
451  {
452  if (elem->type() == NODEELEM)
453  continue;
454 
455  for (unsigned short side=0; side<elem->n_sides(); side++)
456  {
457  if (elem->neighbor_ptr(side))
458  CPPUNIT_ASSERT_EQUAL(bi.n_boundary_ids(elem, side), 0u);
459  else
460  {
461  CPPUNIT_ASSERT_EQUAL(bi.n_boundary_ids(elem, side), 1u);
462  std::vector<boundary_id_type> bids;
463  bi.boundary_ids(elem, side, bids);
464  side_counts[bids[0]-1]++;
465  CPPUNIT_ASSERT_EQUAL(libmesh_side_to_bcid[side], bids[0]);
466  }
467  }
468  }
469 
470  for (auto bc_count : side_counts)
471  {
472  // We should have 3^2 sides with each id
473  mesh.comm().sum(bc_count);
474  CPPUNIT_ASSERT_EQUAL(bc_count, 9);
475  }
476 
477  // Test a write when we're done reading; I was getting weirdness
478  // from NetCDF at this point in a Moose output test.
479  {
480  ExodusII_IO exii(mesh);
481 
482  exii.write("Cube_With_Sidesets_out.e");
483  }
484  }
libMesh::Parallel::Communicator * TestCommWorld
Definition: driver.C:159
The ExodusII_IO class implements reading meshes in the ExodusII file format from Sandia National Labs...
Definition: exodusII_io.h:52
void prepare_for_use(const bool skip_renumber_nodes_and_elements, const bool skip_find_neighbors)
Prepare a newly ecreated (or read) mesh for use.
Definition: mesh_base.C:710
void sum(T &r) const
MeshBase & mesh
const Parallel::Communicator & comm() const
void boundary_ids(const Node *node, std::vector< boundary_id_type > &vec_to_fill) const
Fills a user-provided std::vector with the boundary ids associated with Node node.
const BoundaryInfo & get_boundary_info() const
The information about boundary ids on the mesh.
Definition: mesh_base.h:159
std::size_t n_boundary_ids() const
virtual bool is_serial() const
Definition: mesh_base.h:205
int8_t boundary_id_type
Definition: id_types.h:51
This is the MeshCommunication class.
The BoundaryInfo class contains information relevant to boundary conditions including storing faces...
Definition: boundary_info.h:57
const std::set< boundary_id_type > & get_boundary_ids() const
void max(const T &r, T &o, Request &req) const
void broadcast(MeshBase &) const
Finds all the processors that may contain elements that neighbor my elements.
virtual dof_id_type n_elem() const =0
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
Definition: mesh.h:50
processor_id_type processor_id() const
virtual dof_id_type n_nodes() const =0
uint8_t dof_id_type
Definition: id_types.h:67

◆ testExodusReadHeader()

void MeshInputTest::testExodusReadHeader ( )
inline

Definition at line 317 of file mesh_input.C.

References TIMPI::Communicator::barrier(), libMesh::MeshTools::Generation::build_square(), mesh, libMesh::ExodusHeaderInfo::num_dim, libMesh::ExodusHeaderInfo::num_edge, libMesh::ExodusHeaderInfo::num_edge_blk, libMesh::ExodusHeaderInfo::num_elem, libMesh::ExodusHeaderInfo::num_elem_blk, libMesh::ExodusHeaderInfo::num_node_sets, libMesh::ExodusHeaderInfo::num_side_sets, libMesh::ExodusII_IO::read_header(), TestCommWorld, libMesh::ExodusHeaderInfo::title, and libMesh::MeshBase::write().

318  {
319  LOG_UNIT_TEST;
320 
321  // first scope: write file
322  {
324  MeshTools::Generation::build_square (mesh, 3, 3, 0., 1., 0., 1.);
325  ExodusII_IO exii(mesh);
326  mesh.write("read_header_test.e");
327  }
328 
329  // Make sure that the writing is done before the reading starts.
331 
332  // second scope: read header
333  // Note: The header information is read from file on processor 0
334  // and then broadcast to the other procs, so with this test we are
335  // checking both that the header information is read correctly and
336  // that it is correctly communicated to other procs.
337  {
339  ExodusII_IO exii(mesh);
340  ExodusHeaderInfo header_info = exii.read_header("read_header_test.e");
341 
342  // Make sure the header information is as expected.
343  CPPUNIT_ASSERT_EQUAL(std::string(header_info.title.data()), std::string("read_header_test.e"));
344  CPPUNIT_ASSERT_EQUAL(header_info.num_dim, 2);
345  CPPUNIT_ASSERT_EQUAL(header_info.num_elem, 9);
346  CPPUNIT_ASSERT_EQUAL(header_info.num_elem_blk, 1);
347  CPPUNIT_ASSERT_EQUAL(header_info.num_node_sets, 4);
348  CPPUNIT_ASSERT_EQUAL(header_info.num_side_sets, 4);
349  CPPUNIT_ASSERT_EQUAL(header_info.num_edge_blk, 0);
350  CPPUNIT_ASSERT_EQUAL(header_info.num_edge, 0);
351  }
352  }
The ReplicatedMesh class is derived from the MeshBase class, and is used to store identical copies of...
This class is used as both an external data structure for passing around Exodus file header informati...
libMesh::Parallel::Communicator * TestCommWorld
Definition: driver.C:159
The ExodusII_IO class implements reading meshes in the ExodusII file format from Sandia National Labs...
Definition: exodusII_io.h:52
void barrier() const
MeshBase & mesh
void build_square(UnstructuredMesh &mesh, const unsigned int nx, const unsigned int ny, const Real xmin=0., const Real xmax=1., const Real ymin=0., const Real ymax=1., const ElemType type=INVALID_ELEM, const bool gauss_lobatto_grid=false)
A specialized build_cube() for 2D meshes.
virtual void write(const std::string &name)=0
std::vector< char > title

◆ testExodusWriteAddedSides()

void MeshInputTest::testExodusWriteAddedSides ( Number(*)(const Point &, const Parameters &, const std::string &, const std::string &)  exact_sol,
const ElemType  elem_type,
const Order  order,
const bool  write_discontinuous = false,
const std::vector< FEType earlier_vars = {},
const std::vector< FEType later_vars = {} 
)
inline

Definition at line 930 of file mesh_input.C.

935  {},
936  const std::vector<FEType> later_vars = {})
937  {
938  constexpr unsigned int nx = added_sides_nxyz[0],
939  ny = added_sides_nxyz[1],
940  nz = added_sides_nxyz[2];
941 
942  const unsigned int dim = Elem::build(elem_type)->dim();
943  const bool is_tensor = (Elem::build(elem_type)->n_sides() == dim * 2);
944 
945  // Figure out how many fake and true elements to expect
946  dof_id_type n_fake_elem = 0;
947  dof_id_type n_true_elem = 0;
948 
949  dof_id_type n_fake_nodes = 0;
950  dof_id_type n_true_nodes = 0;
951 
952  const std::string filename =
953  "side_discontinuous_"+Utility::enum_to_string<ElemType>(elem_type)+(write_discontinuous?"_disc":"")+".e";
954 
955  // first scope: write file
956  {
958 
959  EquationSystems es(mesh);
960  System & sys = es.add_system<System> ("SimpleSystem");
961  int varnum = 1;
962  for (auto vartype : earlier_vars)
963  sys.add_variable("earlier_"+std::to_string(varnum++), vartype);
964 
965  sys.add_variable("u", order, SIDE_HIERARCHIC);
966 
967  varnum = 1;
968  for (auto vartype : later_vars)
969  sys.add_variable("later_"+std::to_string(varnum++), vartype);
970 
971  if (dim == 3)
973  (mesh, nx, ny, nz, 0., 1., 0., 1., 0., 1., elem_type);
974  else if (dim == 2)
976  (mesh, nx, ny, 0., 1., 0., 1., elem_type);
977  else
979  (mesh, nx, 0., 1., elem_type);
980 
981  n_true_elem = mesh.n_elem();
982  n_true_nodes = mesh.n_nodes();
983  CPPUNIT_ASSERT_LESS(n_true_nodes, n_true_elem); // Ne < Nn
984 
985  const unsigned int our_ny = dim>1 ? ny : 1;
986  const unsigned int our_nz = dim>2 ? nz : 1;
987 
988  dof_id_type min_n_elem = nx * our_ny * our_nz;
989  CPPUNIT_ASSERT_LESSEQUAL(n_true_elem, min_n_elem); // "backwards" API...
990 
991  for (const auto & elem : mesh.active_local_element_ptr_range())
992  {
993  for (auto s : make_range(elem->n_sides()))
994  if (!elem->neighbor_ptr(s) || elem->neighbor_ptr(s)->id() < elem->id())
995  {
996  ++n_fake_elem;
997  auto side = elem->build_side_ptr(s);
998  n_fake_nodes += side->n_nodes();
999  }
1000  }
1001  mesh.comm().sum(n_fake_elem);
1002  mesh.comm().sum(n_fake_nodes);
1003 
1004  const dof_id_type expected_fakes = [elem_type]() {
1005  switch (elem_type)
1006  {
1007  case EDGE3:
1008  return nx+1;
1009  case TRI6:
1010  return 3*nx*ny + nx + ny;
1011  case QUAD8:
1012  case QUAD9:
1013  return 2*nx*ny + nx + ny;
1014  case TET14:
1015  return 48*nx*ny*nz + 4*(nx*ny+nx*nz+ny*nz);
1016  case HEX27:
1017  return 3*nx*ny*nz + nx*ny + nx*nz + ny*nz;
1018  default:
1019  libmesh_error();
1020  }
1021  } (); // Invoke anonymous lambda
1022 
1023  CPPUNIT_ASSERT_EQUAL(n_fake_elem, expected_fakes); // "backwards" API...
1024 
1025  es.init();
1026  sys.project_solution(exact_sol, nullptr,
1027  es.parameters);
1028 
1029  // Set solution u^e_i = i, for the ith vertex of a given element e.
1030 
1031  // Now write to file.
1032  ExodusII_IO exii(mesh);
1033  exii.write_added_sides(true);
1034 
1035  if (write_discontinuous)
1036  exii.write_discontinuous_equation_systems(filename, es);
1037  else
1038  exii.write_equation_systems(filename, es);
1039  } // end first scope
1040 
1041  // second scope: read file, verify extra elements exist
1042  {
1044  mesh.allow_renumbering(false);
1045 
1046  ExodusII_IO exii(mesh);
1047 
1048  if (mesh.processor_id() == 0)
1049  exii.read(filename);
1052 
1053  CPPUNIT_ASSERT_EQUAL(mesh.n_elem(), n_true_elem + n_fake_elem);
1054  if (write_discontinuous)
1055  {
1056  const dof_id_type nodes_per_elem = Elem::build(elem_type)->n_nodes();
1057  CPPUNIT_ASSERT_EQUAL(mesh.n_nodes(),
1058  n_true_elem*nodes_per_elem + n_fake_nodes);
1059  }
1060  else
1061  CPPUNIT_ASSERT_EQUAL(mesh.n_nodes(), n_true_nodes + n_fake_nodes);
1062 
1063  EquationSystems es(mesh);
1064  System & sys = es.add_system<System> ("SimpleSystem");
1065  // Read back into a LAGRANGE variable for testing; we still
1066  // can't use Exodus for a proper restart.
1067  sys.add_variable("ul", SECOND);
1068  es.init();
1069 
1070  const DofMap & dof_map = sys.get_dof_map();
1071 
1072 #ifdef LIBMESH_USE_COMPLEX_NUMBERS
1073  exii.copy_nodal_solution(sys, "ul", "r_u");
1074 #else
1075  exii.copy_nodal_solution(sys, "ul", "u");
1076 #endif
1077 
1078  dof_id_type n_side_nodes = 0;
1079  const std::string nullstr;
1080  const std::string facestr = "face";
1081 
1082  // Debugging this in parallel is tricky. Let's make sure that
1083  // if we have a failure on one rank we see it on all the others
1084  // and we can go on to other tests.
1085 #ifdef LIBMESH_ENABLE_EXCEPTIONS
1086  bool threw_exception = false;
1087  try
1088 #endif // LIBMESH_ENABLE_EXCEPTIONS
1089  {
1090  for (const auto & elem : mesh.active_local_element_ptr_range())
1091  {
1092  // Just look at side elements, not interiors
1093  if (elem->dim() == dim)
1094  continue;
1095 
1096  std::vector<dof_id_type> dof_indices;
1097  dof_map.dof_indices(elem, dof_indices, 0);
1098 
1099  // Find what face direction we're looking at, to
1100  // disambiguate when testing against a discontinuous
1101  // function, since we're evaluating on nodes that overlap
1102  // multiple faces
1103  const Point normal = [elem](){
1104  if (elem->dim() == 2)
1105  return Point((elem->point(1) - elem->point(0)).cross
1106  (elem->point(2) - elem->point(0)));
1107  else if (elem->dim() == 1)
1108  return Point
1109  (elem->point(1)(1)-elem->point(0)(1),
1110  elem->point(0)(0)-elem->point(1)(0));
1111  else
1112  return Point(1);
1113  } (); // Invoke anonymous lambda
1114 
1115  short faceval = -1;
1116  if (is_tensor)
1117  {
1118  if (std::abs(normal(0)) > TOLERANCE)
1119  {
1120  faceval = 0;
1121  libmesh_assert_less(std::abs(normal(1)), TOLERANCE);
1122  libmesh_assert_less(std::abs(normal(2)), TOLERANCE);
1123  }
1124  else if (std::abs(normal(1)) > TOLERANCE)
1125  {
1126  faceval = 1;
1127  libmesh_assert_less(std::abs(normal(2)), TOLERANCE);
1128  }
1129  else
1130  {
1131  faceval = 2;
1132  libmesh_assert_greater(std::abs(normal(2)), TOLERANCE);
1133  }
1134  libmesh_assert_greater_equal(faceval, 0);
1135  es.parameters.set<short>(facestr) = faceval;
1136  }
1137 
1138  for (auto i : index_range(dof_indices))
1139  {
1140  const Point node_pt = elem->point(i);
1141  const Real nodal_coef =
1142  libmesh_real((*sys.current_local_solution)(dof_indices[i]));
1143  const Real exact_val =
1144  libmesh_real(exact_sol
1145  (node_pt, es.parameters, nullstr,
1146  nullstr));
1147  LIBMESH_ASSERT_FP_EQUAL
1148  (nodal_coef, exact_val,
1149  std::max(Real(2),nodal_coef+exact_val)*
1151  ++n_side_nodes;
1152  }
1153  }
1154  }
1155 #ifdef LIBMESH_ENABLE_EXCEPTIONS
1156  catch (...)
1157  {
1158  threw_exception = true;
1159  TestCommWorld->max(threw_exception);
1160  throw;
1161  }
1162  if (!threw_exception)
1163  TestCommWorld->max(threw_exception);
1164  CPPUNIT_ASSERT(!threw_exception);
1165 #endif // LIBMESH_ENABLE_EXCEPTIONS
1166 
1167  TestCommWorld->sum(n_side_nodes);
1168  CPPUNIT_ASSERT_EQUAL(n_side_nodes, n_fake_nodes);
1169  } // end second scope
1170  } // end testExodusWriteAddedSides
T libmesh_real(T a)
This is the EquationSystems class.
void allow_renumbering(bool allow)
If false is passed in then this mesh will no longer be renumbered when being prepared for use...
Definition: mesh_base.h:1173
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
Fills the vector di with the global degree of freedom indices for the element.
Definition: dof_map.C:1992
libMesh::Parallel::Communicator * TestCommWorld
Definition: driver.C:159
static constexpr Real TOLERANCE
unsigned int dim
The ExodusII_IO class implements reading meshes in the ExodusII file format from Sandia National Labs...
Definition: exodusII_io.h:52
void prepare_for_use(const bool skip_renumber_nodes_and_elements, const bool skip_find_neighbors)
Prepare a newly ecreated (or read) mesh for use.
Definition: mesh_base.C:710
void sum(T &r) const
MeshBase & mesh
const Parallel::Communicator & comm() const
void build_square(UnstructuredMesh &mesh, const unsigned int nx, const unsigned int ny, const Real xmin=0., const Real xmax=1., const Real ymin=0., const Real ymax=1., const ElemType type=INVALID_ELEM, const bool gauss_lobatto_grid=false)
A specialized build_cube() for 2D meshes.
ADRealEigenVector< T, D, asd > sqrt(const ADRealEigenVector< T, D, asd > &)
Definition: type_vector.h:53
ADRealEigenVector< T, D, asd > abs(const ADRealEigenVector< T, D, asd > &)
Definition: type_vector.h:57
This class handles the numbering of degrees of freedom on a mesh.
Definition: dof_map.h:169
void project_solution(FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr) const
Projects arbitrary functions onto the current solution.
This is the MeshCommunication class.
Manages consistently variables, degrees of freedom, and coefficient vectors.
Definition: system.h:96
unsigned int add_variable(std::string_view var, const FEType &type, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
Adds the variable var to the list of variables for this system.
Definition: system.C:1305
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void max(const T &r, T &o, Request &req) const
constexpr int added_sides_nxyz[]
Definition: mesh_input.C:50
void broadcast(MeshBase &) const
Finds all the processors that may contain elements that neighbor my elements.
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...
Definition: int_range.h:134
std::unique_ptr< NumericVector< Number > > current_local_solution
All the values I need to compute my contribution to the simulation at hand.
Definition: system.h:1585
void build_line(UnstructuredMesh &mesh, const unsigned int nx, const Real xmin=0., const Real xmax=1., const ElemType type=INVALID_ELEM, const bool gauss_lobatto_grid=false)
A specialized build_cube() for 1D meshes.
virtual dof_id_type n_elem() const =0
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
Definition: mesh.h:50
processor_id_type processor_id() const
const DofMap & get_dof_map() const
Definition: system.h:2293
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:39
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition: int_range.h:111
void build_cube(UnstructuredMesh &mesh, const unsigned int nx=0, const unsigned int ny=0, const unsigned int nz=0, const Real xmin=0., const Real xmax=1., const Real ymin=0., const Real ymax=1., const Real zmin=0., const Real zmax=1., const ElemType type=INVALID_ELEM, const bool gauss_lobatto_grid=false)
Builds a (elements) cube.
virtual dof_id_type n_nodes() const =0
uint8_t dof_id_type
Definition: id_types.h:67

◆ testExodusWriteAddedSidesEdgeC0()

void MeshInputTest::testExodusWriteAddedSidesEdgeC0 ( )
inline

Definition at line 1172 of file mesh_input.C.

References libMesh::EDGE3, libMesh::FIRST, libMesh::SECOND, and six_x_plus_sixty_y().

1173  {
1176  }
Number six_x_plus_sixty_y(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition: mesh_input.C:27
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930

◆ testExodusWriteAddedSidesEdgeDisc()

void MeshInputTest::testExodusWriteAddedSidesEdgeDisc ( )
inline

Definition at line 1196 of file mesh_input.C.

References designed_for_side_elems(), libMesh::EDGE3, and libMesh::SECOND.

1197  {
1199  }
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930
Number designed_for_side_elems(const Point &p, const Parameters &param, const std::string &, const std::string &)
Definition: mesh_input.C:52

◆ testExodusWriteAddedSidesHexC0()

void MeshInputTest::testExodusWriteAddedSidesHexC0 ( )
inline

Definition at line 1296 of file mesh_input.C.

References libMesh::FIRST, libMesh::HEX27, libMesh::SECOND, and six_x_plus_sixty_y().

1297  {
1300  }
Number six_x_plus_sixty_y(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition: mesh_input.C:27
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930

◆ testExodusWriteAddedSidesHexDisc()

void MeshInputTest::testExodusWriteAddedSidesHexDisc ( )
inline

Definition at line 1320 of file mesh_input.C.

References designed_for_side_elems(), libMesh::HEX27, and libMesh::SECOND.

1321  {
1323  }
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930
Number designed_for_side_elems(const Point &p, const Parameters &param, const std::string &, const std::string &)
Definition: mesh_input.C:52

◆ testExodusWriteAddedSidesMixedEdgeC0()

void MeshInputTest::testExodusWriteAddedSidesMixedEdgeC0 ( )
inline

Definition at line 1184 of file mesh_input.C.

References libMesh::EDGE3, libMesh::FIRST, libMesh::LAGRANGE, libMesh::SECOND, and six_x_plus_sixty_y().

1185  {
1188  }
Number six_x_plus_sixty_y(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition: mesh_input.C:27
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930

◆ testExodusWriteAddedSidesMixedHexC0()

void MeshInputTest::testExodusWriteAddedSidesMixedHexC0 ( )
inline

Definition at line 1308 of file mesh_input.C.

References libMesh::FIRST, libMesh::HEX27, libMesh::HIERARCHIC, libMesh::LAGRANGE, libMesh::SECOND, and six_x_plus_sixty_y().

1309  {
1312  }
Number six_x_plus_sixty_y(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition: mesh_input.C:27
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930

◆ testExodusWriteAddedSidesMixedQuadC0()

void MeshInputTest::testExodusWriteAddedSidesMixedQuadC0 ( )
inline

Definition at line 1252 of file mesh_input.C.

References libMesh::FIRST, libMesh::LAGRANGE, libMesh::QUAD9, libMesh::SECOND, and six_x_plus_sixty_y().

1253  {
1256  }
Number six_x_plus_sixty_y(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition: mesh_input.C:27
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930

◆ testExodusWriteAddedSidesMixedTriC0()

void MeshInputTest::testExodusWriteAddedSidesMixedTriC0 ( )
inline

Definition at line 1218 of file mesh_input.C.

References libMesh::FIRST, libMesh::HIERARCHIC, libMesh::SECOND, six_x_plus_sixty_y(), libMesh::SZABAB, and libMesh::TRI6.

1219  {
1222  }
Number six_x_plus_sixty_y(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition: mesh_input.C:27
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930

◆ testExodusWriteAddedSidesQuadC0()

void MeshInputTest::testExodusWriteAddedSidesQuadC0 ( )
inline

Definition at line 1240 of file mesh_input.C.

References libMesh::FIRST, libMesh::QUAD9, libMesh::SECOND, and six_x_plus_sixty_y().

1241  {
1244  }
Number six_x_plus_sixty_y(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition: mesh_input.C:27
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930

◆ testExodusWriteAddedSidesQuadDisc()

void MeshInputTest::testExodusWriteAddedSidesQuadDisc ( )
inline

Definition at line 1264 of file mesh_input.C.

References designed_for_side_elems(), libMesh::QUAD9, and libMesh::SECOND.

1265  {
1267  }
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930
Number designed_for_side_elems(const Point &p, const Parameters &param, const std::string &, const std::string &)
Definition: mesh_input.C:52

◆ testExodusWriteAddedSidesTetC0()

void MeshInputTest::testExodusWriteAddedSidesTetC0 ( )
inline

Definition at line 1274 of file mesh_input.C.

References libMesh::FIRST, libMesh::SECOND, six_x_plus_sixty_y(), and libMesh::TET14.

1275  {
1278  }
Number six_x_plus_sixty_y(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition: mesh_input.C:27
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930

◆ testExodusWriteAddedSidesTetDisc()

void MeshInputTest::testExodusWriteAddedSidesTetDisc ( )
inline

Definition at line 1286 of file mesh_input.C.

References designed_for_side_elems(), libMesh::SECOND, and libMesh::TET14.

1287  {
1289  }
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930
Number designed_for_side_elems(const Point &p, const Parameters &param, const std::string &, const std::string &)
Definition: mesh_input.C:52

◆ testExodusWriteAddedSidesTriC0()

void MeshInputTest::testExodusWriteAddedSidesTriC0 ( )
inline

Definition at line 1206 of file mesh_input.C.

References libMesh::FIRST, libMesh::SECOND, six_x_plus_sixty_y(), and libMesh::TRI6.

1207  {
1210  }
Number six_x_plus_sixty_y(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition: mesh_input.C:27
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930

◆ testExodusWriteAddedSidesTriDisc()

void MeshInputTest::testExodusWriteAddedSidesTriDisc ( )
inline

Definition at line 1230 of file mesh_input.C.

References designed_for_side_elems(), libMesh::SECOND, and libMesh::TRI6.

1231  {
1233  }
void testExodusWriteAddedSides(Number(*exact_sol)(const Point &, const Parameters &, const std::string &, const std::string &), const ElemType elem_type, const Order order, const bool write_discontinuous=false, const std::vector< FEType > earlier_vars={}, const std::vector< FEType > later_vars={})
Definition: mesh_input.C:930
Number designed_for_side_elems(const Point &p, const Parameters &param, const std::string &, const std::string &)
Definition: mesh_input.C:52

◆ testExodusWriteElementDataFromDiscontinuousNodalData()

void MeshInputTest::testExodusWriteElementDataFromDiscontinuousNodalData ( )
inline

Definition at line 843 of file mesh_input.C.

References libMesh::EquationSystems::add_system(), libMesh::System::add_variable(), libMesh::MeshCommunication::broadcast(), libMesh::MeshTools::Generation::build_cube(), libMesh::CONSTANT, libMesh::ExodusII_IO::copy_elemental_solution(), libMesh::DofMap::dof_indices(), libMesh::FIRST, libMesh::System::get_dof_map(), libMesh::HEX8, libMesh::index_range(), libMesh::EquationSystems::init(), libMesh::L2_LAGRANGE, mesh, libMesh::MONOMIAL, libMesh::System::point_value(), libMesh::MeshBase::prepare_for_use(), libMesh::ParallelObject::processor_id(), libMesh::ExodusII_IO::read(), libMesh::Real, libMesh::System::solution, TestCommWorld, libMesh::TOLERANCE, libMesh::System::variable_name(), libMesh::ExodusII_IO::write_element_data_from_discontinuous_nodal_data(), and libMesh::MeshOutput< MT >::write_equation_systems().

844  {
845  LOG_UNIT_TEST;
846 
847  // first scope: write file
848  {
850 
851  EquationSystems es(mesh);
852  System & sys = es.add_system<System> ("SimpleSystem");
853  sys.add_variable("u", FIRST, L2_LAGRANGE);
854 
856  (mesh, 2, 2, 2, 0., 1., 0., 1., 0., 1., HEX8);
857 
858  es.init();
859 
860  // Set solution u^e_i = i, for the ith vertex of a given element e.
861  const DofMap & dof_map = sys.get_dof_map();
862  std::vector<dof_id_type> dof_indices;
863  for (const auto & elem : mesh.element_ptr_range())
864  {
865  dof_map.dof_indices(elem, dof_indices, /*var_id=*/0);
866  for (unsigned int i=0; i<dof_indices.size(); ++i)
867  sys.solution->set(dof_indices[i], i);
868  }
869  sys.solution->close();
870 
871  // Now write to file.
872  ExodusII_IO exii(mesh);
873 
874  // Don't try to write element data as averaged nodal data.
875  std::set<std::string> sys_list;
876  exii.write_equation_systems("elemental_from_nodal.e", es, &sys_list);
877 
878  // Write one elemental data field per vertex value.
879  sys_list = {"SimpleSystem"};
880 
881  exii.write_element_data_from_discontinuous_nodal_data
882  (es, &sys_list, /*var_suffix=*/"_elem_corner_");
883  } // end first scope
884 
885  // second scope: read values back in, verify they are correct.
886  {
887  std::vector<std::string> file_var_names =
888  {"u_elem_corner_0",
889  "u_elem_corner_1",
890  "u_elem_corner_2",
891  "u_elem_corner_3"};
892  std::vector<Real> expected_values = {0., 1., 2., 3.};
893 
894  // copy_elemental_solution currently requires ReplicatedMesh
896 
897  EquationSystems es(mesh);
898  System & sys = es.add_system<System> ("SimpleSystem");
899  for (auto i : index_range(file_var_names))
900  sys.add_variable(file_var_names[i], CONSTANT, MONOMIAL);
901 
902  ExodusII_IO exii(mesh);
903 
904  if (mesh.processor_id() == 0)
905  exii.read("elemental_from_nodal.e");
908 
909  es.init();
910 
911  for (auto i : index_range(file_var_names))
912  exii.copy_elemental_solution
913  (sys, sys.variable_name(i), file_var_names[i]);
914 
915  // Check that the values we read back in are as expected.
916  for (const auto & elem : mesh.active_element_ptr_range())
917  for (auto i : index_range(file_var_names))
918  {
919  Real read_val = sys.point_value(i, elem->vertex_average());
920  LIBMESH_ASSERT_FP_EQUAL
921  (expected_values[i], read_val, TOLERANCE*TOLERANCE);
922  }
923  } // end second scope
924  } // end testExodusWriteElementDataFromDiscontinuousNodalData
This is the EquationSystems class.
The ReplicatedMesh class is derived from the MeshBase class, and is used to store identical copies of...
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
Fills the vector di with the global degree of freedom indices for the element.
Definition: dof_map.C:1992
libMesh::Parallel::Communicator * TestCommWorld
Definition: driver.C:159
static constexpr Real TOLERANCE
The ExodusII_IO class implements reading meshes in the ExodusII file format from Sandia National Labs...
Definition: exodusII_io.h:52
void prepare_for_use(const bool skip_renumber_nodes_and_elements, const bool skip_find_neighbors)
Prepare a newly ecreated (or read) mesh for use.
Definition: mesh_base.C:710
MeshBase & mesh
Number point_value(unsigned int var, const Point &p, const bool insist_on_success=true, const NumericVector< Number > *sol=nullptr) const
Definition: system.C:2369
This class handles the numbering of degrees of freedom on a mesh.
Definition: dof_map.h:169
This is the MeshCommunication class.
Manages consistently variables, degrees of freedom, and coefficient vectors.
Definition: system.h:96
std::unique_ptr< NumericVector< Number > > solution
Data structure to hold solution values.
Definition: system.h:1573
unsigned int add_variable(std::string_view var, const FEType &type, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
Adds the variable var to the list of variables for this system.
Definition: system.C:1305
const std::string & variable_name(const unsigned int i) const
Definition: system.h:2397
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void broadcast(MeshBase &) const
Finds all the processors that may contain elements that neighbor my elements.
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
Definition: mesh.h:50
processor_id_type processor_id() const
const DofMap & get_dof_map() const
Definition: system.h:2293
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition: int_range.h:111
void build_cube(UnstructuredMesh &mesh, const unsigned int nx=0, const unsigned int ny=0, const unsigned int nz=0, const Real xmin=0., const Real xmax=1., const Real ymin=0., const Real ymax=1., const Real zmin=0., const Real zmax=1., const ElemType type=INVALID_ELEM, const bool gauss_lobatto_grid=false)
Builds a (elements) cube.

◆ testLowOrderEdgeBlocks()

void MeshInputTest::testLowOrderEdgeBlocks ( )
inline

Definition at line 354 of file mesh_input.C.

References libMesh::MeshCommunication::broadcast(), libMesh::BoundaryInfo::build_edge_list(), libMesh::MeshBase::get_boundary_info(), libMesh::MeshBase::is_serial(), mesh, libMesh::BoundaryInfo::n_boundary_ids(), libMesh::MeshBase::prepare_for_use(), libMesh::ParallelObject::processor_id(), libMesh::ExodusII_IO::read(), and TestCommWorld.

355  {
356  LOG_UNIT_TEST;
357 
359  ExodusII_IO exii(mesh);
360 
361  if (mesh.processor_id() == 0)
362  exii.read("meshes/mesh_with_low_order_edge_blocks.e");
363 
366 
367  // Check that we see the boundary ids we expect
369 
370  // On a ReplicatedMesh, check that the number of edge boundary
371  // conditions is as expected. The real test is that we can read
372  // this file in at all. Prior to the changes in #3491, the Exodus
373  // reader threw an exception while trying to read this mesh.
374  if (mesh.is_serial())
375  {
376  // Mesh has 26 boundary ids total (including edge and side ids).
377  // ss_prop1 = 200, 201 ;
378  // ed_prop1 = 8000, 8001, 8002, 8003, 8004, 8005, 8006, 8007, 8008, 8009, 8010,
379  // 8011, 9001, 9002, 9003, 9004, 9005, 9006, 9007, 9008, 9009, 9010,
380  // 9011, 9012 ;
381  CPPUNIT_ASSERT_EQUAL(static_cast<std::size_t>(26), bi.n_boundary_ids());
382 
383  // We can binary_search() the build_edge_list() which is sorted
384  // in lexicographical order before it's returned.
385  auto edge_list = bi.build_edge_list();
386 
387  // Search for some tuples we expect to be present
388  CPPUNIT_ASSERT(std::binary_search(edge_list.begin(), edge_list.end(), std::make_tuple(4, 1, 8007)));
389  CPPUNIT_ASSERT(std::binary_search(edge_list.begin(), edge_list.end(), std::make_tuple(10, 6, 8001)));
390 
391  // And make sure we don't have entries we shouldn't have
392  CPPUNIT_ASSERT(!std::binary_search(edge_list.begin(), edge_list.end(), std::make_tuple(1, 8, 8009)));
393  CPPUNIT_ASSERT(!std::binary_search(edge_list.begin(), edge_list.end(), std::make_tuple(2, 10, 9011)));
394  }
395  }
libMesh::Parallel::Communicator * TestCommWorld
Definition: driver.C:159
The ExodusII_IO class implements reading meshes in the ExodusII file format from Sandia National Labs...
Definition: exodusII_io.h:52
void prepare_for_use(const bool skip_renumber_nodes_and_elements, const bool skip_find_neighbors)
Prepare a newly ecreated (or read) mesh for use.
Definition: mesh_base.C:710
MeshBase & mesh
const BoundaryInfo & get_boundary_info() const
The information about boundary ids on the mesh.
Definition: mesh_base.h:159
std::size_t n_boundary_ids() const
virtual bool is_serial() const
Definition: mesh_base.h:205
This is the MeshCommunication class.
The BoundaryInfo class contains information relevant to boundary conditions including storing faces...
Definition: boundary_info.h:57
void build_edge_list(std::vector< dof_id_type > &element_id_list, std::vector< unsigned short int > &edge_list, std::vector< boundary_id_type > &bc_id_list) const
Creates a list of element numbers, edges, and boundary ids for those edges.
void broadcast(MeshBase &) const
Finds all the processors that may contain elements that neighbor my elements.
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
Definition: mesh.h:50
processor_id_type processor_id() const

◆ testMasterCenters()

void MeshInputTest::testMasterCenters ( const MeshBase mesh)
inline

Definition at line 1367 of file mesh_input.C.

References libMesh::FEMap::inverse_map(), libMesh::FEMap::map(), mesh, libMesh::TensorTools::norm(), libMesh::MeshBase::sub_point_locator(), and libMesh::TOLERANCE.

1368  {
1369  auto locator = mesh.sub_point_locator();
1370 
1371  for (auto & elem : mesh.element_ptr_range())
1372  {
1373  Point master_pt = {}; // center, for tensor product elements
1374 
1375  // But perturb it to try and trigger any mapping weirdness
1376  if (elem->dim() > 0)
1377  master_pt(0) = 0.25;
1378 
1379  if (elem->dim() > 1)
1380  master_pt(1) = -0.25;
1381 
1382  if (elem->dim() > 2)
1383  master_pt(2) = 0.75;
1384 
1385  Point physical_pt = FEMap::map(elem->dim(), elem, master_pt);
1386 
1387  Point inverse_pt = FEMap::inverse_map(elem->dim(), elem,
1388  physical_pt);
1389 
1390  CPPUNIT_ASSERT((inverse_pt-master_pt).norm() < TOLERANCE);
1391 
1392  CPPUNIT_ASSERT(elem->contains_point(physical_pt));
1393 
1394  // We only want to find elements in the same block
1395  std::set<subdomain_id_type> my_subdomain { elem->subdomain_id() };
1396 
1397  // We can *still* have overlapping NodeElem from a slit mesh
1398  // input file; better check them all
1399  std::set<const Elem * > located_elems;
1400  (*locator)(physical_pt, located_elems, &my_subdomain);
1401 
1402  CPPUNIT_ASSERT(located_elems.count(elem));
1403  }
1404  }
std::unique_ptr< PointLocatorBase > sub_point_locator() const
Definition: mesh_base.C:1565
static constexpr Real TOLERANCE
MeshBase & mesh
auto norm(const T &a) -> decltype(std::abs(a))
Definition: tensor_tools.h:74
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:39

◆ testNemesisCopyElementSolutionDistributed()

void MeshInputTest::testNemesisCopyElementSolutionDistributed ( )
inline

Definition at line 657 of file mesh_input.C.

658  { LOG_UNIT_TEST; testCopyElementSolutionImpl<DistributedMesh,Nemesis_IO>("dist_with_elem_soln.nem"); }

◆ testNemesisCopyElementSolutionReplicated()

void MeshInputTest::testNemesisCopyElementSolutionReplicated ( )
inline

Definition at line 654 of file mesh_input.C.

655  { LOG_UNIT_TEST; testCopyElementSolutionImpl<ReplicatedMesh,Nemesis_IO>("repl_with_elem_soln.nem"); }

◆ testNemesisCopyElementVectorDistributed()

void MeshInputTest::testNemesisCopyElementVectorDistributed ( )
inline

Definition at line 838 of file mesh_input.C.

839  { LOG_UNIT_TEST; testCopyElementVectorImpl<DistributedMesh,Nemesis_IO>("dist_with_elem_vec.nem"); }

◆ testNemesisCopyElementVectorReplicated()

void MeshInputTest::testNemesisCopyElementVectorReplicated ( )
inline

Definition at line 835 of file mesh_input.C.

836  { LOG_UNIT_TEST; testCopyElementVectorImpl<ReplicatedMesh,Nemesis_IO>("repl_with_elem_vec.nem"); }

◆ testNemesisCopyNodalSolutionDistributed()

void MeshInputTest::testNemesisCopyNodalSolutionDistributed ( )
inline

Definition at line 567 of file mesh_input.C.

568  { LOG_UNIT_TEST; testCopyNodalSolutionImpl<DistributedMesh,Nemesis_IO>("dist_with_nodal_soln.nem"); }

◆ testNemesisCopyNodalSolutionReplicated()

void MeshInputTest::testNemesisCopyNodalSolutionReplicated ( )
inline

Definition at line 564 of file mesh_input.C.

565  { LOG_UNIT_TEST; testCopyNodalSolutionImpl<ReplicatedMesh,Nemesis_IO>("repl_with_nodal_soln.nem"); }

◆ testNemesisReadDistributed()

void MeshInputTest::testNemesisReadDistributed ( )
inline

Definition at line 1362 of file mesh_input.C.

1363  { LOG_UNIT_TEST; testNemesisReadImpl<DistributedMesh>(); }

◆ testNemesisReadImpl()

template<typename MeshType >
void MeshInputTest::testNemesisReadImpl ( )
inline

Definition at line 1335 of file mesh_input.C.

References TIMPI::Communicator::barrier(), libMesh::MeshTools::Generation::build_square(), mesh, libMesh::MeshBase::n_elem(), libMesh::MeshBase::n_nodes(), libMesh::MeshBase::prepare_for_use(), libMesh::Nemesis_IO::read(), TestCommWorld, and libMesh::MeshBase::write().

1336  {
1337  // first scope: write file
1338  {
1339  MeshType mesh(*TestCommWorld);
1340  MeshTools::Generation::build_square (mesh, 3, 3, 0., 1., 0., 1.);
1341  mesh.write("test_nemesis_read.nem");
1342  }
1343 
1344  // Make sure that the writing is done before the reading starts.
1346 
1347  // second scope: read file
1348  {
1349  MeshType mesh(*TestCommWorld);
1350  Nemesis_IO nem(mesh);
1351 
1352  nem.read("test_nemesis_read.nem");
1354  CPPUNIT_ASSERT_EQUAL(mesh.n_elem(), static_cast<dof_id_type>(9));
1355  CPPUNIT_ASSERT_EQUAL(mesh.n_nodes(), static_cast<dof_id_type>(16));
1356  }
1357  }
libMesh::Parallel::Communicator * TestCommWorld
Definition: driver.C:159
void prepare_for_use(const bool skip_renumber_nodes_and_elements, const bool skip_find_neighbors)
Prepare a newly ecreated (or read) mesh for use.
Definition: mesh_base.C:710
void barrier() const
MeshBase & mesh
void build_square(UnstructuredMesh &mesh, const unsigned int nx, const unsigned int ny, const Real xmin=0., const Real xmax=1., const Real ymin=0., const Real ymax=1., const ElemType type=INVALID_ELEM, const bool gauss_lobatto_grid=false)
A specialized build_cube() for 2D meshes.
The Nemesis_IO class implements reading parallel meshes in the Nemesis file format from Sandia Nation...
Definition: nemesis_io.h:51
virtual void write(const std::string &name)=0
virtual dof_id_type n_elem() const =0
virtual dof_id_type n_nodes() const =0
uint8_t dof_id_type
Definition: id_types.h:67

◆ testNemesisReadReplicated()

void MeshInputTest::testNemesisReadReplicated ( )
inline

Definition at line 1359 of file mesh_input.C.

1360  { LOG_UNIT_TEST; testNemesisReadImpl<ReplicatedMesh>(); }

◆ testNemesisSingleElementDistributed()

void MeshInputTest::testNemesisSingleElementDistributed ( )
inline

Definition at line 718 of file mesh_input.C.

719  { LOG_UNIT_TEST; testSingleElementImpl<DistributedMesh,Nemesis_IO>("dist_with_single_elem.nem"); }

◆ testNemesisSingleElementReplicated()

void MeshInputTest::testNemesisSingleElementReplicated ( )
inline

Definition at line 715 of file mesh_input.C.

716  { LOG_UNIT_TEST; testSingleElementImpl<ReplicatedMesh,Nemesis_IO>("repl_with_single_elem.nem"); }

◆ testProjectionRegression()

void MeshInputTest::testProjectionRegression ( MeshBase mesh,
std::array< Real, 4 >  expected_norms 
)
inline

Definition at line 1633 of file mesh_input.C.

References libMesh::EquationSystems::add_system(), libMesh::System::add_variable(), libMesh::System::calculate_norm(), libMesh::MeshBase::clone(), libMesh::H1_SEMINORM, libMesh::EquationSystems::init(), libMesh::L2, libMesh::L_INF, TIMPI::Communicator::max(), mesh, libMesh::EquationSystems::parameters, libMesh::System::project_solution(), libMesh::RATIONAL_BERNSTEIN, libMesh::Real, sin_x_plus_cos_y(), libMesh::System::solution, TestCommWorld, libMesh::TOLERANCE, and libMesh::W1_INF_SEMINORM.

1634  {
1635  int order = 0;
1636  for (const auto elem : mesh.element_ptr_range())
1637  order = std::max(order, int(elem->default_order()));
1638  TestCommWorld->max(order);
1639  CPPUNIT_ASSERT (order > 0);
1640 
1641  // Let's test that IGA constraints are preserved (in a relative
1642  // sense) when we clone a mesh.
1643  std::unique_ptr<MeshBase> mesh_clone = mesh.clone();
1644  CPPUNIT_ASSERT(*mesh_clone == mesh);
1645 
1646  EquationSystems es(mesh);
1647  System &sys = es.add_system<System> ("SimpleSystem");
1648  sys.add_variable("n", Order(order), RATIONAL_BERNSTEIN);
1649 
1650  es.init();
1651 
1652  sys.project_solution(sin_x_plus_cos_y, nullptr, es.parameters);
1653 
1654  // Make this easy to tweak in the future
1655  const double my_tolerance = TOLERANCE;
1656 
1657  // Calculate some norms, skipping the spline points, and compare
1658  // to regression standard values
1659  std::set<unsigned int> skip_dimensions {0};
1660  const Real L2_norm =
1661  sys.calculate_norm(*sys.solution, 0, L2, &skip_dimensions);
1662 // std::cout.precision(16);
1663 // std::cout << "L2_norm = " << L2_norm << std::endl;
1664  LIBMESH_ASSERT_FP_EQUAL(L2_norm, expected_norms[0], my_tolerance);
1665  const Real Linf_norm =
1666  sys.calculate_norm(*sys.solution, 0, L_INF, &skip_dimensions);
1667 // std::cout << "Linf_norm = " << Linf_norm << std::endl;
1668  LIBMESH_ASSERT_FP_EQUAL(Linf_norm, expected_norms[1], my_tolerance);
1669  const Real H1_norm =
1670  sys.calculate_norm(*sys.solution, 0, H1_SEMINORM, &skip_dimensions);
1671 // std::cout << "H1_norm = " << H1_norm << std::endl;
1672  LIBMESH_ASSERT_FP_EQUAL(H1_norm, expected_norms[2], my_tolerance);
1673  const Real W1inf_norm =
1674  sys.calculate_norm(*sys.solution, 0, W1_INF_SEMINORM, &skip_dimensions);
1675 // std::cout << "W1inf_norm = " << W1inf_norm << std::endl;
1676  // W1_inf seems more sensitive to FP error...
1677  LIBMESH_ASSERT_FP_EQUAL(W1inf_norm, expected_norms[3], 10*my_tolerance);
1678  }
This is the EquationSystems class.
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
libMesh::Parallel::Communicator * TestCommWorld
Definition: driver.C:159
static constexpr Real TOLERANCE
MeshBase & mesh
virtual std::unique_ptr< MeshBase > clone() const =0
Virtual "copy constructor".
void project_solution(FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr) const
Projects arbitrary functions onto the current solution.
Manages consistently variables, degrees of freedom, and coefficient vectors.
Definition: system.h:96
std::unique_ptr< NumericVector< Number > > solution
Data structure to hold solution values.
Definition: system.h:1573
Real calculate_norm(const NumericVector< Number > &v, unsigned int var, FEMNormType norm_type, std::set< unsigned int > *skip_dimensions=nullptr) const
Definition: system.C:1672
unsigned int add_variable(std::string_view var, const FEType &type, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
Adds the variable var to the list of variables for this system.
Definition: system.C:1305
Number sin_x_plus_cos_y(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition: mesh_input.C:39
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void max(const T &r, T &o, Request &req) const

◆ testSingleElementImpl()

template<typename MeshType , typename IOType >
void MeshInputTest::testSingleElementImpl ( const std::string &  filename)
inline

Definition at line 665 of file mesh_input.C.

References libMesh::EquationSystems::add_system(), libMesh::System::add_variable(), libMesh::MeshTools::Generation::build_square(), libMesh::CONSTANT, libMesh::Nemesis_IO::copy_elemental_solution(), libMesh::EquationSystems::init(), libMesh::MeshInput< MT >::is_parallel_format(), libMesh::libmesh_real(), mesh, libMesh::MONOMIAL, libMesh::EquationSystems::parameters, libMesh::MeshBase::prepare_for_use(), libMesh::ParallelObject::processor_id(), libMesh::Nemesis_IO::read(), libMesh::Real, six_x_plus_sixty_y(), TestCommWorld, libMesh::Nemesis_IO::write_element_data(), and libMesh::MeshOutput< MT >::write_equation_systems().

666  {
667  {
668  // Generate a single 1x1 square element mesh
669  MeshType mesh(*TestCommWorld);
671 
672  EquationSystems es(mesh);
673  auto & sys = es.add_system<System>("SimpleSystem");
674  sys.add_variable("e", CONSTANT, MONOMIAL);
675 
676  // Set an arbitrary solution for the single element DOF
677  es.init();
678  sys.project_solution(six_x_plus_sixty_y, nullptr, es.parameters);
679 
680  // Write the solution to Nemesis file(s) - only proc 0 should have anything to write!
681  Nemesis_IO nem_io(mesh);
682  std::set<std::string> sys_list;
683  nem_io.write_equation_systems(filename, es, &sys_list);
684  nem_io.write_element_data(es);
685  }
686 
687  // If we can read and copy the correct element value back into the mesh, we know the Nemesis
688  // file(s) were written properly.
689  {
690  MeshType mesh(*TestCommWorld);
691  EquationSystems es(mesh);
692  auto & sys = es.add_system<System>("SimpleSystem");
693  sys.add_variable("teste", CONSTANT, MONOMIAL);
694 
695  Nemesis_IO nem_io(mesh);
696  if (mesh.processor_id() == 0 || nem_io.is_parallel_format())
697  nem_io.read(filename);
698 
700  es.init();
701 
702 #ifdef LIBMESH_USE_COMPLEX_NUMBERS
703  nem_io.copy_elemental_solution(sys, "teste", "r_e");
704 #else
705  nem_io.copy_elemental_solution(sys, "teste", "e");
706 #endif
707 
708  // The result should be '\frac{6 + 60}{2} = 33' at all points in the element domain
709  CPPUNIT_ASSERT_EQUAL(int(sys.solution->size()), 1);
710  CPPUNIT_ASSERT_EQUAL(libmesh_real(sys.point_value(0, Point(0.5, 0.5))), Real(33));
711  }
712  }
T libmesh_real(T a)
This is the EquationSystems class.
libMesh::Parallel::Communicator * TestCommWorld
Definition: driver.C:159
void prepare_for_use(const bool skip_renumber_nodes_and_elements, const bool skip_find_neighbors)
Prepare a newly ecreated (or read) mesh for use.
Definition: mesh_base.C:710
Number six_x_plus_sixty_y(const Point &p, const Parameters &, const std::string &, const std::string &)
Definition: mesh_input.C:27
MeshBase & mesh
void build_square(UnstructuredMesh &mesh, const unsigned int nx, const unsigned int ny, const Real xmin=0., const Real xmax=1., const Real ymin=0., const Real ymax=1., const ElemType type=INVALID_ELEM, const bool gauss_lobatto_grid=false)
A specialized build_cube() for 2D meshes.
The Nemesis_IO class implements reading parallel meshes in the Nemesis file format from Sandia Nation...
Definition: nemesis_io.h:51
Manages consistently variables, degrees of freedom, and coefficient vectors.
Definition: system.h:96
unsigned int add_variable(std::string_view var, const FEType &type, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
Adds the variable var to the list of variables for this system.
Definition: system.C:1305
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
processor_id_type processor_id() const
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:39

◆ testTetgenIO()

void MeshInputTest::testTetgenIO ( )
inline

Definition at line 1507 of file mesh_input.C.

References libMesh::MeshCommunication::broadcast(), libMesh::ParallelObject::comm(), libMesh::MeshBase::is_serial(), TIMPI::Communicator::max(), mesh, libMesh::MeshBase::n_elem(), libMesh::MeshBase::n_nodes(), libMesh::MeshBase::prepare_for_use(), libMesh::ParallelObject::processor_id(), libMesh::MeshBase::query_elem_ptr(), libMesh::TetGenIO::read(), libMesh::Real, TestCommWorld, libMesh::TOLERANCE, and libMesh::Elem::volume().

1508  {
1509 #ifdef LIBMESH_HAVE_TETGEN
1510  LOG_UNIT_TEST;
1511 
1513 
1514  TetGenIO tetgen_io(mesh);
1515 
1516  if (mesh.processor_id() == 0)
1517  tetgen_io.read("meshes/tetgen_one_tet10.ele");
1519 
1521 
1522  // Mesh should contain 1 TET10 finite element
1523  CPPUNIT_ASSERT_EQUAL(mesh.n_elem(), static_cast<dof_id_type>(1));
1524  CPPUNIT_ASSERT_EQUAL(mesh.n_nodes(), static_cast<dof_id_type>(10));
1525 
1526  // Element should have TET10 reference element volume
1527  const Elem * const elem = mesh.query_elem_ptr(0);
1528 
1529  // On a serial mesh we have every element everywhere
1530  if (mesh.is_serial())
1531  CPPUNIT_ASSERT(elem);
1532  else
1533  {
1534  bool have_elem = elem;
1535  mesh.comm().max(have_elem);
1536  CPPUNIT_ASSERT(have_elem);
1537  }
1538 
1539  if (elem)
1540  {
1541  const Real vol = elem->volume();
1542  CPPUNIT_ASSERT_DOUBLES_EQUAL(vol, 1./6, TOLERANCE*TOLERANCE);
1543  }
1544 #endif
1545  }
libMesh::Parallel::Communicator * TestCommWorld
Definition: driver.C:159
static constexpr Real TOLERANCE
void prepare_for_use(const bool skip_renumber_nodes_and_elements, const bool skip_find_neighbors)
Prepare a newly ecreated (or read) mesh for use.
Definition: mesh_base.C:710
This is the base class from which all geometric element types are derived.
Definition: elem.h:94
MeshBase & mesh
const Parallel::Communicator & comm() const
This class implements reading and writing meshes in the TetGen format.
Definition: tetgen_io.h:47
virtual bool is_serial() const
Definition: mesh_base.h:205
This is the MeshCommunication class.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual const Elem * query_elem_ptr(const dof_id_type i) const =0
void max(const T &r, T &o, Request &req) const
void broadcast(MeshBase &) const
Finds all the processors that may contain elements that neighbor my elements.
virtual Real volume() const
Definition: elem.C:3050
virtual dof_id_type n_elem() const =0
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
Definition: mesh.h:50
processor_id_type processor_id() const
virtual dof_id_type n_nodes() const =0
uint8_t dof_id_type
Definition: id_types.h:67

◆ testVTKPreserveElemIds()

void MeshInputTest::testVTKPreserveElemIds ( )
inline

Definition at line 210 of file mesh_input.C.

References libMesh::MeshBase::allow_renumbering(), TIMPI::Communicator::barrier(), libMesh::MeshTools::Generation::build_square(), libMesh::MeshBase::max_elem_id(), mesh, libMesh::MeshBase::n_elem(), libMesh::MeshBase::n_nodes(), libMesh::MeshBase::prepare_for_use(), libMesh::MeshBase::read(), libMesh::MeshBase::renumber_elem(), TestCommWorld, and libMesh::VTKIO::write().

211  {
212  LOG_UNIT_TEST;
213 
214  // Come up with some crazy numbering. Make all the new ids higher
215  // than the existing ids so we don't have to worry about conflicts
216  // while renumbering.
217  const dof_id_type start_id = 10;
218 
219  // first scope: write file
220  {
222  mesh.allow_renumbering(false);
223  MeshTools::Generation::build_square (mesh, 3, 3, 0., 1., 0., 1.);
224 
225  CPPUNIT_ASSERT_LESS(start_id, mesh.max_elem_id());
226  for (const auto & elem : mesh.element_ptr_range())
227  {
228  const Point center = elem->vertex_average();
229  const int xn = center(0)*3;
230  const int yn = center(1)*3;
231  const dof_id_type new_id = start_id + yn*5 + xn;
232  mesh.renumber_elem(elem->id(), new_id);
233  }
234 
235  // Explicit writer object here to be absolutely sure we get VTK
236  VTKIO vtk(mesh);
237  vtk.write("read_elem_ids_test.pvtu");
238  }
239 
240  // Make sure that the writing is done before the reading starts.
242 
243  // second scope: read file
244  {
246  mesh.allow_renumbering(false);
247 
248  mesh.read("read_elem_ids_test.pvtu");
250 
251  CPPUNIT_ASSERT_EQUAL(mesh.n_nodes(), dof_id_type(16));
252  CPPUNIT_ASSERT_EQUAL(mesh.n_elem(), dof_id_type(9));
253 
254  for (const auto & elem : mesh.element_ptr_range())
255  {
256  const Point center = elem->vertex_average();
257  const int xn = center(0)*3;
258  const int yn = center(1)*3;
259  const dof_id_type expected_id = start_id + yn*5 + xn;
260  CPPUNIT_ASSERT_EQUAL(elem->id(), expected_id);
261  }
262  }
263  }
virtual void read(const std::string &name, void *mesh_data=nullptr, bool skip_renumber_nodes_and_elements=false, bool skip_find_neighbors=false)=0
Interfaces for reading/writing a mesh to/from a file.
void allow_renumbering(bool allow)
If false is passed in then this mesh will no longer be renumbered when being prepared for use...
Definition: mesh_base.h:1173
libMesh::Parallel::Communicator * TestCommWorld
Definition: driver.C:159
void prepare_for_use(const bool skip_renumber_nodes_and_elements, const bool skip_find_neighbors)
Prepare a newly ecreated (or read) mesh for use.
Definition: mesh_base.C:710
void barrier() const
MeshBase & mesh
void build_square(UnstructuredMesh &mesh, const unsigned int nx, const unsigned int ny, const Real xmin=0., const Real xmax=1., const Real ymin=0., const Real ymax=1., const ElemType type=INVALID_ELEM, const bool gauss_lobatto_grid=false)
A specialized build_cube() for 2D meshes.
This class implements reading and writing meshes in the VTK format.
Definition: vtk_io.h:60
virtual dof_id_type max_elem_id() const =0
virtual void renumber_elem(dof_id_type old_id, dof_id_type new_id)=0
Changes the id of element old_id, both by changing elem(old_id)->id() and by moving elem(old_id) in t...
virtual dof_id_type n_elem() const =0
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
Definition: mesh.h:50
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:39
virtual dof_id_type n_nodes() const =0
uint8_t dof_id_type
Definition: id_types.h:67

◆ testVTKPreserveSubdomainIds()

void MeshInputTest::testVTKPreserveSubdomainIds ( )
inline

Definition at line 265 of file mesh_input.C.

References libMesh::MeshBase::allow_renumbering(), TIMPI::Communicator::barrier(), libMesh::MeshTools::Generation::build_square(), mesh, libMesh::MeshBase::n_elem(), libMesh::MeshBase::n_nodes(), libMesh::MeshBase::prepare_for_use(), libMesh::MeshBase::read(), TestCommWorld, and libMesh::VTKIO::write().

266  {
267  LOG_UNIT_TEST;
268 
269  // first scope: write file
270  {
272  mesh.allow_renumbering(false);
273  MeshTools::Generation::build_square (mesh, 3, 3, 0., 1., 0., 1.);
274 
275  for (const auto & elem : mesh.element_ptr_range())
276  {
277  const Point center = elem->vertex_average();
278  const int xn = center(0)*3;
279  const int yn = center(1)*3;
280  const subdomain_id_type new_id = yn*4 + xn;
281  elem->subdomain_id() = new_id;
282  }
283 
284  // Explicit writer object here to be absolutely sure we get VTK
285  VTKIO vtk(mesh);
286  vtk.write("read_sbd_ids_test.pvtu");
287  }
288 
289  // Make sure that the writing is done before the reading starts.
291 
292  // second scope: read file
293  {
295  mesh.allow_renumbering(false);
296 
297  mesh.read("read_sbd_ids_test.pvtu");
299 
300  CPPUNIT_ASSERT_EQUAL(mesh.n_nodes(), dof_id_type(16));
301  CPPUNIT_ASSERT_EQUAL(mesh.n_elem(), dof_id_type(9));
302 
303  for (const auto & elem : mesh.element_ptr_range())
304  {
305  const Point center = elem->vertex_average();
306  const int xn = center(0)*3;
307  const int yn = center(1)*3;
308  const subdomain_id_type expected_id = yn*4 + xn;
309  CPPUNIT_ASSERT_EQUAL(elem->subdomain_id(), expected_id);
310  }
311  }
312  }
virtual void read(const std::string &name, void *mesh_data=nullptr, bool skip_renumber_nodes_and_elements=false, bool skip_find_neighbors=false)=0
Interfaces for reading/writing a mesh to/from a file.
void allow_renumbering(bool allow)
If false is passed in then this mesh will no longer be renumbered when being prepared for use...
Definition: mesh_base.h:1173
libMesh::Parallel::Communicator * TestCommWorld
Definition: driver.C:159
void prepare_for_use(const bool skip_renumber_nodes_and_elements, const bool skip_find_neighbors)
Prepare a newly ecreated (or read) mesh for use.
Definition: mesh_base.C:710
void barrier() const
MeshBase & mesh
void build_square(UnstructuredMesh &mesh, const unsigned int nx, const unsigned int ny, const Real xmin=0., const Real xmax=1., const Real ymin=0., const Real ymax=1., const ElemType type=INVALID_ELEM, const bool gauss_lobatto_grid=false)
A specialized build_cube() for 2D meshes.
This class implements reading and writing meshes in the VTK format.
Definition: vtk_io.h:60
virtual dof_id_type n_elem() const =0
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
Definition: mesh.h:50
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:39
virtual dof_id_type n_nodes() const =0
uint8_t dof_id_type
Definition: id_types.h:67

The documentation for this class was generated from the following file: