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 58 : LevelSetProblem::validParams() 19 : { 20 58 : InputParameters params = FEProblem::validParams(); 21 58 : 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 58 : return params; 25 0 : } 26 : 27 29 : LevelSetProblem::LevelSetProblem(const InputParameters & parameters) : FEProblem(parameters) {} 28 : 29 : void 30 63 : LevelSetProblem::computeMarkers() 31 : { 32 63 : FEProblem::computeMarkers(); 33 63 : setCurrentExecuteOnFlag(LevelSet::EXEC_COMPUTE_MARKERS); 34 63 : execMultiAppTransfers(LevelSet::EXEC_COMPUTE_MARKERS, MultiAppTransfer::TO_MULTIAPP); 35 63 : setCurrentExecuteOnFlag(EXEC_NONE); 36 63 : } 37 : 38 : bool 39 36 : LevelSetProblem::adaptMesh() 40 : { 41 36 : bool adapt = FEProblem::adaptMesh(); 42 36 : setCurrentExecuteOnFlag(LevelSet::EXEC_ADAPT_MESH); 43 36 : execMultiAppTransfers(LevelSet::EXEC_ADAPT_MESH, MultiAppTransfer::TO_MULTIAPP); 44 36 : setCurrentExecuteOnFlag(EXEC_NONE); 45 36 : return adapt; 46 : }