34 template <
class ELEMENT>
76 unsigned long n_node =
this ->
nnode();
78 unsigned Nx = this->
Nx;
81 double R_min = this->
Xmin;
82 double R_max = this->
Xmax;
86 int end=
static_cast<int>(0.07*
Nx);
90 std::cout << std::endl <<
"Warning, no elements in outlet region" << std::endl;
91 std::cout <<
"Adjusting to one element" << std::endl;
96 double cut=R_min+(R_max-R_min)*((
static_cast<double>(
Nx-
end))/
Nx);
100 double b=R_min+0.9*(R_max-R_min);
105 std::cout << std::endl <<
"Number of end elements in r: " <<
end << std::endl;
106 std::cout <<
"Start of outlet region: " << cut << std::endl << std::endl;
109 for(
unsigned long n=0;
n<n_node;
n++)
112 double r_pos =
this ->
Node_pt[
n ] ->
x( 0 );
136 double log_spacing(
const double&
r,
const double&
a,
const double&
b,
double R_min)
138 return R_min*
exp(((
r-R_min)/(
a-R_min))*
log(
b/R_min));
144 {std::cout <<
"Warning - no elements in outlet region. Attempting to divide by zero" << std::endl;}
145 return R_max+(
r - R_max)*((R_max-
b)/(R_max-
a));
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Scalar * b
Definition: benchVecAdd.cpp:17
Vector< Node * > Node_pt
Vector of pointers to nodes.
Definition: mesh.h:183
unsigned long nnode() const
Return number of nodes in the mesh.
Definition: mesh.h:596
Definition: rectangular_quadmesh.template.h:59
unsigned Nx
Nx: number of elements in x-direction.
Definition: rectangular_quadmesh.template.h:63
const unsigned & ny() const
Return number of elements in y direction.
Definition: rectangular_quadmesh.template.h:231
double Xmax
Maximum value of x coordinate.
Definition: rectangular_quadmesh.template.h:72
const unsigned & nx() const
Return number of elements in x direction.
Definition: rectangular_quadmesh.template.h:224
double Xmin
Minimum value of x coordinate.
Definition: rectangular_quadmesh.template.h:70
Definition: refineable_quad_mesh.h:53
void setup_quadtree_forest()
Definition: refineable_quad_mesh.h:88
My log r spaced mesh.
Definition: refineable_r_mesh.h:37
Vector< GeneralisedElement * > Fluid_elt_pt
Definition: refineable_r_mesh.h:41
double linear_spacing(const double &r, const double &a, const double &b, double R_max)
Definition: refineable_r_mesh.h:141
unsigned fluid_elt_length()
Return length of fluid element vector.
Definition: refineable_r_mesh.h:49
ELEMENT * fluid_elt_pt(unsigned e)
Return pointer to fluid element e.
Definition: refineable_r_mesh.h:46
void stretch_mesh()
Definition: refineable_r_mesh.h:74
Vector< GeneralisedElement * > fluid_elt_vector()
Return pointer to vector of all Fluid elements.
Definition: refineable_r_mesh.h:51
double log_spacing(const double &r, const double &a, const double &b, double R_min)
Definition: refineable_r_mesh.h:136
Refineable_r_mesh(const unsigned int &nx, const unsigned int &ny)
Definition: refineable_r_mesh.h:55
static constexpr lastp1_t end
Definition: IndexedViewHelper.h:79
const Scalar * a
Definition: level2_cplx_impl.h:32
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 exp(const bfloat16 &a)
Definition: BFloat16.h:615
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 log(const bfloat16 &a)
Definition: BFloat16.h:618
Global variables.
Definition: TwenteMeshGluing.cpp:60
bool new_outlet_region
Definition: jeffery_hamel.cc:93
bool log_mesh
Definition: jeffery_hamel.cc:92
double R_l
Definition: jeffery_hamel.cc:57
double R_r
Definition: jeffery_hamel.cc:58
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
list x
Definition: plotDoE.py:28