Hello,

I am currently implementing something that makes use of TRI3SUBDIVISION 
elements, and one of the initial things that I want to do is to compute the 
nodal coordinates for each deformed element. I am trying to avoid the use of 
MeshFunction to do this. Of course since subdivision shape functions are not 
interpolatory, I can’t just use the solution of the coordinate system directly 
as the coordinates of the element vertices. So what I am trying to use QTrap 
that uses nodal quadrature points and evaluating the shape functions at the 
quadrature points for a given element to get something like

std::unique_ptr<libMesh::FEBase> fe(libMesh::FEBase::build(2, 
libMesh::SUBDIVISION));
std::unique_ptr<libMesh::QBase> qrule = libMesh::QBase::build(libMesh::QTRAP, 
2, libMesh::FIRST);
fe->attach_quadrature_rule(qrule.get());
fe->reinit(elem);
for (unsigned int qp = 0; qp < qrule->n_points(); ++qp)
{
    for (unsigned int d = 0; d < 3; ++d)
    {
        for (unsigned int i = 0; i < phi.size(); ++i)
        {
            X_node[qp][d] += X_solution[i][d] * phi[i][qp];
        }
    }
}

X_solution is where the solution of the coordinate system has been stored.

Does this seem reasonable? 
But quadrature_trap_2D.C complained because TRI3SUBDIVISION is not supported. 
Is it safe to hardcode TRI3SUBDIVISION as a case in the code? Or is there a 
different way to go about it (e.g. is there a different nodal quadrature rule 
that supports TRI3SUBDIVISION)?

Thank you,
Mike
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to