OOFEM 3.0
Loading...
Searching...
No Matches
oofem::TransportGradientDirichlet Class Reference

#include <transportgradientdirichlet.h>

Inheritance diagram for oofem::TransportGradientDirichlet:
Collaboration diagram for oofem::TransportGradientDirichlet:

Public Member Functions

 TransportGradientDirichlet (int n, Domain *d)
void initializeFrom (InputRecord &ir) override
void giveInputRecord (DynamicInputRecord &input) override
void postInitialize () override
 Performs post initialization steps. Called after all components are created and initialized.
double give (Dof *dof, ValueModeType mode, double time) override
bcType giveType () const override
double domainSize ()
void computeCoefficientMatrix (FloatMatrix &C)
virtual void computeField (FloatArray &sigma, TimeStep *tStep)
virtual void computeTangent (FloatMatrix &tangent, TimeStep *tStep)
void computeXi ()
 Computes the offset values for "improved" Dirichlet. See class description.
void scale (double s) override
const char * giveClassName () const override
const char * giveInputRecordName () const override
Public Member Functions inherited from oofem::BoundaryCondition
 BoundaryCondition (int i, Domain *d)
virtual ~BoundaryCondition ()
 Destructor.
virtual double give (Dof *dof, ValueModeType mode, TimeStep *tStep)
void setPrescribedValue (double s)
void saveContext (DataStream &stream, ContextMode mode) override
void restoreContext (DataStream &stream, ContextMode mode) override
Public Member Functions inherited from oofem::GeneralBoundaryCondition
 GeneralBoundaryCondition (int n, Domain *d)
virtual ~GeneralBoundaryCondition ()
 Destructor.
int giveSetNumber () const
virtual int giveNumberOfInternalDofManagers ()
 Gives the number of internal dof managers.
virtual DofManagergiveInternalDofManager (int i)
 Gives an internal dof manager from receiver.
FunctiongiveTimeFunction ()
int getIsImposedTimeFunctionNumber () const
void setIsImposedTimeFunctionNumber (int funcIndx)
virtual bcValType giveBCValType () const
virtual bool isImposed (TimeStep *tStep)
virtual const IntArraygiveDofIDs () const
virtual bcGeomType giveBCGeoType () const
virtual double giveProperty (int aProperty, TimeStep *tStep) const
void saveContext (DataStream &stream, ContextMode mode) override
void restoreContext (DataStream &stream, ContextMode mode) override
virtual void updateYourself (TimeStep *tStep)
Public Member Functions inherited from oofem::FEMComponent
 FEMComponent (int n, Domain *d)
virtual ~FEMComponent ()=default
 Virtual destructor.
DomaingiveDomain () const
virtual void setDomain (Domain *d)
int giveNumber () const
void setNumber (int num)
virtual void updateLocalNumbering (EntityRenumberingFunctor &f)
virtual void initializeFrom (InputRecord &ir, int priority)
virtual void initializeFinish ()
virtual int checkConsistency ()
virtual void printOutputAt (FILE *file, TimeStep *tStep)
virtual void printYourself ()
 Prints receiver state on stdout. Useful for debugging.
virtual InterfacegiveInterface (InterfaceType t)
std::string errorInfo (const char *func) const
 Returns string for prepending output (used by error reporting macros).

Protected Attributes

FloatArray mGradient
FloatArray mCenterCoord
bool tractionControl = false
std ::map< int, FloatArrayxis
 Stores one "psi" value for each node.
IntArray surfSets
Protected Attributes inherited from oofem::BoundaryCondition
FloatArray values
 Prescribed values for each resp. dof.
Protected Attributes inherited from oofem::GeneralBoundaryCondition
int timeFunction
 Associated load time function.
bcValType valType
 Physical meaning of BC value.
IntArray dofs
 Dofs that b.c. is applied to (relevant for Dirichlet type b.c.s).
int isImposedTimeFunction
int set
 Set number for boundary condition to be applied to.
Protected Attributes inherited from oofem::FEMComponent
int number
 Component number.
Domaindomain
 Link to domain object, useful for communicating with other FEM components.

Detailed Description

Prescribes \( T = g_{i}(x_i-\bar{x}_i) \) where \( T \) are primary unknown. This is typical boundary condition in multiscale analysis where \( g = \partial_x T \) would be a macroscopic gradient at the integration point, i.e. this is a boundary condition for prolongation. It is also convenient to use when one wants to test a arbitrary specimen for a given average gradient.

