oomph::MyAxisymmetricFluidElement< ELEMENT > Class Template Reference

Overload Element to allow calculation of the flux. More...

+ Inheritance diagram for oomph::MyAxisymmetricFluidElement< ELEMENT >:

Public Member Functions

 MyAxisymmetricFluidElement ()
 Empty constructor. More...
 
double square_of_l2_norm ()
 

Detailed Description

template<class ELEMENT>
class oomph::MyAxisymmetricFluidElement< ELEMENT >

Overload Element to allow calculation of the flux.

Constructor & Destructor Documentation

◆ MyAxisymmetricFluidElement()

template<class ELEMENT >
oomph::MyAxisymmetricFluidElement< ELEMENT >::MyAxisymmetricFluidElement ( )
inline

Empty constructor.

116 { }

Member Function Documentation

◆ square_of_l2_norm()

template<class ELEMENT >
double oomph::MyAxisymmetricFluidElement< ELEMENT >::square_of_l2_norm ( )
inline

Get square of L2 norm of velocity components and add to the entries in the vector norm

121  {
122  //Initialise the sum to zero
123  double sum = 0.0;
124 
125  //Find out how many nodes there are
126  const unsigned n_node = this->nnode();
127 
128  //Find the indices at which the local velocities are stored
129  unsigned u_nodal_index[3];
130  for(unsigned i=0;i<3;i++) {u_nodal_index[i] = this->u_index_axi_nst(i);}
131 
132  //Set up memory for the velocity shape fcts
133  Shape psif(n_node);
134  DShape dpsidx(n_node,2);
135 
136  //Number of integration points
137  const unsigned n_intpt = this->integral_pt()->nweight();
138 
139  //Set the Vector to hold local coordinates
140  Vector<double> s(2);
141 
142  //Loop over the integration points
143  for(unsigned ipt=0;ipt<n_intpt;ipt++)
144  {
145  //Assign values of s
146  for(unsigned i=0;i<2;i++) s[i] = this->integral_pt()->knot(ipt,i);
147 
148  //Get the integral weight
149  double w = this->integral_pt()->weight(ipt);
150 
151  // Call the derivatives of the veloc shape functions
152  // (Derivs not needed but they are free)
153  double J = this->dshape_eulerian_at_knot(ipt,psif,dpsidx);
154 
155 
156  // Calculate position
157  Vector<double> interpolated_x(2,0.0);
158  //Calculate velocities
159  Vector<double> interpolated_u(3,0.0);
160 
161  // Loop over nodes
162  for(unsigned l=0;l<n_node;l++)
163  {
164  const double psif_ = psif[l];
165 
166  //Loop over physical coordinates
167  for(unsigned i=0;i<2;i++)
168  {
169  interpolated_x[i] += this->raw_nodal_position(l,i)*psif_;
170  }
171 
172  //Loop over velocity components
173  for(unsigned i=0;i<3;i++)
174  {
175  interpolated_u[i] += this->raw_nodal_value(l,u_nodal_index[i])*psif_;
176  }
177  }
178 
179 
180  //Premultiply the weights and the Jacobian
181  double W = interpolated_x[0]*w*J;
182 
183  //Assemble square of L2 norm
184  for(unsigned i=0;i<3;i++)
185  {
186  sum +=interpolated_u[i]*interpolated_u[i]*W;
187  }
188  }
189 
190  return sum;
191  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
JacobiRotation< float > J
Definition: Jacobi_makeJacobi.cpp:3
RowVector3d w
Definition: Matrix_resize_int.cpp:3
Definition: shape.h:278
Definition: shape.h:76
RealScalar s
Definition: level1_cplx_impl.h:130
@ W
Definition: quadtree.h:63

References i, J, s, w, and oomph::QuadTreeNames::W.


The documentation for this class was generated from the following file: