Go to the documentation of this file.    1 #include <libmesh/equation_systems.h> 
    2 #include <libmesh/mesh.h> 
    3 #include <libmesh/mesh_generation.h> 
    4 #include <libmesh/numeric_vector.h> 
    5 #include <libmesh/dof_map.h> 
    6 #include <libmesh/elem.h> 
    7 #include <libmesh/default_coupling.h> 
    8 #include <libmesh/point_neighbor_coupling.h> 
   23   const Real & x = p(0);
 
   24   const Real & y = LIBMESH_DIM > 1 ? p(1) : 0;
 
   25   const Real & z = LIBMESH_DIM > 2 ? p(2) : 0;
 
   27   return x*(1-x)*(1-x) + x*x*(1-y) + x*(1-y)*(1-z) + y*(1-y)*z + z*(1-z)*(1-z);
 
   36   CPPUNIT_TEST( testCouplingOnEdge3 );
 
   38   CPPUNIT_TEST( testCouplingOnQuad9 );
 
   39   CPPUNIT_TEST( testCouplingOnTri6 );
 
   42   CPPUNIT_TEST( testCouplingOnHex27 );
 
   45   CPPUNIT_TEST_SUITE_END();
 
   80       (point_neighbor_coupling);
 
   82     const unsigned int n_elem_per_side = 5;
 
   83     const std::unique_ptr<Elem> test_elem = 
Elem::build(elem_type);
 
   84     const unsigned int ymax = test_elem->dim() > 1;
 
   85     const unsigned int zmax = test_elem->dim() > 2;
 
   86     const unsigned int ny = ymax * n_elem_per_side;
 
   87     const unsigned int nz = zmax * n_elem_per_side;
 
  102       for (
unsigned int s1=0; s1 != elem->n_neighbors(); ++s1)
 
  115           for (
unsigned int s2=0; s2 != elem->n_neighbors(); ++s2)
 
  124               for (
unsigned int s3=0; s3 != elem->n_neighbors(); ++s3)
 
 
void testCouplingOnQuad9()
 
void add_algebraic_ghosting_functor(GhostingFunctor &evaluable_functor, bool to_mesh=true)
Adds a functor which can specify algebraic ghosting requirements for use with distributed vectors.
 
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 System & add_system(const std::string &system_type, const std::string &name)
Add the system of type system_type named name to the systems array.
 
void testCouplingOnEdge3()
 
virtual SimpleRange< element_iterator > active_local_element_ptr_range()=0
 
The libMesh namespace provides an interface to certain functionality in the library.
 
void remove_coupling_functor(GhostingFunctor &coupling_functor)
Removes a functor which was previously added to the set of coupling functors, from both this DofMap a...
 
void testCouplingOnHex27()
 
Number cubic_point_neighbor_coupling_test(const Point &p, const Parameters &, const std::string &, const std::string &)
 
static const Real TOLERANCE
 
DefaultCoupling & default_coupling()
Default coupling functor.
 
processor_id_type processor_id() const
 
virtual Point centroid() const
 
CPPUNIT_TEST_SUITE_REGISTRATION(PointNeighborCouplingTest)
 
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
 
virtual void init()
Initialize all the systems.
 
A Point defines a location in LIBMESH_DIM dimensional Real space.
 
void set_n_levels(unsigned int n_levels)
 
This is the EquationSystems class.
 
void remove_algebraic_ghosting_functor(GhostingFunctor &evaluable_functor)
Removes a functor which was previously added to the set of algebraic ghosting functors,...
 
void testCouplingOnTri6()
 
void set_dof_coupling(const CouplingMatrix *dof_coupling)
 
Number point_value(unsigned int var, const Point &p, const bool insist_on_success=true, const NumericVector< Number > *sol=nullptr) const
 
void testCoupling(const ElemType elem_type)
 
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
 
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
 
void project_solution(FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr) const
Projects arbitrary functions onto the current solution.
 
static std::unique_ptr< Elem > build(const ElemType type, Elem *p=nullptr)
 
This class implements the default algebraic coupling in libMesh: elements couple to themselves,...
 
This class provides the ability to map between arbitrary, user-defined strings and several data types...
 
ElemType
Defines an enum for geometric element types.
 
Parameters parameters
Data structure holding arbitrary parameters.