Skip to content
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] Extract pre-calculated lists for strain vectors and (determinants of) deformation gradients #12363

Merged
merged 27 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7061c42
Changed signature of `SmallStrainUPwDiffOrderElement::CalculateCauchy…
rfaasse May 7, 2024
5dc686a
Changed signature of `UPwSmallStrainElement::CalculateStrain` to retu…
rfaasse May 7, 2024
ce511b3
Changed signature of `CalculateStrain` (diff order and non-diff order…
rfaasse May 7, 2024
63bd1a6
Changed signature of `CalculateStrain` (diff order) to input the defo…
rfaasse May 7, 2024
5f451f1
Actually use deformation gradient that was passed on via arguments
rfaasse May 7, 2024
5827e2c
Changed signature of `CalculateStrain` (non-diff order) to input the …
rfaasse May 7, 2024
58b5bd6
Merge remote-tracking branch 'origin/master' into geo/12319-extract-s…
rfaasse May 8, 2024
05fd57f
Changed signature of `CalculateStrain` (diff order) to input the b ma…
rfaasse May 8, 2024
7f65441
Changed signature of `CalculateStrain` (non-diff order) to input the …
rfaasse May 8, 2024
dcc3bac
Removed some redundant calculations of the determinant of F
rfaasse May 8, 2024
a34346b
Merge remote-tracking branch 'origin/master' into geo/12319-extract-s…
rfaasse May 8, 2024
258c65c
Created `CalculateDeformationGradients` for diff order element, and u…
rfaasse May 8, 2024
770d373
Created `CalculateDeterminantsOfDeformationGradients` for diff order …
rfaasse May 8, 2024
76f70a5
Created `CalculateStrains` for diff order element, and used it to cal…
rfaasse May 8, 2024
3daae8e
Rewrote CalculateStrains using std::transform
rfaasse May 8, 2024
a0c560d
Removed blank line
rfaasse May 8, 2024
828e621
Merge remote-tracking branch 'origin/master' into geo/12319-extract-s…
rfaasse May 10, 2024
802fd1a
Removed static member accessed through instance
rfaasse May 10, 2024
e798262
Merge remote-tracking branch 'origin/master' into geo/12319-extract-s…
rfaasse May 13, 2024
c5bf6b4
Added calculation functions for lists of deformation gradients, deter…
rfaasse May 13, 2024
8906177
Calculated lists for the upw small strain element
rfaasse May 13, 2024
19eb9dc
Merge remote-tracking branch 'origin/master' into geo/12319-extract-s…
rfaasse May 13, 2024
b89bfbf
Renamed FourthOrderTensorType
rfaasse May 13, 2024
0aa589f
Split math_utilities into header and source and created new function …
rfaasse May 13, 2024
862f500
Use the new math utility function in both diff-order and non-diff-ord…
rfaasse May 13, 2024
1482111
Added unit tests for math utility function
rfaasse May 13, 2024
18a93b4
Merge remote-tracking branch 'origin/master' into geo/12319-extract-s…
rfaasse May 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
// Vahid Galavi
//


// Project includes
#include "custom_conditions/surface_normal_load_3D_diff_order_condition.hpp"
#include "custom_utilities/math_utilities.hpp"
#include "custom_utilities/math_utilities.h"

namespace Kratos
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

// Application includes
#include "custom_elements/U_Pw_small_strain_FIC_element.hpp"
#include "custom_utilities/math_utilities.h"

namespace Kratos
{
Expand Down Expand Up @@ -137,17 +138,21 @@ void UPwSmallStrainFICElement<TDim, TNumNodes>::InitializeNonLinearIteration(con
Vector StressVector(VoigtSize);

const auto b_matrices = this->CalculateBMatrices(Variables.DN_DXContainer, Variables.NContainer);
const auto deformation_gradients = this->CalculateDeformationGradients();
const auto determinants_of_deformation_gradients =
GeoMechanicsMathUtilities::CalculateDeterminants(deformation_gradients);
const auto strain_vectors = this->CalculateStrains(
deformation_gradients, b_matrices, Variables.DisplacementVector, Variables.UseHenckyStrain);

// Loop over integration points
for (unsigned int GPoint = 0; GPoint < NumGPoints; ++GPoint) {
this->CalculateKinematics(Variables, GPoint);
Variables.B = b_matrices[GPoint];

// Compute infinitessimal strain
Variables.F = this->CalculateDeformationGradient(GPoint);
Variables.detF = MathUtils<>::Det(Variables.F);
Variables.StrainVector = this->CalculateStrain(
Variables.F, Variables.B, Variables.DisplacementVector, Variables.UseHenckyStrain);
Variables.F = deformation_gradients[GPoint];
Variables.detF = determinants_of_deformation_gradients[GPoint];
Variables.StrainVector = strain_vectors[GPoint];

// set gauss points variables to constitutivelaw parameters
this->SetConstitutiveParameters(Variables, ConstitutiveParameters);
Expand Down Expand Up @@ -194,17 +199,21 @@ void UPwSmallStrainFICElement<TDim, TNumNodes>::FinalizeNonLinearIteration(const
Vector StressVector(VoigtSize);

const auto b_matrices = this->CalculateBMatrices(Variables.DN_DXContainer, Variables.NContainer);
const auto deformation_gradients = this->CalculateDeformationGradients();
const auto determinants_of_deformation_gradients =
GeoMechanicsMathUtilities::CalculateDeterminants(deformation_gradients);
const auto strain_vectors = this->CalculateStrains(
deformation_gradients, b_matrices, Variables.DisplacementVector, Variables.UseHenckyStrain);

// Loop over integration points
for (unsigned int GPoint = 0; GPoint < NumGPoints; ++GPoint) {
this->CalculateKinematics(Variables, GPoint);
Variables.B = b_matrices[GPoint];

// Compute infinitessimal strain
Variables.F = this->CalculateDeformationGradient(GPoint);
Variables.detF = MathUtils<>::Det(Variables.F);
Variables.StrainVector = this->CalculateStrain(
Variables.F, Variables.B, Variables.DisplacementVector, Variables.UseHenckyStrain);
Variables.F = deformation_gradients[GPoint];
Variables.detF = determinants_of_deformation_gradients[GPoint];
Variables.StrainVector = strain_vectors[GPoint];

// set gauss points variables to constitutivelaw parameters
this->SetConstitutiveParameters(Variables, ConstitutiveParameters);
Expand Down Expand Up @@ -451,9 +460,13 @@ void UPwSmallStrainFICElement<TDim, TNumNodes>::CalculateAll(MatrixType& rLeftHa
const bool hasBiotCoefficient = Prop.Has(BIOT_COEFFICIENT);

const auto b_matrices = this->CalculateBMatrices(Variables.DN_DXContainer, Variables.NContainer);

const auto integration_coefficients =
this->CalculateIntegrationCoefficients(IntegrationPoints, Variables.detJContainer);
const auto deformation_gradients = this->CalculateDeformationGradients();
const auto determinants_of_deformation_gradients =
GeoMechanicsMathUtilities::CalculateDeterminants(deformation_gradients);
const auto strain_vectors = this->CalculateStrains(
deformation_gradients, b_matrices, Variables.DisplacementVector, Variables.UseHenckyStrain);

// Loop over integration points
for (unsigned int GPoint = 0; GPoint < NumGPoints; ++GPoint) {
Expand All @@ -462,10 +475,9 @@ void UPwSmallStrainFICElement<TDim, TNumNodes>::CalculateAll(MatrixType& rLeftHa
Variables.B = b_matrices[GPoint];

// Compute infinitessimal strain
Variables.F = this->CalculateDeformationGradient(GPoint);
Variables.detF = MathUtils<>::Det(Variables.F);
Variables.StrainVector = this->CalculateStrain(
Variables.F, Variables.B, Variables.DisplacementVector, Variables.UseHenckyStrain);
Variables.F = deformation_gradients[GPoint];
Variables.detF = determinants_of_deformation_gradients[GPoint];
Variables.StrainVector = strain_vectors[GPoint];

// set gauss points variables to constitutivelaw parameters
this->SetConstitutiveParameters(Variables, ConstitutiveParameters);
Expand Down
Loading
Loading