1#ifndef ASSEMBLEFE_NONLINELAS_DEF_hpp
2#define ASSEMBLEFE_NONLINELAS_DEF_hpp
4#include "feddlib/core/AceFemAssembly/AceInterface/NeoHookQuadraticTets2.hpp"
21template <
class SC,
class LO,
class GO,
class NO>
23AssembleFE<SC,LO,GO,NO>(flag, nodesRefConfig, params,tuple)
26 E_ = this->params_->sublist(
"Parameter").get(
"E",1000.0);
28 poissonRatio_ = this->params_->sublist(
"Parameter").get(
"Poisson Ratio",0.4e-0);
32 FEType_ = std::get<1>(this->diskTuple_->at(0));
33 dofs_ = std::get<2>(this->diskTuple_->at(0));
34 numNodes_ = std::get<3>(this->diskTuple_->at(0));
36 dofsElement_ = dofs_*numNodes_;
48template <
class SC,
class LO,
class GO,
class NO>
52 SmallMatrixPtr_Type elementMatrix =Teuchos::rcp(
new SmallMatrix_Type( dofsElement_));
54 assemblyNonLinElas(elementMatrix);
56 this->jacobian_ = elementMatrix ;
66template <
class SC,
class LO,
class GO,
class NO>
67void AssembleFE_NonLinElas<SC,LO,GO,NO>::assemblyNonLinElas(SmallMatrixPtr_Type &elementMatrix) {
80 std::vector<double> v(1060);
81 std::vector<double> d(2);
82 std::vector<double> ul(30);
83 std::vector<double> ul0(30);
84 std::vector<double> xl(30);
85 std::vector<double> s(900);
86 std::vector<double> p(30);
87 std::vector<double> ht(10);
88 std::vector<double> hp(10);
91 d[1] = this->poissonRatio_;
94 ul[i] = (*this->solution_)[i];
97 for(
int i=0;i<this->numNodes_;i++)
98 for(
int j=0;j<this->dofs_;j++){
99 xl[count] = this->getNodesRefConfig()[i][j];
102 for(
int i=0;i<s.size();i++)
104 for(
int i=0;i<p.size();i++)
108 skr2(&v[0],&d[0],&ul[0],&ul0[0],&xl[0],&s[0],&p[0],&ht[0],&hp[0]);
116 for (UN i=0; i < this->dofsElement_; i++) {
117 for (UN j=0; j < this->dofsElement_; j++) {
118 (*elementMatrix)[i][j] = -s[this->dofsElement_*j+i];
130template <
class SC,
class LO,
class GO,
class NO>
134 this->rhsVec_.reset(
new vec_dbl_Type ( dofsElement_,0.) );
137 std::vector<double> v(1060);
138 std::vector<double> d(2);
139 std::vector<double> ul(30);
140 std::vector<double> ul0(30);
141 std::vector<double> xl(30);
142 std::vector<double> s(900);
143 std::vector<double> p(30);
144 std::vector<double> ht(10);
145 std::vector<double> hp(10);
148 d[1] = this->poissonRatio_;
150 for(
int i=0;i<30;i++){
151 ul[i] = (*this->solution_)[i];
155 for(
int i=0;i<this->numNodes_;i++)
156 for(
int j=0;j<this->dofs_;j++){
161 for(
int i=0;i<s.size();i++)
163 for(
int i=0;i<p.size();i++)
167 skr2(&v[0],&d[0],&ul[0],&ul0[0],&xl[0],&s[0],&p[0],&ht[0],&hp[0]);
170 for(
int i=0; i< p.size(); i++)
171 (*this->rhsVec_)[i] = -p[i];
173template <
class SC,
class LO,
class GO,
class NO>
void updateParameter(std::string type, double value) override
Update the parameter read from the ParameterList.
Definition AssembleFE_NonLinElas_def.hpp:174
void assembleRHS() override
Assemble the element right hand side vector.
Definition AssembleFE_NonLinElas_def.hpp:131
AssembleFE_NonLinElas(int flag, vec2D_dbl_Type nodesRefConfig, ParameterListPtr_Type parameters, tuple_disk_vec_ptr_Type tuple)
Constructor for AssembleFE_NonLinElas.
Definition AssembleFE_NonLinElas_def.hpp:22
void assembleJacobian() override
Assemble the element Jacobian matrix.
Definition AssembleFE_NonLinElas_def.hpp:49
AssembleFE(int flag, vec2D_dbl_Type nodesRefConfig, ParameterListPtr_Type parameters, tuple_disk_vec_ptr_Type tuple)
Definition AssembleFE_def.hpp:8
vec2D_dbl_Type getNodesRefConfig()
Definition AssembleFE_def.hpp:142
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement_decl.hpp:36