zhaoweiliu / dealii_catmull_clark

Other
0 stars 1 forks source link

Implementations needed in fe_collection.cc. #8

Open zhaoweiliu opened 4 years ago

zhaoweiliu commented 4 years ago

The present hp::fe_collection code only support for FE_Q?

 // If current_fe dominates, return its index.
        if ((domination == FiniteElementDomination::this_element_dominates) ||
            (domination == FiniteElementDomination::either_element_can_dominate
             /*covers cases like {Q2,Q3,Q1,Q1} with fes={2,3}*/))
          return current_fe;
      }
zhaoweiliu commented 4 years ago

https://www.dealii.org/current/doxygen/deal.II/namespaceFiniteElementDomination.html

An enum that describes the outcome of comparing two elements for mutual domination. If one element dominates another, then the restriction of the space described by the dominated element to a face of the cell is strictly larger than that of the dominating element. For example, in 2-d Q(2) elements dominate Q(4) elements, because the traces of Q(4) elements are quartic polynomials which is a space strictly larger than the quadratic polynomials (the restriction of the Q(2) element). Similar reasonings apply for vertices and cells as well. In general, Q(k) dominates Q(k') if k≤k′.

zhaoweiliu commented 4 years ago
template <int dim, int spacedim>
 FiniteElementDomination::Domination
FE_Catmull_Clark<dim,spacedim>::compare_for_domination(const FiniteElement<dim, spacedim> &fe, const unsigned int codim) const
{
    if(codim == 0){
        if (this->n_dofs_per_cell()> fe.n_dofs_per_cell()){
            return FiniteElementDomination::this_element_dominates;
        }
        else{
            return FiniteElementDomination::no_requirements;
        }
    }
}