21 #include "libmesh/dof_map.h" 22 #include "libmesh/equation_systems.h" 23 #include "libmesh/int_range.h" 24 #include "libmesh/libmesh_logging.h" 25 #include "libmesh/mesh_base.h" 26 #include "libmesh/numeric_vector.h" 27 #include "libmesh/parameter_vector.h" 28 #include "libmesh/point.h" 29 #include "libmesh/point_locator_base.h" 30 #include "libmesh/qoi_set.h" 31 #include "libmesh/enum_to_string.h" 32 #include "libmesh/sparse_matrix.h" 33 #include "libmesh/system.h" 34 #include "libmesh/system_norm.h" 35 #include "libmesh/utility.h" 36 #include "libmesh/elem.h" 37 #include "libmesh/fe_type.h" 38 #include "libmesh/fe_interface.h" 39 #include "libmesh/fe_compute_data.h" 40 #include "libmesh/static_condensation.h" 43 #include "libmesh/fe_base.h" 44 #include "libmesh/fe_interface.h" 45 #include "libmesh/parallel.h" 46 #include "libmesh/parallel_algebra.h" 47 #include "libmesh/quadrature.h" 48 #include "libmesh/tensor_value.h" 49 #include "libmesh/vector_value.h" 50 #include "libmesh/tensor_tools.h" 51 #include "libmesh/enum_norm_type.h" 52 #include "libmesh/enum_fe_family.h" 64 const std::string & name_in,
65 const unsigned int number_in) :
68 assemble_before_solve (true),
69 use_fixed_solution (false),
70 extra_quadrature_order (0),
75 qoi_error_estimates (0),
76 _init_system_function (nullptr),
77 _init_system_object (nullptr),
78 _assemble_system_function (nullptr),
79 _assemble_system_object (nullptr),
80 _constrain_system_function (nullptr),
81 _constrain_system_object (nullptr),
82 _qoi_evaluate_function (nullptr),
83 _qoi_evaluate_object (nullptr),
84 _qoi_evaluate_derivative_function (nullptr),
85 _qoi_evaluate_derivative_object (nullptr),
86 _dof_map (
std::make_unique<
DofMap>(number_in, es.get_mesh())),
87 _equation_systems (es),
88 _mesh (es.get_mesh()),
90 _sys_number (number_in),
92 _matrices_initialized (false),
93 _solution_projection (true),
94 _basic_system_only (false),
96 _additional_data_written (false),
97 adjoint_already_solved (false),
99 project_with_constraints (true),
100 _prefer_hash_table_matrix_assembly(false),
101 _require_sparsity_pattern (false),
102 _prefix_with_name (false)
128 #ifdef LIBMESH_ENABLE_CONSTRAINTS 130 return _dof_map->n_constrained_dofs();
143 #ifdef LIBMESH_ENABLE_CONSTRAINTS 145 return _dof_map->n_local_constrained_dofs();
166 libmesh_assert_less (global_dof_number,
_dof_map->n_dofs());
206 parallel_object_only();
215 auto max_allowed_id =
solution->max_allowed_id();
216 libmesh_error_msg_if(total_dofs > max_allowed_id,
217 "Cannot allocate a NumericVector with " << total_dofs <<
" degrees of freedom. " 218 "The vector can only index up to " << max_allowed_id <<
" entries.");
229 _dof_map->reinit_static_condensation();
235 #ifdef LIBMESH_ENABLE_GHOSTED 248 for (
auto & [vec_name, vec] :
_vectors)
255 #ifdef LIBMESH_ENABLE_GHOSTED 260 libmesh_error_msg(
"Cannot initialize ghosted vectors when they are not enabled.");
265 vec->init (this->
n_dofs(),
false, type);
269 libmesh_assert_equal_to(type,
PARALLEL);
288 parallel_object_only();
310 parallel_object_only();
325 if (
_matrices.begin()->second->initialized())
346 const bool use_hash =
347 pr.second->use_hash_table() ||
349 pr.second->use_hash_table(use_hash);
351 if (pr.second->require_sparsity_pattern())
373 parallel_object_only();
375 #ifdef LIBMESH_ENABLE_AMR 377 for (
auto & [vec_name, vec] :
_vectors)
391 #ifdef LIBMESH_ENABLE_GHOSTED 396 libmesh_error_msg(
"Cannot initialize ghosted vectors when they are not enabled.");
404 const std::vector<dof_id_type> & send_list =
_dof_map->get_send_list ();
413 #ifdef LIBMESH_ENABLE_GHOSTED 424 #endif // LIBMESH_ENABLE_AMR 431 #ifdef LIBMESH_ENABLE_AMR 441 parallel_object_only();
482 parallel_object_only();
484 #ifdef LIBMESH_ENABLE_CONSTRAINTS 497 parallel_object_only();
501 const std::vector<dof_id_type> & send_list =
_dof_map->get_send_list ();
507 libmesh_assert_less_equal (send_list.size(),
solution->size());
520 parallel_object_only();
533 libmesh_assert_less_equal (send_list.size(),
solution->size());
545 if (subset !=
nullptr)
546 libmesh_not_implemented();
554 LOG_SCOPE(
"assemble()",
"System");
565 LOG_SCOPE(
"assemble_qoi()",
"System");
574 bool include_liftfunc,
575 bool apply_constraints)
578 LOG_SCOPE(
"assemble_qoi_derivative()",
"System");
592 if (qoi_indices.
size(*
this) > parameters_vec.
size())
604 const Real threshold,
605 const bool verbose)
const 614 libMesh::out <<
" comparing matrices not supported." << std::endl;
619 const int name_result =
_sys_name.compare(other_system.
name());
622 if (name_result == 0)
636 if (solu_result == -1)
637 libMesh::out <<
" identical up to threshold." << std::endl;
639 libMesh::out <<
" first difference occurred at index = " 640 << solu_result <<
"." << std::endl;
646 std::vector<int> ov_result;
652 libMesh::out <<
" Fatal difference. This system handles " 653 << this->
n_vectors() <<
" add'l vectors," << std::endl
654 <<
" while the other system handles " 656 <<
" add'l vectors." << std::endl
657 <<
" Aborting comparison." << std::endl;
669 for (
auto & [vec_name, vec] :
_vectors)
673 << vec_name <<
"\" ...";
679 ov_result.push_back(vec->compare(other_system_vector, threshold));
683 if (ov_result[ov_result.size()-1] == -1)
684 libMesh::out <<
" identical up to threshold." << std::endl;
686 libMesh::out <<
" first difference occurred at" << std::endl
687 <<
" index = " << ov_result[ov_result.size()-1] <<
"." << std::endl;
696 if ((name_result==0) && (solu_result==-1))
698 if (ov_result.size()==0)
699 overall_result =
true;
706 ov_identical = (ov_result[n]==-1);
709 while (ov_identical && n<ov_result.size());
710 overall_result = ov_identical;
714 overall_result =
false;
720 libMesh::out <<
"found no differences." << std::endl << std::endl;
722 libMesh::out <<
"found differences." << std::endl << std::endl;
725 return overall_result;
732 parallel_object_only();
734 global_soln.resize (
solution->size());
744 parallel_object_only();
746 global_soln.resize (
solution->size());
748 solution->localize_to_one (global_soln, dest_proc);
754 const bool projections,
757 parallel_object_only();
764 if (
auto it = this->
_vectors.find(vec_name);
781 libmesh_assert_equal_to(type ==
SERIAL,
799 #ifdef LIBMESH_ENABLE_GHOSTED 804 libmesh_error_msg(
"Cannot initialize ghosted vectors when they are not enabled.");
832 auto buf = pr.first->second.get();
843 #ifdef LIBMESH_ENABLE_GHOSTED 848 libmesh_error_msg(
"Cannot initialize ghosted vectors when they are not enabled.");
860 parallel_object_only();
862 if (
const auto pos =
_vectors.find(vec_name);
878 if (
const auto pos =
_vectors.find(vec_name);
880 return pos->second.
get();
890 if (
auto pos =
_vectors.find(vec_name);
892 return pos->second.
get();
908 std::advance(it, vec_num);
909 return it->second.get();
922 std::advance(it, vec_num);
923 return it->second.get();
930 return *(libmesh_map_find(
_vectors, vec_name));
937 return *(libmesh_map_find(
_vectors, vec_name));
945 libmesh_assert_less(vec_num,
_vectors.size());
949 std::advance(it, vec_num);
950 return *(it->second);
958 libmesh_assert_less(vec_num,
_vectors.size());
962 std::advance(it, vec_num);
963 return *(it->second);
971 libmesh_assert_less(vec_num,
_vectors.size());
975 std::advance(it, vec_num);
983 [&vec_reference](
const decltype(
_vectors)::value_type & pr)
984 {
return &vec_reference == pr.second.
get(); });
999 parallel_object_only();
1006 if (
auto it = this->
_matrices.find(mat_name);
1016 "We do not currently support static condensation of the diagonal matrix type");
1017 matrix = std::make_unique<StaticCondensation>(this->
get_mesh(),
1024 auto & mat = *matrix;
1026 _matrices.emplace(mat_name, std::move(matrix));
1042 parallel_object_only();
1047 auto [it, inserted] =
_matrices.emplace(mat_name, std::move(matrix));
1048 libmesh_error_msg_if(!inserted,
1049 "Tried to add '" << mat_name <<
"' but the matrix already exists");
1076 parallel_object_only();
1078 if (
const auto pos =
_matrices.find(mat_name);
1087 if (
const auto pos =
_matrices.find(mat_name);
1089 return pos->second.get();
1099 if (
auto pos =
_matrices.find(mat_name);
1101 return pos->second.get();
1111 return *libmesh_map_find(
_matrices, mat_name);
1118 return *libmesh_map_find(
_matrices, mat_name);
1126 parallel_object_only();
1148 parallel_object_only();
1152 libmesh_assert_greater_equal(qoi_num, -2);
1169 std::ostringstream sensitivity_name;
1170 sensitivity_name <<
"sensitivity_solution" << i;
1172 return this->
add_vector(sensitivity_name.str());
1179 std::ostringstream sensitivity_name;
1180 sensitivity_name <<
"sensitivity_solution" << i;
1182 return this->
get_vector(sensitivity_name.str());
1189 std::ostringstream sensitivity_name;
1190 sensitivity_name <<
"sensitivity_solution" << i;
1192 return this->
get_vector(sensitivity_name.str());
1199 return this->
add_vector(
"weighted_sensitivity_solution");
1206 return this->
get_vector(
"weighted_sensitivity_solution");
1213 return this->
get_vector(
"weighted_sensitivity_solution");
1220 std::ostringstream adjoint_name;
1221 adjoint_name <<
"adjoint_solution" << i;
1232 std::ostringstream adjoint_name;
1233 adjoint_name <<
"adjoint_solution" << i;
1242 std::ostringstream adjoint_name;
1243 adjoint_name <<
"adjoint_solution" << i;
1252 std::ostringstream adjoint_name;
1253 adjoint_name <<
"weighted_sensitivity_adjoint_solution" << i;
1264 std::ostringstream adjoint_name;
1265 adjoint_name <<
"weighted_sensitivity_adjoint_solution" << i;
1274 std::ostringstream adjoint_name;
1275 adjoint_name <<
"weighted_sensitivity_adjoint_solution" << i;
1284 std::ostringstream adjoint_rhs_name;
1285 adjoint_rhs_name <<
"adjoint_rhs" << i;
1287 return this->
add_vector(adjoint_rhs_name.str(),
false);
1294 std::ostringstream adjoint_rhs_name;
1295 adjoint_rhs_name <<
"adjoint_rhs" << i;
1297 return this->
get_vector(adjoint_rhs_name.str());
1304 std::ostringstream adjoint_rhs_name;
1305 adjoint_rhs_name <<
"adjoint_rhs" << i;
1307 return this->
get_vector(adjoint_rhs_name.str());
1314 std::ostringstream sensitivity_rhs_name;
1315 sensitivity_rhs_name <<
"sensitivity_rhs" << i;
1317 return this->
add_vector(sensitivity_rhs_name.str(),
false);
1324 std::ostringstream sensitivity_rhs_name;
1325 sensitivity_rhs_name <<
"sensitivity_rhs" << i;
1327 return this->
get_vector(sensitivity_rhs_name.str());
1334 std::ostringstream sensitivity_rhs_name;
1335 sensitivity_rhs_name <<
"sensitivity_rhs" << i;
1337 return this->
get_vector(sensitivity_rhs_name.str());
1344 const std::set<subdomain_id_type> *
const active_subdomains)
1354 const std::set<subdomain_id_type> *
const active_subdomains)
1365 const std::set<subdomain_id_type> *
const active_subdomains)
1375 const std::set<subdomain_id_type> *
const active_subdomains)
1384 const std::set<subdomain_id_type> *
const active_subdomains)
1406 std::set<dof_id_type> & var_indices)
const 1409 var_indices.clear();
1411 std::vector<dof_id_type> dof_indices;
1418 for (
const auto & elem : this->
get_mesh().active_local_element_ptr_range())
1424 if (first_local <= dof && dof < end_local)
1425 var_indices.insert(dof);
1434 for (
const auto & node : this->
get_mesh().local_node_ptr_range())
1438 for (
auto dof : dof_indices)
1439 if (first_local <= dof && dof < end_local)
1440 var_indices.insert(dof);
1447 unsigned int var_num)
const 1450 libmesh_assert_less (var_num, this->
n_vars());
1456 const unsigned int sys_num = this->
number();
1459 for (
const auto & node :
mesh.local_node_ptr_range())
1461 unsigned int n_comp = node->n_comp(sys_num,var_num);
1462 for (
unsigned int i=0; i<n_comp; i++)
1464 const dof_id_type index = node->dof_number(sys_num,var_num,i);
1470 for (
const auto & elem :
mesh.active_local_element_ptr_range())
1472 unsigned int n_comp = elem->n_comp(sys_num,var_num);
1473 for (
unsigned int i=0; i<n_comp; i++)
1475 const dof_id_type index = elem->dof_number(sys_num,var_num,i);
1487 std::set<dof_id_type> var_indices;
1505 std::set<unsigned int> * skip_dimensions)
const 1514 std::vector<FEMNormType> norms(this->
n_vars(),
L2);
1515 std::vector<Real> weights(this->
n_vars(), 0.0);
1516 norms[var] = norm_type;
1526 std::set<unsigned int> * skip_dimensions)
const 1529 parallel_object_only();
1531 LOG_SCOPE (
"calculate_norm()",
"System");
1536 if (
norm.is_discrete())
1540 unsigned int check_var = 0, check_end = this->
n_vars();
1541 for (; check_var != check_end; ++check_var)
1542 if ((
norm.weight(check_var) != 1.0) || (
norm.type(check_var) != norm_type0))
1546 if (check_var == this->
n_vars())
1561 if (norm.
weight(var) == 0.0)
1580 bool using_hilbert_norm =
true,
1581 using_nonhilbert_norm =
true;
1587 Real norm_weight_sq =
norm.weight_sq(var);
1588 if (norm_weight_sq == 0.0)
1590 Real norm_weight =
norm.weight(var);
1594 if ((norm_type==
H1) ||
1600 if (!using_hilbert_norm)
1601 libmesh_not_implemented();
1602 using_nonhilbert_norm =
false;
1604 else if ((norm_type==
L1) ||
1605 (norm_type==
L_INF) ||
1609 if (!using_nonhilbert_norm)
1610 libmesh_not_implemented();
1611 using_hilbert_norm =
false;
1614 libmesh_not_implemented();
1620 std::vector<std::unique_ptr<FEBase>> fe_ptrs(4);
1621 std::vector<std::unique_ptr<FEVectorBase>> vec_fe_ptrs(4);
1622 std::vector<std::unique_ptr<QBase>> q_rules(4);
1627 for (
const auto &
dim : elem_dims)
1629 if (skip_dimensions && skip_dimensions->find(
dim) != skip_dimensions->end())
1639 fe_ptrs[
dim]->attach_quadrature_rule (q_rules[
dim].
get());
1644 vec_fe_ptrs[
dim]->attach_quadrature_rule (q_rules[
dim].
get());
1650 std::vector<dof_id_type> dof_indices;
1653 for (
const auto & elem : this->
get_mesh().active_local_element_ptr_range())
1655 const unsigned int dim = elem->dim();
1660 if (elem->infinite() )
1661 libmesh_not_implemented();
1663 if (skip_dimensions && skip_dimensions->find(
dim) != skip_dimensions->end())
1666 QBase * qrule = q_rules[
dim].get();
1671 auto element_calculation = [&dof_indices, &elem,
1672 norm_type, norm_weight, norm_weight_sq, &qrule,
1673 &local_v, &v_norm](
auto & fe) {
1674 typedef typename std::remove_reference<decltype(fe)>::type::OutputShape OutputShape;
1676 typedef typename std::remove_reference<decltype(fe)>::type::OutputGradient OutputGradient;
1679 const std::vector<Real> & JxW = fe.get_JxW();
1680 const std::vector<std::vector<OutputShape>> * phi =
nullptr;
1681 if (norm_type ==
H1 ||
1686 phi = &(fe.get_phi());
1688 const std::vector<std::vector<OutputGradient>> * dphi =
nullptr;
1689 if (norm_type ==
H1 ||
1693 dphi = &(fe.get_dphi());
1695 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1696 typedef typename std::remove_reference<decltype(fe)>::type::OutputTensor OutputTensor;
1698 const std::vector<std::vector<OutputTensor>> * d2phi =
nullptr;
1699 if (norm_type ==
H2 ||
1702 d2phi = &(fe.get_d2phi());
1707 const unsigned int n_qp = qrule->n_points();
1709 const unsigned int n_sf = cast_int<unsigned int>
1710 (dof_indices.size());
1713 for (
unsigned int qp=0; qp<n_qp; qp++)
1715 if (norm_type ==
L1)
1717 OutputNumberShape u_h = 0.;
1718 for (
unsigned int i=0; i != n_sf; ++i)
1719 u_h += (*phi)[i][qp] * (*local_v)(dof_indices[i]);
1720 v_norm += norm_weight *
1724 if (norm_type ==
L_INF)
1726 OutputNumberShape u_h = 0.;
1727 for (
unsigned int i=0; i != n_sf; ++i)
1728 u_h += (*phi)[i][qp] * (*local_v)(dof_indices[i]);
1732 if (norm_type ==
H1 ||
1736 OutputNumberShape u_h = 0.;
1737 for (
unsigned int i=0; i != n_sf; ++i)
1738 u_h += (*phi)[i][qp] * (*local_v)(dof_indices[i]);
1739 v_norm += norm_weight_sq *
1743 if (norm_type ==
H1 ||
1747 OutputNumberGradient grad_u_h;
1748 for (
unsigned int i=0; i != n_sf; ++i)
1749 grad_u_h.add_scaled((*dphi)[i][qp], (*local_v)(dof_indices[i]));
1750 v_norm += norm_weight_sq *
1751 JxW[qp] * grad_u_h.norm_sq();
1756 OutputNumberGradient grad_u_h;
1757 for (
unsigned int i=0; i != n_sf; ++i)
1758 grad_u_h.add_scaled((*dphi)[i][qp], (*local_v)(dof_indices[i]));
1759 v_norm = std::max(v_norm, norm_weight * grad_u_h.norm());
1762 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 1765 if (norm_type ==
H2 ||
1768 OutputNumberTensor hess_u_h;
1769 for (
unsigned int i=0; i != n_sf; ++i)
1770 hess_u_h.add_scaled((*d2phi)[i][qp], (*local_v)(dof_indices[i]));
1771 v_norm += norm_weight_sq *
1772 JxW[qp] * hess_u_h.norm_sq();
1777 OutputNumberTensor hess_u_h;
1778 for (
unsigned int i=0; i != n_sf; ++i)
1779 hess_u_h.add_scaled((*d2phi)[i][qp], (*local_v)(dof_indices[i]));
1780 v_norm = std::max(v_norm, norm_weight * hess_u_h.norm());
1786 FEBase * scalar_fe = fe_ptrs[
dim].get();
1792 element_calculation(*scalar_fe);
1798 element_calculation(*vec_fe);
1803 if (using_hilbert_norm)
1806 v_norm = std::sqrt(v_norm);
1820 std::ostringstream oss;
1823 const std::string & sys_name = this->
name();
1825 oss <<
" System #" << this->
number() <<
", \"" << sys_name <<
"\"\n" 1833 if (vg_description.
n_variables() > 1) oss <<
"{ ";
1835 oss <<
"\"" << vg_description.
name(vn) <<
"\" ";
1836 if (vg_description.
n_variables() > 1) oss <<
"} ";
1841 oss <<
" Finite Element Types=";
1842 #ifndef LIBMESH_ENABLE_INFINITE_ELEMENTS 1857 oss <<
'\n' <<
" Infinite Element Mapping=";
1866 oss <<
" Approximation Orders=";
1869 #ifndef LIBMESH_ENABLE_INFINITE_ELEMENTS 1884 oss <<
" n_dofs()=" << this->
n_dofs() <<
'\n';
1886 oss <<
" n_local_dofs()=" << local_dofs <<
'\n';
1888 oss <<
" max(n_local_dofs())=" << local_dofs <<
'\n';
1889 #ifdef LIBMESH_ENABLE_CONSTRAINTS 1893 this->
comm().
max(local_unconstrained_dofs);
1894 oss <<
" max(local unconstrained dofs)=" << local_unconstrained_dofs <<
'\n';
1897 oss <<
" " <<
"n_vectors()=" << this->
n_vectors() <<
'\n';
1898 oss <<
" " <<
"n_matrices()=" << this->
n_matrices() <<
'\n';
1909 const std::string &
name))
1915 libmesh_warning(
"WARNING: Cannot specify both initialization function and object!");
1929 libmesh_warning(
"WARNING: Cannot specify both initialization object and function!");
1940 const std::string &
name))
1946 libmesh_warning(
"WARNING: Cannot specify both assembly function and object!");
1960 libmesh_warning(
"WARNING: Cannot specify both assembly object and function!");
1971 const std::string &
name))
1977 libmesh_warning(
"WARNING: Cannot specify both constraint function and object!");
1991 libmesh_warning(
"WARNING: Cannot specify both constraint object and function!");
2013 const std::string &,
2020 libmesh_warning(
"WARNING: Cannot specify both QOI function and object!");
2034 libmesh_warning(
"WARNING: Cannot specify both QOI object and function!");
2045 const QoISet &,
bool,
bool))
2051 libmesh_warning(
"WARNING: Cannot specify both QOI derivative function and object!");
2065 libmesh_warning(
"WARNING: Cannot specify both QOI derivative object and function!");
2132 bool include_liftfunc,
2133 bool apply_constraints)
2145 (qoi_indices, include_liftfunc, apply_constraints);
2160 qoi[qoi_index] = qoi_value;
2167 return qoi[qoi_index];
2179 libmesh_assert_equal_to(this->
qoi.size(), new_qoi.size());
2180 this->
qoi = std::move(new_qoi);
2201 const bool insist_on_success,
2206 parallel_object_only();
2224 std::unique_ptr<PointLocatorBase> locator_ptr =
mesh.sub_point_locator();
2227 if (!insist_on_success || !
mesh.is_serial())
2232 const std::set<subdomain_id_type> & raw_subdomains =
2234 const std::set<subdomain_id_type> * implicit_subdomains =
2235 raw_subdomains.empty() ? nullptr : &raw_subdomains;
2236 const Elem * e = locator(p, implicit_subdomains);
2240 if (e && this->
get_dof_map().is_evaluable(*e, var))
2247 this->
comm().
min(lowest_owner);
2280 std::vector<dof_id_type> dof_indices;
2286 const unsigned int num_dofs = cast_int<unsigned int>
2287 (dof_indices.size());
2302 for (
unsigned int l=0; l<num_dofs; l++)
2304 u += fe_data.shape[l] * (*sol)(dof_indices[l]);
2330 const bool insist_on_success,
2335 parallel_object_only();
2353 std::unique_ptr<PointLocatorBase> locator_ptr =
mesh.sub_point_locator();
2356 if (!insist_on_success || !
mesh.is_serial())
2361 const std::set<subdomain_id_type> & raw_subdomains =
2363 const std::set<subdomain_id_type> * implicit_subdomains =
2364 raw_subdomains.empty() ? nullptr : &raw_subdomains;
2365 const Elem * e = locator(p, implicit_subdomains);
2369 if (e && this->
get_dof_map().is_evaluable(*e, var))
2376 this->
comm().
min(lowest_owner);
2407 const unsigned int dim = e.
dim();
2413 std::vector<dof_id_type> dof_indices;
2419 const unsigned int num_dofs = cast_int<unsigned int>
2420 (dof_indices.size());
2436 for (
unsigned int l=0; l<num_dofs; l++)
2440 for (std::size_t v=0; v<
dim; v++)
2441 for (std::size_t xyz=0; xyz<LIBMESH_DIM; xyz++)
2446 * (*sol)(dof_indices[l]);
2471 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 2474 const bool insist_on_success,
2479 parallel_object_only();
2497 std::unique_ptr<PointLocatorBase> locator_ptr =
mesh.sub_point_locator();
2500 if (!insist_on_success || !
mesh.is_serial())
2505 const std::set<subdomain_id_type> & raw_subdomains =
2507 const std::set<subdomain_id_type> * implicit_subdomains =
2508 raw_subdomains.empty() ? nullptr : &raw_subdomains;
2509 const Elem * e = locator(p, implicit_subdomains);
2513 if (e && this->
get_dof_map().is_evaluable(*e, var))
2520 this->
comm().
min(lowest_owner);
2547 libmesh_not_implemented();
2556 std::vector<dof_id_type> dof_indices;
2562 const unsigned int num_dofs = cast_int<unsigned int>
2563 (dof_indices.size());
2575 const std::vector<std::vector<RealTensor>> & d2phi = fe->get_d2phi();
2578 fe->reinit (&e, &coor);
2583 for (
unsigned int l=0; l<num_dofs; l++)
2585 hess_u.
add_scaled (d2phi[l][0], (*sol)(dof_indices[l]));
2611 libmesh_error_msg(
"We can only accumulate a hessian with --enable-second");
2620 libmesh_error_msg(
"We can only accumulate a hessian with --enable-second");
2628 libmesh_error_msg(
"We can only accumulate a hessian with --enable-second");
2636 libmesh_error_msg(
"We can only accumulate a hessian with --enable-second");
2642 #endif // LIBMESH_ENABLE_SECOND_DERIVATIVES 2696 unsigned int component)
const void set_vector_as_adjoint(const std::string &vec_name, int qoi_num)
Allows one to set the QoI index controlling whether the vector identified by vec_name represents a so...
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
unsigned int add_variables(const std::vector< std::string > &vars, const FEType &type, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
Adds the variables vars to the list of variables for this system.
vectors_iterator vectors_end()
End of vectors container.
virtual bool initialized() const
bool is_initialized() const
FEFamily family
The type of finite element.
Real time
For time-dependent problems, this is the time t at the beginning of the current timestep.
void local_dof_indices(const unsigned int var, std::set< dof_id_type > &var_indices) const
Fills the std::set with the degrees of freedom on the local processor corresponding the the variable ...
bool closed()
Checks that the library has been closed.
unsigned int n_variable_groups() const
dof_id_type end_dof(const processor_id_type proc) const
virtual Real subset_l2_norm(const std::set< numeric_index_type > &indices) const
This is the EquationSystems class.
unsigned int variable_scalar_number(std::string_view var, unsigned int component) const
virtual void clear()
Clear all the data structures associated with the system.
Order
defines an enum for polynomial orders.
virtual void create_static_condensation()
Request that static condensation be performed for this system.
void update_global_solution(std::vector< Number > &global_soln) const
Fill the input vector global_soln so that it contains the global solution on all processors.
Abstract base class to be used for system initialization.
const Variable & variable(unsigned int var) const
Return a constant reference to Variable var.
Assembly * _assemble_system_object
Object that assembles the system.
Gradient point_gradient(unsigned int var, const Point &p, const bool insist_on_success=true, const NumericVector< Number > *sol=nullptr) const
bool _basic_system_only
Holds true if the components of more advanced system types (e.g.
virtual void init_matrices()
Initializes the matrices associated with this system.
bool _is_initialized
true when additional vectors and variables do not require immediate initialization, false otherwise.
void(* _constrain_system_function)(EquationSystems &es, const std::string &name)
Function to impose constraints.
NumericVector< Number > & add_adjoint_solution(unsigned int i=0)
virtual void forward_qoi_parameter_sensitivity(const QoISet &qoi_indices, const ParameterVector ¶meters, SensitivityData &sensitivities)
Solves for parameter sensitivities using the forward method.
virtual void get(const std::vector< numeric_index_type > &index, T *values) const
Access multiple components at once.
Data structure for specifying which Parameters should be independent variables in a parameter sensiti...
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
Data structure for specifying which Quantities of Interest should be calculated in an adjoint or a pa...
Number get_qoi_value(unsigned int qoi_index) const
virtual void reinit()
Reinitializes degrees of freedom and other required data on the current mesh.
bool has_variable(std::string_view var) const
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true, const bool extra_checks=true)
class FEComputeData hides arbitrary data to be passed to and from children of FEBase through the FEIn...
unsigned int n_qois() const
Number of currently active quantities of interest.
unsigned int n_components() const
virtual bool initialized() const
virtual void initialize()=0
Initialization function.
virtual numeric_index_type size() const =0
NumericVector< Number > & get_sensitivity_solution(unsigned int i=0)
OrderWrapper radial_order
The approximation order in radial direction of the infinite element.
unsigned int n_components(const MeshBase &mesh) const
virtual void assemble_qoi_derivative(const QoISet &qoi_indices=QoISet(), bool include_liftfunc=true, bool apply_constraints=true)
Calls user qoi derivative function.
NumericVector< Number > & get_sensitivity_rhs(unsigned int i=0)
int vector_is_adjoint(std::string_view vec_name) const
virtual void assemble()=0
Assembly function.
unsigned int add_variables(System &sys, const std::vector< std::string > &vars, const FEType &type, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
Adds the variables vars to the list of variables for this system.
Constraint * _constrain_system_object
Object that constrains the system.
const EquationSystems & get_equation_systems() const
unsigned int n_variable_groups() const
bool is_attached(SparseMatrix< Number > &matrix)
Matrices should not be attached more than once.
virtual void assemble()
Prepares matrix and _dof_map for matrix assembly.
void attach_matrix(SparseMatrix< Number > &matrix)
Additional matrices may be attached to this DofMap.
unsigned int add_variable_array(const std::vector< std::string > &vars, const FEType &type, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
Adds variables vars to the list of variables for this system.
virtual void init_data()
Initializes the data for the system.
This is the base class from which all geometric element types are derived.
static FEFieldType field_type(const FEType &fe_type)
FEMNormType
defines an enum for norms defined on vectors of finite element coefficients
void get_all_variable_numbers(std::vector< unsigned int > &all_variable_numbers) const
Fills all_variable_numbers with all the variable numbers for the variables that have been added to th...
void init_qois(unsigned int n_qois)
Accessors for qoi and qoi_error_estimates vectors.
Number point_value(unsigned int var, const Point &p, const bool insist_on_success=true, const NumericVector< Number > *sol=nullptr) const
std::unique_ptr< DofMap > _dof_map
Data structure describing the relationship between nodes, variables, etc...
virtual void user_initialization()
Calls user's attached initialization function, or is overridden by the user in derived classes...
Provides a uniform interface to vector storage schemes for different linear algebra libraries...
std::vector< Gradient > dshape
Storage for the computed shape derivative values.
const Parallel::Communicator & comm() const
std::map< std::string, std::unique_ptr< NumericVector< Number > >, std::less<> > _vectors
Some systems need an arbitrary number of vectors.
NumericVector< Number > & add_vector(std::string_view vec_name, const bool projections=true, const ParallelType type=PARALLEL)
Adds the additional vector vec_name to this system.
void get_all_variable_numbers(std::vector< unsigned int > &all_variable_numbers) const
Fills all_variable_numbers with all the variable numbers for the variables that have been added to th...
OrderWrapper order
The approximation order of the element.
This class defines a norm/seminorm to be applied to a NumericVector which contains coefficients in a ...
const std::string & name(unsigned int v) const
NumericVector< Number > & add_sensitivity_rhs(unsigned int i=0)
void reinit_static_condensation()
Calls reinit on the static condensation map if it exists.
This class defines a vector in LIBMESH_DIM dimensional Real or Complex space.
std::vector< std::vector< Real > > local_transform
Storage for local to global mapping at p.
bool has_static_condensation() const
The libMesh namespace provides an interface to certain functionality in the library.
vectors_iterator vectors_begin()
Beginning of vectors container.
virtual Real subset_linfty_norm(const std::set< numeric_index_type > &indices) const
void attach_QOI_derivative_object(QOIDerivative &qoi_derivative)
Register a user object for evaluating derivatives of a quantity of interest with respect to test func...
virtual void adjoint_qoi_parameter_sensitivity(const QoISet &qoi_indices, const ParameterVector ¶meters, SensitivityData &sensitivities)
Solves for parameter sensitivities using the adjoint method.
dof_id_type n_local_dofs() const
Abstract base class to be used for system assembly.
NumericVector< Number > & add_weighted_sensitivity_solution()
void(* _qoi_evaluate_function)(EquationSystems &es, const std::string &name, const QoISet &qoi_indices)
Function to evaluate quantity of interest.
const SparseMatrix< Number > * request_matrix(std::string_view mat_name) const
void init()
Initializes degrees of freedom on the current mesh.
const MeshBase & get_mesh() const
NumericVector< Number > & get_weighted_sensitivity_solution()
static std::unique_ptr< SparseMatrix< T > > build(const Parallel::Communicator &comm, const SolverPackage solver_package=libMesh::default_solver_package(), const MatrixBuildType matrix_build_type=MatrixBuildType::AUTOMATIC)
Builds a SparseMatrix<T> using the linear solver package specified by solver_package.
virtual Real subset_l1_norm(const std::set< numeric_index_type > &indices) const
std::string get_info() const
Gets summary info about the sparsity bandwidth and constraints.
dof_id_type n_dofs() const
uint8_t processor_id_type
This is the MeshBase class.
virtual void prolong_vectors()
Prolong vectors after the mesh has refined.
const Variable & variable(const unsigned int c) const override
virtual void user_QOI(const QoISet &qoi_indices)
Calls user's attached quantity of interest function, or is overridden by the user in derived classes...
Number current_solution(const dof_id_type global_dof_number) const
Number fptr(const Point &p, const Parameters &, const std::string &libmesh_dbg_var(sys_name), const std::string &unknown_name)
unsigned int variable_number(std::string_view var) const
std::map< std::string, std::unique_ptr< SparseMatrix< Number > >, std::less<> > _matrices
Some systems need an arbitrary number of matrices.
QOIDerivative * _qoi_evaluate_derivative_object
Object to compute derivatives of quantities of interest.
NumericVector< Number > & add_weighted_sensitivity_adjoint_solution(unsigned int i=0)
virtual void qoi_derivative(const QoISet &qoi_indices, bool include_liftfunc, bool apply_constraints)=0
Quantity of interest derivative function.
virtual void qoi_parameter_sensitivity(const QoISet &qoi_indices, const ParameterVector ¶meters, SensitivityData &sensitivities)
Solves for the derivative of each of the system's quantities of interest q in qoi[qoi_indices] with r...
void attach_constraint_object(Constraint &constrain)
Register a user object for imposing constraints.
SolverPackage default_solver_package()
This class handles the numbering of degrees of freedom on a mesh.
std::unique_ptr< QBase > default_quadrature_rule(const unsigned int dim, const int extraorder=0) const
void attach_init_object(Initialization &init)
Register a user class to use to initialize the system.
unsigned int variable_scalar_number(unsigned int var_num, unsigned int component) const
bool has_variable(std::string_view var) const
processor_id_type n_processors() const
void libmesh_ignore(const Args &...)
bool identify_variable_groups() const
unsigned int number() const
void remove_vector(std::string_view vec_name)
Removes the additional vector vec_name from this system.
virtual bool contains_point(const Point &p, Real tol=TOLERANCE) const
This class defines the notion of a variable in the system.
const std::set< subdomain_id_type > & active_subdomains() const
bool has_static_condensation() const
Checks whether we have static condensation.
virtual Real l2_norm() const =0
std::map< std::string, int, std::less<> > _vector_is_adjoint
Holds non-negative if a vector by that name should be projected using adjoint constraints/BCs, -1 if primal.
unsigned int add_variable(System &sys, std::string_view 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.
Constraint & get_constraint_object()
Return the user object for imposing constraints.
void min(const T &r, T &o, Request &req) const
Data structure for holding completed parameter sensitivity calculations.
bool _is_initialized
Flag that tells if init() has been called.
StaticCondensationDofMap & get_static_condensation()
unsigned int n_variables() const
std::vector< Number > qoi
Values of the quantities of interest.
void remove_matrix(std::string_view mat_name)
Removes the additional matrix mat_name from this system.
This is a base class for classes which represent subsets of the dofs of a System. ...
unsigned int n_vectors() const
Manages consistently variables, degrees of freedom, and coefficient vectors.
void zero_variable(NumericVector< Number > &v, unsigned int var_num) const
Zeroes all dofs in v that correspond to variable number var_num.
bool _prefer_hash_table_matrix_assembly
Whether to use hash table matrix assembly if the matrix sub-classes support it.
virtual void add_matrices()
Insertion point for adding matrices in derived classes before init_matrices() is called.
static void compute_data(const unsigned int dim, const FEType &fe_t, const Elem *elem, FEComputeData &data)
Lets the appropriate child of FEBase compute the requested data for the input specified in data...
bool has_constraint_object() const
std::string get_info() const
virtual void qoi(const QoISet &qoi_indices)=0
Quantity of interest function.
std::unique_ptr< NumericVector< Number > > solution
Data structure to hold solution values.
void attach_QOI_derivative(void fptr(EquationSystems &es, const std::string &name, const QoISet &qoi_indices, bool include_liftfunc, bool apply_constraints))
Register a user function for evaluating derivatives of a quantity of interest with respect to test fu...
Real calculate_norm(const NumericVector< Number > &v, unsigned int var, FEMNormType norm_type, std::set< unsigned int > *skip_dimensions=nullptr) const
void print_dof_constraints(std::ostream &os=libMesh::out, bool print_nonlocal=false) const
Prints (from processor 0) all DoF and Node constraints.
static std::unique_ptr< FEGenericBase > build(const unsigned int dim, const FEType &type)
Builds a specific finite element type.
QOI * _qoi_evaluate_object
Object to compute quantities of interest.
Initialization * _init_system_object
Object that initializes the system.
const FEType & variable_type(const unsigned int i) const
void attach_QOI_function(void fptr(EquationSystems &es, const std::string &name, const QoISet &qoi_indices))
Register a user function for evaluating the quantities of interest, whose values should be placed in ...
const VariableGroup & variable_group(const unsigned int c) const
unsigned int add_variable(std::string_view 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.
const std::string & variable_name(const unsigned int i) const
InfMapType inf_map
The coordinate mapping type of the infinite element.
void(* _init_system_function)(EquationSystems &es, const std::string &name)
Function that initializes the system.
const std::set< unsigned char > & elem_dimensions() const
std::map< std::string, ParallelType, std::less<> > _matrix_types
Holds the types of the matrices.
This is the base class for point locators.
virtual void restrict_vectors()
Restrict vectors after the mesh has coarsened.
const std::string & variable_name(const unsigned int i) const
void create_static_condensation(MeshBase &mesh, System &system)
Add a static condensation class.
void attach_assemble_function(void fptr(EquationSystems &es, const std::string &name))
Register a user function to use in assembling the system matrix and RHS.
unsigned int n_matrices() const
An object whose state is distributed along a set of processors.
This class defines a logically grouped set of variables in the system.
std::size_t size(const System &sys) const
std::vector< Number > qoi_error_estimates
Vector to hold error estimates for qois, either from a steady state calculation, or from a single uns...
void add_scaled(const TypeTensor< T2 > &, const T &)
Add a scaled tensor to this tensor without creating a temporary.
NumericVector< Number > & add_adjoint_rhs(unsigned int i=0)
virtual Real l1_norm() const =0
virtual void restrict_solve_to(const SystemSubset *subset, const SubsetSolveMode subset_solve_mode=SUBSET_ZERO)
After calling this method, any solve will be restricted to the given subdomain.
virtual void user_QOI_derivative(const QoISet &qoi_indices=QoISet(), bool include_liftfunc=true, bool apply_constraints=true)
Calls user's attached quantity of interest derivative function, or is overridden by the user in deriv...
void broadcast(T &data, const unsigned int root_id=0, const bool identical_sizes=false) const
virtual void reinit_constraints()
Reinitializes the constraints for this system.
bool identify_variable_groups() const
virtual void close()=0
Calls the NumericVector's internal assembly routines, ensuring that the values are consistent across ...
virtual void reinit_mesh()
Reinitializes the system with a new mesh.
const NumericVector< Number > * request_vector(std::string_view vec_name) const
void attach_assemble_object(Assembly &assemble)
Register a user object to use in assembling the system matrix and RHS.
FEFamily radial_family
The type of approximation in radial direction.
bool _solution_projection
Holds true if the solution vector should be projected onto a changed grid, false if it should be zero...
EquationSystems & _equation_systems
Constant reference to the EquationSystems object used for the simulation.
std::string enum_to_string(const T e)
virtual bool closed() const
unsigned int n_vars() const
virtual std::string system_type() const
virtual void constrain()=0
Constraint function.
const std::string & vector_name(const unsigned int vec_num) const
void attach_QOI_object(QOI &qoi)
Register a user object for evaluating the quantities of interest, whose values should be placed in Sy...
virtual void user_assembly()
Calls user's attached assembly function, or is overridden by the user in derived classes.
ParallelType type() const
virtual void update()
Update the local values to reflect the solution on neighboring processors.
Real weight(unsigned int var) const
const FEType & variable_type(const unsigned int i) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void set_vector_preservation(const std::string &vec_name, bool preserve)
Allows one to set the boolean controlling whether the vector identified by vec_name should be "preser...
void process_constraints(MeshBase &)
Postprocesses any constrained degrees of freedom to be constrained only in terms of unconstrained dof...
void set_qoi_error_estimate(unsigned int qoi_index, Number qoi_error_estimate)
virtual void swap(NumericVector< T > &v)
Swaps the contents of this with v.
void max(const T &r, T &o, Request &req) const
virtual unsigned short dim() const =0
bool _matrices_initialized
false when additional matrices being added require initialization, true otherwise.
unsigned int add_variable_array(System &sys, const std::vector< std::string > &vars, const FEType &type, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
Adds variables vars to the list of variables for this system.
bool _require_sparsity_pattern
Whether any of our matrices require an initial sparsity pattern computation in order to determine pre...
const std::string _sys_name
A name associated with this system.
virtual numeric_index_type local_size() const =0
Tensor point_hessian(unsigned int var, const Point &p, const bool insist_on_success=true, const NumericVector< Number > *sol=nullptr) const
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...
static std::unique_ptr< NumericVector< T > > build(const Parallel::Communicator &comm, SolverPackage solver_package=libMesh::default_solver_package(), ParallelType parallel_type=AUTOMATIC)
Builds a NumericVector on the processors in communicator comm using the linear solver package specifi...
void clear_sparsity()
Clears the sparsity pattern.
NumericVector< Number > & get_adjoint_solution(unsigned int i=0)
virtual void re_update()
Re-update the local values when the mesh has changed.
unsigned int variable_number(std::string_view var) const
Abstract base class to be used for system constraints.
std::unique_ptr< NumericVector< Number > > current_local_solution
All the values I need to compute my contribution to the simulation at hand.
void project_vector(NumericVector< Number > &new_vector, FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr, int is_adjoint=-1) const
Projects arbitrary functions onto a vector of degree of freedom values for the current system...
virtual bool compare(const System &other_system, const Real threshold, const bool verbose) const
void set_qoi(unsigned int qoi_index, Number qoi_value)
dof_id_type n_local_constrained_dofs() const
void create_dof_constraints(const MeshBase &, Real time=0)
Rebuilds the raw degree of freedom and DofObject constraints, based on attached DirichletBoundary obj...
virtual void set(const numeric_index_type i, const T value)=0
Sets v(i) = value.
void prepare_send_list()
Takes the _send_list vector (which may have duplicate entries) and sorts it.
bool on_command_line(std::string arg)
virtual bool infinite() const =0
const std::string & name() const
void attach_constraint_function(void fptr(EquationSystems &es, const std::string &name))
Register a user function for imposing constraints.
virtual void user_constrain()
Calls user's attached constraint function, or is overridden by the user in derived classes...
Real discrete_var_norm(const NumericVector< Number > &v, unsigned int var, FEMNormType norm_type) const
Finds the discrete norm for the entries in the vector corresponding to Dofs associated with var...
dof_id_type first_dof(const processor_id_type proc) const
Number get_qoi_error_estimate_value(unsigned int qoi_index) const
virtual void assemble_qoi(const QoISet &qoi_indices=QoISet())
Calls user qoi function.
NumericVector< Number > & add_sensitivity_solution(unsigned int i=0)
FEFamily
defines an enum for finite element families.
unsigned int n_vars() const
void(* _assemble_system_function)(EquationSystems &es, const std::string &name)
Function that assembles the system.
MatrixBuildType
Defines an enum for matrix build types.
void compute_sparsity(const MeshBase &)
Computes the sparsity pattern for the matrices corresponding to proc_id and sends that data to Linear...
virtual void enable_out_of_mesh_mode()=0
Enables out-of-mesh mode.
processor_id_type processor_id() const
System(EquationSystems &es, const std::string &name, const unsigned int number)
Constructor.
void enable_derivative()
Enable the computation of shape gradients (dshape).
bool vector_preservation(std::string_view vec_name) const
SparseMatrix< Number > & add_matrix(std::string_view mat_name, ParallelType type=PARALLEL, MatrixBuildType mat_build_type=MatrixBuildType::AUTOMATIC)
Adds the additional matrix mat_name to this system.
SubsetSolveMode
defines an enum for the question what happens to the dofs outside the given subset when a system is s...
const DofMap & get_dof_map() const
processor_id_type processor_id() const
void late_matrix_init(SparseMatrix< Number > &mat, ParallelType type)
Helper function to keep DofMap forward declarable in system.h.
const SparseMatrix< Number > & get_matrix(std::string_view mat_name) const
A Point defines a location in LIBMESH_DIM dimensional Real space.
MeshBase & _mesh
Constant reference to the mesh data structure used for the simulation.
template class LIBMESH_EXPORT NumericVector< Number >
The QBase class provides the basic functionality from which various quadrature rules can be derived...
virtual Real linfty_norm() const =0
const VariableGroup & variable_group(unsigned int vg) const
Return a constant reference to VariableGroup vg.
const std::vector< dof_id_type > & get_send_list() const
void attach_init_function(void fptr(EquationSystems &es, const std::string &name))
Register a user function to use in initializing the system.
void set_type(ParallelType t)
Allow the user to change the ParallelType of the NumericVector under some circumstances.
std::map< std::string, bool, std::less<> > _vector_projections
Holds true if a vector by that name should be projected onto a changed grid, false if it should be ze...
This class forms the foundation from which generic finite elements may be derived.
Abstract base class to be used for quantities of interest.
bool is_evaluable(const DofObjectSubclass &obj, unsigned int var_num=libMesh::invalid_uint) const
const NumericVector< Number > & get_vector(std::string_view vec_name) const
NumericVector< Number > & get_weighted_sensitivity_adjoint_solution(unsigned int i=0)
This class defines a tensor in LIBMESH_DIM dimensional Real or Complex space.
dof_id_type n_constrained_dofs() const
std::vector< Number > get_qoi_values() const
Returns a copy of qoi, not a reference.
virtual void init(const numeric_index_type m, const numeric_index_type n, const numeric_index_type m_l, const numeric_index_type n_l, const numeric_index_type nnz=30, const numeric_index_type noz=10, const numeric_index_type blocksize=1)=0
Initialize SparseMatrix with the specified sizes.
const FEType & type() const
void(* _qoi_evaluate_derivative_function)(EquationSystems &es, const std::string &name, const QoISet &qoi_indices, bool include_liftfunc, bool apply_constraints)
Function to evaluate quantity of interest derivative.
ParallelType
Defines an enum for parallel data structure types.
Abstract base class to be used for derivatives of quantities of interest.
NumericVector< Number > & get_adjoint_rhs(unsigned int i=0)
bool prefix_with_name() const
virtual void localize(std::vector< T > &v_local) const =0
Creates a copy of the global vector in the local vector v_local.
FEFieldType
defines an enum for finite element field types - i.e.