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

#include <transportgradientneumann.h>

Inheritance diagram for oofem::TransportGradientNeumann:
Collaboration diagram for oofem::TransportGradientNeumann:

Public Member Functions

 TransportGradientNeumann (int n, Domain *d)
int giveNumberOfInternalDofManagers () override
 Gives the number of internal dof managers.
DofManagergiveInternalDofManager (int i) override
 Gives an internal dof manager from receiver.
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.
bcType giveType () const override
void scale (double s) override
double domainSize ()
void assembleVector (FloatArray &answer, TimeStep *tStep, CharType type, ValueModeType mode, const UnknownNumberingScheme &s, FloatArray *eNorm=nullptr, void *lock=nullptr) override
void assemble (SparseMtrx &answer, TimeStep *tStep, CharType type, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s, double scale=1.0, void *lock=nullptr) override
void giveLocationArrays (std ::vector< IntArray > &rows, std ::vector< IntArray > &cols, CharType type, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s) override
const char * giveClassName () const override
const char * giveInputRecordName () const override
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)
virtual ~ActiveBoundaryCondition ()
 Destructor.
virtual void addElementSide (int elem, int side)
virtual bool requiresActiveDofs ()
virtual bool isPrimaryDof (ActiveDof *dof)
virtual double giveBcValue (Dof *dof, ValueModeType mode, TimeStep *tStep)
virtual bool hasBc (Dof *dof, TimeStep *tStep)
virtual int giveNumberOfMasterDofs (ActiveDof *dof)
virtual DofgiveMasterDof (ActiveDof *dof, int mdof)
virtual void computeDofTransformation (ActiveDof *dof, FloatArray &masterContribs)
virtual double giveUnknown (PrimaryField &field, ValueModeType mode, TimeStep *tStep, ActiveDof *dof)
virtual double giveUnknown (ValueModeType mode, TimeStep *tStep, ActiveDof *dof)
Public Member Functions inherited from oofem::GeneralBoundaryCondition
 GeneralBoundaryCondition (int n, Domain *d)
virtual ~GeneralBoundaryCondition ()
 Destructor.
int giveSetNumber () const
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 Member Functions

void computeEta ()
 Help function computes phi by solving a diffusion problem on the RVE-surface.
void integrateTangent (FloatMatrix &oTangent, Element *e, int iBndIndex, int surfSet, int pos)
 Help function that integrates the tangent contribution from a single element boundary.

Protected Attributes

std ::unique_ptr< NodempFluxHom
 DOF-manager containing the unknown homogenized stress.
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).
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

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.

Note
Experimental code
Author
Mikael Öhman

Definition at line 61 of file transportgradientneumann.h.

Constructor & Destructor Documentation

◆ TransportGradientNeumann()

oofem::TransportGradientNeumann::TransportGradientNeumann ( int n,
Domain * d )

Member Function Documentation

◆ assemble()

void oofem::TransportGradientNeumann::assemble ( SparseMtrx & answer,
TimeStep * tStep,
CharType type,
const UnknownNumberingScheme & r_s,
const UnknownNumberingScheme & c_s,
double scale = 1.0,
void * lock = nullptr )
overridevirtual

Assembles B.C. contributions to specified matrix.

Parameters
[in,out]answerMatrix to assemble to.
tStepActive time step.
tStepActive time step.
typeType of matrix to assemble.
r_sRow numbering scheme.
c_sColumn numbering scheme.
scaleScaling factor.
omp_lockoptional OMP lock to ensure correct update of answer

Reimplemented from oofem::ActiveBoundaryCondition.

Definition at line 210 of file transportgradientneumann.C.

References oofem::SparseMtrx::assemble(), oofem::FloatMatrix::beTranspositionOf(), oofem::FEInterpolation::boundaryGiveNodes(), oofem::GeneralBoundaryCondition::dofs, oofem::Element::giveBoundaryLocationArray(), oofem::FEMComponent::giveDomain(), oofem::Element::giveGeometryType(), oofem::Element::giveInterpolation(), oofem::IntArray::giveSize(), integrateTangent(), mFluxIds, mpFluxHom, scale(), oofem::GeneralBoundaryCondition::set, surfSets, and oofem::FloatMatrix::times().

◆ assembleVector()

void oofem::TransportGradientNeumann::assembleVector ( FloatArray & answer,
TimeStep * tStep,
CharType type,
ValueModeType mode,
const UnknownNumberingScheme & s,
FloatArray * eNorms = nullptr,
void * lock = nullptr )
overridevirtual

◆ computeEta()

◆ computeField()

void oofem::TransportGradientNeumann::computeField ( FloatArray & flux,
TimeStep * tStep )
virtual

Definition at line 292 of file transportgradientneumann.C.

References mFluxIds, and mpFluxHom.

◆ computeTangent()

◆ domainSize()

◆ giveClassName()

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

Implements oofem::FEMComponent.

Definition at line 89 of file transportgradientneumann.h.

◆ giveFluxLocationArray()

void oofem::TransportGradientNeumann::giveFluxLocationArray ( IntArray & oCols,
const UnknownNumberingScheme & r_s )

Definition at line 428 of file transportgradientneumann.C.

References mFluxIds, and mpFluxHom.

