Skip to content

Commit

Permalink
#123 formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
pou036 committed Jul 26, 2018
1 parent 09532e2 commit 57f2bc5
Show file tree
Hide file tree
Showing 26 changed files with 1,149 additions and 787 deletions.
15 changes: 12 additions & 3 deletions include/materials/RedbackMechMaterial.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,18 @@ class RedbackMechMaterial : public Material
// is dependant on the yield criterion. Therefore we define them as abstract
// virtual functions here such that no implementation is needed in
// RedbackMechMaterial.C
virtual void getJac(
const RankTwoTensor &, const RankFourTensor &, Real, Real, Real, Real, Real, Real, Real, RankFourTensor &) = 0;
virtual void getFlowTensor(const RankTwoTensor &, Real, Real, Real, Real, Real, RankTwoTensor &) = 0;
virtual void getJac(const RankTwoTensor &,
const RankFourTensor &,
Real,
Real,
Real,
Real,
Real,
Real,
Real,
RankFourTensor &) = 0;
virtual void
getFlowTensor(const RankTwoTensor &, Real, Real, Real, Real, Real, RankTwoTensor &) = 0;
virtual Real getFlowIncrement(Real, Real, Real, Real, Real, Real) = 0;
virtual void get_py_qy(Real, Real, Real &, Real &, Real, bool &, Real &) = 0;

Expand Down
17 changes: 13 additions & 4 deletions include/materials/RedbackMechMaterialCC.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,23 @@ class RedbackMechMaterialCC : public RedbackMechMaterial
Real _M; // coefficient for yield surface
Real _shift_ellipse; // horizontal shift of the ellipse

virtual void getJac(const RankTwoTensor &,
const RankFourTensor &,
Real,
Real,
Real,
Real,
Real,
Real,
Real,
RankFourTensor &) override;
virtual void
getJac(const RankTwoTensor &, const RankFourTensor &, Real, Real, Real, Real, Real, Real, Real, RankFourTensor &)
override;
virtual void getFlowTensor(const RankTwoTensor &, Real, Real, Real, Real, Real, RankTwoTensor &) override;
getFlowTensor(const RankTwoTensor &, Real, Real, Real, Real, Real, RankTwoTensor &) override;
virtual Real getFlowIncrement(Real, Real, Real, Real, Real, Real) override;
virtual void get_py_qy(Real, Real, Real &, Real &, Real, bool &, Real &) override;
virtual void form_damage_kernels(Real) override;
void getDerivativeFlowIncrement(Real &, Real &, const RankTwoTensor &, Real, Real, Real, Real, Real, Real);
void getDerivativeFlowIncrement(
Real &, Real &, const RankTwoTensor &, Real, Real, Real, Real, Real, Real);
};

#endif // REDBACKMECHMATERIALCC_H
14 changes: 11 additions & 3 deletions include/materials/RedbackMechMaterialCCanisotropic.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,18 @@ class RedbackMechMaterialCCanisotropic : public RedbackMechMaterialCC
// anisotropy (Dafalias 2013)

virtual void stepInitQpProperties() override;
virtual void getJac(const RankTwoTensor &,
const RankFourTensor &,
Real,
Real,
Real,
Real,
Real,
Real,
Real,
RankFourTensor &) override;
virtual void
getJac(const RankTwoTensor &, const RankFourTensor &, Real, Real, Real, Real, Real, Real, Real, RankFourTensor &)
override;
virtual void getFlowTensor(const RankTwoTensor &, Real, Real, Real, Real, Real, RankTwoTensor &) override;
getFlowTensor(const RankTwoTensor &, Real, Real, Real, Real, Real, RankTwoTensor &) override;
virtual Real getFlowIncrement(Real, Real, Real, Real, Real, Real) override;
virtual void get_py_qy(Real, Real, Real &, Real &, Real, bool &, Real &) override;
Real getDerivativeFlowIncrement(const RankTwoTensor &, Real, Real, Real, Real, Real);
Expand Down
17 changes: 13 additions & 4 deletions include/materials/RedbackMechMaterialDP.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,22 @@ class RedbackMechMaterialDP : public RedbackMechMaterial
protected:
Real _mu; // coefficient for yield surface

