Integrate Refactor solver sources and dual MSVC CMake builds
This commit is contained in:
@@ -0,0 +1,115 @@
|
||||
#include "fesa/elements/element_capabilities.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "fesa/elements/hex8_element.h"
|
||||
#include "fesa/elements/nonlinear_mitc4_inertia.h"
|
||||
#include "fesa/elements/thermal_shell.h"
|
||||
|
||||
namespace fesa {
|
||||
|
||||
Mitc4TrialAdapter::Mitc4TrialAdapter(ElementDofLayout layout,
|
||||
const NonlinearMitc4Shell& kernel)
|
||||
: layout_{std::move(layout)}, kernel_{kernel} {}
|
||||
const ElementDofLayout& Mitc4TrialAdapter::DofLayout() const noexcept {
|
||||
return layout_;
|
||||
}
|
||||
Result<NonlinearMitc4InternalEquilibrium> Mitc4TrialAdapter::EvaluateTrial(
|
||||
const NonlinearMitc4TrialDofs& trial, const Vector* direction) const {
|
||||
return EvaluateInternalResidualAndTangent(kernel_, trial, direction);
|
||||
}
|
||||
Result<NonlinearMitc4ExternalDrillingConstraint>
|
||||
Mitc4TrialAdapter::EvaluateExternalDrillingConstraint(
|
||||
std::size_t node, const Vector3& phi, const Vector3& phi_dot,
|
||||
const Vector3& force, const Vector3& force_rate,
|
||||
const Vector3& force_acceleration) const {
|
||||
return kernel_.EvaluateExternalDrillingConstraint(
|
||||
node, phi, phi_dot, force, force_rate, force_acceleration);
|
||||
}
|
||||
|
||||
Hex8TrialAdapter::Hex8TrialAdapter(const Hex8Element& kernel)
|
||||
: kernel_{kernel} {}
|
||||
const ElementDofLayout& Hex8TrialAdapter::DofLayout() const noexcept {
|
||||
return kernel_.DofLayout();
|
||||
}
|
||||
Result<ElementStiffnessContribution> Hex8TrialAdapter::ComputeStiffness() const {
|
||||
return kernel_.ComputeStiffness();
|
||||
}
|
||||
Result<ElementResultBundle> Hex8TrialAdapter::Recover(const Vector& u) const {
|
||||
return kernel_.Recover(u);
|
||||
}
|
||||
Result<Hex8Response> Hex8TrialAdapter::EvaluateLinear(const Vector& u) const {
|
||||
return kernel_.EvaluateLinear(u);
|
||||
}
|
||||
Result<Hex8Response> Hex8TrialAdapter::EvaluateNonlinear(const Vector& u) const {
|
||||
return kernel_.EvaluateNonlinear(u);
|
||||
}
|
||||
Result<Hex8HighLowResponse> Hex8TrialAdapter::EvaluateLinearHighLow(
|
||||
const Vector& high, const Vector& low) const {
|
||||
return kernel_.EvaluateLinearHighLow(high, low);
|
||||
}
|
||||
Result<Hex8HighLowResponse> Hex8TrialAdapter::EvaluateNonlinearHighLow(
|
||||
const Vector& high, const Vector& low) const {
|
||||
return kernel_.EvaluateNonlinearHighLow(high, low);
|
||||
}
|
||||
Result<ElementStiffnessContribution> Hex8TrialAdapter::ComputeMass() const {
|
||||
return kernel_.ComputeMass();
|
||||
}
|
||||
std::array<double, 8> Hex8TrialAdapter::ReferenceWeights() const noexcept {
|
||||
return kernel_.ReferenceWeights();
|
||||
}
|
||||
|
||||
Mitc4InertiaAdapter::Mitc4InertiaAdapter(
|
||||
ElementDofLayout layout, const NonlinearMitc4Inertia& kernel)
|
||||
: layout_{std::move(layout)}, kernel_{kernel} {}
|
||||
const ElementDofLayout& Mitc4InertiaAdapter::DofLayout() const noexcept {
|
||||
return layout_;
|
||||
}
|
||||
Result<NonlinearMitc4InertiaEvaluation> Mitc4InertiaAdapter::Evaluate(
|
||||
const NonlinearMitc4TrialDofs& trial, const Vector& velocity24,
|
||||
const Vector& acceleration24) const {
|
||||
return kernel_.Evaluate(trial, velocity24, acceleration24);
|
||||
}
|
||||
|
||||
Ds4ThermalAdapter::Ds4ThermalAdapter(const ThermalShell& kernel)
|
||||
: layout_{kernel.SourceId(), kernel.NodeIndices()}, kernel_{kernel} {}
|
||||
const ThermalElementDofLayout& Ds4ThermalAdapter::DofLayout() const noexcept {
|
||||
return layout_;
|
||||
}
|
||||
const Matrix& Ds4ThermalAdapter::Conductivity() const noexcept {
|
||||
return kernel_.Conductivity();
|
||||
}
|
||||
const Matrix& Ds4ThermalAdapter::Capacity() const noexcept {
|
||||
return kernel_.Capacity();
|
||||
}
|
||||
const Matrix& Ds4ThermalAdapter::ConductivityError() const noexcept {
|
||||
return kernel_.ConductivityError();
|
||||
}
|
||||
const Matrix& Ds4ThermalAdapter::CapacityError() const noexcept {
|
||||
return kernel_.CapacityError();
|
||||
}
|
||||
Result<ThermalShellRecovery> Ds4ThermalAdapter::Recover(
|
||||
const std::array<double, 20>& temperature) const {
|
||||
return kernel_.Recover(temperature);
|
||||
}
|
||||
|
||||
Mitc4ReferenceAdapter::Mitc4ReferenceAdapter(const Mitc4Shell& kernel)
|
||||
: kernel_{kernel} {}
|
||||
const ElementDofLayout& Mitc4ReferenceAdapter::DofLayout() const noexcept {
|
||||
return kernel_.DofLayout();
|
||||
}
|
||||
Result<ElementStiffnessContribution>
|
||||
Mitc4ReferenceAdapter::ComputeStiffness() const {
|
||||
return kernel_.ComputeStiffness();
|
||||
}
|
||||
Result<ElementResultBundle> Mitc4ReferenceAdapter::Recover(const Vector& u) const {
|
||||
return kernel_.Recover(u);
|
||||
}
|
||||
Result<Mitc4Stiffness> Mitc4ReferenceAdapter::Stiffness() const {
|
||||
return kernel_.Stiffness();
|
||||
}
|
||||
Result<Mitc4Mass> Mitc4ReferenceAdapter::Mass(double density) const {
|
||||
return kernel_.Mass(density);
|
||||
}
|
||||
|
||||
} // namespace fesa
|
||||
Reference in New Issue
Block a user