nutofem / nuto

NuTo - yet another finite element library
https://nuto.readthedocs.io
Boost Software License 1.0
17 stars 5 forks source link

IGA implementation #215

Open potto1 opened 6 years ago

potto1 commented 6 years ago

There are the two concepts FEM and IGA. In FEM almost everything is implemented on a reference element. In IGA the geometry is described by NURBS and NO reference elements are defined. In order to take a further step towards a functioning IGA implementation I would like to discuss the following architecture consisting of three classes:

  1. Class MeshIga
  2. Changes in the class Nurbs (Nurbs.h)
  3. Class UnitMeshIga

1. Class MeshIga: This class stores the Nurbs geometry for each DOF

template <int TDimParameter>
class MeshIga
{
public:
    MeshIga() = default;

    MeshIga(const MeshIga&) = delete;
    MeshIga& operator=(const MeshIga&) = delete;

    MeshIga(MeshIga&&) = default;
    MeshIga& operator=(MeshIga&&) = default;

    Group<NodeSimple> NodesTotal()
    {
        throw Exception(__PRETTY_FUNCTION__, "Iga - Not implemented yet!");
    }

    Group<NodeSimple> NodesTotal(DofType d)
    {
        throw Exception(__PRETTY_FUNCTION__, "Iga - Not implemented yet!");
    }

    Group<ElementCollectionIga<TDimParameter>> ElementsTotal()
    {
        throw Exception(__PRETTY_FUNCTION__, "Iga - Not implemented yet!");
    }
public:
    DofContainer<Nurbs<TDimParameter>> mDofNurbs;
    ValueVector<ElementCollectionIga<TDimParameter>> mElements;
};

2. Changes in the class Nurbs (Nurbs.h):

TTitscher commented 6 years ago

Sounds good. And just as a reminder: As long as ElementIga implements ElementInterface, everything like assembly/numbering/visualization/... should be fine. So there is no need to follow the implementation of MeshFem just for the reason of the two to look similar. Just some hints to think about:

Edit: Just to be clear: There is no need to implement everything mentioned in the points above. It should only remind you to implement things how they fit best for MeshIga. This is exactly the reason why everything "above" the mesh (cells, assembly...) works with ElementInterface instead of MeshFem or ElementIga. So there is no MeshInterface or MeshBase and you can really do whatever fits best for the problem.

joergfunger commented 6 years ago

Looks good. There is just a question on how to store different patches. How would this be achieved?