virtual void getJac(const RankTwoTensor &,
const RankFourTensor &,
Real,
Real,
Real,
Real,
Real,
Real,
Real,
RankFourTensor &) override;
virtual void
getJac(const RankTwoTensor &, const RankFourTensor &, Real, Real, Real, Real, Real, Real, Real, RankFourTensor &)
override;
virtual void getFlowTensor(const RankTwoTensor &, Real, Real, Real, Real, Real, RankTwoTensor &) override;
getFlowTensor(const RankTwoTensor &, Real, Real, Real, Real, Real, RankTwoTensor &) override;
virtual Real getFlowIncrement(Real, Real, Real, Real, Real, Real) override;
virtual void get_py_qy(Real, Real, Real &, Real &, Real, bool &, Real &) override;
void getDerivativeFlowIncrement(Real &, Real &, const RankTwoTensor &, Real, Real, Real, Real, Real);
void
getDerivativeFlowIncrement(Real &, Real &, const RankTwoTensor &, Real, Real, Real, Real, Real);
Real getPressureProjection(Real, Real, Real);

// virtual void form_damage_kernels(Real);
Expand Down
14 changes: 11 additions & 3 deletions include/materials/RedbackMechMaterialElastic.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,18 @@ class RedbackMechMaterialElastic : public RedbackMechMaterial
RankTwoTensor &,
Real &,
Real &) override;
virtual void getJac(const RankTwoTensor &,
const RankFourTensor &,
Real,
Real,
Real,
Real,
Real,
Real,
Real,
RankFourTensor &) override;
virtual void
getJac(const RankTwoTensor &, const RankFourTensor &, Real, Real, Real, Real, Real, Real, Real, RankFourTensor &)
override;
virtual void getFlowTensor(const RankTwoTensor &, Real, Real, Real, Real, Real, RankTwoTensor &) override;
getFlowTensor(const RankTwoTensor &, Real, Real, Real, Real, Real, RankTwoTensor &) override;
virtual Real getFlowIncrement(Real, Real, Real, Real, Real, Real) override;
virtual void get_py_qy(Real, Real, Real &, Real &, Real, bool &, Real &) override;
};
Expand Down
17 changes: 13 additions & 4 deletions include/materials/RedbackMechMaterialExpCC.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,23 @@ class RedbackMechMaterialExpCC : public RedbackMechMaterial
protected:
Real _slope_yield_surface; // coefficient for yield surface

virtual void getJac(const RankTwoTensor &,
const RankFourTensor &,
Real,
Real,
Real,
Real,
Real,
Real,
Real,
RankFourTensor &) override;
virtual void
getJac(const RankTwoTensor &, const RankFourTensor &, Real, Real, Real, Real, Real, Real, Real, RankFourTensor &)
override;
virtual void getFlowTensor(const RankTwoTensor &, Real, Real, Real, Real, Real, RankTwoTensor &) override;
getFlowTensor(const RankTwoTensor &, Real, Real, Real, Real, Real, RankTwoTensor &) override;
virtual Real getFlowIncrement(Real, Real, Real, Real, Real, Real) override;
virtual void get_py_qy(Real, Real, Real &, Real &, Real, bool &, Real &) override;
virtual void form_damage_kernels(Real) override;
void getDerivativeFlowIncrement(Real &, Real &, const RankTwoTensor &, Real, Real, Real, Real, Real);
void
getDerivativeFlowIncrement(Real &, Real &, const RankTwoTensor &, Real, Real, Real, Real, Real);
};

#endif // REDBACKMECHMATERIALEXPCC_H
14 changes: 11 additions & 3 deletions include/materials/RedbackMechMaterialJ2.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,18 @@ class RedbackMechMaterialJ2 : public RedbackMechMaterial
RedbackMechMaterialJ2(const InputParameters & parameters);

protected:
virtual void getJac(const RankTwoTensor &,
const RankFourTensor &,
Real,
Real,
Real,
Real,
Real,
Real,
Real,
RankFourTensor &) override;
virtual void
getJac(const RankTwoTensor &, const RankFourTensor &, Real, Real, Real, Real, Real, Real, Real, RankFourTensor &)
override;
virtual void getFlowTensor(const RankTwoTensor &, Real, Real, Real, Real, Real, RankTwoTensor &) override;
getFlowTensor(const RankTwoTensor &, Real, Real, Real, Real, Real, RankTwoTensor &) override;
virtual Real getFlowIncrement(Real, Real, Real, Real, Real, Real) override;
virtual void get_py_qy(Real, Real, Real &, Real &, Real, bool &, Real &) override;
Real getDerivativeFlowIncrement(const RankTwoTensor &, Real);
Expand Down
18 changes: 13 additions & 5 deletions include/materials/RedbackMechMaterialLne.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,20 @@ class RedbackMechMaterialLne : public RedbackMechMaterial
Real _p_c; // isotropic compression strength
Real _p_t; // tensile strength

