Real
AxisymmetricCenterlineAverageValue::computeIntegral()
{
  Real sum = 0;
  for (_qp=0; _qp<_qrule->n_points(); _qp++)
    sum += _JxW[_qp]*computeQpIntegral();
  return sum;
}
예제 #2
0
Real
SideIntegralUserObject::computeIntegral()
{
  Real sum = 0;
  for (_qp=0; _qp<_qrule->n_points(); _qp++)
    sum += _JxW[_qp]*_coord[_qp]*computeQpIntegral();
  return sum;
}
예제 #3
0
Real
ElementIntegralPostprocessor::computeIntegral()
{
  Real sum = 0;

  for (_qp=0; _qp<_qrule->n_points(); _qp++)
    sum += _JxW[_qp]*_coord[_qp]*computeQpIntegral();
  return sum;
}
예제 #4
0
void
ElementIntegralIndicator::computeIndicator()
{
  Real sum = 0;
  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
    sum += _JxW[_qp] * _coord[_qp] * computeQpIntegral();

  //  sum = std::sqrt(sum);

  _field_var.setNodalValue(sum);
}
예제 #5
0
void
InternalSideIndicator::computeIndicator()
{
  Real sum = 0;

  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
    sum += _JxW[_qp] * _coord[_qp] * computeQpIntegral();

  {
    Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);

    _solution.add(_field_var.nodalDofIndex(), sum * _current_elem->hmax());
    _solution.add(_field_var.nodalDofIndexNeighbor(), sum * _neighbor_elem->hmax());
  }
}
예제 #6
0
Real
InteractionIntegralSM::computeIntegral()
{
  Real sum = 0;

  // calculate phi and dphi for this element
  FEType fe_type(Utility::string_to_enum<Order>("first"),
                 Utility::string_to_enum<FEFamily>("lagrange"));
  const unsigned int dim = _current_elem->dim();
  UniquePtr<FEBase> fe(FEBase::build(dim, fe_type));
  fe->attach_quadrature_rule(_qrule);
  _phi_curr_elem = &fe->get_phi();
  _dphi_curr_elem = &fe->get_dphi();
  fe->reinit(_current_elem);

  // calculate q for all nodes in this element
  _q_curr_elem.clear();
  unsigned int ring_base = (_q_function_type == "TOPOLOGY") ? 0 : 1;

  for (unsigned int i = 0; i < _current_elem->n_nodes(); ++i)
  {
    Node * this_node = _current_elem->get_node(i);
    Real q_this_node;

    if (_q_function_type == "GEOMETRY")
      q_this_node = _crack_front_definition->DomainIntegralQFunction(
          _crack_front_point_index, _ring_index - ring_base, this_node);
    else if (_q_function_type == "TOPOLOGY")
      q_this_node = _crack_front_definition->DomainIntegralTopologicalQFunction(
          _crack_front_point_index, _ring_index - ring_base, this_node);

    _q_curr_elem.push_back(q_this_node);
  }

  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
    sum += _JxW[_qp] * _coord[_qp] * computeQpIntegral();
  return sum;
}