libMesh
Public Member Functions | Private Attributes | List of all members
libMesh::BoundaryProjectSolution Class Reference

This class implements projecting an arbitrary boundary function to the current mesh. More...

Public Member Functions

 BoundaryProjectSolution (const std::set< boundary_id_type > &b_in, const std::vector< unsigned int > &variables_in, const System &system_in, FunctionBase< Number > *f_in, FunctionBase< Gradient > *g_in, const Parameters &parameters_in, NumericVector< Number > &new_v_in)
 
 BoundaryProjectSolution (const BoundaryProjectSolution &in)
 
void operator() (const ConstElemRange &range) const
 

Private Attributes

const std::set< boundary_id_type > & b
 
const std::vector< unsigned int > & variables
 
const Systemsystem
 
std::unique_ptr< FunctionBase< Number > > f
 
std::unique_ptr< FunctionBase< Gradient > > g
 
const Parametersparameters
 
NumericVector< Number > & new_vector
 

Detailed Description

This class implements projecting an arbitrary boundary function to the current mesh.

This may be executed in parallel on multiple threads.

Definition at line 197 of file system_projection.C.

Constructor & Destructor Documentation

◆ BoundaryProjectSolution() [1/2]

libMesh::BoundaryProjectSolution::BoundaryProjectSolution ( const std::set< boundary_id_type > &  b_in,
const std::vector< unsigned int > &  variables_in,
const System system_in,
FunctionBase< Number > *  f_in,
FunctionBase< Gradient > *  g_in,
const Parameters parameters_in,
NumericVector< Number > &  new_v_in 
)
inline

Definition at line 209 of file system_projection.C.

215  :
216  b(b_in),
217  variables(variables_in),
218  system(system_in),
219  f(f_in ? f_in->clone() : std::unique_ptr<FunctionBase<Number>>()),
220  g(g_in ? g_in->clone() : std::unique_ptr<FunctionBase<Gradient>>()),
221  parameters(parameters_in),
222  new_vector(new_v_in)
223  {
224  libmesh_assert(f.get());
225  f->init();
226  if (g.get())
227  g->init();
228  }

References libMesh::libmesh_assert().

◆ BoundaryProjectSolution() [2/2]

libMesh::BoundaryProjectSolution::BoundaryProjectSolution ( const BoundaryProjectSolution in)
inline

Definition at line 230 of file system_projection.C.

230  :
231  b(in.b),
232  variables(in.variables),
233  system(in.system),
234  f(in.f.get() ? in.f->clone() : std::unique_ptr<FunctionBase<Number>>()),
235  g(in.g.get() ? in.g->clone() : std::unique_ptr<FunctionBase<Gradient>>()),
236  parameters(in.parameters),
237  new_vector(in.new_vector)
238  {
239  libmesh_assert(f.get());
240  f->init();
241  if (g.get())
242  g->init();
243  }

References libMesh::libmesh_assert().

Member Function Documentation

◆ operator()()

void libMesh::BoundaryProjectSolution::operator() ( const ConstElemRange range) const

This method projects an arbitrary boundary solution to the current mesh. The input function f gives the arbitrary solution, while the new_vector (which should already be correctly sized) gives the solution (to be computed) on the current mesh.

Definition at line 1325 of file system_projection.C.

