oomph::LineDerivatives Class Reference

#include <interface_elements.h>

+ Inheritance diagram for oomph::LineDerivatives:

Public Member Functions

 LineDerivatives ()
 

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 LineElements. These are defined in a separate class so that they can be used by other interface equation-type classes.

Constructor & Destructor Documentation

◆ LineDerivatives()

oomph::LineDerivatives::LineDerivatives ( )
inline
664 {}

Member Function Documentation

◆ compute_surface_derivatives()

double oomph::LineDerivatives::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 line interface case.

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

764  {
765  const unsigned n_shape = psi.nindex1();
766  const unsigned n_dim = 2;
767 
768  // Calculate the only entry of the surface
769  // metric tensor (square length of the tangent vector)
770  double a11 = interpolated_t(0, 0) * interpolated_t(0, 0) +
771  interpolated_t(0, 1) * interpolated_t(0, 1);
772 
773  // Now set the derivative terms of the shape functions
774  for (unsigned l = 0; l < n_shape; l++)
775  {
776  for (unsigned i = 0; i < n_dim; i++)
777  {
778  dpsidS(l, i) = dpsids(l, 0) * interpolated_t(0, i) / a11;
779  }
780  }
781 
782  // The surface divergence is the same as the surface
783  // gradient operator
784  dpsidS_div = dpsidS;
785 
786  // Return the jacobian
787  return sqrt(a11);
788  }
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
int i
Definition: BiCGSTAB_step_by_step.cpp:9

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


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