NuTo
Numerics Tool
MeshFem.h
Go to the documentation of this file.
1 #pragma once
2 #include "nuto/base/Group.h"
7 
8 #include <memory>
9 #include <vector>
10 
11 namespace NuTo
12 {
16 class MeshFem
17 {
18 public:
19  MeshFem() = default;
20 
21  MeshFem(const MeshFem&) = delete;
22  MeshFem& operator=(const MeshFem&) = delete;
23 
24  MeshFem(MeshFem&&) = default;
25  MeshFem& operator=(MeshFem&&) = default;
26 
31 
36  NodeSimple& NodeAtCoordinate(Eigen::VectorXd coords, double tol = 1.e-10);
37 
43  NodeSimple& NodeAtCoordinate(Eigen::VectorXd coords, DofType dofType, double tol = 1.e-10);
44 
51  Group<NodeSimple> NodesAtAxis(eDirection direction, DofType dofType, double axisOffset = 0., double tol = 1.e-10);
52 
58  Group<NodeSimple> NodesAtAxis(eDirection direction, double axisOffset = 0., double tol = 1.e-10);
59 
63 
67 
71 
74  void AllocateDofInstances(DofType dofType, int numInstances);
75 
76 public:
79 
80 private:
81  std::vector<std::unique_ptr<InterpolationSimple>> mInterpolations;
82 };
83 } /* NuTo */
MeshFem()=default
Store node values and its dof.
Definition: NodeSimple.h:11
Group< NodeSimple > NodesTotal()
selects all coordinate nodes
Definition: MeshFem.cpp:95
eDirection
Definition: DirectionEnum.h:5
InterpolationSimple & CreateInterpolation(const InterpolationSimple &interpolation)
adds a clone of interpolation to the mesh (prototype pattern)
Definition: MeshFem.cpp:8
container that stores values of T and keeps references to these values valid
Definition: ValueVector.h:17
void AllocateDofInstances(DofType dofType, int numInstances)
Adds numInstances instances of zeros to all nodes of type dofType
Definition: MeshFem.cpp:125
Definition: DofType.h:8
ValueVector< ElementCollectionFem > Elements
Definition: MeshFem.h:78
Group< NodeSimple > NodesAtAxis(eDirection direction, DofType dofType, double axisOffset=0., double tol=1.e-10)
selects all nodes of type dofType where the coord in direction is within tol
Definition: MeshFem.cpp:71
Base class for the interpolation. The derived classes provide information about the actual interpolat...
Definition: InterpolationSimple.h:12
contains the nodes, elements and interpolations for a classic finite element mesh ...
Definition: MeshFem.h:16
ValueVector< NodeSimple > Nodes
Definition: MeshFem.h:77
MeshFem & operator=(const MeshFem &)=delete
constexpr double tol
Definition: single_edge_notched_tension_test.cpp:35
Definition: Exception.h:6
direction
Definition: Brick8NCoupling.py:110
Group< ElementCollectionFem > ElementsTotal()
selects all element collections
Definition: MeshFem.cpp:117
NodeSimple & NodeAtCoordinate(Eigen::VectorXd coords, double tol=1.e-10)
selects a coordinate at given coords
Definition: MeshFem.cpp:37
Ordered container class for elements, nodes and the like.
Definition: Group.h:15