Note
This class has optional support for the "psi" parameter, which is computed to improve the bounds for high permeable inclusions in a matrix. Using this parameter requires additional inputs, edgeSets and surfSets, which should be defined in the particular order. The numbering of the surface should be the same as for the hex cube interpolator as defined in the element reference manual.
Experimental code
Author
Mikael Öhman

Definition at line 73 of file transportgradientdirichlet.h.

Constructor & Destructor Documentation

◆ TransportGradientDirichlet()

oofem::TransportGradientDirichlet::TransportGradientDirichlet ( int n,
Domain * d )
inline

Member Function Documentation

◆ computeCoefficientMatrix()

void oofem::TransportGradientDirichlet::computeCoefficientMatrix ( FloatMatrix & C)

Constructs a coefficient matrix for all prescribed unknowns. Helper routine for computational homogenization.

Todo
Perhaps this routine should only give results for the dof it prescribes?
Parameters
CCoefficient matrix to fill.

Definition at line 170 of file transportgradientdirichlet.C.

References oofem::Dof::__givePrescribedEquationNumber(), oofem::FloatArray::at(), oofem::FloatMatrix::at(), oofem::GeneralBoundaryCondition::dofs, oofem::FEMComponent::domain, oofem::FEMComponent::giveDomain(), mCenterCoord, oofem::FloatMatrix::resize(), tractionControl, xis, and oofem::FloatMatrix::zero().

Referenced by computeField(), and computeTangent().

◆ computeField()

void oofem::TransportGradientDirichlet::computeField ( FloatArray & sigma,
TimeStep * tStep )
virtual

◆ computeTangent()

◆ computeXi()

void oofem::TransportGradientDirichlet::computeXi ( )

Computes the offset values for "improved" Dirichlet. See class description.

Todo
Preallocation(?)
Todo
Can't do this yet, problem with material model interface (doesn't know the GP material mode). This should be changed.
Note
We can use the single constraint, but this assumes flat surfaces
Todo
Preallocation
Todo
Can't do this yet, problem with material model interface (doesn't know the GP material mode). This should be changed.

Definition at line 341 of file transportgradientdirichlet.C.

References oofem::FloatArray::add(), oofem::FloatArray::assemble(), oofem::FloatMatrix::assemble(), oofem::FloatArray::at(), oofem::FloatMatrix::at(), oofem::IntArray::at(), oofem::FloatArray::beProductOf(), oofem::FloatMatrix::beProductOf(), oofem::FloatArray::beScaled(), oofem::FloatArray::beTProductOf(), oofem::FloatMatrix::beTranspositionOf(), oofem::FEInterpolation3d::boundaryEdgeGiveNodes(), oofem::FEInterpolation3d::boundaryEdgeGiveTransformationJacobian(), oofem::FEInterpolation3d::boundaryEvalN(), oofem::FEInterpolation3d::boundaryEvalNormal(), oofem::FEInterpolation3d::boundaryGiveNodes(), oofem::classFactory, oofem::IntArray::containsSorted(), oofem::FEMComponent::domain, oofem::FloatArray::dotProduct(), oofem::FEInterpolation3d::edgeEvaldNdxi(), oofem::IntArray::followedBy(), oofem::IntegrationRule::getIntegrationPoint(), oofem::FEInterpolation3d::giveBoundaryEdgeIntegrationRule(), oofem::FEInterpolation3d::giveBoundaryIntegrationRule(), oofem::Set::giveBoundaryList(), oofem::DofManager::giveCoordinates(), oofem::Element::giveDefaultIntegrationRulePtr(), oofem::FEMComponent::giveDomain(), oofem::Element::giveGeometryType(), oofem::Element::giveInterpolation(), oofem::FEInterpolation::giveInterpolationOrder(), oofem::Element::giveNode(), oofem::Set::giveNodeList(), oofem::FEMComponent::giveNumber(), oofem::FloatMatrix::giveNumberOfColumns(), oofem::FloatMatrix::giveNumberOfRows(), oofem::FloatArray::giveSize(), oofem::IntArray::giveSize(), oofem::IntArray::insertSortedOnce(), oofem::FloatMatrix::negated(), oofem::FloatArray::normalize(), OOFEM_LOG_INFO, oofem::FloatMatrix::plusDyadSymmUpper(), oofem::FloatMatrix::plusDyadUnsym(), oofem::FloatMatrix::plusProductSymmUpper(), oofem::IntArray::preallocate(), oofem::FloatArray::resize(), oofem::FloatMatrix::resize(), oofem::Set::setEdgeList(), oofem::ST_Petsc, oofem::FEInterpolation3d::surfaceEvaldNdx(), surfSets, oofem::FloatMatrix::symmetrized(), oofem::FloatArray::times(), and xis.

