Go to the documentation of this file. 1 #include <libmesh/equation_systems.h>
2 #include <libmesh/replicated_mesh.h>
3 #include <libmesh/mesh_generation.h>
4 #include <libmesh/dof_map.h>
5 #include <libmesh/system.h>
6 #include <libmesh/mesh_function.h>
7 #include <libmesh/numeric_vector.h>
8 #include <libmesh/elem.h>
36 #ifdef LIBMESH_ENABLE_AMR
37 CPPUNIT_TEST( test_p_level );
41 CPPUNIT_TEST_SUITE_END();
52 #ifdef LIBMESH_ENABLE_AMR
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
121 #endif // LIBMESH_ENABLE_AMR
Manages consistently variables, degrees of freedom, and coefficient vectors.
const EquationSystems & get_equation_systems() const
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.
CPPUNIT_TEST_SUITE_REGISTRATION(MeshFunctionTest)
virtual SimpleRange< element_iterator > active_element_ptr_range()=0
The libMesh namespace provides an interface to certain functionality in the library.
static const Real TOLERANCE
const Parallel::Communicator & comm() const
static std::unique_ptr< NumericVector< T > > build(const Parallel::Communicator &comm, const SolverPackage solver_package=libMesh::default_solver_package())
Builds a NumericVector on the processors in communicator comm using the linear solver package specifi...
The ReplicatedMesh class is derived from the MeshBase class, and is used to store identical copies of...
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
virtual void init()
Initialize all the systems.
A Point defines a location in LIBMESH_DIM dimensional Real space.
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.
This class provides the ability to map between arbitrary, user-defined strings and several data types...
Parameters parameters
Data structure holding arbitrary parameters.