OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::TransportGradientNeumann Class Reference

Homogenization boundary condition that imposes a gradient weakly on the boundary with scaled Neumann boundary condition. More...

#include <transportgradientneumann.h>

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

Public Member Functions

 TransportGradientNeumann (int n, Domain *d)
 
virtual ~TransportGradientNeumann ()
 
virtual int giveNumberOfInternalDofManagers ()
 Gives the number of internal dof managers. More...
 
virtual DofManagergiveInternalDofManager (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 DofgiveMasterDof (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...
 
FunctiongiveTimeFunction ()
 
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 IntArraygiveDofIDs () 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...
 
DomaingiveDomain () 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 InterfacegiveInterface (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< NodempFluxHom
 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...
 
Domaindomain
 Link to domain object, useful for communicating with other FEM components. More...
 

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

oofem::TransportGradientNeumann::TransportGradientNeumann ( int  n,
Domain d 
)
oofem::TransportGradientNeumann::~TransportGradientNeumann ( )
virtual

Definition at line 72 of file transportgradientneumann.C.

Member Function Documentation

void oofem::TransportGradientNeumann::assemble ( SparseMtrx answer,
TimeStep tStep,
CharType  type,
const UnknownNumberingScheme r_s,
const UnknownNumberingScheme c_s,
double  scale = 1.0 
)
virtual

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.

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().

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

Definition at line 275 of file transportgradientneumann.C.

References mFluxIds, and mpFluxHom.

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

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.

References mFluxIds, and mpFluxHom.

void oofem::TransportGradientNeumann::giveInputRecord ( DynamicInputRecord input)
virtual

Setups the input record string of receiver.

Parameters
inputDynamic 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().

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

Implements oofem::FEMComponent.

Definition at line 91 of file transportgradientneumann.h.

References _IFT_TransportGradientNeumann_Name.

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

Gives an internal dof manager from receiver.

Reimplemented from oofem::GeneralBoundaryCondition.

Definition at line 109 of file transportgradientneumann.C.

References mpFluxHom.

void oofem::TransportGradientNeumann::giveLocationArrays ( std::vector< IntArray > &  rows,
std::vector< IntArray > &  cols,
CharType  type,
const UnknownNumberingScheme r_s,
const UnknownNumberingScheme c_s 
)
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.

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 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.

virtual int oofem::TransportGradientNeumann::giveNumberOfInternalDofManagers ( )
inlinevirtual

Gives the number of internal dof managers.

Reimplemented from oofem::GeneralBoundaryCondition.

Definition at line 67 of file transportgradientneumann.h.

virtual bcType oofem::TransportGradientNeumann::giveType ( ) const
inlinevirtual
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 74 of file transportgradientneumann.h.

References oofem::UnknownBT.

IRResultType oofem::TransportGradientNeumann::initializeFrom ( InputRecord ir)
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.

See also
IR_GIVE_FIELD
IR_GIVE_OPTIONAL_FIELD
Parameters
irInput record to initialize from.
Returns
IRResultType

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.

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

Performs post initialization steps.

Reimplemented from oofem::GeneralBoundaryCondition.

Definition at line 101 of file transportgradientneumann.C.

References computeEta(), dispControl, and oofem::GeneralBoundaryCondition::postInitialize().

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

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 114 of file transportgradientneumann.C.

References mGradient, and oofem::FloatArray::times().

Referenced by integrateTangent().

Member Data Documentation

bool oofem::TransportGradientNeumann::dispControl
protected

Definition at line 104 of file transportgradientneumann.h.

Referenced by initializeFrom(), and postInitialize().

std :: vector< std :: vector< FloatArray > > oofem::TransportGradientNeumann::eta
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().

FloatArray oofem::TransportGradientNeumann::mCenterCoord
protected

Definition at line 103 of file transportgradientneumann.h.

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

IntArray oofem::TransportGradientNeumann::mFluxIds
protected
FloatArray oofem::TransportGradientNeumann::mGradient
protected

Definition at line 102 of file transportgradientneumann.h.

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

std :: unique_ptr< Node > oofem::TransportGradientNeumann::mpFluxHom
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().

IntArray oofem::TransportGradientNeumann::surfSets
protected

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

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:43 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011