Skip to content

Commit

Permalink
clean up and separate from adhesion
Browse files Browse the repository at this point in the history
  • Loading branch information
Nima Sina committed Dec 16, 2024
1 parent 04ae656 commit edee0f6
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 142 deletions.
1 change: 1 addition & 0 deletions src/IO/ParmParse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ namespace IO
{
bool ParmParse::checked_for_input_files = false;
}

2 changes: 2 additions & 0 deletions src/Integrator/Flame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -699,3 +699,5 @@ void Flame::Integrate(int amrlev, Set::Scalar /*time*/, int /*step*/,
// time dependent pressure data from experimenta -> p = 0.0954521220950523 * exp(15.289993148880678 * t)
}
} // namespace Integrator


4 changes: 2 additions & 2 deletions src/Integrator/Fracture.H
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ protected:
// if(iter%elastic.interval != 0) return;

Util::Message(INFO);
Util::Warning(INFO,"DegradeModulus is no longer implemented");
Util::Abort(INFO,"DegradeModulus is no longer implemented");
// for (int p = 0; p < number_of_materials; p++)
// material.brittlemodeltype[p].DegradeModulus(0.0);

Expand Down Expand Up @@ -283,7 +283,7 @@ protected:
// _temp = std::max(crack.scaleModulusMax, _temp);
// _temp = std::max(crack.scaleModulusMax, crack.scaleModulusMax + _temp * (1. - crack.scaleModulusMax));

Util::Warning(INFO,"DegradeModulus is no longer available");
Util::Abort(INFO,"DegradeModulus is no longer available");
//model(i,j,k).DegradeModulus(1-_temp);
});
}
Expand Down
1 change: 1 addition & 0 deletions src/Model/Solid/Affine/Cubic.H
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,4 @@ void Set::Field<Model::Solid::Affine::Cubic>::Copy(int a_lev, amrex::MultiFab &a
}

#endif

124 changes: 4 additions & 120 deletions src/Set/Matrix4_MajorMinor.H
Original file line number Diff line number Diff line change
Expand Up @@ -52,51 +52,6 @@ public:
void Print (std::ostream& os)
{
os.precision(4);
// os << std::scientific << std::setw(11) << (*this)(0,0,0,0) << "\t";
// os << std::scientific << std::setw(11) << (*this)(0,0,1,1) << "\t";
// os << std::scientific << std::setw(11) << (*this)(0,0,2,2) << "\t";
// os << std::scientific << std::setw(11) << (*this)(0,0,1,2) << "\t";
// os << std::scientific << std::setw(11) << (*this)(0,0,2,0) << "\t";
// os << std::scientific << std::setw(11) << (*this)(0,0,0,1) << "\n";

// os << std::scientific << std::setw(11) << (*this)(1,1,0,0) << "\t";
// os << std::scientific << std::setw(11) << (*this)(1,1,1,1) << "\t";
// os << std::scientific << std::setw(11) << (*this)(1,1,2,2) << "\t";
// os << std::scientific << std::setw(11) << (*this)(1,1,1,2) << "\t";
// os << std::scientific << std::setw(11) << (*this)(1,1,2,0) << "\t";
// os << std::scientific << std::setw(11) << (*this)(1,1,0,1) << "\n";

// os << std::scientific << std::setw(11) << (*this)(2,2,0,0) << "\t";
// os << std::scientific << std::setw(11) << (*this)(2,2,1,1) << "\t";
// os << std::scientific << std::setw(11) << (*this)(2,2,2,2) << "\t";
// os << std::scientific << std::setw(11) << (*this)(2,2,1,2) << "\t";
// os << std::scientific << std::setw(11) << (*this)(2,2,2,0) << "\t";
// os << std::scientific << std::setw(11) << (*this)(2,2,0,1) << "\n";

// os << std::scientific << std::setw(11) << (*this)(1,2,0,0) << "\t";
// os << std::scientific << std::setw(11) << (*this)(1,2,1,1) << "\t";
// os << std::scientific << std::setw(11) << (*this)(1,2,2,2) << "\t";
// os << std::scientific << std::setw(11) << (*this)(1,2,1,2) << "\t";
// os << std::scientific << std::setw(11) << (*this)(1,2,2,0) << "\t";
// os << std::scientific << std::setw(11) << (*this)(1,2,0,1) << "\n";


// os << std::scientific << std::setw(11) << (*this)(2,0,0,0) << "\t";
// os << std::scientific << std::setw(11) << (*this)(2,0,1,1) << "\t";
// os << std::scientific << std::setw(11) << (*this)(2,0,2,2) << "\t";
// os << std::scientific << std::setw(11) << (*this)(2,0,1,2) << "\t";
// os << std::scientific << std::setw(11) << (*this)(2,0,2,0) << "\t";
// os << std::scientific << std::setw(11) << (*this)(2,0,0,1) << "\n";

// os << std::scientific << std::setw(11) << (*this)(0,1,0,0) << "\t";
// os << std::scientific << std::setw(11) << (*this)(0,1,1,1) << "\t";
// os << std::scientific << std::setw(11) << (*this)(0,1,2,2) << "\t";
// os << std::scientific << std::setw(11) << (*this)(0,1,1,2) << "\t";
// os << std::scientific << std::setw(11) << (*this)(0,1,2,0) << "\t";
// os << std::scientific << std::setw(11) << (*this)(0,1,0,1) << "\n";



for (int k = 0; k < 2; k++)
{
for (int i = -1; i < 3; i++)
Expand All @@ -120,33 +75,6 @@ public:
os<<std::endl;
}
}


