-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GeoMechanicsApplication] Adopt structural truss element with reset displacement #12531
[GeoMechanicsApplication] Adopt structural truss element with reset displacement #12531
Conversation
We now set the initial state directly at the integration points. In this way, we have overcome the limitation of `SetInitialStateProcess`, which can only set a uniform initial state at an element.
Also used forward declarations where possible.
The test is not intended to account for geometrically nonlinear behavior.
- Use Python f-strings to build filenames in an easier way. - Avoid using an index when constructing lists. - Use `zip` to iterate two sequences simultaneously, rather than using `enumerate` and an index.
…lacement option has changed
…uctural-truss-element-with-reset-displacement
…e it only works when the IS_RESTARTED flag is true
…uctural-truss-element-with-reset-displacement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After re-reviewing, I only have a few minor suggestions left. The work you have done here looks really nice and helps us in achieving the goal of reusing elements of the StructuralMechanicsApplication rather than having slightly modified copies of them in the GeoMechanicsApplication.
applications/GeoMechanicsApplication/custom_processes/README.md
Outdated
Show resolved
Hide resolved
|
||
std::vector<ConstitutiveLaw::Pointer> constitutive_laws; | ||
rElement.CalculateOnIntegrationPoints(CONSTITUTIVE_LAW, constitutive_laws, mrModelPart.GetProcessInfo()); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we check here whether stresses_on_integration_points
and constitutive_laws
have the same size and that they aren't empty? E.g.:
KRATOS_ERROR_IF(stresses_on_integration_points.size() != constitutive_laws.size()) << "Number of retrieved stress vectors does not match the number of integration points" << std::endl;
KRATOS_ERROR_IF(stresses_on_integration_points.empty()) << "No stress vectors could be retrieved" << std::endl;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, added some checks
#include "custom_processes/reset_displacement_process.h" | ||
#include "geo_mechanics_fast_suite.h" | ||
#include <boost/numeric/ublas/assignment.hpp> | ||
#include <includes/deprecated_variables.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why we need to include this header? Are we sure we need to have access to deprecated variables?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No clue how it got there, might be due to the alt+enter option giving the wrong include and I missed it. Removed it now
std::vector<ConstitutiveLaw::Pointer> mConstitutiveLaws = {}; | ||
}; | ||
|
||
ModelPart& CreateModelPartWithAStubElement(Model& model) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to follow the Kratos Style Guide:
ModelPart& CreateModelPartWithAStubElement(Model& model) | |
ModelPart& CreateModelPartWithAStubElement(Model& rModel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
using Element::CalculateOnIntegrationPoints; | ||
|
||
std::vector<Vector> mIntegrationVectorValues = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps mIntegrationPointVectors
is a more accurate name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed
dynamic_cast<StubElement&>(model_part.Elements()[1]).mIntegrationVectorValues = { | ||
initial_stress_vector, initial_stress_vector, initial_stress_vector}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, you may write this assignment as follows:
dynamic_cast<StubElement&>(model_part.Elements()[1]).mIntegrationVectorValues = { | |
initial_stress_vector, initial_stress_vector, initial_stress_vector}; | |
dynamic_cast<StubElement&>(model_part.Elements()[1]).mIntegrationVectorValues = | |
std::vector<Vector>(3, initial_stress_vector); |
I'll leave it up to you which one you prefer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that looks nicer, thanks!
applications/GeoMechanicsApplication/tests/geo_truss_with_reset_displacement/README.md
Outdated
Show resolved
Hide resolved
@@ -141,6 +141,7 @@ void TrussConstitutiveLaw::CalculateMaterialResponsePK2(Parameters& rValues) | |||
Vector& stress_vector = rValues.GetStressVector(); | |||
if (stress_vector.size() != 1) stress_vector.resize(1, false); | |||
stress_vector[0] = this->CalculateStressElastic(rValues); | |||
AddInitialStressVectorContribution(stress_vector); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change can be ignored as it will be redundant when the PR for structural is merged
else if (rVariable == PK2_STRESS_VECTOR) { | ||
ConstitutiveLaw::Parameters Values(GetGeometry(),GetProperties(),rCurrentProcessInfo); | ||
Vector temp_strain = ZeroVector(1); | ||
Vector temp_stress = ZeroVector(1); | ||
temp_strain[0] = CalculateLinearStrain(); | ||
Values.SetStrainVector(temp_strain); | ||
Values.SetStressVector(temp_stress); | ||
mpConstitutiveLaw->CalculateMaterialResponse(Values,ConstitutiveLaw::StressMeasure_PK2); | ||
|
||
Vector test = ZeroVector(1); | ||
test[0]= temp_stress[0]; | ||
rOutput[0] = test; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change can be ignored as it will be redundant when the PR for structural is merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Richard, thank you for the nice work. I have very minor non-blocking comments.
ResetDisplacementProcess(const ResetDisplacementProcess&) = delete; | ||
ResetDisplacementProcess& operator=(const ResetDisplacementProcess&) = delete; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ops, is it our clang-format works like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm this is indeed strange, good catch! It seems my CLion has some issues with the formatting. I noticed it yesterday as well, which is why I ran clang-format outside of CLion to create the clang-format PR.
I now changed the CLion settings such that it uses the clang-format executable in the LLVM folder and that seems to work correctly. Might be something to look into. For now, I'll try to reformat all the files for this PR and see if there are any other changes
initial_stress_vector <<= 1.0, 2.0, 3.0, 4.0; | ||
|
||
dynamic_cast<StubElement&>(model_part.Elements()[1]).mIntegrationPointVectors = | ||
std::vector<Vector>(3, initial_stress_vector); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to introduce constexpr for 3? As far as I understand this is a number of nodes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed that's more clear. Here, it's the number of integration points in the element, but in this case that's identical to the number of nodes indeed
…uctural-truss-element-with-reset-displacement
for (auto i = std::size_t{0}; i < constitutive_laws.size(); ++i) { | ||
auto p_initial_state = make_intrusive<InitialState>(); | ||
p_initial_state->SetInitialStressVector(stresses_on_integration_points[i]); | ||
p_initial_state->SetInitialStrainVector(Vector{ZeroVector{stresses_on_integration_points[i].size()}}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the line that fixed the test, I'd like to discuss if this is correct and also whether we accept that if we don't add this strain, there is a hard crash (however, avoiding this probably means we need changes in structural, or even core.
{ | ||
block_for_each(mrModelPart.Elements(), [this](Element& rElement) { | ||
std::vector<Vector> stresses_on_integration_points; | ||
rElement.CalculateOnIntegrationPoints(PK2_STRESS_VECTOR, stresses_on_integration_points, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, for now the PK2_STRESS_VECTOR is the right choice for structural elements (please correct me if I'm wrong @WPK4FEM)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for enabling use of the structural truss with reset displacement in GeoMechanical analysis. Some minor remarks about documentation and test naming.
For this process to work, the following requirements have to be met: | ||
1. The elements in the model part that the process is applied to should have an implementation for `CalculateOnIntegrationPoints` that calculates the PK2_STRESS_VECTOR as well as an overload of `CalculateOnIntegrationPoints` that returns a list of ConstitutiveLaw::Pointer objects for each integration point. | ||
2. The input type of the model can only be "rest", to ensure that the state of the model is retained from the previous stage. | ||
3. The ConstitutiveLaw used in the elements this process is applied to should use the `InitialState` to apply the initial stresses to the calculated stresses. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the initial strains ( or strain like variables ) independent of this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to define something for the initial strains, since if they aren't defined, we get a hard crash (the issue we saw after bringing this branch up to date with master). At this moment, I hardcode the initial strains to be zero vectors. We could discuss if this is always the desired behavior.
{ | ||
block_for_each(mrModelPart.Elements(), [this](Element& rElement) { | ||
std::vector<Vector> stresses_on_integration_points; | ||
rElement.CalculateOnIntegrationPoints(PK2_STRESS_VECTOR, stresses_on_integration_points, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
### Requirements | ||
For this process to work, the following requirements have to be met: | ||
1. The elements in the model part that the process is applied to should have an implementation for `CalculateOnIntegrationPoints` that calculates the PK2_STRESS_VECTOR as well as an overload of `CalculateOnIntegrationPoints` that returns a list of ConstitutiveLaw::Pointer objects for each integration point. | ||
2. The input type of the model can only be "rest", to ensure that the state of the model is retained from the previous stage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe make clear that "rest" is short for restarted. Its further meaning is already clear from the further contents of the sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some elaboration
KRATOS_EXPECT_EXCEPTION_IS_THROWN(process.ExecuteInitialize(), | ||
"Number of retrieved stress vectors does not match the " | ||
"number of constitutive laws for element 1") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When finding out what is wrong from error messages I'm often happy if information about the numbers is given, such that I have an indication which of the 2 is the wrong one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion, added!
@@ -13,7 +13,7 @@ | |||
"domain_size": 2, | |||
"model_import_settings": { | |||
"input_type": "mdpa", | |||
"input_filename": "geo_truss_with_reset_displacement_stage_1" | |||
"input_filename": "geo_truss_with_reset_displacement" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This name and the directory name of the test are now misleading. We are using the truss element from structural. That was the intention of the whole exercise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, changed
@@ -205,6 +207,15 @@ def PrepareModelPart(self): | |||
self.settings["nodal_smoothing"].GetBool()) | |||
|
|||
self.main_model_part.ProcessInfo.SetValue(KratosMultiphysics.STEP, 0) | |||
self.computing_model_part_name = "porous_computational_model_part" | |||
|
|||
# Create list of sub sub model parts (it is a copy of the standard lists with a different name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment had me wondering, but it does not really add information. Removing will prevent that it becomes wrong comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
if not self.main_model_part.ProcessInfo[KratosMultiphysics.IS_RESTARTED]: | ||
## Executes the check and prepare model process (Create computing_model_part and set constitutive law) | ||
self._ExecuteCheckAndPrepare() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the switch that is important ( retain the previous constitutive law for a while ). Please explain that in the readme file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added it to the readme, please let me know if it's clear
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a very nice and clean extension. I have several comments, but none of them is blocking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should rename this file, since it no longer uses "geo" truss elements...?
Similarly, we may want to rename the test directory to, e.g. truss_with_reset_displacement
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
"input_type": "mdpa", | ||
"input_filename": "geo_truss_with_reset_displacement_stage_4" | ||
"input_type": "rest", | ||
"input_filename": "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we can remove the key-value pair "input_filename"
, since "input_type"
has been changed to "rest"
.
This comment also applies to the ProjectParameters.json
files of stages 2 and 3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, still passes, good catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we can move this file into a subdirectory named custom_processes
...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
#include "custom_processes/reset_displacement_process.h" | ||
#include "geo_mechanics_fast_suite.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may consider to add a few more explicit #include
s here, instead of relying on having them available indirectly through other includes. This will make the build less fragile when we start to remove unnecessary #include
s from other header files. I would suggest to at least include includes/constitutive_law.h
and includes/element.h
, since you define here two classes (StubConstitutiveLaw
and StubElement
) that derive from classes that are defined in those header files. But you may want to look further to see whether we need to add even more #include
s.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, it became quite a list when being specific :)
void CalculateOnIntegrationPoints(const Variable<ConstitutiveLaw::Pointer>& rVariable, | ||
std::vector<ConstitutiveLaw::Pointer>& rOutput, | ||
const ProcessInfo& rCurrentProcessInfo) override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to "unname" rVariable
and rCurrentProcessInfo
, since you are not using these parameters. By having them unnamed, that is clear without checking the function body.
This suggestion also applies to the next override of CalculateOnIntegrationPoints
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
KRATOS_TEST_CASE_IN_SUITE(ResetDisplacementProcess_SetsInitialStressOfConstitutiveLaws, | ||
KratosGeoMechanicsFastSuiteWithoutKernel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test code doesn't reveal how the ResetDisplacementProcess
uses an Element
instance to set the initial stress. The implementation of StubElement
suggests that any variable will work, but that is for sure not the case (the implementation shows that variable PK2_STRESS_VECTOR
is used for that). So I'm wondering whether we should make StubElement
more explicit about this (i.e. force it to only accept PK2_STRESS_VECTOR
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was a bit in two minds here: on the one hand, I don't want to couple the tests to implementation details (e.g. I don't want to change the test when we would decide to use cauchy stress,. However, from a 'test as documentation' point of view, it might help to see here that it is required that the element can return the PK2_STRESS_VECTOR.
Since we now use SetValuesOnIntegrationPoints and have to input a stress measure there anyway, I think it's best to just be explicit, but I think it's still something to keep in mind, to not have the tests depend on implementation details
dynamic_cast<StubElement&>(model_part.Elements()[1]).mIntegrationPointVectors = | ||
std::vector<Vector>(number_of_integration_points, initial_stress_vector); | ||
|
||
ResetDisplacementProcess reset_displacement_process(model_part, {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we give the second parameter a name (e.g. dummy_parameters
), to make clear what it represents?
This suggestion applies to some other tests as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added names to the dummy's
initial_stress_vector <<= 1.0, 2.0, 3.0, 4.0; | ||
|
||
constexpr auto number_of_integration_points = 3; | ||
dynamic_cast<StubElement&>(model_part.Elements()[1]).mIntegrationPointVectors = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really like the dynamic_cast
here, but I don't have a better suggestion yet. I see this approach elsewhere too. Perhaps we can talk about this later, to see whether we can find a better way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed using your suggestion of SetValuesOnIntegrationPoints
|
||
void ResetDisplacementProcess::CheckRetrievedElementData(const std::vector<ConstitutiveLaw::Pointer>& rConstitutiveLaws, | ||
const std::vector<Vector>& rStressesOnIntegrationPoints, | ||
const Element& rElement) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may consider to pass the element ID here, instead of the complete element, since that is the only piece of information that we need.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, done
displacement_stages[idx] = test_helper.get_displacement(stage) | ||
nodal_coordinates_stages[idx] = test_helper. get_nodal_coordinates(stage) | ||
displacement_stages.append(test_helper.get_displacement(stage)) | ||
nodal_coordinates_stages.append(test_helper. get_nodal_coordinates(stage)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant space:
nodal_coordinates_stages.append(test_helper. get_nodal_coordinates(stage)) | |
nodal_coordinates_stages.append(test_helper.get_nodal_coordinates(stage)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the thorough reviews, I processed the comments, let me know if there's anything else!
### Requirements | ||
For this process to work, the following requirements have to be met: | ||
1. The elements in the model part that the process is applied to should have an implementation for `CalculateOnIntegrationPoints` that calculates the PK2_STRESS_VECTOR as well as an overload of `CalculateOnIntegrationPoints` that returns a list of ConstitutiveLaw::Pointer objects for each integration point. | ||
2. The input type of the model can only be "rest", to ensure that the state of the model is retained from the previous stage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some elaboration
For this process to work, the following requirements have to be met: | ||
1. The elements in the model part that the process is applied to should have an implementation for `CalculateOnIntegrationPoints` that calculates the PK2_STRESS_VECTOR as well as an overload of `CalculateOnIntegrationPoints` that returns a list of ConstitutiveLaw::Pointer objects for each integration point. | ||
2. The input type of the model can only be "rest", to ensure that the state of the model is retained from the previous stage. | ||
3. The ConstitutiveLaw used in the elements this process is applied to should use the `InitialState` to apply the initial stresses to the calculated stresses. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to define something for the initial strains, since if they aren't defined, we get a hard crash (the issue we saw after bringing this branch up to date with master). At this moment, I hardcode the initial strains to be zero vectors. We could discuss if this is always the desired behavior.
|
||
void ResetDisplacementProcess::CheckRetrievedElementData(const std::vector<ConstitutiveLaw::Pointer>& rConstitutiveLaws, | ||
const std::vector<Vector>& rStressesOnIntegrationPoints, | ||
const Element& rElement) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
#include "custom_processes/reset_displacement_process.h" | ||
#include "geo_mechanics_fast_suite.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, it became quite a list when being specific :)
@@ -205,6 +207,15 @@ def PrepareModelPart(self): | |||
self.settings["nodal_smoothing"].GetBool()) | |||
|
|||
self.main_model_part.ProcessInfo.SetValue(KratosMultiphysics.STEP, 0) | |||
self.computing_model_part_name = "porous_computational_model_part" | |||
|
|||
# Create list of sub sub model parts (it is a copy of the standard lists with a different name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
if not self.main_model_part.ProcessInfo[KratosMultiphysics.IS_RESTARTED]: | ||
## Executes the check and prepare model process (Create computing_model_part and set constitutive law) | ||
self._ExecuteCheckAndPrepare() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added it to the readme, please let me know if it's clear
"input_type": "mdpa", | ||
"input_filename": "geo_truss_with_reset_displacement_stage_4" | ||
"input_type": "rest", | ||
"input_filename": "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, still passes, good catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
displacement_stages[idx] = test_helper.get_displacement(stage) | ||
nodal_coordinates_stages[idx] = test_helper. get_nodal_coordinates(stage) | ||
displacement_stages.append(test_helper.get_displacement(stage)) | ||
nodal_coordinates_stages.append(test_helper. get_nodal_coordinates(stage)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this one is good to go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks consistent. Good to go for me.
📝 Description
This PR adds a new process to use the reset displacement functionality. It changes the reset_displacement test for the trusses, such that the structural truss element is used, instead of the geo truss element, which has the reset_displacement functionality in it.
🆕 Changelog