18 MakeFaceNodeMapping(cell),
30 if (i == 0) {a = -1.0; b=-1.0;}
31 if (i == 1) {a = 1.0; b=-1.0;}
32 if (i == 2) {a = 1.0; b= 1.0;}
33 if (i == 3) {a = -1.0; b= 1.0;}
36 return 0.25 * (1.0 + a * qpoint.
x) * (1.0 + b * qpoint.
y);
40 const Vec3& qpoint)
const
46 if (i == 0) {a = -1.0; b=-1.0;}
47 if (i == 1) {a = 1.0; b=-1.0;}
48 if (i == 2) {a = 1.0; b= 1.0;}
49 if (i == 3) {a = -1.0; b= 1.0;}
52 const double ab = a * b;
53 return Vec3(0.25 * (a + ab * qpoint.
y), 0.25 * (b + ab * qpoint.
x), 0.0);
64 const double x_i = node_i.x;
65 const double y_i = node_i.y;
68 J[0][0] += grad_shape_i.
x * x_i;
69 J[0][1] += grad_shape_i.
y * x_i;
70 J[1][0] += grad_shape_i.
x * y_i;
71 J[1][1] += grad_shape_i.
y * y_i;
78std::pair<double, LagrangeBaseMapping::Vec3>
80 size_t face_index,
const Vec3& qpoint_face)
const
86 for (
size_t i = 0; i < 2; ++i)
88 if (i == 0) dx_dxbar += -0.5 * x0;
89 if (i == 1) dx_dxbar += 0.5 * x1;
92 const auto cross = dx_dxbar.
Cross(
Vec3(0.0,0.0,1.0));
94 return {dx_dxbar.
Norm(), cross.Normalized()};
98 size_t face_index,
const Vec3& qpoint_face)
const
102 const double x = qpoint_face.
x + 1.0;
103 if (face_index == 0)
return Vec3(-1.0 + x, -1.0, 0.0);
104 if (face_index == 1)
return Vec3(1.0, -1.0 + x, 0.0);
105 if (face_index == 2)
return Vec3(1.0 - x, 1.0, 0.0);
106 if (face_index == 3)
return Vec3(-1.0, 1.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
MatDbl RefJacobian(const Vec3 &qpoint) const override
LagrangeQuadMapping(const chi_mesh::MeshContinuum &grid, const chi_mesh::Cell &cell, const Quadrature &volume_quadrature, const Quadrature &surface_quadrature)
Vec3 FaceToElementQPointConversion(size_t face_index, const Vec3 &qpoint_face) const override
Vec3 RefGradShape(uint32_t i, const Vec3 &qpoint) const override
std::pair< double, Vec3 > RefFaceJacobianDeterminantAndNormal(size_t face_index, const Vec3 &qpoint_face) const override
double RefShape(uint32_t i, const Vec3 &qpoint) const override
Vector3 Cross(const Vector3 &that) const