Referenced by postInitialize().

◆ domainSize()

◆ give()

double oofem::TransportGradientDirichlet::give ( Dof * dof,
ValueModeType mode,
double time )
overridevirtual

◆ giveClassName()

const char * oofem::TransportGradientDirichlet::giveClassName ( ) const
inlineoverridevirtual
Returns
Class name of the receiver.

Reimplemented from oofem::BoundaryCondition.

Definition at line 123 of file transportgradientdirichlet.h.

◆ giveInputRecord()

void oofem::TransportGradientDirichlet::giveInputRecord ( DynamicInputRecord & input)
overridevirtual

◆ giveInputRecordName()

const char * oofem::TransportGradientDirichlet::giveInputRecordName ( ) const
inlineoverridevirtual
Returns
Input record name of the receiver.

Reimplemented from oofem::BoundaryCondition.

Definition at line 124 of file transportgradientdirichlet.h.

References _IFT_TransportGradientDirichlet_Name.

◆ giveType()

bcType oofem::TransportGradientDirichlet::giveType ( ) const
inlineoverridevirtual
Returns
Type of boundary condition. It allows to distinguish BC according its mathematical meaning, ie. like Dirichlet, Neumann, or Newton type.

Reimplemented from oofem::BoundaryCondition.

Definition at line 93 of file transportgradientdirichlet.h.

References oofem::DirichletBT.

◆ initializeFrom()

void oofem::TransportGradientDirichlet::initializeFrom ( InputRecord & ir)
overridevirtual

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. Note that initializeFrom may be called mutiple times.

See also
IR_GIVE_FIELD
IR_GIVE_OPTIONAL_FIELD
Parameters
irInput record to initialize from.
priorityPriority of the input record. This is used to determine the order of initialization

Reimplemented from oofem::BoundaryCondition.

Definition at line 71 of file transportgradientdirichlet.C.

References _IFT_TransportGradientDirichlet_centerCoords, _IFT_TransportGradientDirichlet_gradient, _IFT_TransportGradientDirichlet_surfSets, _IFT_TransportGradientDirichlet_tractionControl, oofem::InputRecord::hasField(), IR_GIVE_FIELD, IR_GIVE_OPTIONAL_FIELD, mCenterCoord, mGradient, surfSets, and tractionControl.

◆ postInitialize()

void oofem::TransportGradientDirichlet::postInitialize ( )
overridevirtual

Performs post initialization steps. Called after all components are created and initialized.

Reimplemented from oofem::FEMComponent.

Definition at line 102 of file transportgradientdirichlet.C.

References computeXi(), and tractionControl.

◆ scale()

void oofem::TransportGradientDirichlet::scale ( double s)
inlineoverridevirtual

Scales the receiver according to given value. Typically used in nondimensional analysis to scale down BCs and ICs.

Parameters
sScale factor.

Reimplemented from oofem::BoundaryCondition.

Definition at line 121 of file transportgradientdirichlet.h.

References mGradient.

Member Data Documentation

◆ mCenterCoord

FloatArray oofem::TransportGradientDirichlet::mCenterCoord
protected

◆ mGradient

FloatArray oofem::TransportGradientDirichlet::mGradient
protected

Definition at line 76 of file transportgradientdirichlet.h.

Referenced by give(), giveInputRecord(), initializeFrom(), and scale().

◆ surfSets

IntArray oofem::TransportGradientDirichlet::surfSets
protected

◆ tractionControl

bool oofem::TransportGradientDirichlet::tractionControl = false
protected

◆ xis

std :: map< int, FloatArray > oofem::TransportGradientDirichlet::xis
protected

Stores one "psi" value for each node.

Definition at line 81 of file transportgradientdirichlet.h.

Referenced by computeCoefficientMatrix(), computeXi(), and give().


The documentation for this class was generated from the following files:

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011