1326 {
1327  // We need data to project
1328  libmesh_assert(f.get());
1329 
1337  // The dimensionality of the current mesh
1338  const unsigned int dim = system.get_mesh().mesh_dimension();
1339 
1340  // The DofMap for this system
1341  const DofMap & dof_map = system.get_dof_map();
1342 
1343  // Boundary info for the current mesh
1344  const BoundaryInfo & boundary_info =
1346 
1347  // The element matrix and RHS for projections.
1348  // Note that Ke is always real-valued, whereas
1349  // Fe may be complex valued if complex number
1350  // support is enabled
1351  DenseMatrix<Real> Ke;
1352  DenseVector<Number> Fe;
1353  // The new element coefficients
1354  DenseVector<Number> Ue;
1355 
1356 
1357  // Loop over all the variables we've been requested to project
1358  for (auto v : IntRange<std::size_t>(0, variables.size()))
1359  {
1360  const unsigned int var = variables[v];
1361 
1362  const Variable & variable = dof_map.variable(var);
1363 
1364  const FEType & fe_type = variable.type();
1365 
1366  if (fe_type.family == SCALAR)
1367  continue;
1368 
1369  const unsigned int var_component =
1371 
1372  // Get FE objects of the appropriate type
1373  std::unique_ptr<FEBase> fe (FEBase::build(dim, fe_type));
1374 
1375  // Prepare variables for projection
1376  std::unique_ptr<QBase> qedgerule (fe_type.default_quadrature_rule(1));
1377  std::unique_ptr<QBase> qsiderule (fe_type.default_quadrature_rule(dim-1));
1378 
1379  // The values of the shape functions at the quadrature
1380  // points
1381  const std::vector<std::vector<Real>> & phi = fe->get_phi();
1382 
1383  // The gradients of the shape functions at the quadrature
1384  // points on the child element.
1385  const std::vector<std::vector<RealGradient>> * dphi = nullptr;
1386 
1387  const FEContinuity cont = fe->get_continuity();
1388 
1389  if (cont == C_ONE)
1390  {
1391  // We'll need gradient data for a C1 projection
1392  libmesh_assert(g.get());
1393 
1394  const std::vector<std::vector<RealGradient>> &
1395  ref_dphi = fe->get_dphi();
1396  dphi = &ref_dphi;
1397  }
1398 
1399  // The Jacobian * quadrature weight at the quadrature points
1400  const std::vector<Real> & JxW =
1401  fe->get_JxW();
1402 
1403  // The XYZ locations of the quadrature points
1404  const std::vector<Point> & xyz_values =
1405  fe->get_xyz();
1406 
1407  // The global DOF indices
1408  std::vector<dof_id_type> dof_indices;
1409  // Side/edge DOF indices
1410  std::vector<unsigned int> side_dofs;
1411 
1412  // Container to catch IDs passed back from BoundaryInfo.
1413  std::vector<boundary_id_type> bc_ids;
1414 
1415  // Iterate over all the elements in the range
1416  for (const auto & elem : range)
1417  {
1418  // Per-subdomain variables don't need to be projected on
1419  // elements where they're not active
1420  if (!variable.active_on_subdomain(elem->subdomain_id()))
1421  continue;
1422 
1423  const unsigned short n_nodes = elem->n_nodes();
1424  const unsigned short n_edges = elem->n_edges();
1425  const unsigned short n_sides = elem->n_sides();
1426 
1427  // Find out which nodes, edges and sides are on a requested
1428  // boundary:
1429  std::vector<bool> is_boundary_node(n_nodes, false),
1430  is_boundary_edge(n_edges, false),
1431  is_boundary_side(n_sides, false);
1432 
1433  // We also maintain a separate list of nodeset-based boundary nodes
1434  std::vector<bool> is_boundary_nodeset(n_nodes, false);
1435 
1436  for (unsigned char s=0; s != n_sides; ++s)
1437  {
1438  // First see if this side has been requested
1439  boundary_info.boundary_ids (elem, s, bc_ids);
1440  bool do_this_side = false;
1441  for (const auto & bc_id : bc_ids)
1442  if (b.count(bc_id))
1443  {
1444  do_this_side = true;
1445  break;
1446  }
1447  if (!do_this_side)
1448  continue;
1449 
1450  is_boundary_side[s] = true;
1451 
1452  // Then see what nodes and what edges are on it
1453  for (unsigned int n=0; n != n_nodes; ++n)
1454  if (elem->is_node_on_side(n,s))
1455  is_boundary_node[n] = true;
1456  for (unsigned int e=0; e != n_edges; ++e)
1457  if (elem->is_edge_on_side(e,s))
1458  is_boundary_edge[e] = true;
1459  }
1460 
1461  // We can also project on nodes, so we should also independently
1462  // check whether the nodes have been requested
1463  for (unsigned int n=0; n != n_nodes; ++n)
1464  {
1465  boundary_info.boundary_ids (elem->node_ptr(n), bc_ids);
1466 
1467  for (const auto & bc_id : bc_ids)
1468  if (b.count(bc_id))
1469  {
1470  is_boundary_node[n] = true;
1471  is_boundary_nodeset[n] = true;
1472  }
1473  }
1474 
1475  // We can also project on edges, so we should also independently
1476  // check whether the edges have been requested
1477  for (unsigned short e=0; e != n_edges; ++e)
1478  {
1479  boundary_info.edge_boundary_ids (elem, e, bc_ids);
1480 
1481  for (const auto & bc_id : bc_ids)
1482  if (b.count(bc_id))
1483  is_boundary_edge[e] = true;
1484  }
1485 
1486  // Update the DOF indices for this element based on
1487  // the current mesh
1488  dof_map.dof_indices (elem, dof_indices, var);
1489 
1490  // The number of DOFs on the element
1491  const unsigned int n_dofs =
1492  cast_int<unsigned int>(dof_indices.size());
1493 
1494  // Fixed vs. free DoFs on edge/face projections
1495  std::vector<char> dof_is_fixed(n_dofs, false); // bools
1496  std::vector<int> free_dof(n_dofs, 0);
1497 
1498  // The element type
1499  const ElemType elem_type = elem->type();
1500 
1501  // Zero the interpolated values
1502  Ue.resize (n_dofs); Ue.zero();
1503 
1504  // In general, we need a series of
1505  // projections to ensure a unique and continuous
1506  // solution. We start by interpolating boundary nodes, then
1507  // hold those fixed and project boundary edges, then hold
1508  // those fixed and project boundary faces,
1509 
1510  // Interpolate node values first
1511  unsigned int current_dof = 0;
1512  for (unsigned short n = 0; n != n_nodes; ++n)
1513  {
1514  // FIXME: this should go through the DofMap,
1515  // not duplicate dof_indices code badly!
1516  const unsigned int nc =
1517  FEInterface::n_dofs_at_node (dim, fe_type, elem_type,
1518  n);
1519  if ((!elem->is_vertex(n) || !is_boundary_node[n]) &&
1520  !is_boundary_nodeset[n])
1521  {
1522  current_dof += nc;
1523  continue;
1524  }
1525  if (cont == DISCONTINUOUS)
1526  {
1527  libmesh_assert_equal_to (nc, 0);
1528  }
1529  // Assume that C_ZERO elements have a single nodal
1530  // value shape function
1531  else if (cont == C_ZERO)
1532  {
1533  libmesh_assert_equal_to (nc, 1);
1534  Ue(current_dof) = f->component(var_component,
1535  elem->point(n),
1536  system.time);
1537  dof_is_fixed[current_dof] = true;
1538  current_dof++;
1539  }
1540  // The hermite element vertex shape functions are weird
1541  else if (fe_type.family == HERMITE)
1542  {
1543  Ue(current_dof) = f->component(var_component,
1544  elem->point(n),
1545  system.time);
1546  dof_is_fixed[current_dof] = true;
1547  current_dof++;
1548  Gradient grad = g->component(var_component,
1549  elem->point(n),
1550  system.time);
1551  // x derivative
1552  Ue(current_dof) = grad(0);
1553  dof_is_fixed[current_dof] = true;
1554  current_dof++;
1555 #if LIBMESH_DIM > 1
1556  if (dim > 1)
1557  {
1558  // We'll finite difference mixed derivatives
1559  Point nxminus = elem->point(n),
1560  nxplus = elem->point(n);
1561  nxminus(0) -= TOLERANCE;
1562  nxplus(0) += TOLERANCE;
1563  Gradient gxminus = g->component(var_component,
1564  nxminus,
1565  system.time);
1566  Gradient gxplus = g->component(var_component,
1567  nxplus,
1568  system.time);
1569  // y derivative
1570  Ue(current_dof) = grad(1);
1571  dof_is_fixed[current_dof] = true;
1572  current_dof++;
1573  // xy derivative
1574  Ue(current_dof) = (gxplus(1) - gxminus(1))
1575  / 2. / TOLERANCE;
1576  dof_is_fixed[current_dof] = true;
1577  current_dof++;
1578 
1579 #if LIBMESH_DIM > 2
1580  if (dim > 2)
1581  {
1582  // z derivative
1583  Ue(current_dof) = grad(2);
1584  dof_is_fixed[current_dof] = true;
1585  current_dof++;
1586  // xz derivative
1587  Ue(current_dof) = (gxplus(2) - gxminus(2))
1588  / 2. / TOLERANCE;
1589  dof_is_fixed[current_dof] = true;
1590  current_dof++;
1591  // We need new points for yz
1592  Point nyminus = elem->point(n),
1593  nyplus = elem->point(n);
1594  nyminus(1) -= TOLERANCE;
1595  nyplus(1) += TOLERANCE;
1596  Gradient gyminus = g->component(var_component,
1597  nyminus,
1598  system.time);
1599  Gradient gyplus = g->component(var_component,
1600  nyplus,
1601  system.time);
1602  // xz derivative
1603  Ue(current_dof) = (gyplus(2) - gyminus(2))
1604  / 2. / TOLERANCE;
1605  dof_is_fixed[current_dof] = true;
1606  current_dof++;
1607  // Getting a 2nd order xyz is more tedious
1608  Point nxmym = elem->point(n),
1609  nxmyp = elem->point(n),
1610  nxpym = elem->point(n),
1611  nxpyp = elem->point(n);
1612  nxmym(0) -= TOLERANCE;
1613  nxmym(1) -= TOLERANCE;
1614  nxmyp(0) -= TOLERANCE;
1615  nxmyp(1) += TOLERANCE;
1616  nxpym(0) += TOLERANCE;
1617  nxpym(1) -= TOLERANCE;
1618  nxpyp(0) += TOLERANCE;
1619  nxpyp(1) += TOLERANCE;
1620  Gradient gxmym = g->component(var_component,
1621  nxmym,
1622  system.time);
1623  Gradient gxmyp = g->component(var_component,
1624  nxmyp,
1625  system.time);
1626  Gradient gxpym = g->component(var_component,
1627  nxpym,
1628  system.time);
1629  Gradient gxpyp = g->component(var_component,
1630  nxpyp,
1631  system.time);
1632  Number gxzplus = (gxpyp(2) - gxmyp(2))
1633  / 2. / TOLERANCE;
1634  Number gxzminus = (gxpym(2) - gxmym(2))
1635  / 2. / TOLERANCE;
1636  // xyz derivative
1637  Ue(current_dof) = (gxzplus - gxzminus)
1638  / 2. / TOLERANCE;
1639  dof_is_fixed[current_dof] = true;
1640  current_dof++;
1641  }
1642 #endif // LIBMESH_DIM > 2
1643  }
1644 #endif // LIBMESH_DIM > 1
1645  }
1646  // Assume that other C_ONE elements have a single nodal
1647  // value shape function and nodal gradient component
1648  // shape functions
1649  else if (cont == C_ONE)
1650  {
1651  libmesh_assert_equal_to (nc, 1 + dim);
1652  Ue(current_dof) = f->component(var_component,
1653  elem->point(n),
1654  system.time);
1655  dof_is_fixed[current_dof] = true;
1656  current_dof++;
1657  Gradient grad = g->component(var_component,
1658  elem->point(n),
1659  system.time);
1660  for (unsigned int i=0; i!= dim; ++i)
1661  {
1662  Ue(current_dof) = grad(i);
1663  dof_is_fixed[current_dof] = true;
1664  current_dof++;
1665  }
1666  }
1667  else
1668  libmesh_error_msg("Unknown continuity " << cont);
1669  }
1670 
1671  // In 3D, project any edge values next
1672  if (dim > 2 && cont != DISCONTINUOUS)
1673  for (unsigned short e = 0; e != n_edges; ++e)
1674  {
1675  if (!is_boundary_edge[e])
1676  continue;
1677 
1678  FEInterface::dofs_on_edge(elem, dim, fe_type, e,
1679  side_dofs);
1680 
1681  const unsigned int n_side_dofs =
1682  cast_int<unsigned int>(side_dofs.size());
1683 
1684  // Some edge dofs are on nodes and already
1685  // fixed, others are free to calculate
1686  unsigned int free_dofs = 0;
1687  for (auto i : IntRange<unsigned int>(0, n_side_dofs))
1688  if (!dof_is_fixed[side_dofs[i]])
1689  free_dof[free_dofs++] = i;
1690 
1691  // There may be nothing to project
1692  if (!free_dofs)
1693  continue;
1694 
1695  Ke.resize (free_dofs, free_dofs); Ke.zero();
1696  Fe.resize (free_dofs); Fe.zero();
1697  // The new edge coefficients
1698  DenseVector<Number> Uedge(free_dofs);
1699 
1700  // Initialize FE data on the edge
1701  fe->attach_quadrature_rule (qedgerule.get());
1702  fe->edge_reinit (elem, e);
1703  const unsigned int n_qp = qedgerule->n_points();
1704 
1705  // Loop over the quadrature points
1706  for (unsigned int qp=0; qp<n_qp; qp++)
1707  {
1708  // solution at the quadrature point
1709  Number fineval = f->component(var_component,
1710  xyz_values[qp],
1711  system.time);
1712  // solution grad at the quadrature point
1713  Gradient finegrad;
1714  if (cont == C_ONE)
1715  finegrad = g->component(var_component,
1716  xyz_values[qp],
1717  system.time);
1718 
1719  // Form edge projection matrix
1720  for (unsigned int sidei=0, freei=0;
1721  sidei != n_side_dofs; ++sidei)
1722  {
1723  unsigned int i = side_dofs[sidei];
1724  // fixed DoFs aren't test functions
1725  if (dof_is_fixed[i])
1726  continue;
1727  for (unsigned int sidej=0, freej=0;
1728  sidej != n_side_dofs; ++sidej)
1729  {
1730  unsigned int j = side_dofs[sidej];
1731  if (dof_is_fixed[j])
1732  Fe(freei) -= phi[i][qp] * phi[j][qp] *
1733  JxW[qp] * Ue(j);
1734  else
1735  Ke(freei,freej) += phi[i][qp] *
1736  phi[j][qp] * JxW[qp];
1737  if (cont == C_ONE)
1738  {
1739  if (dof_is_fixed[j])
1740  Fe(freei) -= ((*dphi)[i][qp] *
1741  (*dphi)[j][qp]) *
1742  JxW[qp] * Ue(j);
1743  else
1744  Ke(freei,freej) += ((*dphi)[i][qp] *
1745  (*dphi)[j][qp])
1746  * JxW[qp];
1747  }
1748  if (!dof_is_fixed[j])
1749  freej++;
1750  }
1751  Fe(freei) += phi[i][qp] * fineval * JxW[qp];
1752  if (cont == C_ONE)
1753  Fe(freei) += (finegrad * (*dphi)[i][qp]) *
1754  JxW[qp];
1755  freei++;
1756  }
1757  }
1758 
1759  Ke.cholesky_solve(Fe, Uedge);
1760 
1761  // Transfer new edge solutions to element
1762  for (unsigned int i=0; i != free_dofs; ++i)
1763  {
1764  Number & ui = Ue(side_dofs[free_dof[i]]);
1766  std::abs(ui - Uedge(i)) < TOLERANCE);
1767  ui = Uedge(i);
1768  dof_is_fixed[side_dofs[free_dof[i]]] = true;
1769  }
1770  }
1771 
1772  // Project any side values (edges in 2D, faces in 3D)
1773  if (dim > 1 && cont != DISCONTINUOUS)
1774  for (unsigned short s = 0; s != n_sides; ++s)
1775  {
1776  if (!is_boundary_side[s])
1777  continue;
1778 
1779  FEInterface::dofs_on_side(elem, dim, fe_type, s,
1780  side_dofs);
1781 
1782  // Some side dofs are on nodes/edges and already
1783  // fixed, others are free to calculate
1784  unsigned int free_dofs = 0;
1785  for (auto i : index_range(side_dofs))
1786  if (!dof_is_fixed[side_dofs[i]])
1787  free_dof[free_dofs++] = i;
1788 
1789  // There may be nothing to project
1790  if (!free_dofs)
1791  continue;
1792 
1793  Ke.resize (free_dofs, free_dofs); Ke.zero();
1794  Fe.resize (free_dofs); Fe.zero();
1795  // The new side coefficients
1796  DenseVector<Number> Uside(free_dofs);
1797 
1798  // Initialize FE data on the side
1799  fe->attach_quadrature_rule (qsiderule.get());
1800  fe->reinit (elem, s);
1801  const unsigned int n_qp = qsiderule->n_points();
1802 
1803  const unsigned int n_side_dofs =
1804  cast_int<unsigned int>(side_dofs.size());
1805 
1806  // Loop over the quadrature points
1807  for (unsigned int qp=0; qp<n_qp; qp++)
1808  {
1809  // solution at the quadrature point
1810  Number fineval = f->component(var_component,
1811  xyz_values[qp],
1812  system.time);
1813  // solution grad at the quadrature point
1814  Gradient finegrad;
1815  if (cont == C_ONE)
1816  finegrad = g->component(var_component,
1817  xyz_values[qp],
1818  system.time);
1819 
1820  // Form side projection matrix
1821  for (unsigned int sidei=0, freei=0;
1822  sidei != n_side_dofs; ++sidei)
1823  {
1824  unsigned int i = side_dofs[sidei];
1825  // fixed DoFs aren't test functions
1826  if (dof_is_fixed[i])
1827  continue;
1828  for (unsigned int sidej=0, freej=0;
1829  sidej != n_side_dofs; ++sidej)
1830  {
1831  unsigned int j = side_dofs[sidej];
1832  if (dof_is_fixed[j])
1833  Fe(freei) -= phi[i][qp] * phi[j][qp] *
1834  JxW[qp] * Ue(j);
1835  else
1836  Ke(freei,freej) += phi[i][qp] *
1837  phi[j][qp] * JxW[qp];
1838  if (cont == C_ONE)
1839  {
1840  if (dof_is_fixed[j])
1841  Fe(freei) -= ((*dphi)[i][qp] *
1842  (*dphi)[j][qp]) *
1843  JxW[qp] * Ue(j);
1844  else
1845  Ke(freei,freej) += ((*dphi)[i][qp] *
1846  (*dphi)[j][qp])
1847  * JxW[qp];
1848  }
1849  if (!dof_is_fixed[j])
1850  freej++;
1851  }
1852  Fe(freei) += (fineval * phi[i][qp]) * JxW[qp];
1853  if (cont == C_ONE)
1854  Fe(freei) += (finegrad * (*dphi)[i][qp]) *
1855  JxW[qp];
1856  freei++;
1857  }
1858  }
1859 
1860  Ke.cholesky_solve(Fe, Uside);
1861 
1862  // Transfer new side solutions to element
1863  for (unsigned int i=0; i != free_dofs; ++i)
1864  {
1865  Number & ui = Ue(side_dofs[free_dof[i]]);
1867  std::abs(ui - Uside(i)) < TOLERANCE);
1868  ui = Uside(i);
1869  dof_is_fixed[side_dofs[free_dof[i]]] = true;
1870  }
1871  }
1872 
1873  const dof_id_type
1874  first = new_vector.first_local_index(),
1875  last = new_vector.last_local_index();
1876 
1877  // Lock the new_vector since it is shared among threads.
1878  {
1879  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1880 
1881  for (unsigned int i = 0; i < n_dofs; i++)
1882  if (dof_is_fixed[i] &&
1883  (dof_indices[i] >= first) &&
1884  (dof_indices[i] < last))
1885  {
1886  new_vector.set(dof_indices[i], Ue(i));
1887  }
1888  }
1889  } // end elem loop
1890  } // end variables loop
1891 }

