Skip to content

Commit

Permalink
progress on #34 in FELIX and PHAL
Browse files Browse the repository at this point in the history
  • Loading branch information
ibaned committed Feb 1, 2017
1 parent 28e467a commit 52b6c77
Show file tree
Hide file tree
Showing 13 changed files with 51 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ namespace FELIX {
int numSideDims;
int sideDim;

PHX::MDField<ScalarT,Cell,Node> solution;
PHX::MDField<ParamScalarT,Cell,Side,Node> field;
PHX::MDField<ScalarT,Cell,Side,QuadPoint,Dim> gradField;
PHX::MDField<MeshScalarT,Cell,Side,Node,QuadPoint,Dim> gradBF;
PHX::MDField<MeshScalarT,Cell,Side,QuadPoint> w_side_measure;
PHX::MDField<const ScalarT,Cell,Node> solution;
PHX::MDField<const ParamScalarT,Cell,Side,Node> field;
PHX::MDField<const ScalarT,Cell,Side,QuadPoint,Dim> gradField;
PHX::MDField<const MeshScalarT,Cell,Side,Node,QuadPoint,Dim> gradBF;
PHX::MDField<const MeshScalarT,Cell,Side,QuadPoint> w_side_measure;

PHX::MDField<ScalarT,Cell,Node> bdLaplacian_L2Projection_res;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ L2ProjectedBoundaryLaplacianResidual(Teuchos::ParameterList& p, const Teuchos::R
const std::string& w_side_measure_name = p.get<std::string>("Weighted Measure Side Name");
const std::string& residual_name = p.get<std::string>("L2 Projected Boundary Laplacian Residual Name");

solution = PHX::MDField<ScalarT,Cell,Node>(solution_name, dl->node_scalar);
field = PHX::MDField<ParamScalarT,Cell,Side,Node>(field_name, dl_side->node_scalar);
gradField = PHX::MDField<ScalarT,Cell,Side,QuadPoint,Dim>(gradField_name, dl_side->qp_gradient);
gradBF = PHX::MDField<MeshScalarT,Cell,Side,Node, QuadPoint,Dim>(gradBFname,dl_side->node_qp_gradient),
w_side_measure = PHX::MDField<MeshScalarT,Cell,Side,QuadPoint>(w_side_measure_name, dl_side->qp_scalar);
bdLaplacian_L2Projection_res = PHX::MDField<ScalarT,Cell,Node>(residual_name, dl->node_scalar);
solution = decltype(solution)(solution_name, dl->node_scalar);
field = decltype(field)(field_name, dl_side->node_scalar);
gradField = decltype(gradField)(gradField_name, dl_side->qp_gradient);
gradBF = decltype(gradBF)(gradBFname,dl_side->node_qp_gradient),
w_side_measure = decltype(w_side_measure)(w_side_measure_name, dl_side->qp_scalar);
bdLaplacian_L2Projection_res = decltype(bdLaplacian_L2Projection_res)(residual_name, dl->node_scalar);

Teuchos::RCP<shards::CellTopology> cellType;
cellType = p.get<Teuchos::RCP <shards::CellTopology> > ("Cell Type");
Expand Down
10 changes: 5 additions & 5 deletions src/FELIX/evaluators/FELIX_LaplacianRegularizationResidual.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ namespace FELIX {
int cellDim;
// int sideDim;

PHX::MDField<ScalarT> field;
PHX::MDField<ScalarT> gradField;
PHX::MDField<ParamScalarT> forcing;
PHX::MDField<MeshScalarT> gradBF;
PHX::MDField<MeshScalarT> w_measure;
PHX::MDField<const ScalarT> field;
PHX::MDField<const ScalarT> gradField;
PHX::MDField<const ParamScalarT> forcing;
PHX::MDField<const MeshScalarT> gradBF;
PHX::MDField<const MeshScalarT> w_measure;

PHX::MDField<ScalarT> residual;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ LaplacianRegularizationResidual(Teuchos::ParameterList& p, const Teuchos::RCP<Al
const std::string& w_measure_name = p.get<std::string>("Weighted Measure Name");
const std::string& residual_name = p.get<std::string>("Laplacian Residual Name");

forcing = PHX::MDField<ParamScalarT>(forcing_name, dl->node_scalar);
field = PHX::MDField<ScalarT>(field_name, dl->node_scalar);
gradField = PHX::MDField<ScalarT>(gradField_name, dl->qp_gradient);
gradBF = PHX::MDField<MeshScalarT>(gradBFname,dl->node_qp_gradient),
w_measure = PHX::MDField<MeshScalarT>(w_measure_name, dl->qp_scalar);
residual = PHX::MDField<ScalarT>(residual_name, dl->node_scalar);
forcing = decltype(forcing)(forcing_name, dl->node_scalar);
field = decltype(field)(field_name, dl->node_scalar);
gradField = decltype(gradField)(gradField_name, dl->qp_gradient);
gradBF = decltype(gradBF)(gradBFname,dl->node_qp_gradient),
w_measure = decltype(w_measure)(w_measure_name, dl->qp_scalar);
residual = decltype(residual)(residual_name, dl->node_scalar);

Teuchos::RCP<shards::CellTopology> cellType;
cellType = p.get<Teuchos::RCP <shards::CellTopology> > ("Cell Type");
Expand Down
6 changes: 3 additions & 3 deletions src/FELIX/evaluators/FELIX_LiquidWaterFraction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ namespace FELIX

private:
// Input:
PHX::MDField<Type,Cell,Node> enthalpyHs; //[MW s m^{-3}]
PHX::MDField<ScalarT,Cell,Node> enthalpy; //[MW s m^{-3}]
PHX::MDField<ScalarT,Dim> homotopy;
PHX::MDField<const Type,Cell,Node> enthalpyHs; //[MW s m^{-3}]
PHX::MDField<const ScalarT,Cell,Node> enthalpy; //[MW s m^{-3}]
PHX::MDField<const ScalarT,Dim> homotopy;

// Output:
PHX::MDField<ScalarT,Cell,Node> phi; //[adim]
Expand Down
4 changes: 2 additions & 2 deletions src/FELIX/evaluators/FELIX_PressureMeltingEnthalpy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ namespace FELIX
private:
typedef typename EvalT::ParamScalarT ParamScalarT;
// Input:
PHX::MDField<Type,Cell,Node> meltingTemp; //[K]
PHX::MDField<ParamScalarT,Cell,Node> surfaceTemp; //[K]
PHX::MDField<const Type,Cell,Node> meltingTemp; //[K]
PHX::MDField<const ParamScalarT,Cell,Node> surfaceTemp; //[K]

// Output:
PHX::MDField<Type,Cell,Node> enthalpyHs; //[MW s m^{-3}]
Expand Down
2 changes: 1 addition & 1 deletion src/FELIX/evaluators/FELIX_PressureMeltingTemperature.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class PressureMeltingTemperature: public PHX::EvaluatorWithBaseImpl<Traits>,

private:
// Input:
PHX::MDField<Type,Cell,Node> pressure;
PHX::MDField<const Type,Cell,Node> pressure;

// Output:
PHX::MDField<Type,Cell,Node> meltingTemp;
Expand Down
2 changes: 1 addition & 1 deletion src/FELIX/evaluators/FELIX_ProlongateVector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class ProlongateVectorBase : public PHX::EvaluatorWithBaseImpl<Traits>,
const Teuchos::RCP<Albany::Layouts>& dl_out);

// Input:
PHX::MDField<ScalarT> v_in;
PHX::MDField<const ScalarT> v_in;

// Output:
PHX::MDField<ScalarT> v_out;
Expand Down
12 changes: 6 additions & 6 deletions src/FELIX/evaluators/FELIX_ProlongateVector_Def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ ProlongateVectorBase(const Teuchos::ParameterList& p,
std::string layout = p.get<std::string>("Field Layout");
if (layout=="Cell Vector")
{
v_in = PHX::MDField<ScalarT>(name,dl_in->cell_vector);
v_out = PHX::MDField<ScalarT>(name,dl_out->cell_vector);
v_in = decltype(v_in)(name,dl_in->cell_vector);
v_out = decltype(v_out)(name,dl_out->cell_vector);
}
else if (layout=="Cell Node Vector")
{
v_in = PHX::MDField<ScalarT>(name,dl_in->node_vector);
v_out = PHX::MDField<ScalarT>(name,dl_out->node_vector);
v_in = decltype(v_in)(name,dl_in->node_vector);
v_out = decltype(v_out)(name,dl_out->node_vector);
}
else if (layout=="Cell QuadPoint Vector")
{
v_in = PHX::MDField<ScalarT>(name,dl_in->qp_vector);
v_out = PHX::MDField<ScalarT>(name,dl_out->qp_vector);
v_in = decltype(v_in)(name,dl_in->qp_vector);
v_out = decltype(v_out)(name,dl_out->qp_vector);
}
else
{
Expand Down
6 changes: 3 additions & 3 deletions src/evaluators/PHAL_NSBodyForce.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ class NSBodyForce : public PHX::EvaluatorWithBaseImpl<Traits>,
typedef typename EvalT::MeshScalarT MeshScalarT;

// Input:
PHX::MDField<ScalarT,Cell,QuadPoint> T;
PHX::MDField<ScalarT,Cell,QuadPoint> rho;
PHX::MDField<ScalarT,Cell,QuadPoint> beta;
PHX::MDField<const ScalarT,Cell,QuadPoint> T;
PHX::MDField<const ScalarT,Cell,QuadPoint> rho;
PHX::MDField<const ScalarT,Cell,QuadPoint> beta;
Teuchos::Array<double> gravity;

// Output:
Expand Down
8 changes: 4 additions & 4 deletions src/evaluators/PHAL_NSBodyForce_Def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ NSBodyForce(const Teuchos::ParameterList& p) :
}
else if (type == "Constant") {
bf_type = CONSTANT;
rho = PHX::MDField<ScalarT,Cell,QuadPoint>(
rho = decltype(rho)(
p.get<std::string>("Density QP Variable Name"),
p.get<Teuchos::RCP<PHX::DataLayout> >("QP Scalar Data Layout") );
this->addDependentField(rho);
Expand All @@ -40,13 +40,13 @@ NSBodyForce(const Teuchos::ParameterList& p) :
"Error! Must enable heat equation for Boussinesq " <<
"body force term!");
bf_type = BOUSSINESQ;
T = PHX::MDField<ScalarT,Cell,QuadPoint>(
T = decltype(T)(
p.get<std::string>("Temperature QP Variable Name"),
p.get<Teuchos::RCP<PHX::DataLayout> >("QP Scalar Data Layout") );
rho = PHX::MDField<ScalarT,Cell,QuadPoint>(
rho = decltype(rho)(
p.get<std::string>("Density QP Variable Name"),
p.get<Teuchos::RCP<PHX::DataLayout> >("QP Scalar Data Layout") );
beta = PHX::MDField<ScalarT,Cell,QuadPoint>(
beta = decltype(beta)(
p.get<std::string>(
"Volumetric Expansion Coefficient QP Variable Name"),
p.get<Teuchos::RCP<PHX::DataLayout> >("QP Scalar Data Layout") );
Expand Down
12 changes: 6 additions & 6 deletions src/evaluators/PHAL_NSContinuityResid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ class NSContinuityResid : public PHX::EvaluatorWithBaseImpl<Traits>,
typedef typename EvalT::MeshScalarT MeshScalarT;

// Input:
PHX::MDField<MeshScalarT,Cell,Node,QuadPoint> wBF;
PHX::MDField<ScalarT,Cell,QuadPoint,Dim,Dim> VGrad;
PHX::MDField<ScalarT,Cell,QuadPoint> rho;
PHX::MDField<const MeshScalarT,Cell,Node,QuadPoint> wBF;
PHX::MDField<const ScalarT,Cell,QuadPoint,Dim,Dim> VGrad;
PHX::MDField<const ScalarT,Cell,QuadPoint> rho;

PHX::MDField<MeshScalarT,Cell,Node,QuadPoint,Dim> wGradBF;
PHX::MDField<ScalarT,Cell,QuadPoint> TauM;
PHX::MDField<ScalarT,Cell,QuadPoint,Dim> Rm;
PHX::MDField<const MeshScalarT,Cell,Node,QuadPoint,Dim> wGradBF;
PHX::MDField<const ScalarT,Cell,QuadPoint> TauM;
PHX::MDField<const ScalarT,Cell,QuadPoint,Dim> Rm;

// Output:
PHX::MDField<ScalarT,Cell,Node> CResidual;
Expand Down
6 changes: 3 additions & 3 deletions src/evaluators/PHAL_NSContinuityResid_Def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ NSContinuityResid(const Teuchos::ParameterList& p) :
this->addDependentField(VGrad);
this->addDependentField(rho);
if (havePSPG) {
wGradBF = PHX::MDField<MeshScalarT,Cell,Node,QuadPoint,Dim>(
wGradBF = decltype(wGradBF)(
p.get<std::string>("Weighted Gradient BF Name"),
p.get<Teuchos::RCP<PHX::DataLayout> >("Node QP Vector Data Layout") );
TauM = PHX::MDField<ScalarT,Cell,QuadPoint>(
TauM = decltype(TauM)(
p.get<std::string>("Tau M Name"),
p.get<Teuchos::RCP<PHX::DataLayout> >("QP Scalar Data Layout") );
Rm = PHX::MDField<ScalarT,Cell,QuadPoint,Dim>(
Rm = decltype(Rm)(
p.get<std::string>("Rm Name"),
p.get<Teuchos::RCP<PHX::DataLayout> >("QP Vector Data Layout") );
this->addDependentField(wGradBF);
Expand Down

0 comments on commit 52b6c77

Please sign in to comment.