36#ifndef STOKESFLOWASSEMBLER_HPP_
37#define STOKESFLOWASSEMBLER_HPP_
39#include "AbstractContinuumMechanicsAssembler.hpp"
40#include "StokesFlowProblemDefinition.hpp"
64friend class TestStokesFlowAssembler;
114 c_vector<double, NUM_NODES_PER_ELEMENT>& rQuadPhi,
115 c_matrix<double, DIM, NUM_NODES_PER_ELEMENT>& rGradQuadPhi,
116 c_vector<double,DIM>& rX,
125 unsigned spatial_dim1 = index1%DIM;
126 unsigned node_index1 = (index1-spatial_dim1)/DIM;
130 unsigned spatial_dim2 = index2%DIM;
131 unsigned node_index2 = (index2-spatial_dim2)/DIM;
133 ret(index1,index2) += mu
135 * rGradQuadPhi(spatial_dim1, node_index2)
136 * rGradQuadPhi(spatial_dim2, node_index1);
138 for (
unsigned k=0; k<DIM; k++)
140 ret(index1,index2) += mu
141 * (spatial_dim1==spatial_dim2)
142 * rGradQuadPhi(k, node_index1)
143 * rGradQuadPhi(k, node_index2);
169 c_vector<double, NUM_NODES_PER_ELEMENT>& rQuadPhi,
170 c_matrix<double, DIM, NUM_NODES_PER_ELEMENT>& rGradQuadPhi,
171 c_vector<double, NUM_VERTICES_PER_ELEMENT>& rLinearPhi,
172 c_matrix<double, DIM, NUM_VERTICES_PER_ELEMENT>& rGradLinearPhi,
173 c_vector<double,DIM>& rX,
180 unsigned spatial_dim1 = index1%DIM;
181 unsigned node_index1 = (index1-spatial_dim1)/DIM;
185 ret(index1,index2) += -rGradQuadPhi(spatial_dim1, node_index1) * rLinearPhi(index2);
218 c_vector<double, NUM_NODES_PER_ELEMENT>& rQuadPhi,
219 c_matrix<double, DIM, NUM_NODES_PER_ELEMENT>& rGradQuadPhi,
220 c_vector<double,DIM>& rX,
229 unsigned spatial_dim = index%DIM;
230 unsigned node_index = (index-spatial_dim)/DIM;
232 ret(index) += body_force(spatial_dim) * rQuadPhi(node_index);
c_matrix< double, SPATIAL_BLOCK_SIZE_ELEMENTAL, PRESSURE_BLOCK_SIZE_ELEMENTAL > ComputeSpatialPressureMatrixTerm(c_vector< double, NUM_NODES_PER_ELEMENT > &rQuadPhi, c_matrix< double, DIM, NUM_NODES_PER_ELEMENT > &rGradQuadPhi, c_vector< double, NUM_VERTICES_PER_ELEMENT > &rLinearPhi, c_matrix< double, DIM, NUM_VERTICES_PER_ELEMENT > &rGradLinearPhi, c_vector< double, DIM > &rX, Element< DIM, DIM > *pElement)
static const unsigned NUM_NODES_PER_ELEMENT
c_matrix< double, SPATIAL_BLOCK_SIZE_ELEMENTAL, SPATIAL_BLOCK_SIZE_ELEMENTAL > ComputeSpatialSpatialMatrixTerm(c_vector< double, NUM_NODES_PER_ELEMENT > &rQuadPhi, c_matrix< double, DIM, NUM_NODES_PER_ELEMENT > &rGradQuadPhi, c_vector< double, DIM > &rX, Element< DIM, DIM > *pElement)
static const unsigned SPATIAL_BLOCK_SIZE_ELEMENTAL
StokesFlowProblemDefinition< DIM > * mpProblemDefinition
c_vector< double, SPATIAL_BLOCK_SIZE_ELEMENTAL > ComputeSpatialVectorTerm(c_vector< double, NUM_NODES_PER_ELEMENT > &rQuadPhi, c_matrix< double, DIM, NUM_NODES_PER_ELEMENT > &rGradQuadPhi, c_vector< double, DIM > &rX, Element< DIM, DIM > *pElement)
StokesFlowAssembler(AbstractTetrahedralMesh< DIM, DIM > *pMesh, StokesFlowProblemDefinition< DIM > *pProblemDefinition)
static const unsigned NUM_VERTICES_PER_ELEMENT
static const unsigned PRESSURE_BLOCK_SIZE_ELEMENTAL