Skip to content

Commit 456d45e

Browse files
Merge branch 'develop'
2 parents 76cb0a6 + 4f66e69 commit 456d45e

File tree

5 files changed

+61
-30
lines changed

5 files changed

+61
-30
lines changed

examples/flow/locomotive_in_tunnel.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ int main(int argc, char* argv[])
9999
it is recommended to use the notation of the Boost::Units library). */
100100
asl::Parameter<FlT> dx(0.08, "dx", "space step", "m");
101101
asl::Parameter<FlT> dt(1., "dt", "time step", "s");
102-
asl::Parameter<FlT> nu(.001, "nu", "kinematic viscosity", "m^2 s^-1");
103-
asl::Parameter<unsigned int> iterations(20001, "iterations number", "");
102+
asl::Parameter<FlT> nu(.001, "nu", "kinematic viscosity", "m^2/s");
103+
asl::Parameter<unsigned int> iterations(20001, "iterations", "iterations number");
104104

105105
/* Load previously declared Parameters from command line and/or
106106
parameters file. Use default values if neither is provided. */
@@ -117,7 +117,7 @@ int main(int argc, char* argv[])
117117
// Define dimensionless viscosity value
118118
FlT nuNum(nu.v() * dt.v() / dx.v() / dx.v());
119119

120-
cout << "Data initialization..." << endl;
120+
cout << "Data initialization... " << flush;
121121

122122
// Read geometry of the locomotive from the file
123123
auto locomotive(asl::readSurface("locomotive.stl", bl));
@@ -137,7 +137,7 @@ int main(int argc, char* argv[])
137137

138138
cout << "Finished" << endl;
139139

140-
cout << "Numerics initialization..." << endl;
140+
cout << "Numerics initialization... " << flush;
141141

142142
// NOTE: the problem is considered in the reference frame related to the locomotive
143143

examples/flow/locomotive_stability.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ int main(int argc, char* argv[])
130130

131131

132132
std::cout << "Finished" << endl;
133-
std::cout << "Computing...";
133+
std::cout << "Computing..." << endl;
134134

135135
asl::WriterVTKXML writer("locomotive_stability");
136136
writer.addScalars("train", *object);

src/num/aslCrystalGrowthBC.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@
2929
#include <acl/aclMath/aclVectorOfElementsDef.h>
3030

3131

