Commit 2afdd0c1 authored by thomaskummer's avatar thomaskummer
Browse files

orthotropic active stress material

parent ea228f0b
......@@ -145,7 +145,7 @@ public:
virtual void postProcess (const Real& time);
void postProcess2 (const Real& time);
void importHdf5 ();
//! Import data from previous simulations at a certain time
......@@ -357,61 +357,13 @@ void ExporterHDF5<MeshType>::postProcess (const Real& time)
template<typename MeshType>
void ExporterHDF5<MeshType>::postProcess2 (const Real& time)
void ExporterHDF5<MeshType>::importHdf5 ()
{
if ( M_HDF5.get() == 0 )
{
M_HDF5.reset (new hdf5_Type (this->M_dataVector.begin()->storedArrayPtr()->comm() ) );
M_outputFileName = this->M_prefix + ".h5";
M_HDF5->Open (this->M_postDir + M_outputFileName);
// write empty xdmf file
//writeInitXdmf();
if (!this->M_multimesh)
{
writeGeometry(); // see also writeGeometry
M_HDF5->Flush();
}
return;
}
// typedef std::list< exporterData_Type >::const_iterator Iterator;
this->computePostfix();
std::size_t found ( this->M_postfix.find ( "*" ) );
if ( found == std::string::npos )
{
if (!this->M_procId)
{
std::cout << " X- HDF5 post-processing ... " << std::flush;
}
LifeChrono chrono;
chrono.start();
for (typename super::dataVectorIterator_Type i = this->M_dataVector.begin(); i != this->M_dataVector.end(); ++i)
{
writeVariable (*i);
}
// pushing time
this->M_timeSteps.push_back (time);
writeXdmf (time);
if (this->M_multimesh)
{
writeGeometry(); // see also writeGeometry
}
chrono.stop();
// Write to file without closing the file
M_HDF5->Flush();
if (!this->M_procId)
{
std::cout << "done in " << chrono.diff() << " s." << std::endl;
}
}
}
......
......@@ -534,6 +534,7 @@ int main (int argc, char** argv)
// Set time exporter time index
solver.setTimeIndex(restartInputStr + 1);
solver.importHdf5();
// Load restart solutions from output files
std::string polynomialDegree = dataFile ( "solid/space_discretization/order", "P1");
......
......@@ -200,6 +200,8 @@ public:
}
}
void importHdf5 ();
void setupExporters (std::string problemFolder = "./",
std::string electroFileName = "ElectroSolution",
std::string activationFileName = "ActivationSolution",
......@@ -649,6 +651,22 @@ EMSolver<Mesh, ElectroSolver>::setupMechanicalBC (std::string data_file_name,
// M_bcInterfacePtr->handler()->bcUpdate ( *dFESpace->mesh(), dFESpace->feBd(), dFESpace->dof() );
}
/////////////////////
//restart hdf5
template<typename Mesh , typename ElectroSolver>
void
EMSolver<Mesh, ElectroSolver>::importHdf5 ()
{
M_electroExporterPtr -> importHdf5 ();
M_activationExporterPtr -> importHdf5 ();
M_activationTimeExporterPtr -> importHdf5 ();
M_vonMisesStressExporterPtr -> importHdf5 ();
M_vonMisesStressExporterPtrP -> importHdf5 ();
M_vonMisesStressExporterPtrA -> importHdf5 ();
M_mechanicsExporterPtr -> importHdf5 ();
}
/////////////////////
//Setup exporters
......
......@@ -28,8 +28,10 @@ namespace LifeV
template<typename Mesh>
ActiveHolzapfelOgden<Mesh>::ActiveHolzapfelOgden() :
super ("Active Strain Holzapfel Ogden", 8)
super ("Active Strain Holzapfel Ogden", 10)
{
this -> M_materialFunctionList[8].reset ( new MaterialFunctions::Volumetric<Mesh> (3500000.0) );
this -> M_materialFunctionList[9].reset ( new MaterialFunctions::dVolumetric<Mesh> (3500000.0) );
this -> M_materialFunctionList[0].reset ( new MaterialFunctions::ActiveStrainIsotropicExponential<Mesh> (3330.0, 9.242) );
this -> M_materialFunctionList[1].reset ( new MaterialFunctions::dActiveStrainIsotropicExponential<Mesh> (3330.0, 9.242) );
this -> M_materialFunctionList[2].reset ( new MaterialFunctions::ActiveStrainAnisotropicExponential<Mesh> (185350, 15.972) );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment