35 #ifndef THREED_BEAM_FEA_H
36 #define THREED_BEAM_FEA_H
38 #ifdef EIGEN_USE_MKL_ALL
39 #include <Eigen/PardisoSupport>
41 #include <Eigen/SparseLU>
45 #include <Eigen/Geometry>
46 #include <Eigen/SparseCore>
63 typedef Eigen::Matrix<double, 12, 12, Eigen::RowMajor>
LocalMatrix;
103 SparseKelem.resize(12, 12);
104 SparseKelem.reserve(40);
118 void operator()(SparseMat &Kg,
const Job &job,
const std::vector<Tie> &ties);
136 void calcAelem(
const Eigen::Vector3d &nx,
const Eigen::Vector3d &nz);
163 SparseMat SparseKelem;
180 void loadBCs(SparseMat &Kg, ForceVector &force_vec,
const std::vector<BC> &BCs,
unsigned int num_nodes);
182 void loadEquations(SparseMat &Kg,
const std::vector<Equation> &equations,
unsigned int num_nodes,
unsigned int num_bcs);
194 void loadTies(std::vector<Eigen::Triplet<double> > &triplets,
const std::vector<Tie> &ties);
205 std::vector<std::vector<double> >
computeTieForces(
const std::vector<Tie> &ties,
206 const std::vector<std::vector<double> > &nodal_displacements);
214 void loadForces(SparseMat &force_vec,
const std::vector<Force> &forces);
229 Summary
solve(
const Job &job,
230 const std::vector<BC> &BCs,
231 const std::vector<Force> &forces,
232 const std::vector<Tie> &ties,
233 const std::vector<Equation> &equations,
234 const Options &options);
237 #endif // THREED_BEAM_FEA_H
Assembles the global stiffness matrix.
Definition: threed_beam_fea.h:90
GlobalStiffAssembler()
Default constructor.
Definition: threed_beam_fea.h:98
Eigen::Matrix< double, 12, 12, Eigen::RowMajor > LocalMatrix
Definition: threed_beam_fea.h:63
void calcAelem(const Eigen::Vector3d &nx, const Eigen::Vector3d &nz)
Updates the rotation and transposed rotation matrices.
Definition: threed_beam_fea.cpp:141
double norm(const Node &n1, const Node &n2)
Calculates the distance between 2 nodes.
Definition: threed_beam_fea.cpp:54
LocalMatrix getKelem()
Returns the currently stored elemental stiffness matrix.
Definition: threed_beam_fea.h:142
void loadBCs(SparseMat &Kg, ForceVector &force_vec, const std::vector< BC > &BCs, unsigned int num_nodes)
Loads the boundary conditions into the global stiffness matrix and force vector.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > GlobalStiffMatrix
Definition: threed_beam_fea.h:58
void loadTies(std::vector< Eigen::Triplet< double > > &triplets, const std::vector< Tie > &ties)
Loads any tie constraints into the set of triplets that will become the global stiffness matrix...
Definition: threed_beam_fea.cpp:329
Eigen::SparseMatrix< double > SparseMat
Definition: threed_beam_fea.h:74
LocalMatrix getAelem()
Returns the currently stored rotation matrix.
Definition: threed_beam_fea.h:150
void calcKelem(unsigned int i, const Job &job)
Updates the elemental stiffness matrix for the ith element.
Definition: threed_beam_fea.cpp:59
void loadForces(SparseMat &force_vec, const std::vector< Force > &forces)
Loads the prescribed forces into the force vector.
Definition: threed_beam_fea.cpp:388
std::vector< std::vector< double > > computeTieForces(const std::vector< Tie > &ties, const std::vector< std::vector< double > > &nodal_displacements)
Computes the forces in the tie elements based on the nodal displacements of the FE analysis and the s...
Definition: threed_beam_fea.cpp:363
void loadEquations(SparseMat &Kg, const std::vector< Equation > &equations, unsigned int num_nodes, unsigned int num_bcs)
Definition: threed_beam_fea.cpp:314
Eigen::Vector3d Node
A node that describes a mesh. Uses Eigen's predefined Vector class for added functionality.
Definition: containers.h:56
Summary solve(const Job &job, const std::vector< BC > &BCs, const std::vector< Force > &forces, const std::vector< Tie > &ties, const std::vector< Equation > &equations, const Options &options)
Solves the finite element analysis defined by the input Job, boundary conditions, and prescribed noda...
Definition: threed_beam_fea.cpp:398
Contains a node list, element list, and the properties of each element.
Definition: containers.h:309
Eigen::Matrix< double, Eigen::Dynamic, 1 > ForceVector
Definition: threed_beam_fea.h:69
Definition: containers.h:41
void operator()(SparseMat &Kg, const Job &job, const std::vector< Tie > &ties)
Assembles the global stiffness matrix.
Definition: threed_beam_fea.cpp:231