1#ifndef AssembleFE_NonLinElas2_DEF_hpp
2#define AssembleFE_NonLinElas2_DEF_hpp
4#include "AssembleFE_NonLinElas2_decl.hpp"
5#include "feddlib/core/AceFemAssembly/AceInterface/NeoHookQuadraticTets3.hpp"
22template <
class SC,
class LO,
class GO,
class NO>
24AssembleFE<SC,LO,GO,NO>(flag, nodesRefConfig, params,tuple)
27 E_ = this->params_->sublist(
"Parameter").get(
"E",1000.0);
29 poissonRatio_ = this->params_->sublist(
"Parameter").get(
"Poisson Ratio",0.4e-0);
33 FEType_ = std::get<1>(this->diskTuple_->at(0));
34 dofs_ = std::get<2>(this->diskTuple_->at(0));
35 numNodes_ = std::get<3>(this->diskTuple_->at(0));
37 dofsElement_ = dofs_*numNodes_;
49template <
class SC,
class LO,
class GO,
class NO>
53 SmallMatrixPtr_Type elementMatrix =Teuchos::rcp(
new SmallMatrix_Type( dofsElement_));
55 assemblyNonLinElas(elementMatrix);
57 this->jacobian_ = elementMatrix ;
67template <
class SC,
class LO,
class GO,
class NO>
68void AssembleFE_NonLinElas2<SC,LO,GO,NO>::assemblyNonLinElas(SmallMatrixPtr_Type &elementMatrix) {
80 this->rhsVec_.reset(
new vec_dbl_Type ( dofsElement_,0.) );
83 std::vector<double> v(1066);
84 std::vector<double> d(2);
85 std::vector<double> ul(30);
86 std::vector<double> ul0(30);
87 std::vector<double> xl(30);
88 std::vector<double> s(900);
89 std::vector<double> p(30);
90 std::vector<double> ht(10);
91 std::vector<double> hp(10);
94 d[1] = this->poissonRatio_;
97 ul[i] = (*this->solution_)[i];
100 for(
int i=0;i<this->numNodes_;i++)
101 for(
int j=0;j<this->dofs_;j++){
102 xl[count] = this->getNodesRefConfig()[i][j];
105 for(
int i=0;i<s.size();i++)
107 for(
int i=0;i<p.size();i++)
111 skr3(&v[0],&d[0],&ul[0],&ul0[0],&xl[0],&s[0],&p[0],&ht[0],&hp[0]);
119 for (UN i=0; i < this->dofsElement_; i++) {
120 for (UN j=0; j < this->dofsElement_; j++) {
121 (*elementMatrix)[i][j] = -s[this->dofsElement_*j+i];
133template <
class SC,
class LO,
class GO,
class NO>
138 std::vector<double> v(1066);
139 std::vector<double> d(2);
140 std::vector<double> ul(30);
141 std::vector<double> ul0(30);
142 std::vector<double> xl(30);
143 std::vector<double> s(900);
144 std::vector<double> p(30);
145 std::vector<double> ht(10);
146 std::vector<double> hp(10);
149 d[1] = this->poissonRatio_;
151 for(
int i=0;i<30;i++){
152 ul[i] = (*this->solution_)[i];
156 for(
int i=0;i<this->numNodes_;i++)
157 for(
int j=0;j<this->dofs_;j++){
162 for(
int i=0;i<s.size();i++)
164 for(
int i=0;i<p.size();i++)
168 skr3(&v[0],&d[0],&ul[0],&ul0[0],&xl[0],&s[0],&p[0],&ht[0],&hp[0]);
171 for(
int i=0; i< p.size(); i++)
172 (*this->rhsVec_)[i] = -p[i];
174template <
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_NonLinElas2_def.hpp:175
void assembleRHS() override
Assemble the element right hand side vector.
Definition AssembleFE_NonLinElas2_def.hpp:134
AssembleFE_NonLinElas2(int flag, vec2D_dbl_Type nodesRefConfig, ParameterListPtr_Type parameters, tuple_disk_vec_ptr_Type tuple)
Constructor for AssembleFE_NonLinElas2.
Definition AssembleFE_NonLinElas2_def.hpp:23
void assembleJacobian() override
Assemble the element Jacobian matrix.
Definition AssembleFE_NonLinElas2_def.hpp:50
AssembleFE(int flag, vec2D_dbl_Type nodesRefConfig, ParameterListPtr_Type parameters, tuple_disk_vec_ptr_Type tuple)
Definition AssembleFE_def.hpp:10
vec2D_dbl_Type getNodesRefConfig()
Definition AssembleFE_def.hpp:144
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement.cpp:5