References std::abs(), libMesh::Variable::active_on_subdomain(), libMesh::BoundaryInfo::boundary_ids(), libMesh::C_ONE, libMesh::C_ZERO, libMesh::DenseMatrix< T >::cholesky_solve(), libMesh::FEType::default_quadrature_rule(), dim, libMesh::DISCONTINUOUS, libMesh::DofMap::dof_indices(), libMesh::BoundaryInfo::edge_boundary_ids(), libMesh::FEType::family, libMesh::HERMITE, libMesh::index_range(), libMesh::libmesh_assert(), n_nodes, libMesh::DenseVector< T >::resize(), libMesh::DenseMatrix< T >::resize(), libMesh::SCALAR, libMesh::Threads::spin_mtx, libMesh::TOLERANCE, libMesh::Variable::type(), libMesh::DofMap::variable(), libMesh::DenseMatrix< T >::zero(), and libMesh::DenseVector< T >::zero().

Member Data Documentation

◆ b

const std::set<boundary_id_type>& libMesh::BoundaryProjectSolution::b
private

Definition at line 200 of file system_projection.C.

◆ f

std::unique_ptr<FunctionBase<Number> > libMesh::BoundaryProjectSolution::f
private

Definition at line 203 of file system_projection.C.

◆ g

std::unique_ptr<FunctionBase<Gradient> > libMesh::BoundaryProjectSolution::g
private

