Definition at line 31 of file default_coupling_test.C.
◆ CPPUNIT_TEST() [1/4]
◆ CPPUNIT_TEST() [2/4]
◆ CPPUNIT_TEST() [3/4]
◆ CPPUNIT_TEST() [4/4]
◆ CPPUNIT_TEST_SUITE()
◆ CPPUNIT_TEST_SUITE_END()
DefaultCouplingTest::CPPUNIT_TEST_SUITE_END |
( |
| ) |
|
◆ setUp()
void DefaultCouplingTest::setUp |
( |
| ) |
|
|
inline |
◆ tearDown()
void DefaultCouplingTest::tearDown |
( |
| ) |
|
|
inline |
◆ testCoupling()
void DefaultCouplingTest::testCoupling |
( |
const ElemType |
elem_type | ) |
|
|
inline |
Definition at line 55 of file default_coupling_test.C.
64 const unsigned int n_elem_per_side = 5;
65 const std::unique_ptr<Elem> test_elem = Elem::build(elem_type);
66 const unsigned int ymax = test_elem->dim() > 1;
67 const unsigned int zmax = test_elem->dim() > 2;
68 const unsigned int ny = ymax * n_elem_per_side;
69 const unsigned int nz = zmax * n_elem_per_side;
83 std::set<dof_id_type> evaluable_elements;
88 evaluable_elements.insert(elem->id());
90 for (
unsigned int s1=0; s1 != elem->n_neighbors(); ++s1)
99 if (!evaluable_elements.count(n1->
id()))
102 evaluable_elements.insert(n1->
id());
105 for (
unsigned int s2=0; s2 != elem->n_neighbors(); ++s2)
112 if (!evaluable_elements.count(n2->
id()))
115 evaluable_elements.insert(n2->
id());
118 for (
unsigned int s3=0; s3 != elem->n_neighbors(); ++s3)
123 evaluable_elements.count(n3->
id()))
127 evaluable_elements.insert(n3->
id());
139 const std::size_t n_evaluable =
143 CPPUNIT_ASSERT_EQUAL(evaluable_elements.size(), n_evaluable);
References libMesh::MeshBase::active_local_element_ptr_range(), libMesh::EquationSystems::add_system(), libMesh::System::add_variable(), libMesh::Elem::build(), libMesh::MeshTools::Generation::build_cube(), libMesh::Elem::centroid(), cubic_default_coupling_test(), libMesh::DofMap::default_algebraic_ghosting(), distance(), libMesh::MeshBase::evaluable_elements_begin(), libMesh::MeshBase::evaluable_elements_end(), libMesh::System::get_dof_map(), libMesh::HIERARCHIC, libMesh::DofObject::id(), libMesh::EquationSystems::init(), libMesh::DofMap::is_evaluable(), libMesh::libmesh_real(), mesh, libMesh::Elem::neighbor_ptr(), libMesh::EquationSystems::parameters, libMesh::System::point_value(), libMesh::ParallelObject::processor_id(), libMesh::DofObject::processor_id(), libMesh::System::project_solution(), libMesh::DefaultCoupling::set_n_levels(), TestCommWorld, libMesh::THIRD, and libMesh::TOLERANCE.
◆ testCouplingOnEdge3()
void DefaultCouplingTest::testCouplingOnEdge3 |
( |
| ) |
|
|
inline |
◆ testCouplingOnHex27()
void DefaultCouplingTest::testCouplingOnHex27 |
( |
| ) |
|
|
inline |
◆ testCouplingOnQuad9()
void DefaultCouplingTest::testCouplingOnQuad9 |
( |
| ) |
|
|
inline |
◆ testCouplingOnTri6()
void DefaultCouplingTest::testCouplingOnTri6 |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following file:
Manages consistently variables, degrees of freedom, and coefficient vectors.
bool is_evaluable(const DofObjectSubclass &obj, unsigned int var_num=libMesh::invalid_uint) const
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
virtual SimpleRange< element_iterator > active_local_element_ptr_range()=0
static const Real TOLERANCE
virtual element_iterator evaluable_elements_begin(const DofMap &dof_map, unsigned int var_num=libMesh::invalid_uint)=0
Iterate over elements in the Mesh where the solution (as distributed by the given DofMap) can be eval...
processor_id_type processor_id() const
virtual Point centroid() const
virtual element_iterator evaluable_elements_end(const DofMap &dof_map, unsigned int var_num=libMesh::invalid_uint)=0
Number cubic_default_coupling_test(const Point &p, const Parameters &, const std::string &, const std::string &)
processor_id_type processor_id() const
unsigned int add_variable(const std::string &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.
libMesh::Parallel::Communicator * TestCommWorld
A Point defines a location in LIBMESH_DIM dimensional Real space.
void testCoupling(const ElemType elem_type)
This is the EquationSystems class.
Real distance(const Point &p)
Number point_value(unsigned int var, const Point &p, const bool insist_on_success=true, const NumericVector< Number > *sol=nullptr) const
This is the base class from which all geometric element types are derived.
DefaultCoupling & default_algebraic_ghosting()
Default algebraic ghosting functor.
const DofMap & get_dof_map() const
const Elem * neighbor_ptr(unsigned int i) const
void project_solution(FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr) const
Projects arbitrary functions onto the current solution.
void set_n_levels(unsigned int n_levels)