v0.16.0
Loading...
Searching...
No Matches
Classes | Enumerations | Variables
ElasticAdaptiveExample.hpp File Reference

elastic example with adaptive order refinement More...

#include <ElasticExample.hpp>
#include <AdaptiveOrderRef.hpp>
#include <HighOrderGeometryRef.hpp>

Go to the source code of this file.

Classes

struct  ElasticAdaptiveExample
 

Enumerations

enum  IndicInds { ERROR_TOT = 0 , COUNT_ENTS , ERROR_NORM , LAST_IND }
 

Variables

auto sqr = [](double v) { return v * v; }
 
MoFEM::VectorFunc analyticalDisplacement
 

Detailed Description

elastic example with adaptive order refinement

Definition in file ElasticAdaptiveExample.hpp.

Enumeration Type Documentation

◆ IndicInds

enum IndicInds
Enumerator
ERROR_TOT 
COUNT_ENTS 
ERROR_NORM 
LAST_IND 

Definition at line 39 of file ElasticAdaptiveExample.hpp.

Variable Documentation

◆ analyticalDisplacement

MoFEM::VectorFunc analyticalDisplacement
inline

Definition at line 188 of file ElasticAdaptiveExample.hpp.

189 {
190 double E = 1e3;
191 double nu = 0.3;
192
193 double r = std::sqrt(x * x + y * y);
194
195 double a = 0.5;
196 double b = 1.0;
197
198 double pa = 2;
199 double pb = 1;
200
201 double A = (pa * sqr(a) - pb * sqr(b)) / (sqr(b) - sqr(a));
202 double B = sqr(a) * sqr(b) * (pa - pb) / (sqr(b) - sqr(a));
203
204 VectorDouble u;
205 u.resize(SPACE_DIM);
206 std::vector<double> v_u;
207
208 double u_r = (1. + nu) / E * ((1. - 2. * nu) * A * r + B / r);
209
210 if (SPACE_DIM == 2)
211 v_u = {u_r / r * x, u_r / r * y};
212 else
213 v_u = {u_r / r * x, u_r / r * y, 0.0};
214
215 for (int i = 0; i < SPACE_DIM; ++i)
216 u(i) = v_u[i];
217
218 return u;
219};
constexpr double a
constexpr int SPACE_DIM
FTensor::Index< 'i', SPACE_DIM > i
UBlasVector< double > VectorDouble
Definition Types.hpp:68
int r
Definition sdf.py:205
constexpr AssemblyType A

◆ sqr

auto sqr = [](double v) { return v * v; }
inline
Examples
mofem/tutorials/mix-0_mixed_poisson/mixed_poisson.cpp.

Definition at line 186 of file ElasticAdaptiveExample.hpp.

186{ return v * v; };
const double v
phase velocity of light in medium (cm/ns)