32-
namespace acl{
32+
namespace acl
33+
{
3334
class Kernel;
3435
typedef std::shared_ptr<Kernel> SPKernel;
3536
}
3637

37-
38-
3938
namespace asl
4039
{
4140
class PositionFunction;
4241
typedef std::shared_ptr<PositionFunction> SPPositionFunction;
4342

4443

45-
/// Bondary condition that makes gradient proportional to a surface concentration \ingroup BoundaryConditions
44+
/** Boundary condition that makes gradient proportional to a surface concentration
45+
\ingroup BoundaryConditions */
4646
class BCLinearGrowthMap:public BCondWithMap
4747
{
4848
public:
@@ -69,7 +69,7 @@ namespace asl
6969
virtual void init();
7070
};
7171

72-
/// Bondary condition that makes gradient proportional to a surface concentration
72+
/// Boundary condition that makes gradient proportional to a surface concentration
7373
/**
7474
\ingroup BoundaryConditions
7575
The boundary condition corresponds to different system with surface reaction.
@@ -143,7 +143,8 @@ namespace asl
143143
virtual void init();
144144
};
145145

146-
/// Bondary condition that makes gradient proportional to a surface concentration, second order \ingroup BoundaryConditions
146+
/** Boundary condition that makes gradient proportional to a surface concentration, second order
147+
\ingroup BoundaryConditions */
147148
class BCLinearGrowthMap2:public BCondWithMap
148149
{
149150
public:

src/num/aslLBGKBC.cxx

Lines changed: 48 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ namespace asl
5959
kernels[i].reset(new acl::Kernel(acl::KERNEL_BASIC));
6060
}
6161

62+
6263
void BCLBGKCommon::sortDirections()
6364
{
6465
sortTwoVectors(directions, indices);
@@ -74,7 +75,8 @@ namespace asl
7475
directionGroupsSizes[i]=directionGroupsSizes[i]<0 ? 0 : directionGroupsSizes[i];
7576
}
7677
}
77-
78+
79+
7880
void BCLBGKCommon::execute()
7981
{
8082
km->compute();
@@ -84,7 +86,8 @@ namespace asl
8486
BCNoSlip::BCNoSlip(SPLBGK nm):
8587
BCLBGKCommon(nm)
8688
{}
87-
89+
90+
8891
void BCNoSlip::init()
8992
{
9093

@@ -109,6 +112,7 @@ namespace asl
109112
km->setup();
110113
}
111114

115+
112116
BCConstantPressure::BCConstantPressure(SPLBGK nm, const acl::VectorOfElements & p):
113117
BCLBGKCommon(nm),
114118
pressure(p)
@@ -234,7 +238,7 @@ namespace asl
234238

235239
auto vGhost(subVE(fX->getEContainer(), i));
236240
int directionShift(block.c2i(templ->vectors[i]));
237-
auto vBulk(subVE(num->getF()->getEContainer(),
241+
auto vBulk(subVE(fX->getEContainer(),
238242
templ->invertVectors[i]));
239243
vBulk[0] = acl::generateShiftedElement(vBulk[0],directionShift);
240244
kk << (acl::assignmentSafe(vGhost, select(vGhost, vBulk, isBoundary, type)));
@@ -312,7 +316,7 @@ namespace asl
312316
{
313317
kk << (isBoundary = isComputationNode(i) );
314318
int directionShift(block.c2i(templ->vectors[i]));
315-
auto vBulk(subVE(num->getF()->getEContainer(),
319+
auto vBulk(subVE(fX->getEContainer(),
316320
templ->invertVectors[i]));
317321
vBulk[0] = acl::generateShiftedElement(vBulk[0],directionShift);
318322
auto w(templ->quasiparticlesCoefs[i]);
@@ -480,7 +484,7 @@ namespace asl
480484
{
481485
kk << (isBoundary = isComputationNode(i) );
482486
int directionShift(block.c2i(templ->vectors[i]));
483-
auto vBulk(subVE(num->getF()->getEContainer(),
487+
auto vBulk(subVE(fX->getEContainer(),
484488
templ->invertVectors[i]));
485489
vBulk[0] = acl::generateShiftedElement(vBulk[0],directionShift);
486490
auto w(templ->quasiparticlesCoefs[i]);
@@ -564,7 +568,7 @@ namespace asl
564568
{
565569
kk << (isBoundary = isComputationNode(i) );
566570
int directionShift(block.c2i(templ->vectors[i]));
567-
auto vBulk(subVE(num->getF()->getEContainer(),
571+
auto vBulk(subVE(fX->getEContainer(),
568572
templ->invertVectors[i]));
569573
vBulk[0] = acl::generateShiftedElement(vBulk[0],directionShift);
570574
auto w(templ->quasiparticlesCoefs[i]);
@@ -604,7 +608,7 @@ namespace asl
604608
SPDataWithGhostNodesACLData fF,
605609
SPAbstractDataWithGhostNodes map):
606610
BCondWithMap(map,nm->vectorTemplate),
607-
// kernel(new acl::Kernel(acl::KERNEL_SIMDUA)),//< Important _BASIC has better performance
611+
// kernel(new acl::Kernel(acl::KERNEL_SIMDUA)), //< Important _BASIC has better performance
608612
kernel(new acl::Kernel(acl::KERNEL_BASIC)),
609613
num(nm),
610614
fluxField(fF)
@@ -634,15 +638,15 @@ namespace asl
634638
unsigned int nDir(templ->vectors.size());
635639
auto & block(fX->getBlock());
636640

637-
kk<< (flux = acl::generateVEConstant(0));
641+
kk << (flux = acl::generateVEConstant(0));
638642
for(unsigned int i(1); i < nDir; ++i)
639643
{
640644
kk << (isBoundary0 = isGhostNode(0) && isComputationNode(i) );
641645
kk << (isBoundaryI = isGhostNode(i) && isComputationNode(0) );
642646

643647
auto f0(subVE(fX->getEContainer(), i));
644648
int directionShift(block.c2i(templ->vectors[i]));
645-
auto fI(subVE(num->getF()->getEContainer(),
649+
auto fI(subVE(fX->getEContainer(),
646650
templ->invertVectors[i]));
647651
fI[0] = acl::generateShiftedElement(fI[0],directionShift);
648652

@@ -664,7 +668,9 @@ namespace asl
664668
void ComputeSurfaceFluxMap::execute()
665669
{
666670
kernel->compute();
667-
}
671+
}
672+
673+
668674
ComputeSurfaceForceMap::ComputeSurfaceForceMap(SPLBGK nm,
669675
SPDataWithGhostNodesACLData fF,
670676
SPAbstractDataWithGhostNodes map):
@@ -676,6 +682,7 @@ namespace asl
676682
{
677683
}
678684

685+
679686
ComputeSurfaceForceMap::~ComputeSurfaceForceMap()
680687
{
681688
}
@@ -710,7 +717,7 @@ namespace asl
710717

711718
auto f0(subVE(fX->getEContainer(), i));
712719
int directionShift(block.c2i(templ->vectors[i]));
713-
auto fI(subVE(num->getF()->getEContainer(),
720+
auto fI(subVE(fX->getEContainer(),
714721
templ->invertVectors[i]));
715722
fI[0] = acl::generateShiftedElement(fI[0],directionShift);
716723
auto wc((templ->quasiparticlesCoefs[i]*AVec<double>(templ->vectors[i])));
@@ -741,8 +748,20 @@ namespace asl
741748
auto bc(make_shared<BCNoSlip>(nm));
742749
addSlices(*bc, sl);
743750
return bc;
751+
}
752+
753+
/*
754+
SPBCond generateBCNoSlipVel(SPLBGK nm,
755+
const std::vector<SlicesNames> & sl)
756+
{
757+
unsigned int nd(nD(nm->getVectorTemplate()->vectors[0]));
744758
759+
return generateBCConstantValueMiddlePoint(nm->getVelocity(),
760+
AVec<double>(nd,0.),
761+
sl,
762+
nearestNeigboursVT(nd));
745763
}
764+
*/
746765

747766
SPBCond generateBCConstantVelocity(SPLBGK nm,
748767
AVec<> v,
@@ -754,6 +773,7 @@ namespace asl
754773

755774
}
756775

776+
757777
SPBCond generateBCConstantPressure(SPLBGK nm,
758778
double p,
759779
const std::vector<SlicesNames> & sl)
@@ -764,6 +784,7 @@ namespace asl
764784

765785
}
766786

787+
767788
SPBCond generateBCConstantPressureVelocity(SPLBGK nm,
768789
double p,
769790
AVec<> v,
@@ -775,13 +796,15 @@ namespace asl
775796
addSlices(*bc, sl);
776797
return bc;
777798
}
778-
799+
800+
779801
SPNumMethod generateBCNoSlip(SPLBGK nm,
780802
SPAbstractDataWithGhostNodes map)
781803
{
782804
return make_shared<BCNoSlipMap>(nm,map);
783805
}
784806

807+
785808
SPNumMethod generateBCNoSlipVel(SPLBGK nm,
786809
SPAbstractDataWithGhostNodes map)
787810
{
@@ -792,6 +815,7 @@ namespace asl
792815
nm->vectorTemplate);
793816
}
794817

818+
795819
SPNumMethod generateBCNoSlipRho(SPLBGK nm,
796820
SPAbstractDataWithGhostNodes map)
797821
{
@@ -801,29 +825,33 @@ namespace asl
801825
map,
802826
nm->vectorTemplate);
803827
}
804-
828+
829+
805830
SPNumMethod generateBCVelocity(SPLBGK nm,
806831
SPPositionFunction v,
807832
SPAbstractDataWithGhostNodes map)
808833
{
809834
return make_shared<BCVelocityMap>(nm,v,map);
810835
}
811836

837+
812838
SPNumMethod generateBCVelocity(SPLBGK nm,
813839
SPPositionFunction v,
814840
SPAbstractDataWithGhostNodes map,
815841
SPAbstractDataWithGhostNodes computationalDomain)
816842
{
817843
return make_shared<BCVelocityMap>(nm,v,map,computationalDomain);
818844
}
819-
845+
846+
820847
SPNumMethod generateBCVelocityVel(SPLBGK nm,
821848
SPPositionFunction v,
822849
SPAbstractDataWithGhostNodes map)
823850
{
824851
return generateBCConstantValue(nm->getVelocity(), v, map);
825852
}
826-
853+
854+
827855
SPNumMethod generateBCConstantPressure(SPLBGK nm,
828856
double p,
829857
SPAbstractDataWithGhostNodes map)
@@ -833,6 +861,7 @@ namespace asl
833861

834862
}
835863

864+
836865
SPNumMethod generateBCConstantPressureVelocity(SPLBGK nm,
837866
double p,
838867
AVec<> v,
@@ -845,6 +874,7 @@ namespace asl
845874
return bc;
846875
}
847876

877+
848878
SPNumMethod generateBCTransportLimitedDeposition(SPLBGK nm,
849879
double p0,
850880
double limitingFactor,
@@ -857,6 +887,7 @@ namespace asl
857887
return bc;
858888
}
859889

890+
860891
SPNumMethod generateBCKineticsLimitedDeposition(SPLBGK nm,
861892
double p0,
862893
double limitingFactor,
@@ -880,14 +911,13 @@ namespace asl
880911
return a;
881912
}
882913

914+
883915
SPNumMethod generateComputeSurfaceForce(SPLBGK nm,
884916
SPDataWithGhostNodesACLData fF,
885917
SPAbstractDataWithGhostNodes map)
886918
{
887919
auto a(make_shared<ComputeSurfaceForceMap>(nm, fF, map));
888920
return a;
889921
}
890-
891-
892-
} // asl
893922

923+
} // asl

src/num/aslLSFacetedGrowth.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ namespace asl
5151
acl::VectorOfElements betaDislACL;
5252
public:
5353

54-
/// generates code which resullts the number corresponds to nearest direction
54+
/// generates code which results the number corresponds to nearest direction
5555
void directionCode(acl::VectorOfElements normal,
5656
acl::VectorOfElements direction,
5757
acl::VectorOfElements cosTheta,

0 commit comments

Comments
 (0)