38 using Grid =
typename CartesianSolver::Grid;
39 using GridProxy =
typename CartesianSolver::GridProxy;
42 using CartesianSolver::domainId;
43 using CartesianSolver::domainOffset;
44 using CartesianSolver::grid;
45 using CartesianSolver::haloCell;
46 using CartesianSolver::haloCellId;
47 using CartesianSolver::m_bandWidth;
48 using CartesianSolver::m_freeIndices;
49 using CartesianSolver::m_innerBandWidth;
50 using CartesianSolver::m_Ma;
51 using CartesianSolver::m_outerBandWidth;
52 using CartesianSolver::m_Re;
53 using CartesianSolver::m_residualInterval;
54 using CartesianSolver::m_restartFile;
55 using CartesianSolver::m_restartInterval;
56 using CartesianSolver::m_solutionInterval;
57 using CartesianSolver::m_solverId;
58 using CartesianSolver::maxLevel;
59 using CartesianSolver::maxNoGridCells;
60 using CartesianSolver::maxUniformRefinementLevel;
61 using CartesianSolver::minLevel;
62 using CartesianSolver::mpiComm;
63 using CartesianSolver::neighborDomain;
64 using CartesianSolver::noDomains;
65 using CartesianSolver::noHaloCells;
66 using CartesianSolver::noNeighborDomains;
67 using CartesianSolver::noWindowCells;
68 using CartesianSolver::outputDir;
69 using CartesianSolver::reductionFactor;
70 using CartesianSolver::restartDir;
71 using CartesianSolver::solverId;
72 using CartesianSolver::solverMethod;
73 using CartesianSolver::updateDomainInfo;
74 using CartesianSolver::windowCell;
75 using CartesianSolver::windowCellId;
93 return m_cells.hasProperty(cellId, SolverCell::IsWindow);
146 return m_cells.nodalStrains(cellId, node, dir);
151 return m_cells.nodalStrains(cellId, node, dir);
158 return m_cells.elementStrains(cellId, dir) - epsVol;
160 return m_cells.elementStrains(cellId, dir);
167 return m_cells.nodalStrains(cellId, node, dir) - epsVol;
169 return m_cells.nodalStrains(cellId, node, dir);
180 return m_cells.nodalStresses(cellId, node, dir);
185 return m_cells.nodalStresses(cellId, node, dir);
192 return m_cells.elementStresses(cellId, dir) - hsp;
194 return m_cells.elementStresses(cellId, dir);
201 return m_cells.nodalStresses(cellId, node, dir) - hsp;
203 return m_cells.nodalStresses(cellId, node, dir);
211 return m_cells.hasProperty(cellId, p);
269 return grid().cellLengthAtLevel(level);
275 return grid().tree().coordinate(gCellId, dim);
281 return grid().neighborList(cellId, dir);
287 return grid().neighborList(cellId, dir);
293 return static_cast<MInt>(
grid().neighborList(cellId, dir) > -1);
300 return m_cells.hasProperty(cellId, SolverCell::IsHalo);
324 return grid().raw().findContainingLeafCell(point,
nullptr,
solverId());
332 return (epsV * F1B3);
336 MFloat hydrostaticPressure = F0;
338 hydrostaticPressure += stresses[d];
340 return (hydrostaticPressure * F1B3);
396 const MFloat* subCellCoord);
406 const MFloat* subCellCoord =
nullptr);
453 MInt* recalcIdTree)
override;
457 m_log <<
"Called LsCartesianSolver::resetExternalSources without Implementation" << std::endl;
460 m_log <<
"Called LsCartesianSolver::exchangeExternalSources without Implementation" << std::endl;
GridCell
Grid cell Property Labels.
This class represents a structure solver using the Finite Cell Method.
void allocateNodeVectors()
maia::fc::cell::BitsetType::reference a_hasProperty(const MInt cellId, const SolverCell p)
Returns solver cell property p of the cell cellId.
MFloat a_nodalStrains(const MInt cellId, const MInt node, const MInt dir) const
Returns the nodal strains dir from the stain matrix of node node of cell cellId.
void solveSystemOfEquations()
static constexpr MInt nDim
MBool a_hasProperty(const MInt cellId, const Cell p) const
Returns property p of the cell cellId.
MFloat a_dGamma(const MInt cellId, const MInt node) const
Returns delta gamma of node node of the cell cellId.
void solveMatrixIteratively(MFloat *A_coeff, MInt **pos, const MInt n)
void resetExternalSources()
void updateCellCollectorFromGrid()
typename maia::grid::tree::Tree< nDim >::Cell Cell
MBool a_hasProperty(const MInt cellId, const SolverCell p) const
Returns solver cell property p of the cell cellId.
MFloat a_alpha(const MInt cellId) const
Returns alpha of the cell cellId.
MInt a_nodeIdsLocal(const MInt cellId, const MInt nodeDir) const
Returns node ids of the cell cellId.
MFloat & a_epsilonBarP(const MInt cellId, const MInt node)
Returns epsilon bar of node node of the cell cellId.
MFloat a_elementDevStresses(const MInt cellId, const MInt dir)
Returns the deviatoric stress dir from the stress matrix of the cell cellId.
typename CartesianSolver::GridProxy GridProxy
void initSolver() override
void postTimeStep() override
void setCellWeights(MFloat *solverCellWeight) override
Set cell weights.
MFloat * m_nodalLoadVector
void fillDisplacementVectorWithCoords()
void reIntAfterRestart(MBool doneRestart)
void saveRestartStrainsOnly(const MChar *fileName, const MChar *gridInputFileName, MInt *recalcIdTree=nullptr)
void getMaterialTensor(MFloatScratchSpace &C, const MInt pCellId, const MInt node=-1)
MFloat & a_dGamma(const MInt cellId, const MInt node)
Returns delta gamma of node node of the cell cellId.
void initJacobianMatrix()
void getStrainInterpolationMatrix(MFloatScratchSpace &Be, const MInt pCellId, const MFloat *z)
void saveSolverSolution(MBool forceOutput, const MBool finalTimeStep) override
MFloat * m_bndryMatCompressed
MFloat getHydrostaticPressure(const MFloat *stresses)
MFloat * m_totalNodalDisplacements
void createCompressedMatrix()
MInt a_bndId(const MInt cellId) const
Returns bndId of the cell cellId.
MInt a_maxSubCellLvl(const MInt cellId) const
Returns pRfnmnt of the cell cellId.
void computeAssembledSystemMatrix(MFloatScratchSpace &Ke, const MInt pCellId)
void createElementToNodeMappingGlobal()
void createElementToNodeMapping()
void exchangeVector(MFloat *vector)
void calcElementDisplacements()
MFloat a_nodalStresses(const MInt cellId, const MInt node, const MInt dir) const
Returns the nodal stress dir from the stress matrix of node node of cell cellId.
MFloat a_elementDevStrains(const MInt cellId, const MInt dir)
Returns the deviatoric strain dir from the strain matrix of the cell cellId.
MFloat a_elementStrains(const MInt cellId, const MInt dir) const
Returns the elment strain dir from the strain matrix of the cell cellId.
maia::fc::cell::BitsetType::reference a_isActive(const MInt cellId)
Returns isActive of the cell CellId.
void getInternalLoadsFromStresses()
MInt & a_pRfnmnt(const MInt cellId)
Returns pRfnmnt of the cell cellId.
void getStressesAtPoint(const MInt cellId, const MFloat *z, const MFloat *displ, MFloat *stresses)
MString m_fcInterpolationMethod
MInt & a_nodeIdsGlobal(const MInt cellId, const MInt nodeDir)
Returns node ids of the cell cellId.
void getDisplacementInterpolationMatrix(const MInt pCellId, const MFloat *z, MFloatScratchSpace &x)
MFloat m_analyticSolution
MFloat time() const override
Return number of variables.
MInt c_parentId(const MInt cellId) const
void getNodalStiffnessMatrix(const MInt pCellId, const MInt node, MFloatScratchSpace &Ke, MInt *nodePos, MFloat *z, MFloat determinant, const MFloat alpha, const MInt subCellLevel)
std::map< std::pair< MInt, MInt >, MFloat > m_globalBndryMatrix
Geometry< nDim > * m_geometry
void resetDisplacements(const MInt mode=-1)
MFloat & a_nodalStrains(const MInt cellId, const MInt node, const MInt dir)
Returns the nodal strains dir from the stain matrix of node node of cell cellId.
MFloat getVolumetricStrains(const MFloat *strains)
GeometryIntersection< nDim > * m_geometryIntersection
static constexpr MInt m_noStrains
void a_resetPropertiesSolver(const MInt cellId)
MFloat & a_elementStrains(const MInt cellId, const MInt dir)
Returns the element strain dir from the stain matrix of the cell cellId.
MFloat & a_alpha(const MInt cellId)
Returns alpha of the cell cellId.
void calculateStiffnessMatrix()
MFloat & a_invJacobian(const MInt cellId)
Returns inverse Jacobian of the cell cellId.
void getCoordinatesOfNode(MInt node, MInt cell, MFloat *coordinates)
MBool a_isBndryCell(const MInt cellId) const
Returns isBndryCell of the cell CellId.
MInt c_noChildren(const MInt cellId) const
void resetLoadVector(const MInt mode=-1)
MInt a_nodeIdsGlobal(const MInt cellId, const MInt nodeDir) const
Returns node ids of the cell cellId.
constexpr const Geom & geometry() const
Access the solver's geometry.
MInt m_totalNoNodesGlobal
void interpolateGeometry(const MInt pCellId, const MFloat *x, MFloat *z)
void correctGlobalNodeIds()
MFloat & a_elementDispl(const MInt cellId, const MInt dir)
Returns the displacement dir of the cell cellId.
Geom & geometry()
Access the solver's geometry (non-const version)
MFloat a_nodePosition(const MInt cellId, const MInt dir) const
Returns the element dir from the legendre points of the cell cellId.
MBool a_needsSubCells(const MInt cellId) const
Returns needsSubCells of the cell CellId.
MFloat * m_externalLoadVector
MFloat a_elementDispl(const MInt cellId, const MInt dir) const
Returns the element displacement dir of the cell cellId.
void getStrainsAtPoint(const MInt cellId, const MFloat *z, const MFloat *displ, MFloat *strains)
MFloat c_cellLengthAtLevel(const MInt level) const
FcBndryCnd< nDim > * m_bndryCnd
MInt c_childId(const MInt cellId, const MInt childNumber) const
void transformToLocal(const MInt pCellId, const MFloat *z, MFloat *x)
MInt c_noCells() const
Returns the number of grid-cells.
void exchangeExternalSources()
MInt c_neighborId(const MInt cellId, const MInt dir) const
Returns the neighbor id of the cell cellId for direction dir.
std::map< std::pair< MInt, MInt >, MFloat > m_globalStiffnessMatrix
maia::fc::cell::BitsetType::reference a_isHalo(const MInt cellId)
void reorderLocalNodeIds()
void exchangeNodeIds(MInt currentDomain)
void updateLoadVector(const MFloat lambda=F1)
void computeAssembledBndryMatrix(MFloatScratchSpace &Bndry, const MInt pCellId)
MBool solutionStep() override
void finalizeInitSolver() override
MBool a_isWindow(const MInt cellId) const
Returns isInterface of the cell CellId.
void interpolateSubCellGeometry(const MInt pCellId, const MFloat *z, MFloat *x, const MInt subCellLevel, const MFloat *subCellCoord)
typename CartesianSolver::Grid Grid
void updateDisplacements()
maia::fc::cell::BitsetType::reference a_wasActive(const MInt cellId)
Returns isActive of the cell CellId.
MInt & a_bndId(const MInt cellId)
Returns bndId of the cell cellId.
void writeRestartFile(const MBool writeRestart, const MBool writeBackup, const MString gridFileName, MInt *recalcIdTree) override
typename maia::CartesianSolver< nDim, FcSolver > CartesianSolver
MInt & a_maxSubCellLvl(const MInt cellId)
Returns pRfnmnt of the cell cellId.
MFloat * m_reactionForceVector
MFloat a_nodalDevStresses(const MInt cellId, const MInt node, const MInt dir)
Returns the nodal deviatoric stress dir from the stress matrix of node node of cell cellId.
void getDerivativeOfDisplacementInterpolationMatrix(const MInt pCellId, const MFloat *z, MFloatScratchSpace &x)
MInt & a_noNodes(const MInt cellId)
Returns number of elements of the cell cellId.
MBool m_solveSoEIteratively
MInt ** m_compressionIndexSys
MFloat * m_nodalDisplacements
maia::fc::cell::BitsetType::reference a_isWindow(const MInt cellId)
Returns isInterface of the cell CellId.
MInt * m_globalNodeIdOffsets
MInt c_globalId(const MInt cellId) const
MInt a_hasNeighbor(const MInt cellId, const MInt dir) const
Returns noNeighborIds of the cell CellId for direction dir.
void calcElementStrains()
MInt c_level(const MInt cellId) const
void getElementMatrix(MFloatScratchSpace &Ke, const MInt pCellId, const MFloat alpha, const MInt subCellLevel, const MFloat *subCellCoord=nullptr)
MFloat & a_nodePosition(const MInt cellId, const MInt dir)
Returns the element dir from the legendre points of the cell cellId.
maia::fc::collector::FcCellCollector< nDim > m_cells
Collector for Fc cells.
MBool a_wasActive(const MInt cellId) const
Returns isActive of the cell CellId.
static constexpr const MInt m_noDirs
MInt & c_neighborId(const MInt cellId, const MInt dir)
Returns the neighbor id of the cell cellId for direction dir.
MInt noInternalCells() const override
Return the number of internal cells within this solver.
MBool a_isHalo(const MInt cellId) const
MFloat & a_poissonRatio(const MInt cellId)
Returns poisson Ratio of the cell cellId.
void preTimeStep() override
MFloat a_epsilonBarP(const MInt cellId, const MInt node) const
Returns epsilon bar of node node of the cell cellId.
void interpolateGeometryDebug(const MInt pCellId, const MFloat *z, MFloat *x)
MInt & a_nodeIdsLocal(const MInt cellId, const MInt nodeDir)
Returns node ids of the cell cellId.
const MFloat & c_coordinate(const MInt gCellId, const MInt dim) const
Returns the coordinate of the cell cellId for direction dim.
MBool isActive() const override
void setIntegrationWeights()
MFloat & a_elementStresses(const MInt cellId, const MInt dir)
Returns the element stress dir from the stress matrix of the cell cellId.
void getStrainInterpolationMatrixDebug(const MInt pCellId, const MFloat *z, MFloatScratchSpace &strain_lagrange)
MInt getIdAtPoint(const MFloat *point, MBool NotUsed(globalUnique=false))
MInt a_noNodes(const MInt cellId) const
Returns number of elements of the cell cellId.
void lagrangianPointsJacobi(const MInt pCellId, const MFloat *z, MFloatScratchSpace &x)
void getDisplacementInterpolationMatrixDebug(const MInt pCellId, const MFloat *z, MFloatScratchSpace &L_coef_lagrange)
MBool a_isActive(const MInt cellId) const
Returns isActive of the cell CellId.
std::map< std::pair< MInt, MInt >, MFloat > m_finalGlobalMatrix
MFloat & a_nodalStresses(const MInt cellId, const MInt node, const MInt dir)
Returns the nodal stress dir from the stress matrix of node node of cell cellId.
MFloat a_poissonRatio(const MInt cellId) const
Returns poisson Ratio of the cell cellId.
maia::fc::cell::BitsetType::reference a_needsSubCells(const MInt cellId)
Returns needsSubCells of the cell CellId.
void getDisplacementsAtPoint(const MInt cellId, const MFloat *z, const MFloat *displ, MFloat *result)
void calcElementStresses()
MInt a_pRfnmnt(const MInt cellId) const
Returns pRfnmnt of the cell cellId.
void solveMatrixIterativelyPreCon(MFloat *A_coeff, MInt **pos, const MInt n, const MInt m, MFloat *b, MFloat *x)
MFloat c_cellLengthAtCell(const MInt cellId) const
MFloat a_invJacobian(const MInt cellId) const
Returns inverse Jacobian of the cell cellId.
MInt ** m_compressionIndexBndry
void getJacobiMatrixDebug(const MInt pCellId, const MFloat *z, MFloatScratchSpace &jacobi_lagrange)
MBool prepareRestart(MBool writeRestart, MBool &writeGridRestart) override
Prepare the solvers for a grid-restart.
MFloat a_jacobianMatrix(const MInt cellId) const
MFloat * m_internalLoadVector
MBool m_adaptationSinceLastRestart
MBool m_adaptationSinceLastSolution
MFloat * m_sysMatCompressed
MFloat a_nodalDevStrains(const MInt cellId, const MInt node, const MInt dir)
Returns the nodal deviatoric strain dir from the strain matrix of node node of cell cellId.
MFloat a_elementStresses(const MInt cellId, const MInt dir) const
Returns the element stress dir from the stress matrix of the cell cellId.
void assembleFinalMatrix()
maia::fc::cell::BitsetType::reference a_isBndryCell(const MInt cellId)
Returns isBndryCell of the cell CellId.
MBool c_isLeafCell(const MInt cellId) const
This class is a ScratchSpace.
MInt solverId() const
Return the solverId.
MString gridInputFileName() const
constexpr GridProxy & grid() const
Class that represents FC cell collector.
FcCell
FC cell Property Labels.
std::basic_string< char > MString
LB lattice descriptor for arrays depending on D.