Beispiel #1
0
Real FEInterface::shape(const unsigned int dim,
			const FEType& fe_t,
			const Elem* elem,
			const unsigned int i,
			const Point& p)
{
#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS

  if ( is_InfFE_elem(elem->type()) )
    return ifem_shape(dim, fe_t, elem, i, p);

#endif

  const Order o = fe_t.order;

  fe_switch(shape(elem,o,i,p));

  libmesh_error();
  return 0.;
}
Beispiel #2
0
void FEInterface::nodal_soln(const unsigned int dim,
			     const FEType& fe_t,
			     const Elem* elem,
			     const std::vector<Number>& elem_soln,
			     std::vector<Number>&       nodal_soln)
{
#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS

  if ( is_InfFE_elem(elem->type()) )
  {
    ifem_nodal_soln(dim, fe_t, elem, elem_soln, nodal_soln);
    return;
  }

#endif

  const Order order = fe_t.order;

  void_fe_with_vec_switch(nodal_soln(elem, order, elem_soln, nodal_soln));
}
Beispiel #3
0
Real FEInterface::shape(const unsigned int dim,
                        const FEType & fe_t,
                        const ElemType t,
                        const unsigned int i,
                        const Point & p)
{
#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS

  if ( is_InfFE_elem(t) )
    return ifem_shape(dim, fe_t, t, i, p);

#endif

  const Order o = fe_t.order;

  fe_switch(shape(t,o,i,p));

  libmesh_error_msg("We'll never get here!");
  return 0.;
}
Beispiel #4
0
void FEInterface::inverse_map (const unsigned int dim,
                               const FEType& fe_t,
                               const Elem* elem,
                               const std::vector<Point>& physical_points,
                               std::vector<Point>&       reference_points,
                               const Real tolerance,
                               const bool secure)
{
  const std::size_t n_pts = physical_points.size();

  // Resize the vector
  reference_points.resize(n_pts);

  if (n_pts == 0)
    {
      libMesh::err << "WARNING: empty vector physical_points!"
                   << std::endl;
      libmesh_here();
      return;
    }

#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS

  if ( is_InfFE_elem(elem->type()) )
    {
      ifem_inverse_map(dim, fe_t, elem, physical_points, reference_points, tolerance, secure);
      return;

      //       libMesh::err << "ERROR: Not implemented!"
      // << std::endl;
      //       libmesh_error();
    }

#endif

  void_fe_with_vec_switch(inverse_map(elem, physical_points, reference_points, tolerance, secure));

  libmesh_error();
  return;
}
Beispiel #5
0
void FEInterface::shape<Real>(const unsigned int dim,
                              const FEType& fe_t,
                              const ElemType t,
                              const unsigned int i,
                              const Point& p,
                              Real& phi)
{
#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS

  if ( is_InfFE_elem(t) )
    phi = ifem_shape(dim, fe_t, t, i, p);

#endif

  const Order o = fe_t.order;

  switch(dim)
    {
    case 0:
      fe_scalar_vec_error_switch(0, shape(t,o,i,p), phi = , ; break;);
      break;
    case 1:
      fe_scalar_vec_error_switch(1, shape(t,o,i,p), phi = , ; break;);
Beispiel #6
0
unsigned int FEInterface::n_shape_functions(const unsigned int dim,
                                            const FEType& fe_t,
                                            const ElemType t)
{

#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
  /*
   * Since the FEType, stored in DofMap/(some System child), has to
   * be the _same_ for InfFE and FE, we have to catch calls
   * to infinite elements through the element type.
   */

  if ( is_InfFE_elem(t) )
    return ifem_n_shape_functions(dim, fe_t, t);

#endif

  const Order o = fe_t.order;

  fe_with_vec_switch(n_shape_functions(t, o));

  libmesh_error();
  return 0;
}