18 MakeFaceNodeMapping(cell),
27 if (i == 0)
return 1.0 - qpoint.
x - qpoint.
y;
28 if (i == 1)
return qpoint.
x;
29 if (i == 2)
return qpoint.
y;
41 if (i == 0)
return Vec3(-1.0, -1.0, 0.0);
42 if (i == 1)
return Vec3( 1.0, 0.0, 0.0);
43 if (i == 2)
return Vec3( 0.0, 1.0, 0.0);
57 const double x_i = node_i.x;
58 const double y_i = node_i.y;
61 J[0][0] += grad_shape_i.
x * x_i;
62 J[0][1] += grad_shape_i.
y * x_i;
63 J[1][0] += grad_shape_i.
x * y_i;
64 J[1][1] += grad_shape_i.
y * y_i;
71std::pair<double, LagrangeBaseMapping::Vec3>
73 size_t face_index,
const Vec3& qpoint_face)
const
79 for (
size_t i = 0; i < 2; ++i)
81 if (i == 0) dx_dxbar += -0.5 * x0;
82 if (i == 1) dx_dxbar += 0.5 * x1;
85 const auto cross = dx_dxbar.
Cross(
Vec3(0.0,0.0,1.0));
87 return {dx_dxbar.
Norm(), cross.Normalized()};
92 size_t face_index,
const Vec3& qpoint_face)
const
96 const double x = 0.5 * (qpoint_face.
x + 1.0);
98 if (face_index == 0)
return Vec3( x, 0.0, 0.0);
99 if (face_index == 1)
return Vec3( x, 1.0 - x, 0.0);
100 if (face_index == 2)
return Vec3(0.0, x, 0.0);
#define ChiLogicalErrorIf(condition, message)
#define ChiLogicalError(message)
const std::vector< std::vector< int > > face_node_mappings_
const std::vector< chi_mesh::Vector3 > node_locations_
std::vector< double > VecDbl
std::vector< VecDbl > MatDbl
double RefShape(uint32_t i, const Vec3 &qpoint) const override
Vec3 RefGradShape(uint32_t i, const Vec3 &qpoint) const override
Vec3 FaceToElementQPointConversion(size_t face_index, const Vec3 &qpoint_face) const override
MatDbl RefJacobian(const Vec3 &qpoint) const override
LagrangeTriangleMapping(const chi_mesh::MeshContinuum &grid, const chi_mesh::Cell &cell, const Quadrature &volume_quadrature, const Quadrature &surface_quadrature)
std::pair< double, Vec3 > RefFaceJacobianDeterminantAndNormal(size_t face_index, const Vec3 &qpoint_face) const override
Vector3 Cross(const Vector3 &that) const