Skip to content

Commit

Permalink
Default to unit time
Browse files Browse the repository at this point in the history
  • Loading branch information
TLCFEM committed Oct 27, 2024
1 parent a891abd commit e0afa1c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Material/Material1D/Viscosity/Nonviscous01.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Nonviscous01::Nonviscous01(const unsigned T, cx_vec&& M, cx_vec&& S)
, Material1D(T, 0.) {}

int Nonviscous01::initialize(const shared_ptr<DomainBase>& D) {
if(nullptr != D) incre_time = &D->get_factory()->modify_incre_time();
incre_time = nullptr == D ? &unit_time : &D->get_factory()->modify_incre_time();

complex_damping.zeros(m.n_elem);
s_para.zeros(m.n_elem);
Expand Down
2 changes: 2 additions & 0 deletions Material/Material1D/Viscosity/Nonviscous01.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ struct DataNonviscous01 {
};

class Nonviscous01 final : protected DataNonviscous01, public Material1D {
static constexpr double unit_time = 1.;

const double* incre_time = nullptr;

cx_vec complex_damping;
Expand Down
2 changes: 0 additions & 2 deletions Material/Material1D/vonMises/VAFCRP1D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
#include <Domain/DomainBase.h>
#include <Domain/Factory.hpp>

constexpr double VAFCRP1D::unit_time = 1.;

VAFCRP1D::VAFCRP1D(const unsigned T, DataVAFCRP1D&& D, const double R)
: DataVAFCRP1D(std::move(D))
, Material1D(T, R) { access::rw(tolerance) = 1E-15; }
Expand Down
2 changes: 1 addition & 1 deletion Material/Material1D/vonMises/VAFCRP1D.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ struct DataVAFCRP1D {

class VAFCRP1D final : protected DataVAFCRP1D, public Material1D {
static constexpr unsigned max_iteration = 20u;
static const double unit_time;
static constexpr double unit_time = 1.;

const double* incre_time = nullptr;

Expand Down
2 changes: 1 addition & 1 deletion Material/Material3D/vonMises/VAFCRP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ VAFCRP::VAFCRP(const unsigned T, DataVAFCRP&& D, const double R)
, Material3D(T, R) {}

int VAFCRP::initialize(const shared_ptr<DomainBase>& D) {
incre_time = &D->get_factory()->modify_incre_time();
incre_time = nullptr == D ? &unit_time : &D->get_factory()->modify_incre_time();

trial_stiffness = current_stiffness = initial_stiffness = tensor::isotropic_stiffness(elastic_modulus, poissons_ratio);

Expand Down
1 change: 1 addition & 0 deletions Material/Material3D/vonMises/VAFCRP.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ struct DataVAFCRP {

class VAFCRP final : protected DataVAFCRP, public Material3D {
static constexpr unsigned max_iteration = 20u;
static constexpr double unit_time = 1.;
static const double root_three_two;
static const mat unit_dev_tensor;

Expand Down

0 comments on commit e0afa1c

Please sign in to comment.