42 follower_forces (false),
44 _incompatible_sol (nullptr) {
234 n_phi = (
unsigned int)f.size(),
238 v = RealVectorX::Zero(n2);
241 m = RealMatrixX::Zero(n2, n2);
248 if (request_jacobian)
251 return request_jacobian;
263 std::unique_ptr<MAST::FEBase> fe(
_elem.
init_fe(
false,
false));
265 const std::vector<Real>& JxW = fe->get_JxW();
266 const std::vector<libMesh::Point>& xyz = fe->get_xyz();
267 const std::vector<std::vector<Real> >& phi = fe->get_phi();
270 n_phi = (
unsigned int)phi.size(),
277 mat1_n1n2 = RealMatrixX::Zero(n1, n2),
278 mat2_n2n2 = RealMatrixX::Zero(n2, n2),
279 local_jac = RealMatrixX::Zero(n2, n2);
281 phi_vec = RealVectorX::Zero(n_phi),
282 vec1_n1 = RealVectorX::Zero(n1),
283 vec2_n2 = RealVectorX::Zero(n2),
284 local_f = RealVectorX::Zero(n2);
286 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
293 (*mat_inertia)(xyz[0],
_time, material_mat);
296 const unsigned int nshp = fe->n_shape_functions();
297 for (
unsigned int i=0; i<JxW.size(); i++)
300 for (
unsigned int i_var=0; i_var<6; i_var++)
301 for (
unsigned int i=0; i<nshp; i++)
302 local_jac(i_var*nshp+i, i_var*nshp+i) =
303 vol*material_mat(i_var, i_var);
309 for (
unsigned int qp=0; qp<JxW.size(); qp++) {
311 (*mat_inertia)(xyz[qp],
_time, material_mat);
314 for (
unsigned int i_nd=0; i_nd<n_phi; i_nd++ )
315 phi_vec(i_nd) = phi[i_nd][qp];
317 Bmat.
reinit(n_vars, phi_vec);
324 local_f += JxW[qp] * vec2_n2;
326 if (request_jacobian) {
330 local_jac += JxW[qp]*mat2_n2n2;
340 if (request_jacobian) {
342 jac_xddot += mat2_n2n2;
348 if (request_jacobian)
349 jac_xddot += local_jac;
352 return request_jacobian;
371 n_phi = (
unsigned int)f.size(),
375 v = RealVectorX::Zero(n2);
378 m_xddot = RealMatrixX::Zero(n2, n2),
379 m_xdot = RealMatrixX::Zero(n2, n2),
380 m_x = RealMatrixX::Zero(n2, n2);
389 if (request_jacobian) {
391 jac_xddot += m_xddot;
396 return request_jacobian;
404 bool request_jacobian,
410 std::unique_ptr<MAST::FEBase> fe(
_elem.
init_fe(
false,
false));
412 const std::vector<Real>& JxW = fe->get_JxW();
413 const std::vector<libMesh::Point>& xyz = fe->get_xyz();
414 const std::vector<std::vector<Real> >& phi = fe->get_phi();
417 n_phi = (
unsigned int)phi.size(),
424 mat1_n1n2 = RealMatrixX::Zero(n1, n2),
425 mat2_n2n2 = RealMatrixX::Zero(n2, n2),
426 local_jac = RealMatrixX::Zero(n2, n2);
428 phi_vec = RealVectorX::Zero(n_phi),
429 vec1_n1 = RealVectorX::Zero(n1),
430 vec2_n2 = RealVectorX::Zero(n2),
431 local_f = RealVectorX::Zero(n2);
433 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
441 mat_inertia->derivative(p, xyz[0],
_time, material_mat);
444 const unsigned int nshp = fe->n_shape_functions();
445 for (
unsigned int i=0; i<JxW.size(); i++)
448 for (
unsigned int i_var=0; i_var<6; i_var++)
449 for (
unsigned int i=0; i<nshp; i++)
450 local_jac(i_var*nshp+i, i_var*nshp+i) =
451 vol*material_mat(i_var, i_var);
457 for (
unsigned int qp=0; qp<JxW.size(); qp++) {
459 mat_inertia->derivative(p, xyz[qp],
_time, material_mat);
462 for (
unsigned int i_nd=0; i_nd<n_phi; i_nd++ )
463 phi_vec(i_nd) = phi[i_nd][qp];
465 Bmat.
reinit(n_vars, phi_vec);
472 local_f += JxW[qp] * vec2_n2;
474 if (request_jacobian) {
478 local_jac += JxW[qp]*mat2_n2n2;
488 if (request_jacobian) {
490 jac_xddot += mat2_n2n2;
496 if (request_jacobian)
497 jac_xddot += local_jac;
500 return request_jacobian;
509 const unsigned int s,
511 bool request_jacobian,
520 std::vector<Real> JxW_Vn = fe->get_JxW();
521 const std::vector<libMesh::Point>& xyz = fe->get_xyz();
522 const std::vector<std::vector<Real> >& phi = fe->get_phi();
523 const std::vector<libMesh::Point>& face_normals = fe->get_normals_for_local_coordinate();
526 n_phi = (
unsigned int)phi.size(),
534 mat1_n1n2 = RealMatrixX::Zero(n1, n2),
535 mat2_n2n2 = RealMatrixX::Zero(n2, n2),
536 local_jac = RealMatrixX::Zero(n2, n2);
538 phi_vec = RealVectorX::Zero(n_phi),
539 vec1_n1 = RealVectorX::Zero(n1),
540 vec2_n2 = RealVectorX::Zero(n2),
541 local_f = RealVectorX::Zero(n2),
542 vel = RealVectorX::Zero(dim);
548 for (
unsigned int qp=0; qp<JxW_Vn.size(); qp++) {
552 for (
unsigned int i=0; i<dim; i++)
553 vn += vel(i)*face_normals[qp](i);
558 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
565 (*mat_inertia)(xyz[0],
_time, material_mat);
568 const unsigned int nshp = fe->n_shape_functions();
569 for (
unsigned int i=0; i<JxW_Vn.size(); i++)
572 for (
unsigned int i_var=0; i_var<6; i_var++)
573 for (
unsigned int i=0; i<nshp; i++)
574 local_jac(i_var*nshp+i, i_var*nshp+i) =
575 vol*material_mat(i_var, i_var);
581 for (
unsigned int qp=0; qp<JxW_Vn.size(); qp++) {
583 (*mat_inertia)(xyz[qp],
_time, material_mat);
586 for (
unsigned int i_nd=0; i_nd<n_phi; i_nd++ )
587 phi_vec(i_nd) = phi[i_nd][qp];
589 Bmat.
reinit(n_vars, phi_vec);
596 local_f += JxW_Vn[qp] * vec2_n2;
598 if (request_jacobian) {
602 local_jac += JxW_Vn[qp]*mat2_n2n2;
612 if (request_jacobian) {
614 jac_xddot += mat2_n2n2;
620 if (request_jacobian)
621 jac_xddot += local_jac;
634 std::multimap<libMesh::boundary_id_type, MAST::BoundaryConditionBase*>& bc) {
636 std::map<unsigned int, std::vector<MAST::BoundaryConditionBase*>> loads;
639 std::map<unsigned int, std::vector<MAST::BoundaryConditionBase*>>::const_iterator
643 for ( ; it != end; it++) {
645 std::vector<MAST::BoundaryConditionBase*>::const_iterator
646 bc_it = it->second.begin(),
647 bc_end = it->second.end();
649 for ( ; bc_it != bc_end; bc_it++) {
652 switch ((*bc_it)->type()) {
700 return request_jacobian;
706 (
bool request_jacobian,
710 std::multimap<libMesh::boundary_id_type, MAST::BoundaryConditionBase*>& bc) {
712 std::map<unsigned int, std::vector<MAST::BoundaryConditionBase*>> loads;
715 std::map<unsigned int, std::vector<MAST::BoundaryConditionBase*>>::const_iterator
719 for ( ; it != end; it++) {
721 std::vector<MAST::BoundaryConditionBase*>::const_iterator
722 bc_it = it->second.begin(),
723 bc_end = it->second.end();
725 for ( ; bc_it != bc_end; bc_it++) {
728 switch ((*bc_it)->type()) {
744 return request_jacobian;
752 (
bool request_jacobian,
755 std::multimap<libMesh::boundary_id_type, MAST::BoundaryConditionBase*>& bc) {
757 std::map<unsigned int, std::vector<MAST::BoundaryConditionBase*>> loads;
760 std::map<unsigned int, std::vector<MAST::BoundaryConditionBase*>>::const_iterator
764 for ( ; it != end; it++) {
766 std::vector<MAST::BoundaryConditionBase*>::const_iterator
767 bc_it = it->second.begin(),
768 bc_end = it->second.end();
770 for ( ; bc_it != bc_end; bc_it++) {
773 switch ((*bc_it)->type()) {
797 return request_jacobian;
809 std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>& bc) {
812 std::pair<std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>::const_iterator,
813 std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>::const_iterator> it;
820 it =bc.equal_range(sid);
822 for ( ; it.first != it.second; it.first++) {
824 switch (it.first->second->type()) {
854 return request_jacobian;
866 std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>& bc) {
869 std::pair<std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>::const_iterator,
870 std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>::const_iterator> it;
877 it =bc.equal_range(sid);
879 for ( ; it.first != it.second; it.first++) {
881 switch (it.first->second->type()) {
892 n = (
unsigned int) f.size();
895 local_f = RealVectorX::Zero(n);
897 mat = RealMatrixX::Zero(n, n);
914 return request_jacobian;
923 (
bool request_jacobian,
926 std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>& bc) {
929 std::pair<std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>::const_iterator,
930 std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>::const_iterator> it;
937 it =bc.equal_range(sid);
939 for ( ; it.first != it.second; it.first++) {
941 switch (it.first->second->type()) {
961 return request_jacobian;
973 bool request_jacobian,
977 std::multimap<libMesh::boundary_id_type, MAST::BoundaryConditionBase*>& bc) {
979 std::map<unsigned int, std::vector<MAST::BoundaryConditionBase*>> loads;
982 std::map<unsigned int, std::vector<MAST::BoundaryConditionBase*>>::const_iterator
986 for ( ; it != end; it++) {
988 std::vector<MAST::BoundaryConditionBase*>::const_iterator
989 bc_it = it->second.begin(),
990 bc_end = it->second.end();
992 for ( ; bc_it != bc_end; bc_it++) {
995 switch ((*bc_it)->type()) {
1047 return request_jacobian;
1055 bool request_jacobian,
1059 std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>& bc) {
1062 std::pair<std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>::const_iterator,
1063 std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>::const_iterator> it;
1070 it =bc.equal_range(sid);
1072 for ( ; it.first != it.second; it.first++) {
1074 switch (it.first->second->type()) {
1106 return request_jacobian;
1114 const unsigned int s,
1116 std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>& bc,
1117 bool request_jacobian,
1122 std::pair<std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>::const_iterator,
1123 std::multimap<libMesh::subdomain_id_type, MAST::BoundaryConditionBase*>::const_iterator> it;
1130 it =bc.equal_range(sid);
1132 for ( ; it.first != it.second; it.first++) {
1134 switch (it.first->second->type()) {
1177 std::unique_ptr<MAST::FEBase> fe(
_elem.
init_fe(
false,
false));
1179 const std::vector<Real> &JxW = fe->get_JxW();
1180 const std::vector<libMesh::Point>& qpoint = fe->get_xyz();
1181 const std::vector<std::vector<Real> >& phi = fe->get_phi();
1183 n_phi = (
unsigned int)phi.size(),
1189 libMesh::Point normal;
1203 phi_vec = RealVectorX::Zero(n_phi),
1204 force = RealVectorX::Zero(2*n1),
1205 local_f = RealVectorX::Zero(n2),
1206 vec_n2 = RealVectorX::Zero(n2);
1209 for (
unsigned int qp=0; qp<qpoint.size(); qp++) {
1212 for (
unsigned int i_nd=0; i_nd<n_phi; i_nd++ )
1213 phi_vec(i_nd) = phi[i_nd][qp];
1215 Bmat.
reinit(2*n1, phi_vec);
1218 func(qpoint[qp],
_time, press);
1221 for (
unsigned int i_dim=0; i_dim<n1; i_dim++)
1222 force(i_dim) = press * normal(i_dim);
1226 local_f += JxW[qp] * vec_n2;
1234 return (request_jacobian);
1245 bool request_jacobian,
1253 std::unique_ptr<MAST::FEBase> fe(
_elem.
init_fe(
false,
false));
1255 const std::vector<Real> &JxW = fe->get_JxW();
1256 const std::vector<libMesh::Point>& qpoint = fe->get_xyz();
1257 const std::vector<std::vector<Real> >& phi = fe->get_phi();
1259 n_phi = (
unsigned int)phi.size(),
1265 libMesh::Point normal;
1279 phi_vec = RealVectorX::Zero(n_phi),
1280 force = RealVectorX::Zero(2*n1),
1281 local_f = RealVectorX::Zero(n2),
1282 vec_n2 = RealVectorX::Zero(n2);
1285 for (
unsigned int qp=0; qp<qpoint.size(); qp++) {
1288 for (
unsigned int i_nd=0; i_nd<n_phi; i_nd++ )
1289 phi_vec(i_nd) = phi[i_nd][qp];
1291 Bmat.
reinit(2*n1, phi_vec);
1294 func.derivative(p, qpoint[qp],
_time, press);
1297 for (
unsigned int i_dim=0; i_dim<n1; i_dim++)
1298 force(i_dim) = press * normal(i_dim);
1302 local_f += JxW[qp] * vec_n2;
1310 return (request_jacobian);
1319 const unsigned int s,
1322 bool request_jacobian,
1332 std::vector<Real> JxW_Vn = fe->get_JxW();
1333 const std::vector<libMesh::Point>& xyz = fe->get_xyz();
1334 const std::vector<libMesh::Point>& face_normals = fe->get_normals_for_local_coordinate();
1335 const std::vector<std::vector<Real> >& phi = fe->get_phi();
1338 n_phi = (
unsigned int)phi.size(),
1345 libMesh::Point normal;
1359 phi_vec = RealVectorX::Zero(n_phi),
1360 force = RealVectorX::Zero(2*n1),
1361 local_f = RealVectorX::Zero(n2),
1362 vec_n2 = RealVectorX::Zero(n2),
1363 vel = RealVectorX::Zero(dim);
1370 for (
unsigned int qp=0; qp<JxW_Vn.size(); qp++) {
1374 for (
unsigned int i=0; i<dim; i++)
1375 vn += vel(i)*face_normals[qp](i);
1380 for (
unsigned int qp=0; qp<xyz.size(); qp++) {
1383 for (
unsigned int i_nd=0; i_nd<n_phi; i_nd++ )
1384 phi_vec(i_nd) = phi[i_nd][qp];
1386 Bmat.
reinit(2*n1, phi_vec);
1389 func(xyz[qp],
_time, press);
1392 for (
unsigned int i_dim=0; i_dim<n1; i_dim++)
1393 force(i_dim) = press * normal(i_dim);
1397 local_f += JxW_Vn[qp] * vec_n2;
1423 std::unique_ptr<MAST::FEBase> fe(
_elem.
init_fe(
false,
false));
1425 const std::vector<Real> &JxW = fe->get_JxW();
1426 const std::vector<libMesh::Point>& qpoint = fe->get_xyz();
1427 const std::vector<std::vector<Real> >& phi = fe->get_phi();
1429 n_phi = (
unsigned int)phi.size(),
1434 libMesh::Point normal;
1440 phi_vec = RealVectorX::Zero(n_phi),
1441 w = RealVectorX::Zero(3),
1442 dn_rot = RealVectorX::Zero(3),
1443 force = RealVectorX::Zero(2*n1),
1444 local_f = RealVectorX::Zero(n2),
1445 vec_n2 = RealVectorX::Zero(n2);
1453 for (
unsigned int qp=0; qp<qpoint.size(); qp++) {
1456 for (
unsigned int i_nd=0; i_nd<n_phi; i_nd++ )
1457 phi_vec(i_nd) = phi[i_nd][qp];
1459 Bmat.
reinit(2*n1, phi_vec);
1462 press_fn (qpoint[qp],
_time, press);
1463 press_fn.perturbation(qpoint[qp],
_time, dpress);
1466 for (
unsigned int i_dim=0; i_dim<n1; i_dim++)
1467 force(i_dim) = ( press * dn_rot(i_dim) +
1468 dpress * normal(i_dim));
1472 local_f += JxW[qp] * vec_n2;
1480 return (request_jacobian);
1489 (
bool request_jacobian,
1503 std::unique_ptr<MAST::FEBase> fe(
_elem.
init_fe(
false,
false));
1505 const std::vector<Real> &JxW = fe->get_JxW();
1506 const std::vector<libMesh::Point>& qpoint = fe->get_xyz();
1507 const std::vector<std::vector<Real> >& phi = fe->get_phi();
1509 n_phi = (
unsigned int)phi.size(),
1514 libMesh::Point normal;
1521 w = ComplexVectorX::Zero(3),
1522 dn_rot = ComplexVectorX::Zero(3),
1523 force = ComplexVectorX::Zero(2*n1),
1524 local_f = ComplexVectorX::Zero(n2),
1525 vec_n2 = ComplexVectorX::Zero(n2);
1532 for (
unsigned int qp=0; qp<qpoint.size(); qp++) {
1535 for (
unsigned int i_nd=0; i_nd<n_phi; i_nd++ )
1536 phi_vec(i_nd) = phi[i_nd][qp];
1538 Bmat.
reinit(2*n1, phi_vec);
1541 press_fn (qpoint[qp],
_time, press);
1542 dpress_fn(qpoint[qp],
_time, dpress);
1546 for (
unsigned int i_dim=0; i_dim<n1; i_dim++)
1547 force(i_dim) = ( press * dn_rot(i_dim) +
1548 dpress * normal(i_dim));
1552 local_f += JxW[qp] * vec_n2;
1560 return (request_jacobian);
1565 template <
typename ValType>
1569 ValType& global_mat)
const {
1572 libmesh_assert_less(
_elem.
dim(), 3);
1573 libmesh_assert_equal_to( local_mat.rows(), local_mat.cols());
1574 libmesh_assert_equal_to(global_mat.rows(), global_mat.cols());
1575 libmesh_assert_equal_to( local_mat.rows(), global_mat.rows());
1580 const unsigned int n_dofs = local_mat.rows()/6;
1582 ValType mat(6*n_dofs, 6*n_dofs);
1585 global_mat.setZero();
1589 for (
unsigned int i=0; i<n_dofs; i++)
1590 for (
unsigned int j=0; j<3; j++)
1591 for (
unsigned int k=0; k<3; k++) {
1592 mat(j*n_dofs+i, k*n_dofs+i) = Tmat(j,k);
1593 mat((j+3)*n_dofs+i, (k+3)*n_dofs+i) = Tmat(j,k);
1597 global_mat = mat * local_mat * mat.transpose();
1600 global_mat = local_mat;
1605 template <
typename ValType>
1609 ValType& local_vec)
const {
1612 libmesh_assert_less(
_elem.
dim(), 3);
1613 libmesh_assert_equal_to( local_vec.size(), global_vec.size());
1618 const unsigned int n_dofs = global_vec.size()/6;
1619 RealMatrixX mat = RealMatrixX::Zero(6*n_dofs, 6*n_dofs);
1621 local_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 local_vec = mat.transpose() * global_vec;
1636 local_vec = global_vec;
1641 template <
typename ValType>
1645 ValType& global_vec)
const {
1648 libmesh_assert_less(
_elem.
dim(), 3);
1649 libmesh_assert_equal_to( local_vec.size(), global_vec.size());
1654 const unsigned int n_dofs = local_vec.size()/6;
1656 RealMatrixX mat = RealMatrixX::Zero(6*n_dofs, 6*n_dofs);
1658 global_vec.setZero();
1662 for (
unsigned int i=0; i<n_dofs; i++)
1663 for (
unsigned int j=0; j<3; j++)
1664 for (
unsigned int k=0; k<3; k++) {
1665 mat(j*n_dofs+i, k*n_dofs+i) = Tmat(j,k);
1666 mat((j+3)*n_dofs+i, (k+3)*n_dofs+i) = Tmat(j,k);
1670 global_vec = mat* local_vec;
1673 global_vec = local_vec;
1680 std::unique_ptr<MAST::StructuralElementBase>
1685 std::unique_ptr<MAST::StructuralElementBase> e;
1687 switch (elem.
dim()) {
1721 cp += (gamma+1.0)/12.0*mach*mach*pow(vel_U,3);
1723 cp += (gamma+1.0)/4.0*mach*pow(vel_U,2);
1726 cp *= 2.0/pow(mach*mach-1.,0.5);
1731 libmesh_error_msg(
"Invalid Piston Theory Order: " << order);
1752 dcp_dvn += (gamma+1.0)/4.0*mach*mach*pow(vel_U,2);
1754 dcp_dvn += (gamma+1.0)/2.0*mach*vel_U;
1757 dcp_dvn *= 2.0/pow(mach*mach-1.,.5);
1762 libmesh_error_msg(
"Invalid Piston Theory Order: " << order);
1775 MAST::StructuralElementBase::transform_matrix_to_global_system<RealMatrixX>
1782 MAST::StructuralElementBase::transform_vector_to_local_system<RealVectorX>
1789 MAST::StructuralElementBase::transform_vector_to_global_system<RealVectorX>
1796 MAST::StructuralElementBase::transform_matrix_to_global_system<ComplexMatrixX>
1803 MAST::StructuralElementBase::transform_vector_to_local_system<ComplexVectorX>
1810 MAST::StructuralElementBase::transform_vector_to_global_system<ComplexVectorX>
RealVectorX _local_accel_sens
local acceleration sensitivity
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.
MAST::NonlinearSystem & system()
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 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.
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 const libMesh::Elem & get_reference_elem() const
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
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...
Matrix< Complex, Dynamic, 1 > ComplexVectorX
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 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.
virtual void derivative(const MAST::FunctionBase &f, ValType &v) const
calculates the value of the function derivative and returns it in v.
RealVectorX _local_sol_sens
local solution sensitivity
MAST::SystemInitialization & _system
SystemInitialization object associated with this element.
void transform_vector_to_local_system(const ValType &global_vec, ValType &local_vec) const
Real piston_theory_cp(const unsigned int order, const Real vel_U, const Real gamma, const Real mach)
RealVectorX _local_delta_vel
local perturbed velocity
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > inertia_matrix(const MAST::ElementBase &e) const =0
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...
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
RealVectorX _local_delta_sol
local perturbed solution
bool follower_forces
flag for follower forces
Matrix< Real, Dynamic, Dynamic > RealMatrixX
Matrix< Complex, Dynamic, Dynamic > ComplexMatrixX
Real piston_theory_dcp_dv(const unsigned int order, const Real vel_U, const Real gamma, const Real mach)
virtual bool surface_traction_residual_sensitivity(const MAST::FunctionBase &p, bool request_jacobian, RealVectorX &f, RealMatrixX &jac, const unsigned int side, MAST::BoundaryConditionBase &bc)=0
Calculates the sensitivity of element vector and matrix quantities for surface traction boundary cond...
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.
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...
void vector_mult_transpose(T &res, const T &v) const
res = v^T * [this]
Matrix< Real, Dynamic, 1 > RealVectorX
virtual ~StructuralElementBase()
void right_multiply_transpose(T &r, const T &m) const
[R] = [this]^T * [M]
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.
std::unique_ptr< MAST::StructuralElementBase > build_structural_element(MAST::SystemInitialization &sys, const MAST::GeomElem &elem, const MAST::ElementPropertyCardBase &p)
builds the structural element for the specified element type
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...
const MAST::ElementPropertyCardBase & _property
element property
virtual bool surface_traction_residual_shifted_boundary_sensitivity(const MAST::FunctionBase &p, bool request_jacobian, RealVectorX &f, RealMatrixX &jac, const unsigned int side, MAST::BoundaryConditionBase &bc)=0
Calculates the sensitivity of force vector and Jacobian due to surface traction and sensitiity due to...
const RealMatrixX & T_matrix() const
O.
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...
StructuralElementBase(MAST::SystemInitialization &sys, const MAST::GeomElem &elem, const MAST::ElementPropertyCardBase &p)
Constructor.
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...
virtual bool surface_traction_residual_shifted_boundary(bool request_jacobian, RealVectorX &f, RealMatrixX &jac, const unsigned int side, MAST::BoundaryConditionBase &bc)=0
Calculates the sensitivity of force vector and Jacobian due to surface traction and sensitiity due to...
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...
bool if_diagonal_mass_matrix() const
returns the type of strain to be used for this element
const ValType & get(const std::string &nm) const
returns a constant reference to the specified function
const MAST::GeomElem & elem() const
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...
virtual std::unique_ptr< MAST::FEBase > init_side_fe(unsigned int s, bool init_grads, bool init_second_order_derivative, int extra_quadrature_order=0) const
initializes the finite element shape function and quadrature object for the side with the order of qu...
MAST::BoundaryConditionType type() const
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 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
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.
void transform_matrix_to_global_system(const ValType &local_mat, ValType &global_mat) const
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...
void left_multiply(T &r, const T &m) const
[R] = [M] * [this]
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.
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
RealVectorX _local_vel
local velocity
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 surface_traction_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 traction.
virtual bool internal_residual(bool request_jacobian, RealVectorX &f, RealMatrixX &jac)=0
internal force contribution to system residual
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 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_acceleration(const RealVectorX &vec, bool if_sens=false)
stores vec as acceleration for element level calculations, or its sensitivity if if_sens is true...
void transform_vector_to_global_system(const ValType &local_vec, ValType &global_vec) const
bool use_local_elem() const
Vector and matrix quantities defined on one- and two-dimensional elements that are oriented in two or...
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 ...