22 #include <boost/test/unit_test.hpp> 26 #include "examples/structural/bar_extension/bar_extension.h" 27 #include "tests/base/check_sensitivity.h" 33 #include "libmesh/numeric_vector.h" 44 this->init(libMesh::EDGE2,
false);
57 libMesh::MeshBase::const_node_iterator
58 it = _mesh->local_nodes_begin(),
59 end = _mesh->local_nodes_end();
67 for ( ; it!=end; it++) {
68 const libMesh::Node* node = *it;
69 dof_num = node->dof_number(_sys->number(), _structural_sys->vars()[0], 0);
70 analytical = (*node)(0) * press/Eval;
71 numerical = _sys->solution->el(dof_num);
76 for (
unsigned int i=0; i<_outputs.size(); i++) {
77 BOOST_CHECK(_outputs[i]->n_elem_in_storage() == 1);
82 for (
unsigned int i=0; i<_outputs.size(); i++) {
85 numerical = _outputs[i]->von_Mises_p_norm_functional_for_all_elems(2);
93 this->init(libMesh::EDGE2,
false);
98 BOOST_AUTO_TEST_SUITE_END()
void check_sensitivity(ValType &v)
BOOST_FIXTURE_TEST_SUITE(Structural1DBarExtension, MAST::BarExtension) BOOST_AUTO_TEST_CASE(BarExtensionSolution)
bool compare_value(const Real v0, const Real v, const Real tol)
BOOST_AUTO_TEST_CASE(BarExtensionSensitivity)