Real _M_f; // M_f coefficient (function of M, M_e, M_c, theta)

Real _M_f; // M_f coefficient (function of M, M_e, M_c, theta)

virtual void getJac(const RankTwoTensor &,
const RankFourTensor &,
Real,
Real,
Real,
Real,
Real,
Real,
Real,
RankFourTensor &) override;
virtual void
getJac(const RankTwoTensor &, const RankFourTensor &, Real, Real, Real, Real, Real, Real, Real, RankFourTensor &)
override;
virtual void getFlowTensor(const RankTwoTensor &, Real, Real, Real, Real, Real, RankTwoTensor &) override;
getFlowTensor(const RankTwoTensor &, Real, Real, Real, Real, Real, RankTwoTensor &) override;
virtual Real getFlowIncrement(Real, Real, Real, Real, Real, Real) override;
virtual void get_py_qy(Real, Real, Real &, Real &, Real, bool &, Real &) override;
virtual void form_damage_kernels(Real) override;
Expand Down
75 changes: 56 additions & 19 deletions include/utils/Ellipse.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Ellipse
* @param x: coordinates of projection point on the ellipse
* @return d: distance from y to ellipse
*/
static Real sqrDistanceSpecial(Real const e[ 2 ], Real const y[ 2 ], Real x[ 2 ]);
static Real sqrDistanceSpecial(Real const e[2], Real const y[2], Real x[2]);

/**
* The ellipse is (x0/e0)^2 + (x1/e1)^2 = 1. The query point is (y0,y1). The
Expand All @@ -44,7 +44,7 @@ class Ellipse
* @param x: coordinates of projection point on the ellipse
* @return d: distance from y to ellipse
*/
static Real sqrDistance(Real const e[ 2 ], Real const y[ 2 ], Real x[ 2 ]);
static Real sqrDistance(Real const e[2], Real const y[2], Real x[2]);

/**
* Function to check if given point (y0, y1) is outside of ellipse (plasticity
Expand All @@ -64,8 +64,10 @@ class Ellipse
* @param y: coordinates of point to check
* @return result: boolean, true if strictly outside ellipse
*/
static bool
isPointOutsideOfEllipse2(Real const horizontal_axis, Real const vertical_axis, Real const y0, Real const y1);
static bool isPointOutsideOfEllipse2(Real const horizontal_axis,
Real const vertical_axis,
Real const y0,
Real const y1);

/**
* Function to check if given point (y0, y1) is outside of rotated and shifted
Expand All @@ -77,8 +79,8 @@ class Ellipse
* @param y: coordinates of point to check
* @return result: boolean, true if strictly outside ellipse
*/
static bool
isPointOutsideOfRotatedEllipse(Real const m, Real const p_0, Real const alpha, Real const y0, Real const y1);
static bool isPointOutsideOfRotatedEllipse(
Real const m, Real const p_0, Real const alpha, Real const y0, Real const y1);

/**
* Function to compute the distance from a query point to an ellipse
Expand All @@ -90,8 +92,13 @@ class Ellipse
* @param x: coordinates of projection point on the ellipse
* @return d: distance to ellipse
*/
static Real
distanceCC(Real const m, Real const p_c, Real const y0, Real const y1, Real & x0, Real & x1, Real const shift_ellipse);
static Real distanceCC(Real const m,
Real const p_c,
Real const y0,
Real const y1,
Real & x0,
Real & x1,
Real const shift_ellipse);

/**
* Function to compute the yield point coordinates from a query point
Expand All @@ -104,8 +111,14 @@ class Ellipse
* @param s: arc-length from point to yield point
* @param shift: horizontal shift of the ellipse
*/
static void getYieldPointCC(
Real const m, Real const p_c, Real const y0, Real const y1, Real & x0, Real & x1, Real & s, Real const shift);
static void getYieldPointCC(Real const m,
Real const p_c,
Real const y0,
Real const y1,
Real & x0,
Real & x1,
Real & s,
Real const shift);

