Skip to content

Commit b82442a

Browse files
authored
Merge pull request #711 from vovannikov/683-post-setup-for-auxiliary-integrator
Call `post_setup()` for the auxiliary time integrator in `StructureTimeAdaJoint`
2 parents bdcfeb9 + 62d03f8 commit b82442a

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

src/adapter/4C_adapter_str_timeada_joint.cpp

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ FOUR_C_NAMESPACE_OPEN
2828
/*----------------------------------------------------------------------*/
2929
/*----------------------------------------------------------------------*/
3030
Adapter::StructureTimeAdaJoint::StructureTimeAdaJoint(std::shared_ptr<Structure> structure)
31-
: StructureTimeAda(structure), sta_(nullptr), sta_wrapper_(nullptr)
31+
: StructureTimeAda(structure), sta_(nullptr)
3232
{
3333
if (stm_->is_setup()) setup_auxiliary();
3434
}
@@ -91,12 +91,11 @@ void Adapter::StructureTimeAdaJoint::setup_auxiliary()
9191
sta_->init(dataio, datasdyn, dataglobalstate);
9292
sta_->setup();
9393

94-
// setup wrapper
95-
sta_wrapper_ = std::make_shared<Adapter::StructureTimeLoop>(sta_);
96-
9794
const int restart = Global::Problem::instance()->restart();
9895
if (restart)
9996
{
97+
sta_->post_setup();
98+
10099
const Solid::TimeInt::Base& sti = *stm_;
101100
const auto& gstate = sti.data_global_state();
102101
dataglobalstate->get_dis_n()->update(1.0, *(gstate.get_dis_n()), 0.0);
@@ -240,4 +239,15 @@ void Adapter::StructureTimeAdaJoint::reset_step()
240239
sta_->reset_step();
241240
}
242241

242+
/*----------------------------------------------------------------------*/
243+
/*----------------------------------------------------------------------*/
244+
void Adapter::StructureTimeAdaJoint::post_setup()
245+
{
246+
// base post setup
247+
Adapter::StructureTimeAda::post_setup();
248+
249+
// post setup the auxiliary time integrator
250+
sta_->post_setup();
251+
}
252+
243253
FOUR_C_NAMESPACE_CLOSE

src/adapter/4C_adapter_str_timeada_joint.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ namespace Adapter
5555
//! Provide type of algorithm
5656
enum AdaEnum method_adapt_dis() const override;
5757

58+
//! Override since we need to setup the auxiliary time integrator
59+
void post_setup() override;
60+
5861
protected:
5962
/// setup of the auxiliary time integrator
6063
void setup_auxiliary() override;
@@ -66,9 +69,6 @@ namespace Adapter
6669
//! the auxiliary integrator
6770
std::shared_ptr<Solid::TimeInt::Base> sta_;
6871

69-
//! wrapper of the auxiliary integrator
70-
std::shared_ptr<Structure> sta_wrapper_;
71-
7272
/*! \brief Make one step with auxiliary scheme
7373
*
7474
* Afterwards, the auxiliary solutions are stored in the local error

0 commit comments

Comments
 (0)