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 40 of file ElasticAdaptiveExample.hpp.

Variable Documentation

◆ analyticalDisplacement

MoFEM::VectorFunc analyticalDisplacement
inline

Definition at line 207 of file ElasticAdaptiveExample.hpp.

208 {
209 double E = 1e3;
210 double nu = 0.3;
211
212 double r = std::sqrt(x * x + y * y);
213
214 double a = 0.5;
215 double b = 1.0;
216
217 double pa = 2;
218 double pb = 1;
219
220 double A = (pa * sqr(a) - pb * sqr(b)) / (sqr(b) - sqr(a));
221 double B = sqr(a) * sqr(b) * (pa - pb) / (sqr(b) - sqr(a));
222
223 VectorDouble u;
224 u.resize(SPACE_DIM);
225 std::vector<double> v_u;
226
227 double u_r = (1. + nu) / E * ((1. - 2. * nu) * A * r + B / r);
228
229 if (SPACE_DIM == 2)
230 v_u = {u_r / r * x, u_r / r * y};
231 else
232 v_u = {u_r / r * x, u_r / r * y, 0.0};
233
234 for (int i = 0; i < SPACE_DIM; ++i)
235 u(i) = v_u[i];
236
237 return u;
238};
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 205 of file ElasticAdaptiveExample.hpp.

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