/**
* Function to compute the hypergeometric function 2F1
Expand All @@ -129,8 +142,12 @@ class Ellipse
* @param x: coordinates of projection point on the ellipse
* @return d: distance to ellipse
*/
static Real distanceToCenteredEllipse(
Real const horizontal_axis, Real const vertical_axis, Real const y0, Real const y1, Real & x0, Real & x1);
static Real distanceToCenteredEllipse(Real const horizontal_axis,
Real const vertical_axis,
Real const y0,
Real const y1,
Real & x0,
Real & x1);

/**
* Function to compute the distance from a query point to a rotated ellipse
Expand All @@ -145,8 +162,13 @@ class Ellipse
* @param x: coordinates of projection point on the ellipse
* @return d: distance to ellipse
*/
static Real distanceCCanisotropic(
Real const m, Real const p_0, Real const alpha, Real const y0, Real const y1, Real & x0, Real & x1);
static Real distanceCCanisotropic(Real const m,
Real const p_0,
Real const alpha,
Real const y0,
Real const y1,
Real & x0,
Real & x1);

/**
* Function to rotate and translate point in new space where Dafalias ellipse
Expand All @@ -159,8 +181,14 @@ class Ellipse
* @param y: coordinates of point to rotate & translate
* @param z: coordinates of rotated & translated point
*/
static void rotatePoint(
Real const m, Real const p_0, Real const alpha, bool forward, Real const y0, Real const y1, Real & z0, Real & z1);
static void rotatePoint(Real const m,
Real const p_0,
Real const alpha,
bool forward,
Real const y0,
Real const y1,
Real & z0,
Real & z1);

/**
* Function to get axes of Dafalias ellipse
Expand Down Expand Up @@ -217,8 +245,17 @@ class Ellipse
* @param s: arc-length from point to yield point
*/
static void getYieldPointLne(Real const M,
Real const M_e, Real const M_c, Real const alpha, Real const beta, Real const theta,
Real const p_t, Real const p_c, Real const p, Real const q, Real & p_y, Real & q_y, Real & s);

Real const M_e,
Real const M_c,
Real const alpha,
Real const beta,
Real const theta,
Real const p_t,
Real const p_c,
Real const p,
Real const q,
Real & p_y,
Real & q_y,
Real & s);
};
#endif // ELLIPSE_H
6 changes: 4 additions & 2 deletions src/auxkernels/RedbackDiffVarsAux.C
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,16 @@ validParams<RedbackDiffVarsAux>()
}

RedbackDiffVarsAux::RedbackDiffVarsAux(const InputParameters & parameters)
: AuxKernel(parameters), _variable_1(coupledValue("variable_1")), _variable_2(coupledValue("variable_2"))
: AuxKernel(parameters),
_variable_1(coupledValue("variable_1")),
_variable_2(coupledValue("variable_2"))
{
}

Real
RedbackDiffVarsAux::computeValue()
{
Real difference;
difference = _variable_1[ _qp ] - _variable_2[ _qp ];
difference = _variable_1[_qp] - _variable_2[_qp];
return difference;
}
14 changes: 8 additions & 6 deletions src/dirackernels/FunctionPointSource.C
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,24 @@ validParams<FunctionPointSource>()
{
InputParameters params = validParams<DiracKernel>();
params.addRequiredParam<FunctionName>("function", "The input function (in time).");
params.addRequiredParam<std::vector<Real> >("point", "The x,y,z coordinates of the point");
params.addRequiredParam<std::vector<Real>>("point", "The x,y,z coordinates of the point");
return params;
}

FunctionPointSource::FunctionPointSource(const InputParameters & parameters)
: DiracKernel(parameters), _func(getFunction("function")), _point_param(getParam<std::vector<Real> >("point"))
: DiracKernel(parameters),
_func(getFunction("function")),
_point_param(getParam<std::vector<Real>>("point"))
{
_p(0) = _point_param[ 0 ];
_p(0) = _point_param[0];

if (_point_param.size() > 1)
{
_p(1) = _point_param[ 1 ];
_p(1) = _point_param[1];

if (_point_param.size() > 2)
{
_p(2) = _point_param[ 2 ];
_p(2) = _point_param[2];
}
}
}
Expand All @@ -54,5 +56,5 @@ FunctionPointSource::f()
Real
FunctionPointSource::computeQpResidual()
{
return -_test[ _i ][ _qp ] * f(); //*_value;
return -_test[_i][_qp] * f(); //*_value;
}
Loading

0 comments on commit 57f2bc5

Please sign in to comment.