feat(cpp-object-oriented-modular-refactoring): step 4 - model-element-google-style
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "fesa/analysis/analysis_model.hpp"
|
||||
#include "fesa/fem/dof_manager.hpp"
|
||||
#include "fesa/model/domain.hpp"
|
||||
#include "fesa/model/domain.h"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
@@ -19,8 +19,8 @@ fesa::DofManager makeDofs(
|
||||
std::vector<fesa::BoundaryCondition> boundaries) {
|
||||
const std::filesystem::path source{"models/essential-constraints.inp"};
|
||||
fesa::ModelDefinition definition{};
|
||||
definition.sourcePath = source;
|
||||
definition.sourceContentIdentity = "fnv1a64:1234567890abcdef";
|
||||
definition.source_path = source;
|
||||
definition.source_content_identity = "fnv1a64:1234567890abcdef";
|
||||
definition.nodes = {
|
||||
{{"Beam-1", 1, "1"}, {0.0, 0.0, 0.0}, {source, 2U}}};
|
||||
definition.steps = {{
|
||||
@@ -33,7 +33,7 @@ fesa::DofManager makeDofs(
|
||||
1.0,
|
||||
{source, 10U}}};
|
||||
|
||||
auto domain = fesa::Domain::create(std::move(definition));
|
||||
auto domain = fesa::Domain::Create(std::move(definition));
|
||||
EXPECT_TRUE(domain.HasValue());
|
||||
auto model = fesa::AnalysisModel::create(domain.Value());
|
||||
EXPECT_TRUE(model.HasValue());
|
||||
@@ -46,8 +46,8 @@ fesa::DofManager makeShellSizedDofs(
|
||||
std::vector<fesa::BoundaryCondition> boundaries) {
|
||||
const std::filesystem::path source{"models/shell-essential-constraints.inp"};
|
||||
fesa::ModelDefinition definition{};
|
||||
definition.sourcePath = source;
|
||||
definition.sourceContentIdentity = "fnv1a64:8877665544332211";
|
||||
definition.source_path = source;
|
||||
definition.source_content_identity = "fnv1a64:8877665544332211";
|
||||
definition.nodes = {
|
||||
{{"Shell-1", 1, "1"}, {0.0, 0.0, 0.0}, {source, 2U}},
|
||||
{{"Shell-1", 2, "2"}, {1.0, 0.0, 0.0}, {source, 3U}},
|
||||
@@ -55,11 +55,11 @@ fesa::DofManager makeShellSizedDofs(
|
||||
{{"Shell-1", 4, "4"}, {0.0, 1.0, 0.0}, {source, 5U}}};
|
||||
definition.materials = {
|
||||
{"Material", 1000.0, 0.25, {source, 6U}}};
|
||||
definition.shellSections = {
|
||||
definition.shell_sections = {
|
||||
{"ShellSection", 0.1, 0U, {source, 7U}}};
|
||||
definition.shellElements = {{
|
||||
definition.shell_elements = {{
|
||||
{"Shell-1", 1, "1"},
|
||||
fesa::ShellSourceElementType::s4,
|
||||
fesa::ShellSourceElementType::kS4,
|
||||
{0U, 1U, 2U, 3U},
|
||||
0U,
|
||||
0U,
|
||||
@@ -74,7 +74,7 @@ fesa::DofManager makeShellSizedDofs(
|
||||
1.0,
|
||||
{source, 10U}}};
|
||||
|
||||
auto domain = fesa::Domain::create(std::move(definition));
|
||||
auto domain = fesa::Domain::Create(std::move(definition));
|
||||
EXPECT_TRUE(domain.HasValue());
|
||||
auto model = fesa::AnalysisModel::create(domain.Value());
|
||||
EXPECT_TRUE(model.HasValue());
|
||||
|
||||
Reference in New Issue
Block a user