OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Imposes a prescribed gradient weakly on the boundary with a Neumann boundary condition. More...
#include <prescribedgradientbcneumann.h>
Public Member Functions | |
PrescribedGradientBCNeumann (int n, Domain *d) | |
virtual | ~PrescribedGradientBCNeumann () |
virtual int | giveNumberOfInternalDofManagers () |
Gives the number of internal dof managers. More... | |
virtual DofManager * | giveInternalDofManager (int i) |
Gives an internal dof manager from receiver. More... | |
virtual IRResultType | initializeFrom (InputRecord *ir) |
Initializes receiver according to object description stored in input record. More... | |
virtual void | giveInputRecord (DynamicInputRecord &input) |
virtual bcType | giveType () const |
virtual void | scale (double s) |
Scales the receiver according to given value. More... | |
virtual void | assembleVector (FloatArray &answer, TimeStep *tStep, CharType type, ValueModeType mode, const UnknownNumberingScheme &s, FloatArray *eNorm=NULL) |
Assembles B.C. More... | |
virtual void | assemble (SparseMtrx &answer, TimeStep *tStep, CharType type, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s, double scale=1.0) |
Assembles B.C. More... | |
virtual void | giveLocationArrays (std::vector< IntArray > &rows, std::vector< IntArray > &cols, CharType type, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s) |
Gives a list of location arrays that will be assembled. More... | |
virtual const char * | giveClassName () const |
virtual const char * | giveInputRecordName () const |
virtual void | computeField (FloatArray &sigma, TimeStep *tStep) |
Computes the homogenized, macroscopic, field (stress). More... | |
virtual void | computeTangent (FloatMatrix &tangent, TimeStep *tStep) |
Computes the macroscopic tangent for homogenization problems through sensitivity analysis. More... | |
void | giveStressLocationArray (IntArray &oCols, const UnknownNumberingScheme &r_s) |
Public Member Functions inherited from oofem::ActiveBoundaryCondition | |
ActiveBoundaryCondition (int n, Domain *d) | |
Constructor. More... | |
virtual | ~ActiveBoundaryCondition () |
Destructor. More... | |
virtual void | addElementSide (int elem, int side) |
Adds element for active boundary condition. More... | |
virtual bool | requiresActiveDofs () |
Checks to see if active boundary condition requires special DOFs. More... | |
virtual bool | isPrimaryDof (ActiveDof *dof) |
Checks to see if the dof is a primary DOF. More... | |
virtual double | giveBcValue (Dof *dof, ValueModeType mode, TimeStep *tStep) |
Returns the prescribed value of a dof (if any). More... | |
virtual bool | hasBc (Dof *dof, TimeStep *tStep) |
Returns the prescribed value of a dof (if any). More... | |
virtual int | giveNumberOfMasterDofs (ActiveDof *dof) |
Allows for active boundary conditions to handle their own special DOF. More... | |
virtual Dof * | giveMasterDof (ActiveDof *dof, int mdof) |
Give the pointer to master dof belonging to active DOF. More... | |
virtual void | computeDofTransformation (ActiveDof *dof, FloatArray &masterContribs) |
virtual double | giveUnknown (PrimaryField &field, ValueModeType mode, TimeStep *tStep, ActiveDof *dof) |
Computes the value of the dof. More... | |
virtual double | giveUnknown (ValueModeType mode, TimeStep *tStep, ActiveDof *dof) |
Computes the value of the dof. More... | |
Public Member Functions inherited from oofem::GeneralBoundaryCondition | |
GeneralBoundaryCondition (int n, Domain *d) | |
Constructor. More... | |
virtual | ~GeneralBoundaryCondition () |
Destructor. More... | |
int | giveSetNumber () |
Gives the set number which boundary condition is applied to. More... | |
Function * | giveTimeFunction () |
virtual bcValType | giveBCValType () const |
Returns receiver load type. More... | |
virtual bool | isImposed (TimeStep *tStep) |
Returns nonzero if receiver representing BC is imposed at given time, otherwise returns zero. More... | |
virtual const IntArray & | giveDofIDs () const |
Array with default dofs which b.c. More... | |
virtual bcGeomType | giveBCGeoType () const |
Returns geometry character of boundary condition. More... | |
virtual void | postInitialize () |
Performs post initialization steps. More... | |
virtual contextIOResultType | saveContext (DataStream &stream, ContextMode mode, void *obj=NULL) |
Stores receiver state to output stream. More... | |
virtual contextIOResultType | restoreContext (DataStream &stream, ContextMode mode, void *obj=NULL) |
Restores the receiver state previously written in stream. More... | |
Public Member Functions inherited from oofem::FEMComponent | |
FEMComponent (int n, Domain *d) | |
Regular constructor, creates component with given number and belonging to given domain. More... | |
virtual | ~FEMComponent () |
Virtual destructor. More... | |
Domain * | giveDomain () const |
virtual void | setDomain (Domain *d) |
Sets associated Domain. More... | |
int | giveNumber () const |
void | setNumber (int num) |
Sets number of receiver. More... | |
virtual void | updateLocalNumbering (EntityRenumberingFunctor &f) |
Local renumbering support. More... | |
virtual int | checkConsistency () |
Allows programmer to test some internal data, before computation begins. More... | |
virtual void | printOutputAt (FILE *file, TimeStep *tStep) |
Prints output of receiver to stream, for given time step. More... | |
virtual void | printYourself () |
Prints receiver state on stdout. Useful for debugging. More... | |
virtual Interface * | giveInterface (InterfaceType t) |
Interface requesting service. More... | |
std::string | errorInfo (const char *func) const |
Returns string for prepending output (used by error reporting macros). More... | |
Public Member Functions inherited from oofem::PrescribedGradientHomogenization | |
PrescribedGradientHomogenization () | |
virtual | ~PrescribedGradientHomogenization () |
virtual double | domainSize () |
void | setPrescribedGradient (const FloatMatrix &t) |
Set prescribed gradient. More... | |
void | setPrescribedGradientVoigt (const FloatArray &t) |
Sets the prescribed gradient from the matrix from given voigt notation. More... | |
void | giveGradientVoigt (FloatArray &oGradient) const |
Gives back the applied gradient in Voigt form. More... | |
void | setCenterCoordinate (FloatArray &x) |
Set the center coordinate for the prescribed values to be set for. More... | |
FloatArray & | giveCenterCoordinate () |
Returns the center coordinate. More... | |
Protected Member Functions | |
void | integrateTangent (FloatMatrix &oTangent, Element *e, int iBndIndex) |
Help function that integrates the tangent contribution from a single element boundary. More... | |
Protected Member Functions inherited from oofem::PrescribedGradientHomogenization | |
virtual double | domainSize (Domain *d, int set) |
Protected Attributes | |
std::unique_ptr< Node > | mpSigmaHom |
DOF-manager containing the unknown homogenized stress. More... | |
IntArray | mSigmaIds |
Protected Attributes inherited from oofem::GeneralBoundaryCondition | |
int | timeFunction |
Associated load time function. More... | |
bcValType | valType |
Physical meaning of BC value. More... | |
IntArray | dofs |
Dofs that b.c. is applied to (relevant for Dirichlet type b.c.s). More... | |
int | isImposedTimeFunction |
Zero by default - the BC is than always imposed. More... | |
int | set |
Set number for boundary condition to be applied to. More... | |
Protected Attributes inherited from oofem::FEMComponent | |
int | number |
Component number. More... | |
Domain * | domain |
Link to domain object, useful for communicating with other FEM components. More... | |
Protected Attributes inherited from oofem::PrescribedGradientHomogenization | |
FloatMatrix | mGradient |
Prescribed gradient . More... | |
FloatArray | mCenterCoord |
Center coordinate . More... | |
Imposes a prescribed gradient weakly on the boundary with a Neumann boundary condition.
Definition at line 55 of file prescribedgradientbcneumann.h.
oofem::PrescribedGradientBCNeumann::PrescribedGradientBCNeumann | ( | int | n, |
Domain * | d | ||
) |
Definition at line 56 of file prescribedgradientbcneumann.C.
References oofem::IntArray::followedBy(), oofem::Domain::giveNextFreeDofID(), oofem::Domain::giveNumberOfSpatialDimensions(), mpSigmaHom, and mSigmaIds.
|
virtual |
Definition at line 70 of file prescribedgradientbcneumann.C.
|
virtual |
Assembles B.C.
contributions to specified matrix.
[in,out] | answer | Matrix to assemble to. |
tStep | Active time step. | |
tStep | Active time step. | |
type | Type of matrix to assemble. | |
r_s | Row numbering scheme. | |
c_s | Column numbering scheme. | |
scale | Scaling factor. |
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 163 of file prescribedgradientbcneumann.C.
References oofem::SparseMtrx::assemble(), oofem::IntArray::at(), oofem::FloatMatrix::beTranspositionOf(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveElement(), oofem::Element::giveLocationArray(), oofem::Domain::giveSet(), oofem::IntArray::giveSize(), integrateTangent(), mpSigmaHom, mSigmaIds, oofem::FloatMatrix::negated(), OOFEM_LOG_DEBUG, and oofem::FloatMatrix::times().
|
virtual |
Assembles B.C.
contributions to specified vector.
[in,out] | answer | Vector to assemble to. |
tStep | Active time step. | |
type | Type of matrix to assemble. | |
mode | Mode of value. | |
s | Numbering scheme. | |
eNorms | Norms for each dofid. |
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 99 of file prescribedgradientbcneumann.C.
References oofem::FloatArray::assemble(), oofem::FloatArray::assembleSquared(), oofem::IntArray::at(), oofem::FloatArray::beProductOf(), oofem::FloatArray::beScaled(), oofem::FloatArray::beTProductOf(), oofem::Element::computeVectorOf(), oofem::PrescribedGradientHomogenization::domainSize(), oofem::Function::evaluateAtTime(), oofem::Set::giveBoundaryList(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveElement(), oofem::PrescribedGradientHomogenization::giveGradientVoigt(), oofem::Element::giveLocationArray(), oofem::Domain::giveSet(), oofem::GeneralBoundaryCondition::giveSetNumber(), oofem::IntArray::giveSize(), oofem::TimeStep::giveTargetTime(), oofem::GeneralBoundaryCondition::giveTimeFunction(), integrateTangent(), mpSigmaHom, mSigmaIds, and oofem::FloatArray::negated().
|
virtual |
Computes the homogenized, macroscopic, field (stress).
sigma | Output quantity (typically stress). |
tStep | Active time step. |
Implements oofem::PrescribedGradientHomogenization.
Definition at line 238 of file prescribedgradientbcneumann.C.
References mpSigmaHom, and mSigmaIds.
Referenced by oofem::GnuplotExportModule::outputBoundaryCondition().
|
virtual |
Computes the macroscopic tangent for homogenization problems through sensitivity analysis.
tangent | Output tangent. |
tStep | Active time step. |
Implements oofem::PrescribedGradientHomogenization.
Definition at line 244 of file prescribedgradientbcneumann.C.
References oofem::EngngModel::assemble(), oofem::IntArray::at(), oofem::FloatMatrix::beInverseOf(), oofem::FloatMatrix::beTProductOf(), oofem::FloatMatrix::beUnitMatrix(), oofem::classFactory, oofem::IntArray::contains(), oofem::ClassFactory::createSparseLinSolver(), oofem::ClassFactory::createSparseMtrx(), oofem::FEMComponent::domain, oofem::PrescribedGradientHomogenization::domainSize(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveEngngModel(), oofem::Domain::giveNumber(), oofem::GeneralBoundaryCondition::giveSetNumber(), oofem::IntArray::giveSize(), mpSigmaHom, mSigmaIds, oofem::FloatMatrix::negated(), OOFEM_ERROR, oofem::IntArray::resize(), oofem::ST_Petsc, and oofem::FloatMatrix::times().
|
inlinevirtual |
Implements oofem::PrescribedGradientHomogenization.
Definition at line 81 of file prescribedgradientbcneumann.h.
|
virtual |
Reimplemented from oofem::PrescribedGradientHomogenization.
Definition at line 82 of file prescribedgradientbcneumann.C.
References oofem::PrescribedGradientHomogenization::giveInputRecord(), and oofem::GeneralBoundaryCondition::giveInputRecord().
|
inlinevirtual |
Implements oofem::FEMComponent.
Definition at line 82 of file prescribedgradientbcneumann.h.
References _IFT_PrescribedGradientBCNeumann_Name.
|
virtual |
Gives an internal dof manager from receiver.
Reimplemented from oofem::GeneralBoundaryCondition.
Definition at line 89 of file prescribedgradientbcneumann.C.
References mpSigmaHom.
|
virtual |
Gives a list of location arrays that will be assembled.
This should only be used to construct zero structure in sparse matrices. The rows and columns location arrays returned in tuples (stored in vector), allowing to efficiently assemble and allocate off-diagonal blocks. The nonzero entries are assembled and allocated for entries at (rows[i], cols[i]) positions.
rows | List of location arrays for r_s. |
cols | List of location arrays for c_s. |
type | Type of matrix to assemble. |
r_s | Row numbering scheme. |
c_s | Column numbering scheme. |
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 201 of file prescribedgradientbcneumann.C.
References oofem::IntArray::at(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveElement(), oofem::Element::giveLocationArray(), oofem::Domain::giveSet(), oofem::IntArray::giveSize(), mpSigmaHom, mSigmaIds, and oofem::IntArray::resize().
|
inlinevirtual |
Gives the number of internal dof managers.
Reimplemented from oofem::GeneralBoundaryCondition.
Definition at line 61 of file prescribedgradientbcneumann.h.
void oofem::PrescribedGradientBCNeumann::giveStressLocationArray | ( | IntArray & | oCols, |
const UnknownNumberingScheme & | r_s | ||
) |
Definition at line 308 of file prescribedgradientbcneumann.C.
References mpSigmaHom, and mSigmaIds.
Referenced by oofem::LSPrimaryVariableMapper::mapPrimaryVariables().
|
inlinevirtual |
Reimplemented from oofem::GeneralBoundaryCondition.
Definition at line 67 of file prescribedgradientbcneumann.h.
References oofem::UnknownBT.
|
virtual |
Initializes receiver according to object description stored in input record.
This function is called immediately after creating object using constructor. Input record can be imagined as data record in component database belonging to receiver. Receiver may use value-name extracting functions to extract particular field from record.
ir | Input record to initialize from. |
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 75 of file prescribedgradientbcneumann.C.
References oofem::ActiveBoundaryCondition::initializeFrom(), and oofem::PrescribedGradientHomogenization::initializeFrom().
|
protected |
Help function that integrates the tangent contribution from a single element boundary.
Definition at line 313 of file prescribedgradientbcneumann.C.
References oofem::FloatMatrix::add(), oofem::FloatArray::at(), oofem::FloatMatrix::at(), oofem::FloatMatrix::beNMatrixOf(), oofem::FloatMatrix::beProductOf(), oofem::FEInterpolation::boundaryEvalN(), oofem::FEInterpolation::boundaryEvalNormal(), oofem::FEInterpolation::boundaryLocal2Global(), oofem::FloatMatrix::clear(), oofem::Element::computeLocalCoordinates(), oofem::FEInterpolation2d::computeLocalEdgeMapping(), oofem::FEMComponent::domain, oofem::FEInterpolation::giveBoundaryIntegrationRule(), oofem::FEMComponent::giveDomain(), oofem::Element::giveInterpolation(), oofem::FEInterpolation::giveInterpolationOrder(), oofem::Element::giveMaterialMode(), oofem::Domain::giveNumberOfSpatialDimensions(), oofem::Domain::hasXfemManager(), OOFEM_ERROR, oofem::XfemElementInterface::partitionEdgeSegment(), oofem::FloatMatrix::resize(), oofem::XfemElementInterface::XfemElementInterface_createEnrNmatrixAt(), and oofem::FloatMatrix::zero().
Referenced by assemble(), and assembleVector().
|
virtual |
Scales the receiver according to given value.
Typically used in nondimensional analysis to scale down BCs and ICs.
s | Scale factor. |
Reimplemented from oofem::GeneralBoundaryCondition.
Definition at line 94 of file prescribedgradientbcneumann.C.
References oofem::PrescribedGradientHomogenization::mGradient, and oofem::FloatMatrix::times().
|
protected |
DOF-manager containing the unknown homogenized stress.
Definition at line 91 of file prescribedgradientbcneumann.h.
Referenced by assemble(), assembleVector(), computeField(), computeTangent(), giveInternalDofManager(), giveLocationArrays(), giveStressLocationArray(), and PrescribedGradientBCNeumann().
|
protected |
Definition at line 92 of file prescribedgradientbcneumann.h.
Referenced by assemble(), assembleVector(), computeField(), computeTangent(), giveLocationArrays(), giveStressLocationArray(), and PrescribedGradientBCNeumann().