oomph::AxisymmetricDerivatives Class Reference

#include <interface_elements.h>

+ Inheritance diagram for oomph::AxisymmetricDerivatives:

Public Member Functions

 AxisymmetricDerivatives ()
 

Protected Member Functions

double compute_surface_derivatives (const Shape &psi, const DShape &dpsids, const DenseMatrix< double > &interpolated_t, const Vector< double > &interpolated_x, DShape &surface_gradient, DShape &surface_divergence)
 Fill in the specific surface derivative calculations. More...
 

Detailed Description

Class that establishes the surface derivative functions for AxisymmetricInterfaceElements. These are defined in a separate class so that they can be used by other interface equation-type classes.

Constructor & Destructor Documentation

◆ AxisymmetricDerivatives()

oomph::AxisymmetricDerivatives::AxisymmetricDerivatives ( )
inline
688 {}

Member Function Documentation

◆ compute_surface_derivatives()

double oomph::AxisymmetricDerivatives::compute_surface_derivatives ( const Shape psi,
const DShape dpsids,
const DenseMatrix< double > &  interpolated_t,
const Vector< double > &  interpolated_x,
DShape dpsidS,
DShape dpsidS_div 
)
protected

Fill in the specific surface derivative calculations.

Specialise the surface derivatives for the axisymmetric interface case.

///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////

805  {
806  // Initially the same as the 2D case
807  const unsigned n_shape = psi.nindex1();
808  const unsigned n_dim = 2;
809 
810  // Calculate the only entry of the surface
811  // metric tensor (square length of the tangent vector)
812  double a11 = interpolated_t(0, 0) * interpolated_t(0, 0) +
813  interpolated_t(0, 1) * interpolated_t(0, 1);
814 
815  // Now set the derivative terms of the shape functions
816  for (unsigned l = 0; l < n_shape; l++)
817  {
818  for (unsigned i = 0; i < n_dim; i++)
819  {
820  dpsidS(l, i) = dpsids(l, 0) * interpolated_t(0, i) / a11;
821  // Set the standard components of the divergence
822  dpsidS_div(l, i) = dpsidS(l, i);
823  }
824  }
825 
826  const double r = interpolated_x[0];
827 
828  // The surface divergence is different because we need
829  // to take account of variation of the base vectors
830  for (unsigned l = 0; l < n_shape; l++)
831  {
832  dpsidS_div(l, 0) += psi(l) / r;
833  }
834 
835  // Return the jacobian, needs to be multiplied by r
836  return r * sqrt(a11);
837  }
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
int i
Definition: BiCGSTAB_step_by_step.cpp:9
r
Definition: UniformPSDSelfTest.py:20

References i, oomph::Shape::nindex1(), UniformPSDSelfTest::r, and sqrt().


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