LCOV - code coverage report
Current view: top level - include/userobjects - LinearViscoelasticityManager.h (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: f45d79 Lines: 2 3 66.7 %
Date: 2025-07-25 05:00:39 Functions: 2 3 66.7 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //* This file is part of the MOOSE framework
       2             : //* https://mooseframework.inl.gov
       3             : //*
       4             : //* All rights reserved, see COPYRIGHT for full restrictions
       5             : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
       6             : //*
       7             : //* Licensed under LGPL 2.1, please see LICENSE for details
       8             : //* https://www.gnu.org/licenses/lgpl-2.1.html
       9             : 
      10             : #pragma once
      11             : 
      12             : #include "ElementUserObject.h"
      13             : #include "LinearViscoelasticityBase.h"
      14             : #include "RankTwoTensor.h"
      15             : 
      16             : /**
      17             :  * This class manages a LinearViscoelasticityBase object. Its primary purpose
      18             :  * is to initialize the internal MaterialProperties contained in the viscoelastic
      19             :  * model at the beginning of each time step, and update those properties at the
      20             :  * end of each time step.
      21             :  *
      22             :  * Whenever a LinearViscoelasticityBase object is created, it must be associated to
      23             :  * one LinearViscoelasticityManager user object, otherwise the viscoelastic
      24             :  * creep strains and properties will not be computed accordingly.
      25             :  *
      26             :  * See LinearViscoelasticityBase for more information.
      27             :  */
      28             : class LinearViscoelasticityManager : public ElementUserObject
      29             : {
      30             : public:
      31             :   static InputParameters validParams();
      32             : 
      33             :   LinearViscoelasticityManager(const InputParameters & parameters);
      34             : 
      35             :   virtual void initialSetup() override;
      36             : 
      37             : protected:
      38        2736 :   virtual void initialize() override {}
      39             :   virtual void execute() override;
      40           0 :   virtual void threadJoin(const UserObject & /*uo*/) override {}
      41        2736 :   virtual void finalize() override {}
      42             : 
      43             :   std::string _stress_name;
      44             :   /*
      45             :    * The effective stress used for the update of the viscoelastic strain
      46             :    * (typically, the real stress).
      47             :    */
      48             :   const MaterialProperty<RankTwoTensor> & _stress;
      49             : 
      50             :   std::string _creep_strain_name;
      51             :   /// Name of the creep strain variable used for the update of the viscoelastic strain
      52             :   const MaterialProperty<RankTwoTensor> & _creep_strain;
      53             : 
      54             :   std::string _elastic_strain_name;
      55             :   /// Name of the elastic strain variable used for the update of the viscoelastic strain
      56             :   const MaterialProperty<RankTwoTensor> & _elastic_strain;
      57             : 
      58             :   /// Name of the viscoelastic model to update
      59             :   std::string _viscoelastic_model_name;
      60             :   /// Pointer to the viscoelastic model to update
      61             :   LinearViscoelasticityBase * _viscoelastic_model;
      62             : };

Generated by: LCOV version 1.14