OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Homogenization boundary condition that imposes a gradient weakly on the boundary with scaled Neumann boundary condition. More...
#include <transportgradientneumann.h>
Public Member Functions | |
TransportGradientNeumann (int n, Domain *d) | |
virtual | ~TransportGradientNeumann () |
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) |
Setups the input record string of receiver. More... | |
virtual void | postInitialize () |
Performs post initialization steps. More... | |
virtual bcType | giveType () const |
virtual void | scale (double s) |
Scales the receiver according to given value. More... | |
double | domainSize () |
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 &flux, TimeStep *tStep) |
virtual void | computeTangent (FloatMatrix &tangent, TimeStep *tStep) |
void | giveFluxLocationArray (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 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... | |
Protected Member Functions | |
void | computeEta () |
Help function computes phi by solving a diffusion problem on the RVE-surface. More... | |
void | integrateTangent (FloatMatrix &oTangent, Element *e, int iBndIndex, int surfSet, int pos) |
Help function that integrates the tangent contribution from a single element boundary. More... | |
Protected Attributes | |
std::unique_ptr< Node > | mpFluxHom |
DOF-manager containing the unknown homogenized stress. More... | |
IntArray | mFluxIds |
FloatArray | mGradient |
FloatArray | mCenterCoord |
bool | dispControl |
IntArray | surfSets |
std::vector< std::vector< FloatArray > > | eta |
Scaling factor (one array per edge with one scaling factor per GP) More... | |
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... | |
Homogenization boundary condition that imposes a gradient weakly on the boundary with scaled Neumann boundary condition.
The scaling is determined such that the is preserved while retaining the statistical properties.
Definition at line 61 of file transportgradientneumann.h.
oofem::TransportGradientNeumann::TransportGradientNeumann | ( | int | n, |
Domain * | d | ||
) |
Definition at line 58 of file transportgradientneumann.C.
References oofem::IntArray::followedBy(), oofem::Domain::giveNextFreeDofID(), oofem::Domain::giveNumberOfSpatialDimensions(), mFluxIds, and mpFluxHom.
|
virtual |
Definition at line 72 of file transportgradientneumann.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 200 of file transportgradientneumann.C.
References oofem::SparseMtrx::assemble(), oofem::FloatMatrix::beTranspositionOf(), oofem::FEInterpolation::boundaryGiveNodes(), oofem::GeneralBoundaryCondition::dofs, oofem::Element::giveBoundaryLocationArray(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveElement(), oofem::Element::giveInterpolation(), oofem::Domain::giveSet(), oofem::IntArray::giveSize(), integrateTangent(), mFluxIds, mpFluxHom, surfSets, 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 139 of file transportgradientneumann.C.
References oofem::FloatArray::assemble(), oofem::FloatArray::assembleSquared(), oofem::FloatArray::beProductOf(), oofem::FloatArray::beScaled(), oofem::FloatArray::beTProductOf(), oofem::FEInterpolation::boundaryGiveNodes(), oofem::Element::computeBoundaryVectorOf(), oofem::GeneralBoundaryCondition::dofs, domainSize(), oofem::Function::evaluateAtTime(), oofem::Set::giveBoundaryList(), oofem::Element::giveBoundaryLocationArray(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveElement(), oofem::Element::giveInterpolation(), oofem::Domain::giveSet(), oofem::IntArray::giveSize(), oofem::TimeStep::giveTargetTime(), oofem::GeneralBoundaryCondition::giveTimeFunction(), integrateTangent(), mFluxIds, mGradient, mpFluxHom, oofem::FloatArray::negated(), and surfSets.
|
protected |
Help function computes phi by solving a diffusion problem on the RVE-surface.
Definition at line 417 of file transportgradientneumann.C.
References oofem::FloatArray::beProductOf(), oofem::FEInterpolation::boundaryEvalNormal(), oofem::FEInterpolation::boundaryLocal2Global(), oofem::FEMComponent::domain, oofem::FloatArray::dotProduct(), eta, oofem::IntegrationRule::getIntegrationPoint(), oofem::FEInterpolation::giveBoundaryIntegrationRule(), oofem::Set::giveBoundaryList(), oofem::EngngModel::giveCurrentStep(), oofem::Element::giveDefaultIntegrationRulePtr(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveElement(), oofem::Domain::giveEngngModel(), oofem::Element::giveInterpolation(), oofem::FEInterpolation::giveInterpolationOrder(), oofem::Domain::giveSet(), oofem::IntArray::giveSize(), mCenterCoord, OOFEM_LOG_INFO, oofem::FloatMatrix::solveForRhs(), oofem::FloatArray::subtract(), and surfSets.
Referenced by postInitialize().
|
virtual |
Definition at line 275 of file transportgradientneumann.C.
|
virtual |
Definition at line 281 of file transportgradientneumann.C.
References oofem::EngngModel::assemble(), oofem::IntArray::at(), oofem::FloatArray::at(), oofem::FloatMatrix::at(), oofem::FloatMatrix::beInverseOf(), oofem::FloatMatrix::beTProductOf(), oofem::FloatMatrix::beTranspositionOf(), oofem::FEInterpolation::boundaryGiveNodes(), oofem::classFactory, oofem::FloatMatrix::computeFrobeniusNorm(), oofem::Element::computeVolumeAreaOrLength(), oofem::IntArray::contains(), oofem::ClassFactory::createSparseLinSolver(), oofem::ClassFactory::createSparseMtrx(), oofem::GeneralBoundaryCondition::dofs, oofem::FEMComponent::domain, domainSize(), oofem::Element::giveBoundaryLocationArray(), oofem::Domain::giveDofManagers(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveElement(), oofem::Domain::giveElements(), oofem::Domain::giveEngngModel(), oofem::Element::giveInterpolation(), oofem::Domain::giveNumber(), oofem::Domain::giveNumberOfSpatialDimensions(), oofem::Domain::giveSet(), oofem::IntArray::giveSize(), integrateTangent(), mCenterCoord, mFluxIds, mpFluxHom, oofem::FloatMatrix::negated(), NM_NoSuccess, OOFEM_ERROR, oofem::IntArray::resize(), oofem::FloatMatrix::resize(), oofem::ST_Petsc, surfSets, and oofem::FloatMatrix::times().
double oofem::TransportGradientNeumann::domainSize | ( | ) |
Definition at line 119 of file transportgradientneumann.C.
References oofem::FEMComponent::domain, oofem::FEInterpolation::evalNXIntegral(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveElement(), oofem::Element::giveInterpolation(), oofem::Domain::giveNumberOfSpatialDimensions(), oofem::Domain::giveSet(), oofem::IntArray::giveSize(), and surfSets.
Referenced by assembleVector(), and computeTangent().
|
inlinevirtual |
Implements oofem::FEMComponent.
Definition at line 90 of file transportgradientneumann.h.
void oofem::TransportGradientNeumann::giveFluxLocationArray | ( | IntArray & | oCols, |
const UnknownNumberingScheme & | r_s | ||
) |
Definition at line 411 of file transportgradientneumann.C.
|
virtual |
Setups the input record string of receiver.
input | Dynamic input record to be filled by receiver. |
Reimplemented from oofem::GeneralBoundaryCondition.
Definition at line 93 of file transportgradientneumann.C.
References _IFT_TransportGradientNeumann_gradient, mGradient, and oofem::DynamicInputRecord::setField().
|
inlinevirtual |
Implements oofem::FEMComponent.
Definition at line 91 of file transportgradientneumann.h.
References _IFT_TransportGradientNeumann_Name.
|
virtual |
Gives an internal dof manager from receiver.
Reimplemented from oofem::GeneralBoundaryCondition.
Definition at line 109 of file transportgradientneumann.C.
References mpFluxHom.
|
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 236 of file transportgradientneumann.C.
References oofem::FEInterpolation::boundaryGiveNodes(), oofem::GeneralBoundaryCondition::dofs, oofem::Element::giveBoundaryLocationArray(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveElement(), oofem::Element::giveInterpolation(), oofem::Domain::giveSet(), oofem::IntArray::giveSize(), mFluxIds, mpFluxHom, oofem::IntArray::resize(), and surfSets.
|
inlinevirtual |
Gives the number of internal dof managers.
Reimplemented from oofem::GeneralBoundaryCondition.
Definition at line 67 of file transportgradientneumann.h.
|
inlinevirtual |
Reimplemented from oofem::GeneralBoundaryCondition.
Definition at line 74 of file transportgradientneumann.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 77 of file transportgradientneumann.C.
References _IFT_TransportGradientNeumann_centerCoords, _IFT_TransportGradientNeumann_dispControl, _IFT_TransportGradientNeumann_gradient, _IFT_TransportGradientNeumann_surfSets, oofem::FloatArray::clear(), dispControl, oofem::InputRecord::hasField(), oofem::ActiveBoundaryCondition::initializeFrom(), IR_GIVE_FIELD, IR_GIVE_OPTIONAL_FIELD, mCenterCoord, mGradient, and surfSets.
|
protected |
Help function that integrates the tangent contribution from a single element boundary.
Definition at line 527 of file transportgradientneumann.C.
References oofem::FEInterpolation::boundaryEvalN(), oofem::FEInterpolation::boundaryEvalNormal(), oofem::FloatMatrix::clear(), eta, oofem::FEInterpolation::giveBoundaryIntegrationRule(), oofem::Element::giveInterpolation(), oofem::FEInterpolation::giveInterpolationOrder(), oofem::FloatMatrix::plusDyadUnsym(), and scale().
Referenced by assemble(), assembleVector(), and computeTangent().
|
virtual |
Performs post initialization steps.
Reimplemented from oofem::GeneralBoundaryCondition.
Definition at line 101 of file transportgradientneumann.C.
References computeEta(), dispControl, and oofem::GeneralBoundaryCondition::postInitialize().
|
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 114 of file transportgradientneumann.C.
References mGradient, and oofem::FloatArray::times().
Referenced by integrateTangent().
|
protected |
Definition at line 104 of file transportgradientneumann.h.
Referenced by initializeFrom(), and postInitialize().
|
protected |
Scaling factor (one array per edge with one scaling factor per GP)
Definition at line 109 of file transportgradientneumann.h.
Referenced by computeEta(), and integrateTangent().
|
protected |
Definition at line 103 of file transportgradientneumann.h.
Referenced by computeEta(), computeTangent(), and initializeFrom().
|
protected |
Definition at line 101 of file transportgradientneumann.h.
Referenced by assemble(), assembleVector(), computeField(), computeTangent(), giveFluxLocationArray(), giveLocationArrays(), and TransportGradientNeumann().
|
protected |
Definition at line 102 of file transportgradientneumann.h.
Referenced by assembleVector(), giveInputRecord(), initializeFrom(), and scale().
|
protected |
DOF-manager containing the unknown homogenized stress.
Definition at line 100 of file transportgradientneumann.h.
Referenced by assemble(), assembleVector(), computeField(), computeTangent(), giveFluxLocationArray(), giveInternalDofManager(), giveLocationArrays(), and TransportGradientNeumann().
|
protected |
Definition at line 106 of file transportgradientneumann.h.
Referenced by assemble(), assembleVector(), computeEta(), computeTangent(), domainSize(), giveLocationArrays(), and initializeFrom().