47StokesFlowVelocityHomogenization :: StokesFlowVelocityHomogenization(
int i,
EngngModel *_master) :
StokesFlow(i, _master)
53StokesFlowVelocityHomogenization :: giveAreaOfRVE()
55 auto min = this->
giveDomain(1)->giveDofManager(1)->giveCoordinates();
56 auto max = this->
giveDomain(1)->giveDofManager(1)->giveCoordinates();
58 for (
auto &node : this->
giveDomain(1)->giveDofManagers() ) {
59 min.beMinOf(
min, node->giveCoordinates() );
60 max.beMaxOf(
max, node->giveCoordinates() );
76 for (
auto &elem : this->
giveDomain(1)->giveElements() ) {
78 elem->computeVectorOf({V_u, V_v, V_w}, VM_Total, tStep, unknowns);
98 for (
int i = 0; i < nsd; ++i ) {
110 F.assemble(Fe, loc, col);
115 std :: unique_ptr< SparseLinearSystemNM > solver(
classFactory.createSparseLinSolver(
solverType, this->giveDomain(1),
this) );
117 H.
resize( F.giveNumberOfRows(), F.giveNumberOfColumns() );
123 std :: unique_ptr< SparseMtrx > Kff(
classFactory.createSparseMtrx( stype ) );
126 solver->solve(*Kff, F, H);
139 const FloatArray &lcoords = gp->giveNaturalCoordinates();
144 n2.
add(gp->giveWeight() * detJ, n);
147 N.beNMatrixOf(n2, this->
giveDomain(1)->giveNumberOfSpatialDimensions());
152StokesFlowVelocityHomogenization :: applyPressureGradient(
const FloatArray &grad)
158 for (
auto &bc : this->
giveDomain(1)->giveBcs() ) {
#define REGISTER_EngngModel(class)
void setDeadWeighComponents(FloatArray newComponents)
int giveNumber()
Returns domain number.
int giveNumberOfSpatialDimensions()
Returns number of spatial dimensions.
std ::vector< std ::unique_ptr< Element > > & giveElements()
virtual FEInterpolation * giveInterpolation() const
virtual IntegrationRule * giveDefaultIntegrationRulePtr()
virtual int giveNumberOfDomainEquations(int di, const UnknownNumberingScheme &num)
Domain * giveDomain(int n)
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
virtual double giveTransformationJacobian(const FloatArray &lcoords, const FEICellGeometry &cellgeo) const
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
void add(const FloatArray &src)
void resize(Index rows, Index cols)
void beTranspositionOf(const FloatMatrix &src)
void zero()
Zeroes all coefficient of receiver.
void beTProductOf(const FloatMatrix &a, const FloatMatrix &b)
void enumerate(int maxVal)
void integrateNMatrix(FloatMatrix &N, Element &elem, TimeStep *tStep)
LinSystSolverType solverType
Linear solver type.
StokesFlow(int i, EngngModel *_master=nullptr)
FloatArrayF< N > min(const FloatArrayF< N > &a, const FloatArrayF< N > &b)
FloatArrayF< N > assemble(const FloatArrayF< M > &x, int const (&c)[M])
Assemble components into zero matrix.
FloatArrayF< N > max(const FloatArrayF< N > &a, const FloatArrayF< N > &b)
ClassFactory & classFactory