LCOV - code coverage report
Current view: top level - src/materials - MandelConverter.C (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: f45d79 Lines: 0 17 0.0 %
Date: 2025-07-25 05:00:39 Functions: 0 16 0.0 %
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             : #include "MandelConverter.h"
      11             : 
      12             : registerMooseObject("SolidMechanicsApp", RankTwoTensorToSymmetricRankTwoTensor);
      13             : registerMooseObject("SolidMechanicsApp", SymmetricRankTwoTensorToRankTwoTensor);
      14             : registerMooseObject("SolidMechanicsApp", RankFourTensorToSymmetricRankFourTensor);
      15             : registerMooseObject("SolidMechanicsApp", SymmetricRankFourTensorToRankFourTensor);
      16             : 
      17             : template <typename T, bool symmetrize>
      18             : InputParameters
      19           0 : MandelConverter<T, symmetrize>::validParams()
      20             : {
      21           0 :   InputParameters params = Material::validParams();
      22           0 :   params.addClassDescription("Converts material property of type " +
      23             :                              demangle(typeid(FromType).name()) + " to type " +
      24             :                              demangle(typeid(ToType).name()));
      25           0 :   params.addRequiredParam<MaterialPropertyName>("from", "Material property to convert from");
      26           0 :   params.addRequiredParam<MaterialPropertyName>("to", "Material property to convert to");
      27           0 :   return params;
      28           0 : }
      29             : 
      30             : template <typename T, bool symmetrize>
      31           0 : MandelConverter<T, symmetrize>::MandelConverter(const InputParameters & params)
      32             :   : Material(params),
      33           0 :     _from(getMaterialProperty<FromType>("from")),
      34           0 :     _to(declareProperty<ToType>("to"))
      35             : {
      36           0 : }
      37             : 
      38             : template <typename T, bool symmetrize>
      39             : void
      40           0 : MandelConverter<T, symmetrize>::initQpStatefulProperties()
      41             : {
      42           0 :   computeQpProperties();
      43           0 : }
      44             : 
      45             : template <typename T, bool symmetrize>
      46             : void
      47           0 : MandelConverter<T, symmetrize>::computeQpProperties()
      48             : {
      49           0 :   _to[_qp] = ToType(_from[_qp]);
      50           0 : }
      51             : 
      52             : template class MandelConverter<RankTwoTensor, true>;
      53             : template class MandelConverter<RankTwoTensor, false>;
      54             : template class MandelConverter<RankFourTensor, true>;
      55             : template class MandelConverter<RankFourTensor, false>;

Generated by: LCOV version 1.14