60 lines
2.1 KiB
C++
60 lines
2.1 KiB
C++
#ifndef FESA_ELEMENTS_THERMAL_SHELL_GEOMETRY_H_
|
|
#define FESA_ELEMENTS_THERMAL_SHELL_GEOMETRY_H_
|
|
|
|
#include <array>
|
|
|
|
#include "fesa/core/status.h"
|
|
#include "fesa/math/vector3.h"
|
|
#include "thermal_interval.h"
|
|
|
|
namespace fesa {
|
|
struct ModelDefinition;
|
|
namespace thermal_internal {
|
|
|
|
/// @brief Holds translated, power-of-two scaled tangents and their enclosures.
|
|
struct Geometry {
|
|
Vector3 b;
|
|
Vector3 c;
|
|
Vector3 d;
|
|
IntervalVector bi;
|
|
IntervalVector ci;
|
|
IntervalVector di;
|
|
int length_exponent = 0;
|
|
double scaled_jacobian_lower = 0;
|
|
};
|
|
|
|
/// @brief Holds actual-point product metric, gradients and orthonormal columns.
|
|
struct SurfacePoint {
|
|
std::array<double, 4> shape{};
|
|
std::array<Interval, 4> shape_interval{};
|
|
std::array<Vector3, 4> gradient{};
|
|
std::array<IntervalVector, 4> gradient_interval{};
|
|
std::array<Vector3, 3> axes{};
|
|
double jacobian = 0;
|
|
Interval jacobian_interval;
|
|
};
|
|
|
|
/// @brief Certifies whole-patch rank/injectivity from fixed candidate
|
|
/// directions.
|
|
Result<Geometry> BuildGeometry(const std::array<Vector3, 4>& coordinates,
|
|
const SourceEntityId& source,
|
|
const SourceLocation& location);
|
|
/// @brief Checks finite metric inverse and gradients at one used surface point.
|
|
Result<SurfacePoint> EvaluateSurface(const Geometry& geometry, double xi,
|
|
double eta, Interval xi_interval,
|
|
Interval eta_interval,
|
|
const SourceEntityId& source,
|
|
const SourceLocation& location);
|
|
/// @brief Builds a geometry failure retaining original source element identity.
|
|
Status GeometryFailure(const SourceEntityId& source,
|
|
const SourceLocation& location, const char* code,
|
|
const char* message);
|
|
} // namespace thermal_internal
|
|
|
|
/// @brief Validates DS4 whole-patch geometry and source-only manifold topology.
|
|
/// @pre Node indices and section assignments have been checked by Domain.
|
|
Status ValidateThermalShellMesh(const ModelDefinition& definition);
|
|
|
|
} // namespace fesa
|
|
#endif // FESA_ELEMENTS_THERMAL_SHELL_GEOMETRY_H_
|