NuTo
Numerics Tool
Assembler.h
Go to the documentation of this file.
1 #pragma once
6 
7 namespace NuTo
8 {
9 
10 namespace Assembler
11 {
17 void Add(DofVector<double>& rResult, const DofVector<double>& v, const DofVector<int>& numbering,
18  std::vector<DofType> dofTypes = {});
19 
25 void Add(DofMatrixSparse<double>& rSparseMatrix, const DofMatrix<double>& m, const DofVector<int>& numbering,
26  std::vector<DofType> dofTypes = {});
27 
28 
34 void Add(DofMatrixContainer<std::vector<Eigen::Triplet<double>>>& rTriplets, const DofMatrix<double>& m,
35  const DofVector<int>& numbering, std::vector<DofType> dofTypes = {});
36 }
37 
40 {
41 public:
45 
48  void Resize(DofContainer<int> sizes);
49 
55  void Add(const DofVector<double>& v, const DofVector<int>& numbering, std::vector<DofType> dofTypes = {});
56 
58  void SetZero();
59 
62  const DofVector<double>& Get() const;
63 
64 private:
65  DofVector<double> mVector;
66 };
67 
68 
73 {
74 public:
78 
81  void Resize(DofContainer<int> sizes);
82 
88  void Add(const DofMatrix<double>& m, const DofVector<int>& numbering, std::vector<DofType> dofTypes = {});
89 
91  void SetZero();
92 
95  void Finish();
96 
98  const DofMatrixSparse<double>& Get() const;
99 
100 private:
102  DofMatrixSparse<double> mMatrix;
103  bool mFinished = false;
104 };
105 
106 
107 } /* NuTo */
Assembles an internal NuTo::DofMatrixSparse<double> from arbitrary contributions and provides access ...
Definition: Assembler.h:72
std::vector< int > Get(const Group< NodeSimple > &dofNodes, int component=0)
Extracts the dof numbers from dofNodes for a given component (0 for scalar, x=0, y=1, z=2 for vector dofs)
Definition: DofNumbering.cpp:60
int v
Definition: Quad2DPatchTest.py:9
Assembles an internal NuTo::DofVector<double> from arbitrary contributions and provides access to it...
Definition: Assembler.h:39
dof container that is also capable of performing calculations.
Definition: DofMatrixContainer.h:13
Definition: Exception.h:6
void Add(DofVector< double > &rResult, const DofVector< double > &v, const DofVector< int > &numbering, std::vector< DofType > dofTypes={})
adds an arbitrary contribution v to the internal DofVector
Definition: Assembler.cpp:20