// os.precision(4);
// for (int k = 0; k < 2; k++)
// {
// for (int i = -1; i < 3; i++)
// {
// for (int l = 0; l < 2; l++)
// {
// if (i==-1) os << "┌ ┐ ";
// else if (i == 2) os << "└ ┘ ";
// else
// {
// os << "│ ";
// for (int j = 0; j < 2; j++)
// {
// const Set::Scalar &val = (*this)(i,j,k,l);
// os << std::scientific << std::setw(11) << val ; //(fabs(val)>1E-10 ? val : 0);
// os << " ";
// }
// os << "│ ";
// }
// }
// os<<std::endl;
// }
// }

}

Set::Scalar Norm()
Expand Down Expand Up @@ -205,7 +133,6 @@ public:
else if (i==j && k==l) Ctmp[i][j][k][l] = C12;
else Ctmp[i][j][k][l] = 0.0;
}

for(int p = 0; p < 2; p++)
for(int q = 0; q < 2; q++)
for(int s = 0; s < 2; s++)
Expand Down Expand Up @@ -510,51 +437,6 @@ public:
}
void Print (std::ostream& os)
{
// os << std::scientific << std::setw(11) << (*this)(0,0,0,0) << "\t";
// os << std::scientific << std::setw(11) << (*this)(0,0,1,1) << "\t";
// os << std::scientific << std::setw(11) << (*this)(0,0,2,2) << "\t";
// os << std::scientific << std::setw(11) << (*this)(0,0,1,2) << "\t";
// os << std::scientific << std::setw(11) << (*this)(0,0,2,0) << "\t";
// os << std::scientific << std::setw(11) << (*this)(0,0,0,1) << "\n";

// os << std::scientific << std::setw(11) << (*this)(1,1,0,0) << "\t";
// os << std::scientific << std::setw(11) << (*this)(1,1,1,1) << "\t";
// os << std::scientific << std::setw(11) << (*this)(1,1,2,2) << "\t";
// os << std::scientific << std::setw(11) << (*this)(1,1,1,2) << "\t";
// os << std::scientific << std::setw(11) << (*this)(1,1,2,0) << "\t";
// os << std::scientific << std::setw(11) << (*this)(1,1,0,1) << "\n";

// os << std::scientific << std::setw(11) << (*this)(2,2,0,0) << "\t";
// os << std::scientific << std::setw(11) << (*this)(2,2,1,1) << "\t";
// os << std::scientific << std::setw(11) << (*this)(2,2,2,2) << "\t";
// os << std::scientific << std::setw(11) << (*this)(2,2,1,2) << "\t";
// os << std::scientific << std::setw(11) << (*this)(2,2,2,0) << "\t";
// os << std::scientific << std::setw(11) << (*this)(2,2,0,1) << "\n";

// os << std::scientific << std::setw(11) << (*this)(1,2,0,0) << "\t";
// os << std::scientific << std::setw(11) << (*this)(1,2,1,1) << "\t";
// os << std::scientific << std::setw(11) << (*this)(1,2,2,2) << "\t";
// os << std::scientific << std::setw(11) << (*this)(1,2,1,2) << "\t";
// os << std::scientific << std::setw(11) << (*this)(1,2,2,0) << "\t";
// os << std::scientific << std::setw(11) << (*this)(1,2,0,1) << "\n";


// os << std::scientific << std::setw(11) << (*this)(2,0,0,0) << "\t";
// os << std::scientific << std::setw(11) << (*this)(2,0,1,1) << "\t";
// os << std::scientific << std::setw(11) << (*this)(2,0,2,2) << "\t";
// os << std::scientific << std::setw(11) << (*this)(2,0,1,2) << "\t";
// os << std::scientific << std::setw(11) << (*this)(2,0,2,0) << "\t";
// os << std::scientific << std::setw(11) << (*this)(2,0,0,1) << "\n";

// os << std::scientific << std::setw(11) << (*this)(0,1,0,0) << "\t";
// os << std::scientific << std::setw(11) << (*this)(0,1,1,1) << "\t";
// os << std::scientific << std::setw(11) << (*this)(0,1,2,2) << "\t";
// os << std::scientific << std::setw(11) << (*this)(0,1,1,2) << "\t";
// os << std::scientific << std::setw(11) << (*this)(0,1,2,0) << "\t";
// os << std::scientific << std::setw(11) << (*this)(0,1,0,1) << "\n";
return;


for (int i = 0; i < 21; i++)
os << "i = " << i << " " << data[i] << std::endl;

Expand Down Expand Up @@ -642,7 +524,8 @@ public:
for (int i = 0 ; i < 21; i++) ret.data[i] = 0.0;
return ret;
}
static Matrix4<3,Sym::MajorMinor> Cubic(Set::Scalar C11, Set::Scalar C12, Set::Scalar C44, Eigen::Matrix3d R = Eigen::Matrix3d::Identity())
static Matrix4<3,Sym::MajorMinor> Cubic(Set::Scalar C11, Set::Scalar C12, Set::Scalar C44,
Eigen::Matrix3d R = Eigen::Matrix3d::Identity())
{
Set::Matrix4<3,Sym::MajorMinor> ret;
Set::Scalar Ctmp[3][3][3][3];
Expand Down Expand Up @@ -671,7 +554,8 @@ public:
}
return ret;
}
static Matrix4<3,Sym::MajorMinor> Cubic(Set::Scalar C11, Set::Scalar C12, Set::Scalar C44, Set::Scalar phi1, Set::Scalar Phi, Set::Scalar phi2)
static Matrix4<3,Sym::MajorMinor> Cubic(Set::Scalar C11, Set::Scalar C12, Set::Scalar C44,
Set::Scalar phi1, Set::Scalar Phi, Set::Scalar phi2)
{
Eigen::Matrix3d R;
R = Eigen::AngleAxisd(phi2, Eigen::Vector3d::UnitX()) *
Expand Down
1 change: 0 additions & 1 deletion src/mechanics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "Model/Solid/Affine/J2.H"
#include "Model/Solid/Affine/Hexagonal.H"


#include "Integrator/Mechanics.H"
#include "Model/Solid/Finite/CrystalPlastic.H"

Expand Down
2 changes: 0 additions & 2 deletions src/test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "Model/Solid/Linear/Hexagonal.H"
#include "Model/Solid/Affine/Hexagonal.H"
#include "Model/Solid/Linear/TransverselyIsotropic.H"
#include "Model/Solid/Finite/Adhesion.H"

int main (int argc, char* argv[])
{
Expand Down Expand Up @@ -55,7 +54,6 @@ int main (int argc, char* argv[])
MODELTEST(Model::Solid::Finite::NeoHookeanPredeformed);
MODELTEST(Model::Solid::Finite::PseudoAffine::Cubic);
MODELTEST(Model::Solid::Linear::TransverselyIsotropic);
MODELTEST(Model::Solid::Finite::Adhesion);

Util::Test::Message("Set::Matrix4");
{
Expand Down
17 changes: 0 additions & 17 deletions tests/Solid/input
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,6 @@
#@ args = model1.C44=0.757
#@ ignore = model1.E model1.nu
#@








# Here:
# TODO: add test block for the transverse model.
# TODO: add validation data (reference/transverse.dat, e.g.)

#@ [linear-transverse]
#@ exe=mechanics
#@ dim = 3
Expand All @@ -130,11 +118,6 @@
#@ coverage=true
#@






alamo.program = mechanics


Expand Down

0 comments on commit edee0f6

Please sign in to comment.