NuTo
Numerics Tool
SimpleAssembler.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "nuto/base/Group.h"
8 
9 namespace NuTo
10 {
12 {
13 public:
14  SimpleAssembler() = default;
15  SimpleAssembler(DofInfo dofInfo);
16 
17  DofVector<double> BuildVector(const Group<CellInterface>& cells, std::vector<DofType> dofTypes,
19 
20  DofMatrixSparse<double> BuildMatrix(const Group<CellInterface>& cells, std::vector<DofType> dofTypes,
22 
31  DofVector<double> BuildDiagonallyLumpedMatrix(const Group<CellInterface>& cells, std::vector<DofType> dofTypes,
33 
34  void SetDofInfo(DofInfo dofInfo);
35 
36 private:
37  DofVector<double> ProperlyResizedVector(std::vector<DofType> dofTypes) const;
38  DofMatrixSparse<double> ProperlyResizedMatrix(std::vector<DofType> dofTypes) const;
39 
40  DofInfo mDofInfo;
41 
42  void ThrowOnZeroDofNumbering(std::vector<DofType> dofTypes) const;
43 };
44 } /* NuTo */
DofVector< double > BuildVector(const Group< CellInterface > &cells, std::vector< DofType > dofTypes, CellInterface::VectorFunction f) const
Definition: SimpleAssembler.cpp:38
DofMatrixSparse< double > BuildMatrix(const Group< CellInterface > &cells, std::vector< DofType > dofTypes, CellInterface::MatrixFunction f) const
Definition: SimpleAssembler.cpp:100
std::function< DofMatrix< double >(const CellIpData &)> MatrixFunction
Definition: CellInterface.h:20
std::function< DofVector< double >(const CellIpData &)> VectorFunction
Definition: CellInterface.h:19
Definition: SimpleAssembler.h:11
void SetDofInfo(DofInfo dofInfo)
Definition: SimpleAssembler.cpp:11
DofVector< double > BuildDiagonallyLumpedMatrix(const Group< CellInterface > &cells, std::vector< DofType > dofTypes, CellInterface::MatrixFunction f) const
Assembles a diagonally lumped matrix from local matrices calculated by f.
Definition: SimpleAssembler.cpp:67
dof container that is also capable of performing calculations.
Definition: DofMatrixContainer.h:13
Definition: Exception.h:6
Definition: DofInfo.h:7