Definition at line 204 of file system_projection.C.

◆ new_vector

NumericVector<Number>& libMesh::BoundaryProjectSolution::new_vector
private

Definition at line 206 of file system_projection.C.

◆ parameters

const Parameters& libMesh::BoundaryProjectSolution::parameters
private

Definition at line 205 of file system_projection.C.

◆ system

const System& libMesh::BoundaryProjectSolution::system
private

Definition at line 202 of file system_projection.C.

◆ variables

const std::vector<unsigned int>& libMesh::BoundaryProjectSolution::variables
private

Definition at line 201 of file system_projection.C.


The documentation for this class was generated from the following file:
libMesh::C_ONE
Definition: enum_fe_family.h:80
libMesh::dof_id_type
uint8_t dof_id_type
Definition: id_types.h:67
libMesh::Number
Real Number
Definition: libmesh_common.h:195
libMesh::BoundaryProjectSolution::parameters
const Parameters & parameters
Definition: system_projection.C:205
libMesh::MeshBase::get_boundary_info
const BoundaryInfo & get_boundary_info() const
The information about boundary ids on the mesh.
Definition: mesh_base.h:132
libMesh::BoundaryProjectSolution::new_vector
NumericVector< Number > & new_vector
Definition: system_projection.C:206
libMesh::FunctionBase::clone
virtual std::unique_ptr< FunctionBase< Output > > clone() const =0
libMesh::HERMITE
Definition: enum_fe_family.h:54
libMesh::FEInterface::n_dofs_at_node
static unsigned int n_dofs_at_node(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int n)
Definition: fe_interface.C:503
libMesh::NumericVector::last_local_index
virtual numeric_index_type last_local_index() const =0
libMesh::index_range
IntRange< std::size_t > index_range(const std::vector< T > &vec)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition: int_range.h:106
libMesh::BoundaryProjectSolution::g
std::unique_ptr< FunctionBase< Gradient > > g
Definition: system_projection.C:204
libMesh::TOLERANCE
static const Real TOLERANCE
Definition: libmesh_common.h:128
libMesh::MeshBase::mesh_dimension
unsigned int mesh_dimension() const
Definition: mesh_base.C:135
dim
unsigned int dim
Definition: adaptivity_ex3.C:113
libMesh::libmesh_assert
libmesh_assert(ctx)
libMesh::BoundaryProjectSolution::system
const System & system
Definition: system_projection.C:202
std::abs
MetaPhysicL::DualNumber< T, D > abs(const MetaPhysicL::DualNumber< T, D > &in)
libMesh::System::variable_scalar_number
unsigned int variable_scalar_number(const std::string &var, unsigned int component) const
Definition: system.h:2214
libMesh::Threads::spin_mtx
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.
Definition: threads.C:29
libMesh::System::get_mesh
const MeshBase & get_mesh() const
Definition: system.h:2083
libMesh::FEGenericBase::build
static std::unique_ptr< FEGenericBase > build(const unsigned int dim, const FEType &type)
Builds a specific finite element type.
libMesh::FEInterface::dofs_on_edge
static void dofs_on_edge(const Elem *const elem, const unsigned int dim, const FEType &fe_t, unsigned int e, std::vector< unsigned int > &di)
Fills the vector di with the local degree of freedom indices associated with edge e of element elem A...
Definition: fe_interface.C:566
libMesh::DISCONTINUOUS
Definition: enum_fe_family.h:78
libMesh::C_ZERO
Definition: enum_fe_family.h:79
libMesh::BoundaryProjectSolution::b
const std::set< boundary_id_type > & b
Definition: system_projection.C:200
n_nodes
const dof_id_type n_nodes
Definition: tecplot_io.C:68
libMesh::BoundaryProjectSolution::variables
const std::vector< unsigned int > & variables
Definition: system_projection.C:201
libMesh::System::time
Real time
For time-dependent problems, this is the time t at the beginning of the current timestep.
Definition: system.h:1561
libMesh::FEInterface::dofs_on_side
static void dofs_on_side(const Elem *const elem, const unsigned int dim, const FEType &fe_t, unsigned int s, std::vector< unsigned int > &di)
Fills the vector di with the local degree of freedom indices associated with side s of element elem A...
Definition: fe_interface.C:553
libMesh::Gradient
NumberVectorValue Gradient
Definition: exact_solution.h:58
libMesh::NumericVector::set
virtual void set(const numeric_index_type i, const T value)=0
Sets v(i) = value.
libMesh::System::get_dof_map
const DofMap & get_dof_map() const
Definition: system.h:2099
libMesh::SCALAR
Definition: enum_fe_family.h:58
libMesh::BoundaryProjectSolution::f
std::unique_ptr< FunctionBase< Number > > f
Definition: system_projection.C:203
libMesh::FEContinuity
FEContinuity
Definition: enum_fe_family.h:77
libMesh::ElemType
ElemType
Defines an enum for geometric element types.
Definition: enum_elem_type.h:33
libMesh::NumericVector::first_local_index
virtual numeric_index_type first_local_index() const =0