Skip to content

Commit

Permalink
🎨 Format THM code
Browse files Browse the repository at this point in the history
  • Loading branch information
kks32 committed Apr 1, 2020
1 parent 948ff88 commit a25a9fc
Show file tree
Hide file tree
Showing 7 changed files with 189 additions and 250 deletions.
1 change: 0 additions & 1 deletion clang-tools/format.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/bash
find ../include/ -iname *.h -o -iname *.tcc | xargs clang-format -i
find ../src/ -iname *.h -o -iname *.cc | xargs clang-format -i
find ../tests/ -iname *.h -o -iname *.cc | xargs clang-format -i
24 changes: 8 additions & 16 deletions include/boundaryvalues.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ namespace EquationData {
template <int dim>
class PressureDirichletBoundaryValues : public Function<dim> {
public:
PressureDirichletBoundaryValues()
: Function<dim>()
, period(0.2)
{} // 之前的没有
PressureDirichletBoundaryValues()
: Function<dim>(), period(0.2) {} // 之前的没有
virtual double value(const Point<dim>& p,
const unsigned int component = 0) const; // boundary

Expand All @@ -41,10 +39,8 @@ double PressureDirichletBoundaryValues<dim>::value(
template <int dim>
class TemperatureDirichletBoundaryValues : public Function<dim> {
public:
TemperatureDirichletBoundaryValues()
: Function<dim>()
, period(0.2)
{} // 之前的没有
TemperatureDirichletBoundaryValues()
: Function<dim>(), period(0.2) {} // 之前的没有

virtual double value(const Point<dim>& p,
const unsigned int component = 0) const; // boundary
Expand Down Expand Up @@ -79,9 +75,7 @@ template <int dim>
class PressureNeumanBoundaryValues : public Function<dim> {
public:
PressureNeumanBoundaryValues()
: Function<dim>()
, period(0.2)
{} // 之前的没有
: Function<dim>(), period(0.2) {} // 之前的没有
virtual double value(const Point<dim>& p,
const unsigned int component = 0) const; // boundary

Expand All @@ -106,10 +100,8 @@ double PressureNeumanBoundaryValues<dim>::value(
template <int dim>
class TemperatureNeumanBoundaryValues : public Function<dim> {
public:
TemperatureNeumanBoundaryValues()
: Function<dim>()
, period(0.2)
{} // 之前的没有
TemperatureNeumanBoundaryValues()
: Function<dim>(), period(0.2) {} // 之前的没有
virtual double value(const Point<dim>& p,
const unsigned int component = 0) const; // boundary
// virtual void vector_value(const Point<dim>& p, //放在这里没啥用
Expand All @@ -129,7 +121,7 @@ double TemperatureNeumanBoundaryValues<dim>::value(

const double time = this->get_time();
return 0.; // boundary value is set to zero in
// this case
// this case
}

// template <int dim>
Expand Down
Loading

0 comments on commit a25a9fc

Please sign in to comment.