LCOV - code coverage report
Current view: top level - src/base - SolidMechanicsApp.C (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: f45d79 Lines: 66 73 90.4 %
Date: 2025-07-25 05:00:39 Functions: 5 8 62.5 %
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 "SolidMechanicsApp.h"
      11             : #include "Moose.h"
      12             : #include "AppFactory.h"
      13             : #include "MooseSyntax.h"
      14             : 
      15             : InputParameters
      16        9304 : SolidMechanicsApp::validParams()
      17             : {
      18        9304 :   auto params = MooseApp::validParams();
      19        9304 :   params.set<bool>("automatic_automatic_scaling") = false;
      20        9304 :   params.set<bool>("use_legacy_material_output") = false;
      21        9304 :   params.set<bool>("use_legacy_initial_residual_evaluation_behavior") = false;
      22        9304 :   return params;
      23           0 : }
      24             : 
      25             : registerKnownLabel("SolidMechanicsApp");
      26             : 
      27        9304 : SolidMechanicsApp::SolidMechanicsApp(const InputParameters & parameters) : MooseApp(parameters)
      28             : {
      29        9304 :   SolidMechanicsApp::registerAll(_factory, _action_factory, _syntax);
      30        9304 : }
      31             : 
      32        8944 : SolidMechanicsApp::~SolidMechanicsApp() {}
      33             : 
      34             : void
      35        9304 : SolidMechanicsApp::registerAll(Factory & f, ActionFactory & af, Syntax & syntax)
      36             : {
      37       27912 :   Registry::registerObjectsTo(f, {"SolidMechanicsApp"});
      38       27912 :   Registry::registerActionsTo(af, {"SolidMechanicsApp"});
      39       18608 :   registerAppDataFilePath("solid_mechanics");
      40             : 
      41       18608 :   registerSyntax("EmptyAction", "BCs/CavityPressure");
      42       18608 :   registerSyntax("CavityPressureAction", "BCs/CavityPressure/*");
      43       18608 :   registerSyntax("CavityPressurePPAction", "BCs/CavityPressure/*");
      44       18608 :   registerSyntax("CavityPressureUOAction", "BCs/CavityPressure/*");
      45             : 
      46       27912 :   registerDeprecatedSyntax("LegacyTensorMechanicsAction",
      47             :                            "Kernels/TensorMechanics",
      48             :                            "The 'Kernels/TensorMechanics' syntax is deprecated. Please use "
      49             :                            "'Physics/SolidMechanics/QuasiStatic' instead.");
      50       27912 :   registerDeprecatedSyntax("LegacyDynamicTensorMechanicsAction",
      51             :                            "Kernels/DynamicTensorMechanics",
      52             :                            "The 'Kernels/DynamicTensorMechanics' syntax is deprecated. Please use "
      53             :                            "'Physics/SolidMechanics/Dynamic' instead.");
      54             :   // For convenience, since the Kernels/XYZMechanics syntax is still around
      55       27912 :   registerDeprecatedSyntax("LegacyTensorMechanicsAction",
      56             :                            "Kernels/SolidMechanics",
      57             :                            "The 'Kernels/SolidMechanics' syntax is deprecated. Please use "
      58             :                            "'Physics/SolidMechanics/QuasiStatic' instead.");
      59       27912 :   registerDeprecatedSyntax("LegacyDynamicTensorMechanicsAction",
      60             :                            "Kernels/DynamicSolidMechanics",
      61             :                            "The 'Kernels/DynamicSolidMechanics' syntax is deprecated. Please use "
      62             :                            "'Physics/SolidMechanics/Dynamic' instead.");
      63       18608 :   registerSyntax("PoroMechanicsAction", "Kernels/PoroMechanics");
      64             : 
      65       18608 :   registerSyntax("EmptyAction", "BCs/Pressure");
      66       18608 :   registerSyntax("PressureAction", "BCs/Pressure/*");
      67       18608 :   registerSyntax("EmptyAction", "BCs/InclinedNoDisplacementBC");
      68       18608 :   registerSyntax("InclinedNoDisplacementBCAction", "BCs/InclinedNoDisplacementBC/*");
      69       18608 :   registerSyntax("EmptyAction", "BCs/CoupledPressure");
      70       18608 :   registerSyntax("CoupledPressureAction", "BCs/CoupledPressure/*");
      71             : 
      72             :   // Deprecated Modules/TensorMechanics syntax
      73       27912 :   registerDeprecatedSyntax("GeneralizedPlaneStrainAction",
      74             :                            "Modules/TensorMechanics/GeneralizedPlaneStrain/*",
      75             :                            "The 'Modules/TensorMechanics' syntax is deprecated. Please use "
      76             :                            "'Physics/SolidMechanics' instead.");
      77       27912 :   registerDeprecatedSyntax("GlobalStrainAction",
      78             :                            "Modules/TensorMechanics/GlobalStrain/*",
      79             :                            "The 'Modules/TensorMechanics' syntax is deprecated. Please use "
      80             :                            "'Physics/SolidMechanics' instead.");
      81       27912 :   registerDeprecatedSyntax("CommonSolidMechanicsAction",
      82             :                            "Modules/TensorMechanics/Master",
      83             :                            "The 'Modules/TensorMechanics/Master' syntax is deprecated. Please use "
      84             :                            "'Physics/SolidMechanics/QuasiStatic' instead.");
      85       27912 :   registerDeprecatedSyntax(
      86             :       "CommonSolidMechanicsAction",
      87             :       "Modules/TensorMechanics/DynamicMaster",
      88             :       "The 'Modules/TensorMechanics/DynamicMaster' syntax is deprecated. Please use "
      89             :       "'Physics/SolidMechanics/Dynamic' instead.");
      90       27912 :   registerDeprecatedSyntax("QuasiStaticSolidMechanicsPhysics",
      91             :                            "Modules/TensorMechanics/Master/*",
      92             :                            "The 'Modules/TensorMechanics/Master' syntax is deprecated. Please use "
      93             :                            "'Physics/SolidMechanics/QuasiStatic' instead.");
      94       27912 :   registerDeprecatedSyntax(
      95             :       "DynamicSolidMechanicsPhysics",
      96             :       "Modules/TensorMechanics/DynamicMaster/*",
      97             :       "The 'Modules/TensorMechanics/DynamicMaster' syntax is deprecated. Please use "
      98             :       "'Physics/SolidMechanics/Dynamic' instead.");
      99             : 
     100       27912 :   registerDeprecatedSyntax(
     101             :       "CommonLineElementAction",
     102             :       "Modules/TensorMechanics/LineElementMaster",
     103             :       "The 'Modules/TensorMechanics/LineElementMaster' syntax is deprecated. Please use "
     104             :       "'Physics/SolidMechanics/LineElement/QuasiStatic' instead.");
     105       27912 :   registerDeprecatedSyntax(
     106             :       "LineElementAction",
     107             :       "Modules/TensorMechanics/LineElementMaster/*",
     108             :       "The 'Modules/TensorMechanics/LineElementMaster' syntax is deprecated. Please use "
     109             :       "'Physics/SolidMechanics/LineElement/QuasiStatic' instead.");
     110             : 
     111       27912 :   registerDeprecatedSyntax(
     112             :       "CommonCohesiveZoneAction",
     113             :       "Modules/TensorMechanics/CohesiveZoneMaster",
     114             :       "The 'Modules/TensorMechanics/CohesiveZoneMaster' syntax is deprecated. Please use "
     115             :       "'Physics/SolidMechanics/CohesiveZone' instead.");
     116       27912 :   registerDeprecatedSyntax(
     117             :       "CohesiveZoneAction",
     118             :       "Modules/TensorMechanics/CohesiveZoneMaster/*",
     119             :       "The 'Modules/TensorMechanics/CohesiveZoneMaster' syntax is deprecated. Please use "
     120             :       "'Physics/SolidMechanics/CohesiveZone' instead.");
     121             : 
     122       27912 :   registerDeprecatedSyntax("EmptyAction",
     123             :                            "Modules/TensorMechanics/MaterialVectorBodyForce",
     124             :                            "The 'Modules/TensorMechanics' syntax is deprecated. Please use "
     125             :                            "'Physics/SolidMechanics' instead.");
     126       27912 :   registerDeprecatedSyntax("MaterialVectorBodyForceAction",
     127             :                            "Modules/TensorMechanics/MaterialVectorBodyForce/*",
     128             :                            "The 'Modules/TensorMechanics' syntax is deprecated. Please use "
     129             :                            "'Physics/SolidMechanics' instead.");
     130             : 
     131             :   // New Physics syntax
     132       18608 :   registerSyntax("GeneralizedPlaneStrainAction", "Physics/SolidMechanics/GeneralizedPlaneStrain/*");
     133       18608 :   registerSyntax("GlobalStrainAction", "Physics/SolidMechanics/GlobalStrain/*");
     134       18608 :   registerSyntax("CommonSolidMechanicsAction", "Physics/SolidMechanics/QuasiStatic");
     135       18608 :   registerSyntax("CommonSolidMechanicsAction", "Physics/SolidMechanics/Dynamic");
     136       18608 :   registerSyntax("QuasiStaticSolidMechanicsPhysics", "Physics/SolidMechanics/QuasiStatic/*");
     137       18608 :   registerSyntax("DynamicSolidMechanicsPhysics", "Physics/SolidMechanics/Dynamic/*");
     138             : 
     139       18608 :   registerSyntax("CommonLineElementAction", "Physics/SolidMechanics/LineElement/QuasiStatic");
     140       18608 :   registerSyntax("LineElementAction", "Physics/SolidMechanics/LineElement/QuasiStatic/*");
     141             : 
     142       18608 :   registerSyntax("CommonCohesiveZoneAction", "Physics/SolidMechanics/CohesiveZone");
     143       18608 :   registerSyntax("CohesiveZoneAction", "Physics/SolidMechanics/CohesiveZone/*");
     144             : 
     145       18608 :   registerSyntax("EmptyAction", "Physics/SolidMechanics/MaterialVectorBodyForce");
     146       18608 :   registerSyntax("MaterialVectorBodyForceAction",
     147             :                  "Physics/SolidMechanics/MaterialVectorBodyForce/*");
     148             : 
     149       18608 :   registerSyntaxTask("DomainIntegralAction", "DomainIntegral", "add_user_object");
     150       18608 :   registerSyntaxTask("DomainIntegralAction", "DomainIntegral", "add_aux_variable");
     151       18608 :   registerSyntaxTask("DomainIntegralAction", "DomainIntegral", "add_aux_kernel");
     152       18608 :   registerSyntaxTask("DomainIntegralAction", "DomainIntegral", "add_postprocessor");
     153       18608 :   registerSyntaxTask("DomainIntegralAction", "DomainIntegral", "add_vector_postprocessor");
     154       18608 :   registerSyntaxTask("DomainIntegralAction", "DomainIntegral", "add_material");
     155             : 
     156        9304 :   registerTask("validate_coordinate_systems", /*is_required=*/false);
     157       18608 :   addTaskDependency("validate_coordinate_systems", "create_problem_complete");
     158       18608 :   addTaskDependency("setup_postprocessor_data", "validate_coordinate_systems");
     159       37216 : }
     160             : 
     161             : void
     162        9298 : SolidMechanicsApp::registerApps()
     163             : {
     164        9298 :   registerApp(SolidMechanicsApp);
     165        9298 : }
     166             : 
     167             : extern "C" void
     168           0 : SolidMechanicsApp__registerAll(Factory & f, ActionFactory & af, Syntax & s)
     169             : {
     170           0 :   SolidMechanicsApp::registerAll(f, af, s);
     171           0 : }
     172             : extern "C" void
     173           0 : SolidMechanicsApp_registerApps()
     174             : {
     175           0 :   SolidMechanicsApp::registerApps();
     176           0 : }

Generated by: LCOV version 1.14