Definition at line 27 of file mesh_function.C.
◆ CPPUNIT_TEST()
◆ CPPUNIT_TEST_SUITE()
Tests for general MeshFunction capability.
◆ CPPUNIT_TEST_SUITE_END()
MeshFunctionTest::CPPUNIT_TEST_SUITE_END |
( |
| ) |
|
◆ setUp()
void MeshFunctionTest::setUp |
( |
| ) |
|
|
inline |
◆ tearDown()
void MeshFunctionTest::tearDown |
( |
| ) |
|
|
inline |
◆ test_p_level()
void MeshFunctionTest::test_p_level |
( |
| ) |
|
|
inline |
Definition at line 53 of file mesh_function.C.
80 std::unique_ptr<NumericVector<Number>> mesh_function_vector
86 sys.
solution->localize(*mesh_function_vector,
90 std::vector<unsigned int> variables(1);
95 *mesh_function_vector,
99 mesh_function->init();
100 mesh_function->set_point_locator_tolerance(0.0001);
108 (*mesh_function)(*node, 0., vec_values);
109 Number mesh_function_value =
115 LIBMESH_ASSERT_FP_EQUAL
References libMesh::MeshBase::active_element_ptr_range(), libMesh::EquationSystems::add_system(), libMesh::System::add_variable(), libMesh::NumericVector< T >::build(), libMesh::MeshTools::Generation::build_cube(), libMesh::ParallelObject::comm(), libMesh::FIRST, libMesh::System::get_dof_map(), libMesh::System::get_equation_systems(), libMesh::DofMap::get_send_list(), libMesh::GHOSTED, libMesh::HEX20, libMesh::EquationSystems::init(), libMesh::LAGRANGE, libMesh::libmesh_real(), libMesh::MeshBase::local_node_ptr_range(), mesh, libMesh::System::n_dofs(), libMesh::System::n_local_dofs(), libMesh::EquationSystems::parameters, libMesh::System::project_solution(), projection_function(), libMesh::System::solution, TestCommWorld, and libMesh::TOLERANCE.
The documentation for this class was generated from the following file:
Manages consistently variables, degrees of freedom, and coefficient vectors.
const EquationSystems & get_equation_systems() const
virtual SimpleRange< element_iterator > active_element_ptr_range()=0
virtual void init(const numeric_index_type n, const numeric_index_type n_local, const bool fast=false, const ParallelType ptype=AUTOMATIC)=0
Change the dimension of the vector to n.
static const Real TOLERANCE
const Parallel::Communicator & comm() const
The ReplicatedMesh class is derived from the MeshBase class, and is used to store identical copies of...
Provides a uniform interface to vector storage schemes for different linear algebra libraries.
dof_id_type n_local_dofs() 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.
virtual SimpleRange< node_iterator > local_node_ptr_range()=0
libMesh::Parallel::Communicator * TestCommWorld
Number projection_function(const Point &p, const Parameters &, const std::string &, const std::string &)
const std::vector< dof_id_type > & get_send_list() const
This is the EquationSystems class.
std::unique_ptr< NumericVector< Number > > solution
Data structure to hold solution values.
const DofMap & get_dof_map() const
dof_id_type n_dofs() const
void project_solution(FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr) const
Projects arbitrary functions onto the current solution.