43 follower_forces (false),
45 _incompatible_sol (nullptr) {
235 n_phi = (
unsigned int)f.size(),
239 v = RealVectorX::Zero(n2);
242 m = RealMatrixX::Zero(n2, n2);
249 if (request_jacobian)
252 return request_jacobian;
264 std::unique_ptr<MAST::FEBase> fe(
_elem.
init_fe(
false,
false));
266 const std::vector<Real>& JxW = fe->get_JxW();
267 const std::vector<libMesh::Point>& xyz = fe->get_xyz();
268 const std::vector<std::vector<Real> >& phi = fe->get_phi();
271 n_phi = (
unsigned int)phi.size(),
278 mat1_n1n2 = RealMatrixX::Zero(n1, n2),
279 mat2_n2n2 = RealMatrixX::Zero(n2, n2),
280 local_jac = RealMatrixX::Zero(n2, n2);
282 phi_vec = RealVectorX::Zero(n_phi),
283 vec1_n1 = RealVectorX::Zero(n1),
284 vec2_n2 = RealVectorX::Zero(n2),
285 local_f = RealVectorX::Zero(n2);
287 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
294 (*mat_inertia)(xyz[0],
_time, material_mat);
297 const unsigned int nshp = fe->n_shape_functions();
298 for (
unsigned int i=0; i<JxW.size(); i++)
301 for (
unsigned int i_var=0; i_var<6; i_var++)
302 for (
unsigned int i=0; i<nshp; i++)
303 local_jac(i_var*nshp+i, i_var*nshp+i) =
304 vol*material_mat(i_var, i_var);
310 for (
unsigned int qp=0; qp<JxW.size(); qp++) {
312 (*mat_inertia)(xyz[qp],
_time, material_mat);
315 for (
unsigned int i_nd=0; i_nd<n_phi; i_nd++ )
316 phi_vec(i_nd) = phi[i_nd][qp];
318 Bmat.
reinit(n_vars, phi_vec);
325 local_f += JxW[qp] * vec2_n2;
327 if (request_jacobian) {
331 local_jac += JxW[qp]*mat2_n2n2;
341 if (request_jacobian) {
343 jac_xddot += mat2_n2n2;
349 if (request_jacobian)
350 jac_xddot += local_jac;
353 return request_jacobian;
372 n_phi = (
unsigned int)f.size(),
376 v = RealVectorX::Zero(n2);
379 m_xddot = RealMatrixX::Zero(n2, n2),
380 m_xdot = RealMatrixX::Zero(n2, n2),
381 m_x = RealMatrixX::Zero(n2, n2);
390 if (request_jacobian) {
392 jac_xddot += m_xddot;
397 return request_jacobian;
405 bool request_jacobian,
411 std::unique_ptr<MAST::FEBase> fe(
_elem.
init_fe(
false,
false));
413 const std::vector<Real>& JxW = fe->get_JxW();
414 const std::vector<libMesh::Point>& xyz = fe->get_xyz();
415 const std::vector<std::vector<Real> >& phi = fe->get_phi();
418 n_phi = (
unsigned int)phi.size(),
425 mat1_n1n2 = RealMatrixX::Zero(n1, n2),
426 mat2_n2n2 = RealMatrixX::Zero(n2, n2),
427 local_jac = RealMatrixX::Zero(n2, n2);
429 phi_vec = RealVectorX::Zero(n_phi),
430 vec1_n1 = RealVectorX::Zero(n1),
431 vec2_n2 = RealVectorX::Zero(n2),
432 local_f = RealVectorX::Zero(n2);
434 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
442 mat_inertia->derivative(p, xyz[0],
_time, material_mat);
445 const unsigned int nshp = fe->n_shape_functions();
446 for (
unsigned int i=0; i<JxW.size(); i++)
449 for (
unsigned int i_var=0; i_var<6; i_var++)
450 for (
unsigned int i=0; i<nshp; i++)
451 local_jac(i_var*nshp+i, i_var*nshp+i) =
452 vol*material_mat(i_var, i_var);
458 for (
unsigned int qp=0; qp<JxW.size(); qp++) {
460 mat_inertia->derivative(p, xyz[qp],
_time, material_mat);
463 for (
unsigned int i_nd=0; i_nd<n_phi; i_nd++ )
464 phi_vec(i_nd) = phi[i_nd][qp];
466 Bmat.
reinit(n_vars, phi_vec);
473 local_f += JxW[qp] * vec2_n2;
475 if (request_jacobian) {
479 local_jac += JxW[qp]*mat2_n2n2;
489 if (request_jacobian) {
491 jac_xddot += mat2_n2n2;
497 if (request_jacobian)
498 jac_xddot += local_jac;
501 return request_jacobian;
510 const unsigned int s,
512 bool request_jacobian,
521 std::vector<Real> JxW_Vn = fe->get_JxW();
522 const std::vector<libMesh::Point>& xyz = fe->get_xyz();
523 const std::vector<std::vector<Real> >& phi = fe->get_phi();
524 const std::vector<libMesh::Point>& face_normals = fe->get_normals_for_local_coordinate();
527 n_phi = (
unsigned int)phi.size(),
535 mat1_n1n2 = RealMatrixX::Zero(n1, n2),
536 mat2_n2n2 = RealMatrixX::Zero(n2, n2),
537 local_jac = RealMatrixX::Zero(n2, n2);
539 phi_vec = RealVectorX::Zero(n_phi),
540 vec1_n1 = RealVectorX::Zero(n1),
541 vec2_n2 = RealVectorX::Zero(n2),
542 local_f = RealVectorX::Zero(n2),
543 vel = RealVectorX::Zero(dim);
549 for (
unsigned int qp=0; qp<JxW_Vn.size(); qp++) {
551 vel_f(xyz[qp],
_time, vel);
553 for (
unsigned int i=0; i<dim; i++)
554 vn += vel(i)*face_normals[qp](i);
559 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
566 (*mat_inertia)(xyz[0],
_time, material_mat);
569 const unsigned int nshp = fe->n_shape_functions();
570 for (
unsigned int i=0; i<JxW_Vn.size(); i++)
573 for (
unsigned int i_var=0; i_var<6; i_var++)
574 for (
unsigned int i=0; i<nshp; i++)
575 local_jac(i_var*nshp+i, i_var*nshp+i) =
576 vol*material_mat(i_var, i_var);
582 for (
unsigned int qp=0; qp<JxW_Vn.size(); qp++) {
584 (*mat_inertia)(xyz[qp],
_time, material_mat);
587 for (
unsigned int i_nd=0; i_nd<n_phi; i_nd++ )
588 phi_vec(i_nd) = phi[i_nd][qp];
590 Bmat.
reinit(n_vars, phi_vec);
597 local_f += JxW_Vn[qp] * vec2_n2;
599 if (request_jacobian) {
603 local_jac += JxW_Vn[qp]*mat2_n2n2;
613 if (request_jacobian) {
615 jac_xddot += mat2_n2n2;
621 if (request_jacobian)
622 jac_xddot += local_jac;
635 std::multimap<libMesh::boundary_id_type, MAST::BoundaryConditionBase*>& bc) {
637 std::map<unsigned int, std::vector<MAST::BoundaryConditionBase*>> loads;
640 std::map<unsigned int, std::vector<MAST::BoundaryConditionBase*>>::const_iterator
644 for ( ; it != end; it++) {
646 std::vector<MAST::BoundaryConditionBase*>::const_iterator
647 bc_it = it->second.begin(),
648 bc_end = it->second.end();
650 for ( ; bc_it != bc_end; bc_it++) {
653 switch ((*bc_it)->type()) {
684 return request_jacobian;
690 (
bool request_jacobian,
694 std::multimap<libMesh::boundary_id_type, MAST::BoundaryConditionBase*>& bc) {
696 std::map<unsigned int, std::vector<MAST::BoundaryConditionBase*>> loads;
699 std::map<unsigned int, std::vector<MAST::BoundaryConditionBase*>>::const_iterator
703 for ( ; it != end; it++) {
705 std::vector<MAST::BoundaryConditionBase*>::const_iterator
706 bc_it = it->second.begin(),
707 bc_end = it->second.end();
709 for ( ; bc_it != bc_end; bc_it++) {
712 switch ((*bc_it)->type()) {
727 return request_jacobian;
735 (
bool request_jacobian,
738 std::multimap<libMesh::boundary_id_type, MAST::BoundaryConditionBase*>& bc) {
740 std::map<unsigned int, std::vector<MAST::BoundaryConditionBase*>> loads;
743 std::map<unsigned int, std::vector<MAST::BoundaryConditionBase*>>::const_iterator
747 for ( ; it != end; it++) {
749 std::vector<MAST::BoundaryConditionBase*>::const_iterator
750 bc_it = it->second.begin(),
751 bc_end = it->second.end();
753 for ( ; bc_it != bc_end; bc_it++) {
756 switch ((*bc_it)->type()) {
779 return request_jacobian;
791 std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>& bc) {
794 std::pair<std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>::const_iterator,
795 std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>::const_iterator> it;
802 it =bc.equal_range(sid);
804 for ( ; it.first != it.second; it.first++) {
806 switch (it.first->second->type()) {
836 return request_jacobian;
848 std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>& bc) {
851 std::pair<std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>::const_iterator,
852 std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>::const_iterator> it;
859 it =bc.equal_range(sid);
861 for ( ; it.first != it.second; it.first++) {
863 switch (it.first->second->type()) {
874 n = (
unsigned int) f.size();
877 local_f = RealVectorX::Zero(n);
879 mat = RealMatrixX::Zero(n, n);
896 return request_jacobian;
905 (
bool request_jacobian,
908 std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>& bc) {
911 std::pair<std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>::const_iterator,
912 std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>::const_iterator> it;
919 it =bc.equal_range(sid);
921 for ( ; it.first != it.second; it.first++) {
923 switch (it.first->second->type()) {
943 return request_jacobian;
955 bool request_jacobian,
959 std::multimap<libMesh::boundary_id_type, MAST::BoundaryConditionBase*>& bc) {
961 std::map<unsigned int, std::vector<MAST::BoundaryConditionBase*>> loads;
964 std::map<unsigned int, std::vector<MAST::BoundaryConditionBase*>>::const_iterator
968 for ( ; it != end; it++) {
970 std::vector<MAST::BoundaryConditionBase*>::const_iterator
971 bc_it = it->second.begin(),
972 bc_end = it->second.end();
974 for ( ; bc_it != bc_end; bc_it++) {
977 switch ((*bc_it)->type()) {
1010 return request_jacobian;
1018 bool request_jacobian,
1022 std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>& bc) {
1025 std::pair<std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>::const_iterator,
1026 std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>::const_iterator> it;
1033 it =bc.equal_range(sid);
1035 for ( ; it.first != it.second; it.first++) {
1037 switch (it.first->second->type()) {
1069 return request_jacobian;
1077 const unsigned int s,
1079 std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>& bc,
1080 bool request_jacobian,
1085 std::pair<std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>::const_iterator,
1086 std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>::const_iterator> it;
1093 it =bc.equal_range(sid);
1095 for ( ; it.first != it.second; it.first++) {
1097 switch (it.first->second->type()) {
1140 std::unique_ptr<MAST::FEBase> fe(
_elem.
init_fe(
false,
false));
1142 const std::vector<Real> &JxW = fe->get_JxW();
1143 const std::vector<libMesh::Point>& qpoint = fe->get_xyz();
1144 const std::vector<std::vector<Real> >& phi = fe->get_phi();
1146 n_phi = (
unsigned int)phi.size(),
1152 libMesh::Point normal;
1166 phi_vec = RealVectorX::Zero(n_phi),
1167 force = RealVectorX::Zero(2*n1),
1168 local_f = RealVectorX::Zero(n2),
1169 vec_n2 = RealVectorX::Zero(n2);
1172 for (
unsigned int qp=0; qp<qpoint.size(); qp++) {
1175 for (
unsigned int i_nd=0; i_nd<n_phi; i_nd++ )
1176 phi_vec(i_nd) = phi[i_nd][qp];
1178 Bmat.
reinit(2*n1, phi_vec);
1181 func(qpoint[qp],
_time, press);
1184 for (
unsigned int i_dim=0; i_dim<n1; i_dim++)
1185 force(i_dim) = press * normal(i_dim);
1189 local_f += JxW[qp] * vec_n2;
1197 return (request_jacobian);
1208 bool request_jacobian,
1216 std::unique_ptr<MAST::FEBase> fe(
_elem.
init_fe(
false,
false));
1218 const std::vector<Real> &JxW = fe->get_JxW();
1219 const std::vector<libMesh::Point>& qpoint = fe->get_xyz();
1220 const std::vector<std::vector<Real> >& phi = fe->get_phi();
1222 n_phi = (
unsigned int)phi.size(),
1228 libMesh::Point normal;
1242 phi_vec = RealVectorX::Zero(n_phi),
1243 force = RealVectorX::Zero(2*n1),
1244 local_f = RealVectorX::Zero(n2),
1245 vec_n2 = RealVectorX::Zero(n2);
1248 for (
unsigned int qp=0; qp<qpoint.size(); qp++) {
1251 for (
unsigned int i_nd=0; i_nd<n_phi; i_nd++ )
1252 phi_vec(i_nd) = phi[i_nd][qp];
1254 Bmat.
reinit(2*n1, phi_vec);
1257 func.derivative(p, qpoint[qp],
_time, press);
1260 for (
unsigned int i_dim=0; i_dim<n1; i_dim++)
1261 force(i_dim) = press * normal(i_dim);
1265 local_f += JxW[qp] * vec_n2;
1273 return (request_jacobian);
1282 const unsigned int s,
1285 bool request_jacobian,
1295 std::vector<Real> JxW_Vn = fe->get_JxW();
1296 const std::vector<libMesh::Point>& xyz = fe->get_xyz();
1297 const std::vector<libMesh::Point>& face_normals = fe->get_normals_for_local_coordinate();
1298 const std::vector<std::vector<Real> >& phi = fe->get_phi();
1301 n_phi = (
unsigned int)phi.size(),
1308 libMesh::Point normal;
1322 phi_vec = RealVectorX::Zero(n_phi),
1323 force = RealVectorX::Zero(2*n1),
1324 local_f = RealVectorX::Zero(n2),
1325 vec_n2 = RealVectorX::Zero(n2),
1326 vel = RealVectorX::Zero(dim);
1333 for (
unsigned int qp=0; qp<JxW_Vn.size(); qp++) {
1335 vel_f(xyz[qp],
_time, vel);
1337 for (
unsigned int i=0; i<dim; i++)
1338 vn += vel(i)*face_normals[qp](i);
1343 for (
unsigned int qp=0; qp<xyz.size(); qp++) {
1346 for (
unsigned int i_nd=0; i_nd<n_phi; i_nd++ )
1347 phi_vec(i_nd) = phi[i_nd][qp];
1349 Bmat.
reinit(2*n1, phi_vec);
1352 func(xyz[qp],
_time, press);
1355 for (
unsigned int i_dim=0; i_dim<n1; i_dim++)
1356 force(i_dim) = press * normal(i_dim);
1360 local_f += JxW_Vn[qp] * vec_n2;
1386 std::unique_ptr<MAST::FEBase> fe(
_elem.
init_fe(
false,
false));
1388 const std::vector<Real> &JxW = fe->get_JxW();
1389 const std::vector<libMesh::Point>& qpoint = fe->get_xyz();
1390 const std::vector<std::vector<Real> >& phi = fe->get_phi();
1392 n_phi = (
unsigned int)phi.size(),
1397 libMesh::Point normal;
1403 phi_vec = RealVectorX::Zero(n_phi),
1404 w = RealVectorX::Zero(3),
1405 dn_rot = RealVectorX::Zero(3),
1406 force = RealVectorX::Zero(2*n1),
1407 local_f = RealVectorX::Zero(n2),
1408 vec_n2 = RealVectorX::Zero(n2);
1416 for (
unsigned int qp=0; qp<qpoint.size(); qp++) {
1419 for (
unsigned int i_nd=0; i_nd<n_phi; i_nd++ )
1420 phi_vec(i_nd) = phi[i_nd][qp];
1422 Bmat.
reinit(2*n1, phi_vec);
1425 press_fn (qpoint[qp],
_time, press);
1426 press_fn.perturbation(qpoint[qp],
_time, dpress);
1429 for (
unsigned int i_dim=0; i_dim<n1; i_dim++)
1430 force(i_dim) = ( press * dn_rot(i_dim) +
1431 dpress * normal(i_dim));
1435 local_f += JxW[qp] * vec_n2;
1443 return (request_jacobian);
1452 (
bool request_jacobian,
1466 std::unique_ptr<MAST::FEBase> fe(
_elem.
init_fe(
false,
false));
1468 const std::vector<Real> &JxW = fe->get_JxW();
1469 const std::vector<libMesh::Point>& qpoint = fe->get_xyz();
1470 const std::vector<std::vector<Real> >& phi = fe->get_phi();
1472 n_phi = (
unsigned int)phi.size(),
1477 libMesh::Point normal;
1484 w = ComplexVectorX::Zero(3),
1485 dn_rot = ComplexVectorX::Zero(3),
1486 force = ComplexVectorX::Zero(2*n1),
1487 local_f = ComplexVectorX::Zero(n2),
1488 vec_n2 = ComplexVectorX::Zero(n2);
1495 for (
unsigned int qp=0; qp<qpoint.size(); qp++) {
1498 for (
unsigned int i_nd=0; i_nd<n_phi; i_nd++ )
1499 phi_vec(i_nd) = phi[i_nd][qp];
1501 Bmat.
reinit(2*n1, phi_vec);
1504 press_fn (qpoint[qp],
_time, press);
1505 dpress_fn(qpoint[qp],
_time, dpress);
1509 for (
unsigned int i_dim=0; i_dim<n1; i_dim++)
1510 force(i_dim) = ( press * dn_rot(i_dim) +
1511 dpress * normal(i_dim));
1515 local_f += JxW[qp] * vec_n2;
1523 return (request_jacobian);
1528 template <
typename ValType>
1532 ValType& global_mat)
const {
1535 libmesh_assert_less(
_elem.
dim(), 3);
1536 libmesh_assert_equal_to( local_mat.rows(), local_mat.cols());
1537 libmesh_assert_equal_to(global_mat.rows(), global_mat.cols());
1538 libmesh_assert_equal_to( local_mat.rows(), global_mat.rows());
1543 const unsigned int n_dofs = local_mat.rows()/6;
1545 ValType mat(6*n_dofs, 6*n_dofs);
1548 global_mat.setZero();
1552 for (
unsigned int i=0; i<n_dofs; i++)
1553 for (
unsigned int j=0; j<3; j++)
1554 for (
unsigned int k=0; k<3; k++) {
1555 mat(j*n_dofs+i, k*n_dofs+i) = Tmat(j,k);
1556 mat((j+3)*n_dofs+i, (k+3)*n_dofs+i) = Tmat(j,k);
1560 global_mat = mat * local_mat * mat.transpose();
1563 global_mat = local_mat;
1568 template <
typename ValType>
1572 ValType& local_vec)
const {
1575 libmesh_assert_less(
_elem.
dim(), 3);
1576 libmesh_assert_equal_to( local_vec.size(), global_vec.size());
1581 const unsigned int n_dofs = global_vec.size()/6;
1582 RealMatrixX mat = RealMatrixX::Zero(6*n_dofs, 6*n_dofs);
1584 local_vec.setZero();
1588 for (
unsigned int i=0; i<n_dofs; i++)
1589 for (
unsigned int j=0; j<3; j++)
1590 for (
unsigned int k=0; k<3; k++) {
1591 mat(j*n_dofs+i, k*n_dofs+i) = Tmat(j,k);
1592 mat((j+3)*n_dofs+i, (k+3)*n_dofs+i) = Tmat(j,k);
1596 local_vec = mat.transpose() * global_vec;
1599 local_vec = global_vec;
1604 template <
typename ValType>
1608 ValType& global_vec)
const {
1611 libmesh_assert_less(
_elem.
dim(), 3);
1612 libmesh_assert_equal_to( local_vec.size(), global_vec.size());
1617 const unsigned int n_dofs = local_vec.size()/6;
1619 RealMatrixX mat = RealMatrixX::Zero(6*n_dofs, 6*n_dofs);
1621 global_vec.setZero();
1625 for (
unsigned int i=0; i<n_dofs; i++)
1626 for (
unsigned int j=0; j<3; j++)
1627 for (
unsigned int k=0; k<3; k++) {
1628 mat(j*n_dofs+i, k*n_dofs+i) = Tmat(j,k);
1629 mat((j+3)*n_dofs+i, (k+3)*n_dofs+i) = Tmat(j,k);
1633 global_vec = mat* local_vec;
1636 global_vec = local_vec;
1643 std::unique_ptr<MAST::StructuralElementBase>
1649 std::unique_ptr<MAST::StructuralElementBase> e;
1651 switch (elem.
dim()) {
1685 cp += (gamma+1.0)/12.0*mach*mach*pow(vel_U,3);
1687 cp += (gamma+1.0)/4.0*mach*pow(vel_U,2);
1690 cp *= 2.0/pow(mach*mach-1.,0.5);
1695 libmesh_error_msg(
"Invalid Piston Theory Order: " << order);
1716 dcp_dvn += (gamma+1.0)/4.0*mach*mach*pow(vel_U,2);
1718 dcp_dvn += (gamma+1.0)/2.0*mach*vel_U;
1721 dcp_dvn *= 2.0/pow(mach*mach-1.,.5);
1726 libmesh_error_msg(
"Invalid Piston Theory Order: " << order);
1739 MAST::StructuralElementBase::transform_matrix_to_global_system<RealMatrixX>
1746 MAST::StructuralElementBase::transform_vector_to_local_system<RealVectorX>
1753 MAST::StructuralElementBase::transform_vector_to_global_system<RealVectorX>
1760 MAST::StructuralElementBase::transform_matrix_to_global_system<ComplexMatrixX>
1767 MAST::StructuralElementBase::transform_vector_to_local_system<ComplexVectorX>
1774 MAST::StructuralElementBase::transform_vector_to_global_system<ComplexVectorX>
RealVectorX _local_accel_sens
local acceleration sensitivity
void vector_mult_transpose(T &res, const T &v) const
res = v^T * [this]
bool use_local_elem() const
Vector and matrix quantities defined on one- and two-dimensional elements that are oriented in two or...
MAST::NonlinearSystem & system()
virtual void surface_pressure_boundary_velocity(const MAST::FunctionBase &p, const unsigned int s, const MAST::FieldFunction< RealVectorX > &vel_f, MAST::BoundaryConditionBase &bc, bool request_jacobian, RealVectorX &f, RealMatrixX &jac)
Calculates the force vector and Jacobian due to surface pressure applied on the entire element domain...
virtual bool thermal_residual(bool request_jacobian, RealVectorX &f, RealMatrixX &jac, MAST::BoundaryConditionBase &bc)=0
Calculates the force vector and Jacobian due to thermal stresses.
bool volume_external_residual(bool request_jacobian, RealVectorX &f, RealMatrixX &jac_xdot, RealMatrixX &jac, std::multimap< libMesh::subdomain_id_type, MAST::BoundaryConditionBase * > &bc)
volume external force contribution to system residual.
virtual bool linearized_frequency_domain_surface_pressure_residual(bool request_jacobian, ComplexVectorX &f, ComplexMatrixX &jac, const unsigned int side, MAST::BoundaryConditionBase &bc)=0
Calculates the force vector and Jacobian due to small perturbation surface pressure.
virtual bool thermal_residual_sensitivity(const MAST::FunctionBase &p, bool request_jacobian, RealVectorX &f, RealMatrixX &jac, MAST::BoundaryConditionBase &bc)=0
Calculates the sensitivity of force vector and Jacobian due to thermal stresses.
const MAST::GeomElem & _elem
geometric element for which the computations are performed
RealVectorX _local_delta_vel_sens
local perturbed velocity sensitivity
virtual bool inertial_residual_sensitivity(const MAST::FunctionBase &p, bool request_jacobian, RealVectorX &f, RealMatrixX &jac_xddot, RealMatrixX &jac_xdot, RealMatrixX &jac)
sensitivity of the inertial force contribution to system residual
virtual bool piston_theory_residual_sensitivity(const MAST::FunctionBase &p, bool request_jacobian, RealVectorX &f, RealMatrixX &jac_xdot, RealMatrixX &jac, MAST::BoundaryConditionBase &bc)=0
Calculates the force vector and Jacobian due to piston-theory based surface pressure on the entire el...
virtual bool linearized_inertial_residual(bool request_jacobian, RealVectorX &f, RealMatrixX &jac_xddot, RealMatrixX &jac_xdot, RealMatrixX &jac)
inertial force contribution to system residual of linerized problem
std::unique_ptr< MAST::StructuralElementBase > build_structural_element(MAST::SystemInitialization &sys, MAST::AssemblyBase &assembly, const MAST::GeomElem &elem, const MAST::ElementPropertyCardBase &p)
builds the structural element for the specified element type
virtual void thermal_residual_boundary_velocity(const MAST::FunctionBase &p, const unsigned int s, const MAST::FieldFunction< RealVectorX > &vel_f, MAST::BoundaryConditionBase &bc, bool request_jacobian, RealVectorX &f, RealMatrixX &jac)=0
Calculates the sensitivity of force vector and Jacobian due to thermal stresses.
void reinit(unsigned int n_interpolated_vars, unsigned int n_discrete_vars, unsigned int n_discrete_dofs_per_var)
this initializes the operator for number of rows and variables, assuming that all variables has the s...
virtual void set_velocity(const RealVectorX &vec, bool if_sens=false)
stores vec as velocity for element level calculations, or its sensitivity if if_sens is true...
virtual void set_perturbed_acceleration(const RealVectorX &vec, bool if_sens=false)
stores vec as perturbed acceleration for element level calculations, or its sensitivity if if_sens is...
virtual void set_acceleration(const RealVectorX &vec, bool if_sens=false)
stores vec as acceleration for element level calculations, or its sensitivity if if_sens is true...
const MAST::GeomElem & elem() const
Matrix< Complex, Dynamic, 1 > ComplexVectorX
void transform_vector_to_local_system(const ValType &global_vec, ValType &local_vec) const
RealVectorX _local_delta_sol_sens
local perturbed solution sensitivity
virtual bool inertial_residual(bool request_jacobian, RealVectorX &f, RealMatrixX &jac_xddot, RealMatrixX &jac_xdot, RealMatrixX &jac)
inertial force contribution to system residual
RealVectorX _local_delta_accel_sens
local perturbed acceleration sensitivity
RealVectorX _local_accel
local acceleration
bool side_external_residual(bool request_jacobian, RealVectorX &f, RealMatrixX &jac_xdot, RealMatrixX &jac, std::multimap< libMesh::boundary_id_type, MAST::BoundaryConditionBase * > &bc)
side external force contribution to system residual.
RealVectorX _local_sol_sens
local solution sensitivity
MAST::SystemInitialization & _system
SystemInitialization object associated with this element.
MAST::AssemblyBase & assembly()
MAST::BoundaryConditionType type() const
Real piston_theory_cp(const unsigned int order, const Real vel_U, const Real gamma, const Real mach)
virtual const libMesh::Elem & get_reference_elem() const
RealVectorX _local_delta_vel
local perturbed velocity
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > inertia_matrix(const MAST::ElementBase &e) const =0
virtual void set_velocity(const RealVectorX &vec, bool if_sens=false)
stores vec as velocity for element level calculations, or its sensitivity if if_sens is true...
RealVectorX _delta_sol
local solution used for linearized analysis
bool side_external_residual_sensitivity(const MAST::FunctionBase &p, bool request_jacobian, RealVectorX &f, RealMatrixX &jac_xdot, RealMatrixX &jac, std::multimap< libMesh::boundary_id_type, MAST::BoundaryConditionBase * > &bc)
sensitivity of the side external force contribution to system residual
void transform_matrix_to_global_system(const ValType &local_mat, ValType &global_mat) const
RealVectorX _local_delta_sol
local perturbed solution
bool follower_forces
flag for follower forces
Matrix< Real, Dynamic, Dynamic > RealMatrixX
Matrix< Complex, Dynamic, Dynamic > ComplexMatrixX
const RealMatrixX & T_matrix() const
O.
Real piston_theory_dcp_dv(const unsigned int order, const Real vel_U, const Real gamma, const Real mach)
void volume_external_residual_boundary_velocity(const MAST::FunctionBase &p, const unsigned int s, const MAST::FieldFunction< RealVectorX > &vel_f, std::multimap< libMesh::subdomain_id_type, MAST::BoundaryConditionBase * > &bc, bool request_jacobian, RealVectorX &f, RealMatrixX &jac)
boundary velocity contribution of volume external force.
virtual void set_solution(const RealVectorX &vec, bool if_sens=false)
stores vec as solution for element level calculations, or its sensitivity if if_sens is true...
Matrix< Real, Dynamic, 1 > RealVectorX
virtual ~StructuralElementBase()
virtual bool piston_theory_residual(bool request_jacobian, RealVectorX &f, RealMatrixX &jac_xdot, RealMatrixX &jac, MAST::BoundaryConditionBase &bc)=0
Calculates the force vector and Jacobian due to piston-theory based surface pressure on the entire el...
bool linearized_volume_external_residual(bool request_jacobian, RealVectorX &f, RealMatrixX &jac_xdot, RealMatrixX &jac, std::multimap< libMesh::subdomain_id_type, MAST::BoundaryConditionBase * > &bc)
volume external force contribution to system residual.
const MAST::ElementPropertyCardBase & _property
element property
virtual std::unique_ptr< MAST::FEBase > init_side_fe(unsigned int s, bool init_grads, int extra_quadrature_order=0) const
initializes the finite element shape function and quadrature object for the side with the order of qu...
virtual void set_perturbed_solution(const RealVectorX &vec, bool if_sens=false)
This provides the perturbed solution (or its sensitivity if if_sens is true.) for linearized analysis...
This class acts as a wrapper around libMesh::Elem for the purpose of providing a uniform interface fo...
virtual void set_perturbed_velocity(const RealVectorX &vec, bool if_sens=false)
stores vec as perturbed velocity for element level calculations, or its sensitivity if if_sens is tru...
RealVectorX _local_vel_sens
local velocity sensitivity
virtual bool linearized_surface_pressure_residual(bool request_jacobian, RealVectorX &f, RealMatrixX &jac, MAST::BoundaryConditionBase &bc)
Calculates the force vector and Jacobian due to surface pressure applied on the entire element domain...
virtual void external_side_loads_for_quadrature_elem(std::multimap< libMesh::boundary_id_type, MAST::BoundaryConditionBase * > &bc, std::map< unsigned int, std::vector< MAST::BoundaryConditionBase * >> &loads) const
From the given list of boundary loads, this identifies the sides of the quadrature element and the lo...
virtual void set_perturbed_solution(const RealVectorX &vec, bool if_sens=false)
stores vec as perturbed solution for element level calculations, or its sensitivity if if_sens is tru...
void right_multiply_transpose(T &r, const T &m) const
[R] = [this]^T * [M]
virtual void set_solution(const RealVectorX &vec, bool if_sens=false)
stores vec as solution for element level calculations, or its sensitivity if if_sens is true...
bool linearized_frequency_domain_side_external_residual(bool request_jacobian, ComplexVectorX &f, ComplexMatrixX &jac, std::multimap< libMesh::boundary_id_type, MAST::BoundaryConditionBase * > &bc)
Calculates the external force due to frequency domain side external force contribution to system resi...
StructuralElementBase(MAST::SystemInitialization &sys, MAST::AssemblyBase &assembly, const MAST::GeomElem &elem, const MAST::ElementPropertyCardBase &p)
Constructor.
void left_multiply(T &r, const T &m) const
[R] = [M] * [this]
bool volume_external_residual_sensitivity(const MAST::FunctionBase &p, bool request_jacobian, RealVectorX &f, RealMatrixX &jac_xdot, RealMatrixX &jac, std::multimap< libMesh::subdomain_id_type, MAST::BoundaryConditionBase * > &bc)
sensitivity of the volume external force contribution to system residual
virtual bool linearized_internal_residual(bool request_jacobian, RealVectorX &f, RealMatrixX &jac)
internal force contribution to system residual of the linearized problem
RealVectorX _local_delta_accel
local perturbed acceleration
RealVectorX _local_sol
local solution
virtual bool surface_pressure_residual(bool request_jacobian, RealVectorX &f, RealMatrixX &jac, const unsigned int side, MAST::BoundaryConditionBase &bc)=0
Calculates the force vector and Jacobian due to surface pressure.
RealVectorX _local_vel
local velocity
bool linearized_frequency_domain_volume_external_residual(bool request_jacobian, ComplexVectorX &f, ComplexMatrixX &jac, std::multimap< libMesh::subdomain_id_type, MAST::BoundaryConditionBase * > &bc)
Calculates the frequency domain volume external force contribution to system residual.
const ValType & get(const std::string &nm) const
returns a constant reference to the specified function
virtual void set_perturbed_velocity(const RealVectorX &vec, bool if_sens=false)
stores vec as perturbed velocity for element level calculations, or its sensitivity if if_sens is tru...
virtual bool internal_residual(bool request_jacobian, RealVectorX &f, RealMatrixX &jac)=0
internal force contribution to system residual
virtual std::unique_ptr< MAST::FEBase > init_fe(bool init_grads, bool init_second_order_derivative, int extra_quadrature_order=0) const
initializes the finite element shape function and quadrature object with the order of quadrature rule...
const Real & _time
time for which system is being assembled
virtual void set_perturbed_acceleration(const RealVectorX &vec, bool if_sens=false)
stores vec as perturbed acceleration for element level calculations, or its sensitivity if if_sens is...
virtual void inertial_residual_boundary_velocity(const MAST::FunctionBase &p, const unsigned int s, const MAST::FieldFunction< RealVectorX > &vel_f, bool request_jacobian, RealVectorX &f, RealMatrixX &jac_xddot, RealMatrixX &jac_xdot, RealMatrixX &jac)
sensitivity of the inertial force contribution to system residual
void transform_vector_to_global_system(const ValType &local_vec, ValType &global_vec) const
bool linearized_side_external_residual(bool request_jacobian, RealVectorX &f, RealMatrixX &jac_xdot, RealMatrixX &jac, std::multimap< libMesh::boundary_id_type, MAST::BoundaryConditionBase * > &bc)
side external force contribution to system residual.
virtual void set_acceleration(const RealVectorX &vec, bool if_sens=false)
stores vec as acceleration for element level calculations, or its sensitivity if if_sens is true...
bool if_diagonal_mass_matrix() const
returns the type of strain to be used for this element
virtual bool surface_pressure_residual_sensitivity(const MAST::FunctionBase &p, bool request_jacobian, RealVectorX &f, RealMatrixX &jac, const unsigned int side, MAST::BoundaryConditionBase &bc)=0
Calculates the force vector and Jacobian due to surface pressure.
This is the base class for elements that implement calculation of finite element quantities over the ...