◆ giveInputRecord()

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

Setups the input record string of receiver.

Parameters
inputDynamic input record to be filled by receiver.

Reimplemented from oofem::GeneralBoundaryCondition.

Definition at line 91 of file transportgradientneumann.C.

References _IFT_TransportGradientNeumann_gradient, mGradient, and oofem::DynamicInputRecord::setField().

◆ giveInputRecordName()

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

Implements oofem::FEMComponent.

Definition at line 90 of file transportgradientneumann.h.

References _IFT_TransportGradientNeumann_Name.

◆ giveInternalDofManager()

DofManager * oofem::TransportGradientNeumann::giveInternalDofManager ( int i)
overridevirtual

Gives an internal dof manager from receiver.

Reimplemented from oofem::GeneralBoundaryCondition.

Definition at line 107 of file transportgradientneumann.C.

References mpFluxHom.

◆ giveLocationArrays()

void oofem::TransportGradientNeumann::giveLocationArrays ( std ::vector< IntArray > & rows,
std ::vector< IntArray > & cols,
CharType type,
const UnknownNumberingScheme & r_s,
const UnknownNumberingScheme & c_s )
overridevirtual

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.

Parameters
rowsList of location arrays for r_s.
colsList of location arrays for c_s.
typeType of matrix to assemble.
r_sRow numbering scheme.
c_sColumn numbering scheme.

Reimplemented from oofem::ActiveBoundaryCondition.

Definition at line 253 of file transportgradientneumann.C.

References oofem::FEInterpolation::boundaryGiveNodes(), oofem::GeneralBoundaryCondition::dofs, oofem::Element::giveBoundaryLocationArray(), oofem::FEMComponent::giveDomain(), oofem::Element::giveGeometryType(), oofem::Element::giveInterpolation(), oofem::IntArray::giveSize(), mFluxIds, mpFluxHom, oofem::GeneralBoundaryCondition::set, and surfSets.

◆ giveNumberOfInternalDofManagers()

int oofem::TransportGradientNeumann::giveNumberOfInternalDofManagers ( )
inlineoverridevirtual

Gives the number of internal dof managers.

Reimplemented from oofem::GeneralBoundaryCondition.

Definition at line 66 of file transportgradientneumann.h.

◆ giveType()

bcType oofem::TransportGradientNeumann::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::GeneralBoundaryCondition.

Definition at line 73 of file transportgradientneumann.h.

References oofem::UnknownBT.

◆ initializeFrom()

void oofem::TransportGradientNeumann::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::ActiveBoundaryCondition.

Definition at line 77 of file transportgradientneumann.C.

References _IFT_TransportGradientNeumann_centerCoords, _IFT_TransportGradientNeumann_dispControl, _IFT_TransportGradientNeumann_gradient, _IFT_TransportGradientNeumann_surfSets, dispControl, oofem::InputRecord::hasField(), IR_GIVE_FIELD, IR_GIVE_OPTIONAL_FIELD, mCenterCoord, mGradient, and surfSets.

◆ integrateTangent()

void oofem::TransportGradientNeumann::integrateTangent ( FloatMatrix & oTangent,
Element * e,
int iBndIndex,
int surfSet,
int pos )
protected

◆ postInitialize()

void oofem::TransportGradientNeumann::postInitialize ( )
overridevirtual

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

Reimplemented from oofem::FEMComponent.

Definition at line 99 of file transportgradientneumann.C.

References computeEta(), and dispControl.

◆ scale()

void oofem::TransportGradientNeumann::scale ( double s)
overridevirtual

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

Parameters
sScale factor.

Reimplemented from oofem::GeneralBoundaryCondition.

Definition at line 112 of file transportgradientneumann.C.

References mGradient.

Referenced by assemble(), and integrateTangent().

Member Data Documentation

◆ dispControl

bool oofem::TransportGradientNeumann::dispControl
protected

Definition at line 103 of file transportgradientneumann.h.

Referenced by initializeFrom(), and postInitialize().

◆ eta

std :: vector< std :: vector< FloatArray > > oofem::TransportGradientNeumann::eta
protected

Scaling factor (one array per edge with one scaling factor per GP).

Definition at line 108 of file transportgradientneumann.h.

Referenced by computeEta(), and integrateTangent().

◆ mCenterCoord

FloatArray oofem::TransportGradientNeumann::mCenterCoord
protected

Definition at line 102 of file transportgradientneumann.h.

Referenced by computeEta(), computeTangent(), and initializeFrom().

◆ mFluxIds

IntArray oofem::TransportGradientNeumann::mFluxIds
protected

◆ mGradient

FloatArray oofem::TransportGradientNeumann::mGradient
protected

Definition at line 101 of file transportgradientneumann.h.

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

◆ mpFluxHom

std :: unique_ptr< Node > oofem::TransportGradientNeumann::mpFluxHom
protected

DOF-manager containing the unknown homogenized stress.

Definition at line 99 of file transportgradientneumann.h.

Referenced by assemble(), assembleVector(), computeField(), computeTangent(), giveFluxLocationArray(), giveInternalDofManager(), giveLocationArrays(), and TransportGradientNeumann().

◆ surfSets

IntArray oofem::TransportGradientNeumann::surfSets
protected

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