forked from idaholab/moose
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request idaholab#17672 from YaqiWang/array_relaxation_17659
Fix array variable relaxation in Picard iteration
- Loading branch information
Showing
18 changed files
with
340 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
//* This file is part of the MOOSE framework | ||
//* https://www.mooseframework.org | ||
//* | ||
//* All rights reserved, see COPYRIGHT for full restrictions | ||
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT | ||
//* | ||
//* Licensed under LGPL 2.1, please see LICENSE for details | ||
//* https://www.gnu.org/licenses/lgpl-2.1.html | ||
|
||
#pragma once | ||
|
||
#include "AuxKernel.h" | ||
|
||
class ArrayQuotientAux : public ArrayAuxKernel | ||
{ | ||
public: | ||
static InputParameters validParams(); | ||
|
||
ArrayQuotientAux(const InputParameters & parameters); | ||
|
||
protected: | ||
virtual RealEigenVector computeValue() override; | ||
|
||
const ArrayVariableValue & _numerator; | ||
const ArrayVariableValue & _denominator; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
//* This file is part of the MOOSE framework | ||
//* https://www.mooseframework.org | ||
//* | ||
//* All rights reserved, see COPYRIGHT for full restrictions | ||
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT | ||
//* | ||
//* Licensed under LGPL 2.1, please see LICENSE for details | ||
//* https://www.gnu.org/licenses/lgpl-2.1.html | ||
|
||
#include "ArrayQuotientAux.h" | ||
|
||
registerMooseObject("MooseTestApp", ArrayQuotientAux); | ||
|
||
InputParameters | ||
ArrayQuotientAux::validParams() | ||
{ | ||
InputParameters params = ArrayAuxKernel::validParams(); | ||
params.addClassDescription("Divides two coupled variables."); | ||
params.addCoupledVar("numerator", "The upstairs of the quotient variable"); | ||
params.addCoupledVar("denominator", "The downstairs of the quotient variable"); | ||
return params; | ||
} | ||
|
||
ArrayQuotientAux::ArrayQuotientAux(const InputParameters & parameters) | ||
: ArrayAuxKernel(parameters), | ||
_numerator(coupledArrayValue("numerator")), | ||
_denominator(coupledArrayValue("denominator")) | ||
{ | ||
} | ||
|
||
RealEigenVector | ||
ArrayQuotientAux::computeValue() | ||
{ | ||
return _numerator[_qp].cwiseQuotient(_denominator[_qp]); | ||
} |
Binary file added
BIN
+81.2 KB
test/tests/multiapps/relaxation/gold/picard_relaxed_array_master_out.e
Binary file not shown.
Oops, something went wrong.