feat(shell-surface-pressure-load): step 1 - map-pressure-input-contract
This commit is contained in:
@@ -44,6 +44,10 @@ class AnalysisModel {
|
||||
/// @brief Returns concentrated-load indices in source order.
|
||||
const std::vector<EntityIndex>& ActiveLoads() const noexcept;
|
||||
|
||||
/// @brief Returns active surface pressure records without copying Domain data.
|
||||
const std::vector<SurfacePressureLoadDefinition>& ActiveSurfacePressureLoads()
|
||||
const noexcept;
|
||||
|
||||
private:
|
||||
/// @brief Builds stable indices without copying the referenced Domain.
|
||||
explicit AnalysisModel(const Domain& domain);
|
||||
|
||||
@@ -28,6 +28,7 @@ struct DataLine {
|
||||
struct KeywordBlock {
|
||||
std::string canonical_name;
|
||||
std::string original_line;
|
||||
std::vector<std::string> physical_lines;
|
||||
std::vector<KeywordParameter> parameters;
|
||||
std::vector<DataLine> data;
|
||||
SourceLocation location;
|
||||
|
||||
@@ -74,12 +74,19 @@ class StepDefinition {
|
||||
const DomainCollectionView<ConcentratedNodalLoad>& ConcentratedLoads()
|
||||
const noexcept;
|
||||
|
||||
/// @brief Returns additive surface pressure records in source order.
|
||||
const std::vector<SurfacePressureLoadDefinition>& SurfacePressureLoads()
|
||||
const noexcept;
|
||||
|
||||
/// @brief Returns the approved static procedure identity.
|
||||
StaticProcedureKind ProcedureKind() const noexcept;
|
||||
|
||||
/// @brief Reports whether this step uses the nonlinear static procedure.
|
||||
bool IsNonlinearStatic() const noexcept;
|
||||
|
||||
/// @brief Reports the source NLGEOM setting for this static step.
|
||||
bool UsesNonlinearGeometry() const noexcept;
|
||||
|
||||
/// @brief Returns the static initial increment provenance value.
|
||||
double InitialIncrement() const noexcept;
|
||||
|
||||
@@ -109,6 +116,7 @@ class StepDefinition {
|
||||
std::vector<std::unique_ptr<Load>> loads_;
|
||||
LoadView loads_view_;
|
||||
DomainCollectionView<ConcentratedNodalLoad> concentrated_loads_view_;
|
||||
std::vector<SurfacePressureLoadDefinition> surface_pressure_loads_;
|
||||
StaticProcedureKind procedure_kind_;
|
||||
bool nlgeom_;
|
||||
double initial_increment_;
|
||||
@@ -173,6 +181,9 @@ class Domain {
|
||||
/// @brief Returns element sets in stable declaration order.
|
||||
const std::vector<ElementSet>& ElementSets() const noexcept;
|
||||
|
||||
/// @brief Returns assembly element surfaces in stable declaration order.
|
||||
const std::vector<ElementSurfaceDefinition>& ElementSurfaces() const noexcept;
|
||||
|
||||
/// @brief Returns static steps in stable declaration order.
|
||||
const DomainCollectionView<StepDefinition>& Steps() const noexcept;
|
||||
|
||||
|
||||
@@ -53,6 +53,56 @@ struct NodalLoad {
|
||||
SourceLocation location;
|
||||
};
|
||||
|
||||
/// @brief Identifies the selected exterior shell surface side.
|
||||
enum class ShellSurfaceSide { kSpos, kSneg };
|
||||
|
||||
/// @brief Identifies how a surface data member resolved its element facets.
|
||||
enum class SurfaceMemberKind { kDirect, kElset };
|
||||
|
||||
/// @brief Stores one resolved S4/S4R facet in an assembly element surface.
|
||||
struct ElementSurfaceFacetDefinition {
|
||||
EntityIndex element_index;
|
||||
std::size_t facet_ordinal;
|
||||
std::string part_name_raw;
|
||||
std::string part_name_canonical;
|
||||
std::string instance_name_raw;
|
||||
std::string instance_name_canonical;
|
||||
std::int64_t source_element_label;
|
||||
std::string source_element_label_raw;
|
||||
std::string source_element_type;
|
||||
ShellSurfaceSide side;
|
||||
SourceLocation first_member_location;
|
||||
std::size_t first_member_ordinal;
|
||||
SurfaceMemberKind member_kind;
|
||||
std::string elset_name_raw;
|
||||
std::string elset_name_canonical;
|
||||
};
|
||||
|
||||
/// @brief Stores one immutable named assembly-level element surface.
|
||||
struct ElementSurfaceDefinition {
|
||||
std::string surface_name_raw;
|
||||
std::string surface_name_canonical;
|
||||
std::vector<ElementSurfaceFacetDefinition> facets;
|
||||
SourceLocation declaration_location;
|
||||
std::size_t declaration_ordinal;
|
||||
};
|
||||
|
||||
/// @brief Stores one ordered uniform pressure record targeting a surface.
|
||||
struct SurfacePressureLoadDefinition {
|
||||
std::string step_name_raw;
|
||||
std::string step_name_canonical;
|
||||
EntityIndex surface_index;
|
||||
std::string surface_name_raw;
|
||||
std::string surface_name_canonical;
|
||||
std::string load_type;
|
||||
double magnitude;
|
||||
std::string magnitude_raw;
|
||||
SourceLocation keyword_location;
|
||||
SourceLocation data_location;
|
||||
std::size_t data_ordinal;
|
||||
std::size_t load_ordinal;
|
||||
};
|
||||
|
||||
/// @brief Identifies the approved static procedure semantics for one step.
|
||||
enum class StaticProcedureKind {
|
||||
kLinearSmallDisplacement,
|
||||
@@ -66,6 +116,7 @@ struct StaticStepDefinition {
|
||||
std::string step_name,
|
||||
std::vector<PrescribedDisplacementDefinition> step_boundaries,
|
||||
std::vector<NodalLoad> step_loads,
|
||||
std::vector<SurfacePressureLoadDefinition> step_surface_pressure_loads,
|
||||
StaticProcedureKind step_procedure_kind,
|
||||
bool step_nlgeom,
|
||||
double step_initial_increment,
|
||||
@@ -73,10 +124,11 @@ struct StaticStepDefinition {
|
||||
double step_minimum_increment,
|
||||
double step_maximum_increment,
|
||||
SourceLocation step_location)
|
||||
: name{std::move(step_name)},
|
||||
boundaries{std::move(step_boundaries)},
|
||||
loads{std::move(step_loads)},
|
||||
procedure_kind{step_procedure_kind},
|
||||
: name{std::move(step_name)},
|
||||
boundaries{std::move(step_boundaries)},
|
||||
loads{std::move(step_loads)},
|
||||
surface_pressure_loads{std::move(step_surface_pressure_loads)},
|
||||
procedure_kind{step_procedure_kind},
|
||||
nlgeom{step_nlgeom},
|
||||
initial_increment{step_initial_increment},
|
||||
time_period{step_time_period},
|
||||
@@ -84,6 +136,24 @@ struct StaticStepDefinition {
|
||||
maximum_increment{step_maximum_increment},
|
||||
location{std::move(step_location)} {}
|
||||
|
||||
/// @brief Creates a static step without surface pressure records.
|
||||
StaticStepDefinition(
|
||||
std::string step_name,
|
||||
std::vector<PrescribedDisplacementDefinition> step_boundaries,
|
||||
std::vector<NodalLoad> step_loads,
|
||||
StaticProcedureKind step_procedure_kind,
|
||||
bool step_nlgeom,
|
||||
double step_initial_increment,
|
||||
double step_time_period,
|
||||
double step_minimum_increment,
|
||||
double step_maximum_increment,
|
||||
SourceLocation step_location)
|
||||
: StaticStepDefinition(
|
||||
std::move(step_name), std::move(step_boundaries),
|
||||
std::move(step_loads), {}, step_procedure_kind, step_nlgeom,
|
||||
step_initial_increment, step_time_period, step_minimum_increment,
|
||||
step_maximum_increment, std::move(step_location)) {}
|
||||
|
||||
/// @brief Creates a legacy linear static step definition.
|
||||
StaticStepDefinition(
|
||||
std::string step_name,
|
||||
@@ -104,6 +174,7 @@ struct StaticStepDefinition {
|
||||
std::string name;
|
||||
std::vector<PrescribedDisplacementDefinition> boundaries;
|
||||
std::vector<NodalLoad> loads;
|
||||
std::vector<SurfacePressureLoadDefinition> surface_pressure_loads;
|
||||
StaticProcedureKind procedure_kind;
|
||||
bool nlgeom;
|
||||
double initial_increment;
|
||||
@@ -172,6 +243,7 @@ struct ModelDefinition {
|
||||
std::vector<ElementSet> element_sets;
|
||||
std::vector<PartDefinition> parts;
|
||||
std::vector<InstanceDefinition> instances;
|
||||
std::vector<ElementSurfaceDefinition> element_surfaces;
|
||||
std::vector<StaticStepDefinition> steps;
|
||||
std::vector<Diagnostic> warnings;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user