3#include "LinElas_decl.hpp"
14void rhsFunc2D(
double* x,
double* result,
double* parameters)
27void rhsFunc3D(
double* x,
double* result,
double* parameters)
38template<
class SC,
class LO,
class GO,
class NO>
39LinElas<SC,LO,GO,NO>::LinElas(
const DomainConstPtr_Type &domain, std::string FEType, ParameterListPtr_Type parameterList):
40Problem_Type(parameterList, domain->getComm() )
48 this->addVariable( domain , FEType ,
"d_s" ,domain->getDimension() );
49 this->dim_ = this->getDomain(0)->getDimension();
52template<
class SC,
class LO,
class GO,
class NO>
53LinElas<SC,LO,GO,NO>::~LinElas()
58template<
class SC,
class LO,
class GO,
class NO>
59void LinElas<SC,LO,GO,NO>::info(){
63template<
class SC,
class LO,
class GO,
class NO>
64void LinElas<SC,LO,GO,NO>::assemble( std::string type )
const
67 std::cout <<
"-- Assembly linear elasticity ... " << std::flush;
70 double density = this->parameterList_->sublist(
"Parameter").get(
"Density",1000.);
72 double poissonRatio = this->parameterList_->sublist(
"Parameter").get(
"Poisson Ratio",0.4);
73 double mu = this->parameterList_->sublist(
"Parameter").get(
"Mu",2.0e+6);
76 double youngModulus = mu*2.*(1 + poissonRatio);
77 double lambda = (poissonRatio*youngModulus)/((1 + poissonRatio)*(1 - 2*poissonRatio));
80 MatrixPtr_Type K = Teuchos::rcp(
new Matrix_Type( this->getDomain(0)->getMapVecFieldUnique(), this->getDomain(0)->getDimension() * this->getDomain(0)->getApproxEntriesPerRow() ) );
84 this->feFactory_->assemblyLinElasXDim( this->dim_, this->getDomain(0)->getFEType(), K, lambda, mu );
91 this->system_->addBlock( K, 0, 0 );
93 this->assembleSourceTerm( 0. );
95 this->addToRhs( this->sourceTerm_ );
98 std::cout <<
"done -- " << std::endl;
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement.cpp:5