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 "LevelSetProblem.h" 11 : #include "LevelSetTypes.h" 12 : 13 : #include "MultiAppTransfer.h" 14 : 15 : registerMooseObject("LevelSetApp", LevelSetProblem); 16 : 17 : InputParameters 18 46 : LevelSetProblem::validParams() 19 : { 20 46 : InputParameters params = FEProblem::validParams(); 21 46 : params.addClassDescription("A specilized problem class that adds a custom call to " 22 : "MultiAppTransfer execution to transfer adaptivity for the level set " 23 : "reinitialization."); 24 46 : return params; 25 0 : } 26 : 27 23 : LevelSetProblem::LevelSetProblem(const InputParameters & parameters) : FEProblem(parameters) {} 28 : 29 : void 30 49 : LevelSetProblem::computeMarkers() 31 : { 32 49 : FEProblem::computeMarkers(); 33 49 : setCurrentExecuteOnFlag(LevelSet::EXEC_COMPUTE_MARKERS); 34 49 : execMultiAppTransfers(LevelSet::EXEC_COMPUTE_MARKERS, MultiAppTransfer::TO_MULTIAPP); 35 49 : setCurrentExecuteOnFlag(EXEC_NONE); 36 49 : } 37 : 38 : bool 39 28 : LevelSetProblem::adaptMesh() 40 : { 41 28 : bool adapt = FEProblem::adaptMesh(); 42 28 : setCurrentExecuteOnFlag(LevelSet::EXEC_ADAPT_MESH); 43 28 : execMultiAppTransfers(LevelSet::EXEC_ADAPT_MESH, MultiAppTransfer::TO_MULTIAPP); 44 28 : setCurrentExecuteOnFlag(EXEC_NONE); 45 28 : return adapt; 46 : }