57template<typename T, typename PARTICLETYPE, bool multiOutput=access::providesParallelization<PARTICLETYPE>()>
62 clout <<
"================================================" << std::endl;
64 typedef std::function<bool(
const std::type_info&,
int,std::string)> FunctionType;
65 FunctionType printFunction = [](
const std::type_info& typeInfo,
int fieldSize, std::string fieldContentStr) {
67 clout << std::setw(45) << std::string(typeInfo.name()) <<
" (" << fieldSize <<
") : " << fieldContentStr << std::endl;
72 printFunction, dynamicFieldGroups, iP );
73 clout <<
"================================================" << std::endl;
79template<typename T, typename PARTICLETYPE, bool multiOutput=access::providesParallelization<PARTICLETYPE>()>
82 using namespace descriptors;
83 constexpr unsigned D = PARTICLETYPE::d;
86 Vector<T,D> position( particle.template getField<GENERAL,POSITION>() );
87 Vector<T,D> velocity( particle.template getField<MOBILITY,VELOCITY>() );
88 Vector<T,Drot> angularVelocity( particle.template getField<MOBILITY,ANG_VELOCITY>() );
89 Vector<T,Drot> angle( particle.template getField<SURFACE,ANGLE>() );
90 auto indicatorPtr = particle.template getField<SURFACE,SINDICATOR>();
94 clout <<
"================================================" << std::endl;
95 clout <<
"Position(m)= " << std::setw(13) << position << std::endl;
96 clout <<
"Velocity(m/s)= " << std::setw(13) << velocity << std::endl;
97 clout <<
"Ang. Velocity(m/s)= " << std::setw(13) << angularVelocity << std::endl;
98 clout <<
"Angle(rad)= " << std::setw(13) << angle << std::endl;
99 clout <<
"Indi Pos= " << std::setw(13) << indicatorPtr->getPos() << std::endl;
100 clout <<
"Indi Min= " << std::setw(13) << indicatorPtr->getMin() << std::endl;
101 clout <<
"Indi Max= " << std::setw(13) << indicatorPtr->getMax() << std::endl;
102 clout <<
"================================================" << std::endl;
109template<typename T, typename PARTICLETYPE, bool multiOutput=access::providesParallelization<PARTICLETYPE>()>
114 using namespace descriptors;
115 using namespace access;
116 constexpr unsigned D = PARTICLETYPE::d;
120 std::size_t particleLocalID = particle.
getId();
121 const bool hasGlobalID = PARTICLETYPE::template providesNested<PARALLELIZATION,ID>();
122 auto indicatorPtr = particle.template getField<SURFACE,SINDICATOR>();
123 T sIndiCircumRadius = indicatorPtr->getCircumRadius();
124 T mass = particle.template getField<PHYSPROPERTIES,MASS>();
125 Vector<T,D> position( particle.template getField<GENERAL,POSITION>() );
126 Vector<T,D> velocity( particle.template getField<MOBILITY,VELOCITY>() );
127 Vector<T,Drot> angularVelocity( particle.template getField<MOBILITY,ANG_VELOCITY>() );
128 Vector<T,Drot> angle( particle.template getField<SURFACE,ANGLE>() );
129 Vector<T,D> force( particle.template getField<FORCING,FORCE>() );
130 Vector<T,D> acceleration( particle.template getField<MOBILITY,ACCELERATION_STRD>() );
131 Vector<T,Drot> angularAcceleration( particle.template getField<MOBILITY,ANG_ACC_STRD>() );
132 Vector<T,Drot> momentOfInertia( particle.template getField<PHYSPROPERTIES,MOFI>() );
136 angularVelocity *= (180/
M_PI);
137 angularAcceleration *= (180/
M_PI);
142 if constexpr(!hasGlobalID){
143 clout <<
"Particle " <<
"ID=" << particleLocalID;
145 std::size_t particleGlobalID = particle.template getField<PARALLELIZATION,ID>();
146 clout <<
"Particle " <<
"LokalID=" << particleLocalID <<
", GlobalID=" << particleGlobalID;
148 if constexpr(providesActive<PARTICLETYPE>()){
149 bool active = isActive(particle);
150 clout <<
" (" << (active ?
"active" :
"idle") <<
")";
153 clout <<
" |Circum radius(m)= " << std::setw(13) << sIndiCircumRadius << std::endl;
154 clout <<
" |Mass(kg)= " << std::setw(13) << mass << std::endl;
155 clout <<
" |Position(m)= " << strFormatVector<Vector<T,D>>(position) << std::endl;
156 clout <<
" |Angle(°)= " << strFormatVector<Vector<T,Drot>>(angle) << std::endl;
157 clout <<
" |Velocity(m/s)= " << strFormatVector<Vector<T,D>>(velocity) << std::endl;
158 clout <<
" |Ang. Velocity(°/s)= " << strFormatVector<Vector<T,Drot>>(angularVelocity) << std::endl;
159 clout <<
" |Force(N)= " << strFormatVector<Vector<T,D>>(force) << std::endl;
160 clout <<
" |Acceleration(m/s^2)= " << strFormatVector<Vector<T,D>>(acceleration) << std::endl;
161 clout <<
" |Ang. acc.(°/s^2)= " << strFormatVector<Vector<T,Drot>>(angularAcceleration) << std::endl;
162 clout <<
" |Moment of inertia(kg m^2)= " << strFormatVector<Vector<T,Drot>>(momentOfInertia) << std::endl;
166template<typename T, typename PARTICLETYPE, bool multiOutput=access::providesParallelization<PARTICLETYPE>()>
171 using namespace descriptors;
172 using namespace access;
173 constexpr unsigned D = PARTICLETYPE::d;
176 std::size_t particleLocalID = particle.
getId();
177 const bool hasGlobalID = PARTICLETYPE::template providesNested<PARALLELIZATION,ID>();
178 T radius = particle.template getField<PHYSPROPERTIES,RADIUS>();
179 T mass = particle.template getField<PHYSPROPERTIES,MASS>();
180 Vector<T,D> position( particle.template getField<GENERAL,POSITION>() );
181 Vector<T,D> velocity( particle.template getField<MOBILITY,VELOCITY>() );
182 Vector<T,D> force( particle.template getField<FORCING,FORCE>() );
187 if constexpr(!hasGlobalID){
188 clout <<
"Particle " <<
"ID=" << particleLocalID;
190 std::size_t particleGlobalID = particle.template getField<PARALLELIZATION,ID>();
191 clout <<
"Particle " <<
"LokalID=" << particleLocalID <<
", GlobalID=" << particleGlobalID;
193 if constexpr(providesActive<PARTICLETYPE>()){
194 bool active = isActive(particle);
195 clout <<
" (" << (active ?
"active" :
"idle") <<
")";
198 clout <<
" |Radius(m)= " << std::setw(13) << radius << std::endl;
199 clout <<
" |Mass(kg)= " << std::setw(13) << mass << std::endl;
200 clout <<
" |Position(m)= " << strFormatVector<Vector<T,D>>(position) << std::endl;
201 clout <<
" |Velocity(m/s)= " << strFormatVector<Vector<T,D>>(velocity) << std::endl;
202 clout <<
" |Force(N)= " << strFormatVector<Vector<T,D>>(force) << std::endl;
207template<typename T, typename PARTICLETYPE, bool multiOutput=access::providesParallelization<PARTICLETYPE>()>
210 using namespace descriptors;
211 constexpr unsigned D = PARTICLETYPE::d;
214 Vector<T,D> position( particle.template getField<GENERAL,POSITION>() );
215 Vector<T,D> velocity( particle.template getField<MOBILITY,VELOCITY>() );
216 bool activity( particle.template getField<DYNBEHAVIOUR,ACTIVE>() );
220 clout <<
"================================================" << std::endl;
221 clout <<
"Position(m)= " << std::setw(13) << position << std::endl;
222 clout <<
"Velocity(m/s)= " << std::setw(13) << velocity << std::endl;
223 clout <<
"Active= " << std::setw(13) << activity << std::endl;
224 clout <<
"================================================" << std::endl;