libMesh
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
GradDivExactSolution Class Reference

#include <grad_div_exact_solution.h>

Public Member Functions

 GradDivExactSolution ()=default
 
 ~GradDivExactSolution ()=default
 
RealGradient operator() (Point p)
 
RealTensor grad (Point p)
 
RealGradient forcing (Point p)
 

Static Public Member Functions

static void RM (RealTensor T)
 

Private Attributes

const Real k = pi
 

Static Private Attributes

static RealTensor R
 

Detailed Description

Definition at line 26 of file grad_div_exact_solution.h.

Constructor & Destructor Documentation

◆ GradDivExactSolution()

GradDivExactSolution::GradDivExactSolution ( )
default

◆ ~GradDivExactSolution()

GradDivExactSolution::~GradDivExactSolution ( )
default

Member Function Documentation

◆ forcing()

RealGradient GradDivExactSolution::forcing ( Point  p)
inline

Definition at line 56 of file grad_div_exact_solution.h.

Referenced by assemble_graddiv().

57  {
58  return (2*k*k + 1)*operator()(p);
59  }
RealGradient operator()(Point p)

◆ grad()

RealTensor GradDivExactSolution::grad ( Point  p)
inline

Definition at line 43 of file grad_div_exact_solution.h.

References libMesh::Real, and libMesh::TypeTensor< T >::transpose().

44  {
45  Point pp = R.transpose()*p;
46  Real x = pp(0), y = pp(1);
47 
48  const Real dux_dx = -k*sin(k*x)*sin(k*y);
49  const Real dux_dy = k*cos(k*x)*cos(k*y);
50  const Real duy_dx = dux_dy;
51  const Real duy_dy = dux_dx;
52 
53  return R*RealTensor(dux_dx, dux_dy, Real(0), duy_dx, duy_dy)*R.transpose()/R.det();
54  }
TypeTensor< T > transpose() const
Definition: type_tensor.h:1050
RealTensorValue RealTensor
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:39

◆ operator()()

RealGradient GradDivExactSolution::operator() ( Point  p)
inline

Definition at line 32 of file grad_div_exact_solution.h.

References libMesh::Real.

33  {
34  Point pp = R.transpose()*p;
35  Real x = pp(0), y = pp(1);
36 
37  const Real ux = cos(k*x)*sin(k*y);
38  const Real uy = sin(k*x)*cos(k*y);
39 
40  return R*RealGradient(ux, uy)/R.det();
41  }
RealVectorValue RealGradient
TypeTensor< T > transpose() const
Definition: type_tensor.h:1050
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:39

◆ RM()

static void GradDivExactSolution::RM ( RealTensor  T)
inlinestatic

Definition at line 61 of file grad_div_exact_solution.h.

Referenced by main().

62  {
63  R = T;
64  }

Member Data Documentation

◆ k

const Real GradDivExactSolution::k = pi
private

Definition at line 68 of file grad_div_exact_solution.h.

◆ R

RealTensor GradDivExactSolution::R
staticprivate

Definition at line 67 of file grad_div_exact_solution.h.


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